Is it true that $x^3 + a_4 x + a_6$ is a perfect square 50% of the time?

79 Views Asked by At

Can it be said that

$$x^3 + a_4 x + a_6 \; (\text{mod}\,p)$$

is a perfect square half of the time?

Apparently it does not. Simulating the elliptic curve points $\text{mod}\,103217$ only $310$ of them are perfect squares.

>>> from gmpy2 import is_square
>>> P = 103217
>>> len(list(filter(is_square, map(eq, range(P))))) / P
0.0030033812259608397

Yet, reading from Trappe's "Introduction to Cryptography with Coding Theory" (page 356) it's said that

Since $x^3 + a_4 x + a_6$ is a square half of the time, we have about $1/2^K$ chance of failure. (...)