Hi,
I am trying to use gcrypt RNG for generating volume key.
In principle, it is long-term key, so GCRY_VERY_STRONG_RANDOM should be used.
I cannot use seed file - RNG is called during system installation.
So the libgcrypt must initialise random pool for very strong RNG.
But initialisation _requires_ POOLSIZE/2 (300 bytes) reads from /dev/random.
In fact, I need only 256/512bits key from here(64bytes).
So seeding 300 bytes from /dev/random is required for 64 bytes output...
The problem is, that on most systems this takes very long time
because there is not enough entropy sources for so many random data.
Easy to see problem even with benchmark:
time tests/benchmark strongrandom
random 30ms
real 1m45.888s
user 0m0.035s
sys 0m0.037s
Isn't possible to add some pool limiting function which will require
adequate seed reads from /dev/random if application needs only exact amount
of very strong RNG data?