diff options
author | Werner Koch <wk@gnupg.org> | 2015-05-04 16:46:02 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2015-05-21 16:52:01 +0200 |
commit | 8124e357b732a719696bfd5271def4e528f2a1e1 (patch) | |
tree | ab19f9729d6a264511acd86c68ce8d26ac3f72c9 /random | |
parent | 9b0c6c8141ae9bd056392a3f6b5704b505fc8501 (diff) | |
download | libgcrypt-8124e357b732a719696bfd5271def4e528f2a1e1.tar.gz |
random: Change initial extra seeding from 2400 bits to 128 bits.
* random/random-csprng.c (read_pool): Reduce initial seeding.
--
See discussion starting at
https://lists.gnupg.org/pipermail/gnupg-devel/2015-April/029750.html
and also in May.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'random')
-rw-r--r-- | random/random-csprng.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/random/random-csprng.c b/random/random-csprng.c index 332744ba..da50fda7 100644 --- a/random/random-csprng.c +++ b/random/random-csprng.c @@ -973,8 +973,8 @@ read_pool (byte *buffer, size_t length, int level) pool_balance = 0; needed = length - pool_balance; - if (needed < POOLSIZE/2) - needed = POOLSIZE/2; + if (needed < 16) /* At least 128 bits. */ + needed = 16; else if( needed > POOLSIZE ) BUG (); read_random_source (RANDOM_ORIGIN_EXTRAPOLL, needed, |