Background: I want to implement sign message feature in Trezor.
Is there a standard for signing text messages?
So far I found out that etherscan.io signs messages without the prefix, i.e. it signs keccak(msg), but also accepts signatures "with Geth prefix" of keccak("\x19Ethereum Signed Message\n32"+keccak(msg)). Signed messages of the form keccak("\x19Ethereum Signed Message\n"+strlen(msg)+msg) are not accepted.
MyEtherWallet only accepts messages signed without any prefix.
Without the prefix one can misuse the sign message feature to sign a transaction, though. Is this intentional?
<length of message>ascii-hex, or ascii-dec or something else? (e.g.0xffor255)? – Lee Jul 25 '20 at 08:4732) – Miguel Mota Jul 25 '20 at 08:57