[git] GCRYPT - branch, master, updated. libgcrypt-1.6.0-335-gfdfa5bf

by NIIBE Yutaka cvs at cvs.gnupg.org
Thu Feb 25 04:05:32 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, master has been updated
       via  fdfa5bfefdde316688a3c8021bd3528c5273b0f4 (commit)
      from  2b40a16333fa75f1cee85ab901a5aa9cff845a92 (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 fdfa5bfefdde316688a3c8021bd3528c5273b0f4
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.
    
    --
    
    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 0be153f..a780ebd 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


_______________________________________________
Gnupg-commits mailing list
Gnupg-commits at gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-commits




More information about the Gcrypt-devel mailing list