Random-oracle min-entropy programming and birthday collision bounds #
Two quantitative patterns recur throughout random-oracle security proofs:
- Min-entropy programming (
toOuterMeasure_exists_mem_fst_eq_le,lazyProgramHandler,overwriteProgramHandler): an oracle handler (such as a Fiat–Shamir signer or NIZK simulator) samples pre-challenge coinstswhose hash querypoint req tshas guessing probability at mostδ, and programs(point req ts) ↦ cwith a freshc ← distinstead of querying the lazy random oraclememoize (fun _ => dist). BywithBadFlagand the two-cost triangular union boundOracleComp.toOuterMeasure_bad_choose_two_cost_le, an adaptive program making at mostq_Sprogramming calls andq_Hdirect random-oracle calls hits an already-cached point during programming with probability at most(q_S * cache.length + q_S * q_H + q_S.choose 2) * δ(hence(q_S * q_H + q_S.choose 2) * δ ≤ q_S * (q_S + q_H) * δfrom an empty cache), bounding theCloseTodistance between lazy and programmed executions for bothOracleCompandProbOracleComp.runWith. - Random-function output-collision birthday bound (
HasOutputCollision,toOuterMeasure_collision_memoize_uniform_le,toOuterMeasure_hasOutputCollision_memoize_uniform_le): an adaptiveq-queryOracleComporProbOracleCompinteracting withmemoize (fun _ => PMF.uniformOfFintype Digest)from an empty cache observes two distinct queried keys with the same digest (HasOutputCollision, equivalent on duplicate-free key caches to¬(cache.map Prod.snd).Nodup) with probability at mostq.choose 2 / Fintype.card Digest.
Main definitions #
Cslib.RandomOracle.lazyProgramHandler,Cslib.RandomOracle.overwriteProgramHandler,Cslib.RandomOracle.flaggedLazyProgramHandler,Cslib.RandomOracle.flaggedOverwriteProgramHandler: two-channel lazy vs. fresh-overwrite random-oracle programming handlers and their monotone-flag collision wrappers.Cslib.RandomOracle.HasOutputCollision: existence of two cache entries with distinct keys and equal digests.
Main results #
Cslib.RandomOracle.toOuterMeasure_exists_mem_fst_eq_le,Cslib.RandomOracle.map_comp_apply_le_of_injective: min-entropy list-key collision bound and injective key-embedding preservation.Cslib.RandomOracle.flaggedLazyProgramHandler_apply_inl,Cslib.RandomOracle.flaggedLazyProgramHandler_apply_inr,Cslib.RandomOracle.identicalUntilBad_flaggedProgramHandlers,Cslib.RandomOracle.run_flaggedLazyProgramHandler_map_fst,Cslib.RandomOracle.run_flaggedOverwriteProgramHandler_map_fst: flagged programming transition equations,IdenticalUntilBad, and marginal-projection laws.Cslib.RandomOracle.toOuterMeasure_bad_flaggedLazyProgramHandler_choose_two_le,Cslib.RandomOracle.toOuterMeasure_bad_flaggedLazyProgramHandler_le,Cslib.RandomOracle.closeTo_run_lazyProgramHandler_overwriteProgramHandler_choose_two,Cslib.RandomOracle.closeTo_run_lazyProgramHandler_overwriteProgramHandler,Cslib.RandomOracle.closeTo_run_lazyProgramHandler_overwriteProgramHandler_of_isQueryBounded,Cslib.RandomOracle.closeTo_runWith_lazyProgramHandler_overwriteProgramHandler_choose_two,Cslib.RandomOracle.closeTo_runWith_lazyProgramHandler_overwriteProgramHandler: adaptive random-oracle programming collision andCloseTobounds forOracleCompandProbOracleComp.Cslib.RandomOracle.nodup_fst_of_mem_support_run_memoize,Cslib.RandomOracle.hasOutputCollision_iff_not_nodup_snd,Cslib.RandomOracle.toOuterMeasure_not_nodup_snd_memoize_le,Cslib.RandomOracle.toOuterMeasure_not_nodup_snd_runWith_memoize_le,Cslib.RandomOracle.toOuterMeasure_collision_memoize_uniform_le,Cslib.RandomOracle.toOuterMeasure_collision_runWith_memoize_uniform_le,Cslib.RandomOracle.toOuterMeasure_hasOutputCollision_memoize_uniform_le,Cslib.RandomOracle.toOuterMeasure_hasOutputCollision_runWith_memoize_uniform_le:q-query random-oracle output-collision birthday bounds.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Theorem 4.7, Section 19.6.1, and Section 20.3.5.
Min-entropy cache-lookup bounds #
Min-entropy list-key collision bound: if every value of f occurs under μ with
probability at most δ (∀ q, (μ.map f) q ≤ δ), then f a matches the key of some entry in
cache with probability at most cache.length * δ.
Composing g : α → β with an injective map emb : β → Query preserves any pointwise
probability upper bound ∀ b, (μ.map g) b ≤ δ.
Adaptive random-oracle programming hop #
Two-channel handler on List (Query × Digest) × Log whose active .inl req calls sample
ts ← samplePre req, query the lazy random oracle memoize (fun _ => dist) at point req ts for
c, and return finish req ts c; .inr q calls query memoize (fun _ => dist) q.
Two-channel programmable-ROM handler matching lazyProgramHandler except that active .inl req
calls draw a fresh c ← dist and overwrite (point req ts, c) at the front of cache without
checking for an existing entry.
Flagged version of lazyProgramHandler latching FlagBad whenever an active .inl req call
samples a point point req ts already present in cache.
Flagged version of overwriteProgramHandler latching FlagBad whenever an active .inl req
call overwrites a point point req ts already present in cache.
Explicit .inl transition equation for flaggedLazyProgramHandler.
Explicit .inr transition equation for flaggedLazyProgramHandler.
flaggedLazyProgramHandler and flaggedOverwriteProgramHandler agree until FlagBad.
Dropping FlagBad on flaggedLazyProgramHandler recovers lazyProgramHandler.
Dropping FlagBad on flaggedOverwriteProgramHandler recovers overwriteProgramHandler.
Sharpened adaptive RO programming collision bound (OracleComp): for a program making at
most q_S .inl calls and q_H .inr random-oracle calls from (cache, log), the probability
that an active .inl call hits an already-cached point is at most
(q_S * cache.length + q_S * q_H + q_S.choose 2) * δ.
Rectangular adaptive RO programming collision bound (OracleComp): corollary of
toOuterMeasure_bad_flaggedLazyProgramHandler_choose_two_le bounding the collision probability from
(cache, log) by (q_S * (cache.length + q_S + q_H)) * δ.
Sharpened adaptive RO programming CloseTo hop (OracleComp): replacing lazy oracle reads
at point req ts with fresh overwrites changes the joint (α × (List (Query × Digest) × Log))
distribution by at most (q_S * cache.length + q_S * q_H + q_S.choose 2) * δ.
Rectangular adaptive RO programming CloseTo hop (OracleComp): replacing lazy oracle
reads with fresh overwrites from (cache, log) changes the joint result-and-state distribution by
at most (q_S * (cache.length + q_S + q_H)) * δ.
Total-query adaptive RO programming CloseTo hop (OracleComp): when a program makes at
most q_S .inl calls and Q calls in total (IsQueryBounded program Q), lazy and
fresh-overwrite executions from (cache, log) are within (q_S * (cache.length + Q)) * δ.
Sharpened adaptive RO programming CloseTo hop (ProbOracleComp.runWith): lifts
closeTo_run_lazyProgramHandler_overwriteProgramHandler_choose_two to adversaries with private
randomness.
Rectangular adaptive RO programming CloseTo hop (ProbOracleComp.runWith): corollary
giving the (q_S * (cache.length + q_S + q_H)) * δ bound.
Random-function output-collision birthday bounds #
memoize preserves key distinctness (cache.map Prod.fst).Nodup across every adaptive
execution, because cache hits reuse existing entries without prepending a duplicate key.
On any cache with distinct keys ((cache.map Prod.fst).Nodup), HasOutputCollision cache is
equivalent to ¬(cache.map Prod.snd).Nodup.
Min-entropy random-oracle output-collision bound (OracleComp): if ∀ y, dist y ≤ δ and
program makes at most q queries starting from cache with (cache.map Prod.snd).Nodup, then
¬(cache'.map Prod.snd).Nodup occurs with probability at most
(q * cache.length + q.choose 2) * δ.
Min-entropy random-oracle output-collision bound (ProbOracleComp.runWith): lifts
toOuterMeasure_not_nodup_snd_memoize_le to adversaries with private randomness.
Random-oracle birthday bound (OracleComp, Nodup form): a q-query adaptive program
against memoize (fun _ => PMF.uniformOfFintype Digest) starting from [] produces duplicate
stored digests with probability at most q.choose 2 / Fintype.card Digest.
Random-oracle birthday bound (ProbOracleComp.runWith, Nodup form): a q-query adaptive
randomized program against memoize (fun _ => PMF.uniformOfFintype Digest) starting from []
produces duplicate stored digests with probability at most q.choose 2 / Fintype.card Digest.
Random-oracle birthday bound (OracleComp, distinct-key HasOutputCollision form): a
q-query adaptive program against memoize (fun _ => PMF.uniformOfFintype Digest) from []
observes two distinct queried keys with the same digest with probability at most
q.choose 2 / Fintype.card Digest.
Random-oracle birthday bound (ProbOracleComp.runWith, distinct-key HasOutputCollision
form): a q-query adaptive randomized program against
memoize (fun _ => PMF.uniformOfFintype Digest) from [] observes two distinct queried keys with
the same digest with probability at most q.choose 2 / Fintype.card Digest.