Symmetric chosen-plaintext security on a message space #
A symmetric cipher in [BS23] is defined over a message space M. Its CPA attack game
(Section 5.3, Attack Game 5.2, printed pp. 181–182) lets the adversary submit any number of pairs
m₀, m₁ ∈ M of the same length, and the challenger answers all of them under one key.
SymmetricCipher.cpaGame fixes M to the n-bit words at security parameter n. Block-cipher
modes need longer messages; randomized counter mode (Section 5.4.2, printed p. 189), for example,
encrypts sequences of blocks.
This module states the attack game for raw key-generation and encryption algorithms with an
admissibility predicate valid n m₀ m₁ on challenge pairs, as Encryption.INDCPAOn does for
public-key encryption. A request whose pair is inadmissible is answered with the empty word and
does not invoke encrypt. SymmetricINDCPAOn asks that every uniform strict oracle-PPT
distinguisher have negligible advantage between the two challenge bits. Correctness and efficiency
of the honest algorithms are separate properties.
SymmetricCipher.cpaGame and SymmetricCipher.INDCPA in Authenticated.lean are defined as the
special case of n-bit pairs.
blockPairValid admits equal-length pairs made of whole n-bit blocks: the message space
Y^{≤ℓ} of Section 5.4.2 without the cap ℓ on the number of blocks.
Main definitions #
Cslib.Crypto.symmetricCPAReplyOn: the left-or-right encryption oracle for a pair predicate.Cslib.Crypto.symmetricCPAGameOn: the many-query left-or-right experiment.Cslib.Crypto.SymmetricINDCPAOn: adaptive chosen-plaintext security against uniform strict oracle-PPT distinguishers.Cslib.Crypto.blockPairValid: equal-length pairs of wholen-bit blocks.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Section 5.3 (Attack Game 5.2 and Definition 5.2, printed pp. 181–182) and Section 5.4.2 (printed p. 189).
The left-or-right encryption oracle with challenge-pair predicate valid
([BS23], Section 5.3, Attack Game 5.2): decode m₀ = unframe request.2 and
m₁ = dropFrame request.2; if valid n m₀ m₁ holds, encrypt if bit then m₁ else m₀ under k,
and otherwise answer [] without encrypting.
The many-query left-or-right CPA experiment with challenge-pair predicate valid
([BS23], Section 5.3, Attack Game 5.2): sample k ← keyGen n and run
adversary n [] with oracle symmetricCPAReplyOn valid encrypt n k bit.
Adaptive chosen-plaintext security on the challenge pairs admitted by valid
([BS23], Section 5.3, Definition 5.2): every uniform strict IsOraclePPT encBool
distinguisher has negligible advantage between the experiments with challenge bits false and
true. The negligible bound may depend on the distinguisher, which is fixed before the parameter.