[git] GCRYPT - branch, gniibe-T3358, updated. libgcrypt-1.8.0-19-g8728d5e

by NIIBE Yutaka cvs at cvs.gnupg.org
Wed Aug 23 06:04:21 CEST 2017


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, gniibe-T3358 has been updated
       via  8728d5e6cb18cc15f24d7188e7c4175913031977 (commit)
      from  5bbe5e9505b93e7fac94cbaa8464b94a634faf5b (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 8728d5e6cb18cc15f24d7188e7c4175913031977
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Wed Aug 23 13:03:07 2017 +0900

    ecc: Fix ec_mulm_25519.
    
    * mpi/ec.c (ec_mulm_25519): Improve reduction to 25519.
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/mpi/ec.c b/mpi/ec.c
index 7a56112..eb71a63 100644
--- a/mpi/ec.c
+++ b/mpi/ec.c
@@ -455,13 +455,10 @@ ec_mulm_25519 (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v, mpi_ec_t ctx)
   m[LIMB_SIZE_25519] += cy;
 
   memset (m, 0, wsize * BYTES_PER_MPI_LIMB);
-  m[0] = m[LIMB_SIZE_25519] * 2 * 19;
-  cy = _gcry_mpih_add_n (wp, wp, m, wsize);
-
   msb = (wp[LIMB_SIZE_25519-1] >> (255 % BITS_PER_MPI_LIMB));
-  m[0] = (cy * 2 + msb) * 19;
-  _gcry_mpih_add_n (wp, wp, m, wsize);
+  m[0] = (m[LIMB_SIZE_25519] * 2 + msb) * 19;
   wp[LIMB_SIZE_25519-1] &= ~(1UL << (255 % BITS_PER_MPI_LIMB));
+  _gcry_mpih_add_n (wp, wp, m, wsize);
 
   m[0] = 0;
   cy = _gcry_mpih_sub_n (wp, wp, ctx->p->d, wsize);

-----------------------------------------------------------------------

Summary of changes:
 mpi/ec.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
The GNU crypto library
http://git.gnupg.org




More information about the Gnupg-commits mailing list