guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Seeding the Linux RNG at first boot


From: Leo Famulari
Subject: Re: Seeding the Linux RNG at first boot
Date: Thu, 7 Dec 2017 18:47:49 -0500
User-agent: Mutt/1.9.1 (2017-09-22)

On Thu, Dec 07, 2017 at 10:07:38PM +0100, Ludovic Courtès wrote:
> Leo Famulari <address@hidden> skribis:
> > On the guest side, we would extend urandom-seed-service to also draw on
> > /dev/hwrng, which is where virtio-rng-pci makes the data from the host
> > available.
> 
> Maybe ‘virtualized-operating-system’ in (gnu system vm) could
> automatically customize ‘rngd-service-type’ (or add it)?

Yes, we could do that, although I don't think it's necessary to run a
daemon continuously. It is enough to seed the RNG once.

At the same time we handle the random seed, we could also try reading
from /dev/hwrng and, if the read is successful, copy some bytes into
/dev/urandom. We'd have to try reading and handle failure since we
always create /dev/hwrng regardless of whether the Linux kernel module
is loaded or not.

> > I have an idea for another improvement: to add an argument like
> > "--entropy-seed=" to `guix system` that could place the value in
> > '/var/lib/random-seed', where it would be used on first boot.
> 
> We could do that, though I very much prefer the idea of a “backdoor” à
> la virtio-rng-pci, because it allows to stick to bit-reproducible images
> (well, they’re not bit-reproducible yet I suppose, but let’s not add to
> it.)

I think it would be most useful for disk images, for which there is no
host.

If one always passes the same value to --entropy-seed, it will not
negatively affect the reproducibility of the image ;)

This would not be something we do for the official release image, but
merely an optional tool.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]