forked from wolfSSL/wolfssl
RSA ct test: force RsaFunctionCheckIn to not be inlined
In non-debug compilation, RsaFunctionCheckIn may be inlined. The function operates on the input - value to exponentiate. Constant time testing excludes all operations in this function.
This commit is contained in:
@ -3082,7 +3082,7 @@ int cc310_RsaSSL_Verify(const byte* in, word32 inLen, byte* sig,
|
|||||||
#ifndef WOLF_CRYPTO_CB_ONLY_RSA
|
#ifndef WOLF_CRYPTO_CB_ONLY_RSA
|
||||||
#if !defined(WOLFSSL_RSA_VERIFY_ONLY) && !defined(TEST_UNPAD_CONSTANT_TIME) && !defined(NO_RSA_BOUNDS_CHECK)
|
#if !defined(WOLFSSL_RSA_VERIFY_ONLY) && !defined(TEST_UNPAD_CONSTANT_TIME) && !defined(NO_RSA_BOUNDS_CHECK)
|
||||||
/* Check that 1 < in < n-1. (Requirement of 800-56B.) */
|
/* Check that 1 < in < n-1. (Requirement of 800-56B.) */
|
||||||
static int RsaFunctionCheckIn(const byte* in, word32 inLen, RsaKey* key,
|
int RsaFunctionCheckIn(const byte* in, word32 inLen, RsaKey* key,
|
||||||
int checkSmallCt)
|
int checkSmallCt)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
@ -444,6 +444,8 @@ WOLFSSL_LOCAL int wc_RsaUnPad_ex(byte* pkcsBlock, word32 pkcsBlockLen, byte** ou
|
|||||||
int bits, void* heap);
|
int bits, void* heap);
|
||||||
|
|
||||||
WOLFSSL_LOCAL int wc_hash2mgf(enum wc_HashType hType);
|
WOLFSSL_LOCAL int wc_hash2mgf(enum wc_HashType hType);
|
||||||
|
WOLFSSL_LOCAL int RsaFunctionCheckIn(const byte* in, word32 inLen, RsaKey* key,
|
||||||
|
int checkSmallCt);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
|
Reference in New Issue
Block a user