/dev/random Is More Like /dev/urandom With Linux 5.6

Written by Michael Larabel in Linux Kernel on 1 February 2020 at 01:18 AM EST. 15 Comments
LINUX KERNEL
The random changes have been sent in for Linux 5.6 that yield /dev/random behavioral changes and a new random flag.

First up, with Linux 5.6 /dev/random behaves more like /dev/urandom now for polling RNG data in user-space. The changed behavior causes /dev/random to behave the same as /dev/urandom except for reads being blocked until the CRNG (the Linux cryptographic-strength random number generator) is ready. Meanwhile /dev/urandom will continue to serve its best data but never block. This /dev/random change allows the random's blocking pool to be removed and in turn clean-up the Linux random code in the process.

Linux 5.6 also brings the new insecure "GRND_INSECURE" flag for getentropy(). This new flag can be used for requesting the best random output it can even if it's not meeting cryptographically random strength.

The list of Linux 5.6 random changes in full can be found via this PR.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week