summaryrefslogtreecommitdiff
path: root/eccdata.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2020-01-25 20:04:33 +0100
committerNiels Möller <nisse@lysator.liu.se>2020-01-25 20:04:33 +0100
commit5694b1e418f82869e67eb06ba6c4784c0755df5b (patch)
treebef9535d49958b4869b764a60e1a105329e574c9 /eccdata.c
parent684be413c69c061044574e0601216b4e209f5bab (diff)
downloadnettle-5694b1e418f82869e67eb06ba6c4784c0755df5b.tar.gz
Delete definition of ecc->g
Diffstat (limited to 'eccdata.c')
-rw-r--r--eccdata.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/eccdata.c b/eccdata.c
index d76a42bc..aff5aaef 100644
--- 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");