Haveged (Русский)

From ArchWiki
Jump to: navigation, search
Состояние перевода: На этой странице представлен перевод статьи Haveged. Дата последней синхронизации: 2017-08-17. Вы можете помочь синхронизировать перевод, если в английской версии произошли изменения.

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[broken link: invalid section] section)


Установите пакет haveged.

Запустите и включите сервис haveged.service.

Просмотр энтропии

Если вы не уверены, нужен ли haveged, запустите:

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

Эта команда покажет количество собранной на сервере энтропии. Если её мало (<1000), то следует установить haveged. Иначе криптографические приложения не будут работать до тех пор, пока не будет достаточно энтропии. К примеру, может быть понижена скорость соединения в случае, если сервер используется в качестве программной точки доступа.

Вы можете запустить эту команду до и после установки Haveged, чтобы убедиться в возросшей энтропии.


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.

Виртуальные машины

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. [1]

Смотрите также