raiden-network / raiden

Raiden Network
https://developer.raiden.network
Other
1.84k stars 378 forks source link

Switch to eth_sign-compatible signatures in core and SCs #1531

Closed andrevmatos closed 6 years ago

andrevmatos commented 6 years ago

Problem Definition

We currently sign messages on Raiden simply by signing the hash of the message. By using eth_sign_sha3 as default hasher in signing.sign, and changing the smartcontracts accordingly (should be as simple as prepending the prefix before keccak256 it), we can make all our signing compatible with eth_sign RPC interface.

Of course, it doesn't mean we fully support this standard, but as the changes are minimal, it could allow us to fully use a web3 signer middleware, and possibly add in the future the option of doing all signing on the eth-node side, getting rid of opening the private key in the Raiden node, and easily switching to eip712 signatures when finished.

Related: #1293 #1402 #1467 #1475

andrevmatos commented 6 years ago

Smart-contract change done in raiden-network/raiden-contracts#252