[git] GCRYPT - branch, LIBGCRYPT-1-6-BRANCH, updated. libgcrypt-1.6.5-5-gc03cc00
by NIIBE Yutaka
cvs at cvs.gnupg.org
Mon Mar 14 04:58:29 CET 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU crypto library".
The branch, LIBGCRYPT-1-6-BRANCH has been updated
via c03cc004133ab261e514ddd37ca40da17df7e6d8 (commit)
from 53695204acb315deb10705ad35f133815418aa8b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c03cc004133ab261e514ddd37ca40da17df7e6d8
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Thu Feb 25 12:01:10 2016 +0900
mpi: Normalize EXPO for mpi_powm.
* mpi/mpi-pow.c (gcry_mpi_powm): Normalize EP.
--
(backport from master
commit fdfa5bfefdde316688a3c8021bd3528c5273b0f4)
Thanks to Dan Fandrich for the report with a reproducible test case.
GnuPG-bug-id: 2256
Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
diff --git a/mpi/mpi-pow.c b/mpi/mpi-pow.c
index 70bf9e8..2dcd654 100644
--- a/mpi/mpi-pow.c
+++ b/mpi/mpi-pow.c
@@ -83,6 +83,7 @@ _gcry_mpi_powm (gcry_mpi_t res,
rp = res->d;
ep = expo->d;
+ MPN_NORMALIZE(ep, esize);
if (!msize)
_gcry_divide_by_zero();
@@ -429,6 +430,9 @@ _gcry_mpi_powm (gcry_mpi_t res,
size = 2 * msize;
msign = mod->sign;
+ ep = expo->d;
+ MPN_NORMALIZE(ep, esize);
+
if (esize * BITS_PER_MPI_LIMB > 512)
W = 5;
else if (esize * BITS_PER_MPI_LIMB > 256)
@@ -445,7 +449,6 @@ _gcry_mpi_powm (gcry_mpi_t res,
bsec = mpi_is_secure(base);
rp = res->d;
- ep = expo->d;
if (!msize)
_gcry_divide_by_zero();
-----------------------------------------------------------------------
Summary of changes:
mpi/mpi-pow.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
hooks/post-receive
--
The GNU crypto library
http://git.gnupg.org
More information about the Gnupg-commits
mailing list