Abstract
We generalize a protocol by Yu for comparing two integers with relatively small difference in a secure multiparty computation setting. Yu's protocol is based on the Legendre symbol. A prime number p is found for which the Legendre symbol (· | p) agrees with the sign function for integers in a certain range {−N, . . . , N} ⊂ ℤ. This can then be computed efficiently.
We generalize this idea to higher residue symbols in cyclotomic rings ℤ[ζr
] for r a small odd prime. We present a way to determine a prime number p such that the r-th residue symbol (· | p)
r
agrees with a desired function
f
:
A
→
{
ζ
r
0
,
…
,
ζ
r
r
−
1
}
f:A \to \left\{ {\zeta _r^0, \ldots ,\zeta _r^{r - 1}} \right\}
on a given small subset A ⊂ ℤ[ζr
], when this is possible. We also explain how to efficiently compute the r-th residue symbol in a secret shared setting.