[git] GCRYPT - branch, gniibe-T3358, updated. libgcrypt-1.8.0-16-g2b1ba75

by NIIBE Yutaka cvs at cvs.gnupg.org
Wed Aug 23 04:12:51 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  2b1ba75e108c90d69bbf7cf161def06763d22e48 (commit)
      from  aeca1f0afc9091dab9fe1f018ea600064531ccf0 (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 2b1ba75e108c90d69bbf7cf161def06763d22e48
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Wed Aug 23 11:11:17 2017 +0900

    ecc: Relax condition for 25519 computations.
    
    * mpi/ec.c (ec_addm_25519, ec_subm_25519, ec_mulm_25519): Check number
    of limbs, allocated more is OK.
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/mpi/ec.c b/mpi/ec.c
index 21cf78b..c6419ba 100644
--- a/mpi/ec.c
+++ b/mpi/ec.c
@@ -396,7 +396,7 @@ ec_addm_25519 (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v, mpi_ec_t ctx)
   mpi_limb_t n[LIMB_SIZE_25519];
   mpi_limb_t borrow;
 
-  if (w->alloced != wsize || u->alloced != wsize || v->alloced != wsize)
+  if (w->nlimbs != wsize || u->nlimbs != wsize || v->nlimbs != wsize)
     log_bug ("addm_25519: different sizes\n");
 
   memset (n, 0, sizeof n);
@@ -419,7 +419,7 @@ ec_subm_25519 (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v, mpi_ec_t ctx)
   mpi_limb_t n[LIMB_SIZE_25519];
   mpi_limb_t borrow;
 
-  if (w->alloced != wsize || u->alloced != wsize || v->alloced != wsize)
+  if (w->nlimbs != wsize || u->nlimbs != wsize || v->nlimbs != wsize)
     log_bug ("subm_25519: different sizes\n");
 
   memset (n, 0, sizeof n);
@@ -444,7 +444,7 @@ ec_mulm_25519 (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v, mpi_ec_t ctx)
   int msb;
 
   (void)ctx;
-  if (w->alloced != wsize || u->alloced != wsize || v->alloced != wsize)
+  if (w->nlimbs != wsize || u->nlimbs != wsize || v->nlimbs != wsize)
     log_bug ("mulm_25519: different sizes\n");
 
   up = u->d;

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

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


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




More information about the Gnupg-commits mailing list