"Don't play dice with random numbers" from 2012 describes the 3.6 kernel as using three pools and three CSPRNGs. An input pool feeds a CSPRNG, which in turn feeds two output pools, which feed two CSPRNGs, which are read by /dev/urandom and /dev/random (
figure)
However
"The Linux Random Number Generator" from 2014 describes three pools but only one CSPRNG, between the input and output pools (
figure).
"Myths about /dev/urandom", last updated this year, also describes three pools and one CSPRNG for the pre 4.8 kernel, but two pools for 4.8+ with /dev/urandom reading directly from the CSPRNG instead of from a pool (not sure what difference that would make).
Finally,
man(4) random and the
kernel source for random.c talk vaguely of "the entropy pool".
Are there any definitive schematics for how this all works? Appreciate that it's likely changed over time. Is there anyone familiar with the source code who could describe how the current kernel works?
One reason I ask is to understand what happens when you do
Code:
cat /path/to/random-seed > /dev/urandom
. Into what pool does that data go, and is it used to initialize a/the CSPRNG or is it read directly from the pool by /dev/urandom?
Thanks