Generating Entropy in Linux

A walkthrough on the available solutions for feeding the kernel with some entropy

Thu Jun 07 2018
LinuxDoneR-001Almost Certain5/10

In Linux, sometimes you may need to generate some entropy.


There are both hardware and software solutions:

  • Hardware solutions: they can generate more entropy per second, but you need physical access
  • Software solutions: they have less performance, but you just need root permissions (no physical access)

Hardware solutions

Typically it’s a USB device that generates and streams some random numbers.

One of such devices is TrueRNG (price is approx: 50$).

Software solutions


This program feeds random data from hardware device to kernel.

rngd -r "/dev/urandom"

Here we have used rngd program (man 8 rngd for more details).

This daemon feeds data from a random number generator to the kernel’s random number entropy pool, after first checking the data to ensure that it is properly random.

Audio Entropy Daemon

This program feeds the /dev/random device with entropy-data read from an audio device.

The audio-data is not copied as is but first de-biased and analysed to determine how much bits of entropy is in it.

The official website of the program is here.

Alessandro Molari

Alessandro Molari   Cyber-Security Consultant & Ethical Hacker, specialized in Red Teaming, Penetration Testing, Advanced Persistent Threat (APT), Vulnerability Research & Malware Analysis