user_settings_fipsv5.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. /* user_settings_fipsv5.h
  2. *
  3. * Copyright (C) 2006-2023 wolfSSL Inc.
  4. *
  5. * This file is part of wolfSSL.
  6. *
  7. * wolfSSL is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * wolfSSL is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  20. */
  21. /* should be renamed to user_settings.h for customer use
  22. * generated from configure options:
  23. * ./fips-check.sh linuxv5-dev keep
  24. * XXX-fips-test\wolfssl\options.h
  25. * ./configure --enable-fips=v5-dev
  26. *
  27. * Cleaned up by David Garske
  28. */
  29. #ifndef WOLFSSL_USER_SETTINGS_H
  30. #define WOLFSSL_USER_SETTINGS_H
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. /* FIPS Version 5.3 */
  35. #define HAVE_FIPS
  36. #define HAVE_FIPS_VERSION 5
  37. #define HAVE_FIPS_VERSION_MINOR 3
  38. #define HAVE_HASHDRBG /* NIST Certified DRBG - SHA256 based */
  39. #define HAVE_THREAD_LS
  40. /* Math */
  41. #define USE_FAST_MATH
  42. #define FP_MAX_BITS 16384
  43. #define SP_INT_BITS 8192
  44. #define WOLFSSL_PUBLIC_MP /* expose the mp_ math API's */
  45. /* Timing Resistance */
  46. #define TFM_TIMING_RESISTANT
  47. #define ECC_TIMING_RESISTANT
  48. #define WC_RSA_BLINDING
  49. /* FIPS Features */
  50. #define WC_RNG_SEED_CB
  51. #define WOLFSSL_VALIDATE_ECC_IMPORT
  52. #define WOLFSSL_VALIDATE_ECC_KEYGEN
  53. #define WOLFSSL_VALIDATE_FFC_IMPORT
  54. /* TLS Features */
  55. #define WOLFSSL_TLS13
  56. #define HAVE_TLS_EXTENSIONS
  57. #define HAVE_ENCRYPT_THEN_MAC
  58. #define HAVE_SUPPORTED_CURVES
  59. #define HAVE_EXTENDED_MASTER
  60. #define HAVE_ONE_TIME_AUTH /* TLS extension used with Poly1305 */
  61. /* TLS Resumption */
  62. #define HAVE_SECURE_RENEGOTIATION
  63. #define HAVE_SERVER_RENEGOTIATION_INFO
  64. #define HAVE_SESSION_TICKET
  65. /* Other Features */
  66. #define WOLFSSL_USE_ALIGN
  67. #define WOLFSSL_BASE64_ENCODE
  68. #if 0 /* optionally enable CRL (Certificate Revocation List) */
  69. #define HAVE_CRL
  70. #endif
  71. #define HAVE_EXT_CACHE
  72. #define WOLFSSL_VERIFY_CB_ALL_CERTS
  73. #define WOLFSSL_ALWAYS_VERIFY_CB
  74. #define WOLFSSL_DH_EXTRA /* DHE ASN.1 key import/export support */
  75. #ifndef WOLFSSL_WOLFSSH /* ifndef check required due to configure already generating flag */
  76. #define WOLFSSL_WOLFSSH
  77. #endif
  78. /* Compatibility Layer */
  79. #define OPENSSL_EXTRA
  80. #if 0 /* if full suite of compatibility API's are needed */
  81. #define OPENSSL_ALL
  82. #endif
  83. /* DH */
  84. #undef NO_DH
  85. #define HAVE_FFDHE_Q
  86. #define HAVE_FFDHE_2048
  87. #define HAVE_FFDHE_3072
  88. #define HAVE_FFDHE_4096
  89. #define HAVE_FFDHE_6144
  90. #define HAVE_FFDHE_8192
  91. #define HAVE_DH_DEFAULT_PARAMS
  92. #define HAVE_PUBLIC_FFDHE
  93. /* ECC */
  94. #define HAVE_ECC
  95. #define TFM_ECC256
  96. #define ECC_SHAMIR
  97. #define HAVE_ECC_CDH
  98. #define ECC_USER_CURVES
  99. #define HAVE_ECC192
  100. #define HAVE_ECC224
  101. #define HAVE_ECC256
  102. #define HAVE_ECC384
  103. #define HAVE_ECC521
  104. #define WOLFSSL_ECDSA_SET_K
  105. /* RSA */
  106. #undef NO_RSA
  107. #define WC_RSA_PSS
  108. #define WOLFSSL_KEY_GEN
  109. #define WC_RSA_NO_PADDING
  110. /* AES */
  111. #undef NO_AES
  112. #define WOLFSSL_AES_COUNTER
  113. #define HAVE_AESCCM
  114. #define HAVE_AES_ECB
  115. #define WOLFSSL_AES_COUNTER
  116. #define WOLFSSL_AES_DIRECT
  117. #define WOLFSSL_AES_OFB
  118. #define HAVE_AESGCM
  119. #define GCM_TABLE_4BIT
  120. #define WOLFSSL_CMAC
  121. /* ChaCha/Poly */
  122. #define HAVE_CHACHA
  123. #define HAVE_POLY1305
  124. /* Hashing */
  125. #undef NO_SHA
  126. #undef NO_SHA256
  127. #define WOLFSSL_SHA224
  128. #define WOLFSSL_SHA512
  129. #define WOLFSSL_SHA384
  130. #define WOLFSSL_NO_SHAKE256
  131. #define WOLFSSL_NOSHA512_224
  132. #define WOLFSSL_NOSHA512_256
  133. #define WOLFSSL_SHA3
  134. #define HAVE_HKDF
  135. /* Disabled Features */
  136. #define NO_OLD_TLS
  137. #define NO_PSK
  138. /* Disabled Algorithms */
  139. #define NO_RC4
  140. #define NO_MD4
  141. #define NO_MD5
  142. #define NO_DES3
  143. #define NO_DSA
  144. #define NO_RABBIT
  145. #define NO_HC128
  146. #define WOLFSSL_NO_SHAKE256
  147. /* Debugging */
  148. #if 0
  149. #define DEBUG_WOLFSSL
  150. #else
  151. /* #define NO_ERROR_STRINGS */
  152. #endif
  153. #ifdef __cplusplus
  154. }
  155. #endif
  156. #endif /* WOLFSSL_USER_SETTINGS_H */