gnupg/cipher
Werner Koch c6dbfe8990
random: Hash continuous areas in the csprng pool.
* cipher/random.c (mix_pool): Store the first hash at the end of the
pool.
--

This fixes a long standing bug (since 1998) in Libgcrypt and GnuPG.
An attacker who obtains 580 bytes of the random number from the
standard RNG can trivially predict the next 20 bytes of output.

This bug does not affect the default generation of
keys because running gpg for key creation creates at most 2 keys from
the pool: For a single 4096 bit RSA key 512 byte of random are
required and thus for the second key (encryption subkey), 20 bytes
could be predicted from the the first key.  However, the security of
an OpenPGP key depends on the primary key (which was generated first)
and thus the 20 predictable bytes should not be a problem.  For the
default key length of 2048 bit nothing will be predictable.

For the former default of DSA+Elgamal key it is complicate to give an
answer: For 2048 bit keys a pool of 30 non-secret candidate primes of
about 300 bits each are first created.  This reads at least 1140 bytes
from the pool and thus parts could be predicted.  At some point a 256
bit secret is read from the pool; which in the worst case might be
partly predictable.

The bug was found and reported by Felix Dörre and Vladimir Klebanov,
Karlsruhe Institute of Technology.  A paper describing the problem in
detail will shortly be published.

CVE-id: CVE-2016-6313
Signed-off-by: Werner Koch <wk@gnupg.org>
2016-08-17 11:15:50 +02:00
..
ChangeLog-2011 Rename all ChangeLog files to ChangeLog-2011. 2011-12-02 19:42:56 +01:00
Makefile.am Support the not anymore patented IDEA cipher algorithm. 2012-11-08 13:25:02 +01:00
algorithms.h Improved AES performance. 2008-03-22 17:01:37 +00:00
bithelp.h Switched to GPLv3. 2007-10-23 10:48:09 +00:00
blowfish.c Fix possible sign extension problem with newer compilers. 2016-02-01 18:15:28 +01:00
camellia-glue.c Add Camellia-192. 2008-04-17 17:40:30 +00:00
camellia.c Fix possible sign extension problem with newer compilers. 2016-02-01 18:15:28 +01:00
camellia.h Switched to GPLv3. 2007-10-23 10:48:09 +00:00
cast5.c Fix possible sign extension problem with newer compilers. 2016-02-01 18:15:28 +01:00
cipher.c Clean up "allow to" 2016-08-04 12:37:41 +02:00
des.c Fix spelling: "occured" should be "occurred" 2016-08-04 12:37:34 +02:00
dsa.c Normalize the MPIs used as input to secret key functions. 2013-12-03 09:26:04 +01:00
dsa.h Switched to GPLv3. 2007-10-23 10:48:09 +00:00
dynload.c Removed some set but unused vars. 2011-08-09 10:54:22 +02:00
elgamal.c Use ciphertext blinding for Elgamal decryption. 2015-02-11 20:04:58 +01:00
elgamal.h Switched to GPLv3. 2007-10-23 10:48:09 +00:00
gost.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
gost.h Switched to GPLv3. 2007-10-23 10:48:09 +00:00
idea.c Fix idea.c for big endian CPUs. 2013-01-11 15:10:38 +01:00
md.c Use gcc pragmas to suppress some warnings. 2012-01-10 11:31:00 +01:00
md5.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
primegen.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
pubkey.c Clean up "allow to" 2016-08-04 12:37:41 +02:00
rand-internal.h The rest of the VMS changes. 2010-09-28 15:55:24 +00:00
random.c random: Hash continuous areas in the csprng pool. 2016-08-17 11:15:50 +02:00
random.h Use blinding for the RSA secret operation. 2013-12-03 09:25:57 +01:00
rijndael.c Fix strict-alias warnings for rijndael.c 2014-08-20 12:22:35 +02:00
rmd.h Switched to GPLv3. 2007-10-23 10:48:09 +00:00
rmd160.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
rmd160test.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
rndegd.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
rndlinux.c Fix a problem with select and high fds. 2015-01-19 16:46:05 +01:00
rndriscos.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
rndunix.c Fix possible AIX problem with sysconf in rndunix. 2016-01-15 15:52:11 +01:00
rndw32.c Fix typos in comments. 2012-01-24 09:48:17 +01:00
rsa.c Obsolete option --no-sig-create-check. 2015-09-01 07:47:14 +02:00
rsa.h Switched to GPLv3. 2007-10-23 10:48:09 +00:00
sha1.c Add convenience function to hash a buffer. 2015-02-26 15:35:49 +01:00
sha256.c * sha256.c (sha224_get_info): 4880 has an error in the SHA-224 OID and 2007-11-28 23:00:11 +00:00
sha512.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
smallprime.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
twofish.c Fix possible sign extension problem with newer compilers. 2016-02-01 18:15:28 +01:00