Uniform computational pseudorandom generators #
A generator is ordinary functional code on lists of bits. Its finite family uses the existing
PRG.Generator API on BitString n and BitString (length n). The output-length condition makes
this representation exact: no padding or truncation enters the real experiment. Admissible finite
tests must be realized by one uniform PPT program on every parameter and valid output word.
Security is the existing PRG.Family.Secure, with the seed length supplied as the parameter in
both experiments. Its equivalence to computational indistinguishability lets reductions use
list programs without manipulating dependent finite types. The real and ideal experiments below
are executable fair-bit programs; their efficiency follows from the generator and length routine.
Main definitions #
Cslib.Crypto.PRG.wordFamily: the finite family represented by a word function.Cslib.Crypto.IsPPTBitStringTest: uniform realization of finite tests on valid words.Cslib.Crypto.PseudorandomGenerator: efficient generation, exact length, stretch and security.
Main results #
Cslib.Crypto.PRG.wordFamily_secure_iff: equivalence to word-ensemble indistinguishability.Cslib.Crypto.PseudorandomGenerator.of_indistinguishable: prove security with word programs.
References #
- S. Arora, B. Barak, Computational Complexity: A Modern Approach, Section 9.2.3.
Adapted from Crypto/Computational/PseudorandomGenerator.lean on the cslib crypto branch at
5ff69ca93402e7c947208dc56396d6d86203ccd8, retaining the pinned finite PRG API.
Length-dependent postprocessing can use the sampled seed length as its parameter.
One uniform program realizes the entire finite test family on its valid output words. Its behavior on other word lengths is unrestricted, but its machine clock bounds every input.
Instances For
The finite and word experiments coincide for every uniformly realized test.
The ideal finite test sees exactly the uniform word of the declared output length.
Finite-family security against uniformly realizable tests is exactly computational indistinguishability of the generated and uniform word ensembles.
Sample a uniform seed, evaluate the generator, and run the distinguisher.
Instances For
Sample a uniform word at the declared length and run the distinguisher.
Instances For
The real program denotes the generated-word experiment.
The ideal program denotes the uniform-word experiment.
The real experiment is an efficient program when its generator and distinguisher are.
The ideal experiment is efficient when its length routine and distinguisher are.
A plain polynomial-time stretching generator, secure in the existing finite-family API.
- polyTime : Turing.MultiTapeTM.ComputableInPolyTime generator Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits
One deterministic polynomial-time machine evaluates the generator.
The output length depends only on the seed length.
Every seed length is strictly expanded.
- secure : (PRG.wordFamily generator length).Secure IsPPTBitStringTest
The finite family is secure against uniformly realizable PPT tests.
Instances For
Recover the tidy presentation for proofs without changing the security contract.
Establish a uniform PRG with an ordinary word-ensemble security argument.
The generated words are computationally indistinguishable from uniform words.
Compute the expansion length by evaluating the generator on a canonical seed. No separate efficiency or security assumption on the length function is needed.
A secure generator has an efficient unary expansion-length routine.