4 ms·
And then I just make it sign a message sending all the btc to my address, then broadcast that publicly. Very bad idea to sign everything that comes your way, k
by ikeboy 12y ago
And then I just make it sign a message sending all the btc to my address, then broadcast that publicly.
Very bad idea to sign everything that comes your way, kind of like `eval` on text input.
- martinko 12y ago> Very bad idea to sign everything that comes your way, kind of like `eval` on text input. Nowhere did he suggest this.
- ikeboy 12y agoOthers said it in the replies. And any implementation that tries to check the message opens up another avenue of attack.
- nadaviv 12y agoBitcoin has a separate schema for signing textual messages with a special magic prefix ('\x18Bitcoin Signed Message:\n'), which would prevent such an attack. Edit: here's a JavaScript implementation I wrote that does that, if anyone is interested in details: https://github.com/cryptocoinjs/coinmsg/blob/d2cb985dd9994f1950a7c0112c2720fb06ad1843/lib/signer.js#L23-L42 https://github.com/cryptocoinjs/coinmsg/blob/d2cb985dd9994f1...