From bbc64730490afbb7d6c14813a2d0944b8d6d7c19 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niels=20M=C3=B6ller?= Date: Thu, 2 Jan 2020 19:24:45 +0100 Subject: [PATCH] Add dom string to struct ecc_eddsa. --- ChangeLog | 5 +++++ ed25519-sha512.c | 1 + eddsa-internal.h | 2 ++ 3 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index b7624be5..b5db3abb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2020-01-02 Niels Möller + + * eddsa-internal.h (struct ecc_eddsa): Add magic "dom" string, + needed for ed448. + 2020-01-01 Niels Möller * ecc-448.c (ecc_mod_pow_2kp1): New function. diff --git a/ed25519-sha512.c b/ed25519-sha512.c index c1dd6831..09d0f8a5 100644 --- a/ed25519-sha512.c +++ b/ed25519-sha512.c @@ -42,6 +42,7 @@ const struct ecc_eddsa _nettle_ed25519_sha512 = { (nettle_hash_update_func *) sha512_update, (nettle_hash_digest_func *) sha512_digest, + NULL, 0, ~(mp_limb_t) 7, (mp_limb_t) 1 << (254 % GMP_NUMB_BITS), }; diff --git a/eddsa-internal.h b/eddsa-internal.h index 9c0a1eca..4dd441f0 100644 --- a/eddsa-internal.h +++ b/eddsa-internal.h @@ -58,6 +58,8 @@ struct ecc_eddsa /* Hash function to use */ nettle_hash_update_func *update; nettle_hash_digest_func *digest; + const uint8_t *dom; + unsigned dom_size; /* For generating the secret scalar */ mp_limb_t low_mask; mp_limb_t high_bit; -- 2.47.2