The quadratic residuosity problem (QRP) in
computational number theory
In mathematics and computer science, computational number theory, also known as algorithmic number theory, is the study of
computational methods for investigating and solving problems in number theory and arithmetic geometry, including algorith ...
is to decide, given integers
and
, whether
is a
quadratic residue
In number theory, an integer ''q'' is called a quadratic residue modulo ''n'' if it is congruent to a perfect square modulo ''n''; i.e., if there exists an integer ''x'' such that:
:x^2\equiv q \pmod.
Otherwise, ''q'' is called a quadratic non ...
modulo
or not.
Here
for two unknown primes
and
, and
is among the numbers which are not obviously quadratic non-residues (see below).
The problem was first described by
Gauss
Johann Carl Friedrich Gauss (; german: Gauß ; la, Carolus Fridericus Gauss; 30 April 177723 February 1855) was a German mathematician and physicist who made significant contributions to many fields in mathematics and science. Sometimes refer ...
in his ''
Disquisitiones Arithmeticae'' in 1801.
This problem is believed to be
computationally difficult.
Several cryptographic methods
rely on its hardness, see .
An efficient algorithm for the quadratic residuosity problem immediately implies efficient algorithms for other number theoretic problems, such as deciding whether a composite
of unknown factorization is the product of 2 or 3 primes.
Precise formulation
Given integers
and
,
is said to be a ''quadratic residue modulo
'' if there exists an integer
such that
:
.
Otherwise we say it is a quadratic non-residue.
When
is a prime, it is customary to use the
Legendre symbol:
:
This is a
multiplicative character In mathematics, a multiplicative character (or linear character, or simply character) on a group ''G'' is a group homomorphism from ''G'' to the multiplicative group of a field , usually the field of complex numbers. If ''G'' is any group, the ...
which means
for exactly
of the values
, and it is
for the remaining.
It is easy to compute using the
law of quadratic reciprocity in a manner akin to the
Euclidean algorithm
In mathematics, the Euclidean algorithm,Some widely used textbooks, such as I. N. Herstein's ''Topics in Algebra'' and Serge Lang's ''Algebra'', use the term "Euclidean algorithm" to refer to Euclidean division or Euclid's algorithm, is an ...
, see
Legendre symbol.
Consider now some given
where
and
are two, different unknown primes.
A given
is a quadratic residue modulo
if and only if
is a quadratic residue modulo both
and
and
.
Since we don't know
or
, we cannot compute
and
. However, it is easy to compute their product.
This is known as the
Jacobi symbol:
:
This can also be
efficiently computed using the
law of quadratic reciprocity for Jacobi symbols.
However,
can not in all cases tell us whether
is a quadratic residue modulo
or not!
More precisely, if
then
is necessarily a quadratic non-residue modulo either
or
, in which case we are done.
But if
then it is either the case that
is a quadratic residue modulo both
and
, or a quadratic non-residue modulo both
and
.
We cannot distinguish these cases from knowing just that
.
This leads to the precise formulation of the quadratic residue problem:
Problem:
Given integers
and
, where
and
are unknown, different primes, and where
, determine whether
is a quadratic residue modulo
or not.
Distribution of residues
If
is drawn uniformly at random from integers
such that
, is
more often a quadratic residue or a quadratic non-residue modulo
?
As mentioned earlier, for exactly half of the choices of
, then
, and for the rest we have
.
By extension, this also holds for half the choices of
.
Similarly for
.
From basic algebra, it follows that this partitions
into 4 parts of equal size, depending on the sign of
and
.
The allowed
in the quadratic residue problem given as above constitute exactly those two parts corresponding to the cases
and
.
Consequently, exactly half of the possible
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
A pseudorandom number generator (PRNG), also known as a deterministic random bit generator (DRBG), is an algorithm for generating a sequence of numbers whose properties approximate the properties of sequences of random numbers. The PRNG-generate ...
. It also yields the
public key
Public-key cryptography, or asymmetric cryptography, is the field of cryptographic systems that use pairs of related keys. Each key pair consists of a public key and a corresponding private key. Key pairs are generated with cryptographic a ...
Goldwasser–Micali cryptosystem.
as well as the
identity based Cocks scheme.
See also
*
Higher residuosity problem
In cryptography, most public key cryptosystems are founded on problems that are believed to be intractable. The higher residuosity problem (also called the n th-residuosity problem) is one such problem. This problem is ''easier'' to solve than ...
References
{{Computational hardness assumptions
Computational number theory
Computational hardness assumptions
Theory of cryptography