[openssl-users] RNG behavior by default

Dr. Matthias St. Pierre Matthias.St.Pierre at ncp-e.com
Sat Jan 5 00:50:42 UTC 2019

I agree with Kurt, except for one point:

> The RAND_bytes and RAND_status manpages can clearly be improved.

Both manpages got an update during the DRBG rewrite (by me) and I don't
see any contradiction. You bring it to the point yourself:

> So _IF_ it is seeded it is seeded...

It is true that the DRBG will automatically seed, but it is equally true
that it can still end up in an unseeded (error) state, if no suitable entropy
source is available. And since this can also happen during reseeding (which
in particular is enforced after a fork), it is always necessary to check the return
value of the RAND_bytes() function. Because in the error state, the buffer is not
filled at all.


More information about the openssl-users mailing list