We want to be able to take a few "true random bits" (seed) and generate more "random looking bits", i.e. construct a function . The generated bit strings should "look random" to an adversary. In cryptography, PRNG's are used to construct session keys and stream ciphers.
True Randomness is generated from some source such as thermal noise. Abstractly, a random source defines a distribution on .
Example: -way independent bits and , .
Example: uniform on
Extractors convert a random source with unknown distribution on into a uniform distribution on , , e.g. Von Neumann extractor for binomial distribution. We shall take an -bit random source uniform on for granted.
Definition
The traditional definition of pseudorandom number generators involves a bunch of statistical tests (see Knuth's "The Art of Computer Programming Vol. 2"), but this is insufficient for cryptographic purposes.
For example, a linear congruential generator: pick a prime , pick , pick random seed , and iterate with and output is considered a PRNG under the traditional definition, but is completely predictable, because given bits one can recover the seed efficiently.
Instead, we require the pseudo-random number generator to fool any statistical test.
Definition (fixed security parameter version): A -PRNG is a function such that
-
is efficiently computable by a deterministic algorithm.
-
"-fools" all -time statistical tests, that is, for all -time algorithms
We say that the uniform distribution on is -indistinguishable from distributions .
The Next-Bit Test
We derive an equivalent characterization of PRNG's to that of Yao that is easier to work with. For , denote the th bit of by and the first bits of by .
We say passes the next bit test if for all no -time algorithm can predict from , that is, for all -time algorithms and for all
Theorem: [Yao '82]
Suppose passes the next bit test. Then is a -PRNG. ("The next bit test is universal.")
Proof: Suppose we have a -algorithm for . Then we shall build a -next bit predictor for , by using a "hybrid argument":
Define the following collection of distributions as follows: the first bits of a member of are found by picking a random and setting them to . The last bits are generated at random from . Then
and
Hence
Thus there exists with
We can use to build a next bit predictor for .
The "hybrid argument" is quite useful: in general, suppose experiment (game) is distinguishable from experiment . Then build experiments , and then it can be shown that there exists such that is distinguishable from , which can be used to solve a challenge problem.
Hardcore bits can be used to construct PRNGs using a method due to Blum and Micali.