I would like a valid Bitcoin address (derived from a private key created by rolling a pair of hexadecimal dice 32 times) to be the private key of any private / public cryptography. So if I encrypt a message with this public key, I can then decrypt the same message with the Bitcoin address. Is this possible?
1 Answers
Yes, why would it not be possible?
You could, for instance, use the hybrid ECIES scheme to do this. ECIES employs ECDH to derive a symmetric key to encrypt / decrypt. The ECDSA and ECDH keys are fortunately identical, so performing ECIES with the BitCoin key pair should not pose a problem.
In the Bitcoin scheme it is possible to derive the public key again from the signature, if I'm not mistaken, but there is nothing preventing you from deriving the same public key directly from the private key and storing it elsewhere.
So that takes care of the technicalities. However, generally you should try and avoid reusing the same key (pair) for multiple purposes, if just to avoid exposure of the private key. Key management quickly becomes a nightmare when keys are reused.
For more information about the security, see this answer from poncho. If it makes poncho nervous it should definitely make you nervous as well.
- 96,351
- 14
- 169
- 323