1# Entropy 2 3Generating cryptographic keys needs a lot of entropy. Especially `gnupg --gen-key` 4depletes the kernel entropy pool (`/dev/random`) quite fast and may appear to be 5stuck when it's waiting for new entropy. 6 7If you wonder how to speed this up consider installing `rng-tools` 8if this is available on your platform. 9 10After installing `rng-tools` please make sure `rngd` is actually running and 11replenishing your entropy pool. 12 13You can do so by keeping a watch on your available entropy and running an entropy 14consuming process as follows: 15 16```bash 17watch -n1 cat /proc/sys/kernel/random/entropy_avail 18# switch to another terminal / screen 19cat /dev/random | rngtest -c 1000 20``` 21 22The second command should complete within a few seconds and report no errors. 23If it takes much longer you probably don't have an hardware RNG and will have 24to generate some entropy by triggering some network activity and input. 25 26You should avoid `havaged`. 27 28### Debian / Ubuntu 29 30```bash 31sudo apt-get install rng-tools 32``` 33 34### CentOS / Fedora / Red Hat 35 36```bash 37sudo yum install rng-tools 38``` 39 40## Further Information 41 42* [RNG-Tools on the Arch Linux Wiki](https://wiki.archlinux.org/index.php/Rng-tools) 43* [gopass Issue #486](https://github.com/gopasspw/gopass/issues/486) 44