Hardware RNG or software RNG, asking the question properly
The useful question is not hardware versus software but where unpredictability physically originates and what evidence exists about it. Every practical system uses both: a physical source to seed, and a deterministic algorithm to expand. The distinction that matters is whether the physical half is characterised or merely assumed.
Why the framing is usually wrong
Posed as "hardware good, software bad", the question has no useful answer. A well-implemented DRBG seeded from a strong source is excellent. A hardware source with an undocumented entropy model and no runtime health monitoring is not automatically better than it.
Both halves exist in any real system. The kernel on the machine you are reading this on has a pooling and expansion design in software, seeded from whatever physical sources the platform exposes. The question is what those sources are and what you know about them.
What software cannot do
Deterministic code cannot create unpredictability. It can preserve, mix and expand it very efficiently, and modern DRBG designs do exactly that. But the unpredictability has to enter from somewhere physical, and on many platforms what enters is a mixture of interrupt timings and instruction-level sources whose entropy contribution is estimated rather than modelled.
That estimate is often reasonable and occasionally is not, particularly in virtualised environments, in embedded devices at first boot, and on platforms where the timing sources an entropy estimate assumed are less variable than expected.
What hardware does not automatically give you
A hardware source is not evidence by itself. Ask which physical process, what min-entropy estimate, conditional on what model, and what health testing runs in service. A source that cannot answer those is an assumption in a different package.
This is where claim discipline matters most, and it applies to us. Our sources are not better because they are hardware. They are better to the extent that the entropy model is stated, the estimate is conditional on it, and the quantities it depends on are monitored while running.
The practical answer
Use the operating system's generator. Make sure it is seeded from a source you can describe. Add a characterised physical source where the consequences of a weak key are severe, where you must produce evidence rather than assurances, or where the platform's own sources are weak — embedded devices at first boot being the clearest case. The assessment checklist is how to tell which situation you are in.
Keep reading
- Fundamentals
What is a CSPRNG, and where the DRBG fits
A CSPRNG is a deterministic algorithm that expands a seed into a long stream, built so that observing part of the output does not let an attacker compute the rest. In the NIST vocabulary the mechanism is a DRBG, and it sits downstream of an entropy source that seeds and reseeds it.
- Fundamentals
QRNG vs TRNG vs PRNG, the differences that matter in production
A PRNG expands a seed, a TRNG measures a physical process, and a QRNG measures a quantum one. The difference that matters in production is not speed but evidence: a quantum source can be described by a physical model, which makes its entropy estimate something you can argue about rather than assert.
- Fundamentals
What is true randomness, and what quantum actually adds
Unpredictability and statistical uniformity are different properties, and only one of them matters for cryptography. A stream can pass every statistical test ever devised and still be entirely predictable. What quantum physics adds is not better statistics but a source whose unpredictability follows from a model you can state and check.