Subject: Re: new MI/MD interface for rnd(4)
To: Colin Wood <>
From: Bill Sommerfeld <>
List: tech-kern
Date: 06/05/2000 21:05:10
> Is a 32-bit number big enough?  On a sufficiently fast IA32 processor,
> that counter (assuming you're using the timestamp counter) can overflow
> within a relatively short period of time (4s on currently shipping
> processors).  

Overflow is desired here, actually.

The point of this counter is to use it as a "roulette wheel" of sorts;
the theory behind /dev/random is that certain physical events (typing,
disk head seeks) have some amount of physical randomness underlying
them, and that a pseudodriver can collect this randomness and make it
available to applications doing cryptoish things.

> It is forseeable that it could overflow in less than a
> second on processors shipping within the next few years. I don't know
> enough about how often rnd.c samples

It happens on every interrupt/event from "interesting" devices (disk,
keyboard, mouse, ...).  the "interesting" timing parts of these events
are on the sub-millisecond levels.  We'll likely reach ready
availability on stock hardware of hardware physical random number
generators before clock speeds reach the point where this is an

					- Bill