I know the curve has formula y^{2}=x^{3}+ax+b. However, some websites are saying that a=0 and b=7 for secp256k1?

What is secp256k1? Is it the curve that is always used or does it generate the field in order to generate a new curve?

1 Answer 1


What is secp256k1, is it the curve that is always used

Indeed the elliptic curve used in Bitcoin is secp256k1 which is the curve defined using a=0 and b=7 in your equation mod p. But other curves are used for other use cases (maybe other cryptocurrencies too, not sure).

does it generate the field in order to generate a new curve.

No the curve stays the same. The field size p is implicitly defined by the curve. In secp256k1's case p = 2^256 - 2^32 - 977 or p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F in hex and is prime.

The generator point G (on the curve) is (Gx, Gy) where



The curve order (how many points there are on the curve) of secp256k1 is:


For more details see Jimmy Song's first three chapters of his book Programming Bitcoin.

The question in the title asks about generating the public key. That is calculated by effectively multiplying the generator point G (coordinates) by the private key (scalar).

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.