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
5
u/bik1230 Mar 02 '22
Random and urandom have both always been based on a CSPRNG, just that random would subtract from the entropy estimate in a way that doesn't really make sense.
Urandom has always been the recommended source of cryptographically secure random numbers, with the caveat that it'll only be secure after enough entropy has been gathered post boot.
This new change ensures that all programs always get fully secure numbers without blocking, except perhaps 1 second of blocking right after boot.