monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] non_blocking_rng_ok hook no longer used


From: Jack Lloyd
Subject: [Monotone-devel] non_blocking_rng_ok hook no longer used
Date: Thu, 16 Feb 2006 21:30:13 -0500
User-agent: Mutt/1.5.10i

I've been digging around in Monotone trying to get a handle on the
architecture, and noticed that the non_blocking_rng_ok hook seems to have
vanished. Still documented, and the hook itself exists, but the return value is
never used. Probably this was lost in the Crypto++->Botan conversion. I believe
the code to do this is:

   Botan::Config::set("rng/es_files",
                      (hook_non_blocking_rng_ok() ?
                         "/dev/urandom" : "/dev/random"));

However, I couldn't figure out where this could be safely called (at least in
the ~10 minutes I looked). From Botan's perspective, this can be called
anytime, though you would really want to call it before Botan is initialized,
since that is where the majority of the PRNG seeding actually occurs.

Another method might be to unconditionally use /dev/urandom at initialization
time, and if a blocking RNG is requested then reseed using /dev/random. Due to
a design flaw in the entropy collection code, you would have to jump through a
hoop or two to get this to work correctly, but nothing drastic. If anyone
thinks this is a good idea I can elaborate further.

TBH I think the simplest thing to do is remove the hook, or at least note in
the docs that it is currently ignored, and just leave it at that.

-Jack




reply via email to

[Prev in Thread] Current Thread [Next in Thread]