man 4 random has a very vague description of Linux kernel entropy sources:

The random number generator gathers environmental noise from device drivers and other sources into an entropy pool.

The paper Entropy transfers in the Linux Random Number Generator isn't much more specific, either. It lists:

  • add_disk_randomness(),
  • add_input_randomness(), and
  • add_interrupt_randomness().

These functinos are from random.c, which includes following comment:

Sources of randomness from the environment include inter-keyboard timings, inter-interrupt timings from some interrupts, and other events which are both (a) non-deterministic and (b) hard for an outside observer to measure.

Further down, there is a function add_hwgenerator_randomness(...) indicating support for hardware random number generators.

All those information are rather vague (or, in the case of the source code, require deep knowledge of the Linux kernel to understand). What are the actual entropy sources used, and does the Linux kernel support any hardware random number generators out-of-the-box?

2 Answers 2


Most commodity PC hardware has a random number generator these days. VIA Semiconductor has put them in their processors for many years; the Linux kernel has the via-rng driver for that. I count 34 source modules in the drivers/char/hw_random/ directory in the latest source tree, including drivers for Intel and AMD hardware, and for systems that have a TPM device. You can run the rng daemon (rngd) to push random data to the kernel entropy pool.

  • This seems like a big part of the answer I was looking for. I will have a deeper look at what's contained in there as soon as I get around to do so. Together with the information already contained in the question this feels like a comprehensive list of entropy sources.
    – Jens Erat
    Aug 21, 2017 at 19:42
  • 3
    And to see what is available on a specific pc run cat /sys/devices/virtual/misc/hw_random/rng_available.
    – hlovdal
    Nov 11, 2018 at 10:50

Yes, it does support hardware entropy generators out of the box. This is necessary for high load SSL servers with lots of simultaneous connections initiated per second (Gmail, Facebook, Microsoft, etc). It is really not necessary for home servers or small organization servers. Keep in mind hardware entropy generators usually use PCI interfaces, nothing fancy there, so it can be supported easily. Not sure if there are propietary hardware entropy generators that require closed source drivers, probably not, as it's not very difficult and not a very profitable industry (unlike graphics cards otherwise) anyways.


  • 2
    High-volume servers don't require a hardware RNG more than low-volume servers. Once the machine has been seeded with sufficient entropy, it can keep running on a PRNG forever (or at least for billions of years, which is the same in practice). The kind of computers that really need a hardware RNG are embedded devices that can't save their current RNG state securely when they power down. Dec 10, 2014 at 21:40
  • @Gilles: is this valid for other systems than Linux? I know Linux does this, but never have heard of *BSDs including OS X (nor Windwos) doing so.
    – Jens Erat
    Jan 16, 2015 at 21:56
  • 1
    @JensErat I don't know. It's easy to implement and very useful, so I'd be surprised if the BSD didn't do it. Jan 16, 2015 at 22:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .