summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2021-11-11 19:52:30 +0100
committerNiels Möller <nisse@lysator.liu.se>2021-11-11 19:52:30 +0100
commit5b2758a3f82a2d4f7f48546b93ba415490581faa (patch)
treecb125166f03b8314d9d5f61942f2e06a1ecbe466
parentb3abfac5f28a582c1cff54fbc6200b9aa3306b33 (diff)
downloadnettle-5b2758a3f82a2d4f7f48546b93ba415490581faa.tar.gz
eccdata: Delete generation of unused values ecc_sqrt_t and ECC_SQRT_T_BITS.
-rw-r--r--ChangeLog5
-rw-r--r--eccdata.c9
2 files changed, 7 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 07a8fa36..37e78eea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
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");