Quadratic residuosity problem explained

The quadratic residuosity problem (QRP[1]) in computational number theory is to decide, given integers

a

and

N

, whether

a

is a quadratic residue modulo

N

or not.Here

N=p1p2

for two unknown primes

p1

and

p2

, and

a

is among the numbers which are not obviously quadratic non-residues (see below).

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 .

N

of unknown factorization is the product of 2 or 3 primes.[2]

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\equivb2\pmodT

.Otherwise we say it is a quadratic non-residue.When

T=p

is a prime, it is customary to use the Legendre symbol:

\left(

a
p

\right)=\begin{cases} 1&ifaisaquadraticresiduemodulopanda\not\equiv0\pmod{p},\\ -1&ifaisaquadraticnon-residuemodulop,\\ 0&ifa\equiv0\pmod{p}.\end{cases}

This is a multiplicative character which means

(\tfrac{a}{p})=1

for exactly

(p-1)/2

of the values

1,\ldots,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=p1p2

where

p1

and

p2

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

p1

and

p2

and

\gcd(a,N)=1

.

Since we don't know

p1

or

p2

, we cannot compute

(\tfrac{a}{p1})

and

(\tfrac{a}{p2})

. However, it is easy to compute their product.This is known as the Jacobi symbol:
\left(a
N

\right)=\left(

a\right)\left(
p1
a
p2

\right)

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

However,

(\tfrac{a}{N})

cannot in all cases tell us whether

a

is a quadratic residue modulo

N

or not!More precisely, if

(\tfrac{a}{N})=-1

then

a

is necessarily a quadratic non-residue modulo either

p1

or

p2

, in which case we are done.But if

(\tfrac{a}{N})=1

then it is either the case that

a

is a quadratic residue modulo both

p1

and

p2

, or a quadratic non-residue modulo both

p1

and

p2

.We cannot distinguish these cases from knowing just that

(\tfrac{a}{N})=1

.

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

Problem:Given integers

a

and

N=p1p2

, where

p1

and

p2

are distinct unknown primes, and where

(\tfrac{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,\ldots,N-1

such that

(\tfrac{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\in\{1,\ldots,p1-1\}

, then

(\tfrac{a}{p1})=1

, and for the rest we have

(\tfrac{a}{p1})=-1

.By extension, this also holds for half the choices of

a\in\{1,\ldots,N-1\}\setminusp1Z

.Similarly for

p2

.From basic algebra, it follows that this partitions

(Z/NZ) x

into 4 parts of equal size, depending on the sign of

(\tfrac{a}{p1})

and

(\tfrac{a}{p2})

.

The allowed

a

in the quadratic residue problem given as above constitute exactly those two parts corresponding to the cases

(\tfrac{a}{p1})=(\tfrac{a}{p2})=1

and

(\tfrac{a}{p1})=(\tfrac{a}{p2})=-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. It also yields the public key Goldwasser–Micali cryptosystem,[3] [4] as well as the identity based Cocks scheme.

See also

Notes and References

  1. Book: Kaliski. Burt. Encyclopedia of Cryptography and Security . Quadratic Residuosity Problem . 2011. 1003. 10.1007/978-1-4419-5906-5_429. 978-1-4419-5905-8 . free.
  2. Adleman, L. . On Distinguishing Prime Numbers from Composite Numbers . Proceedings of the 21st IEEE Symposium on the Foundations of Computer Science (FOCS), Syracuse, N.Y. . 1980 . 387–408 . 10.1109/SFCS.1980.28 . 0272-5428.
  3. Book: S. Goldwasser, S. Micali . Proceedings of the fourteenth annual ACM symposium on Theory of computing - STOC '82 . Probabilistic encryption & how to play mental poker keeping secret all partial information . 1982 . 365–377 . 10.1145/800070.802212. 0897910702 . 10316867 .
  4. S. Goldwasser, S. Micali . Probabilistic encryption . Journal of Computer and System Sciences . 28 . 2 . 1984 . 270–299 . 10.1016/0022-0000(84)90070-9. free .