In cryptography, most public key cryptosystems are founded on problems that are believed to be intractable. The higher residuosity problem (also called the nth-residuosity problem[1]) is one such problem. This problem is easier to solve than integer factorization, so the assumption that this problem is hard to solve is stronger than the assumption that integer factorization is hard.
If n is an integer, then the integers modulo n form a ring. If n = pq where p and q are primes, then the Chinese remainder theorem tells us that
Z/nZ\simeqZ/pZ x Z/qZ
The units of any ring form a group under multiplication, and the group of units in
Z/nZ
(Z/nZ) x
From the ring isomorphism above, we have
(Z/nZ) x \simeq(Z/pZ) x x (Z/qZ) x
as an isomorphism of groups. Since p and q were assumed to be prime, the groups
(Z/pZ) x
(Z/qZ) x
(Z/pZ)*
(Z/qZ) x
(Z/nZ) x
(Z/qZ) x
(Z/nZ) x
(Z/nZ) x
The important point is that for any divisor d of p−1 (or q−1) the set of d th powers forms a subgroup of
(Z/nZ) x .
Given an integer n = pq where p and q are unknown, an integer d such that d divides p−1, and an integer x < n, it is infeasible to determine whether x is a d th power (equivalently d th residue) modulo n.
Notice that if p and q are known it is easy to determine whether x is a d th residue modulo n because x will be a d th residue modulo p if and only if
x(p-1)/d\equiv1\pmodp
When d = 2, this is called the quadratic residuosity problem.
The semantic security of the Benaloh cryptosystem and the Naccache–Stern cryptosystem rests on the intractability of this problem.