[PATCH]: New implementation for /dev/[u]random

Corinna Vinschen vinschen@cygnus.com
Mon Jul 24 04:43:00 GMT 2000


Hi all,

I have checked in a patch which changes the implementation
of /dev/random and /dev/urandom as follows:

- If initialization of the system crypto provider or retrieving
  the entropy source fails, reading from /dev/random fails as well.

- If that happens when using /dev/urandom, a pseudo random number
  generator (the same as used in DJGPP) is used as a fallback
  entropy source.

- In either case it's now possible to thrill the entropy source
  (system _and_ pseudo) by writing to the device.

The difference in handling /dev/random in contrast to /dev/urandom
is reasoned by it's purpose as a source for "very high quality 
randomness" as it's described in the Linux man page random(4)
while /dev/urandom is explicitly allowed to use a substitute.

For clearness: `sshd' uses /dev/urandom so it should work now under
any circumstances.

Corinna

-- 
Corinna Vinschen
Cygwin Developer
Cygnus Solutions, a Red Hat company


More information about the Cygwin-developers mailing list