Paillier encryption is IND-CPA secure under DCR #
[KL20], Theorem 15.13: if the decisional composite residuosity problem is hard relative
to the modulus generator, Paillier encryption is CPA-secure. We prove this for
Paillier.keyGen and Paillier.encrypt with the strict-PPT game Encryption.INDCPAOn.
For a chosen-message adversary A and a challenge bit b, the distinguisher
dcrDistinguisher A b on input (N, y) runs A on the public key N and, for an admissible
pair, answers with (1 + N) ^ m_b * y mod N ^ 2, as in the book's proof. The proof has four
hops:
- The real IND-CPA experiment for bit
bis within5 / 2 ^ nof the DCR real game ofdcrDistinguisher A b. In the DCR real gamey = s ^ Nforsuniform in(ZMod (N ^ 2))ˣ, ands ^ Ndepends only ons mod N; reduction moduloNpushes the uniform law on(ZMod (N ^ 2))ˣto the uniform law on(ZMod N)ˣ. The encryption randomness isunitOrOne N rforrfromProbComp.sampleModNat, which is withinN / 2 ^ (n + |N|) + (N - φ(N)) / Nof uniform on the units. - The DCR real and random games of
dcrDistinguisher A bdiffer by its DCR advantage. - The DCR random games for
b = falseandb = trueare equal: multiplying a uniform unit by the unit(1 + N) ^ mgives a uniform unit, whatevermis. - Hops 1 and 2 again, for the other bit.
On every input that the DCR games give it, the modulus N and the least representative of a unit
y modulo N ^ 2, dcrDistinguisher A b is the typed reduction paillierToDCR of
CslibFrontier.Crypto.Computational.Paillier.Finite for bit b on y, played by A read at
modulus N, with an inadmissible pair answered by false. Hop 3 is that reduction's
eval_dcrRandomExperiment_paillierToDCR.
The book's encryption samples r uniformly from ℤ*_N. Our encryption samples from
ProbComp.sampleModNat and replaces a non-unit by 1; the extra statistical distance
(N - φ(N)) / N ≤ 1 / p + 1 / q is negligible only when the primes grow with n. This is the
hypothesis hsize of DCR.indcpaOn_paillier: every modulus the generator outputs at parameter
n has primes of at least n bits, as in the book's GenModulus.
Main results #
Cslib.Crypto.Paillier.isPPTOn_dcrDistinguisher: the reduction distinguishers are uniform strict PPT.Cslib.Crypto.Paillier.DCR.indcpaOn_paillier: DCR implies IND-CPA security of Paillier encryption ([KL20], Theorem 15.13, with the hypothesishsize).
References #
- J. Katz, Y. Lindell, Introduction to Modern Cryptography, Chapter 15, Theorem 15.13.
The DCR distinguisher built from a chosen-message adversary and a challenge bit: on (N, y),
it runs the adversary on the public key N and answers its challenge with
(1 + N) ^ m * y mod N ^ 2 ([KL20], proof of Theorem 15.13).
The reduction distinguishers are uniform strict PPT.
Algebra of the reduction #
The typed reduction #
The hops #
Paillier encryption is IND-CPA secure under DCR ([KL20], Theorem 15.13): if
the decisional composite residuosity problem is hard relative to the generator's law, then
(keyGen gen, encrypt) satisfies Encryption.INDCPAOn validMessages encNat. The hypothesis
hsize (primes of at least n bits) makes the statistical distance between our encryption
randomness and a uniform unit of ZMod N negligible; the book's encryption samples a uniform
unit directly and needs no such hypothesis.