Parity-prediction security from semantic security (Boneh–Shoup §2.2.3.2) #
A semantically secure cipher over non-empty bit strings is secure against parity prediction
([BS23], Section 2.2.3.2, Attack Game 2.3, Definition 2.4, and Theorem 2.8, pp. 20–22).
We formalize both the concrete exact advantage identity for a typed symmetric cipher
Cipher K (BitString L) 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.2, pp. 20–22, this formalization makes two hypotheses explicit:
- On a concrete
Cipher K (BitString L) C,parityAdvantage_eq_half_mul_advantage_parityReductionrequireshL : 1 ≤ Lso messages have a last bit to flip viaflipLastBitString hL(m₀ ↦ m₀ ⊕ (0^{L-1} ‖ 1)), andhvalid : ∀ m₀ : BitString L, valid m₀ (flipLastBitString hL m₀) = truesoCipher.oneTimeExperimentadmits every pair submitted byparityReduction (ProbComp.uniform (BitString L)) (flipLastBitString hL) (parity L) A. (The book implicitly takesL ≥ 1and allows all fixed-length pairs in Attack Game 2.1.) - On word messages
{0, 1}^{msgLen n},parityWordAdvantage_eq_half_mul_demKeyGameOnandDEMOneTimeKeyINDCPAOn.negligible_parityWordAdvantagerequire1 ≤ msgLen n(hpos : ∀ n, 1 ≤ msgLen n) andComputableInPolyTime msgLen encUnary encUnaryfor PPT message sampling. Checked counterexamples inCslibFrontierTests.Crypto.ParityPredictionshow thathL,hvalid, andhposare needed.
Main definitions #
Cslib.Crypto.Encryption.flipLastBitString: flip the last bit of anL-bit string (1 ≤ L).Cslib.Crypto.Encryption.parityExperiment: parity-prediction attack game (Attack Game 2.3).Cslib.Crypto.Encryption.parityAdvantage:Parityadv[A, E] := |Pr[W] - 1 / 2|.Cslib.Crypto.Encryption.parityReduction: explicit semantic-security reductionB(Theorem 2.8).Cslib.Crypto.Encryption.flipLastBitWord: flip the last bit of a word of lengthL.Cslib.Crypto.Encryption.parityWordExperiment,Cslib.Crypto.Encryption.parityWordAdvantage,Cslib.Crypto.Encryption.parityWordToDEMAdversary: word-level experiment, advantage, andWordAdversaryreduction runningparityReduction.
Main results #
Cslib.Crypto.Encryption.parityAdvantage_eq_half_mul_advantage_parityReduction: exact concrete identityParityadv[A, E] = (1 / 2) * SSadv[B, E](Theorem 2.8, p. 21).Cslib.Crypto.Encryption.isPPT_parityWordToDEMAdversary: uniform strict PPT certificate forparityWordToDEMAdversary.Cslib.Crypto.Encryption.parityWordAdvantage_eq_half_mul_demKeyGameOn: word-level exact identity at eachnwith1 ≤ msgLen n, the equation of the proof of Theorem 2.8.Cslib.Crypto.Encryption.DEMOneTimeKeyINDCPAOn.negligible_parityWordAdvantage: asymptotic Theorem 2.8, from semantic security on challenge pairs ofmsgLen n-bit messages.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Section 2.2.3.2, Attack Game 2.3, Definition 2.4, Theorem 2.8, pp. 20–22.
Explicit semantic-security reduction B from a parity-prediction adversary A
([BS23], Theorem 2.8, p. 21), parameterized by message sampler, bit-flip map, and
parity predicate so the typed and word-level theorems share one reduction program.
Concrete advantage relation for Theorem 2.8 ([BS23], p. 21):
Parityadv[A, E] = (1 / 2) * SSadv[B, E] with
B := parityReduction (ProbComp.uniform (BitString L)) (flipLastBitString hL) (parity L) A.
Explicit WordAdversary reduction for parity prediction on {0, 1}^{msgLen n}, running
parityReduction.
Uniform strict PPT certificate for parityWordToDEMAdversary.
Exact word-level advantage identity of the proof of Theorem 2.8 ([BS23], p. 21) at
each n with 1 ≤ msgLen n: Parityadv[A, E](n) = (1 / 2) · SSadv[B, E](n) for
B := parityWordToDEMAdversary msgLen A, in Attack Game 2.1 with challenge pairs of two
msgLen n-bit messages. Derived from parityReduction_advantage_eq.
Theorem 2.8 ([BS23], Section 2.2.3.2, p. 21): a semantically secure cipher with
message space {0, 1}^L is secure against parity prediction. Here L = msgLen n at security
parameter n, with 1 ≤ msgLen n (the book leaves 1 ≤ L implicit: at L = 0 the parity is
constant and the conclusion fails) and 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
predictor A, given 1ⁿ and the ciphertext of a uniform msgLen n-bit message, has negligible
advantage |Pr[W] - 1 / 2| in Attack Game 2.3 (parityWordAdvantage). The reduction
parityWordToDEMAdversary is certified by isPPT_parityWordToDEMAdversary, and
parityWordAdvantage_eq_half_mul_demKeyGameOn is the proof's exact equation.