From: Niels Möller Date: Sat, 23 Sep 2017 19:31:47 +0000 (+0200) Subject: Delete unused pointer edwards_root from struct ecc_curve. X-Git-Tag: nettle_3.6rc1~75^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e7403c54186267b470937f2eadb503d985cd763;p=thirdparty%2Fnettle.git 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. --- diff --git a/ChangeLog b/ChangeLog index 7e126514..3b412639 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2017-09-23 Niels Möller + * 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. diff --git a/ecc-192.c b/ecc-192.c index 1fbbcded..0e79ba23 100644 --- a/ecc-192.c +++ b/ecc-192.c @@ -171,7 +171,6 @@ const struct ecc_curve nettle_secp_192r1 = ecc_b, ecc_g, - NULL, ecc_unit, ecc_table }; diff --git a/ecc-224.c b/ecc-224.c index b1ff0578..f8162483 100644 --- a/ecc-224.c +++ b/ecc-224.c @@ -123,7 +123,6 @@ const struct ecc_curve nettle_secp_224r1 = ecc_b, ecc_g, - NULL, ecc_unit, ecc_table }; diff --git a/ecc-25519.c b/ecc-25519.c index 16073ecf..3e008d04 100644 --- a/ecc-25519.c +++ b/ecc-25519.c @@ -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 }; diff --git a/ecc-256.c b/ecc-256.c index d0870657..1406bad3 100644 --- a/ecc-256.c +++ b/ecc-256.c @@ -300,7 +300,6 @@ const struct ecc_curve nettle_secp_256r1 = ecc_b, ecc_g, - NULL, ecc_unit, ecc_table }; diff --git a/ecc-384.c b/ecc-384.c index 006c4568..eb46cbff 100644 --- a/ecc-384.c +++ b/ecc-384.c @@ -208,7 +208,6 @@ const struct ecc_curve nettle_secp_384r1 = ecc_b, ecc_g, - NULL, ecc_unit, ecc_table }; diff --git a/ecc-521.c b/ecc-521.c index 9d32b54e..99c62fca 100644 --- a/ecc-521.c +++ b/ecc-521.c @@ -136,7 +136,6 @@ const struct ecc_curve nettle_secp_521r1 = ecc_b, ecc_g, - NULL, ecc_unit, ecc_table }; diff --git a/ecc-internal.h b/ecc-internal.h index 5090dec7..9c1ee93e 100644 --- a/ecc-internal.h +++ b/ecc-internal.h @@ -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; diff --git a/eccdata.c b/eccdata.c index 97a61941..b48bdd2d 100644 --- a/eccdata.c +++ b/eccdata.c @@ -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)