]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Delete definition of ecc->g
authorNiels Möller <nisse@lysator.liu.se>
Sat, 25 Jan 2020 19:04:33 +0000 (20:04 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Sat, 25 Jan 2020 19:04:33 +0000 (20:04 +0100)
ecc-curve25519.c
ecc-curve448.c
ecc-internal.h
ecc-secp192r1.c
ecc-secp224r1.c
ecc-secp256r1.c
ecc-secp384r1.c
ecc-secp521r1.c
eccdata.c

index 0ad3017c9ebc699ddc0de8093f6b65890b02edd5..f8f2c64af8680f39c83cbeab2e94eb90e7b38774 100644 (file)
@@ -350,7 +350,6 @@ const struct ecc_curve _nettle_curve25519 =
   ecc_eh_to_a,
 
   ecc_b, /* Edwards curve constant. */
-  ecc_g,
   ecc_unit,
   ecc_table
 };
index c31a0eb26ba486c5a6d4c3803c4a6c58bfaf2c41..484b7d1e08700a8e7ff57d988c1b59aa077e3386 100644 (file)
@@ -328,7 +328,6 @@ const struct ecc_curve _nettle_curve448 =
   ecc_eh_to_a,
 
   ecc_b,
-  ecc_g,
   ecc_unit,
   ecc_table
 };
index c918632df292007d652b4446e8249b9db68f8d4f..31aa056e52e608ab48a5f1b2a2ea42fcd576bf46 100644 (file)
@@ -200,9 +200,6 @@ struct ecc_curve
 
   /* Curve constant */
   const mp_limb_t *b;
-  /* Generator, x coordinate followed by y (affine coordinates).
-     Currently used only by the test suite. */
-  const mp_limb_t *g;
 
   /* For redc, same as B mod p, otherwise 1. */
   const mp_limb_t *unit;
index 094074d73ed7ea7737da28815d202ab6a4b4abfa..046026f3f697575f63121f4e513fcdaa22b07016 100644 (file)
@@ -170,7 +170,6 @@ const struct ecc_curve _nettle_secp_192r1 =
   ecc_j_to_a,
 
   ecc_b,
-  ecc_g,
   ecc_unit,
   ecc_table
 };
index e6b43fa61f42a079baf18953d28e563da8c22ea3..05d84017a68a6390e89ebdebabcc06081e5b9418 100644 (file)
@@ -122,7 +122,6 @@ const struct ecc_curve _nettle_secp_224r1 =
   ecc_j_to_a,
 
   ecc_b,
-  ecc_g,
   ecc_unit,
   ecc_table
 };
index 6c776a729aea9a9aad1c22b33c078f87e001009e..d399642453d59599525e41eecb066a5e1a5c75a3 100644 (file)
@@ -299,7 +299,6 @@ const struct ecc_curve _nettle_secp_256r1 =
   ecc_j_to_a,
 
   ecc_b,
-  ecc_g,
   ecc_unit,
   ecc_table
 };
index c4a75564bf58dfbfe6bbdcfc130fe0a7e1569bca..54bcd1128d3908bae35f0b99d5a564d0b4d83c02 100644 (file)
@@ -207,7 +207,6 @@ const struct ecc_curve _nettle_secp_384r1 =
   ecc_j_to_a,
 
   ecc_b,
-  ecc_g,
   ecc_unit,
   ecc_table
 };
index 74688008959b04ade524ae33f02d8e076dbc7ad3..776f7ae03e27ac680f3640f9d45d0024bd9a9001 100644 (file)
@@ -135,7 +135,6 @@ const struct ecc_curve _nettle_secp_521r1 =
   ecc_j_to_a,
 
   ecc_b,
-  ecc_g,
   ecc_unit,
   ecc_table
 };
index d76a42bcde6fa06ecc48c3d267b1529231285750..aff5aaef6ecafabe6573485894cfbede35c3186f 100644 (file)
--- a/eccdata.c
+++ b/eccdata.c
@@ -1041,7 +1041,7 @@ output_bignum (const char *name, const mpz_t x,
 }
 
 static void
-output_point (const char *name, const struct ecc_curve *ecc,
+output_point (const struct ecc_curve *ecc,
              const struct ecc_point *p, int use_redc,
              unsigned size, unsigned bits_per_limb)
 {
@@ -1051,9 +1051,6 @@ output_point (const char *name, const struct ecc_curve *ecc,
   mpz_init (y);
   mpz_init (t);
  
-  if (name)
-    printf("static const mp_limb_t %s[%u] = {", name, 2*size);
-
   mpz_set (x, p->x);
   mpz_set (y, p->y);
 
@@ -1068,9 +1065,6 @@ output_point (const char *name, const struct ecc_curve *ecc,
   output_digits (x, size, bits_per_limb);
   output_digits (y, size, bits_per_limb);
 
-  if (name)
-    printf("\n};\n");
-
   mpz_clear (x);
   mpz_clear (y);
   mpz_clear (t);
@@ -1115,7 +1109,6 @@ output_curve (const struct ecc_curve *ecc, unsigned bits_per_limb)
   output_bignum ("ecc_p", ecc->p, limb_size, bits_per_limb);
   output_bignum ("ecc_b", ecc->b, limb_size, bits_per_limb);
   output_bignum ("ecc_q", ecc->q, limb_size, bits_per_limb);
-  output_point ("ecc_g", ecc, &ecc->g, 0, limb_size, bits_per_limb);
   
   bits = output_modulo ("ecc_Bmodp", ecc->p, limb_size, bits_per_limb);
   printf ("#define ECC_BMODP_SIZE %u\n",
@@ -1289,7 +1282,7 @@ output_curve (const struct ecc_curve *ecc, unsigned bits_per_limb)
   printf ("static const mp_limb_t ecc_table[%lu] = {",
         (unsigned long) (2*ecc->table_size * limb_size));
   for (i = 0; i < ecc->table_size; i++)
-    output_point (NULL, ecc, &ecc->table[i], 1, limb_size, bits_per_limb);
+    output_point (ecc, &ecc->table[i], 1, limb_size, bits_per_limb);
 
   printf("\n};\n");
 
@@ -1301,7 +1294,7 @@ output_curve (const struct ecc_curve *ecc, unsigned bits_per_limb)
   printf ("static const mp_limb_t ecc_table[%lu] = {",
         (unsigned long) (2*ecc->table_size * limb_size));
   for (i = 0; i < ecc->table_size; i++)
-    output_point (NULL, ecc, &ecc->table[i], 0, limb_size, bits_per_limb);
+    output_point (ecc, &ecc->table[i], 0, limb_size, bits_per_limb);
 
   printf("\n};\n");
   printf ("#endif\n");