Entropy in the Linux Kernel

From Leo's Notes
Revision as of 07:37, 21 September 2015 by Leo (talk | contribs) (wording)
This page was last edited on 21 September 2015, at 07:37.

Entropy is required to generate good random numbers. Modern operating systems will use physical hardware as sources for entropy and the 'randomness' goes into an entropy pool for future use.

On Linux, /dev/random and /dev/urandom are pseudo devices that provide random numbers. Both devices are supplied by the kernel's PRNG, though /dev/random will block when the entropy pool is depleted while /dev/urandom will continue to generate random numbers.

Linux Entropy Pool

You can see the size of the entropy pool size in linux by running:

cat /proc/sys/kernel/random/poolsize

The number of 'bits' of entropy can be seen at:

cat /proc/sys/kernel/random/entropy_avail

See Also