2014-08-23 Niels Möller <nisse@lysator.liu.se>
+ * ecc-internal.h (struct ecc_curve): Reordered struct, moved
+ function pointers before pointers to bignum constants.
+
* sec-modinv.c (sec_modinv): Document that for a == 0 (mod m), we
should produce the "inverse" 0.
ECC_REDC_SIZE,
ECC_PIPPENGER_K,
ECC_PIPPENGER_C,
+
+ ecc_192_modp,
+ ecc_generic_redc,
+ ecc_192_modp,
+ ecc_generic_modq,
+
ecc_p,
ecc_b,
ecc_q,
ecc_g,
ecc_redc_g,
NULL,
- ecc_192_modp,
- ecc_generic_redc,
- ecc_192_modp,
- ecc_generic_modq,
ecc_Bmodp,
ecc_Bmodp_shifted,
ecc_pp1h,
ECC_REDC_SIZE,
ECC_PIPPENGER_K,
ECC_PIPPENGER_C,
+
+ ecc_224_modp,
+ ecc_generic_redc,
+ USE_REDC ? ecc_generic_redc : ecc_224_modp,
+ ecc_generic_modq,
+
ecc_p,
ecc_b,
ecc_q,
ecc_g,
ecc_redc_g,
NULL,
- ecc_224_modp,
- ecc_generic_redc,
- USE_REDC ? ecc_generic_redc : ecc_224_modp,
- ecc_generic_modq,
ecc_Bmodp,
ecc_Bmodp_shifted,
ecc_pp1h,
0,
ECC_PIPPENGER_K,
ECC_PIPPENGER_C,
+
+ ecc_25519_modp,
+ NULL,
+ ecc_25519_modp,
+ NULL,
+
ecc_p,
ecc_d, /* Use the Edwards curve constant. */
ecc_q,
ecc_g,
ecc_redc_g,
ecc_edwards,
- ecc_25519_modp,
- NULL,
- ecc_25519_modp,
- NULL,
ecc_Bmodp,
ecc_Bmodp_shifted,
ecc_pp1h,
ECC_REDC_SIZE,
ECC_PIPPENGER_K,
ECC_PIPPENGER_C,
+
+ ecc_256_modp,
+ ecc_256_redc,
+ USE_REDC ? ecc_256_redc : ecc_256_modp,
+ ecc_256_modq,
+
ecc_p,
ecc_b,
ecc_q,
ecc_g,
ecc_redc_g,
NULL,
- ecc_256_modp,
- ecc_256_redc,
- USE_REDC ? ecc_256_redc : ecc_256_modp,
- ecc_256_modq,
ecc_Bmodp,
ecc_Bmodp_shifted,
ecc_pp1h,
ECC_REDC_SIZE,
ECC_PIPPENGER_K,
ECC_PIPPENGER_C,
+
+ ecc_384_modp,
+ ECC_REDC_SIZE != 0 ? ecc_generic_redc : NULL,
+ ecc_384_modp,
+ ecc_generic_modq,
+
ecc_p,
ecc_b,
ecc_q,
ecc_g,
ecc_redc_g,
NULL,
- ecc_384_modp,
- ECC_REDC_SIZE != 0 ? ecc_generic_redc : NULL,
- ecc_384_modp,
- ecc_generic_modq,
ecc_Bmodp,
ecc_Bmodp_shifted,
ecc_pp1h,
ECC_REDC_SIZE,
ECC_PIPPENGER_K,
ECC_PIPPENGER_C,
+
+ ecc_521_modp,
+ ecc_generic_redc,
+ ecc_521_modp,
+ ecc_generic_modq,
+
ecc_p,
ecc_b,
ecc_q,
ecc_g,
ecc_redc_g,
NULL,
- ecc_521_modp,
- ecc_generic_redc,
- ecc_521_modp,
- ecc_generic_modq,
ecc_Bmodp,
ecc_Bmodp_shifted,
ecc_pp1h,
unsigned short pippenger_k;
unsigned short pippenger_c;
+ ecc_mod_func *modp;
+ ecc_mod_func *redc;
+ ecc_mod_func *reduce;
+ ecc_mod_func *modq;
+
/* The prime p. */
const mp_limb_t *p;
const mp_limb_t *b;
equivalent Edwards curve. */
const mp_limb_t *edwards_root;
- ecc_mod_func *modp;
- ecc_mod_func *redc;
- ecc_mod_func *reduce;
- ecc_mod_func *modq;
-
/* B^size mod p. Expected to have at least 32 leading zeros
(equality for secp_256r1). */
const mp_limb_t *Bmodp;