r/linux • u/atoponce • Mar 01 '22
Linux 5.18 will likely have a blocking /dev/urandom such that calls to the RNG will *always* return secure bytes after initial seeding, which takes no more than 1s after boot. After decades of confusion, all random interfaces will finally be identical.
https://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git/commit/?id=2ad310f93ec3d7062bdb73f06743aa56879a0a28
1.5k
Upvotes
29
u/atoponce Mar 01 '22 edited Mar 02 '22
First, the blocking pool was removed in version 5.6.
/dev/randomno longer blocks.Second, the entropy estimating accounting process determines when to rekey ChaCha20. If the entropy estimate has reached 256 bits and the duration between rekeying is 5 minutes, only then will the RNG be rekeyed.
Third, the blocking now is happening with any call to the RNG only before it's been seeded,
getrandom(),/dev/random, or/dev/urandom. After it's been seeded, which happens very early in boot, calls to the RNG will no longer block.Edit: correction