1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-29 02:22:45 +02:00
gnupg/cipher
Werner Koch 93a96e3c0c Use blinding for the RSA secret operation.
* cipher/random.c (randomize_mpi): New.
* g10/gpgv.c (randomize_mpi): New stub.
* cipher/rsa.c (USE_BLINDING): Define macro.
(secret): Implement blinding.
--

GPG 1.x has never used any protection against timing attacks on the
RSA secret operation.  The rationale for this has been that there was
no way to mount a remote timing attack on GnuPG.  With the turning up
of Acoustic Cryptanalysis (http://cs.tau.ac.il/~tromer/acoustic) this
assumption no longer holds true and thus we need to do do something
about it.  Blinding seems to be a suitable mitigation to the threat of
key extraction.  It does not help against distinguishing used keys,
though.

Note that GPG 2.x uses Libgcrypt which does blinding by default.

The performance penalty is negligible: Modifying the core pubkey_sign
or pubkey_decrypt function to run 100 times in a loop, the entire
execution times for signing or decrypting a small message using a 4K
RSA key on a Thinkpad X220 are

  Without blinding:  5.2s  (8.9s)
  With blinding:     5.6s  (9.3s)

The numbers in parentheses give the values without the recently
implemented k-ary exponentiation code.  Thus for the next release the
user will actually experience faster signing and decryption.  A
drawback of blinding is that we need random numbers even for
decryption (albeit at low quality).

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

CVE-id: CVE-2013-4576
2013-12-03 09:25:57 +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 Switched to GPLv3. 2007-10-23 10:48:09 +00:00
camellia-glue.c Add Camellia-192. 2008-04-17 17:40:30 +00:00
camellia.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
camellia.h Switched to GPLv3. 2007-10-23 10:48:09 +00:00
cast5.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
ChangeLog-2011 Rename all ChangeLog files to ChangeLog-2011. 2011-12-02 19:42:56 +01:00
cipher.c Add Camellia-192. 2008-04-17 17:40:30 +00:00
des.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
dsa.c Switched to GPLv3. 2007-10-23 10:48:09 +00: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 Switched to GPLv3. 2007-10-23 10:48:09 +00: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
Makefile.am Support the not anymore patented IDEA cipher algorithm. 2012-11-08 13:25:02 +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 Updated ZH po file. 2007-12-12 18:26:25 +00:00
rand-internal.h The rest of the VMS changes. 2010-09-28 15:55:24 +00:00
random.c Use blinding for the RSA secret operation. 2013-12-03 09:25:57 +01:00
random.h Use blinding for the RSA secret operation. 2013-12-03 09:25:57 +01:00
rijndael.c Fix aliasing problem. 2011-08-09 10:54:02 +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 Typo fixes and comment re-formatting. 2012-01-12 11:47:35 +01:00
rndriscos.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
rndunix.c Revert that last stupid setuid detection fix. 2008-07-17 19:47:19 +00:00
rndw32.c Fix typos in comments. 2012-01-24 09:48:17 +01:00
rsa.c Use blinding for the RSA secret operation. 2013-12-03 09:25:57 +01:00
rsa.h Switched to GPLv3. 2007-10-23 10:48:09 +00:00
sha1.c Switched to GPLv3. 2007-10-23 10:48:09 +00: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 * algorithms.h, cast5.c, cipher.c, idea-stub.c, twofish.c, blowfish.c, 2004-10-12 17:35:50 +00:00