From: Niels Möller Date: Tue, 23 Sep 2014 11:49:07 +0000 (+0200) Subject: Fixed scratch allocation in test_ecc_mul_h. X-Git-Tag: nettle_3.1rc1~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf52911d41f394f69edd3ae8acf8d9d261e16d27;p=thirdparty%2Fnettle.git Fixed scratch allocation in test_ecc_mul_h. --- diff --git a/ChangeLog b/ChangeLog index 0c97135f..6aab4252 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2014-09-23 Niels Möller + * testsuite/testutils.c (test_ecc_mul_h): Use ecc->h_to_a_itch. + * ecc-mod-inv.c (ecc_mod_inv): Interface change, make ap input const, and require 2n limbs at rp. Preparing for powm-based alternative implementations. Drop #if:ed out code and dp diff --git a/testsuite/testutils.c b/testsuite/testutils.c index e30f76da..c082e408 100644 --- a/testsuite/testutils.c +++ b/testsuite/testutils.c @@ -1436,7 +1436,7 @@ test_ecc_mul_h (unsigned curve, unsigned n, const mp_limb_t *p) { const struct ecc_curve *ecc = ecc_curves[curve]; mp_limb_t *np = xalloc_limbs (ecc_size_a (ecc)); - mp_limb_t *scratch = xalloc_limbs (ecc_j_to_a_itch(ecc)); + mp_limb_t *scratch = xalloc_limbs (ecc->h_to_a_itch); ecc->h_to_a (ecc, 0, np, p, scratch); test_ecc_mul_a (curve, n, np);