Post
Topic
Board Off-topic
Re: [ARCHIVE] Bitcoin challenge discusion
by
itod
on 01/08/2019, 08:31:21 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"
Thanks, I was trying to be a little less technical for zeilar since he is a total noob - I did not want to overwhelm him.

You points are all well taken.  Very good information for the more technical savvy in the audience.

I'm trying to follow you guys, however, its quite difficult since I don't have any background knowledge. Its definitely quite interesting. Is there any good literature you could recommend to start with?

There are ton of books on Elliptic curves, but they are not Bitcoin related. Best tutorial is famous 4-part series: Elliptic Curve Cryptography: a gentle introduction.