[botan-devel] Tmp dir used as an entropy source

Jack Lloyd lloyd at randombit.net
Tue Nov 5 18:58:53 EST 2013

On Wed, Sep 04, 2013 at 10:05:23PM +0000, Rickard Bellgrim wrote:
> Thank you Jack, for an excellent answer. We will see where this
> discussion will end on the OpenDNSSEC mailing list.
> One of our users noticed that the Unix commands were executed even
> if the /dev/random had a good pool of entropy. So I looked into the
> code of the Device_EntropySource and may have seen some issues with
> the code.
> Can't it be cases where you try to read e.g. 32 bytes from
> /dev/random, but only get back e.g. 20 bytes? The
> Device_EntropySource::poll() will only check that we got data back,
> but not how much. It will then break out from the for-loop and never
> try the other devices like /dev/urandom. Shouldn't the code check if
> the entropy goal has been fulfilled before breaking out of the
> for-loop?

Thanks for pointing this out. The default preference list has
/dev/random first after 1.10.2 and could break out having read only a
few bytes.

I've changed the entropy source to instead read from all available
devices; so effectively, always the full amount from /dev/urandom and
as much as is curently available from any blocking sources.


More information about the botan-devel mailing list