Re: /dev/random oddness

From: Michel LESPINASSE (walken@windriver.com)
Date: Tue Feb 01 2000 - 20:44:25 EST


On Tue, 1 Feb 2000, Russell King wrote:

> On the thinkpad, doing an 'od -t x1 -Ax /dev/random' and moving the
> mouse in a console results in a lot of bytes being generated from the
> device. However, on a NetWinder, it results in very few, less than
> 1/10th of what the x86 machine produces.

On x86, the random driver is using the cpu clock cycle counter to check
the times where bytes are received from the mouse port. Because this
counter has a very high precision, its lower order bits can be considered
as unpredictable.

On other architectures, it is only the jiffy counter that is used by the
random driver, and it contains much less entropy.

I think this was mentionned in the recent thread about the intel 810 rng.
It should not be very hard to fix if the arm has a cycle counter too. Your
patch would probably be welcome :)

--
Michel "Walken" LESPINASSE - Development Engineer at Wind River Systems
"We've all heard that a million monkeys banging on a million typewriters
 will eventually reproduce the entire works of Shakespeare.
 Now, thanks to the Internet, we know this is not true."

- 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/



This archive was generated by hypermail 2b29 : Mon Feb 07 2000 - 21:00:07 EST