/dev/random and /dev/psaux: too much entropy assumed?

Florian Weimer (fw@cygnus.stuttgart.netsurf.de)
30 May 1999 19:43:47 +0200


Using a small test program which first reads all pending data on
/dev/random, and, after that, reads byte by byte from /dev/random and
counts the total number of interrupts occurred (summing up the second
column in /proc/interrupts) until a timeout occurs, I obtained the
following interesting results:

First run: single-user mode, no activity during the sampling phase:

Sampling time: 15.006219 (in seconds)
Interrupts: 1501
Random bits: 0

(The 1501 interrupts are probably timer interrupts.)

Second run: single-user mode, cat < /dev/psaux > /dev/null was running
in the background, I kept moving the mouse during the sampling phase:

Sampling time: 15.000942
Interrupts: 5931
Random bits: 40216

After subtracting the timer interrupts, we get an average of over
nine bits added on each /dev/psaux interrupt to the /dev/random pool.
I don't think that there is that much entropy involved to justify this
high value.

The same might be the case for other interrupts, but I haven't looked
at them.

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