<p>You got the formula wrong.</p>

<p>The correct formula is </p>

<p>y<sup>2</sup> = x<sup>3</sup> + 7 mod N</p>

<p>where <code>N</code> is a very large prime.</p>

CC BY-SA 3.0
2017-06-20T06:49:41.127Z
2017-06-20T06:49:41.127Z
Murch
<p>Public key 3, 4 fits the equation of y^2 = x^2 + 7</p>

<p>Yet this comes up as an "invalid public key".   How is that invalid?  Sure, it deviates extremely from other numbers, but what other equations are being applied to the public key to determine its validity?</p>

CC BY-SA 3.0
2014-07-13T18:45:09.913Z
The formula is y^2 = x^3 + 7. I don't think there are any small-number solutions.
Pieter Wuille
CC BY-SA 3.0
2014-07-14T15:05:11.873Z
Not sure this is what you are talking about, but apparently [y^2=x^3+7 has no integral solutions](http://math.stackexchange.com/q/222093).
Murch
CC BY-SA 3.0
2015-02-02T18:46:22.017Z
That's OK because secp256k1 doesn't just use plain integers, the equation above is evaluated with integers modulo a very large prime N.  Really the equation is: `y^2 = x^3 + 7 mod N`.
David Grayson
<development><protocol><public-key><ecdsa>
Other ways to determine the validity of a public key
Mine
# Other ways to determine the validity of a public key

(Asked by: username_0 on 2014-07-13)

Public key 3, 4 fits the equation of y^2 = x^2 + 7

Yet this comes up as an "invalid public key". How is that invalid? Sure, it deviates extremely from other numbers, but what other equations are being applied to the public key to determine its validity?

**Tags:** development, protocol, public-key, ecdsa

> **Comments:**
> **username_1**: The formula is y^2 = x^3 + 7. I don't think there are any small-number solutions.  
> **username_2**: Not sure this is what you are talking about, but apparently [y^2=x^3+7 has no integral solutions](http://math.stackexchange.com/q/222093).  
> **username_3**: That's OK because secp256k1 doesn't just use plain integers, the equation above is evaluated with integers modulo a very large prime N.  Really the equation is: `y^2 = x^3 + 7 mod N`.  

---

## 1 answers

### Answer by username_2 on 2017-06-20. Score: 1

You got the formula wrong.

The correct formula is

y2 = x3 + 7 mod N

where `N` is a very large prime.


---

