Merge pull request #4614 from SparkiDev/sp_exp_nct

SP math all: fix exponent bit count
This commit is contained in:
David Garske
2021-11-30 08:26:41 -08:00
committed by GitHub

View File

@ -9285,7 +9285,7 @@ int sp_exptmod_nct(sp_int* b, sp_int* e, sp_int* m, sp_int* r)
} }
#if !defined(WOLFSSL_RSA_VERIFY_ONLY) && !defined(WOLFSSL_RSA_PUBLIC_ONLY) #if !defined(WOLFSSL_RSA_VERIFY_ONLY) && !defined(WOLFSSL_RSA_PUBLIC_ONLY)
else if (mp_iseven(m)) { else if (mp_iseven(m)) {
err = _sp_exptmod_ex(b, e, e->used, m, r); err = _sp_exptmod_ex(b, e, e->used * SP_WORD_SIZE, m, r);
} }
#endif #endif
else { else {