]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Delete unused pointer edwards_root from struct ecc_curve.
authorNiels Möller <nisse@lysator.liu.se>
Sat, 23 Sep 2017 19:31:47 +0000 (21:31 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Sat, 23 Sep 2017 19:31:47 +0000 (21:31 +0200)
* ecc-internal.h (struct ecc_curve): Delete unused pointer
edwards_root. Update all instances.
* eccdata.c (output_curve): Don't output it.

ChangeLog
ecc-192.c
ecc-224.c
ecc-25519.c
ecc-256.c
ecc-384.c
ecc-521.c
ecc-internal.h
eccdata.c

index 7e126514081aed18a647db52ac233f2d09e9aff2..3b412639861c20ae3ffd3822e0fb2da426998030 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 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.
index 1fbbcded536c330f81a40742069027500ef09b4a..0e79ba23ecd38a9e4c76e377fa4d9b62c9e85ec6 100644 (file)
--- 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
 };
index b1ff0578eda858ac40ef19f1e3e7646463fc5572..f81624837a05f9f7b169c8b6f81045d93737f34d 100644 (file)
--- 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
 };
index 16073ecf31c4b67565a9eec9e88439017229d014..3e008d04143daa9cd5ed85d2c21d615031879c2c 100644 (file)
@@ -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
 };
index d08706576afd2012905fe348afeb3b916ee0e2ff..1406bad3fe307d96d33bc0ec46d641caf03d48cb 100644 (file)
--- 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
 };
index 006c4568c2ab6392663ad8a2a36960069a840828..eb46cbffb4103448cdf9a80e7450d6919dbd1522 100644 (file)
--- 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
 };
index 9d32b54e0b7b8421878e6ffae5f4e57f84b2ca66..99c62fca68f8ad05368411359a4d39c095bedc0b 100644 (file)
--- 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
 };
index 5090dec734262d632096d4f6789dcd9a19b11f56..9c1ee93e266ac6600848ec2a39ea3415b3fa9fdb 100644 (file)
@@ -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;
index 97a6194116e6f99ccce27c8bda3280e889ffaaaf..b48bdd2d9b1b2c4b8941205bb4e1c234011c646d 100644 (file)
--- 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)