[git] GCRYPT - branch, ECC-INTEGRATION-1-5, updated. libgcrypt-1.4.4-52-g9476066

by Andrey Jivsov cvs at cvs.gnupg.org
Thu Jan 13 06:40:23 CET 2011


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, ECC-INTEGRATION-1-5 has been updated
       via  94760660ab77bab25b24d67f8e813f1b49d35e07 (commit)
      from  899386826c85f1e757e75bcc5d5b2159d05676a0 (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 94760660ab77bab25b24d67f8e813f1b49d35e07
Author: Andrey Jivsov <openpgp at brainhub.org>
Date:   Wed Jan 12 21:20:57 2011 -0800

    Fixed a typo, added logging.

diff --git a/cipher/ecc.c b/cipher/ecc.c
index f33cc1c..a7a5554 100644
--- a/cipher/ecc.c
+++ b/cipher/ecc.c
@@ -734,6 +734,11 @@ sign (gcry_mpi_t input, ECC_secret_key *skey, gcry_mpi_t r, gcry_mpi_t s)
   mpi_point_t I;
   mpi_ec_t ctx;
 
+  if (DBG_CIPHER)
+  {
+    log_mpidump ("ecdsa sign hash  ", input );
+  }
+
   k = NULL;
   dr = mpi_alloc (0);
   sum = mpi_alloc (0);
@@ -772,6 +777,12 @@ sign (gcry_mpi_t input, ECC_secret_key *skey, gcry_mpi_t r, gcry_mpi_t s)
       mpi_mulm (s, k_1, sum, skey->E.n);    /* s = k^(-1)*(hash+(d*r)) mod n */
     }
 
+  if (DBG_CIPHER)
+  {
+    log_mpidump ("ecdsa return r ", r );
+    log_mpidump ("ecdsa return s ", s );
+  }
+
  leave:
   _gcry_mpi_ec_free (ctx);
   point_free (&I);
@@ -859,7 +870,7 @@ verify (gcry_mpi_t input, ECC_public_key *pkey, gcry_mpi_t r, gcry_mpi_t s)
           log_mpidump ("   y", y);
           log_mpidump ("   r", r);
           log_mpidump ("   s", s);
-          log_debug ("ecc verify: Not verified\n");
+          log_debug ("ecc verify: Not verified (x != y)\n");
         }
       err = GPG_ERR_BAD_SIGNATURE;
       goto leave;
@@ -1374,7 +1385,6 @@ ecc_encrypt_raw (int algo, gcry_mpi_t *resarr, gcry_mpi_t data, gcry_mpi_t *pkey
   ECC_secret_key sk;
   mpi_ec_t ctx;
   gcry_mpi_t result[2];
-  mpi_point_t  eph_Q;
   int err;
 
   (void)algo;
@@ -1483,7 +1493,7 @@ ecc_decrypt_raw (int algo, gcry_mpi_t *result, gcry_mpi_t *data, gcry_mpi_t *ske
   *result = NULL;
 
   if (DBG_CIPHER)
-    log_debug ("Called ecc_encrypt_raw data size=%d bits, flags=%08x\n", gcry_mpi_get_nbits (data), flags);
+    log_debug ("Called ecc_encrypt_raw data size=%d bits, flags=%08x\n", gcry_mpi_get_nbits (data[0]), flags);
 
   if ( !data || !data[0] || !skey[0] || !skey[1] || !skey[3] )
     return GPG_ERR_BAD_MPI;

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

Summary of changes:
 cipher/ecc.c |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)


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




More information about the Gnupg-commits mailing list