Adds two rpc commands :
- signmessage <bitcoinaddress> <message>
- verifymessage <pubkey> <sign> <message>
It allows to sign a message with the public key of a bitcoin address you own, to be sure of the identity of the sender. Command : ./bitcoind signmessage 1L5zqFahc8Ahu9wtgJqCeJMendvD174xsG "Hi github users :p" Output : { "address" : "1L5zqFahc8Ahu9wtgJqCeJMendvD174xsG", "pubkey" : "04ef6e366cd6b0b8fbf02c0c25ad39fe892b90c597875899fdc9db16941cf43fb8c429e0534cb8b972f5cc9f1a50f36dc3352ffad427f073e1c64a145828a3be6e", "sign" : "3046022100a80b6e0c7c54c54ba943f4e3cde12f5a7dc5313e3f0a15ce868f01683ced64fa0221008b4ad7d3800a11c241dcef7aaf44c8224a7d9f1e54d3e669bf4887036b6d10af" }
Command : ./bitcoind verifymessage <above pubkey> <above sign> "Hi github users :p" Output : { "address" : "1L5zqFahc8Ahu9wtgJqCeJMendvD174xsG", "pubkey" : "04ef6e366cd6b0b8fbf02c0c25ad39fe892b90c597875899fdc9db16941cf43fb8c429e0534cb8b972f5cc9f1a50f36dc3352ffad427f073e1c64a145828a3be6e" }
Reviews and comments are welcomed, I don't know if all is used as it should.
Forum thread : http://www.bitcoin.org/smf/index.php?topic=6428.0
EDIT(alex): Sipa's revision references pull 183 - #524