Signed-off-by: Dmitry Eremin-Solenikov <[email protected]>
---
 ecc-192.c      | 1 +
 ecc-224.c      | 1 +
 ecc-25519.c    | 1 +
 ecc-256.c      | 1 +
 ecc-384.c      | 1 +
 ecc-521.c      | 1 +
 ecc-internal.h | 1 +
 eccdata.c      | 1 +
 8 files changed, 8 insertions(+)

diff --git a/ecc-192.c b/ecc-192.c
index 0e79ba23ecd3..24b3b9d3bd69 100644
--- a/ecc-192.c
+++ b/ecc-192.c
@@ -169,6 +169,7 @@ const struct ecc_curve nettle_secp_192r1 =
   ecc_mul_g,
   ecc_j_to_a,
 
+  ecc_a,
   ecc_b,
   ecc_g,
   ecc_unit,
diff --git a/ecc-224.c b/ecc-224.c
index f81624837a05..49f5d9cb3aee 100644
--- a/ecc-224.c
+++ b/ecc-224.c
@@ -121,6 +121,7 @@ const struct ecc_curve nettle_secp_224r1 =
   ecc_mul_g,
   ecc_j_to_a,
 
+  ecc_a,
   ecc_b,
   ecc_g,
   ecc_unit,
diff --git a/ecc-25519.c b/ecc-25519.c
index c35178c13605..69f340891bc1 100644
--- a/ecc-25519.c
+++ b/ecc-25519.c
@@ -349,6 +349,7 @@ const struct ecc_curve _nettle_curve25519 =
   ecc_mul_g_eh,
   ecc_eh_to_a,
 
+  ecc_a,
   ecc_b, /* Edwards curve constant. */
   ecc_g,
   ecc_unit,
diff --git a/ecc-256.c b/ecc-256.c
index 1406bad3fe30..4b33257f4294 100644
--- a/ecc-256.c
+++ b/ecc-256.c
@@ -298,6 +298,7 @@ const struct ecc_curve nettle_secp_256r1 =
   ecc_mul_g,
   ecc_j_to_a,
 
+  ecc_a,
   ecc_b,
   ecc_g,
   ecc_unit,
diff --git a/ecc-384.c b/ecc-384.c
index eb46cbffb410..8d6b8fd0f0ae 100644
--- a/ecc-384.c
+++ b/ecc-384.c
@@ -206,6 +206,7 @@ const struct ecc_curve nettle_secp_384r1 =
   ecc_mul_g,
   ecc_j_to_a,
 
+  ecc_a,
   ecc_b,
   ecc_g,
   ecc_unit,
diff --git a/ecc-521.c b/ecc-521.c
index 99c62fca68f8..7ab1f176391a 100644
--- a/ecc-521.c
+++ b/ecc-521.c
@@ -134,6 +134,7 @@ const struct ecc_curve nettle_secp_521r1 =
   ecc_mul_g,
   ecc_j_to_a,
 
+  ecc_a,
   ecc_b,
   ecc_g,
   ecc_unit,
diff --git a/ecc-internal.h b/ecc-internal.h
index 9c1ee93e266a..6475e4803aca 100644
--- a/ecc-internal.h
+++ b/ecc-internal.h
@@ -187,6 +187,7 @@ struct ecc_curve
   ecc_h_to_a_func *h_to_a;
 
   /* Curve constant */
+  int a; /* Used only for key verification */
   const mp_limb_t *b;
   /* Generator, x coordinate followed by y (affine coordinates).
      Currently used only by the test suite. */
diff --git a/eccdata.c b/eccdata.c
index 271be31ee580..56d779f8ca6e 100644
--- a/eccdata.c
+++ b/eccdata.c
@@ -963,6 +963,7 @@ output_curve (const struct ecc_curve *ecc, unsigned 
bits_per_limb)
   printf ("#define ECC_PIPPENGER_C %u\n", ecc->pippenger_c);
 
   output_bignum ("ecc_p", ecc->p, limb_size, bits_per_limb);
+  printf ("#define ecc_a %d\n", ecc->a);
   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);
-- 
2.14.2

_______________________________________________
nettle-bugs mailing list
[email protected]
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs

Reply via email to