Pseudorandom generators: games and concrete security #
Attack Game 3.1 of [BS23] compares a deterministic generator applied to a
uniform seed with a uniform output. Adversaries are randomized Boolean tests. Security
is relative to a caller-supplied predicate Admissible, with an explicit advantage bound.
No computational model or efficiency assumption is built into the generator or the tests.
Generator.IsExpanding records the cardinality condition separately from security.
In particular, a generator need not expand, and an expanding generator need not be secure.
References #
A deterministic generator with seed space Seed and output space Output.
Efficiency, expansion, and security are separate properties.
- toFun : Seed → Output
Generate an output from a seed.
Instances For
A randomized statistical test on the output space.
Equations
- Cslib.Crypto.PRG.Adversary Output = (Output → PMF Bool)
Instances For
Equations
- Cslib.Crypto.PRG.Generator.instFunLike = { coe := fun (G : Cslib.Crypto.PRG.Generator Seed Output) => G.toFun, coe_injective := ⋯ }
A generator expands when its output space is strictly larger than its seed space.
Equations
- _G.IsExpanding = (Fintype.card Seed < Fintype.card Output)
Instances For
The distribution obtained by applying the generator to a uniform seed.
Equations
- G.outputDist = PMF.map (⇑G) (Cslib.Probability.PMF.uniformOfFintype Seed)
Instances For
Experiment 0 of Attack Game 3.1: give the adversary a generated output.
Equations
- G.realExperiment adversary = G.outputDist.bind adversary
Instances For
Experiment 1 of Attack Game 3.1: give the adversary a uniform output.
Equations
- Cslib.Crypto.PRG.Generator.idealExperiment adversary = (Cslib.Probability.PMF.uniformOfFintype Output).bind adversary
Instances For
The absolute difference of the probabilities of outputting true in the two
experiments, as in Attack Game 3.1 of [BS23].
Equations
Instances For
Concrete security against admissible adversaries. The predicate is supplied by the
caller, for example to restrict tests to a chosen computational resource bound.
Taking Admissible := fun _ => True allows arbitrary adversaries.
Equations
- G.Secure Admissible ε = ∀ (adversary : Cslib.Crypto.PRG.Adversary Output), Admissible adversary → G.advantage adversary ≤ ↑ε