Post
Topic
Board Development & Technical Discussion
Re: How is a bitcoin address digitally signed?
by
wingding
on 29/05/2017, 23:03:37 UTC
I ask because this may be useful if you want the sender to attach a private message to the receiver.
Achow has answered your question on the first part. As to your second part, you can use a public key to encrypt messages but you cannot really include them in your transaction.

Of course, you can encrypt and put the message in the OP_Return of the transaction.

I was more thinking about external handling of messages, like a server service. The sender use receiver's public key to encrypt a message, and sign it by using his public key from txin address.

Edit: the sender use receiver's public key/address to encrypt a message that receiver can decrypt with his private key.