Post
Topic
Board Bitcoin Discussion
Re: Bitcoin challenge transaction: ~100 BTC total bounty to solvers!
by
pooya87
on 01/08/2019, 05:00:53 UTC
The x coordinate and y coordinate are both binary numbers in the range 2256.
the max is also a little bit less than 2256 but unlike private keys the max is defined by P (the prime) not N (the curve order)

For the curve used for Bitcoin public keys it turns out that for every x coordinate there are two possible y coordinates.
that doesn't depend on which curve is used, as long as it is an elliptic curve it will be symmetrical about the x-axis so for each x there are 2 y values. which is due to the formula being y2=...

A compressed public key give you the x coordinate and the sign of the y coordinate so in order to convert it to a full public key you have to calculate the correct y coordinate from the x coordinate.
that is not exactly the "sign", the first byte being 2 or 3 indicates if y is even or odd respectively.
we don't actually use any signs in elliptic curve calculations since we are using modular arithmetic. for example if prime is 7 then we have
4 ≡ 11 ≡ 18 ≡ -3 ≡ -10 (mod 7)
by a "contract" we only use the smallest positive number meaning "4"