aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2021-05-03 16:33:27 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2021-05-03 16:33:27 +0200
commitcddca0530fdf461607d6c0af908bb527df6193f2 (patch)
tree4296343b69fe6e9596fedb32b84174f63d36f261
parent9b1065bcad0e82350e3e72e474ae425293defe42 (diff)
downloadgnunet-cddca0530fdf461607d6c0af908bb527df6193f2.tar.gz
gnunet-cddca0530fdf461607d6c0af908bb527df6193f2.zip
-fix
-rw-r--r--src/util/crypto_ecc_gnsrecord.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/util/crypto_ecc_gnsrecord.c b/src/util/crypto_ecc_gnsrecord.c
index 93bd9907e..59efff8ab 100644
--- a/src/util/crypto_ecc_gnsrecord.c
+++ b/src/util/crypto_ecc_gnsrecord.c
@@ -114,8 +114,8 @@ GNUNET_CRYPTO_eddsa_sign_with_scalar (
114 * Calculate the derived zone key zk' from the 114 * Calculate the derived zone key zk' from the
115 * derived private scalar. 115 * derived private scalar.
116 */ 116 */
117 crypto_scalarmult_ed25519_base_noclamp (zk, 117 crypto_scalarmult_ed25519_base (zk,
118 sk); 118 sk);
119 119
120 /** 120 /**
121 * Calculate r: 121 * Calculate r:
@@ -163,9 +163,9 @@ GNUNET_CRYPTO_eddsa_sign_with_scalar (
163 crypto_core_ed25519_scalar_reduce (hram_mod, hram); 163 crypto_core_ed25519_scalar_reduce (hram_mod, hram);
164 164
165 /** 165 /**
166 * Calculate 166 * Calculate
167 * S := r + hram * s mod L 167 * S := r + hram * s mod L
168 */ 168 */
169 crypto_core_ed25519_scalar_mul (tmp, hram_mod, sk); 169 crypto_core_ed25519_scalar_mul (tmp, hram_mod, sk);
170 crypto_core_ed25519_scalar_add (sig->s, tmp, r_mod); 170 crypto_core_ed25519_scalar_add (sig->s, tmp, r_mod);
171 171
@@ -249,7 +249,7 @@ GNUNET_CRYPTO_ecdsa_public_key_derive (
249 GNUNET_assert (q); 249 GNUNET_assert (q);
250 250
251 /* calculate h_mod_n = h % n */ 251 /* calculate h_mod_n = h % n */
252 derive_h (pub, sizeof (pub), label, context, &hc); 252 derive_h (pub, sizeof (*pub), label, context, &hc);
253 GNUNET_CRYPTO_mpi_scan_unsigned (&h, (unsigned char *) &hc, sizeof(hc)); 253 GNUNET_CRYPTO_mpi_scan_unsigned (&h, (unsigned char *) &hc, sizeof(hc));
254 n = gcry_mpi_ec_get_mpi ("n", ctx, 1); 254 n = gcry_mpi_ec_get_mpi ("n", ctx, 1);
255 h_mod_n = gcry_mpi_new (256); 255 h_mod_n = gcry_mpi_new (256);