aboutsummaryrefslogtreecommitdiffstats
path: root/mpi/mpi-pow.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* mpi: Minor fix for mpi_pow.NIIBE Yutaka2017-07-071-2/+2
| | | | | | * mpi/mpi-pow.c (mpi_powm): Fix allocation size. Signed-off-by: NIIBE Yutaka <[email protected]>
* mpi: Same computation for square and multiply for mpi_pow.NIIBE Yutaka2017-07-071-34/+38
| | | | | | | | | | | | | * mpi/mpi-pow.c (_gcry_mpi_powm): Compare msize for max_u_size. Move the assignment to base_u into the loop. Copy content refered by RP to BASE_U except the last of the loop. -- Signed-off-by: NIIBE Yutaka <[email protected]> (backport commit of libgcrypt master: 78130828e9a140a9de4dafadbc844dbb64cb709a)
* mpi: Simplify mpi_powm.NIIBE Yutaka2017-07-071-73/+30
| | | | | | | | | | | * mpi/mpi-pow.c (_gcry_mpi_powm): Simplify the loop. -- (backport of libgcrypt master commit: 719468e53133d3bdf12156c5bfdea2bf15f9f6f1) Signed-off-by: NIIBE Yutaka <[email protected]>
* mpi: Avoid data-dependent timing variations in mpi_powm.NIIBE Yutaka2015-02-261-40/+53
| | | | | | | | | | | | * include/mpi.h, mpi/mpiutils.c (mpi_set_cond): New. * mpi/mpi-pow.c (SIZE_PRECOMP): Rename from SIZE_B_2I3. (mpi_powm): Access all data in the table and use mpi_set_cond. -- Access to the precomputed table was indexed by a portion of EXPO, which could be mounted by a side channel attack. This change fixes this particular data-dependent access pattern.
* mpi: mpi-pow improvementsWerner Koch2013-10-181-0/+443
| | | | | | | | | | | | | | | | | | | | | | | * mpi/mpi-pow.c (USE_ALGORITHM_SIMPLE_EXPONENTIATION): New. (mul_mod) [!USE_ALGORITHM_SIMPLE_EXPONENTIATION]: New. (mpi_powm) [!USE_ALGORITHM_SIMPLE_EXPONENTIATION]: New implementation of left-to-right k-ary exponentiation. -- This is a backport from Libgcrypt commit 45aa6131e93fac89d46733b3436d960f35fb99b2 Signed-off-by: NIIBE Yutaka <[email protected]> For the Yarom/Falkner flush+reload cache side-channel attack, we changed the code so that it always calls the multiplication routine (even if we can skip it to get result). This results some performance regression. This change is for recovering performance with efficient algorithm. Signed-off-by: Werner Koch <[email protected]>
* 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]>
* Removed some set but unused vars.Werner Koch2011-08-091-3/+2
|
* Switched to GPLv3.Werner Koch2007-10-231-4/+2
| | | | | Updated gettext.
* Updated FSF street address and preparations for a release candidate.Werner Koch2005-05-311-1/+2
|
* * longlong.h: Typo.David Shaw2004-05-201-7/+8
| | | | | | * mpi-pow.c (mpi_powm): s/exp/exponent/ to shutup a compiler warning. From Werner on stable branch.
* Update head to match stable 1.0David Shaw2002-06-291-0/+294
|
* Removed files from the HEAD revision, because they are now in anotherWerner Koch2000-12-191-295/+0
| | | | | repository
* See ChangeLog: Mon Jul 17 16:35:47 CEST 2000 Werner KochWerner Koch2000-07-171-4/+17
|
* See ChangeLog: Wed Dec 8 21:58:32 CET 1999 Werner KochWerner Koch1999-12-081-2/+2
|
* See ChangeLog: Sun Apr 18 10:11:28 CEST 1999 Werner KochWerner Koch1999-04-181-1/+2
|
* See ChangeLog: Wed Dec 23 13:34:22 CET 1998 Werner KochWerner Koch1998-12-231-3/+3
|
* some more internall structure changesWerner Koch1998-06-161-4/+4
|
* Renamed to GNUPGV-0-2-8Werner Koch1998-02-241-4/+4
|
* added some trust model stuffWerner Koch1998-01-161-1/+1
|
* changed configuration stuff, replaced some Makefile.am by distfiles.Werner Koch1997-12-231-1/+20
|
* changed the dir layoutWerner Koch1997-11-261-7/+22
|
* initially checkinWerner Koch1997-11-181-0/+247