[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: clarify why we hash for ECDSA (#5398)
From: |
gnunet |
Subject: |
[gnunet] branch master updated: clarify why we hash for ECDSA (#5398) |
Date: |
Sun, 02 Jul 2023 20:15:44 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new a78213f13 clarify why we hash for ECDSA (#5398)
a78213f13 is described below
commit a78213f13e9930fa7a5aaa40702fe0ba0e8b2aa2
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Jul 2 20:15:33 2023 +0200
clarify why we hash for ECDSA (#5398)
---
src/util/crypto_ecc.c | 17 ++---------------
1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a/src/util/crypto_ecc.c b/src/util/crypto_ecc.c
index 7f9e3c070..745a27481 100644
--- a/src/util/crypto_ecc.c
+++ b/src/util/crypto_ecc.c
@@ -513,9 +513,7 @@ data_to_ecdsa_value (const struct
GNUNET_CRYPTO_EccSignaturePurpose *purpose)
{
gcry_sexp_t data;
int rc;
-
-/* See #5398 */
-#if 1
+ /* Unlike EdDSA, libgcrypt expects a hash for ECDSA. */
struct GNUNET_HashCode hc;
GNUNET_CRYPTO_hash (purpose, ntohl (purpose->size), &hc);
@@ -529,18 +527,6 @@ data_to_ecdsa_value (const struct
GNUNET_CRYPTO_EccSignaturePurpose *purpose)
LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_sexp_build", rc);
return NULL;
}
-#else
- if (0 != (rc = gcry_sexp_build (&data,
- NULL,
- "(data(flags rfc6979)(hash %s %b))",
- "sha512",
- ntohl (purpose->size),
- purpose)))
- {
- LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_sexp_build", rc);
- return NULL;
- }
-#endif
return data;
}
@@ -594,6 +580,7 @@ GNUNET_CRYPTO_ecdsa_sign_ (
return GNUNET_OK;
}
+
enum GNUNET_GenericReturnValue
GNUNET_CRYPTO_eddsa_sign_raw (
const struct GNUNET_CRYPTO_EddsaPrivateKey *priv,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: clarify why we hash for ECDSA (#5398),
gnunet <=