Re: Why does reading from /dev/urandom deplete entropy so much?

Phillip Susi
2007-12-26T18:28:10Z

Marc Haber wrote:
> On Tue, Dec 11, 2007 at 10:42:49AM -0500, Bill Davidsen wrote:
>> The original point was that urandom draws entropy from random, and that
>> it is an an inobvious and unintentional drain on the entropy pool. At
>> least that's how I read it.
>
> And you are reading it correct. At least one of the major TLS
> libraries does it this way, putting unnecessary stress on the kernel
> entropy pool. While I now consider this a bug in the library, there
> surely are gazillions of similiarily flawed applications out there in
> the wild.

It seems to me that reading from (u)random disturbs the entropy pool, so
the more consumers reading from the pool in unpredictable ways, the
better. As it is currently implemented, it lowers the entropy estimate,
but the pool will have MORE entropy if several applications keep reading
/dev/random periodically when they need random bytes instead of just
reading it once to seed their own prng. IMHO, it is the entropy
estimate that is broken, not the TLS library.