From f9b3f95b133dd98289ccd165966896fc0af5860d Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 19 Oct 2021 13:20:03 +0200 Subject: Fix account key derivation. In Ed25519, the secret key is just a seed and not a scalar. It is used both when hashing the message and used to derive the scalar "d" via hashing. Only the scalar "d" needs bit-twiddling. Bit-twiddling the seed doesn't make sense. --- src/util/anastasis_crypto.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src') diff --git a/src/util/anastasis_crypto.c b/src/util/anastasis_crypto.c index 9231fc1..e122c07 100644 --- a/src/util/anastasis_crypto.c +++ b/src/util/anastasis_crypto.c @@ -240,11 +240,6 @@ ANASTASIS_CRYPTO_account_private_key_derive ( GNUNET_break (0); return; } - /* go from ver_secret to proper private key (eddsa_d_to_a() in spec) */ - - priv_key->priv.d[0] &= 0xf8; - priv_key->priv.d[31] &= 0x7f; - priv_key->priv.d[31] |= 0x40; } -- cgit v1.2.3