Real/Ideal Authenticated Encryption #
For encryption queries on n-bit messages, real/ideal authenticated encryption is equivalent to
adaptive left-or-right CCA security together with fresh-plaintext unforgeability. This is a
fixed-length variant of Katz and Lindell, Theorem 5.5.
A uniform strict oracle-PPT adversary has encryption and decryption channels. A real encryption
query returns a fresh encryption of the message. The real decryption channel rejects ciphertexts
returned by earlier encryptions and otherwise returns the encoded result of E.decrypt. The ideal
encryption channel encrypts the all-zero message, and ideal decryption always rejects.
Main definitions #
Cslib.Crypto.SymmetricCipher.aeRealOracle,Cslib.Crypto.SymmetricCipher.aeIdealOracle: the real and ideal two-channel oracles.Cslib.Crypto.SymmetricCipher.aeRealGame,Cslib.Crypto.SymmetricCipher.aeIdealGame: run an adversary against them under a fresh key.Cslib.Crypto.SymmetricCipher.RealIdealAE: real/ideal authenticated encryption.Cslib.Crypto.SymmetricCipher.cpaToAEAdversary,Cslib.Crypto.SymmetricCipher.ciToAEAdversary,Cslib.Crypto.SymmetricCipher.aeToCCAAdversary: the reductions used in the two directions.
Main results #
Cslib.Crypto.SymmetricCipher.advantage_cpaGame_le_aeRealGame_aeIdealGame: the CPA advantage is at most the sum of two real/ideal advantages.Cslib.Crypto.SymmetricCipher.succProbability_ciGame_eq_advantage_aeRealGame_aeIdealGame: the ciphertext-integrity winning probability equals a real/ideal advantage.Cslib.Crypto.SymmetricCipher.advantage_aeRealGame_aeIdealGame_le: the real/ideal advantage is at most a CCA advantage plus a polynomial multiple of a ciphertext-integrity winning probability.Cslib.Crypto.SymmetricCipher.realIdealAE_iff_indcca_and_encForge: real/ideal security is equivalent toINDCCAtogether with unforgeability for a fresh plaintext (EncForge).Cslib.Crypto.SymmetricCipher.realIdealAE_iff_indcca_and_ciphertextIntegrityandCslib.Crypto.SymmetricCipher.realIdealAE_iff_authenticatedEncryptioncharacterize real/ideal security using ciphertext integrity.
Relation to Katz and Lindell #
- Definition 3.7 permits a fixed plaintext length
ℓ(n). Hereℓ(n) = n, and encryption queries of other lengths return[]in both worlds. - The experiment in Definition 5.4 forbids decrypting earlier encryption replies. Both
worlds answer such a replay with the public rejection
[]. The source bounds the probability of guessing a uniform hidden world bit by1/2plus a negligible function. The two-world advantage is twice the absolute deviation of that probability from1/2(Game.advantage_eq_two_mul_guessingAdvantage_uniform_bool_beq). Complementing an adversary's guess exchanges the signs of the deviation. - Definition 5.3 combines CCA security with Definition 5.2's unforgeability. A winning ciphertext
decrypts to a plaintext never queried for encryption. Here this condition is
EncForge. Definition 5.1 gives one equal-length challenge pair and ordinary encryption and decryption oracles, with decryption of the challenge ciphertext forbidden. HereINDCCAallows adaptive left-or-right queries under a common bit and rejects decryption of every returned ciphertext. The book remarks after Definition 5.1 that CCA security also protects multiple encryptions.
References #
- J. Katz, Y. Lindell, Introduction to Modern Cryptography, 3rd ed., Definition 3.7 (p. 52), Definition 5.1 (pp. 149–150), and §5.2.1, Definitions 5.2–5.4 and Theorem 5.5 (pp. 151–153).
The real and ideal worlds #
Real-world oracle of the authenticated-encryption experiment (Katz and Lindell, Definition 5.4). Its state is the list of ciphertexts returned so far.
- On an encryption query
(false, msg)withmsg.length = n, encryptmsgunderk, record the ciphertext and return it; on other lengths return[]. - On a decryption query
(true, ct), return[]ifctwas returned by an earlier encryption query, andencOption encBits (E.decrypt n k ct)otherwise.
Ideal-world oracle of the authenticated-encryption experiment
(Katz and Lindell, Definition 5.4): an encryption query (false, msg) with
msg.length = n returns an encryption of the all-zero message List.replicate n false, other
encryption queries return [], and every decryption query (true, _) returns [], the encoding of
rejection.
The real-world authenticated-encryption experiment: sample k ← E.keyGen n and run
adversary n [] against E.aeRealOracle n k, starting with no recorded ciphertexts.
The ideal-world authenticated-encryption experiment: sample k ← E.keyGen n and run
adversary n [] against E.aeIdealOracle n k.
Real/ideal authenticated encryption for n-bit encryption queries, following Katz and
Lindell, §5.2.1, Definition 5.4, pp. 152–153. Every uniform strict oracle-PPT
adversary has negligible two-world advantage. Both worlds reject decryption of earlier encryption
replies, which the source forbids querying, and the advantage is twice the absolute deviation of
the source's hidden-bit guessing probability from 1/2.
Real/ideal security implies CPA security #
Stateful handler for cpaToAEAdversary: a left-or-right request req whose two messages
unframe req and dropFrame req both have length n is sent to the encryption channel as
(false, if bit then dropFrame req else unframe req), with the reply truncated to ctBound; other
requests return [].
Reduction from cpaGame to the real/ideal experiment: run the CPA distinguisher against
cpaToAEHandler n (ctBound n) bit, which answers each left-or-right request by encrypting the
message chosen by the fixed bit.
cpaToAEAdversary preserves strict oracle-PPT admissibility (IsOraclePPT).
When ctBound n bounds the ciphertext lengths of n-bit messages, running
cpaToAEAdversary ctBound bit adversary in the real world has the same output distribution as
running adversary in cpaGame with challenge bit bit.
The CPA advantage of adversary is at most the sum of the real/ideal advantages of
cpaToAEAdversary ctBound false adversary and cpaToAEAdversary ctBound true adversary, when
ctBound n bounds the ciphertext lengths of n-bit messages.
Real/ideal authenticated encryption implies adaptive CPA security (INDCPA).
Real/ideal security implies ciphertext integrity #
Stateful handler for ciToAEAdversary: send each encryption request of the CI adversary to
the encryption channel, truncating the reply to ctBound.
Reduction from ciGame to the real/ideal experiment: run the CI adversary with its encryption
requests sent to the encryption channel, submit its candidate ciphertext to the decryption channel,
and output true exactly when the reply encodes an accepted decryption.
ciToAEAdversary preserves strict oracle-PPT admissibility (IsOraclePPT).
When ctBound n bounds the ciphertext lengths of n-bit messages,
ciToAEAdversary ctBound adversary outputs true in the real world exactly as often as adversary
wins ciGame.
In the ideal world, ciToAEAdversary ctBound adversary always outputs false.
The CI winning probability of adversary equals the real/ideal advantage of
ciToAEAdversary ctBound adversary, when ctBound n bounds the ciphertext lengths of n-bit
messages.
Real/ideal authenticated encryption implies ciphertext integrity (CiphertextIntegrity).
CCA security and ciphertext integrity imply real/ideal security #
Stateful handler for aeToCCAAdversary. A decryption request (true, ct) is sent to the CCA
decryption channel, with the reply truncated to decBound n ct. An encryption request
(false, msg) is sent to the CCA encryption channel as the left-or-right request
frame msg ++ List.replicate n false, whose left message is msg and whose right message is the
all-zero message, with the reply truncated to ctBound.
Reduction from the real/ideal experiment to ccaGame: run the real/ideal adversary against
aeToCCAHandler, which turns each encryption request into a left-or-right request between the
message and the all-zero message. With challenge bit false the adversary sees the real world;
with challenge bit true and every decryption rejected (ccaRejectGame) it sees the ideal
world.
aeToCCAAdversary preserves strict oracle-PPT admissibility (IsOraclePPT).
When ctBound n and decBound n bound the ciphertext and decryption-reply lengths, running
aeToCCAAdversary ctBound decBound adversary in ccaGame with challenge bit false has the same
output distribution as running adversary in the real world.
When ctBound n bounds the ciphertext lengths of n-bit messages, running
aeToCCAAdversary ctBound decBound adversary in ccaRejectGame with challenge bit true has the
same output distribution as running adversary in the ideal world.
Real/ideal advantage bound. If aeToCCAAdversary ctBound decBound adversary makes at most
Qd n decryption queries, and ctBound n and decBound n bound the ciphertext and
decryption-reply lengths, then the real/ideal advantage of adversary is at most the CCA advantage
of that reduction plus dyadicSize (Qd n - 1) times the CI winning probability of
ccaToCIAdversary built from it.
CCA security and ciphertext integrity imply real/ideal security.
The equivalences #
Real/ideal security implies the library's AuthenticatedEncryption
(INDCPA ∧ CiphertextIntegrity).
Real/ideal security implies adaptive left-or-right CCA security.
The library's AuthenticatedEncryption implies real/ideal security.
Real/ideal security is equivalent to CCA security and integrity against fresh ciphertexts.
Fixed-length variant of Katz and Lindell, §5.2.1, Theorem 5.5, p. 153.
Real/ideal security on n-bit encryption queries is equivalent to adaptive left-or-right CCA
security and unforgeability for a fresh plaintext. Definition 5.1 uses a single challenge pair
with ordinary encryption and decryption oracles.
Real/ideal security is equivalent to the library's AuthenticatedEncryption.