Home GnuPG

random: Add more bytes to the pool in addition to the seed file.

Description

random: Add more bytes to the pool in addition to the seed file.

* random/random-csprng.c (read_seed_file): Read 128 or 32 butes
depending on whether we have the Jitter RNG.

These are actually 3 changes:

  • We use GCRY_STRONG_RANDOM instead GCRY_WEAK_RANDOM, which we used for historical reasons. However the entropy gather modules handle both identical; that is reading from /dev/urandom. Only GCRY_VERY_STRONG_RANDOM would use a blocking read from /dev/random.
  • We increase the number of extra buts from 128 or 256.
  • If the Jitter RNG is available we assume that a fast entropy source is available and thus we read 4 times more entropy (1024 bits).

Note that on Windows GnuPG tests in DE-VS mode that the Jitter RNG is
available and properly working. Thus we will add 1024 bits in
addition to the state read from the seed file.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Jul 28 2017, 3:31 PM
Parents
rC94a92a3db909: Add script to run basic tests with all supported HWF combinations
Branches
Unknown
Tags
Unknown