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 /ecc-point-mul.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 'ecc-point-mul.c')
-rw-r--r-- | ecc-point-mul.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ecc-point-mul.c b/ecc-point-mul.c index deb7d8ad..d297602e 100644 --- a/ecc-point-mul.c +++ b/ecc-point-mul.c @@ -46,11 +46,12 @@ ecc_point_mul (struct ecc_point *r, const struct ecc_scalar *n, { const struct ecc_curve *ecc = r->ecc; mp_limb_t size = ecc->p.size; - mp_size_t itch = 3*size + ECC_MAX(ecc->mul_itch, ecc->h_to_a_itch); + mp_size_t itch = 3*size + ecc->mul_itch; mp_limb_t *scratch = gmp_alloc_limbs (itch); assert (n->ecc == ecc); assert (p->ecc == ecc); + assert (ecc->h_to_a_itch <= ecc->mul_itch); ecc->mul (ecc, scratch, n->p, p->p, scratch + 3*size); ecc->h_to_a (ecc, 0, r->p, scratch, scratch + 3*size); |