Re: RNG: is it possible to spoil /dev/random by seeding it from(evil) TRNGs

From: Theodore Ts'o
Date: Thu Oct 04 2012 - 18:49:39 EST


On Thu, Oct 04, 2012 at 03:32:35PM +0200, Christoph Anton Mitterer wrote:
>
> When seeding the kernels entropy cache (which is then ultimately used
> for /dev/random), e.g. by (semi-)TRNGs like haveged[0],
> audio-entropyd[1], Simtecâs Entropy Key[2] or friends... can one spoil
> the randomness by that or is this impossible by design?

It is impossible by design. Or specifically, /dev/random was designed
so that it can be world-writeable, and an attacker can feed in any
kind of input he or she wants, and it will not allow the attacker to
know anything more about the state of the entropy pool than he or she
knew before they started mixing inputs in.

There are comments that go into more detail about the design in
drivers/char/random.c. Credit for the design goes to Colin Plumb, who
designed RNG in the original PGP 2.x implementation, BTW.

- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/