Fresh-Message Encryption Unforgeability #
This module defines fresh-message encryption unforgeability (EncForge) for symmetric ciphers,
following Katz and Lindell, Introduction to Modern Cryptography, 3rd ed.,
Section 5.2, Definition 5.2 (printed p. 151). In encForgeGame, an adaptive CIAdversary queries
an encryption oracle on n-bit plaintexts (logging the queried plaintexts queriedMsgs) and wins
by outputting a candidate ciphertext ct that decrypts to some m for a fresh plaintext
!queriedMsgs.contains m.
Ciphertext integrity (ciGame, [BS23], Definition 9.1) implies EncForge
(succProbability_encForgeGame_le_ciGame, CiphertextIntegrity.encForge). For
encryptThenMAC E M hctLen, ordinary fresh-message MAC unforgeability (M.EUFCMA, without
M.SUFCMA) already suffices for (encryptThenMAC E M hctLen).EncForge
(succProbability_encForgeGame_encryptThenMAC_le, encForge_encryptThenMAC, [KL20],
Exercise 5.5, printed p. 165).
The generic composition separations stated in terms of EncForge are in
CslibFrontier/Crypto/Computational/Encryption/CompositionCounterexamples.lean.
Main definitions #
Cslib.Crypto.SymmetricCipher.encForgeOracle,encForgeGame,EncForge: fresh-message encryption unforgeability experiment and security predicate ([KL20], Definition 5.2).Cslib.Crypto.SymmetricCipher.ciPairOracle: encryption oracle logging(msg, ct)pairs, whose two projections recoverencForgeOracleandciEncryptionOracle.
Main results #
Cslib.Crypto.SymmetricCipher.isPPTOn_encForgeGame,isPPT_encForgeGame: the experiment is uniformly strict PPT.Cslib.Crypto.SymmetricCipher.succProbability_encForgeGame_le_ciGame,Cslib.Crypto.SymmetricCipher.CiphertextIntegrity.encForge: ciphertext integrity implies fresh-message encryption unforgeability.Cslib.Crypto.succProbability_encForgeGame_encryptThenMAC_le,Cslib.Crypto.encForge_encryptThenMAC: Encrypt-then-MAC with anEUFCMA-secure MAC satisfiesEncForge([KL20], Exercise 5.5).
References #
- J. Katz, Y. Lindell, Introduction to Modern Cryptography, 3rd ed., Section 5.2 (Definition 5.2, p. 151) and Exercise 5.5 (p. 165).
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Sections 9.1 and 9.4.1 (pp. 358–368).
Fresh-Message Encryption Unforgeability (encForgeGame, EncForge, KL Definition 5.2) #
Stateful encryption oracle for the fresh-message encryption unforgeability game
([KL20], Section 5.2, Definition 5.2, printed p. 151): if request.2.length == n,
encrypt request.2 under k, prepend request.2 to queriedMsgs, and return the ciphertext;
otherwise return [] without modifying queriedMsgs.
Pair-logging encryption oracle recording (msg, ct) pairs for each valid n-bit query.
Projecting Prod.fst yields encForgeOracle and projecting Prod.snd yields
ciEncryptionOracle.
The fresh-message encryption unforgeability experiment Enc-Forge
([KL20], Section 5.2, Definition 5.2, printed p. 151): sample k ← E.keyGen n, run
adversary n [] against E.encForgeOracle n k, and accept when E.decrypt n k out.1 succeeds
with a plaintext m that was never queried (!out.2.contains m).
Running an oracle-PPT adversary against encForgeOracle is uniformly strict PPT in (n, k).
The fresh-message encryption unforgeability experiment is uniformly strict PPT in the unary security parameter.
The fresh-message encryption unforgeability experiment is uniformly strict PPT, independently of unused auxiliary input.
Fresh-message encryption unforgeability (EncForge, [KL20]): every uniform strict
IsOraclePPT encBits adversary has negligible probability of outputting a ciphertext that decrypts
to an unqueried plaintext. This is plaintext integrity, [BS23], Exercise 9.15 (p. 395):
the ciphertext integrity game, Attack Game 9.1 (pp. 358–359), won when the output decrypts to a
message that was never queried. Encryption queries on words other than n-bit messages are
answered with [].
EncForge gives negligible winning probability in encForgeGame for every oracle-PPT
adversary.
Establish EncForge by bounding every oracle-PPT adversary's winning probability.
Running an adaptive program against encForgeOracle produces the exact same distribution as
running it against ciPairOracle and projecting the pair log via Prod.fst.
Running an adaptive program against ciEncryptionOracle produces the exact same distribution as
running it against ciPairOracle and projecting the pair log via Prod.snd.
Quantitative EncForge vs. CiphertextIntegrity bound: for every SymmetricCipher,
adaptive adversary, and security parameter n, the fresh-message forgery probability in
encForgeGame is at most the fresh-ciphertext forgery probability in ciGame.
Ciphertext integrity (CiphertextIntegrity) implies fresh-message encryption unforgeability
(EncForge).
Quantitative EncForge to EUFCMA bound for Encrypt-then-MAC
([KL20], Exercise 5.5, printed p. 165): when tagBound n bounds all MAC tag lengths on
M.msgLen n-bit ciphertexts under supported keys at security parameter n, the encForgeGame
winning probability of adversary against encryptThenMAC E M hctLen is at most the eufCmaGame
winning probability of etmToMACForger E M tagBound adversary against M.
Encrypt-then-MAC EncForge security under EUFCMA
([KL20], Exercise 5.5, printed p. 165): if M satisfies ordinary fresh-message
existential unforgeability (M.EUFCMA), then encryptThenMAC E M hctLen satisfies fresh-message
encryption unforgeability (EncForge), without requiring M.SUFCMA or E.INDCPA.