Suvarna Garge (Editor)

Quadratic residuosity problem

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

The quadratic residuosity problem in computational number theory is to decide, given integers a and N , whether a is a quadratic residue modulo N or not. Here N = p 1 p 2 for two unknown primes p 1 and p 2 , and a is among the numbers which are not obviously quadratic non-residues (see below).

Contents

The problem was first described by Gauss in his Disquisitiones Arithmeticae in 1801. This problem is believed to be computationally difficult. Several cryptographic methods rely on its hardness, see Applications.

An efficient algorithm for the quadratic residuosity problem immediately implies efficient algorithms for other number theoretic problems, such as deciding whether a composite N of unknown factorization is the product of 2 or 3 primes.

Precise formulation

Given integers a and T , a is said to be a quadratic residue modulo T if there exists an integer b such that

a b 2 ( mod T ) .

Otherwise we say it is a quadratic non-residue. When T = p is a prime, it is customary to use the Legendre symbol:

( a p ) = { 1  if  a  is a quadratic residue modulo  p  and  a 0 ( mod p ) , 1  if  a  is a quadratic non-residue modulo  p , 0  if  a 0 ( mod p ) .

This is a multiplicative character which means ( a p ) = 1 for exactly ( p 1 ) / 2 of the values 1 , , p 1 , and it is 1 for the remaining.

It is easy to compute using the law of quadratic reciprocity in a manner akin to the Euclidean algorithm, see Legendre symbol.

Consider now some given N = p 1 p 2 where p 1 and p 2 are two, different unknown primes. A given a is a quadratic residue modulo N if and only if a is a quadratic residue modulo both p 1 and p 2 .

Since we don't know p 1 or p 2 , we cannot compute ( a p 1 ) and ( a p 2 ) . However, it is easy to compute their product. This is known as the Jacobi symbol:

( a N ) = ( a p 1 ) ( a p 2 )

This can also be efficiently computed using the law of quadratic reciprocity for Jacobi symbols.

However, ( a N ) can not in all cases tell us whether a is a quadratic residue modulo N or not! More precisely, if ( a N ) = 1 then a is necessarily a quadratic non-residue modulo either p 1 or p 2 , in which case we are done. But if ( a N ) = 1 then it is either the case that a is a quadratic residue modulo both p 1 and p 2 , or a quadratic non-residue modulo both p 1 and p 2 . We cannot distinguish these cases from knowing just that ( a N ) = 1 .

This leads to the precise formulation of the quadratic residue problem:

Problem: Given integers a and N = p 1 p 2 , where p 1 and p 2 are unknown, different primes, and where ( a N ) = 1 , determine whether a is a quadratic residue modulo N or not.

Distribution of residues

If a is drawn uniformly at random from integers 0 , , N 1 such that ( a N ) = 1 , is a more often a quadratic residue or a quadratic non-residue modulo N ?

As mentioned earlier, for exactly half of the choices of a { 1 , , p 1 1 } , then ( a p 1 ) = 1 , and for the rest we have ( a p 1 ) = 1 . By extension, this also holds for half the choices of a { 1 , , N 1 } p 1 Z . Similarly for p 2 . From basic algebra, it follows that this partitions ( Z / N Z ) × into 4 parts of equal size, depending on the sign of ( a p 1 ) and ( a p 2 ) .

The allowed a in the quadratic residue problem given as above constitute exactly those two parts corresponding to the cases ( a p 1 ) = ( a p 2 ) = 1 and ( a p 1 ) = ( a p 2 ) = 1 . Consequently, exactly half of the possible a are quadratic residues and the remaining are not.

Applications

The intractability of the quadratic residuosity problem is the basis for the security of the Blum Blum Shub pseudorandom number generator and the Goldwasser–Micali cryptosystem.

References

Quadratic residuosity problem Wikipedia