<p>Most of the private to public key implementations I've come across do not make use of the equation y^2=x^3+7  (the weierstrass equation defining SECp256k1).</p>
<p>One that i often use is in the link below and does not use any external libraries.[EllipticCurvesPart4-PrivateKeyToPublicKey.py][1]</p>
<p>As you can tell, only the parameters a and b of the equation are used in the code. This brings up the following question :</p>
<p>Are a=0 and b=7 coefficients with special properties?Or they could have been any other number?</p>
<p>This is not about the parameters of SECP256k1 but has more to do with an observation i have come across where the curve under the specific values 0 and 7 translates into a different structure.</p>
<p>I would first appreciate knowing if there are any explanations that are more valid and perhaps verifiable that may negate this observation.
[1]: <a href="https://github.com/wobine/blackboard101/blob/master/EllipticCurvesPart4-PrivateKeyToPublicKey.py" rel="nofollow noreferrer">https://github.com/wobine/blackboard101/blob/master/EllipticCurvesPart4-PrivateKeyToPublicKey.py</a></p>

CC BY-SA 4.0
2022-07-13T07:27:37.163Z
I failed to find the full satisfactory answer, but I remember reading that these specific values make secp256k1 more computationally efficient. In particular, 7 was chosen because 7 % 4 = 3 and that makes point arithmetic more efficient.
Sachin Meier
CC BY-SA 4.0
2022-07-14T15:38:20.500Z
from the various sources i've come across, i learned that the equation sort of defines the smallest subgroup that exists in a cyclic group of a prime order ( i.e group order n in secp256k1). If thats the case, then one does not expect that the smallest subgroup is modulated since the modulus is at the end of the bigger cyclic group and would have to have a prime order, and 4 isn't prime. Also  reference the shared  b is never used in private to public key derivation.  so how does a system running the code knows it is dealing with an EC?
Moussa Al-Basheer
<secp256k1>
Why are coefficients a=0 and b=7 used to define the Weierstrass equation in SECp256k1?
Moussa Al-Basheer
# Why are coefficients a=0 and b=7 used to define the Weierstrass equation in SECp256k1?

(Asked by: username_0 on 2022-07-11)

Most of the private to public key implementations I've come across do not make use of the equation y^2=x^3+7 (the weierstrass equation defining SECp256k1).

One that i often use is in the link below and does not use any external libraries.[EllipticCurvesPart4-PrivateKeyToPublicKey.py][1]

As you can tell, only the parameters a and b of the equation are used in the code. This brings up the following question :

Are a=0 and b=7 coefficients with special properties?Or they could have been any other number?

This is not about the parameters of SECP256k1 but has more to do with an observation i have come across where the curve under the specific values 0 and 7 translates into a different structure.

I would first appreciate knowing if there are any explanations that are more valid and perhaps verifiable that may negate this observation.
[1]: <https://github.com/wobine/blackboard101/blob/master/EllipticCurvesPart4-PrivateKeyToPublicKey.py>

**Tags:** secp256k1

> **Comments:**
> **username_1**: I failed to find the full satisfactory answer, but I remember reading that these specific values make secp256k1 more computationally efficient. In particular, 7 was chosen because 7 % 4 = 3 and that makes point arithmetic more efficient.  
> **username_0**: from the various sources i've come across, i learned that the equation sort of defines the smallest subgroup that exists in a cyclic group of a prime order ( i.e group order n in secp256k1). If thats the case, then one does not expect that the smallest subgroup is modulated since the modulus is at the end of the bigger cyclic group and would have to have a prime order, and 4 isn't prime. Also  reference the shared  b is never used in private to public key derivation.  so how does a system running the code knows it is dealing with an EC?  

---

## 0 answers

