Added `ecc_mul2add` to ecc.h header and is exposed as an API if `WOLFSSL_PUBLIC_ECC_ADD_DBL` is defined.

This commit is contained in:
David Garske 2018-02-15 07:04:29 -08:00
parent ad1fc26d4e
commit 32547e280a
2 changed files with 5 additions and 5 deletions

View File

@ -984,10 +984,6 @@ static int wc_ecc_export_x963_compressed(ecc_key*, byte* out, word32* outLen);
#ifndef WOLFSSL_SP_MATH
static int ecc_check_pubkey_order(ecc_key* key, ecc_point* pubkey, mp_int* a,
mp_int* prime, mp_int* order);
#ifdef ECC_SHAMIR
static int ecc_mul2add(ecc_point* A, mp_int* kA, ecc_point* B, mp_int* kB,
ecc_point* C, mp_int* a, mp_int* modulus, void* heap);
#endif
#endif
int mp_jacobi(mp_int* a, mp_int* n, int* c);
@ -3921,7 +3917,7 @@ static int normal_ecc_mul2add(ecc_point* A, mp_int* kA,
ecc_point* C, mp_int* a, mp_int* modulus,
void* heap)
#else
static int ecc_mul2add(ecc_point* A, mp_int* kA,
int ecc_mul2add(ecc_point* A, mp_int* kA,
ecc_point* B, mp_int* kB,
ecc_point* C, mp_int* a, mp_int* modulus,
void* heap)

View File

@ -335,6 +335,10 @@ const char* wc_ecc_get_name(int curve_id);
#define ECC_API WOLFSSL_LOCAL
#endif
ECC_API int ecc_mul2add(ecc_point* A, mp_int* kA,
ecc_point* B, mp_int* kB,
ecc_point* C, mp_int* a, mp_int* modulus, void* heap);
ECC_API int ecc_map(ecc_point*, mp_int*, mp_digit);
ECC_API int ecc_projective_add_point(ecc_point* P, ecc_point* Q, ecc_point* R,
mp_int* a, mp_int* modulus, mp_digit mp);