Walt Mankowski via plug on 20 Mar 2022 06:46:14 -0700 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
[PLUG] Random number generator changes in Linux 5.17 and 5.18 |
/dev/random
and /dev/urandom
are becoming exactly the same thing./dev/random
and /dev/urandom
are devices on Linux system. Programs can read from them, and they will return random data. Historically the difference is that /dev/random
returned data solely from the kernel's entropy pool (environmental noise gathered from device drivers and other sources), while /dev/urandom
used a pseudorandom number generator that was initialized from the entropy pool. Another major difference is that /dev/random
can block if the entropy pool is empty, while /dev/urandom
never blocks. Because of that most applications are recommended to use /dev/urandom
./dev/random
and /dev/urandom
is no longer needed. FreeBSD and macOS have already switched to Fortuna. Here's what random(4)
on macOS has to say:/dev/urandom is a compatibility nod to Linux. On Linux, /dev/urandom will produce lower quality output if the entropy pool drains, while /dev/random will prefer to block and wait for additional entropy to be collected. With Fortuna, this choice and distinction is not necessary, and the two devices behave identically. You may use either.
___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug