[Cerowrt-devel] How to get enough entropy in an embedded router (was Re: cerowrt-3.10.13-2 released)
dave.taht at gmail.com
Thu Oct 10 11:39:46 EDT 2013
On Tue, Oct 1, 2013 at 7:28 AM, Török Edwin <edwin+ml-cerowrt at etorok.net> wrote:
> On 10/01/2013 04:42 PM, Dave Taht wrote:
>> + Proved it is possible to build an OS release on a "Narrowboat"
>> - but not test one without hacking at the 12v power supply off the solar panel
>> + merge with openwrt head
>> + dnsmasq 2.67test17
>> + ipv6subtrees now part of 3.10.12
>> + htb adsl fixes also
>> + Simon kelly is starting to finalize dnsmasq 2.67 now that summer is over
>> - still no fix for the sysupgrade bug
>> - Most of the get_cycles() and /dev/random keruffle has settled down
>> but I did not fold the latest patchset for that into this. The
>> discussion on PRNGs was very illuminating and worth reading.There were
>> multiple threads on this topic on lkml, this is one:
> Does this mean that we can get rid of running rngd the wrong way? 
rngd can be disabled via /etc/init.d/rngd disable; /etc/init.d/rngd stop
Along the way in this keruffle I saw someone using mrtg + a snmpd
script to track
available entropy, which strikes me as useful, but lacking that you can look at:
The picture for entropy looks pretty dim with the current kernel,
available entropy_avail with rngd disabled oscillates between 132 and
190 on the box I just tested on, which was basically an idle machine.
I look forward to sorting out the new patchset which fixes
get_cycles() on mips, when it stablizes a bit more, but more entropy
sources for this and many other embedded arches seem required to keep
up with the demands for it.
>  Currently cerowrt runs rngd -r /dev/urandom, which is exactly what should not be done
> ,as it would essentially make /dev/random non-blocking like /dev/urandom and fool userspace into generating keys without enough entropy, etc.:
Many embedded OSes (not just openwrt) are using rngd that way as there
is a paucity of entropy sources regardless.
The majority of the patches under discussion on the lkml thread above
increase the quality of the existing entropy, but not the quantity.
An embedded router needs entropy for initial key generation for the
web cert and ssh key. At this point I'm prepared to argue that it
should try to regenerate those a few hours after first boot...
It also needs ongoing entropy for wireless encryption, ssl connections
to the web browser, ssh connections, vpns, etc. For which we need to
measure peak entropy consumption in a world of wpa, people attacking
dropbear (which, unlike openwrt in cerowrt spawns from xinetd), and
the web configuration server, and full on vpn usage....
Getting to where we have enough entropy out of the box would be great,
but I just don't think we can get there with out a hwrng which this
atheros chipset lacks. Maybe some wifi registers can be sampled,
> Best regards,
> Cerowrt-devel mailing list
> Cerowrt-devel at lists.bufferbloat.net
Fixing bufferbloat with cerowrt: http://www.teklibre.com/cerowrt/subscribe.html
More information about the Cerowrt-devel