Verify Message fails
Verify message fails when attempting to verify a message signed by geth. I believe this has something to do with the 'Ethereum Signed Message' prefix that geth adds.
Can you please send example of what geth outputs / you are trying to verify. Thank you!
in geth console do this...
-
web3.eth.sign(web3.eth.accounts[0], web3.sha3('fubar')) - take the output of that command and build a json like so...
-
{"address":"<my_address>", "msg":"fubar", "sig":"<result_of_above_command>"} - paste that into the form here https://www.myetherwallet.com/signmsg.html...
The result is a red "Invalid signed transaction" message.
Verification works properly on https://etherscan.io/verifySig
@onedrop can you generate one for me? :)
ok here...
{"address":"0xaaff40fa1bb528905d626b78a67b7a019f63f5bf", "msg":"fubar", "sig":"0x36b7a6de3a0ff8ba7520c31ee022dbdfd369bd7887d610b70353a5e9e9e56d9016b9c3512f443f0d683eca4bc9a173c86d0851cd9ce8aff5543591dc1859bdfa1c"}
If it helps, it appears that geth prepends the string \x19Ethereum Signed Message:\n<length of message> to the data before signing it.
For the record, different supported wallets by MyEtherWallet sign messages differently, so it matters which wallet you use, and as @onedrop reports above some are not compatible with the standard that Ethereum uses (geth, etherscan, etc). My current observations are that Metamask and Ledger are fully compatible, MEW's keystore/private key is mostly compatible (but it breaks on some types of inputs) and Trezor signs it using its own way (see this thread: https://github.com/ethereum/go-ethereum/issues/14794).
So if you are expecting something that works across the board, you will be disappointed :(
im also here icant verify my contrract address