What is a pseudorandom number generator?

Definition

A pseudorandom generator updates a finite internal state and derives output values from it. Repeating the same algorithm with the same initial state reproduces the same sequence, which is useful for simulation and reproducible experiments.

Not every pseudorandom generator is suitable for security-sensitive use. Statistical appearance, unpredictability and resistance to state recovery are different properties, and claims about a historical routine do not automatically apply to modern cryptographic generators.

ELI5

A pseudorandom generator follows a recipe that produces numbers that look mixed up. It is not pure chance because the same starting point can produce the same sequence again.

For example, a simulation can reuse a starting seed so researchers can repeat an experiment. A recipe suitable for that purpose is not automatically suitable for protecting passwords or cryptographic secrets.

What is a seed?

A seed is starting information used to initialize a generator's internal state and resulting sequence.

Are all random-looking generators secure?

No. Security requires stronger unpredictability properties than simply producing numbers that appear well distributed.

  1. Pierce Freeman, Richard Diehl Martinez beside the blue and white headline AI and Encryption Not a Key Break on a black background.
Definition card for pseudorandom number generator: What is a pseudorandom number generator?

A pseudorandom number generator is a deterministic algorithm that produces a sequence designed to resemble random values from an initial internal state.