7

Is it possible for a message sender to encrypt a message string with a receiver's public wallet address, email this ciphertext to the receiver and then have the receiver decrypt the message using their wallet (private key)?

I'm not talking about spamming the blockchain, the message could be sent using IM/Email once encrypted.

So it's sort of like using gpg but with the wallet public/private key.

Is this possible?

3

You can not use the bitcoin address directly, but if the funds in the address have ever been spent, then you can see the public key associated with it in the blockchain, and you can encrypt with that using this python implementation: https://github.com/ikndevs/jeeq

bitcointalk discussion here: https://bitcointalk.org/index.php?topic=196378.5

  • Is this secure? This sounds like it's using a cryptographic primitive in a way that was never intended. – Nick ODell Jul 19 '15 at 0:56
3

The cryptography Bitcoin uses for wallet private keys is ECDSA, using curve secp256k1:

http://en.bitcoin.it/wiki/Elliptic_Curve_Digital_Signature_Algorithm

It is for signing messages, and does not useful for any method of encryption.

There are other methods of encrypting and communicating a message, ... Gli.ph, BitMessage, GPG/OpenPGP, and more.

If you trusted the party you are sending funds to, that party could use the message signing capability in the client to sign a message that tells you what GPG key to use in encrypting a message to that party, for instance. That would give you the assurance that you are encrypting a message truly only readable by the party that has control of that Bitcoin address and signed the message.

0

It is not possible to encrypt something (if given an address) in a way the owner can decrypt.

However, if provided a message, an address, and a signature of the message by the respective private key, it is possible to recover the public key which you can use.

It's not quite so simple however - most public key encryption schemes have a limit on the data that can be encrypted (limited by key size). Because of this, GPG, and others using public key cryptography, involves generating a random for symmetric encryption of each message, and encrypts the new key with the recipients EC/RSA public key.

It might be possible to use secp256k1 as a basis for this, but ultimately the choice of curve is a minor detail in the overall design of the scheme.

Just because you can employ secp256k1 this way, doesn't mean you should - there is already software which has existed for years which can do just this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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