Game hops that are identical until bad #
Two games that run one program against stateful handlers that agree until a bad state, followed by
the same final step, have advantage at most the probability of reaching a bad state
(OracleComp.IdenticalUntilBad.advantage_le, [BS23], Theorem 4.7). This is the
two-sided difference lemma OracleComp.IdenticalUntilBad.abs_sub_le in the form that composes
with Game.advantage_triangle.
When a WordOracleComp Unit program interacts with a secret-dependent stateless deterministic
oracle o₁ τ whose replies agree with a secret-independent clean oracle o₂ unless a per-query
bad predicate isBad τ req holds (with secret-dependent continuation next τ),
Game.runStatelessOracle_bind_le and Game.advantage_runStatelessOracle_bind_le bound the
resulting μ.bind acceptance-probability difference and Game.advantage by Q * δ (respectively
Q / q when each query hits a bad secret with probability at most q⁻¹).
Main definitions #
Cslib.Crypto.Game.runStatelessOracle: run aWordOracleComp Unit αagainst a stateless deterministic word oracleo : List Bool → List Booland feed its output tonext : α → Game.Cslib.Crypto.Game.finderPhase2Oracle,Cslib.Crypto.Game.runFinderOracle: stateful witness finder oracle handler that answers witho₂while recordingsome (extract req)wheneverisBad reqholds.
Main results #
Cslib.OracleComp.IdenticalUntilBad.advantage_le: the advantage of an identical-until-bad hop.Cslib.Crypto.Game.runStatelessOracle_pure,Cslib.Crypto.Game.runStatelessOracle_query_inl,Cslib.Crypto.Game.runStatelessOracle_query_inr,Cslib.Crypto.Game.bind_runStatelessOracle_comm,Cslib.Crypto.Game.advantage_runStatelessOracle_le_of_support: structural and mixture laws forrunStatelessOracle.Cslib.Crypto.Game.runStatelessOracle_bind_le,Cslib.Crypto.Game.advantage_runStatelessOracle_bind_le: stateless-oracle until-bad bounds with a secret-dependent continuation and a secret-independent clean oracle.Cslib.Crypto.Game.runStatelessOracle_le_runFinderOracle: stateless-oracle until-bad bound into a witness-finding game (runFinderOracle).Cslib.Crypto.Game.advantage_uniform_bind_of_eq_of_ne: single-exceptional-point advantage bound1 / qfor twoZMod q-indexed game families.
References #
The difference lemma ([BS23], Theorem 4.7): games that run a program against handlers agreeing until a bad state, followed by the same final step, have advantage at most the probability of reaching a bad state.
Run a WordOracleComp Unit α against a stateless deterministic oracle
o : List Bool → List Bool and feed its output to next : α → Game.
Instances For
Stateless oracle until-bad bound: if prog makes at most Q oracle queries, o₁ τ req
agrees with o₂ req whenever isBad τ req = false, and for every req the μ-probability of
isBad τ req = true is at most δ, then replacing o₁ τ by o₂ (with continuation next τ)
changes the probability of each outcome b : Bool by at most Q * δ.
Game.advantage corollary of runStatelessOracle_bind_le when δ = (q : ℝ≥0∞)⁻¹.
An independent outer PMF.bind commutes with runStatelessOracle.
Support-restricted continuation bound for runStatelessOracle.
Two ZMod q-indexed game families that agree outside a single point x₀ have Game.advantage
at most 1 / q under PMF.uniformOfFintype (ZMod q).
Stateful oracle handler that replies with o₂ request.2 and updates its Option (List Bool)
state to some (extract request.2) whenever isBad request.2 holds.
Instances For
Run prog against finderPhase2Oracle starting from s : Option (List Bool) and test whether
the final state satisfies isGood.
Instances For
Once s satisfies s.elim false isGood = true, runFinderOracle succeeds with
probability 1.
Finder-oracle until-bad bound: if o₁ req = o₂ req whenever isBad req = false and every
query with isBad req = true satisfies isGood (extract req) = true, then the difference between
runStatelessOracle o₁ prog next and runStatelessOracle o₂ prog next is bounded by the
probability that runFinderOracle o₂ isBad extract prog none isGood outputs true.