[rhelv6-list] Random seed on stateless system

John Haxby john.haxby at gmail.com
Sun Mar 1 12:20:42 UTC 2015


On 27 February 2015 at 15:26, Andrew Ruch <adruch2002 at gmail.com> wrote:

> My concern was using the same random-seed for every boot. By using the
> same random-seed, does this cause /dev/urandom to produce the same
> sequence of random numbers, thus weakening the security posture? Is it
> better to use the same random-seed or no random-seed at all?
>
>
 I've not tried a stateless boot so I'm not certain what happens.

The random seed is used to provide some initial entropy for /dev/urandom,
it's not really a seed, it's just an extra source of entropy because normal
start-up doesn't really gather enough entropy quickly enough.   You're
certainly better off having no /var/lib/random-seed instead of a constant
one -- pretending to /dev/urandom that non-random data is random is not
good, you might as well seed from /dev/zero.

So there are a couple of things you can do.   Looking at the Debian script
(my RHEL6 machine is in bits) I notice that it uses the date and time (date
+%s.%N) in addition to the saved seed.   You could also have a random-seed
file which is periodically written on a per-host basis by something that is
able to write to it, although that's less than ideal.   If you have
sufficiently recent hardware then you can use a version of rng-tools that
can seed the kernel CPRNG from the intel HWRNG.  You could  have a program
that actually takes data from the HWRNG (suitably massaged, see rng-tools
for details) and uses that instead of /var/lib/random-seed.   You could
also get a proper HWRNG; unfortunately entropykey.co.uk haven't had any
stock for ages and onerng.info isn't shipping yet.

jch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/rhelv6-list/attachments/20150301/a93f6c25/attachment.htm>


More information about the rhelv6-list mailing list