Determining if an integer is a square in a finite field

305 Views Asked by At

Looking at the elliptic curve C: $Y^{2} = X^{3} + X + 2$ in the finite field $\mathbb{F_{13}}$.

I first looked at the line $X = 2$, which yields $Y^{2}= 12$, and was "lucky" and saw that $12+13 = 25 = 5^{2}$, so that the intersections between the line and the curve are $(2,-5),(2,5)$

When I then looked at $X = 3$, I got $Y^{2} = 32 = 6\mod13$ and I am stuck.

Surely there is a better way of deciding whether an integer is a square in a group than trying the approach of

$6 + 13i = x^2?$ until it works. And when would you even know to stop?

1

There are 1 best solutions below

2
On

For small $p$ such as $p=13$ it only takes a few seconds to compute $k^2\pmod{p}$ for $0\leq k\leq\frac{p-1}{2}$, yielding all squares mod $p$.

For large $p$ the law of quadratic reciprocity gives a fast way to determine whether a number is a quadratic residue modulo $p$.