3 ms·
/dev/random hasn't been a "true" RNG in the sense you're describing (an "entropy estimating" RNG I think) since Linux 5.6. However, even an entropy estimating R
by oconnor663 5y ago
/dev/random hasn't been a "true" RNG in the sense you're describing (an "entropy estimating" RNG I think) since Linux 5.6. However, even an entropy estimating RNG doesn't want to give raw bytes from entropy sources straight to callers, for a few reasons:
1. There might be more than one source. In that case, it's natural to want the output to be secure as long as any of the inputs are secure. For that, you need some way to securely mix two sources of randomness together, and hash functions are good at that.
2. Truly random numbers coming from lava lamps or thermometers or whatever aren't necessarily uniformly random. They might be, say, 1/3 zeros and 2/3 ones. Who knows. That's still useful randomness, but callers want uniformly random bytes, so again we reach for some sort of pseudorandom mixer like a hash function. In this case I think this step is called "whitening".
- akerl_ 5y agoEven back when /dev/random estimated entropy, it was still a CSPRNG. At that time, /dev/random and /dev/urandom used the same cryptographic function to generate pseudo-random bits, random just added some additional fluff based on the claim that it was “estimating” randomness.