Algorithm to find square root of a quadratic residue mod p

Click For Summary
SUMMARY

This discussion focuses on Tonelli's algorithm for finding square roots of quadratic residues modulo a prime number p. The key steps involve expressing p-1 as 2st, applying Euler's criterion, and utilizing the properties of cyclic groups. The confusion arises around the statement that A is an even power of D-1, which is clarified through the relationship between the orders of A and D-1. The discussion concludes with a query regarding the strict inequality in the final solution.

PREREQUISITES
  • Understanding of quadratic residues and nonresidues
  • Familiarity with Euler's criterion
  • Knowledge of cyclic groups and their properties
  • Basic concepts of number theory, specifically modular arithmetic
NEXT STEPS
  • Study the detailed workings of Tonelli's algorithm for various primes
  • Explore the implications of Euler's criterion in number theory
  • Learn about the structure of cyclic groups and their generators
  • Investigate other algorithms for finding square roots modulo p, such as the Cipolla's algorithm
USEFUL FOR

Mathematicians, number theorists, and computer scientists interested in modular arithmetic and algorithms for solving quadratic equations in finite fields.

tjkubo
Messages
41
Reaction score
0
I'm going through an explanation in a number theory book about Tonelli's algorithm to find the square roots of a quadratic residue modulo ##p## where ##p## is prime, i.e. I want to solve ##x^2 \equiv a \pmod{p}## with ##(\frac{a}{p}) = 1##. The book goes as follows:

Let ##p - 1 = 2^s t##, where ##t## is odd.

By Euler's criterion, ##A^{2^{s-1}} \equiv 1## where ##A = a^t##, so the order of ##A## divides ##2^{s-1}##.

Let ##d## be a quadratic nonresidue mod ##p## and ##D = d^t##.

By Euler's criterion, ##D^{2^{s-1}} \equiv -1## so the order of ##D## is exactly ##2^s##. Similarly, the order of ##D^{-1}## is ##2^s##.

Since the group ##U(p)## of units mod ##p## is cyclic, ##A## is in ##\langle D^{-1} \rangle##, the cyclic subgroup generated by ##D^{-1}##. Moreover, ##A \equiv D^{-2u}## where ##u## is some integer ##0 \leq u < 2^{s-1}##.

Then, ##a^tD^{2u} \equiv 1##, so ##a^{t+1}D^{2u} \equiv a##. Thus, a solution is ##x \equiv a^{(t+1)/2}D^u##.I got stuck where it says ##A## is an even power of ##D^{-1}##. Can someone explain this?
 
Physics news on Phys.org
Note1 : the sentence "since the group U(p) of units modulo p is cyclic" is very confusing in my opinion. The right justification should be: if w is a primitive root modulo p, then w^t is of order 2^s and generates all the elements of order dividing 2^s. So, the group of all such element is cyclic of order 2^s. Since D is of order 2^s, D^{-1} is a generator of this group.

Note2 : the answer to your question is: let A = D^{-\alpha}, with 0\leq \alpha\leq 2^s. Since the order of A divides 2^{s-1}, say 2^i, and since the order of D^{-1} is 2^{s}, there holds -\alpha 2^i = k2^s, with i\leq s-1. Hence \alpha is multiple of 2, say \alpha = 2u, with 0\leq 2u\leq 2^s. Hence u\leq 2^{s-1}.
 
Last edited:
  • Like
Likes   Reactions: jim mcnamara
Thank you for clarifying.

I wonder why my book made that last inequality a strict one, since that would just lead to ##x = - a^{(t+1)/2}## which is also a solution.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
7K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K