Veldkornet
Senior Member
Hey guys,
I was wondering what everyone's thoughts were around the routers default entropy levels?
While I understand that my home router is not exactly an enterprise web server or anything, would it not be better to have better entropy on the router? Even if it's just for the SSH keys etc?
Out of interest, I was watching the entropy with the below:
I noticed that it constantly hovered around 130-180. Usually it's advised to keep this above 200, although personally I think that even that's a bit low and usually keep my devices in the high 1000's at minimum.
For those who don't know, entropy is s like a pool of random numbers (/dev/random) that are mainly used in cryptography. A lack of entropy can have a negative impact on performance and security.
I'm not sure if there is a hardware module available on the router for this, but usually an easy way is to just use something like haveged or rng-tools (i.e. rngd), to keep the pool in healthy levels by just setting the service to read from /dev/urandom and writing to /dev/random.
I've done something similar to the above to fix the entropy on my RaspberryPi's as well:
*Edit, I see rng-tools is already available in OpenWRT and entware, so I've put in a request at entware-ng. On my OpenWRT router the entropy is now close to 4000 constantly with the below config (which was default), much better
I was wondering what everyone's thoughts were around the routers default entropy levels?
While I understand that my home router is not exactly an enterprise web server or anything, would it not be better to have better entropy on the router? Even if it's just for the SSH keys etc?
Out of interest, I was watching the entropy with the below:
Code:
watch -n 1 cat /proc/sys/kernel/random/entropy_avail
I noticed that it constantly hovered around 130-180. Usually it's advised to keep this above 200, although personally I think that even that's a bit low and usually keep my devices in the high 1000's at minimum.
For those who don't know, entropy is s like a pool of random numbers (/dev/random) that are mainly used in cryptography. A lack of entropy can have a negative impact on performance and security.
I'm not sure if there is a hardware module available on the router for this, but usually an easy way is to just use something like haveged or rng-tools (i.e. rngd), to keep the pool in healthy levels by just setting the service to read from /dev/urandom and writing to /dev/random.
I've done something similar to the above to fix the entropy on my RaspberryPi's as well:
*Edit, I see rng-tools is already available in OpenWRT and entware, so I've put in a request at entware-ng. On my OpenWRT router the entropy is now close to 4000 constantly with the below config (which was default), much better
Code:
#!/bin/sh /etc/rc.common
# Copyright (C) 2011-2014 OpenWrt.org
START=98
RNGD_INTERVAL=30
RNGD_AMOUNT=4000
RNGD_DEVICE="/dev/urandom"
start() {
service_start /sbin/rngd -r $RNGD_DEVICE -W $RNGD_AMOUNT
}
stop() {
service_stop /sbin/rngd
}
Last edited: