When unpredictable randomness is slow, an operating system can use a cryptographically secure pseudorandom number generator (CSPRNG) to produce many security-sensitive values quickly from a secret seed. The seed combines entropy sources; the generator then expands it deterministically. section 8.2
A secure generator should provide these properties:
- Determinism: reusing a seed reproduces the same sequence, making the generator predictable to someone who knows the seed. section 8.2
- Random-looking output: observed values should be computationally indistinguishable from uniformly chosen values and should not reveal the internal state. section 8.2
- Forward and backward secrecy: state compromise should not reveal past values or, after fresh entropy is injected, predict future values. section 8.2
Figure 8.1 A pseudorandom number generator (PRNG) generates a sequence of random numbers based on a seed. Using the same seed makes the PRNG produce the same sequence of random numbers. It should be impossible to recover the state using knowledge of the random outputs (the function next is one way). It follows that it should also be impossible from observing the produced random numbers alone to predict future random numbers or to recover previously generated random numbers.
Follow the seed, state, and next-output flow to see why observing outputs alone should not expose past or future values. section 8.2


