Hardware Random Generators vs Pseudorandom Algorithms
Hardware random number generators harvest physical entropy; pseudorandom algorithms compute deterministic streams from a seed. Here's which one you actually build on.
The short answer
Pseudorandom Algorithms over Hardware Random Generators for most cases. A CSPRNG seeded once from a hardware source gives you cryptographically strong, blazing-fast, reproducible, auditable randomness everywhere.
- Pick Hardware Random Generators if need the raw entropy seed itself — a TRNG/jitter source feeding /dev/random, an HSM key ceremony, or a lottery draw that must be physically unpredictable and provably non-deterministic
- Pick Pseudorandom Algorithms if doing literally anything else: session tokens, key generation at scale, simulations, sampling, shuffling, game logic, or any system that needs speed, reproducibility, and tests that pass twice
- Also consider: The right answer is almost always BOTH stacked correctly — hardware entropy seeds a CSPRNG (Fortuna, ChaCha20, the kernel CSPRNG). Never roll your own algorithm, and never use a non-crypto PRNG (Mersenne Twister, rand()) where security matters.
— Nice Pick, opinionated tool recommendations
What you're actually choosing between
A hardware RNG measures physical chaos — thermal noise, ring-oscillator jitter, quantum effects — and turns it into bits no one can predict, not even with the full source code in hand. A pseudorandom algorithm starts from a seed and computes a deterministic sequence that merely looks random. That word 'deterministic' is the entire fight: same seed, same stream, forever. People frame this as 'real randomness vs fake randomness,' which is emotionally satisfying and operationally useless. The honest framing is throughput and trust vs auditability and speed. Hardware gives you unpredictability you cannot reproduce or inspect. Algorithms give you randomness you can test, seed, replay, and ship to a million machines that don't have a noise diode. You're not choosing good vs bad. You're choosing which property you can't live without — and for 99% of systems, that's reproducible speed.
Where hardware RNGs earn their keep
Hardware wins exactly where determinism is the enemy. Key ceremonies, HSMs, the seed for /dev/urandom, a national lottery, a casino draw audited by regulators — anything where 'an attacker who knows everything still can't predict the next bit' is the requirement. That's a real, narrow, important job. But hardware RNGs are slow (kilobytes to low megabytes per second while a CSPRNG does gigabytes), they can bias or fail silently as the chip ages or the temperature shifts, and you cannot unit-test them — every run is different by design, which means no reproducible bug, no golden-file test, no 'works on my machine.' Worse, a hardware source is a black box: you're trusting the vendor's silicon and their health-check, post-Dual_EC_DRBG, with no way to inspect the entropy. Use hardware for the seed. Stop there.
Where pseudorandom algorithms quietly win everything else
A modern CSPRNG — ChaCha20, the Linux getrandom() pool, Fortuna — seeded once with real entropy is cryptographically indistinguishable from true randomness, runs at gigabytes per second, needs no special hardware, and runs identically on a laptop, a Lambda, and a Raspberry Pi. Crucially it's reproducible: log the seed and you can replay the exact stream to reproduce a Monte Carlo run, a fuzzing crash, or a procedurally-generated world. That's not a weakness, it's a superpower hardware structurally cannot offer. The catch — and it's a sharp one — is that 'pseudorandom' includes garbage like Mersenne Twister, Math.random(), and rand(), which are fast, fine for games, and catastrophic for anything security-adjacent because their state is recoverable from output. The algorithm category contains both the best tool and the worst footguns. Pick a CSPRNG, not a toy.
The verdict, no hedging
Pseudorandom algorithms win, because the question 'which do I build on' has one correct answer and it isn't a noise diode. The reference architecture every serious system already uses is hardware-seeds-software: harvest a few hundred bits of physical entropy once, feed a CSPRNG, and generate everything downstream algorithmically. Hardware is the spark; the algorithm is the engine. Treating them as rivals is the amateur mistake — but if you force me to pick the layer you'll actually write code against, ship, scale, and test, it's the algorithm every time. The only place you reach past it to raw hardware is the seed and the key ceremony. Everywhere else, a hardware-only RNG is a slow, untestable liability dressed up as purity. Seed from hardware, compute with a CSPRNG, and never confuse 'feels more random' with 'is the right tool.'
Quick Comparison
| Factor | Hardware Random Generators | Pseudorandom Algorithms |
|---|---|---|
| Throughput | KB/s to low MB/s, entropy-limited | GB/s, CPU-bound |
| Unpredictability with source known | Holds — physical, no internal state to recover | Holds for CSPRNGs; broken for toy PRNGs |
| Reproducibility & testability | None — every run differs by design | Full — log the seed, replay the stream |
| Auditability | Black-box silicon, trust the vendor | Open algorithms, inspectable, test vectors |
| Deployment cost | Needs special hardware/HSM/noise source | Runs anywhere, pure software |
The Verdict
Use Hardware Random Generators if: You need the raw entropy seed itself — a TRNG/jitter source feeding /dev/random, an HSM key ceremony, or a lottery draw that must be physically unpredictable and provably non-deterministic.
Use Pseudorandom Algorithms if: You're doing literally anything else: session tokens, key generation at scale, simulations, sampling, shuffling, game logic, or any system that needs speed, reproducibility, and tests that pass twice.
Consider: The right answer is almost always BOTH stacked correctly — hardware entropy seeds a CSPRNG (Fortuna, ChaCha20, the kernel CSPRNG). Never roll your own algorithm, and never use a non-crypto PRNG (Mersenne Twister, rand()) where security matters.
A CSPRNG seeded once from a hardware source gives you cryptographically strong, blazing-fast, reproducible, auditable randomness everywhere. Pure hardware RNGs are slow, unauditable black boxes you can't unit-test. The winning architecture uses hardware for the seed and a pseudorandom algorithm for everything after — and that's a PRNG win.
Related Comparisons
Disagree? nice@nicepick.dev