summaryrefslogtreecommitdiff
path: root/ecc-point-mul.c
diff options
context:
space:
mode:
Diffstat (limited to 'ecc-point-mul.c')
-rw-r--r--ecc-point-mul.c3
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);