Re: /dev/random vs. /dev/urandom

Andrea Arcangeli
2005-01-11T14:38:50Z

On Mon, Jan 10, 2005 at 07:41:02AM -0500, linux-os wrote:
> one could AND with 0 and show that all randomness has been removed.

Zero removes all bits so it's a special case.

As long as 1 bit is left coming from /dev/*random and not your
application, you're guaranteed that single bit to be random (since you
didn't mask it).

It's like if I read 100 bytes from /dev/random and then I truncate the
last 99 and it'll be as random as reading a single byte. Random means
all single bits are random too, not only the entire bytes.