+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.
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
{
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");