haveged
random number generator daemon that feeds the Linux kernel's entropy pool
TLDR
Start haveged daemon
SYNOPSIS
haveged [options]
DESCRIPTION
haveged is a random number generator daemon that feeds the Linux kernel's entropy pool (/dev/random). It uses the HAVEGE (HArdware Volatile Entropy Gathering and Expansion) algorithm, which harvests entropy from CPU timing variations.
The daemon is particularly useful for:
- Headless servers lacking traditional entropy sources (keyboard, mouse)
- Virtual machines with limited hardware entropy
- Systems requiring high-throughput random number generation
- Preventing /dev/random blocking during cryptographic operations
haveged monitors the kernel entropy pool and automatically feeds it when levels drop.
PARAMETERS
-F, --Foreground
Run in foreground (don't daemonize)-f, --file PATH
Write random data to file instead of /dev/random-r, --run LEVEL
Set run level (0=run as daemon, 1=display results)-b, --buffer SIZE
Collection buffer size in KiB words-d, --data SIZE
Cache size in KiB words-n, --number BYTES
Number of bytes to write to output-w, --write BYTES
Write BYTES to /dev/random at a time-v, --verbose LEVEL
Verbosity level
CAVEATS
Some security researchers debate HAVEGE's entropy quality on virtualized or modern CPUs with consistent timing. Consider using hardware RNG (rngd) when available. On modern kernels, /dev/random no longer blocks, reducing the need for haveged.
HISTORY
haveged was developed by Gary Wuertz based on the HAVEGE algorithm created by André Seznec and Nicolas Sendrier. It became popular for addressing entropy starvation on Linux servers and VMs.
