diff --git a/wolfcrypt/src/tfm.c b/wolfcrypt/src/tfm.c index 0656f760c..bfa37f6b3 100644 --- a/wolfcrypt/src/tfm.c +++ b/wolfcrypt/src/tfm.c @@ -3026,12 +3026,6 @@ int mp_read_radix(mp_int *a, const char *str, int radix) return fp_read_radix(a, str, radix); } -/* fast math conversion */ -void mp_set(fp_int *a, fp_digit b) -{ - fp_set(a,b); -} - /* fast math conversion */ int mp_sqr(fp_int *A, fp_int *B) { @@ -3077,6 +3071,14 @@ int mp_cnt_lsb(fp_int* a) #endif /* HAVE_ECC */ +#if defined(HAVE_ECC) || !defined(NO_RSA) || !defined(NO_DSA) +/* fast math conversion */ +void mp_set(fp_int *a, fp_digit b) +{ + fp_set(a,b); +} +#endif + #if defined(WOLFSSL_KEY_GEN) || defined(HAVE_COMP_KEY) || \ defined(WOLFSSL_DEBUG_MATH) diff --git a/wolfssl/wolfcrypt/tfm.h b/wolfssl/wolfcrypt/tfm.h index f5df3bf12..b8748deae 100644 --- a/wolfssl/wolfcrypt/tfm.h +++ b/wolfssl/wolfcrypt/tfm.h @@ -660,7 +660,6 @@ int mp_radix_size (mp_int * a, int radix, int *size); #ifdef HAVE_ECC int mp_read_radix(mp_int* a, const char* str, int radix); - void mp_set(fp_int *a, fp_digit b); int mp_sqr(fp_int *a, fp_int *b); int mp_montgomery_reduce(fp_int *a, fp_int *m, fp_digit mp); int mp_montgomery_setup(fp_int *a, fp_digit *rho); @@ -668,6 +667,10 @@ int mp_radix_size (mp_int * a, int radix, int *size); int mp_init_copy(fp_int * a, fp_int * b); #endif +#if defined(HAVE_ECC) || !defined(NO_RSA) || !defined(NO_DSA) + void mp_set(fp_int *a, fp_digit b); +#endif + #if defined(HAVE_ECC) || defined(WOLFSSL_KEY_GEN) int mp_sqrmod(mp_int* a, mp_int* b, mp_int* c); int mp_montgomery_calc_normalization(mp_int *a, mp_int *b);