summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2021-03-09 18:26:28 +0100
committerMartin Schanzenbach <mschanzenbach@posteo.de>2021-03-09 18:26:28 +0100
commit0b2c0f22fa516e101874d8ee7c2cdc7113da418a (patch)
tree256dca3f9f0e1c7d1255be82df4c103cb902a16e
parent3583e51e3c4a6fb4bac331996891a7f7cd42f9cf (diff)
IDENTITY: Fix wrong key construction for anonymous ECDSA identity
-rw-r--r--src/util/crypto_ecc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/crypto_ecc.c b/src/util/crypto_ecc.c
index bc58142c2..7110a2c4d 100644
--- a/src/util/crypto_ecc.c
+++ b/src/util/crypto_ecc.c
@@ -476,6 +476,10 @@ GNUNET_CRYPTO_ecdsa_key_get_anonymous ()
GNUNET_CRYPTO_mpi_print_unsigned (anonymous.d,
sizeof(anonymous.d),
GCRYMPI_CONST_ONE);
+ anonymous.d[0] &= 248;
+ anonymous.d[31] &= 127;
+ anonymous.d[31] |= 64;
+
once = 1;
return &anonymous;
}