Zenroom icon indicating copy to clipboard operation
Zenroom copied to clipboard

Ethereum signature of non-string objects

Open andrea-dintino opened this issue 2 years ago • 1 comments

We found that the standard for ethereum signatures (at least based on etherscan + Metamask ) is that messages are signed as strings. If you pass an array or a json to etherscan, it gets escaped before it's signed (the signature happens in Metamask - thus I supposed this is a standard).

If guess (!) the integration with Metamask, allows you to sign a !string object, which I guess (!) is done by encode the object to ABI and then sign it (keccak256 -> r, s, v) but ths has to be investigated further.

andrea-dintino avatar Jun 09 '23 15:06 andrea-dintino

It would be good to progress this issue by adding a list of vectors: test messages and resulting signatures made in metamask

jaromil avatar Aug 08 '23 19:08 jaromil