What exactly is the generator G in elliptical curve math? It is typically described as a point on the curve. Is this a tuple of values? What properties does it have?
For a curve with for instance the equation:
y^2 = x^3 + a * x + b
The generator point G, or a ECDSA public key, is a pair of coordinates
y, for which the above equation holds.
To reduce the storage size for a curve point, one can also store a sign and the
x coordinate, this is what is known as point-compression.
You can then reconstruct the
y by calculating
sign * sqrt(x^3+a*x+b).
Note that for calculations in modular fields the square root can only be calculated efficiently when the
p != 1 (mod 8)
You can think of the generator G as the first point after infinity on the curve. Begin with infinity and add G; the result is G. Add G to this and you get 2G. Add G to this and you get 3G. And so on. If you add G a total of
n times (where
n is the order of the curve) you will be back at infinity, where you started; the whole curve is a never-ending loop. The order
n is how many distinct points are on the curve, or in Bitcoin terms, how many possible private keys there are (plus 1 for the point at infinity).
The value of
G(compressed) = 02 79BE667E F9DCBBAC 55A06295 CE870B07 029BFCDB 2DCE28D9 59F2815B 16F81798
G(uncompressed) = 04 79BE667E F9DCBBAC 55A06295 CE870B07 029BFCDB 2DCE28D9 59F2815B 16F81798 483ADA77 26A3C465 5DA4FBFC 0E1108A8 FD17B448 A6855419 9C47D08F FB10D4B8
Starting with a private key in the form of a randomly generated number k, we multiply it by a predetermined point on the curve called the generator point G to produce another point somewhere else on the curve, which is the corresponding public key K. The generator point is specified as part of the secp256k1 standard and is always the same for all keys in bitcoin: K = k *G where k is the private key, G is the generator point, and K is the resulting public key, a point on the curve. Because the generator point is always the same for all bitcoin users,a private key k multiplied with G will always result in the same public key K. The rela‐ tionship between k and K is fixed, but can only be calculated in one direction, from k to K. That’s why a bitcoin address (derived from K) can be shared with anyone and does not reveal the user’s private key (k).
from the Book "Mastering Bitcoin" by Andreas Antonopoulos http://uplib.fr/w/images/8/83/Mastering_Bitcoin-Antonopoulos.pdf