mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 04:04:39 +02:00
Cleanup user_settings.h
This commit is contained in:
@@ -61,9 +61,9 @@
|
|||||||
#undef NO_THREAD_LS
|
#undef NO_THREAD_LS
|
||||||
#define NO_THREAD_LS
|
#define NO_THREAD_LS
|
||||||
#else
|
#else
|
||||||
#ifndef USE_WINDOWS_API
|
#ifndef USE_WINDOWS_API
|
||||||
#define USE_WINDOWS_API
|
#define USE_WINDOWS_API
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef NO_ATTRIBUTE_CONSTRUCTOR
|
#undef NO_ATTRIBUTE_CONSTRUCTOR
|
||||||
@@ -88,253 +88,246 @@
|
|||||||
#define NO_MD4
|
#define NO_MD4
|
||||||
|
|
||||||
#if defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2)
|
#if defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2)
|
||||||
#define WOLFSSL_SHA224
|
/* ------------------------------------------------------------------------- */
|
||||||
#define WOLFSSL_SHA3
|
/* Crypto */
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
/* Crypto */
|
|
||||||
/* ------------------------------------------------------------------------- */
|
|
||||||
#define USE_CERT_BUFFERS_2048
|
#define USE_CERT_BUFFERS_2048
|
||||||
#define USE_CERT_BUFFERS_256
|
#define USE_CERT_BUFFERS_256
|
||||||
/* RSA */
|
/* RSA */
|
||||||
#undef NO_RSA
|
#undef NO_RSA
|
||||||
#if 1
|
#if 1
|
||||||
#ifdef USE_FAST_MATH
|
#ifdef USE_FAST_MATH
|
||||||
/* Maximum math bits (Max RSA key bits * 2) */
|
/* Maximum math bits (Max RSA key bits * 2) */
|
||||||
#undef FP_MAX_BITS
|
#undef FP_MAX_BITS
|
||||||
#define FP_MAX_BITS 8192
|
#define FP_MAX_BITS 8192
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* half as much memory but twice as slow */
|
/* half as much memory but twice as slow */
|
||||||
#undef RSA_LOW_MEM
|
#undef RSA_LOW_MEM
|
||||||
//#define RSA_LOW_MEM
|
//#define RSA_LOW_MEM
|
||||||
|
|
||||||
/* Enables blinding mode, to prevent timing attacks */
|
/* Enables blinding mode, to prevent timing attacks */
|
||||||
#if 0
|
#if 0
|
||||||
#undef WC_RSA_BLINDING
|
#undef WC_RSA_BLINDING
|
||||||
#define WC_RSA_BLINDING
|
#define WC_RSA_BLINDING
|
||||||
#else
|
#else
|
||||||
#undef WC_NO_HARDEN
|
#undef WC_NO_HARDEN
|
||||||
#define WC_NO_HARDEN
|
#define WC_NO_HARDEN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* RSA PSS Support */
|
/* RSA PSS Support */
|
||||||
#if 1
|
#if 1
|
||||||
#define WC_RSA_PSS
|
#define WC_RSA_PSS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
#define WC_RSA_NO_PADDING
|
#define WC_RSA_NO_PADDING
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define NO_RSA
|
#define NO_RSA
|
||||||
#endif
|
#endif
|
||||||
/* ECC */
|
/* ECC */
|
||||||
#undef HAVE_ECC
|
#undef HAVE_ECC
|
||||||
#if 1
|
#if 1
|
||||||
#define HAVE_ECC
|
#define HAVE_ECC
|
||||||
|
|
||||||
/* Manually define enabled curves */
|
/* Manually define enabled curves */
|
||||||
#undef ECC_USER_CURVES
|
#undef ECC_USER_CURVES
|
||||||
//#define ECC_USER_CURVES
|
//#define ECC_USER_CURVES
|
||||||
|
|
||||||
#ifdef ECC_USER_CURVES
|
#ifdef ECC_USER_CURVES
|
||||||
/* Manual Curve Selection */
|
/* Manual Curve Selection */
|
||||||
//#define HAVE_ECC192
|
//#define HAVE_ECC192
|
||||||
//#define HAVE_ECC224
|
//#define HAVE_ECC224
|
||||||
#undef NO_ECC256
|
#undef NO_ECC256
|
||||||
//#define HAVE_ECC384
|
//#define HAVE_ECC384
|
||||||
//#define HAVE_ECC521
|
//#define HAVE_ECC521
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Fixed point cache (speeds repeated operations against same private key) */
|
/* Fixed point cache (speeds repeated operations against same private key) */
|
||||||
#undef FP_ECC
|
#undef FP_ECC
|
||||||
//#define FP_ECC
|
//#define FP_ECC
|
||||||
#ifdef FP_ECC
|
#ifdef FP_ECC
|
||||||
/* Bits / Entries */
|
/* Bits / Entries */
|
||||||
#undef FP_ENTRIES
|
#undef FP_ENTRIES
|
||||||
#define FP_ENTRIES 2
|
#define FP_ENTRIES 2
|
||||||
#undef FP_LUT
|
#undef FP_LUT
|
||||||
#define FP_LUT 4
|
#define FP_LUT 4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Optional ECC calculation method */
|
/* Optional ECC calculation method */
|
||||||
/* Note: doubles heap usage, but slightly faster */
|
/* Note: doubles heap usage, but slightly faster */
|
||||||
#undef ECC_SHAMIR
|
#undef ECC_SHAMIR
|
||||||
#define ECC_SHAMIR
|
#define ECC_SHAMIR
|
||||||
|
|
||||||
/* Reduces heap usage, but slower */
|
/* Reduces heap usage, but slower */
|
||||||
#undef ECC_TIMING_RESISTANT
|
#undef ECC_TIMING_RESISTANT
|
||||||
#define ECC_TIMING_RESISTANT
|
#define ECC_TIMING_RESISTANT
|
||||||
|
|
||||||
#ifdef HAVE_FIPS
|
#ifdef HAVE_FIPS
|
||||||
#undef HAVE_ECC_CDH
|
#undef HAVE_ECC_CDH
|
||||||
#define HAVE_ECC_CDH /* Enable cofactor support */
|
#define HAVE_ECC_CDH /* Enable cofactor support */
|
||||||
|
|
||||||
#undef NO_STRICT_ECDSA_LEN
|
#undef NO_STRICT_ECDSA_LEN
|
||||||
#define NO_STRICT_ECDSA_LEN /* Do not force fixed len w/ FIPS */
|
#define NO_STRICT_ECDSA_LEN /* Do not force fixed len w/ FIPS */
|
||||||
|
|
||||||
#undef WOLFSSL_VALIDATE_ECC_IMPORT
|
#undef WOLFSSL_VALIDATE_ECC_IMPORT
|
||||||
#define WOLFSSL_VALIDATE_ECC_IMPORT /* Validate import */
|
#define WOLFSSL_VALIDATE_ECC_IMPORT /* Validate import */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Compressed Key Support */
|
/* Compressed Key Support */
|
||||||
#undef HAVE_COMP_KEY
|
#undef HAVE_COMP_KEY
|
||||||
//#define HAVE_COMP_KEY
|
//#define HAVE_COMP_KEY
|
||||||
|
|
||||||
/* Use alternate ECC size for ECC math */
|
/* Use alternate ECC size for ECC math */
|
||||||
#ifdef USE_FAST_MATH
|
#ifdef USE_FAST_MATH
|
||||||
/* MAX ECC BITS = ROUND8(MAX ECC) * 2 */
|
/* MAX ECC BITS = ROUND8(MAX ECC) * 2 */
|
||||||
#ifdef NO_RSA
|
#ifdef NO_RSA
|
||||||
/* Custom fastmath size if not using RSA */
|
/* Custom fastmath size if not using RSA */
|
||||||
#undef FP_MAX_BITS
|
#undef FP_MAX_BITS
|
||||||
#define FP_MAX_BITS (256 * 2)
|
#define FP_MAX_BITS (256 * 2)
|
||||||
#else
|
#else
|
||||||
#undef ALT_ECC_SIZE
|
#undef ALT_ECC_SIZE
|
||||||
#define ALT_ECC_SIZE
|
#define ALT_ECC_SIZE
|
||||||
/* wolfSSL will compute the FP_MAX_BITS_ECC, but it can be overriden */
|
/* wolfSSL will compute the FP_MAX_BITS_ECC, but it can be overriden */
|
||||||
//#undef FP_MAX_BITS_ECC
|
//#undef FP_MAX_BITS_ECC
|
||||||
//#define FP_MAX_BITS_ECC (256 * 2)
|
//#define FP_MAX_BITS_ECC (256 * 2)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Speedups specific to curve */
|
/* Speedups specific to curve */
|
||||||
#ifndef NO_ECC256
|
#ifndef NO_ECC256
|
||||||
#undef TFM_ECC256
|
#undef TFM_ECC256
|
||||||
#define TFM_ECC256
|
#define TFM_ECC256
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* AES */
|
/* AES */
|
||||||
#undef NO_AES
|
#undef NO_AES
|
||||||
#if 1
|
#if 1
|
||||||
#undef HAVE_AES_CBC
|
#undef HAVE_AES_CBC
|
||||||
#define HAVE_AES_CBC
|
#define HAVE_AES_CBC
|
||||||
|
|
||||||
#undef HAVE_AESGCM
|
#undef HAVE_AESGCM
|
||||||
#define HAVE_AESGCM
|
#define HAVE_AESGCM
|
||||||
|
|
||||||
/* GCM Method: GCM_SMALL, GCM_WORD32 or GCM_TABLE */
|
/* GCM Method: GCM_SMALL, GCM_WORD32 or GCM_TABLE */
|
||||||
//#define GCM_SMALL
|
//#define GCM_SMALL
|
||||||
//#define GCM_WORD32
|
//#define GCM_WORD32
|
||||||
#define GCM_TABLE
|
#define GCM_TABLE
|
||||||
|
|
||||||
#undef WOLFSSL_AES_DIRECT
|
#undef WOLFSSL_AES_DIRECT
|
||||||
#define WOLFSSL_AES_DIRECT
|
#define WOLFSSL_AES_DIRECT
|
||||||
|
|
||||||
#undef HAVE_AES_ECB
|
#undef HAVE_AES_ECB
|
||||||
#define HAVE_AES_ECB
|
#define HAVE_AES_ECB
|
||||||
|
|
||||||
#undef WOLFSSL_AES_COUNTER
|
#undef WOLFSSL_AES_COUNTER
|
||||||
#define WOLFSSL_AES_COUNTER
|
#define WOLFSSL_AES_COUNTER
|
||||||
|
|
||||||
#undef HAVE_AESCCM
|
#undef HAVE_AESCCM
|
||||||
#define HAVE_AESCCM
|
#define HAVE_AESCCM
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define NO_AES
|
#define NO_AES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* DES3 */
|
/* DES3 */
|
||||||
#undef NO_DES3
|
#undef NO_DES3
|
||||||
#if 1
|
#if 1
|
||||||
#else
|
#else
|
||||||
#define NO_DES3
|
#define NO_DES3
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
/* Hashing */
|
/* Hashing */
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
/* Sha */
|
/* Sha */
|
||||||
#undef NO_SHA
|
#undef NO_SHA
|
||||||
#if 1
|
#if 1
|
||||||
/* 1k smaller, but 25% slower */
|
/* 1k smaller, but 25% slower */
|
||||||
//#define USE_SLOW_SHA
|
//#define USE_SLOW_SHA
|
||||||
#else
|
#else
|
||||||
#define NO_SHA
|
#define NO_SHA
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Sha256 */
|
/* Sha256 */
|
||||||
#undef NO_SHA256
|
#undef NO_SHA256
|
||||||
#if 1
|
#if 1
|
||||||
/* not unrolled - ~2k smaller and ~25% slower */
|
/* not unrolled - ~2k smaller and ~25% slower */
|
||||||
//#define USE_SLOW_SHA256
|
//#define USE_SLOW_SHA256
|
||||||
|
|
||||||
/* Sha224 */
|
/* Sha224 */
|
||||||
#if 1
|
#if 1
|
||||||
#define WOLFSSL_SHA224
|
#define WOLFSSL_SHA224
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define NO_SHA256
|
#define NO_SHA256
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Sha512 */
|
/* Sha512 */
|
||||||
#undef WOLFSSL_SHA512
|
#undef WOLFSSL_SHA512
|
||||||
#if 1
|
#if 1
|
||||||
#define WOLFSSL_SHA512
|
#define WOLFSSL_SHA512
|
||||||
|
|
||||||
/* Sha384 */
|
/* Sha384 */
|
||||||
#undef WOLFSSL_SHA384
|
#undef WOLFSSL_SHA384
|
||||||
#if 1
|
#if 1
|
||||||
#define WOLFSSL_SHA384
|
#define WOLFSSL_SHA384
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* over twice as small, but 50% slower */
|
/* over twice as small, but 50% slower */
|
||||||
//#define USE_SLOW_SHA512
|
//#define USE_SLOW_SHA512
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Sha3 */
|
/* Sha3 */
|
||||||
#undef WOLFSSL_SHA3
|
#undef WOLFSSL_SHA3
|
||||||
#if 1
|
#if 1
|
||||||
#define WOLFSSL_SHA3
|
#define WOLFSSL_SHA3
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* MD5 */
|
/* MD5 */
|
||||||
#undef NO_MD5
|
#undef NO_MD5
|
||||||
#if 1
|
#if 1
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define NO_MD5
|
#define NO_MD5
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* HKDF */
|
/* HKDF */
|
||||||
#undef HAVE_HKDF
|
#undef HAVE_HKDF
|
||||||
#if 1
|
#if 1
|
||||||
#define HAVE_HKDF
|
#define HAVE_HKDF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* CMAC */
|
/* CMAC */
|
||||||
#undef WOLFSSL_CMAC
|
#undef WOLFSSL_CMAC
|
||||||
#if 1
|
#if 1
|
||||||
#define WOLFSSL_CMAC
|
#define WOLFSSL_CMAC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* DH */
|
/* DH */
|
||||||
#undef NO_DH
|
#undef NO_DH
|
||||||
#if 1
|
#if 1
|
||||||
/* Use table for DH instead of -lm (math) lib dependency */
|
/* Use table for DH instead of -lm (math) lib dependency */
|
||||||
#if 0
|
#if 0
|
||||||
#define WOLFSSL_DH_CONST
|
#define WOLFSSL_DH_CONST
|
||||||
#define HAVE_FFDHE_2048
|
#define HAVE_FFDHE_2048
|
||||||
#define HAVE_FFDHE_4096
|
#define HAVE_FFDHE_4096
|
||||||
//#define HAVE_FFDHE_6144
|
//#define HAVE_FFDHE_6144
|
||||||
//#define HAVE_FFDHE_8192
|
//#define HAVE_FFDHE_8192
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_FIPS
|
#ifdef HAVE_FIPS
|
||||||
#define WOLFSSL_VALIDATE_FFC_IMPORT
|
#define WOLFSSL_VALIDATE_FFC_IMPORT
|
||||||
#define HAVE_FFDHE_Q
|
#define HAVE_FFDHE_Q
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define NO_DH
|
#define NO_DH
|
||||||
#endif
|
#endif
|
||||||
//#define WOLFSSL_AESNI
|
|
||||||
//#define HAVE_INTEL_RDSEED
|
|
||||||
//#define FORCE_FAILURE_RDSEED
|
|
||||||
//#define HAVE_FORCE_FIPS_FAILURE
|
|
||||||
#endif /* FIPS v2 */
|
#endif /* FIPS v2 */
|
||||||
|
|
||||||
//#define DEBUG_WOLFSSL
|
//#define DEBUG_WOLFSSL
|
||||||
#define NO_MAIN_DRIVER
|
#define NO_MAIN_DRIVER
|
||||||
//#define CAVP_VECTOR_TESTING
|
|
||||||
#endif /* _WIN_USER_SETTINGS_H_ */
|
#endif /* _WIN_USER_SETTINGS_H_ */
|
||||||
|
Reference in New Issue
Block a user