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 x and 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)

| improve this answer | |
  • 3
    Note that in the specific case of Bitcoin's secp256k1 curve, a = 0 and b = 7, so the formula is y^2 = x^3 + 7. – Pieter Wuille Jan 13 '15 at 20:41

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).

| improve this answer | |

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

source: https://en.bitcoin.it/wiki/Secp256k1

| improve this answer | |
  • 1
    This is a potentially useful answer, but it could be improved by adding a little more explanation. – Murch Jul 7 '17 at 16:18
  • Yes.. Uncompressed G has 2 co-ordinates X and Y since it is point on the curve and its size is 520 bits(65 Bytes) i.e 256 bits for each co-ordinate And it has a prefix 04 , While Compressed G has only one co-ordinate i.e.X And a prefix either 02 when Y co-ordinate is positive or 03 when Y co-ordinate is Negative. – DOLLY PATWA Jul 13 '17 at 11:06

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

| improve this answer | |

Ok first and foremost people no offense but your both just a little off on your thoughts of how it is supposed to be understood. The fact is that {y^2=x^3+ax+b} = n order h= base point G 02/03 in compressed format and 04 in uncompressed. 04 was to show the whole uncompressed key (X^3, Y^2). The understanding of the compression is that the 02 is even and the 03 is odd for X. But in order to so called get your private key back if lost (because the public key is not supposed to be shared hence the reason for the ripemd and md5 versions). Simply put in an easier understanding for most. XXX+7=YY so the cubic sqrt of x generates the x and the sqrt of Y generates the Y of the random number that was began with because this is a graph either way around. Meaning function(x,y)=(x) random number. So from the beginning when you use a random number in the curve it is a point on the Elliptic curve in elliptic curve cryptoGRAPHy so a X and Y coordinate comes from your random number that is entered into the equation xxx+ax+b=yy where a=0 and b=7 over a finite field which is basically a square with 0,0 : 0,1 : 1,1 : 1,0 hence the reason for the cubic function of x. Where most get confused is because of the exponents P,N,A,B,G and H being thrown in there but you must understand that the truth is those variables make up the sextuple T. Where they are pretty much constant variables except h which is either 1 or 0 to determine the outcome of G. P is the finite field 2^255-2^32-2^9-2^8-2^7-2^6-2^4-1. A=0 B=7 and N is the order mod h to determine the outcome of G. N does not change values it is the sqrt of 2^255 so basically 2^128. Trust me I know what I speak of. Although things have changed with the addition of all of the bips, HD wallets, and the various upgrades throughout the years. What I speak of is the truth. In the beginning you started out with a key that was unserialized at first which meant it was 228 bits then it was serialized which gave you a shorter key that was your Eckey(elliptic curve key) meaning your random number that your public key would be derived from following the math I have laid before you. It would calculate your public key, a signature, and a new private key if needed. But of course with everyone thinking they know best and using programs to manipulate keys to their benefit, or because they think theirs is better, the differences from the beginning are astounding. Just saying.... Hope this clears up things a lot better for you guys. If you don't believe me right now just know at some point in the future you will understand why my knowledge on this subject is so confident.

| improve this answer | |
  • 1
    You should edit that to at least have some paragraphs/formatting - walls of texts are hard to digest in the best of times, and even harder when explaining crypto – Raghav Sood Aug 18 at 4:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.