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

From: Andrea Arcangeli
Date: Tue Jan 11 2005 - 09:42:16 EST


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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/