Re: Problem with random.c and PPC

Oliver Xymoron (oxymoron@waste.org)
Mon, 19 Aug 2002 11:33:30 -0500


On Mon, Aug 19, 2002 at 06:20:14PM +0200, Marco Colombo wrote:
>
> We're never "discarding" entropy. We're just feeling more and more
> confortable in saying we've stored 'poolsize' random bits.

Yes we are. The pool can only hold n bits. If it's full and we mix in
m more bits, we're losing m bits in the process.

> But what you say is definitely true... on my desktop system I only need
> to move the mouse a couple of times to fill the pool completely in a
> matter of seconds.

Heh. That's actually a bug. Your mouse movement is only giving the
system a few hundred bits of entropy (by the current code's
measurements), but /dev/random will give out thousands.

Note that above a certain velocity, mouse samples are back to back
characters on the serial port (or packets in the keyboard controller),
so most of the timing entropy is in the early acceleration or during
direction changes.

> I see little convenience in having /dev/urandom semantic in the kernel
> (besides the fact it's already there, of course).

The kernel uses it internally for numerous things like sequence
numbers, syncookies, and UUIDs. So it doesn't take much to justify
exporting it..

-- 
 "Love the dolphins," she advised him. "Write by W.A.S.T.E.." 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/