My Favorites

Close

Please to see your favorites.


How to generate entropy in SLES 11 SP1 and Later

This document (7011351) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 11 Service Pack 1
SUSE Linux Enterprise Server 11 Service Pack 2

Situation

Installation of certain applications that use /dev/random may be slow or it may hang while generating cryptographic information.
Doing cat /dev/random returns only a few characters (instead of a constant stream).
Entropy value from command /sbin/sysctl kernel.random.entropy_avail is less than 1000.

Resolution

Starting with SLES 11 SP1 "haveged" package is the recommended way of generating entropy, this package has to be installed and enabled as shown below.  In SLES 11 SP2 "haveged" is installed and enabled by default.

Steps to install and enable haveged:

  1.   Install haveged.  e.g zypper in haveged
  2.   Start haveged. /etc/init.d/haveged start
  3.   Enable haveged to start at boot. chkconfig haveged on
  4.   Reboot the SLES server.  The boot process generates a lot of entropy.  If you reboot twice, you get even  more entropy.
  5.   Verify by doing:
cat /dev/random
You should see a continual stream of random characters.
/sbin/sysctl kernel.random.entropy_avail 
or
cat /proc/sys/kernel/random/entropy_avail
This number should be 1000+.

Additional Information

haveged should work on physical and virtual machines.

For more information see: http://www.issihosts.com/haveged/

Disclaimer

This Support Knowledgebase provides a valuable tool for NetIQ/Novell/SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7011351
  • Creation Date:12-NOV-12
  • Modified Date:13-NOV-12
    • SUSESUSE Linux Enterprise Server

Did this document solve your problem? Provide Feedback