diff options
author | Niels Möller <nisse@lysator.liu.se> | 2021-11-11 19:52:30 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2021-11-11 19:52:30 +0100 |
commit | 5b2758a3f82a2d4f7f48546b93ba415490581faa (patch) | |
tree | cb125166f03b8314d9d5f61942f2e06a1ecbe466 | |
parent | b3abfac5f28a582c1cff54fbc6200b9aa3306b33 (diff) | |
download | nettle-5b2758a3f82a2d4f7f48546b93ba415490581faa.tar.gz |
eccdata: Delete generation of unused values ecc_sqrt_t and ECC_SQRT_T_BITS.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | eccdata.c | 9 |
2 files changed, 7 insertions, 7 deletions
@@ -1,3 +1,8 @@ +2021-11-11 Niels Möller <nisse@lysator.liu.se> + + * eccdata.c (output_curve): Delete generation of unused values + ecc_sqrt_t and ECC_SQRT_T_BITS. + 2021-11-10 Niels Möller <nisse@lysator.liu.se> * eccdata.c (output_bignum_redc): New function. @@ -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"); |