Documentation

CslibFrontier.Crypto.Computational.GoldwasserMicali.Malleability

Goldwasser–Micali encryption is not CCA secure #

Goldwasser–Micali encryption ([KL20], Construction 15.28) encrypts a bit m under the public key ⟨N, z⟩ as z ^ m * r ^ 2 mod N. It is IND-CPA secure under quadratic residuosity (indcpa_blumGoldwasserMicali for the Blum-modulus variant), but multiplying a ciphertext by the public nonresidue z flips its plaintext (the XOR homomorphism of [KL20], Exercise 15.11, decrypt_mulCiphertexts). Hence it is not CCA secure: flipAdversary asks the Phase 2 oracle to decrypt ct * z mod N, which differs from the challenge ct because its decryption differs, and outputs the negation of the reply. 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. Both key generators of CslibFrontier/Crypto/Computational/GoldwasserMicali.lean are covered: keyGen gen over any generator of valid key descriptions, unconditionally, and blumKeyGen gen with public nonresidue -1, the scheme of indcpa_blumGoldwasserMicali, under that theorem's own Blum-modulus condition hblum, which makes -1 a nonresidue and decryption correct.

Main definitions #

Main results #

References #

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

Multiply a ciphertext by the public nonresidue z of pk = ⟨N, z⟩, modulo N (mulCiphertexts pk ct (encNat z)), which flips the plaintext.

Flipping negates the plaintext: for a valid key description k, every ciphertext in the support of encrypt n ⟨N, z⟩ m flips to a ciphertext that decrypts to !m.

The 1CCA flipping adversary against Goldwasser–Micali: choose (false, true), query the decryption oracle on flipCiphertext pk ct, and output whether the reply is some false, which happens exactly when the challenge encrypts true.

Goldwasser–Micali encryption is not 1CCA secure ([BS23], Section 12.2.1, pp. 469–470, applied to the XOR homomorphism of [KL20], Exercise 15.11): for every generator gen of valid key descriptions, (keyGen gen, encrypt, decryptOpt) fails Encryption.INDCCA2. No assumption is needed; flipAdversary has advantage 1.

Blum-modulus Goldwasser–Micali is not 1CCA secure: the scheme (blumKeyGen gen, encrypt) of indcpa_blumGoldwasserMicali, with decryptor decryptOpt, fails Encryption.INDCCA2 under that theorem's own Blum-modulus condition, with no hardness assumption. So under quadratic residuosity (and hsize) it is IND-CPA but not IND-CCA2.

Goldwasser–Micali 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.

Blum-modulus Goldwasser–Micali is not CCA secure in the interleaved multi-challenge sense of [BS23], Attack Game 12.1 and Definition 12.1 (pp. 467–468).