True randomness versus pseudorandom numbers

How random numbers are generated and why unpredictability and reproducibility are different goals.

Physical random sources measure uncertain events, whereas pseudorandom algorithms expand a finite internal state into a sequence. A cryptographic generator is designed to make the next output hard to predict without knowing its state; this is not the same as proving that every output is a fresh physical event.

Our default engine requests unsigned 32-bit words from Web Crypto. For classroom experiments a user-supplied seed instead initializes a deterministic algorithm. For example, repeat the same seeded number range 1–100 with count 10 and the same duplicate option: the sequence repeats, not just its distribution.

Use secure mode when unpredictability matters and seeded mode for reproducible demonstrations. A histogram that looks uniform is not evidence that an algorithm resists an attacker. Statistical tests cannot establish cryptographic security.

Related tools

References

LHTSOFT Random