Post
Topic
Board Development & Technical Discussion
Re: How is a bitcoin address digitally signed?
by
Markley
on 11/06/2017, 16:16:19 UTC
signing is done using private keys, you verify the signature with the public key

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.