Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Maamoun TK
nettle
Commits
5694b1e4
Commit
5694b1e4
authored
Jan 25, 2020
by
Niels Möller
Browse files
Delete definition of ecc->g
parent
684be413
Changes
9
Hide whitespace changes
Inline
Side-by-side
ecc-curve25519.c
View file @
5694b1e4
...
...
@@ -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
};
ecc-curve448.c
View file @
5694b1e4
...
...
@@ -328,7 +328,6 @@ const struct ecc_curve _nettle_curve448 =
ecc_eh_to_a
,
ecc_b
,
ecc_g
,
ecc_unit
,
ecc_table
};
ecc-internal.h
View file @
5694b1e4
...
...
@@ -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
;
...
...
ecc-secp192r1.c
View file @
5694b1e4
...
...
@@ -170,7 +170,6 @@ const struct ecc_curve _nettle_secp_192r1 =
ecc_j_to_a
,
ecc_b
,
ecc_g
,
ecc_unit
,
ecc_table
};
...
...
ecc-secp224r1.c
View file @
5694b1e4
...
...
@@ -122,7 +122,6 @@ const struct ecc_curve _nettle_secp_224r1 =
ecc_j_to_a
,
ecc_b
,
ecc_g
,
ecc_unit
,
ecc_table
};
...
...
ecc-secp256r1.c
View file @
5694b1e4
...
...
@@ -299,7 +299,6 @@ const struct ecc_curve _nettle_secp_256r1 =
ecc_j_to_a
,
ecc_b
,
ecc_g
,
ecc_unit
,
ecc_table
};
...
...
ecc-secp384r1.c
View file @
5694b1e4
...
...
@@ -207,7 +207,6 @@ const struct ecc_curve _nettle_secp_384r1 =
ecc_j_to_a
,
ecc_b
,
ecc_g
,
ecc_unit
,
ecc_table
};
...
...
ecc-secp521r1.c
View file @
5694b1e4
...
...
@@ -135,7 +135,6 @@ const struct ecc_curve _nettle_secp_521r1 =
ecc_j_to_a
,
ecc_b
,
ecc_g
,
ecc_unit
,
ecc_table
};
...
...
eccdata.c
View file @
5694b1e4
...
...
@@ -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
"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment