]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
eccdata: Delete generation of unused values ecc_sqrt_t and ECC_SQRT_T_BITS.
authorNiels Möller <nisse@lysator.liu.se>
Thu, 11 Nov 2021 18:52:30 +0000 (19:52 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Thu, 11 Nov 2021 18:52:30 +0000 (19:52 +0100)
ChangeLog
eccdata.c

index 07a8fa36c7ce779d9b70800659e37aefd2927fe4..37e78eea41611f08c0d9b0eb7240d1756c8dafb5 100644 (file)
--- 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.
index d99d92da592f8534dbf232727ff57442f2170413..b20fef2c2e836957db0c4ad0fed405b48b32c55b 100644 (file)
--- 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");