Message-recovery security from semantic security (Boneh–Shoup §2.2.3) #
A semantically secure cipher is secure against message recovery ([BS23], Section 2.2.3,
Attack Game 2.2, p. 18; Definition 2.3 and Theorem 2.7, p. 19). We formalize both the concrete
exact advantage identity for a typed symmetric cipher Cipher K M C and the asymptotic theorem for
a cipher with message space {0, 1}^{msgLen n}, whose semantic security admits exactly the
challenge pairs of two msgLen n-bit messages, together with the uniform strict PPT certificate of
the reduction.
Relative to [BS23], §2.2.3, pp. 18–19, this formalization makes two hypotheses explicit:
- On a concrete
Cipher K M C,messageRecoveryAdvantage_eq_advantage_messageRecoveryReductionrequireshvalid : ∀ m₀ m₁ : M, valid m₀ m₁ = truesoCipher.oneTimeExperimentadmits every pair sampled independently from the finite nonempty typeMbymessageRecoveryReduction. (Theorem 2.7 as printed has no such hypothesis. It is needed here because Attack Game 2.1 admits only pairs of equal length, and the reduction submits two independent uniform messages.) - On word messages
{0, 1}^{msgLen n}, an adversaryA : ℕ → List Bool → ProbComp (List Bool)can output lists of arbitrary length, whereas Attack Game 2.2 requiresmHat ∈ M.messageRecoveryWordAdvantage_eq_demKeyGameOnandDEMOneTimeKeyINDCPAOn.negligible_messageRecoveryWordAdvantagetherefore requirehA_len : ∀ n ct mHat, mHat ∈ (ProbComp.eval (A n ct)).support → mHat.length = msgLen n, plusComputableInPolyTime msgLen encUnary encUnaryfor PPT message sampling. All messages of{0, 1}^{msgLen n}have one length, so the reduction's pairs are admissible and no counterpart ofhvalidis needed there. Checked counterexamples inCslibFrontierTests.Crypto.MessageRecoveryshow thathvalidandhA_lenare needed.
Main definitions #
Cslib.Crypto.Encryption.messageRecoveryExperiment: Attack Game 2.2 forCipher K M C.Cslib.Crypto.Encryption.messageRecoveryAdvantage:MRadv[A, E] := |Pr[W] - 1 / |M||.Cslib.Crypto.Encryption.messageRecoveryReduction: explicitTwoStagesemantic-security reductionBfrom a message-recovery adversaryA.Cslib.Crypto.Encryption.messageRecoveryWordExperiment,Cslib.Crypto.Encryption.messageRecoveryWordAdvantage,Cslib.Crypto.Encryption.messageRecoveryWordToDEMAdversary: word-level Attack Game 2.2, advantage over{0, 1}^{msgLen n}, and explicitWordAdversaryreduction.
Main results #
Cslib.Crypto.Encryption.messageRecoveryAdvantage_eq_advantage_messageRecoveryReduction: exact equalityMRadv[A, E] = SSadv[messageRecoveryReduction (ProbComp.uniform M) A, E](Theorem 2.7; inequality (2.5) is its.le).Cslib.Crypto.Encryption.isPPT_messageRecoveryWordToDEMAdversary: uniform strict PPT certificateAdversaryOf.IsPPT encBits (messageRecoveryWordToDEMAdversary msgLen A).Cslib.Crypto.Encryption.messageRecoveryWordAdvantage_eq_demKeyGameOn: exact word-level advantage equality derived from the concrete identity, the equation of the proof of Theorem 2.7.Cslib.Crypto.Encryption.DEMOneTimeKeyINDCPAOn.negligible_messageRecoveryWordAdvantage: asymptotic Theorem 2.7 for the message space{0, 1}^{msgLen n}, from semantic security on challenge pairs ofmsgLen n-bit messages.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Section 2.2.3 (Attack Game 2.2, p. 18; Definition 2.3 and Theorem 2.7, p. 19).
Message-recovery attack game ([BS23], Attack Game 2.2, p. 18): sample a uniform
message m from M and key k ← sampleKey, encrypt c ← E.encrypt k m, run A c, and win iff
mHat == m.
Explicit semantic-security reduction B from a message-recovery adversary A given a
message sampler sampleMsg ([BS23], Theorem 2.7, p. 19): sample independent
m₀, m₁ ← sampleMsg, submit (m₀, m₁), run mHat ← A c on the challenge ciphertext, and
output mHat == m₁. Concrete finite theorems instantiate sampleMsg := ProbComp.uniform M;
word-level reductions instantiate sampleMsg := BitString.sampleList (msgLen n).
Concrete advantage equality for Theorem 2.7 ([BS23], p. 19):
MRadv[A, E] = SSadv[messageRecoveryReduction (ProbComp.uniform M) A, E] whenever valid admits
every message pair in M. Display (2.5), MRadv[A, E] ≤ SSadv[B, E], is the .le projection of
this equality.
Word-level message-recovery experiment over {0, 1}^{msgLen n} with uniform keyLen n-bit
keys ([BS23], Attack Game 2.2, p. 18).
Word-level message-recovery advantage |Pr[W] - 1 / 2^(msgLen n)|
([BS23], Attack Game 2.2, p. 18).
messageRecoveryWordToDEMAdversary msgLen A is uniform strict PPT whenever msgLen is unary
polynomial-time computable and A is uniform strict PPT on framed (n, ct) inputs.
Exact word-level advantage equality of the proof of Theorem 2.7 ([BS23], p. 19):
MRadv[A, E](n) = SSadv[B, E](n) for B := messageRecoveryWordToDEMAdversary msgLen A, in Attack
Game 2.1 with challenge pairs of two msgLen n-bit messages. Derived from the concrete equality
messageRecoveryAdvantage_eq_advantage_messageRecoveryReduction over BitString (msgLen n). The
length hypothesis hA_len models Attack Game 2.2's requirement mHat ∈ M.
Theorem 2.7, for the message space {0, 1}^L ([BS23], Section 2.2.3.1, p. 19):
a semantically secure cipher is secure against message recovery. The book states Theorem 2.7 for
any message space M, but its reduction submits two independent uniform messages, which Attack
Game 2.1 admits only when all messages of M have one length, as they do in {0, 1}^L. Here
L = msgLen n at security parameter n, with msgLen computable in polynomial time in unary.
The premise is semantic security in Attack Game 2.1 (Definition 2.2, p. 16) with a uniform
keyLen n-bit key, against uniform strict PPT two-stage adversaries, for exactly the challenge
pairs of the message space: two msgLen n-bit messages. The conclusion: every uniform strict PPT
adversary A that outputs words of length msgLen n (hA_len, Attack Game 2.2's mHat ∈ M),
given 1ⁿ and the ciphertext of a uniform msgLen n-bit message, has negligible advantage
|Pr[W] - 1 / 2^(msgLen n)| (messageRecoveryWordAdvantage, Attack Game 2.2 and Definition 2.3,
pp. 18–19). The reduction
messageRecoveryWordToDEMAdversary is certified by isPPT_messageRecoveryWordToDEMAdversary, and
messageRecoveryWordAdvantage_eq_demKeyGameOn is the proof's exact equation.