A system call for random numbers: getrandom()
A system call for random numbers: getrandom()
Posted Jul 27, 2014 4:02 UTC (Sun) by dlang (guest, #313)In reply to: A system call for random numbers: getrandom() by nybble41
Parent article: A system call for random numbers: getrandom()
As I understand it (vastly simplified and numbers small for examples sake)
you take 32 bits of random data, it gets mixed and seeds the PRNG, but the PRNG has it's state pool.
This state pool starts off with the 32 bits of random data, but is much larger (say 256 bits)
each time data is read from the PRNG, it calculates some random data. Some of this random data is fed to the user, the rest of the random data replaces the existing pool.
for 32 bits of random data, you can generate many TiB of output, and that output cannot be identified as not being random by any anlysis, yes, at some point it could repeat, but nobody can predict when that is, even if they have the contents of the pool
so the offset into the stream can be much larger than the randomness used to initialize the pool in the first place
If you are the only user of the PRNG, the offset into the stream is a known value to you and adds no randomness.
But if there are other users of the PRNG output, then that adds to the randomness of the bits you read from the PRNG