[git] GCRYPT - branch, master, updated. libgcrypt-1.6.0-53-g121a90d

by NIIBE Yutaka cvs at cvs.gnupg.org
Wed Jan 29 00:36:27 CET 2014


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  121a90d8931944974054f7d94f63b7f89df87fa5 (commit)
      from  52f7c48c901a3de51bd690a218f3de2f71e8d790 (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 121a90d8931944974054f7d94f63b7f89df87fa5
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Wed Jan 29 08:32:46 2014 +0900

    Fix RSA Blinding.
    
    * cipher/rsa.c (rsa_decrypt): Loop to get multiplicative inverse.
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/cipher/rsa.c b/cipher/rsa.c
index e595e38..9a8d235 100644
--- a/cipher/rsa.c
+++ b/cipher/rsa.c
@@ -1023,13 +1023,12 @@ rsa_decrypt (gcry_sexp_t *r_plain, gcry_sexp_t s_data, gcry_sexp_t keyparms)
       ri = mpi_snew (ctx.nbits);
       bldata = mpi_snew (ctx.nbits);
 
-      _gcry_mpi_randomize (r, ctx.nbits, GCRY_WEAK_RANDOM);
-      mpi_mod (r, r, sk.n);
-      if (!mpi_invm (ri, r, sk.n))
+      do
         {
-          rc = GPG_ERR_INTERNAL;
-          goto leave;
+          _gcry_mpi_randomize (r, ctx.nbits, GCRY_WEAK_RANDOM);
+          mpi_mod (r, r, sk.n);
         }
+      while (!mpi_invm (ri, r, sk.n));
 
       /* Do blinding.  We calculate: y = (x * r^e) mod n, where r is
          the random number, e is the public exponent, x is the

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

Summary of changes:
 cipher/rsa.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)


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