← Back to context

Comment by rapatel0

4 days ago

>True randomness is challenging to achieve, because computers are inherently predictable

Most modern CPUs now contain a true RNG. They usually use some combination of a metastable latch, or thermal randomness through some kind of analog amplification. Bit strings from this are passed into a pseudorandom number generator to amplify the amount of random data generated.

There probably attacks on this too but it's much harder.

More accurately, the CPU RNG instruction is generally considered untrusted by itself and the only reason it's used is that kernel RNGs are CSPRNGS based on cryptographic hashes (which is what the CS refers to - cryptographically secure) where mixing in a corrupted bit stream along with uncompromised bit streams still results in an uncompromised bit stream out. No one uses the CPU RNG instruction directly (both for security & also secondary perf reasons)