diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-11-05 18:25:09 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-11-05 18:25:09 +0000 |
commit | 5d29fdeacef5200f67b4158519d16f67cf2da9e3 (patch) | |
tree | 16e77a3e887273cd3945f8e732a60a126351e56c | |
parent | 62cb95a862cb8d730b8c87930195332a54f26dca (diff) |
Werner Koch wrote:
Hi,
find attached a changed diff to crypto_ecc.c with the final Libgcrypt
interface. Use commit b9fd398 or later for your tests.
Shalom-Salam,
Werner
-rw-r--r-- | src/util/crypto_ecc.c | 14 | ||||
-rw-r--r-- | src/util/test_crypto_ecdsa.c | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/util/crypto_ecc.c b/src/util/crypto_ecc.c index 2bd89c4026..dc69a59f31 100644 --- a/src/util/crypto_ecc.c +++ b/src/util/crypto_ecc.c @@ -213,7 +213,7 @@ decode_private_ecdsa_key (const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv) rc = gcry_sexp_build (&result, NULL, "(private-key(ecc(curve \"" CURVE "\")" - "(flags ecdsa)(d %b)))", + "(d %b)))", (int)sizeof (priv->d), priv->d); if (0 != rc) { @@ -246,7 +246,7 @@ decode_private_eddsa_key (const struct GNUNET_CRYPTO_EddsaPrivateKey *priv) rc = gcry_sexp_build (&result, NULL, "(private-key(ecc(curve \"" CURVE "\")" - "(d %b)))", + "(flags eddsa)(d %b)))", (int)sizeof (priv->d), priv->d); if (0 != rc) { @@ -279,7 +279,7 @@ decode_private_ecdhe_key (const struct GNUNET_CRYPTO_EcdhePrivateKey *priv) rc = gcry_sexp_build (&result, NULL, "(private-key(ecc(curve \"" CURVE "\")" - "(flags ecdsa)(d %b)))", + "(d %b)))", (int)sizeof (priv->d), priv->d); if (0 != rc) { @@ -550,7 +550,7 @@ GNUNET_CRYPTO_ecdhe_key_create () if (0 != (rc = gcry_sexp_build (&s_keyparam, NULL, "(genkey(ecc(curve \"" CURVE "\")" - "(flags noparam ecdsa)))"))) + "(flags noparam)))"))) { LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_sexp_build", rc); return NULL; @@ -600,7 +600,7 @@ GNUNET_CRYPTO_ecdsa_key_create () if (0 != (rc = gcry_sexp_build (&s_keyparam, NULL, "(genkey(ecc(curve \"" CURVE "\")" - "(flags noparam ecdsa)))"))) + "(flags noparam)))"))) { LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_sexp_build", rc); return NULL; @@ -649,7 +649,7 @@ GNUNET_CRYPTO_eddsa_key_create () if (0 != (rc = gcry_sexp_build (&s_keyparam, NULL, "(genkey(ecc(curve \"" CURVE "\")" - "(flags noparam)))"))) + "(flags noparam eddsa)))"))) { LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_sexp_build", rc); return NULL; @@ -1152,7 +1152,7 @@ data_to_ecdsa_value (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose) GNUNET_CRYPTO_hash (purpose, ntohl (purpose->size), &hc); if (0 != (rc = gcry_sexp_build (&data, NULL, - "(data(flags ecdsa rfc6979)(hash %s %b))", + "(data(flags rfc6979)(hash %s %b))", "sha512", (int)sizeof (hc), &hc))) { diff --git a/src/util/test_crypto_ecdsa.c b/src/util/test_crypto_ecdsa.c index bf5fcf571c..4845db820d 100644 --- a/src/util/test_crypto_ecdsa.c +++ b/src/util/test_crypto_ecdsa.c @@ -30,7 +30,7 @@ #define ITER 25 -#define PERF GNUNET_NO +#define PERF GNUNET_YES static struct GNUNET_CRYPTO_EcdsaPrivateKey *key; |