aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-04-26 17:27:47 +0200
committerFlorian Dold <florian@dold.me>2022-04-26 17:27:47 +0200
commit6371a8d7e8eccca6a8763431c4eb20234481cd4a (patch)
treef3068ae5a018faf9a4e0c1fbcbbc641edc6900e6
parent132e09b6e76920007e37eedb8dd05ab2f51e239d (diff)
downloadgnunet-6371a8d7e8eccca6a8763431c4eb20234481cd4a.tar.gz
gnunet-6371a8d7e8eccca6a8763431c4eb20234481cd4a.zip
-only need to copy 32 bytes
m---------contrib/gana0
-rw-r--r--src/util/crypto_edx25519.c4
2 files changed, 2 insertions, 2 deletions
diff --git a/contrib/gana b/contrib/gana
Subproject f2babbbdd477eeafb17292e16f335226ea02cb6 Subproject 0958add542378a6ca9c411e2dc19527834e9f64
diff --git a/src/util/crypto_edx25519.c b/src/util/crypto_edx25519.c
index 775b64190..f3c3c33df 100644
--- a/src/util/crypto_edx25519.c
+++ b/src/util/crypto_edx25519.c
@@ -337,7 +337,7 @@ GNUNET_CRYPTO_edx25519_public_key_derive (
337 struct GNUNET_CRYPTO_Edx25519PublicKey *result) 337 struct GNUNET_CRYPTO_Edx25519PublicKey *result)
338{ 338{
339 struct GNUNET_HashCode hc; 339 struct GNUNET_HashCode hc;
340 uint8_t h[64] = { 0 }; 340 uint8_t h[crypto_core_ed25519_SCALARBYTES] = { 0 };
341 341
342 derive_h (pub, 342 derive_h (pub,
343 seed, 343 seed,
@@ -345,7 +345,7 @@ GNUNET_CRYPTO_edx25519_public_key_derive (
345 &hc); 345 &hc);
346 memcpy (h, 346 memcpy (h,
347 &hc, 347 &hc,
348 64); 348 crypto_core_ed25519_SCALARBYTES);
349 crypto_core_ed25519_scalar_reduce (h, 349 crypto_core_ed25519_scalar_reduce (h,
350 h); 350 h);
351 GNUNET_assert (0 == crypto_scalarmult_ed25519_noclamp (result->q_y, 351 GNUNET_assert (0 == crypto_scalarmult_ed25519_noclamp (result->q_y,