Post
Topic
Board Development & Technical Discussion
Re: Is it secure to use bitcoin private public key for message encryption?
by
bit22gen
on 15/11/2015, 00:22:52 UTC
The message encryption is not done by the elliptic curve when using ECIES,
conventional encryption such as AES is used for message encryption.

The elliptic curve is used to make the sender and the receiver agree on an encryption key.

From http://www.johannes-bauer.com/compsci/ecc/

================================
Performing encryption using ECIES is then relatively easy. Let's assume we want to encrypt data with the public key Q that we just generated.
Again, first choose a random number r so that
0 < r < n

Then, calculate the appropriate point R by multiplying r with the generator point of the curve:

R = r * G
Also multiply the secret random number r with the public key point of the recipient of the message:

S = r * Q
Now, R is publicly transmitted with the message and from the point S a symmetric key is derived with which the message is encrypted.
A HMAC will also be appended, but we'll skip that part here and just show the basic functionality.
================================

The only thing that is done with the elliptic curve is two multiplications.

The point S is used as a symmetric key, and is known by the sender and recipient but no one else.

The point R is transferred over a public network, seen by anyone.

The receiver can then compute S by using his private key.


Note the extreme simplicity in the scheme: Only EC multiplication is used.