From: Niels Möller Date: Thu, 11 Nov 2021 18:52:30 +0000 (+0100) Subject: eccdata: Delete generation of unused values ecc_sqrt_t and ECC_SQRT_T_BITS. X-Git-Tag: nettle_3.8_release_20220602~73 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=5b2758a3f82a2d4f7f48546b93ba415490581faa;p=thirdparty%2Fnettle.git eccdata: Delete generation of unused values ecc_sqrt_t and ECC_SQRT_T_BITS. --- diff --git a/ChangeLog b/ChangeLog index 07a8fa36..37e78eea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2021-11-11 Niels Möller + + * eccdata.c (output_curve): Delete generation of unused values + ecc_sqrt_t and ECC_SQRT_T_BITS. + 2021-11-10 Niels Möller * eccdata.c (output_bignum_redc): New function. diff --git a/eccdata.c b/eccdata.c index d99d92da..b20fef2c 100644 --- a/eccdata.c +++ b/eccdata.c @@ -1307,10 +1307,8 @@ output_curve (const struct ecc_curve *ecc, unsigned bits_per_limb) if (mpz_fdiv_ui (ecc->p, 4) == 3) { /* x = a^{(p+1)/4} gives square root of a (if it exists, - otherwise the square root of -a). */ - e = 1; - mpz_add_ui (t, ecc->p, 1); - mpz_fdiv_q_2exp (t, t, 2); + otherwise the square root of -a). We use no precomputed + values for this. */ } else { @@ -1351,9 +1349,6 @@ output_curve (const struct ecc_curve *ecc, unsigned bits_per_limb) mpz_clear (s); } printf ("#define ECC_SQRT_E %u\n", e); - printf ("#define ECC_SQRT_T_BITS %u\n", - (unsigned) mpz_sizeinbase (t, 2)); - output_bignum ("ecc_sqrt_t", t, limb_size, bits_per_limb); printf ("#if USE_REDC\n"); printf ("#define ecc_unit ecc_Bmodp\n");