Haveged - ArchWiki

# Haveged

The haveged project is an attempt to provide an easy-to-use, unpredictable random number generator based upon an adaptation of the HAVEGE algorithm. Haveged was created to remedy low-entropy conditions in the Linux random device that can occur under some workloads, especially on headless servers.

Warning: The quality of the generated entropy is not guaranteed and sometimes contested (see LCE: Don't play dice with random numbers and Is it appropriate to use haveged as a source of entropy on virtual machines?). Use it at your own risk or use it with a hardware based random number generator with the rng-tools (see Alternative section)

## Alternative

This article or section is a candidate for moving to rng-tools.

Notes: different tools deserve separate page (Discuss)

Unless you have a specific reason to not trust any hardware random number generator on your system, you should try to use them with the rng-tools first and if it turns out not to be enough (or if you don't have a hardware random number generator available), then use Haveged.

Warning: The default configuration for the rngd daemon does not use any available hardware random number generator (see FS#43211 and FS#34580). Make sure to clear the `RNGD_OPTS` variable from the `/etc/conf.d/rngd` config file before starting the rngd daemon. Again: Do not use the default rngd configuration. If you don't have any hardware random number generator, use Haveged instead.

## List available entropy

If you're not sure, whether you need haveged, run:

    # cat /proc/sys/kernel/random/entropy_avail

This command shows you how much entropy your server has collected. If it is rather low (<1000), you should probably install haveged. Otherwise cryptographic applications will block until there is enough entropy available, which eg. could result in slow wlan speed, if your server is a Software access point.

You should use this command again to verify how much haveged boosted your entropy pool after the installation.

## Installation

Install the haveged package from the official repositories.

## Service

The package provides `haveged.service`, see systemd for details.

## See also

- http://www.issihosts.com/haveged
- http://www.digitalocean.com/community/tutorials/how-to-setup-additional-entropy-for-cloud-servers-using-haveged

Category:

- Security