Standalone security games for universal and $\text{universal}_2$ projective hash functions #
Formalizes Attack Games 12.4 and 12.5, Lemmas 12.6 and 12.8 ([BS23], Sections 12.5.1–12.5.2, printed pp. 486 and 488), in the adaptive three-stage form of Exercise 12.26(a)–(b) (printed p. 521).
Nothing else on main uses these standalone games: the Cramer–Shoup security proof in
CslibFrontier/Crypto/Computational/CramerShoup/Scheme.lean keeps its direct proofs for the two
hybrid hops from uniform_projHash_fiber_add and uniform_projHash2_fiber_any_le.
Differences from printed statements #
- Returning
pure (v, w, st₁)(orpure (v, w, ρ, st₁)) fromchooseChallengewith(v, w)(or(v, w, ρ)) independent ofh(or(h₁, h₂)) recovers the non-adaptive Attack Games 12.4 and 12.5; the output statest₁may still carryh(or(h₁, h₂)) toguess. ProbOracleComp.QueriesSatisfyconstrains evaluation queries inL_ualong every execution path ofchooseChallengeandguessregardless of oracle replies, whereas the book constrains queries made along an execution of the game.Universal2GuessAdversary.Admissibleomits the printed(v, w) ∉ L_urequirement on the challenge pair in Attack Game 12.5 / Exercise 12.26(b), because theQ / qbound holds uniformly even when(v, w) ∈ L_u.- Both bounds are information-theoretic and hold for computationally unbounded admissible adversaries without efficiency hypotheses.
Main definitions #
Cslib.Crypto.ProjectiveHash.UniversalEvalSpec,Cslib.Crypto.ProjectiveHash.UniversalDistAdversary,Cslib.Crypto.ProjectiveHash.UniversalDistAdversary.Admissible,Cslib.Crypto.ProjectiveHash.universalDistExperiment: oracle interface, three-stage adversary, admissibility predicate, and distinguishing experiments for Attack Game 12.4 / Exercise 12.26(a).Cslib.Crypto.ProjectiveHash.Universal2EvalSpec,Cslib.Crypto.ProjectiveHash.universal2Wins,Cslib.Crypto.ProjectiveHash.Universal2GuessAdversary,Cslib.Crypto.ProjectiveHash.Universal2GuessAdversary.Admissible,Cslib.Crypto.ProjectiveHash.universal2GuessGame: oracle interface, winning predicate, three-stage adversary, admissibility withQ-tuple output bound, and guessing game for Attack Game 12.5 / Exercise 12.26(b).
Main results #
Cslib.Crypto.ProjectiveHash.universalDistExperiment_false_eq_true: Lemma 12.6 / Exercise 12.26(a) (universalDistExperiment F d A false = universalDistExperiment F d A true).Cslib.Crypto.ProjectiveHash.succProbability_universal2GuessGame_le: Lemma 12.8 / Exercise 12.26(b) (Game.succProbability (universal2GuessGame F d A) ≤ Q / F.order d).
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Sections 12.5.1–12.5.2 (printed pp. 484–488) and Exercise 12.26 (printed p. 521).
Attack Game 12.4, Lemma 12.6, and Exercise 12.26(a) #
Oracle specification for evaluation queries (ṽ, w̃) ↦ f_{σ,τ}(ṽ, w̃) in Attack Game 12.4
and Exercise 12.26(a) ([BS23], Section 12.5.1, printed p. 486, and Exercise 12.26(a),
printed p. 521).
Adaptive three-stage adversary for Attack Game 12.4 / Exercise 12.26(a) ([BS23],
Section 12.5.1, printed p. 486, and Exercise 12.26(a), printed p. 521). chooseU selects u ∈ G,
chooseChallenge receives h and makes evaluation queries before choosing (v, w), and guess
receives z_b and continues making evaluation queries before outputting a bit. Returning
pure (v, w, st₁) with (v, w) independent of h (which may still be kept in st₁) recovers
the non-adaptive Attack Game 12.4.
Stage 1: sample the base group element
u ∈ Gand initial state.- chooseChallenge : State₀ → F.Carrier d → ProbOracleComp (UniversalEvalSpec F d) (F.Carrier d × F.Carrier d × State₁)
Stage 2: given saved state
st₀and auxiliary informationh, make evaluation queries and emit(v, w, st₁). Stage 3: given saved state
st₁and challengez_b, make evaluation queries and output a Boolean guess.
Admissibility for UniversalDistAdversary: for every (u, st₀) in chooseU's support, every
evaluation query of chooseChallenge lies in L_u on every execution path regardless of replies,
every supported output (v, w, st₁) of chooseChallenge on any honest (σ, τ) satisfies
(v, w) ∉ L_u, and every evaluation query of guess lies in L_u on every execution path.
Experiment b of Attack Game 12.4 in the adaptive form of Exercise 12.26(a) ([BS23],
Section 12.5.1, printed p. 486, and Exercise 12.26(a), printed p. 521). In Experiment false
(b = 0), z = projHash F d σ τ v w; in Experiment true (b = 1), z is uniformly distributed
in F.Carrier d (ζ • F.generator d).
Lemma 12.6 / Exercise 12.26(a) ([BS23], Section 12.5.1, printed p. 486, and
Exercise 12.26(a), printed p. 521): for every admissible adversary, Experiment false and
Experiment true of universalDistExperiment have the identical output distribution.
Attack Game 12.5, Lemma 12.8, and Exercise 12.26(b) #
Oracle specification for evaluation queries ((ṽ, w̃), ρ̃) ↦ f'_{σ₁,τ₁,σ₂,τ₂}(ṽ, w̃, ρ̃) in
Attack Game 12.5 and Exercise 12.26(b) ([BS23], Section 12.5.2, printed p. 488, and
Exercise 12.26(b), printed p. 521).
Winning predicate of Attack Game 12.5 and Exercise 12.26(b) ([BS23], Section 12.5.2,
printed p. 488): some tuple (ẑ, v̂, ŵ, ρ̂) in the output list has (v̂, ŵ) ∉ L_u,
ρ̂ ≠ ρ, and ẑ = f'_{σ₁,τ₁,σ₂,τ₂}(v̂, ŵ, ρ̂).
Adaptive three-stage adversary for Attack Game 12.5 / Exercise 12.26(b) ([BS23],
Section 12.5.2, printed p. 488, and Exercise 12.26(b), printed p. 521). Returning
pure (v, w, ρ, st₁) with (v, w, ρ) independent of (h₁, h₂) (which may still be kept in
st₁) recovers the non-adaptive Attack Game 12.5.
Stage 1: sample the base group element
u ∈ Gand initial state.- chooseChallenge : State₀ → F.Carrier d × F.Carrier d → ProbOracleComp (Universal2EvalSpec F d) (F.Carrier d × F.Carrier d × ZMod (F.order d) × State₁)
Stage 2: given saved state
st₀and auxiliary information(h₁, h₂), make evaluation queries and emit(v, w, ρ, st₁). - guess : State₁ → F.Carrier d → ProbOracleComp (Universal2EvalSpec F d) (List (F.Carrier d × F.Carrier d × F.Carrier d × ZMod (F.order d)))
Stage 3: given saved state
st₁and challengez, make evaluation queries and output guess tuples.
Admissibility and Q-tuple output bound for Universal2GuessAdversary: for every supported
(u, st₀), every evaluation query of chooseChallenge lies in L_u on every execution path; for
every supported output (v, w, ρ, st₁) of chooseChallenge on honest keys and every
z : F.Carrier d, every evaluation query of guess st₁ z lies in L_u on every path and every
supported output list of guess st₁ z against every honest key has length at most Q. Notice
(v, w) ∉ L_u is intentionally omitted (though printed in Attack Game 12.5) because the Q / q
bound holds even when (v, w) ∈ L_u.
Attack Game 12.5 in the adaptive form of Exercise 12.26(b) ([BS23], Section 12.5.2, printed p. 488, and Exercise 12.26(b), printed p. 521).
Lemma 12.8 / Exercise 12.26(b) ([BS23], Section 12.5.2, printed p. 488, and
Exercise 12.26(b), printed p. 521): in universal2GuessGame, every admissible adversary that
outputs at most Q tuples wins with probability at most Q / q.