[gnutls-dev] Re: alternative /dev/random

Nikos Mavrogiannopoulos nmav at gnutls.org
Sat Mar 4 12:31:47 CET 2006

On Fri 03 Mar 2006 05:00, Travis H. wrote:

> > That would be trully a good idea. Of course you have to define
> > your semantics, for random numbers, and try to emulate them using
> > each host's available devices. Otherwise it would be unknown what
> > to expect in every system. The problem in a library like that would
> > be the emulation of these devices in systems that don't support
> > them, and then you have to think about thread safety, forks (that
> > might lead to producing the same numbers etc)... It sounds like
> > lots of work... :)
> Yes, well, I'd start by simply throwing an exception if the host OS
> doesn't support what you requested, but obviously I'd want to emulate
> eventually.
> Of course, you can always create a PRNG with real random numbers, but
> one cannot go the other direction.  So, FreeBSD could not have a
> "really random" device.

I wouldn't name /dev/random of Linux a real random device. It does
have some way to count entropy and block if it thinks the entropy is
low, but I wouldn't trust it more than any other decent CPRNG.

Nikos Mavrogiannopoulos

More information about the Gnutls-devel mailing list