Messages in this thread |  | | Date | Tue, 12 Nov 2013 23:37:02 -0500 | From | Greg Price <> | Subject | Re: [PATCH 00/11] random: code cleanups |
| |
On Tue, Nov 12, 2013 at 08:02:09PM -0800, H. Peter Anvin wrote: > One thing, too, if we are talking about anything other than > boot-time-only blocking: going from a nonblocking to a blocking > condition means being able to accept a short read, and right now *many* > users of /dev/urandom are not ready to accept a short read.
I'm thinking only of boot-time blocking. The idea is that once /dev/urandom is seeded with, say, 128 bits of min-entropy in the absolute, information-theoretic sense, it can produce an infinite supply (or something like 2^128 bits, which amounts to the same thing) of bits that can't be distinguished from random, short of breaking or brute-forcing the crypto. So once it's seeded, it's good forever.
We don't even strictly need to keep adding more entropy once it's seeded, but it's good because (a) hey, it's cheap, (b) entropy estimation is hard, and maybe in some situations we're too optimistic and think we're well seeded before we really are, (c) some cryptographers like to imagine having a PRNG recover from an attacker learning its internal state by using fresh entropy. Other cryptographers think (c) is a little silly because an attacker that can do that can probably keep doing it, or take over the machine entirely, but it's not inconceivable, and there's (a) and (b). So we keep adding entropy when we have it, but if we don't have new entropy for a long time there's no need to start blocking again.
Cheers, Greg
|  |