Documentation

CslibFrontier.Crypto.Computational.Encryption.CCAToCPA

Chosen-ciphertext security implies chosen-plaintext security #

In a chosen-ciphertext attack, "the adversary has all the power of an attacker in a chosen plaintext attack, but in addition, the adversary may obtain decryptions of ciphertexts of its choosing" ([BS23], Section 9.2.2, printed p. 362). This module proves the resulting implication INDCCA → INDCPA for symmetric ciphers: a CPA adversary becomes a CCAAdversary that sends each of its queries to the encryption channel of ccaOracle and makes no decryption query. It gives the CPA half of the AE security claimed in Exercise 9.15(b) (printed p. 395).

Main definitions #

Main results #

References #

The CCA adversary that runs a CPA adversary, answering its encryption queries through the encryption channel of the CCA oracle (replies truncated to ctBound n bits) and making no decryption query.

theorem Cslib.Crypto.SymmetricCipher.eval_ccaGame_cpaToCCAAdversary (E : SymmetricCipher) (ctBound : ℕ → ℕ) (adversary : OracleDistinguisher) (bit : Bool) (n : ℕ) (hctBound : E.CiphertextLengthLE n (ctBound n)) :
(E.ccaGame (cpaToCCAAdversary ctBound adversary) bit n).eval = (E.cpaGame adversary bit n).eval

If ctBound n bounds the length of every ciphertext of an n-bit message, the CCA game of cpaToCCAAdversary ctBound adversary has the same output distribution as the CPA game of adversary, for either challenge bit.

Adaptive chosen-ciphertext security implies adaptive chosen-plaintext security.