Ideal Cipher Model #
This module formalizes the Ideal Cipher Model, consisting of independent random permutations for each key, and defines its exact and forgetful lazy samplers.
Main definitions #
Query: An ideal cipher query, combining a key and a permutation query.Spec: The ideal cipher specification.lazyEvalPerm,answer,forgetfulAnswer: Samplers for evaluating an ideal cipher.
Main results #
uniform_interpret_eq_lazy: Eager random-permutation sampling matches lazy exact caching.identicalUntilBad_exactWithBad_forgetfulWithBad: Identical-until-bad coupling between exact and forgetful samplers.toOuterMeasure_bad_forgetfulWithBad_le: Quadratic birthday bound on the forgetful bad event.abs_sub_uniformPerm_forgetful_le: Ideal-cipher switching boundQ.choose 2 * (Fintype.card Block)⁻¹.
References #
A query to the ideal cipher, consisting of a key and a block query.
The oracle specification for an ideal cipher.
Evaluate an ideal cipher directly with a full permutation state.
Evaluate an ideal cipher with a lazy cache.
Evaluate an ideal cipher with a forgetful cache that doesn't check consistency.
Generates a complete tuple of independent random permutations extending the given cache function.
Completing the empty cache samples an independent uniformly random permutation for every key.
An exact evaluation step for the ideal cipher model, with a bad flag that triggers when a duplicate output is sampled.
A forgetful evaluation step for the ideal cipher model, updating the cache and the bad flag.
A query step of answer preserves the invariant that every key's cache is a partial
bijection.
Single-step simulation law for answer against complete: when every key's cache in st is
a partial bijection, answering q lazily and completing the updated caches yields the same joint
distribution of (answer, permutations) as completing st first and evaluating q under the
resulting permutation family.
Running program against independent uniformly random permutations
P : Key → Equiv.Perm Block yields the same output distribution as running program lazily under
answer from empty caches and projecting out the return value.
exactWithBad and forgetfulWithBad are identical until the bad flag becomes true.
Quadratic birthday bound on the bad-flag probability of forgetfulWithBad: starting from
initial key caches cache with bad = false, an n-query-bounded program sets bad = true
with probability at most (n * ∑ k, (cache k).length + n.choose 2) * (Fintype.card Block)⁻¹.
A query step of exactWithBad preserves the invariant that every key's cache is a partial
bijection.
Dropping the bad flag after a step of exactWithBad recovers the law of answer, provided
every key's cache in st.1 is a partial bijection.
Dropping the bad flag after a step of forgetfulWithBad recovers the law of
forgetfulAnswer.
Dropping the final bad flag after running program under exactWithBad recovers the run
under answer, provided every key's initial cache is a partial bijection.
Dropping the final bad flag after running program under forgetfulWithBad recovers the run
under forgetfulAnswer.
Ideal-cipher switching bound (ℝ, two-sided): for any Q-query-bounded program program,
postprocessing kernel next : β → PMF γ, and outcome c : γ, the probabilities of outputting
c under independent uniformly random permutations P : Key → Equiv.Perm Block and under the
forgetful lazy sampler forgetfulAnswer (starting from empty caches) differ by at most
Q.choose 2 * (Fintype.card Block)⁻¹.