<p>comment and comment-to are both just stored as text with the transaction. The intent is that comment be used to store what the transaction is for, and comment-to be used to store the name of the person or organization to which you're sending the transaction.</p>

<p>Neither are stored anywhere besides your wallet (they're not sent with transactions), and neither are encrypted in any way.</p>

CC BY-SA 3.0
2012-01-16T23:06:14.327Z
2012-01-16T23:06:14.327Z
gavinandresen
<p>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)</p>

CC BY-SA 3.0
2012-01-13T02:56:59.430Z
With what public key?
David Schwartz
CC BY-SA 3.0
2012-01-14T17:41:32.147Z
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
CC BY-SA 3.0
2012-01-14T20:56:06.063Z
That 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
CC BY-SA 3.0
2012-01-14T21:49:34.367Z
Thanks for clearing that up. Any idea what then the comment-to is for?
Lodewijk
<transactions><bitcoind><services>
Comment-to in the API
Lodewijk
# Comment-to in the API

(Asked by: username_0 on 2012-01-12)

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)

**Tags:** transactions, bitcoind, services

> **Comments:**
> **username_1**: With what public key?  
> **username_0**: 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!  
> **username_1**: That 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.)  
> **username_0**: Thanks for clearing that up. Any idea what then the comment-to is for?  

---

## 1 answers

### Answer by username_2 on 2012-01-16. Score: 12 | Accepted answer

comment and comment-to are both just stored as text with the transaction. The intent is that comment be used to store what the transaction is for, and comment-to be used to store the name of the person or organization to which you're sending the transaction.

Neither are stored anywhere besides your wallet (they're not sent with transactions), and neither are encrypted in any way.


---

