Merge pull request #1374 from dgarske/pub_ecc_mul2add

Add option for `ecc_mul2add` to be made as exposed API
This commit is contained in:
toddouska
2018-02-15 14:21:42 -08:00
committed by GitHub
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);