summaryrefslogtreecommitdiff
path: root/mpi/mpi-internal.h
AgeCommit message (Collapse)AuthorFilesLines
2013-09-16Fix bug in _gcry_mpi_tdiv_q_2exp.Werner Koch1-1/+1
* 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>
2013-09-04mpi: Suppress newer gcc warnings.Werner Koch1-1/+2
* src/g10lib.h (GCC_ATTR_UNUSED): Define for gcc >= 3.5. * mpi/mpih-div.c (_gcry_mpih_mod_1, _gcry_mpih_divmod_1): Mark dummy as unused. * mpi/mpi-internal.h (UDIV_QRNND_PREINV): Mark _ql as unused. -- Due to the use of macros and longlong.h, we use variables which are only used by some architectures. At least gcc 4.7.2 prints new warnings abot set but not used variables. This patch silences them. Signed-off-by: Werner Koch <wk@gnupg.org>
2011-02-04Nuked almost all trailing whitespace.Werner Koch1-1/+0
Check and install the standard git pre-commit hook.
2007-03-23Did some performance experiments and added code for Barrett reduction.Werner Koch1-0/+3
2003-12-19* mpi-internal.h [M_DEBUG]: Removed this unused code.Werner Koch1-12/+6
(struct karatsuba_ctx): Added TSPACE_NLIMBS and TP_NLIMBS. * mpiutil.c (_gcry_mpi_free_limb_space): Add arg NLIMBS and wipe out the memory. Changed all callers. * mpih-mul.c (_gcry_mpih_mul_karatsuba_case): Keep track of allocated limbs. * mpi-div.c (_gcry_mpi_tdiv_qr): Keep track of allocated limbs. * mpi-mul.c (gcry_mpi_mul): Ditto. * mpi-pow.c (gcry_mpi_powm): Ditto. * mpiutil.c (gcry_mpi_randomize): Use gcry_create_nonce if WEAK random has been requested.
2003-06-172003-06-16 Moritz Schulte <moritz@g10code.com>Moritz Schulte1-4/+4
* mpi-add.c: Replace last occurences of old type names with newer names (i.e. replace MPI with gcry_mpi_t). * mpi-bit.c: Likewise. * mpi-cmp.c: Likewise. * mpi-div.c: Likewise. * mpi-gcd.c: Likewise. * mpi-internal.h: Likewise. * mpi-inv.c: Likewise. * mpi-mpow.c: Likewise. * mpi-mul.c: Likewise. * mpi-pow.c: Likewise. * mpi-scan.c: Likewise. * mpicoder.c: Likewise. * mpiutil.c: Likewise.
2003-06-092003-06-09 Moritz Schulte <moritz@g10code.com>Moritz Schulte1-9/+9
* mpicoder.c (gcry_mpi_scan): Adjust for libgpg-error. (gcry_mpi_print): Likewise. (gcry_mpi_aprint): Likewise. 2003-06-07 Moritz Schulte <moritz@g10code.com> * longlong.h, mpi-add.c, mpi-bit.c, mpi-cmp.c, mpi-div.c, mpi-gcd.c, mpi-inline.c, mpi-inline.h, mpi-internal.h, mpi-inv.c, mpi-mpow.c, mpi-mul.c, mpi-pow.c, mpi-scan.c, mpicoder.c, mpih-div.c, mpih-mul.c, mpiutil.c, generic/mpi-asm-defs.h, generic/mpih-add1.c, generic/mpih-lshift.c, generic/mpih-mul1.c, generic/mpih-mul2.c, generic/mpih-mul3.c, generic/mpih-rshift.c, generic/mpih-sub1.c, generic/udiv-w-sdiv.c, i386/syntax.h, m68k/syntax.h, mips3/mpi-asm-defs.h, powerpc32/syntax.h: Edited all preprocessor instructions to remove whitespace before the '#'. This is not required by C89, but there are some compilers out there that don't like it. Replaced any occurence of the now deprecated type names with the new ones.
2002-05-14Change the license to the LGPL.Werner Koch1-9/+7
2001-05-31The first libgcrypt only release.Werner Koch1-37/+40
2000-12-21Changed program name in all filesWerner Koch1-3/+3
2000-12-19Compiles againWerner Koch1-1/+4
2000-11-14Some configuration changesWerner Koch1-0/+18
2000-07-17See ChangeLog: Mon Jul 17 16:35:47 CEST 2000 Werner KochWerner Koch1-1/+18
1999-07-02See ChangeLog: Fri Jul 2 11:45:54 CEST 1999 Werner KochWerner Koch1-0/+5
1998-12-23See ChangeLog: Wed Dec 23 13:34:22 CET 1998 Werner KochWerner Koch1-3/+3
1998-02-24Renamed to GNUPGWerner Koch1-4/+4
1998-01-16added some trust model stuffWerner Koch1-1/+1
1997-12-23changed configuration stuff, replaced some Makefile.am by distfiles.Werner Koch1-0/+18
1997-11-27Improved prime number testWerner Koch1-0/+7
1997-11-26changed the dir layoutWerner Koch1-5/+19
1997-11-18initially checkinWerner Koch1-0/+198