Documentation

CslibFrontier.Crypto.Computational.Paillier.Malleability

Paillier encryption is not CCA secure #

Paillier encryption ([KL20], Construction 15.11) encrypts m under the public key N as (1 + N) ^ m * r ^ N mod N ^ 2. It is IND-CPA secure under decisional composite residuosity (DCR.indcpaOn_paillier), but it is additively homomorphic: multiplying a ciphertext by 1 + N, the randomness-free encryption of 1, adds 1 to its plaintext. Hence it is not CCA secure: incrementAdversary chooses (0, 1), asks the Phase 2 oracle to decrypt ct * (1 + N) mod N ^ 2, which differs from the challenge ct because its decryption differs, and outputs whether the reply is 2 mod N. This is the generic argument of [BS23], Section 12.2.1 (pp. 469–470), instantiated through Encryption.not_indcca2On_of_maulAdversary; it has 1CCA advantage exactly 1 at every security parameter and needs no assumption.

The CCA games use decryptOpt, the never-rejecting decryption some ∘ decrypt, as the scheme's Option-valued decryptor, and the admissibility predicate validMessages of DCR.indcpaOn_paillier.

Main definitions #

Main results #

References #

Paillier decryption as the Option-valued decryptor of the CCA games: it never rejects and returns decrypt sk ct.

Multiply a ciphertext by 1 + N modulo N ^ 2, for the public key pk = N (addCiphertexts pk ct (encNat (1 + N))), which adds 1 to the plaintext.

Incrementing adds one to the plaintext: for a valid description d, every ciphertext in the support of encrypt n (encNat N) m increments to a ciphertext that decrypts to (m + 1) mod N.

The 1CCA increment adversary against Paillier: choose (0, 1), query the decryption oracle on incrementCiphertext pk ct, and output whether the reply is some (2 mod N), which happens exactly when the challenge encrypts 1.

Paillier encryption is not 1CCA secure ([BS23], Section 12.2.1, pp. 469–470, applied to the additive homomorphism of Paillier encryption): for every modulus generator gen, the scheme (keyGen gen, encrypt) of DCR.indcpaOn_paillier, with decryptor decryptOpt, fails Encryption.INDCCA2On validMessages encNat encBits. No assumption is needed; so under DCR (and hsize) Paillier is IND-CPA but not IND-CCA2.

Paillier encryption is not CCA secure in the interleaved multi-challenge sense of [BS23], Attack Game 12.1 and Definition 12.1 (pp. 467–468), by INDCCA2InterleavedOn.indcca2On.