user_settings.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #ifndef USER_SETTINGS_H
  2. #define USER_SETTINGS_H
  3. /* Default build with fast math */
  4. /* Slower build but uses less memory */
  5. //#define BUILD_B
  6. /* Performant build but uses more memory */
  7. //#define BUILD_C
  8. /* Used for getting random value for seeding RNG */
  9. #define WOLFSSL_NETBURNER
  10. #define WOLFSSL_MCF5441X
  11. /* environment settings */
  12. #define NO_WRITEV
  13. #define WOLFSSL_NO_SOCK
  14. #define NO_WOLFSSL_DIR
  15. /* with USE_FAST_MATH smallstack is used to fit in the default stack size */
  16. #define WOLFSSL_SMALL_STACK
  17. /* enable features off by default */
  18. #define WOLFSSL_SHA512
  19. // OPENSSL_EXTRA uses a lot more memory but is needed in order to enable
  20. // compatibility layer API
  21. #define OPENSSL_EXTRA
  22. // additional RSA padding schemes
  23. #define WC_RSA_NO_PADDING
  24. #define WC_RSA_PSS
  25. // uncomment and add wolfSSL_Debugging_ON() to app for debug messages
  26. //#define DEBUG_WOLFSSL
  27. /* disable features that are on by default */
  28. #define WOLFCRYPT_ONLY
  29. #define NO_FILESYSTEM
  30. #define SINGLE_THREADED
  31. #define NO_ASN_TIME
  32. #define NO_PWDBASED
  33. #define NO_HC128
  34. #define NO_RABBIT
  35. #define NO_RC4
  36. #define NO_DSA
  37. #define NO_DES3
  38. #define NO_DH
  39. #define NO_MD4
  40. #define USE_FAST_MATH
  41. #ifdef BUILD_B
  42. #define RSA_LOW_MEM
  43. #define USE_SLOW_SHA
  44. #define USE_SLOW_SHA256
  45. #define NO_ERROR_STRINGS
  46. #define USE_FAST_MATH
  47. #endif
  48. #ifdef BUILD_C
  49. #define WOLFSSL_HAVE_SP_RSA
  50. #define SP_WORD_SIZE 32
  51. #endif
  52. /* hardening against side channel attacks */
  53. #if defined(USE_FAST_MATH)
  54. #define TFM_TIMING_RESISTANT
  55. #ifdef HAVE_ECC
  56. #define ECC_TIMING_RESISTANT
  57. #endif
  58. #endif /* USE_FAST_MATH */
  59. #ifndef NO_RSA
  60. /* this slows down RSA operations but increases side channel resistance */
  61. #define WC_RSA_BLINDING
  62. #endif
  63. #endif /* USER_SETTINGS_H */