nssec-keygen slowness
I am generating the following key through nssec-keygen (CentOS 32 bit):
dnssec-keygen -a HMAC-MD5 -b 256 -n HOST mykey
Having tested this throughout the day, most of the time this takes many minutes, but every once and again it is created immediately.
Is this time lag expected from a Cloud service like Linode?
Thanks!
5 Replies
Run this …
watch -n1 cat /proc/sys/kernel/random/entropy_avail
… while you attempt your keygen.
-Chris
> watch -n1 cat /proc/sys/kernel/random/entropy_avail
Goes from 128 - 191 while NOT running keygen.
Goes from 6 - 59 while running keygen.
On my colocated server I see that it is over 3500 when not running keygen.
So are these numbers typical for the smallest Linode?
Are the numbers affected by the processing power of the given node, or the cloud setup itself?
Thanks!
Most people just switch things to use /dev/urandom so that the key generation won't wait for "high quality" randomness. Otherwise you just need to wait it out or generate your keys somewhere besides your linode.
Personally, I'd use /dev/urandom and move on.
./dnssec-keygen -r /dev/urandom -a HMAC-MD5 -b 256 -n HOST mykey
By now I have gotten a random based key, but thanks to all for feedback. Good to learn something new!