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. (...)
is_squarechecking if your numbers are squares of integers, or squares of residue classes of integers (i.e., working mod $p$)? I'm not sure this resolves things, but I suspect it will. – pjs36 Jan 28 '17 at 23:12def is_square(x): return ceil(sqrt(x)) ** 2 == xyield the same result - i.e. $.3%$ – Giuseppe Crinò Jan 28 '17 at 23:23