Remove num_bytes member from curve structure

Reduces code size and size of the structure.
This commit is contained in:
Manuel Pégourié-Gonnard 2019-11-21 09:34:09 +01:00
parent 1765933ab2
commit 72c1764c00
4 changed files with 22 additions and 23 deletions

View file

@ -124,7 +124,6 @@ typedef uint64_t uECC_dword_t;
struct uECC_Curve_t;
typedef const struct uECC_Curve_t * uECC_Curve;
struct uECC_Curve_t {
wordcount_t num_bytes;
bitcount_t num_n_bits;
uECC_word_t p[NUM_ECC_WORDS];
uECC_word_t n[NUM_ECC_WORDS];
@ -159,7 +158,6 @@ void vli_mmod_fast_secp256r1(unsigned int *result, unsigned int *product);
/* definition of curve NIST p-256: */
static const struct uECC_Curve_t curve_secp256r1 = {
NUM_ECC_BYTES,
256, /* num_n_bits */ {
BYTES_TO_WORDS_8(FF, FF, FF, FF, FF, FF, FF, FF),
BYTES_TO_WORDS_8(FF, FF, FF, FF, 00, 00, 00, 00),