3
1
Sendfrom en senttoaddress both have [comment] and [comment-to] as arguments. Comment uses the script to put in a message, thus in a semi-standardized manner. Does comment-to encrypt the message with that public key? I'm kind of guessing in the dark without any explanation. (I'd suggest the tags API, RPC or JSON-RPC but I've no reputation)
With what public key? – David Schwartz – 2012-01-13T02:56:59.430
You could specify a target address for you comment. Simply encrypting it using the public key that that address is would make it possible only for the recipient to decode the message. But I'm not sure that's what this actually does, there's no documentation! – Lodewijk – 2012-01-14T17:41:32.147
2That wouldn't work for two reasons. First, you don't necessarily know the public key. A bitcoin address is not a public key, it's a hash. Second, the public key is useful only to validate signatures, you can't encrypt anything with it. (This isn't RSA, where the public key can be used to encrypt, it's ECDSA, where the public key can only validate signatures.) – David Schwartz – 2012-01-14T20:56:06.063
Thanks for clearing that up. Any idea what then the comment-to is for? – Lodewijk – 2012-01-14T21:49:34.367