aboutsummaryrefslogtreecommitdiffstats
path: root/mpi (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug in mpi_tdiv_q_2exp.Werner Koch2013-09-161-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 <[email protected]> (back ported from Libgcrypt commit 7f7a5ef59962ae1a819b5060f9b781469bfe27d5)
* Mitigate a flush+reload cache attack on RSA secret exponents.Werner Koch2013-07-251-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | * mpi/mpi-pow.c (mpi_powm): Always perform the mpi_mul for exponents hold in secure memory. -- The attack is described in a paper to be pusblished at eprint.iacr.org: Flush+Reload: a High Resolution, Low Noise, L3 Cache Side-Channel Attack by Yuval Yarom and Katrina Falkner. 18 July 2013. Flush+Reload is a cache side-channel attack that monitors access to data in shared pages. In this paper we demonstrate how to use the attack to extract private encryption keys from GnuPG. The high resolution and low noise of the Flush+Reload attack enables a spy program to recover over 98% of the bits of the private key in a single decryption or signing round. Unlike previous attacks, the attack targets the last level L3 cache. Consequently, the spy program and the victim do not need to share the execution core of the CPU. The attack is not limited to a traditional OS and can be used in a virtualised environment, where it can attack programs executing in a different VM. Signed-off-by: Werner Koch <[email protected]>
* Support NetBSD m68K ELF targetsWerner Koch2012-12-131-2/+7
| | | | | | | | | | | | | | | * mpi/config.links (m68k*-*-netbsdelf): New. -- The original patch from NetBSD had this additional code: if ! test x$M68060 = xYES; then path="m68k/mc68020 m68k" fi However, this bypasses the config system. It would be better to add proper support for this CPU to config.sub.
* Fix extern inline use for gcc > 4.3 in c99 modeWerner Koch2012-11-061-1/+8
| | | | | | | | | | * mpi/mpi-inline.h [!G10_MPI_INLINE_DECL]: Take care of changed extern inline semantics in gcc. -- I am not use how this will work out with non-gcc. However, we had no problems in the past and thus this change is the least invasive for non-gcc compilers.
* Rename all ChangeLog files to ChangeLog-2011.Werner Koch2011-12-021-0/+7
| | | | * ChangeLog: New file.
* Removed some set but unused vars.Werner Koch2011-08-093-5/+10
|
* Allow building for ARM thumb. Fixes bug#1202.Werner Koch2011-07-042-7/+10
|
* Revert last two changes and replace by code from libgcrypt 1.4.6.Werner Koch2010-12-232-12/+19
|
* mips fixesWerner Koch2010-10-222-22/+35
|
* Fix bug 1231.Werner Koch2010-06-012-2/+14
| | | | | Minor doc improvement.
* Remove sparc64 asm modulesWerner Koch2009-12-092-12/+15
|
* Powerpc64 fix.Werner Koch2008-03-252-5/+11
|
* Switched to GPLv3.Werner Koch2007-10-23102-559/+231
| | | | | Updated gettext.
* * config.links: powerpc64* needs to come before powerpc* or it willDavid Shaw2007-01-162-5/+11
| | | | | | never match. Reported by Alon Bar-Lev for libgcrypt, but relevant here as well.
* Removed the use of g10defs.h.Werner Koch2006-12-115-6/+87
| | | | | | This required some code cleanups and the introduction of a few accessor ducntions in mpi.
* * mpicoder.c (mpi_read): Fix minor bug in reading a zero-length MPIDavid Shaw2005-09-012-5/+14
| | | | | (was failing unnecessarily).
* Converted all m_free to xfree etc.Werner Koch2005-07-274-22/+22
|
* Updated FSF street address and preparations for a release candidate.Werner Koch2005-05-31101-117/+214
|
* * cardglue.c (send_status_info): Make CTRL optional.Werner Koch2005-05-213-11/+40
| | | | | | | | | | | (agent_scd_writekey, inq_writekey_parms): New. (agent_openpgp_storekey): Removed. * cardglue.h: Add a few more error code mappings. * keygen.c (copy_mpi): Removed. (save_unprotected_key_to_card): Changed to use agent_scd_writekey. * app-common.h, app-openpgp.c, tlv.c, tlv.h: Updated from newer version in gnupg 1.9 CVS.
* * configure.ac: New option --enable-noexecstack.Werner Koch2005-03-112-3/+8
| | | | | | * Makefile.am (ASFLAGS): Renamed to AM_CCASFLAGS and added the variable for non exectubale stack options. Adapted users.
* * seckey-cert.c (do_check): Handle case when checksum was okay butWerner Koch2004-12-202-6/+21
| | | | | | | | | passphrase still wrong. Roman Pavlik found such a case. * mpicoder.c (mpi_read_from_buffer): Don't abort in case of an invalid MPI but print a message and return NULL. Use log_info and not log_error.
* * configure.ac: New option --disable-gnupg-iconv, defineWerner Koch2004-10-262-2/+6
| | | | | | | | | | | | | USE_GNUPG_ICONV. (AC_CANONICAL_TARGET): Replaced by AC_CANONICAL_HOST. Changed all reference to TARGET to HOST. Made sure that i586-mingw32msvc gets detected as mingw32. (UNIT64_C): Don't include inttype.h uncoditional but use a test to ensure that it gets into conftest.h. (AH_TOP): New. Prevent double inclusion of config.h. * config.links: Use HOST instead of TARGET.
* * Makefile.am (.S.o): Include MPI_SFLAGS. This is our bug 145.Werner Koch2004-10-132-1/+5
|
* * mpicoder.c (mpi_read): If we must fail due to a oversize (generallyDavid Shaw2004-09-302-1/+9
| | | | | | corrupt) MPI, make sure the number of bytes we read is valid so we can skip the rest of the bad packet (in hopes the whole stream isn't invalid).
* * longlong.h: Typo.David Shaw2004-05-203-8/+16
| | | | | | * mpi-pow.c (mpi_powm): s/exp/exponent/ to shutup a compiler warning. From Werner on stable branch.
* hppa1.1/udiv-qrnnd.S: Alignment fix from Lamont Jones for Debian.David Shaw2004-01-212-0/+6
|
* * config.links: OpenBSD 3.4 is now ELF, so use the proper assembler codeDavid Shaw2004-01-125-31/+102
| | | | | | | | | | | | | | | for that. Use the portable C MPI code for OpenBSD before 3.4, and remove the special i386-openbsd assembly directory. * Makefile.am: Add the portable C links to DISTCLEANFILES. Noted by Nelson H. F. Beebe. * mpi-mpow.c (build_index): s/index/idx/ to avoid gcc warning. From Werner on stable branch. * longlong.h: Added PowerPC 64 bit code from GPM-4.1.2 but didn't enable it yet. From Werner on stable branch.
* Use the portable C MPI code for OpenBSD before 3.4, and remove the specialDavid Shaw2004-01-1210-774/+0
| | | | | i386-openbsd assembly directory.
* * g10m.c: Dead code. Remove.David Shaw2003-12-303-99/+7
| | | | | * Makefile.am: Don't compile g10m.c.
* * mpiutil.c (mpi_set_opaque, mpi_get_opaque): Make the length of an opaqueDavid Shaw2003-12-172-2/+7
| | | | | MPI unsigned.
* * config.links: Show target in asm-syntax.h file and include targets forDavid Shaw2003-12-052-2/+11
| | | | | K*BSD (GNU userland with BSD kernel).
* * config.links: sparc64 assembler doesn't work on FreeBSD or OpenBSDDavid Shaw2003-11-212-4/+9
| | | | | either.
* * Makefile.am: Make use of AM_CFLAGS. (From wk on stable branch)David Shaw2003-05-262-2/+6
|
* * mpicoder.c, mpi-inline.h, mpi-inv.c, mpiutil.c, mpih-div.c,David Shaw2003-05-248-85/+83
| | | | | | | mpi-internal.h, mpi-scan.c: Edit 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.
* * config.links: Re-disable assembler on Darwin. Darwin 6.5 broke itDavid Shaw2003-04-252-5/+9
| | | | | again.
* * longlong.h (umul_ppmm): Support SH3 and SH4. Thanks toWerner Koch2003-04-152-2/+8
| | | | | [email protected].
* * config.links: Use OpenBSD/NetBSD powerpc assembler code for Darwin.David Shaw2002-11-162-2/+7
| | | | | Successfully tested by Gordon Worley.
* * config.links (powerpc-apple-darwin6.1): Disable assemblerWerner Koch2002-10-182-1/+11
| | | | | due to non-working modules/as. Suggested by Gordon Worley.
* * longlong.h: Some whitespace changes in HPPA to fix assembler problems onDavid Shaw2002-10-022-20/+25
| | | | | HP-UX. From David Ellement.
* * mpicoder.c (do_get_buffer): Avoid zero length allocation.Werner Koch2002-09-202-3/+12
| | | | | | Checked that all callers behave properly when NBYTES returns 0 as the length of the allocated buffer.
* * mpi-bit.c (mpi_normalize): Replaced the check for protected byV1-2-5V1-2-4V1-2-3RC-1-2-5rc2RC-1-2-5rc1RC-1-2-4rc1RC-1-2-3rc2RC-1-2-3rc1Werner Koch2002-09-113-38/+34
| | | | | | | | is_opaque. (mpi_get_nbits): Removed the special case for protected MPIs. * mpicoder.c (do_get_buffer): Likewise. (mpi_print): Removed the nbit_info printing.
* * mpicoder.c (mpi_set_buffer): Cast all left operands of a shiftWerner Koch2002-09-102-7/+13
| | | | | | to a larger type so that 16 bit CPUs don't suffer from an overflow. Suggested by TOGAWA Satoshi.
* * longlong.h: Remove space between \ and newline. gcc is complaining.David Shaw2002-08-242-2/+7
|
* * mpicoder.c (do_get_buffer): Don't remove leading zeros if theWerner Koch2002-08-132-6/+14
| | | | | MPI is marked as protected.
* 2002-08-02 Timo Schulz <[email protected]>Timo Schulz2002-08-022-2/+6
| | | | | * mpicoder.c: Add a '\n' to all log_bug functions.
* * config.links: Added case for sparc64-netbsd. Suggested byWerner Koch2002-08-022-0/+11
| | | | | [email protected].
* * config.links: Add special rule for OpenBSD on x86 to use specialDavid Shaw2002-07-252-0/+13
| | | | | | i386-openbsd files. OpenBSD (at least until version 3.1) has an older assembler that won't work with the files in i386.
* These are special i386 files for use on OpenBSD, which (at least untilDavid Shaw2002-07-2510-0/+774
| | | | | | version 3.1) has an older assembler that won't work with the files in i386.
* removed pragma for RISC OSStefan Bellon2002-07-242-4/+5
|
* * longlong.h: Replaced all K&R multiline strings by ISO ones forWerner Koch2002-07-242-224/+233
| | | | | the sake of modern compilers. Suggested by Marco Parrone.