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: Do not 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)

Installation

Install the haveged package.

Start and enable haveged.service.

List available entropy

If you are 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.

Alternative

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 do not have a hardware random number generator available), then use Haveged.

Virtual machines

As discussed at Is it appropriate to use haveged as a source of entropy on virtual machines?, it can be contested whether haveged provides quality entropy within a virtual environment. Haveged relies on the rdtsc instruction, which may be virtualized within a virtual machine resulting in lower quantity entropy. On some hypervisors, it is possible to disable the virtualization of rdtsc, which would in theory allow haveged to provide higher quality entropy.

To disable the virtualization of the rdtsc instruction in VMware ESXi, add the setting monitor_control.virtual_rdtsc = "FALSE" to the virtual machine’s .vmx configuration file. VMware recommends the setting for use when performing measurements that require a precise source of real time in the virtual machine.

gollark: School is nigh. Nobody is safe.
gollark: Troubling.
gollark: <@332271551481118732> review draft:```Dear Mrs McGough,Given the current pandemic situation, and the school's mitigations to deal with this, I think it would be sensible to consider allowing sixth-form students (and potentially others) to remote-learn a few (2?) days a week.The new policies, such as staying in fixed areas of the school, shortened lunch breaks, the lack of vending machine access, and extracurricular activities being rescheduled, while necessary to ensure safety, seem as if they will introduce significant hassle and complexity to life at school.I think that part-time remote learning is a decent partial solution to this, with additional benefits like keeping possible virus spread even lower due to fewer people being physically present. While it could introduce additional work for teachers, they may have to prepare work for those out of school due to the virus anyway, and sixth form is apparently meant to include more self-directed work than other school years.Please consider my suggestion,Oliver Marks```
gollark: Rust isn't as popular.
gollark: No, Ferris has been around for years, and also ew.

See also

This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.