1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-11-04 20:38:50 +01:00
gnupg/mpi
Werner Koch 9dc6dd0572 Fix bug in mpi_tdiv_q_2exp.
* mpi/mpi-internal.h (MPN_COPY_INCR): Make it work.
--

This bug has been with us since the version 0.0.0 of GnuPG.
Fortunately it only affects an optimized code path which is rarely
used in practice: If the shift size matches the size of a
limb (i.e.. 32 or 64); this is is_prime in primegen.c.  Over there the
Rabin-Miller test may fail with a probability of 2^-31 (that is if the
to be tested prime - 1 has the low 32 bits cleared).  In practice the
probability is even much less because we first do a Fermat test on the
randomly generated candidates which sorts out the majority of
composite numbers.

The bug in MPN_COPY_INCR was found by Sven Bjorn.

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

(back ported from Libgcrypt
 commit 7f7a5ef59962ae1a819b5060f9b781469bfe27d5)
2013-09-16 15:57:01 +02:00
..
alpha Switched to GPLv3. 2007-10-23 10:48:09 +00:00
generic Switched to GPLv3. 2007-10-23 10:48:09 +00:00
hppa Switched to GPLv3. 2007-10-23 10:48:09 +00:00
hppa1.1 Switched to GPLv3. 2007-10-23 10:48:09 +00:00
i386 Switched to GPLv3. 2007-10-23 10:48:09 +00:00
i586 Switched to GPLv3. 2007-10-23 10:48:09 +00:00
m68k Switched to GPLv3. 2007-10-23 10:48:09 +00:00
mips3 Switched to GPLv3. 2007-10-23 10:48:09 +00:00
pa7100 Switched to GPLv3. 2007-10-23 10:48:09 +00:00
power Switched to GPLv3. 2007-10-23 10:48:09 +00:00
powerpc32 Switched to GPLv3. 2007-10-23 10:48:09 +00:00
powerpc64 Update head to match stable 1.0 2002-06-29 14:15:02 +00:00
sparc32 Switched to GPLv3. 2007-10-23 10:48:09 +00:00
sparc32v8 Switched to GPLv3. 2007-10-23 10:48:09 +00:00
supersparc 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
config.links Support NetBSD m68K ELF targets 2012-12-13 18:15:38 +01:00
longlong.h Allow building for ARM thumb. Fixes bug#1202. 2011-07-04 12:41:45 +02:00
Makefile.am Switched to GPLv3. 2007-10-23 10:48:09 +00:00
mpi-add.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
mpi-bit.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
mpi-cmp.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
mpi-div.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
mpi-gcd.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
mpi-inline.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
mpi-inline.h Fix extern inline use for gcc > 4.3 in c99 mode 2012-11-06 17:14:04 +01:00
mpi-internal.h Fix bug in mpi_tdiv_q_2exp. 2013-09-16 15:57:01 +02:00
mpi-inv.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
mpi-mpow.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
mpi-mul.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
mpi-pow.c Mitigate a flush+reload cache attack on RSA secret exponents. 2013-07-25 10:37:40 +02:00
mpi-scan.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
mpicoder.c Removed some set but unused vars. 2011-08-09 10:54:22 +02:00
mpih-cmp.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
mpih-div.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
mpih-mul.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00
mpiutil.c Switched to GPLv3. 2007-10-23 10:48:09 +00:00