SP math all: fix exponent bit count

Only when using non-constant time implementation and modulus even.
This commit is contained in:
Sean Parkinson
2021-11-30 10:28:42 +10:00
parent 7221e06ff7
commit e5e280b175

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)
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
else {