Commit 4e7403c5 authored by Niels Möller's avatar Niels Möller

Delete unused pointer edwards_root from struct ecc_curve.

* ecc-internal.h (struct ecc_curve): Delete unused pointer
edwards_root. Update all instances.
* eccdata.c (output_curve): Don't output it.
parent c33b0ea6
2017-09-23 Niels Möller <nisse@lysator.liu.se>
* ecc-internal.h (struct ecc_curve): Delete unused pointer
edwards_root. Update all instances.
* eccdata.c (output_curve): Don't output it.
* testsuite/ecc-add-test.c (test_main): Reduce test duplication.
Use ecc->add_hhh_itch.
* testsuite/ecc-dup-test.c (test_main): Reduce test duplication.
......
......@@ -171,7 +171,6 @@ const struct ecc_curve nettle_secp_192r1 =
ecc_b,
ecc_g,
NULL,
ecc_unit,
ecc_table
};
......
......@@ -123,7 +123,6 @@ const struct ecc_curve nettle_secp_224r1 =
ecc_b,
ecc_g,
NULL,
ecc_unit,
ecc_table
};
......@@ -351,7 +351,6 @@ const struct ecc_curve _nettle_curve25519 =
ecc_d, /* Use the Edwards curve constant. */
ecc_g,
ecc_edwards,
ecc_unit,
ecc_table
};
......@@ -300,7 +300,6 @@ const struct ecc_curve nettle_secp_256r1 =
ecc_b,
ecc_g,
NULL,
ecc_unit,
ecc_table
};
......@@ -208,7 +208,6 @@ const struct ecc_curve nettle_secp_384r1 =
ecc_b,
ecc_g,
NULL,
ecc_unit,
ecc_table
};
......@@ -136,7 +136,6 @@ const struct ecc_curve nettle_secp_521r1 =
ecc_b,
ecc_g,
NULL,
ecc_unit,
ecc_table
};
......
......@@ -191,9 +191,6 @@ struct ecc_curve
/* Generator, x coordinate followed by y (affine coordinates).
Currently used only by the test suite. */
const mp_limb_t *g;
/* If non-NULL, the constant needed for transformation to the
equivalent Edwards curve. */
const mp_limb_t *edwards_root;
/* For redc, same as B mod p, otherwise 1. */
const mp_limb_t *unit;
......
......@@ -1036,9 +1036,6 @@ output_curve (const struct ecc_curve *ecc, unsigned bits_per_limb)
mpz_fdiv_q_2exp (t, t, 1);
output_bignum ("ecc_qp1h", t, limb_size, bits_per_limb);
if (ecc->use_edwards)
output_bignum ("ecc_edwards", ecc->t, limb_size, bits_per_limb);
/* Trailing zeros in p+1 correspond to trailing ones in p. */
redc_limbs = mpz_scan0 (ecc->p, 0) / bits_per_limb;
if (redc_limbs > 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment