gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r37761 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r37761 - gnunet/src/util
Date: Tue, 23 Aug 2016 17:43:38 +0200

Author: amatus
Date: 2016-08-23 17:43:38 +0200 (Tue, 23 Aug 2016)
New Revision: 37761

Modified:
   gnunet/src/util/crypto_rsa.c
Log:
Restore Lenstra protection for gcrypt < 1.6.4


Modified: gnunet/src/util/crypto_rsa.c
===================================================================
--- gnunet/src/util/crypto_rsa.c        2016-08-23 07:58:14 UTC (rev 37760)
+++ gnunet/src/util/crypto_rsa.c        2016-08-23 15:43:38 UTC (rev 37761)
@@ -840,12 +840,12 @@
     return NULL;
   }
 
+  /* Lenstra protection was first added to libgcrypt 1.6.4
+   * with commit c17f84bd02d7ee93845e92e20f6ddba814961588.
+   */
+#if GCRYPT_VERSION_NUMBER < 0x010604
   /* verify signature (guards against Lenstra's attack with fault 
injection...) */
-  /* Removed because Lenstra protection was first added to libgcrypt 1.6.4
-   * with commit c17f84bd02d7ee93845e92e20f6ddba814961588.  Do not run with 
-   * an earlier libgcrypt.  Or uncomment if you must.  */
-  /*
-  public_key = GNUNET_CRYPTO_rsa_private_key_get_public (key);
+  struct GNUNET_CRYPTO_RsaPublicKey *public_key = 
GNUNET_CRYPTO_rsa_private_key_get_public (key);
   if (0 !=
       gcry_pk_verify (result,
                       data,
@@ -858,7 +858,7 @@
     return NULL;
   }
   GNUNET_CRYPTO_rsa_public_key_free (public_key);
-  */
+#endif
 
   /* return signature */
   gcry_sexp_release (data);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]