mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
add conditions to constant time mask functions
This commit is contained in:
@ -633,7 +633,13 @@ WC_MISC_STATIC WC_INLINE int ConstantCompare(const byte* a, const byte* b,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef WOLFSSL_NO_CT_OPS
|
||||
|
||||
#if defined(WOLFSSL_NO_CT_OPS) && (!defined(NO_RSA) || !defined(WOLFCRYPT_ONLY))
|
||||
/* constant time operations with mask are required for RSA and TLS operations */
|
||||
#warning constant time operations required unless using NO_RSA & WOLFCRYPT_ONLY
|
||||
#endif
|
||||
|
||||
#if !defined(WOLFSSL_NO_CT_OPS) || !defined(NO_RSA) || !defined(WOLFCRYPT_ONLY)
|
||||
/* Constant time - mask set when a > b. */
|
||||
WC_MISC_STATIC WC_INLINE byte ctMaskGT(int a, int b)
|
||||
{
|
||||
|
Reference in New Issue
Block a user