Post
Topic
Board Development & Technical Discussion
Re: y coordinate calculation (PUBLIC KEY BITCOIN)
by
bytcoin
on 06/09/2021, 09:54:40 UTC
Each x coordinate corresponds to two y coordinates, because of square root.

To convert between Ys, you have to calculate y2 = (y1 - secp256k1.p) * -1. One of Y is even and another is odd.

To indicate which coordinate is needed, the compressed keys starts with 02 for even Y and 03 for odd Y.
Yes...but what I would really like to understand is why private key 3 needed to invert the y value and private keys 1 and 2 didn't need to invert the y value.

Why do there have y values that need to be inverted and other values that don't need to be inverted?

What method is used to define when I have to invert the y value?