Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: blub on October 15, 2013, 07:36:30 PM



Title: Bitcoin Key addition
Post by: blub on October 15, 2013, 07:36:30 PM
Just to check if I have understood this correctly:

If I have a private key P, and the corresponding public key Q
than the public key to P+1 is Q+G where G is the base point of secp256k1?


Title: Re: Bitcoin Key addition
Post by: BurtW on October 16, 2013, 06:24:07 AM
Yes


Title: Re: Bitcoin Key addition
Post by: blub on October 20, 2013, 06:56:19 PM
2nd question:

Is there a efficient way to add 2 compressed keys, or would uncompressing, adding and recompressing them be the way to go?


Title: Re: Bitcoin Key addition
Post by: BurtW on October 21, 2013, 12:05:37 AM
2nd question:

Is there a efficient way to add 2 compressed keys, or would uncompressing, adding and recompressing them be the way to go?
I think you will have to uncompress the keys, in other words calculate the y values of the points and then select the correct signs (from the compressed key information).  Then you can add the two keys correctly.

Once you have added the two keys together then you can use the point as is or, if you wish, compress it again.