diff options
author | Niels Möller <nisse@lysator.liu.se> | 2019-12-09 19:28:15 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2019-12-09 19:28:15 +0100 |
commit | a5e0d46377dd0c0331c3990ef7ce377564726919 (patch) | |
tree | 8f81bbec3a62b71edbbf8e03728833775fa8a96d /ecdsa-keygen.c | |
parent | b5ae97a8892fd4ad2021d58d4af87d95314a8f44 (diff) | |
download | nettle-a5e0d46377dd0c0331c3990ef7ce377564726919.tar.gz |
Revert itch macro changes.curve448
We now have h_to_a_itch <= mul_itch, mul_g_itch. Add asserts at a few
places relying on this.
(ECC_ECDSA_KEYGEN_ITCH, ECC_MAX): Delete macros.
(ECC_ECDSA_SIGN_ITCH): Revert previous change.
Diffstat (limited to 'ecdsa-keygen.c')
-rw-r--r-- | ecdsa-keygen.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ecdsa-keygen.c b/ecdsa-keygen.c index aa2dfb08..870282b0 100644 --- a/ecdsa-keygen.c +++ b/ecdsa-keygen.c @@ -47,11 +47,12 @@ ecdsa_generate_keypair (struct ecc_point *pub, struct ecc_scalar *key, void *random_ctx, nettle_random_func *random) { - TMP_DECL(p, mp_limb_t, 3*ECC_MAX_SIZE + ECC_ECDSA_KEYGEN_ITCH (ECC_MAX_SIZE)); + TMP_DECL(p, mp_limb_t, 3*ECC_MAX_SIZE + ECC_MUL_G_ITCH (ECC_MAX_SIZE)); const struct ecc_curve *ecc = pub->ecc; - mp_size_t itch = 3*ecc->p.size + ECC_ECDSA_KEYGEN_ITCH (ecc->p.size); + mp_size_t itch = 3*ecc->p.size + ecc->mul_g_itch; assert (key->ecc == ecc); + assert (ecc->h_to_a_itch <= ecc->mul_g_itch); TMP_ALLOC (p, itch); |