Since bitcoin addresses are hashes of public keys and not public keys as such, if one wanted to craft a message that could be decrypted by the generator of an address, that can't be done just with an address. But after the generator of an address has spent something that was received there, which requires presenting the public key (or does it?) publicly, is that public key part of the public record so it can be used for direct message encryption?

And is there a standard way to perform such message encryption, analogous to opaque PGP blocks, and supported by UI panels in bitcoin-qt where one can paste blocks of plain (with intended recipient) or ciphertext (directed to one of one's own addresses) and see plaintext or a copyable opaque block?

2 Answers 2


You're right that public keys are generally unknown until coins are spent from their address, and that until coins are spent only a hash of the public key is published.

While it's technically possible to use bitcoin public keys for the kind of encryption you're imagining, you're the first person I've seen talking about doing so. The satoshi client has an interface to allow users to sign messages using their private key which others can verify using the associated bitcoin address, but using public keys to encrypt messages which only the holder of the private key can decrypt is something I've never seen.

Notice that signing a message with your private key in the satoshi client includes the corresponding public key in the output signature. This allows the recipient to verify the message. It's possible that otherwise they wouldn't know the public key, having only the corresponding bitcoin address.


The publicly shared Bitcoin address is a hash of the public key and nothing more.

The only thing a Bitcoin address shares with public-key infrastructure (PKI) is that it is a type of cryptography and it is shared publicly. It does not provide the ability to encrypt a message so that only the owner of the private key can decrypt it.

What can be done though, is to combine two technologies to give you what you are looking for.

With the Bitcoin-Qt client, Alice can sign a message that can be verified to have been signed using the private key for a specific address.

So Alice can then use Bitcoin-Qt to sign a message that says "my public key is: 73B7B2F3". Bob can then use his Bitcoin-Qt client to verify that the message was truly signed by the owner of a certain Bitcoin address.

Bob can then use GPG to encrypt a message to Alice, using Alice's public key that she claimed was hers and thus only Alice can decrypt and read Bob's message.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.