2001-10-01 20:54:40

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH][RFC] Allow net devices to contribute to /dev/random

Hi!

> > Here is my reasoning. I'd like to quote drivers/char/random.c:
> > * add_interrupt_randomness() uses the inter-interrupt timing as random
> > * inputs to the entropy pool. Note that not all interrupts are good
> > * sources of randomness! For example, the timer interrupts is not a
> > * good choice, because the periodicity of the interrupts is too
> > * regular, and hence predictable to an attacker. Disk interrupts are
> > * a better measure, since the timing of the disk interrupts are more
> > * unpredictable.
> > *
> > * All of these routines try to estimate how many bits of randomness a
> > * particular randomness source. They do this by keeping track of the
> > * first and second order deltas of the event timings.
>
> Obviously the timer interrupt would be the worst idea ever. Its the
> same value (HZ) on almost all versions of Linux (Alpha being on example
> where it is not the same).

Actually, not quite. On 2.4.9 system, console kept interrupts disabled
for so long that timer interrupt was pretty good source of randomness.

Pavel
--
I'm [email protected]. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at [email protected]


2001-10-01 21:33:49

by Robert Love

[permalink] [raw]
Subject: Re: [PATCH][RFC] Allow net devices to contribute to /dev/random

On Mon, 2001-10-01 at 10:43, Pavel Machek wrote:
> > Obviously the timer interrupt would be the worst idea ever. Its the
> > same value (HZ) on almost all versions of Linux (Alpha being on example
> > where it is not the same).
>
> Actually, not quite. On 2.4.9 system, console kept interrupts disabled
> for so long that timer interrupt was pretty good source of randomness.

That is pretty sad, to be honest :)

Besides, on some systems interrupts may rarely be disabled -- its too
hard to tell. We don't want another config option, do we? :)

Also, 2.4.10 merged Andrew Morton's console-locking patch, so one can
hope the console's latency is improved.

--
Robert M. Love
rml at ufl.edu
rml at tech9.net