aboutsummaryrefslogtreecommitdiff
path: root/src/util/crypto_ecc.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-09-05 17:02:45 +0000
committerChristian Grothoff <christian@grothoff.org>2015-09-05 17:02:45 +0000
commit59df216f6ad04e9131ee4fa43e14055252a71651 (patch)
tree337c13e7843379446d826e34a63a2d0297d29c6e /src/util/crypto_ecc.c
parentaff9093b9a8874c841763d5ea8d4adc2197e861e (diff)
downloadgnunet-59df216f6ad04e9131ee4fa43e14055252a71651.tar.gz
gnunet-59df216f6ad04e9131ee4fa43e14055252a71651.zip
adding bin_to_point and point_to_bin functions for GNUNET_CRYPTO_ecc API
Diffstat (limited to 'src/util/crypto_ecc.c')
-rw-r--r--src/util/crypto_ecc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/util/crypto_ecc.c b/src/util/crypto_ecc.c
index 7449d0392..bcc04fea5 100644
--- a/src/util/crypto_ecc.c
+++ b/src/util/crypto_ecc.c
@@ -130,7 +130,7 @@ decode_private_ecdsa_key (const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv)
130 rc = gcry_sexp_build (&result, NULL, 130 rc = gcry_sexp_build (&result, NULL,
131 "(private-key(ecc(curve \"" CURVE "\")" 131 "(private-key(ecc(curve \"" CURVE "\")"
132 "(d %b)))", 132 "(d %b)))",
133 (int)sizeof (priv->d), priv->d); 133 (int) sizeof (priv->d), priv->d);
134 if (0 != rc) 134 if (0 != rc)
135 { 135 {
136 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_sexp_build", rc); 136 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_sexp_build", rc);
@@ -855,16 +855,16 @@ GNUNET_CRYPTO_ecdsa_verify (uint32_t purpose,
855 /* build s-expression for signature */ 855 /* build s-expression for signature */
856 if (0 != (rc = gcry_sexp_build (&sig_sexpr, NULL, 856 if (0 != (rc = gcry_sexp_build (&sig_sexpr, NULL,
857 "(sig-val(ecdsa(r %b)(s %b)))", 857 "(sig-val(ecdsa(r %b)(s %b)))",
858 (int)sizeof (sig->r), sig->r, 858 (int) sizeof (sig->r), sig->r,
859 (int)sizeof (sig->s), sig->s))) 859 (int) sizeof (sig->s), sig->s)))
860 { 860 {
861 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_sexp_build", rc); 861 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_sexp_build", rc);
862 return GNUNET_SYSERR; 862 return GNUNET_SYSERR;
863 } 863 }
864 data = data_to_ecdsa_value (validate); 864 data = data_to_ecdsa_value (validate);
865 if (0 != (rc = gcry_sexp_build (&pub_sexpr, NULL, 865 if (0 != (rc = gcry_sexp_build (&pub_sexpr, NULL,
866 "(public-key(ecc(curve " CURVE ")(q %b)))", 866 "(public-key(ecc(curve " CURVE ")(q %b)))",
867 (int)sizeof (pub->q_y), pub->q_y))) 867 (int) sizeof (pub->q_y), pub->q_y)))
868 { 868 {
869 gcry_sexp_release (data); 869 gcry_sexp_release (data);
870 gcry_sexp_release (sig_sexpr); 870 gcry_sexp_release (sig_sexpr);