edhoc 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (672) hide show
  1. package/binding.gyp +64 -0
  2. package/external/libedhoc/backends/cbor/include/backend_cbor_bstr_type_decode.h +35 -0
  3. package/external/libedhoc/backends/cbor/include/backend_cbor_bstr_type_encode.h +35 -0
  4. package/external/libedhoc/backends/cbor/include/backend_cbor_bstr_type_types.h +34 -0
  5. package/external/libedhoc/backends/cbor/include/backend_cbor_ead_decode.h +35 -0
  6. package/external/libedhoc/backends/cbor/include/backend_cbor_ead_encode.h +35 -0
  7. package/external/libedhoc/backends/cbor/include/backend_cbor_edhoc_types.h +97 -0
  8. package/external/libedhoc/backends/cbor/include/backend_cbor_enc_structure_decode.h +35 -0
  9. package/external/libedhoc/backends/cbor/include/backend_cbor_enc_structure_encode.h +35 -0
  10. package/external/libedhoc/backends/cbor/include/backend_cbor_enc_structure_types.h +37 -0
  11. package/external/libedhoc/backends/cbor/include/backend_cbor_id_cred_x_decode.h +35 -0
  12. package/external/libedhoc/backends/cbor/include/backend_cbor_id_cred_x_encode.h +35 -0
  13. package/external/libedhoc/backends/cbor/include/backend_cbor_info_decode.h +35 -0
  14. package/external/libedhoc/backends/cbor/include/backend_cbor_info_encode.h +35 -0
  15. package/external/libedhoc/backends/cbor/include/backend_cbor_int_type_decode.h +35 -0
  16. package/external/libedhoc/backends/cbor/include/backend_cbor_int_type_encode.h +35 -0
  17. package/external/libedhoc/backends/cbor/include/backend_cbor_int_type_types.h +34 -0
  18. package/external/libedhoc/backends/cbor/include/backend_cbor_message_1_decode.h +35 -0
  19. package/external/libedhoc/backends/cbor/include/backend_cbor_message_1_encode.h +35 -0
  20. package/external/libedhoc/backends/cbor/include/backend_cbor_message_2_decode.h +35 -0
  21. package/external/libedhoc/backends/cbor/include/backend_cbor_message_2_encode.h +35 -0
  22. package/external/libedhoc/backends/cbor/include/backend_cbor_message_3_decode.h +35 -0
  23. package/external/libedhoc/backends/cbor/include/backend_cbor_message_3_encode.h +35 -0
  24. package/external/libedhoc/backends/cbor/include/backend_cbor_message_4_decode.h +35 -0
  25. package/external/libedhoc/backends/cbor/include/backend_cbor_message_4_encode.h +35 -0
  26. package/external/libedhoc/backends/cbor/include/backend_cbor_message_error_decode.h +35 -0
  27. package/external/libedhoc/backends/cbor/include/backend_cbor_message_error_encode.h +35 -0
  28. package/external/libedhoc/backends/cbor/include/backend_cbor_plaintext_2_decode.h +35 -0
  29. package/external/libedhoc/backends/cbor/include/backend_cbor_plaintext_2_encode.h +35 -0
  30. package/external/libedhoc/backends/cbor/include/backend_cbor_plaintext_3_decode.h +35 -0
  31. package/external/libedhoc/backends/cbor/include/backend_cbor_plaintext_3_encode.h +35 -0
  32. package/external/libedhoc/backends/cbor/include/backend_cbor_plaintext_4_decode.h +35 -0
  33. package/external/libedhoc/backends/cbor/include/backend_cbor_plaintext_4_encode.h +35 -0
  34. package/external/libedhoc/backends/cbor/include/backend_cbor_sig_structure_decode.h +35 -0
  35. package/external/libedhoc/backends/cbor/include/backend_cbor_sig_structure_encode.h +35 -0
  36. package/external/libedhoc/backends/cbor/include/backend_cbor_sig_structure_types.h +38 -0
  37. package/external/libedhoc/backends/cbor/include/backend_cbor_x509_types.h +170 -0
  38. package/external/libedhoc/backends/cbor/src/backend_cbor_bstr_type_decode.c +59 -0
  39. package/external/libedhoc/backends/cbor/src/backend_cbor_bstr_type_encode.c +59 -0
  40. package/external/libedhoc/backends/cbor/src/backend_cbor_ead_decode.c +74 -0
  41. package/external/libedhoc/backends/cbor/src/backend_cbor_ead_encode.c +74 -0
  42. package/external/libedhoc/backends/cbor/src/backend_cbor_enc_structure_decode.c +62 -0
  43. package/external/libedhoc/backends/cbor/src/backend_cbor_enc_structure_encode.c +62 -0
  44. package/external/libedhoc/backends/cbor/src/backend_cbor_id_cred_x_decode.c +141 -0
  45. package/external/libedhoc/backends/cbor/src/backend_cbor_id_cred_x_encode.c +141 -0
  46. package/external/libedhoc/backends/cbor/src/backend_cbor_info_decode.c +61 -0
  47. package/external/libedhoc/backends/cbor/src/backend_cbor_info_encode.c +61 -0
  48. package/external/libedhoc/backends/cbor/src/backend_cbor_int_type_decode.c +59 -0
  49. package/external/libedhoc/backends/cbor/src/backend_cbor_int_type_encode.c +59 -0
  50. package/external/libedhoc/backends/cbor/src/backend_cbor_message_1_decode.c +112 -0
  51. package/external/libedhoc/backends/cbor/src/backend_cbor_message_1_encode.c +112 -0
  52. package/external/libedhoc/backends/cbor/src/backend_cbor_message_2_decode.c +59 -0
  53. package/external/libedhoc/backends/cbor/src/backend_cbor_message_2_encode.c +59 -0
  54. package/external/libedhoc/backends/cbor/src/backend_cbor_message_3_decode.c +59 -0
  55. package/external/libedhoc/backends/cbor/src/backend_cbor_message_3_encode.c +59 -0
  56. package/external/libedhoc/backends/cbor/src/backend_cbor_message_4_decode.c +59 -0
  57. package/external/libedhoc/backends/cbor/src/backend_cbor_message_4_encode.c +59 -0
  58. package/external/libedhoc/backends/cbor/src/backend_cbor_message_error_decode.c +93 -0
  59. package/external/libedhoc/backends/cbor/src/backend_cbor_message_error_encode.c +93 -0
  60. package/external/libedhoc/backends/cbor/src/backend_cbor_plaintext_2_decode.c +193 -0
  61. package/external/libedhoc/backends/cbor/src/backend_cbor_plaintext_2_encode.c +194 -0
  62. package/external/libedhoc/backends/cbor/src/backend_cbor_plaintext_3_decode.c +189 -0
  63. package/external/libedhoc/backends/cbor/src/backend_cbor_plaintext_3_encode.c +189 -0
  64. package/external/libedhoc/backends/cbor/src/backend_cbor_plaintext_4_decode.c +88 -0
  65. package/external/libedhoc/backends/cbor/src/backend_cbor_plaintext_4_encode.c +88 -0
  66. package/external/libedhoc/backends/cbor/src/backend_cbor_sig_structure_decode.c +63 -0
  67. package/external/libedhoc/backends/cbor/src/backend_cbor_sig_structure_encode.c +63 -0
  68. package/external/libedhoc/externals/compact25519/src/c25519/c25519.c +126 -0
  69. package/external/libedhoc/externals/compact25519/src/c25519/c25519.h +49 -0
  70. package/external/libedhoc/externals/compact25519/src/c25519/ed25519.c +323 -0
  71. package/external/libedhoc/externals/compact25519/src/c25519/ed25519.h +84 -0
  72. package/external/libedhoc/externals/compact25519/src/c25519/edsign.c +171 -0
  73. package/external/libedhoc/externals/compact25519/src/c25519/edsign.h +53 -0
  74. package/external/libedhoc/externals/compact25519/src/c25519/f25519.c +330 -0
  75. package/external/libedhoc/externals/compact25519/src/c25519/f25519.h +98 -0
  76. package/external/libedhoc/externals/compact25519/src/c25519/fprime.c +226 -0
  77. package/external/libedhoc/externals/compact25519/src/c25519/fprime.h +81 -0
  78. package/external/libedhoc/externals/compact25519/src/c25519/sha512.c +230 -0
  79. package/external/libedhoc/externals/compact25519/src/c25519/sha512.h +54 -0
  80. package/external/libedhoc/externals/compact25519/src/compact_ed25519.c +46 -0
  81. package/external/libedhoc/externals/compact25519/src/compact_ed25519.h +110 -0
  82. package/external/libedhoc/externals/compact25519/src/compact_wipe.c +12 -0
  83. package/external/libedhoc/externals/compact25519/src/compact_wipe.h +14 -0
  84. package/external/libedhoc/externals/compact25519/src/compact_x25519.c +68 -0
  85. package/external/libedhoc/externals/compact25519/src/compact_x25519.h +101 -0
  86. package/external/libedhoc/externals/compact25519/test/pcg_random.h +25 -0
  87. package/external/libedhoc/externals/compact25519/test/run-all.c +178 -0
  88. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/Hacl_Curve25519.h +21 -0
  89. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/everest.h +234 -0
  90. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/kremlib/FStar_UInt128.h +124 -0
  91. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/kremlib/FStar_UInt64_FStar_UInt32_FStar_UInt16_FStar_UInt8.h +280 -0
  92. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/kremlib.h +29 -0
  93. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/kremlin/c_endianness.h +204 -0
  94. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/kremlin/internal/builtin.h +16 -0
  95. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/kremlin/internal/callconv.h +46 -0
  96. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/kremlin/internal/compat.h +34 -0
  97. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/kremlin/internal/debug.h +57 -0
  98. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/kremlin/internal/target.h +102 -0
  99. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/kremlin/internal/types.h +61 -0
  100. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/kremlin/internal/wasmsupport.h +5 -0
  101. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/vs2013/Hacl_Curve25519.h +21 -0
  102. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/vs2013/inttypes.h +36 -0
  103. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/vs2013/stdbool.h +31 -0
  104. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/x25519.h +190 -0
  105. package/external/libedhoc/externals/mbedtls/3rdparty/everest/library/Hacl_Curve25519.c +760 -0
  106. package/external/libedhoc/externals/mbedtls/3rdparty/everest/library/Hacl_Curve25519_joined.c +50 -0
  107. package/external/libedhoc/externals/mbedtls/3rdparty/everest/library/everest.c +102 -0
  108. package/external/libedhoc/externals/mbedtls/3rdparty/everest/library/kremlib/FStar_UInt128_extracted.c +413 -0
  109. package/external/libedhoc/externals/mbedtls/3rdparty/everest/library/kremlib/FStar_UInt64_FStar_UInt32_FStar_UInt16_FStar_UInt8.c +100 -0
  110. package/external/libedhoc/externals/mbedtls/3rdparty/everest/library/legacy/Hacl_Curve25519.c +805 -0
  111. package/external/libedhoc/externals/mbedtls/3rdparty/everest/library/x25519.c +186 -0
  112. package/external/libedhoc/externals/mbedtls/3rdparty/p256-m/p256-m/p256-m.c +1514 -0
  113. package/external/libedhoc/externals/mbedtls/3rdparty/p256-m/p256-m/p256-m.h +135 -0
  114. package/external/libedhoc/externals/mbedtls/3rdparty/p256-m/p256-m_driver_entrypoints.c +312 -0
  115. package/external/libedhoc/externals/mbedtls/3rdparty/p256-m/p256-m_driver_entrypoints.h +219 -0
  116. package/external/libedhoc/externals/mbedtls/configs/config-ccm-psk-dtls1_2.h +92 -0
  117. package/external/libedhoc/externals/mbedtls/configs/config-ccm-psk-tls1_2.h +83 -0
  118. package/external/libedhoc/externals/mbedtls/configs/config-no-entropy.h +73 -0
  119. package/external/libedhoc/externals/mbedtls/configs/config-suite-b.h +106 -0
  120. package/external/libedhoc/externals/mbedtls/configs/config-symmetric-only.h +77 -0
  121. package/external/libedhoc/externals/mbedtls/configs/config-thread.h +76 -0
  122. package/external/libedhoc/externals/mbedtls/configs/crypto-config-ccm-aes-sha256.h +25 -0
  123. package/external/libedhoc/externals/mbedtls/configs/crypto_config_profile_medium.h +136 -0
  124. package/external/libedhoc/externals/mbedtls/configs/tfm_mbedcrypto_config_profile_medium.h +609 -0
  125. package/external/libedhoc/externals/mbedtls/doxygen/input/doc_encdec.h +54 -0
  126. package/external/libedhoc/externals/mbedtls/doxygen/input/doc_hashing.h +30 -0
  127. package/external/libedhoc/externals/mbedtls/doxygen/input/doc_mainpage.h +19 -0
  128. package/external/libedhoc/externals/mbedtls/doxygen/input/doc_rng.h +27 -0
  129. package/external/libedhoc/externals/mbedtls/doxygen/input/doc_ssltls.h +37 -0
  130. package/external/libedhoc/externals/mbedtls/doxygen/input/doc_tcpip.h +32 -0
  131. package/external/libedhoc/externals/mbedtls/doxygen/input/doc_x509.h +31 -0
  132. package/external/libedhoc/externals/mbedtls/include/mbedtls/aes.h +627 -0
  133. package/external/libedhoc/externals/mbedtls/include/mbedtls/aria.h +341 -0
  134. package/external/libedhoc/externals/mbedtls/include/mbedtls/asn1.h +641 -0
  135. package/external/libedhoc/externals/mbedtls/include/mbedtls/asn1write.h +389 -0
  136. package/external/libedhoc/externals/mbedtls/include/mbedtls/base64.h +82 -0
  137. package/external/libedhoc/externals/mbedtls/include/mbedtls/bignum.h +1084 -0
  138. package/external/libedhoc/externals/mbedtls/include/mbedtls/build_info.h +146 -0
  139. package/external/libedhoc/externals/mbedtls/include/mbedtls/camellia.h +303 -0
  140. package/external/libedhoc/externals/mbedtls/include/mbedtls/ccm.h +518 -0
  141. package/external/libedhoc/externals/mbedtls/include/mbedtls/chacha20.h +202 -0
  142. package/external/libedhoc/externals/mbedtls/include/mbedtls/chachapoly.h +342 -0
  143. package/external/libedhoc/externals/mbedtls/include/mbedtls/check_config.h +1206 -0
  144. package/external/libedhoc/externals/mbedtls/include/mbedtls/cipher.h +1183 -0
  145. package/external/libedhoc/externals/mbedtls/include/mbedtls/cmac.h +246 -0
  146. package/external/libedhoc/externals/mbedtls/include/mbedtls/compat-2.x.h +46 -0
  147. package/external/libedhoc/externals/mbedtls/include/mbedtls/config_adjust_legacy_crypto.h +183 -0
  148. package/external/libedhoc/externals/mbedtls/include/mbedtls/config_adjust_legacy_from_psa.h +877 -0
  149. package/external/libedhoc/externals/mbedtls/include/mbedtls/config_adjust_psa_from_legacy.h +334 -0
  150. package/external/libedhoc/externals/mbedtls/include/mbedtls/config_adjust_psa_superset_legacy.h +142 -0
  151. package/external/libedhoc/externals/mbedtls/include/mbedtls/config_adjust_ssl.h +76 -0
  152. package/external/libedhoc/externals/mbedtls/include/mbedtls/config_adjust_x509.h +25 -0
  153. package/external/libedhoc/externals/mbedtls/include/mbedtls/config_psa.h +55 -0
  154. package/external/libedhoc/externals/mbedtls/include/mbedtls/constant_time.h +36 -0
  155. package/external/libedhoc/externals/mbedtls/include/mbedtls/ctr_drbg.h +564 -0
  156. package/external/libedhoc/externals/mbedtls/include/mbedtls/debug.h +308 -0
  157. package/external/libedhoc/externals/mbedtls/include/mbedtls/des.h +385 -0
  158. package/external/libedhoc/externals/mbedtls/include/mbedtls/dhm.h +972 -0
  159. package/external/libedhoc/externals/mbedtls/include/mbedtls/ecdh.h +441 -0
  160. package/external/libedhoc/externals/mbedtls/include/mbedtls/ecdsa.h +671 -0
  161. package/external/libedhoc/externals/mbedtls/include/mbedtls/ecjpake.h +298 -0
  162. package/external/libedhoc/externals/mbedtls/include/mbedtls/ecp.h +1362 -0
  163. package/external/libedhoc/externals/mbedtls/include/mbedtls/entropy.h +273 -0
  164. package/external/libedhoc/externals/mbedtls/include/mbedtls/error.h +201 -0
  165. package/external/libedhoc/externals/mbedtls/include/mbedtls/gcm.h +370 -0
  166. package/external/libedhoc/externals/mbedtls/include/mbedtls/hkdf.h +124 -0
  167. package/external/libedhoc/externals/mbedtls/include/mbedtls/hmac_drbg.h +434 -0
  168. package/external/libedhoc/externals/mbedtls/include/mbedtls/lms.h +440 -0
  169. package/external/libedhoc/externals/mbedtls/include/mbedtls/mbedtls_config.h +4116 -0
  170. package/external/libedhoc/externals/mbedtls/include/mbedtls/md.h +640 -0
  171. package/external/libedhoc/externals/mbedtls/include/mbedtls/md5.h +190 -0
  172. package/external/libedhoc/externals/mbedtls/include/mbedtls/memory_buffer_alloc.h +142 -0
  173. package/external/libedhoc/externals/mbedtls/include/mbedtls/net_sockets.h +299 -0
  174. package/external/libedhoc/externals/mbedtls/include/mbedtls/nist_kw.h +166 -0
  175. package/external/libedhoc/externals/mbedtls/include/mbedtls/oid.h +722 -0
  176. package/external/libedhoc/externals/mbedtls/include/mbedtls/pem.h +160 -0
  177. package/external/libedhoc/externals/mbedtls/include/mbedtls/pk.h +1091 -0
  178. package/external/libedhoc/externals/mbedtls/include/mbedtls/pkcs12.h +186 -0
  179. package/external/libedhoc/externals/mbedtls/include/mbedtls/pkcs5.h +197 -0
  180. package/external/libedhoc/externals/mbedtls/include/mbedtls/pkcs7.h +241 -0
  181. package/external/libedhoc/externals/mbedtls/include/mbedtls/platform.h +485 -0
  182. package/external/libedhoc/externals/mbedtls/include/mbedtls/platform_time.h +79 -0
  183. package/external/libedhoc/externals/mbedtls/include/mbedtls/platform_util.h +201 -0
  184. package/external/libedhoc/externals/mbedtls/include/mbedtls/poly1305.h +168 -0
  185. package/external/libedhoc/externals/mbedtls/include/mbedtls/private_access.h +20 -0
  186. package/external/libedhoc/externals/mbedtls/include/mbedtls/psa_util.h +104 -0
  187. package/external/libedhoc/externals/mbedtls/include/mbedtls/ripemd160.h +136 -0
  188. package/external/libedhoc/externals/mbedtls/include/mbedtls/rsa.h +1143 -0
  189. package/external/libedhoc/externals/mbedtls/include/mbedtls/sha1.h +219 -0
  190. package/external/libedhoc/externals/mbedtls/include/mbedtls/sha256.h +198 -0
  191. package/external/libedhoc/externals/mbedtls/include/mbedtls/sha3.h +172 -0
  192. package/external/libedhoc/externals/mbedtls/include/mbedtls/sha512.h +208 -0
  193. package/external/libedhoc/externals/mbedtls/include/mbedtls/ssl.h +5369 -0
  194. package/external/libedhoc/externals/mbedtls/include/mbedtls/ssl_cache.h +187 -0
  195. package/external/libedhoc/externals/mbedtls/include/mbedtls/ssl_ciphersuites.h +616 -0
  196. package/external/libedhoc/externals/mbedtls/include/mbedtls/ssl_cookie.h +106 -0
  197. package/external/libedhoc/externals/mbedtls/include/mbedtls/ssl_ticket.h +181 -0
  198. package/external/libedhoc/externals/mbedtls/include/mbedtls/threading.h +105 -0
  199. package/external/libedhoc/externals/mbedtls/include/mbedtls/timing.h +94 -0
  200. package/external/libedhoc/externals/mbedtls/include/mbedtls/version.h +78 -0
  201. package/external/libedhoc/externals/mbedtls/include/mbedtls/x509.h +550 -0
  202. package/external/libedhoc/externals/mbedtls/include/mbedtls/x509_crl.h +184 -0
  203. package/external/libedhoc/externals/mbedtls/include/mbedtls/x509_crt.h +1196 -0
  204. package/external/libedhoc/externals/mbedtls/include/mbedtls/x509_csr.h +319 -0
  205. package/external/libedhoc/externals/mbedtls/include/psa/build_info.h +20 -0
  206. package/external/libedhoc/externals/mbedtls/include/psa/crypto.h +4685 -0
  207. package/external/libedhoc/externals/mbedtls/include/psa/crypto_adjust_auto_enabled.h +21 -0
  208. package/external/libedhoc/externals/mbedtls/include/psa/crypto_adjust_config_key_pair_types.h +91 -0
  209. package/external/libedhoc/externals/mbedtls/include/psa/crypto_adjust_config_synonyms.h +45 -0
  210. package/external/libedhoc/externals/mbedtls/include/psa/crypto_builtin_composites.h +210 -0
  211. package/external/libedhoc/externals/mbedtls/include/psa/crypto_builtin_key_derivation.h +118 -0
  212. package/external/libedhoc/externals/mbedtls/include/psa/crypto_builtin_primitives.h +114 -0
  213. package/external/libedhoc/externals/mbedtls/include/psa/crypto_compat.h +153 -0
  214. package/external/libedhoc/externals/mbedtls/include/psa/crypto_config.h +153 -0
  215. package/external/libedhoc/externals/mbedtls/include/psa/crypto_driver_common.h +44 -0
  216. package/external/libedhoc/externals/mbedtls/include/psa/crypto_driver_contexts_composites.h +151 -0
  217. package/external/libedhoc/externals/mbedtls/include/psa/crypto_driver_contexts_key_derivation.h +52 -0
  218. package/external/libedhoc/externals/mbedtls/include/psa/crypto_driver_contexts_primitives.h +105 -0
  219. package/external/libedhoc/externals/mbedtls/include/psa/crypto_extra.h +2064 -0
  220. package/external/libedhoc/externals/mbedtls/include/psa/crypto_legacy.h +88 -0
  221. package/external/libedhoc/externals/mbedtls/include/psa/crypto_platform.h +92 -0
  222. package/external/libedhoc/externals/mbedtls/include/psa/crypto_se_driver.h +1383 -0
  223. package/external/libedhoc/externals/mbedtls/include/psa/crypto_sizes.h +1282 -0
  224. package/external/libedhoc/externals/mbedtls/include/psa/crypto_struct.h +460 -0
  225. package/external/libedhoc/externals/mbedtls/include/psa/crypto_types.h +453 -0
  226. package/external/libedhoc/externals/mbedtls/include/psa/crypto_values.h +2756 -0
  227. package/external/libedhoc/externals/mbedtls/library/aes.c +2315 -0
  228. package/external/libedhoc/externals/mbedtls/library/aesce.c +503 -0
  229. package/external/libedhoc/externals/mbedtls/library/aesce.h +121 -0
  230. package/external/libedhoc/externals/mbedtls/library/aesni.c +802 -0
  231. package/external/libedhoc/externals/mbedtls/library/aesni.h +158 -0
  232. package/external/libedhoc/externals/mbedtls/library/alignment.h +509 -0
  233. package/external/libedhoc/externals/mbedtls/library/aria.c +991 -0
  234. package/external/libedhoc/externals/mbedtls/library/asn1parse.c +467 -0
  235. package/external/libedhoc/externals/mbedtls/library/asn1write.c +436 -0
  236. package/external/libedhoc/externals/mbedtls/library/base64.c +299 -0
  237. package/external/libedhoc/externals/mbedtls/library/base64_internal.h +45 -0
  238. package/external/libedhoc/externals/mbedtls/library/bignum.c +2806 -0
  239. package/external/libedhoc/externals/mbedtls/library/bignum_core.c +894 -0
  240. package/external/libedhoc/externals/mbedtls/library/bignum_core.h +763 -0
  241. package/external/libedhoc/externals/mbedtls/library/bignum_mod.c +394 -0
  242. package/external/libedhoc/externals/mbedtls/library/bignum_mod.h +452 -0
  243. package/external/libedhoc/externals/mbedtls/library/bignum_mod_raw.c +276 -0
  244. package/external/libedhoc/externals/mbedtls/library/bignum_mod_raw.h +416 -0
  245. package/external/libedhoc/externals/mbedtls/library/bignum_mod_raw_invasive.h +34 -0
  246. package/external/libedhoc/externals/mbedtls/library/bn_mul.h +1094 -0
  247. package/external/libedhoc/externals/mbedtls/library/camellia.c +1044 -0
  248. package/external/libedhoc/externals/mbedtls/library/ccm.c +712 -0
  249. package/external/libedhoc/externals/mbedtls/library/chacha20.c +497 -0
  250. package/external/libedhoc/externals/mbedtls/library/chachapoly.c +478 -0
  251. package/external/libedhoc/externals/mbedtls/library/check_crypto_config.h +141 -0
  252. package/external/libedhoc/externals/mbedtls/library/cipher.c +1664 -0
  253. package/external/libedhoc/externals/mbedtls/library/cipher_wrap.c +2422 -0
  254. package/external/libedhoc/externals/mbedtls/library/cipher_wrap.h +132 -0
  255. package/external/libedhoc/externals/mbedtls/library/cmac.c +1067 -0
  256. package/external/libedhoc/externals/mbedtls/library/common.h +325 -0
  257. package/external/libedhoc/externals/mbedtls/library/constant_time.c +261 -0
  258. package/external/libedhoc/externals/mbedtls/library/constant_time_impl.h +554 -0
  259. package/external/libedhoc/externals/mbedtls/library/constant_time_internal.h +579 -0
  260. package/external/libedhoc/externals/mbedtls/library/ctr_drbg.c +881 -0
  261. package/external/libedhoc/externals/mbedtls/library/debug.c +465 -0
  262. package/external/libedhoc/externals/mbedtls/library/des.c +1042 -0
  263. package/external/libedhoc/externals/mbedtls/library/dhm.c +712 -0
  264. package/external/libedhoc/externals/mbedtls/library/ecdh.c +685 -0
  265. package/external/libedhoc/externals/mbedtls/library/ecdsa.c +867 -0
  266. package/external/libedhoc/externals/mbedtls/library/ecjpake.c +1216 -0
  267. package/external/libedhoc/externals/mbedtls/library/ecp.c +3631 -0
  268. package/external/libedhoc/externals/mbedtls/library/ecp_curves.c +5467 -0
  269. package/external/libedhoc/externals/mbedtls/library/ecp_curves_new.c +6043 -0
  270. package/external/libedhoc/externals/mbedtls/library/ecp_internal_alt.h +287 -0
  271. package/external/libedhoc/externals/mbedtls/library/ecp_invasive.h +325 -0
  272. package/external/libedhoc/externals/mbedtls/library/entropy.c +676 -0
  273. package/external/libedhoc/externals/mbedtls/library/entropy_poll.c +229 -0
  274. package/external/libedhoc/externals/mbedtls/library/entropy_poll.h +64 -0
  275. package/external/libedhoc/externals/mbedtls/library/error.c +878 -0
  276. package/external/libedhoc/externals/mbedtls/library/gcm.c +1168 -0
  277. package/external/libedhoc/externals/mbedtls/library/hkdf.c +161 -0
  278. package/external/libedhoc/externals/mbedtls/library/hmac_drbg.c +633 -0
  279. package/external/libedhoc/externals/mbedtls/library/lmots.c +821 -0
  280. package/external/libedhoc/externals/mbedtls/library/lmots.h +311 -0
  281. package/external/libedhoc/externals/mbedtls/library/lms.c +779 -0
  282. package/external/libedhoc/externals/mbedtls/library/md.c +1108 -0
  283. package/external/libedhoc/externals/mbedtls/library/md5.c +426 -0
  284. package/external/libedhoc/externals/mbedtls/library/md_psa.h +63 -0
  285. package/external/libedhoc/externals/mbedtls/library/md_wrap.h +46 -0
  286. package/external/libedhoc/externals/mbedtls/library/memory_buffer_alloc.c +745 -0
  287. package/external/libedhoc/externals/mbedtls/library/mps_common.h +181 -0
  288. package/external/libedhoc/externals/mbedtls/library/mps_error.h +89 -0
  289. package/external/libedhoc/externals/mbedtls/library/mps_reader.c +538 -0
  290. package/external/libedhoc/externals/mbedtls/library/mps_reader.h +366 -0
  291. package/external/libedhoc/externals/mbedtls/library/mps_trace.c +112 -0
  292. package/external/libedhoc/externals/mbedtls/library/mps_trace.h +154 -0
  293. package/external/libedhoc/externals/mbedtls/library/net_sockets.c +696 -0
  294. package/external/libedhoc/externals/mbedtls/library/nist_kw.c +725 -0
  295. package/external/libedhoc/externals/mbedtls/library/oid.c +1154 -0
  296. package/external/libedhoc/externals/mbedtls/library/padlock.c +155 -0
  297. package/external/libedhoc/externals/mbedtls/library/padlock.h +111 -0
  298. package/external/libedhoc/externals/mbedtls/library/pem.c +520 -0
  299. package/external/libedhoc/externals/mbedtls/library/pk.c +970 -0
  300. package/external/libedhoc/externals/mbedtls/library/pk_internal.h +118 -0
  301. package/external/libedhoc/externals/mbedtls/library/pk_wrap.c +1834 -0
  302. package/external/libedhoc/externals/mbedtls/library/pk_wrap.h +156 -0
  303. package/external/libedhoc/externals/mbedtls/library/pkcs12.c +447 -0
  304. package/external/libedhoc/externals/mbedtls/library/pkcs5.c +496 -0
  305. package/external/libedhoc/externals/mbedtls/library/pkcs7.c +773 -0
  306. package/external/libedhoc/externals/mbedtls/library/pkparse.c +1845 -0
  307. package/external/libedhoc/externals/mbedtls/library/pkwrite.c +836 -0
  308. package/external/libedhoc/externals/mbedtls/library/pkwrite.h +112 -0
  309. package/external/libedhoc/externals/mbedtls/library/platform.c +402 -0
  310. package/external/libedhoc/externals/mbedtls/library/platform_util.c +285 -0
  311. package/external/libedhoc/externals/mbedtls/library/poly1305.c +492 -0
  312. package/external/libedhoc/externals/mbedtls/library/psa_crypto.c +8432 -0
  313. package/external/libedhoc/externals/mbedtls/library/psa_crypto_aead.c +653 -0
  314. package/external/libedhoc/externals/mbedtls/library/psa_crypto_aead.h +499 -0
  315. package/external/libedhoc/externals/mbedtls/library/psa_crypto_cipher.c +590 -0
  316. package/external/libedhoc/externals/mbedtls/library/psa_crypto_cipher.h +293 -0
  317. package/external/libedhoc/externals/mbedtls/library/psa_crypto_client.c +67 -0
  318. package/external/libedhoc/externals/mbedtls/library/psa_crypto_core.h +838 -0
  319. package/external/libedhoc/externals/mbedtls/library/psa_crypto_core_common.h +52 -0
  320. package/external/libedhoc/externals/mbedtls/library/psa_crypto_driver_wrappers.h +2871 -0
  321. package/external/libedhoc/externals/mbedtls/library/psa_crypto_driver_wrappers_no_static.c +256 -0
  322. package/external/libedhoc/externals/mbedtls/library/psa_crypto_driver_wrappers_no_static.h +31 -0
  323. package/external/libedhoc/externals/mbedtls/library/psa_crypto_ecp.c +561 -0
  324. package/external/libedhoc/externals/mbedtls/library/psa_crypto_ecp.h +267 -0
  325. package/external/libedhoc/externals/mbedtls/library/psa_crypto_ffdh.c +295 -0
  326. package/external/libedhoc/externals/mbedtls/library/psa_crypto_ffdh.h +132 -0
  327. package/external/libedhoc/externals/mbedtls/library/psa_crypto_hash.c +470 -0
  328. package/external/libedhoc/externals/mbedtls/library/psa_crypto_hash.h +211 -0
  329. package/external/libedhoc/externals/mbedtls/library/psa_crypto_invasive.h +70 -0
  330. package/external/libedhoc/externals/mbedtls/library/psa_crypto_its.h +131 -0
  331. package/external/libedhoc/externals/mbedtls/library/psa_crypto_mac.c +496 -0
  332. package/external/libedhoc/externals/mbedtls/library/psa_crypto_mac.h +264 -0
  333. package/external/libedhoc/externals/mbedtls/library/psa_crypto_pake.c +571 -0
  334. package/external/libedhoc/externals/mbedtls/library/psa_crypto_pake.h +159 -0
  335. package/external/libedhoc/externals/mbedtls/library/psa_crypto_random_impl.h +192 -0
  336. package/external/libedhoc/externals/mbedtls/library/psa_crypto_rsa.c +727 -0
  337. package/external/libedhoc/externals/mbedtls/library/psa_crypto_rsa.h +317 -0
  338. package/external/libedhoc/externals/mbedtls/library/psa_crypto_se.c +373 -0
  339. package/external/libedhoc/externals/mbedtls/library/psa_crypto_se.h +185 -0
  340. package/external/libedhoc/externals/mbedtls/library/psa_crypto_slot_management.c +559 -0
  341. package/external/libedhoc/externals/mbedtls/library/psa_crypto_slot_management.h +213 -0
  342. package/external/libedhoc/externals/mbedtls/library/psa_crypto_storage.c +481 -0
  343. package/external/libedhoc/externals/mbedtls/library/psa_crypto_storage.h +384 -0
  344. package/external/libedhoc/externals/mbedtls/library/psa_its_file.c +259 -0
  345. package/external/libedhoc/externals/mbedtls/library/psa_util.c +160 -0
  346. package/external/libedhoc/externals/mbedtls/library/psa_util_internal.h +96 -0
  347. package/external/libedhoc/externals/mbedtls/library/ripemd160.c +490 -0
  348. package/external/libedhoc/externals/mbedtls/library/rsa.c +2640 -0
  349. package/external/libedhoc/externals/mbedtls/library/rsa_alt_helpers.c +447 -0
  350. package/external/libedhoc/externals/mbedtls/library/rsa_alt_helpers.h +208 -0
  351. package/external/libedhoc/externals/mbedtls/library/sha1.c +480 -0
  352. package/external/libedhoc/externals/mbedtls/library/sha256.c +946 -0
  353. package/external/libedhoc/externals/mbedtls/library/sha3.c +626 -0
  354. package/external/libedhoc/externals/mbedtls/library/sha512.c +1111 -0
  355. package/external/libedhoc/externals/mbedtls/library/ssl_cache.c +410 -0
  356. package/external/libedhoc/externals/mbedtls/library/ssl_ciphersuites.c +2050 -0
  357. package/external/libedhoc/externals/mbedtls/library/ssl_client.c +1017 -0
  358. package/external/libedhoc/externals/mbedtls/library/ssl_client.h +22 -0
  359. package/external/libedhoc/externals/mbedtls/library/ssl_cookie.c +380 -0
  360. package/external/libedhoc/externals/mbedtls/library/ssl_debug_helpers.h +78 -0
  361. package/external/libedhoc/externals/mbedtls/library/ssl_debug_helpers_generated.c +234 -0
  362. package/external/libedhoc/externals/mbedtls/library/ssl_misc.h +2847 -0
  363. package/external/libedhoc/externals/mbedtls/library/ssl_msg.c +6155 -0
  364. package/external/libedhoc/externals/mbedtls/library/ssl_ticket.c +540 -0
  365. package/external/libedhoc/externals/mbedtls/library/ssl_tls.c +9577 -0
  366. package/external/libedhoc/externals/mbedtls/library/ssl_tls12_client.c +3607 -0
  367. package/external/libedhoc/externals/mbedtls/library/ssl_tls12_server.c +4403 -0
  368. package/external/libedhoc/externals/mbedtls/library/ssl_tls13_client.c +3046 -0
  369. package/external/libedhoc/externals/mbedtls/library/ssl_tls13_generic.c +1740 -0
  370. package/external/libedhoc/externals/mbedtls/library/ssl_tls13_invasive.h +23 -0
  371. package/external/libedhoc/externals/mbedtls/library/ssl_tls13_keys.c +1897 -0
  372. package/external/libedhoc/externals/mbedtls/library/ssl_tls13_keys.h +651 -0
  373. package/external/libedhoc/externals/mbedtls/library/ssl_tls13_server.c +3146 -0
  374. package/external/libedhoc/externals/mbedtls/library/threading.c +181 -0
  375. package/external/libedhoc/externals/mbedtls/library/timing.c +154 -0
  376. package/external/libedhoc/externals/mbedtls/library/version.c +32 -0
  377. package/external/libedhoc/externals/mbedtls/library/version_features.c +826 -0
  378. package/external/libedhoc/externals/mbedtls/library/x509.c +1776 -0
  379. package/external/libedhoc/externals/mbedtls/library/x509_create.c +557 -0
  380. package/external/libedhoc/externals/mbedtls/library/x509_crl.c +712 -0
  381. package/external/libedhoc/externals/mbedtls/library/x509_crt.c +3292 -0
  382. package/external/libedhoc/externals/mbedtls/library/x509_csr.c +574 -0
  383. package/external/libedhoc/externals/mbedtls/library/x509write.c +174 -0
  384. package/external/libedhoc/externals/mbedtls/library/x509write_crt.c +681 -0
  385. package/external/libedhoc/externals/mbedtls/library/x509write_csr.c +331 -0
  386. package/external/libedhoc/externals/mbedtls/programs/aes/crypt_and_hash.c +573 -0
  387. package/external/libedhoc/externals/mbedtls/programs/cipher/cipher_aead_demo.c +259 -0
  388. package/external/libedhoc/externals/mbedtls/programs/fuzz/common.c +105 -0
  389. package/external/libedhoc/externals/mbedtls/programs/fuzz/common.h +25 -0
  390. package/external/libedhoc/externals/mbedtls/programs/fuzz/fuzz_client.c +195 -0
  391. package/external/libedhoc/externals/mbedtls/programs/fuzz/fuzz_dtlsclient.c +138 -0
  392. package/external/libedhoc/externals/mbedtls/programs/fuzz/fuzz_dtlsserver.c +183 -0
  393. package/external/libedhoc/externals/mbedtls/programs/fuzz/fuzz_pkcs7.c +20 -0
  394. package/external/libedhoc/externals/mbedtls/programs/fuzz/fuzz_privkey.c +106 -0
  395. package/external/libedhoc/externals/mbedtls/programs/fuzz/fuzz_pubkey.c +86 -0
  396. package/external/libedhoc/externals/mbedtls/programs/fuzz/fuzz_server.c +218 -0
  397. package/external/libedhoc/externals/mbedtls/programs/fuzz/fuzz_x509crl.c +41 -0
  398. package/external/libedhoc/externals/mbedtls/programs/fuzz/fuzz_x509crt.c +41 -0
  399. package/external/libedhoc/externals/mbedtls/programs/fuzz/fuzz_x509csr.c +41 -0
  400. package/external/libedhoc/externals/mbedtls/programs/fuzz/onefile.c +69 -0
  401. package/external/libedhoc/externals/mbedtls/programs/hash/generic_sum.c +209 -0
  402. package/external/libedhoc/externals/mbedtls/programs/hash/hello.c +45 -0
  403. package/external/libedhoc/externals/mbedtls/programs/hash/md_hmac_demo.c +136 -0
  404. package/external/libedhoc/externals/mbedtls/programs/pkey/dh_client.c +274 -0
  405. package/external/libedhoc/externals/mbedtls/programs/pkey/dh_genprime.c +161 -0
  406. package/external/libedhoc/externals/mbedtls/programs/pkey/dh_server.c +296 -0
  407. package/external/libedhoc/externals/mbedtls/programs/pkey/ecdh_curve25519.c +189 -0
  408. package/external/libedhoc/externals/mbedtls/programs/pkey/ecdsa.c +217 -0
  409. package/external/libedhoc/externals/mbedtls/programs/pkey/gen_key.c +419 -0
  410. package/external/libedhoc/externals/mbedtls/programs/pkey/key_app.c +316 -0
  411. package/external/libedhoc/externals/mbedtls/programs/pkey/key_app_writer.c +435 -0
  412. package/external/libedhoc/externals/mbedtls/programs/pkey/mpi_demo.c +84 -0
  413. package/external/libedhoc/externals/mbedtls/programs/pkey/pk_decrypt.c +153 -0
  414. package/external/libedhoc/externals/mbedtls/programs/pkey/pk_encrypt.c +154 -0
  415. package/external/libedhoc/externals/mbedtls/programs/pkey/pk_sign.c +155 -0
  416. package/external/libedhoc/externals/mbedtls/programs/pkey/pk_verify.c +128 -0
  417. package/external/libedhoc/externals/mbedtls/programs/pkey/rsa_decrypt.c +172 -0
  418. package/external/libedhoc/externals/mbedtls/programs/pkey/rsa_encrypt.c +149 -0
  419. package/external/libedhoc/externals/mbedtls/programs/pkey/rsa_genkey.c +141 -0
  420. package/external/libedhoc/externals/mbedtls/programs/pkey/rsa_sign.c +155 -0
  421. package/external/libedhoc/externals/mbedtls/programs/pkey/rsa_sign_pss.c +161 -0
  422. package/external/libedhoc/externals/mbedtls/programs/pkey/rsa_verify.c +131 -0
  423. package/external/libedhoc/externals/mbedtls/programs/pkey/rsa_verify_pss.c +136 -0
  424. package/external/libedhoc/externals/mbedtls/programs/psa/aead_demo.c +281 -0
  425. package/external/libedhoc/externals/mbedtls/programs/psa/crypto_examples.c +321 -0
  426. package/external/libedhoc/externals/mbedtls/programs/psa/hmac_demo.c +159 -0
  427. package/external/libedhoc/externals/mbedtls/programs/psa/key_ladder_demo.c +691 -0
  428. package/external/libedhoc/externals/mbedtls/programs/psa/psa_constant_names.c +310 -0
  429. package/external/libedhoc/externals/mbedtls/programs/psa/psa_constant_names_generated.c +474 -0
  430. package/external/libedhoc/externals/mbedtls/programs/random/gen_entropy.c +75 -0
  431. package/external/libedhoc/externals/mbedtls/programs/random/gen_random_ctr_drbg.c +107 -0
  432. package/external/libedhoc/externals/mbedtls/programs/ssl/dtls_client.c +342 -0
  433. package/external/libedhoc/externals/mbedtls/programs/ssl/dtls_server.c +408 -0
  434. package/external/libedhoc/externals/mbedtls/programs/ssl/mini_client.c +274 -0
  435. package/external/libedhoc/externals/mbedtls/programs/ssl/ssl_client1.c +288 -0
  436. package/external/libedhoc/externals/mbedtls/programs/ssl/ssl_client2.c +3118 -0
  437. package/external/libedhoc/externals/mbedtls/programs/ssl/ssl_context_info.c +1009 -0
  438. package/external/libedhoc/externals/mbedtls/programs/ssl/ssl_fork_server.c +381 -0
  439. package/external/libedhoc/externals/mbedtls/programs/ssl/ssl_mail_client.c +804 -0
  440. package/external/libedhoc/externals/mbedtls/programs/ssl/ssl_pthread_server.c +489 -0
  441. package/external/libedhoc/externals/mbedtls/programs/ssl/ssl_server.c +362 -0
  442. package/external/libedhoc/externals/mbedtls/programs/ssl/ssl_server2.c +4268 -0
  443. package/external/libedhoc/externals/mbedtls/programs/ssl/ssl_test_common_source.c +375 -0
  444. package/external/libedhoc/externals/mbedtls/programs/ssl/ssl_test_lib.c +601 -0
  445. package/external/libedhoc/externals/mbedtls/programs/ssl/ssl_test_lib.h +306 -0
  446. package/external/libedhoc/externals/mbedtls/programs/test/benchmark.c +1284 -0
  447. package/external/libedhoc/externals/mbedtls/programs/test/cmake_package/cmake_package.c +27 -0
  448. package/external/libedhoc/externals/mbedtls/programs/test/cmake_package_install/cmake_package_install.c +28 -0
  449. package/external/libedhoc/externals/mbedtls/programs/test/cmake_subproject/cmake_subproject.c +28 -0
  450. package/external/libedhoc/externals/mbedtls/programs/test/dlopen.c +92 -0
  451. package/external/libedhoc/externals/mbedtls/programs/test/query_compile_time_config.c +66 -0
  452. package/external/libedhoc/externals/mbedtls/programs/test/query_config.c +5137 -0
  453. package/external/libedhoc/externals/mbedtls/programs/test/query_config.h +34 -0
  454. package/external/libedhoc/externals/mbedtls/programs/test/query_included_headers.c +29 -0
  455. package/external/libedhoc/externals/mbedtls/programs/test/selftest.c +583 -0
  456. package/external/libedhoc/externals/mbedtls/programs/test/udp_proxy.c +967 -0
  457. package/external/libedhoc/externals/mbedtls/programs/test/zeroize.c +72 -0
  458. package/external/libedhoc/externals/mbedtls/programs/util/pem2der.c +265 -0
  459. package/external/libedhoc/externals/mbedtls/programs/util/strerror.c +61 -0
  460. package/external/libedhoc/externals/mbedtls/programs/wince_main.c +31 -0
  461. package/external/libedhoc/externals/mbedtls/programs/x509/cert_app.c +456 -0
  462. package/external/libedhoc/externals/mbedtls/programs/x509/cert_req.c +509 -0
  463. package/external/libedhoc/externals/mbedtls/programs/x509/cert_write.c +1012 -0
  464. package/external/libedhoc/externals/mbedtls/programs/x509/crl_app.c +132 -0
  465. package/external/libedhoc/externals/mbedtls/programs/x509/load_roots.c +165 -0
  466. package/external/libedhoc/externals/mbedtls/programs/x509/req_app.c +132 -0
  467. package/external/libedhoc/externals/mbedtls/tests/configs/tls13-only.h +31 -0
  468. package/external/libedhoc/externals/mbedtls/tests/configs/user-config-for-test.h +89 -0
  469. package/external/libedhoc/externals/mbedtls/tests/configs/user-config-malloc-0-null.h +22 -0
  470. package/external/libedhoc/externals/mbedtls/tests/configs/user-config-zeroize-memset.h +17 -0
  471. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/aes_alt.h +23 -0
  472. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/aria_alt.h +16 -0
  473. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/camellia_alt.h +16 -0
  474. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/ccm_alt.h +16 -0
  475. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/chacha20_alt.h +16 -0
  476. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/chachapoly_alt.h +18 -0
  477. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/cmac_alt.h +15 -0
  478. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/des_alt.h +22 -0
  479. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/dhm_alt.h +16 -0
  480. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/ecjpake_alt.h +15 -0
  481. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/ecp_alt.h +22 -0
  482. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/gcm_alt.h +16 -0
  483. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/md5_alt.h +16 -0
  484. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/nist_kw_alt.h +15 -0
  485. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/platform_alt.h +16 -0
  486. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/poly1305_alt.h +16 -0
  487. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/ripemd160_alt.h +16 -0
  488. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/rsa_alt.h +16 -0
  489. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/sha1_alt.h +16 -0
  490. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/sha256_alt.h +16 -0
  491. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/sha512_alt.h +16 -0
  492. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/threading_alt.h +14 -0
  493. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/timing_alt.h +19 -0
  494. package/external/libedhoc/externals/mbedtls/tests/include/alt-extra/psa/crypto.h +7 -0
  495. package/external/libedhoc/externals/mbedtls/tests/include/baremetal-override/time.h +6 -0
  496. package/external/libedhoc/externals/mbedtls/tests/include/spe/crypto_spe.h +131 -0
  497. package/external/libedhoc/externals/mbedtls/tests/include/test/arguments.h +26 -0
  498. package/external/libedhoc/externals/mbedtls/tests/include/test/asn1_helpers.h +38 -0
  499. package/external/libedhoc/externals/mbedtls/tests/include/test/bignum_helpers.h +106 -0
  500. package/external/libedhoc/externals/mbedtls/tests/include/test/certs.h +234 -0
  501. package/external/libedhoc/externals/mbedtls/tests/include/test/constant_flow.h +71 -0
  502. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/aead.h +121 -0
  503. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/asymmetric_encryption.h +67 -0
  504. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/cipher.h +130 -0
  505. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/config_test_driver.h +44 -0
  506. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/crypto_config_test_driver_extension.h +430 -0
  507. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/hash.h +64 -0
  508. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/key_agreement.h +62 -0
  509. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/key_management.h +123 -0
  510. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/mac.h +125 -0
  511. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/pake.h +75 -0
  512. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/signature.h +112 -0
  513. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/test_driver.h +32 -0
  514. package/external/libedhoc/externals/mbedtls/tests/include/test/fake_external_rng_for_test.h +40 -0
  515. package/external/libedhoc/externals/mbedtls/tests/include/test/helpers.h +268 -0
  516. package/external/libedhoc/externals/mbedtls/tests/include/test/macros.h +250 -0
  517. package/external/libedhoc/externals/mbedtls/tests/include/test/psa_crypto_helpers.h +398 -0
  518. package/external/libedhoc/externals/mbedtls/tests/include/test/psa_exercise_key.h +223 -0
  519. package/external/libedhoc/externals/mbedtls/tests/include/test/psa_helpers.h +24 -0
  520. package/external/libedhoc/externals/mbedtls/tests/include/test/random.h +91 -0
  521. package/external/libedhoc/externals/mbedtls/tests/include/test/ssl_helpers.h +628 -0
  522. package/external/libedhoc/externals/mbedtls/tests/src/asn1_helpers.c +62 -0
  523. package/external/libedhoc/externals/mbedtls/tests/src/bignum_helpers.c +145 -0
  524. package/external/libedhoc/externals/mbedtls/tests/src/certs.c +480 -0
  525. package/external/libedhoc/externals/mbedtls/tests/src/drivers/hash.c +199 -0
  526. package/external/libedhoc/externals/mbedtls/tests/src/drivers/platform_builtin_keys.c +78 -0
  527. package/external/libedhoc/externals/mbedtls/tests/src/drivers/test_driver_aead.c +462 -0
  528. package/external/libedhoc/externals/mbedtls/tests/src/drivers/test_driver_asymmetric_encryption.c +151 -0
  529. package/external/libedhoc/externals/mbedtls/tests/src/drivers/test_driver_cipher.c +424 -0
  530. package/external/libedhoc/externals/mbedtls/tests/src/drivers/test_driver_key_agreement.c +147 -0
  531. package/external/libedhoc/externals/mbedtls/tests/src/drivers/test_driver_key_management.c +783 -0
  532. package/external/libedhoc/externals/mbedtls/tests/src/drivers/test_driver_mac.c +422 -0
  533. package/external/libedhoc/externals/mbedtls/tests/src/drivers/test_driver_pake.c +202 -0
  534. package/external/libedhoc/externals/mbedtls/tests/src/drivers/test_driver_signature.c +405 -0
  535. package/external/libedhoc/externals/mbedtls/tests/src/fake_external_rng_for_test.c +45 -0
  536. package/external/libedhoc/externals/mbedtls/tests/src/helpers.c +353 -0
  537. package/external/libedhoc/externals/mbedtls/tests/src/psa_crypto_helpers.c +196 -0
  538. package/external/libedhoc/externals/mbedtls/tests/src/psa_exercise_key.c +989 -0
  539. package/external/libedhoc/externals/mbedtls/tests/src/random.c +136 -0
  540. package/external/libedhoc/externals/mbedtls/tests/src/test_certs.h +1226 -0
  541. package/external/libedhoc/externals/mbedtls/tests/src/test_helpers/ssl_helpers.c +2292 -0
  542. package/external/libedhoc/externals/mbedtls/tests/src/threading_helpers.c +210 -0
  543. package/external/libedhoc/externals/zcbor/include/zcbor_common.h +422 -0
  544. package/external/libedhoc/externals/zcbor/include/zcbor_debug.h +69 -0
  545. package/external/libedhoc/externals/zcbor/include/zcbor_decode.h +358 -0
  546. package/external/libedhoc/externals/zcbor/include/zcbor_encode.h +296 -0
  547. package/external/libedhoc/externals/zcbor/include/zcbor_tags.h +94 -0
  548. package/external/libedhoc/externals/zcbor/samples/hello_world/src/main.c +41 -0
  549. package/external/libedhoc/externals/zcbor/samples/pet/include/pet_decode.h +39 -0
  550. package/external/libedhoc/externals/zcbor/samples/pet/include/pet_encode.h +39 -0
  551. package/external/libedhoc/externals/zcbor/samples/pet/include/pet_types.h +47 -0
  552. package/external/libedhoc/externals/zcbor/samples/pet/src/main.c +128 -0
  553. package/external/libedhoc/externals/zcbor/samples/pet/src/pet_decode.c +69 -0
  554. package/external/libedhoc/externals/zcbor/samples/pet/src/pet_encode.c +70 -0
  555. package/external/libedhoc/externals/zcbor/src/zcbor_common.c +257 -0
  556. package/external/libedhoc/externals/zcbor/src/zcbor_decode.c +1107 -0
  557. package/external/libedhoc/externals/zcbor/src/zcbor_encode.c +722 -0
  558. package/external/libedhoc/externals/zcbor/tests/decode/test1_suit_old_formats/src/main.c +368 -0
  559. package/external/libedhoc/externals/zcbor/tests/decode/test2_suit/src/main.c +189 -0
  560. package/external/libedhoc/externals/zcbor/tests/decode/test3_simple/src/main.c +529 -0
  561. package/external/libedhoc/externals/zcbor/tests/decode/test5_corner_cases/src/main.c +2010 -0
  562. package/external/libedhoc/externals/zcbor/tests/decode/test7_suit9_simple/src/main.c +134 -0
  563. package/external/libedhoc/externals/zcbor/tests/decode/test8_suit12/src/main.c +863 -0
  564. package/external/libedhoc/externals/zcbor/tests/decode/test9_manifest14/src/main.c +364 -0
  565. package/external/libedhoc/externals/zcbor/tests/encode/test1_suit/src/main.c +453 -0
  566. package/external/libedhoc/externals/zcbor/tests/encode/test2_simple/src/main.c +123 -0
  567. package/external/libedhoc/externals/zcbor/tests/encode/test3_corner_cases/src/main.c +1527 -0
  568. package/external/libedhoc/externals/zcbor/tests/encode/test4_senml/src/main.c +66 -0
  569. package/external/libedhoc/externals/zcbor/tests/fuzz/fuzz_manifest12.c +136 -0
  570. package/external/libedhoc/externals/zcbor/tests/fuzz/fuzz_pet.c +12 -0
  571. package/external/libedhoc/externals/zcbor/tests/fuzz/main_entry.c +60 -0
  572. package/external/libedhoc/externals/zcbor/tests/fuzz/main_entry.h +5 -0
  573. package/external/libedhoc/externals/zcbor/tests/unit/test1_unit_tests/src/main.c +1044 -0
  574. package/external/libedhoc/externals/zcbor/tests/unit/test3_float16/src/main.c +202 -0
  575. package/external/libedhoc/include/edhoc.h +393 -0
  576. package/external/libedhoc/include/edhoc_context.h +318 -0
  577. package/external/libedhoc/include/edhoc_credentials.h +217 -0
  578. package/external/libedhoc/include/edhoc_crypto.h +331 -0
  579. package/external/libedhoc/include/edhoc_ead.h +99 -0
  580. package/external/libedhoc/include/edhoc_macros.h +51 -0
  581. package/external/libedhoc/include/edhoc_values.h +181 -0
  582. package/external/libedhoc/library/edhoc.c +219 -0
  583. package/external/libedhoc/library/edhoc_exporter.c +543 -0
  584. package/external/libedhoc/library/edhoc_message_1.c +439 -0
  585. package/external/libedhoc/library/edhoc_message_2.c +2994 -0
  586. package/external/libedhoc/library/edhoc_message_3.c +2658 -0
  587. package/external/libedhoc/library/edhoc_message_4.c +826 -0
  588. package/external/libedhoc/library/edhoc_message_error.c +238 -0
  589. package/external/libedhoc/tests/include/cipher_suite_negotiation/test_edhoc_cipher_suite_negotiation.h +37 -0
  590. package/external/libedhoc/tests/include/cipher_suites/cipher_suite_0.h +134 -0
  591. package/external/libedhoc/tests/include/cipher_suites/cipher_suite_2.h +140 -0
  592. package/external/libedhoc/tests/include/cipher_suites/test_cipher_suite_0.h +48 -0
  593. package/external/libedhoc/tests/include/cipher_suites/test_cipher_suite_2.h +48 -0
  594. package/external/libedhoc/tests/include/edhoc_trace_1/authentication_credentials_1.h +60 -0
  595. package/external/libedhoc/tests/include/edhoc_trace_1/test_edhoc_handshake_1.h +208 -0
  596. package/external/libedhoc/tests/include/edhoc_trace_1/test_edhoc_handshake_ead_1.h +59 -0
  597. package/external/libedhoc/tests/include/edhoc_trace_1/test_vector_1.h +738 -0
  598. package/external/libedhoc/tests/include/edhoc_trace_2/authentication_credentials_2.h +60 -0
  599. package/external/libedhoc/tests/include/edhoc_trace_2/test_edhoc_handshake_2.h +199 -0
  600. package/external/libedhoc/tests/include/edhoc_trace_2/test_vector_2.h +525 -0
  601. package/external/libedhoc/tests/include/error_message/test_edhoc_error_message.h +48 -0
  602. package/external/libedhoc/tests/include/x509_chain_cs_0/authentication_credentials_x5chain_cs_0.h +92 -0
  603. package/external/libedhoc/tests/include/x509_chain_cs_0/test_edhoc_handshake_x5chain_cs_0.h +96 -0
  604. package/external/libedhoc/tests/include/x509_chain_cs_0/test_vector_x5chain_cs_0.h +140 -0
  605. package/external/libedhoc/tests/include/x509_chain_cs_2/authentication_credentials_x5chain_cs_2.h +58 -0
  606. package/external/libedhoc/tests/include/x509_chain_cs_2/test_edhoc_handshake_x5chain_cs_2.h +56 -0
  607. package/external/libedhoc/tests/include/x509_chain_cs_2/test_edhoc_handshake_x5chain_cs_2_ead.h +57 -0
  608. package/external/libedhoc/tests/include/x509_chain_cs_2/test_vector_x5chain_cs_2.h +169 -0
  609. package/external/libedhoc/tests/include/x509_chain_cs_2_static_dh/authentication_credentials_x5chain_cs_2_static_dh.h +59 -0
  610. package/external/libedhoc/tests/include/x509_chain_cs_2_static_dh/test_edhoc_handshake_x5chain_cs_2_static_dh_ead.h +57 -0
  611. package/external/libedhoc/tests/include/x509_chain_cs_2_static_dh/test_vector_x5chain_cs_2_static_dh.h +163 -0
  612. package/external/libedhoc/tests/include/x509_hash_cs_2/authentication_credentials_x5t_cs_2.h +60 -0
  613. package/external/libedhoc/tests/include/x509_hash_cs_2/test_edhoc_handshake_x5t_cs_2_ead.h +57 -0
  614. package/external/libedhoc/tests/include/x509_hash_cs_2/test_vector_x5t_cs_2.h +181 -0
  615. package/external/libedhoc/tests/src/cipher_suite_negotiation/test_edhoc_cipher_suite_negotiation.c +544 -0
  616. package/external/libedhoc/tests/src/cipher_suites/cipher_suite_0.c +447 -0
  617. package/external/libedhoc/tests/src/cipher_suites/cipher_suite_2.c +600 -0
  618. package/external/libedhoc/tests/src/cipher_suites/test_cipher_suite_0.c +475 -0
  619. package/external/libedhoc/tests/src/cipher_suites/test_cipher_suite_2.c +473 -0
  620. package/external/libedhoc/tests/src/edhoc_trace_1/authentication_credentials_1.c +252 -0
  621. package/external/libedhoc/tests/src/edhoc_trace_1/test_edhoc_handshake_1.c +1829 -0
  622. package/external/libedhoc/tests/src/edhoc_trace_1/test_edhoc_handshake_ead_1.c +1247 -0
  623. package/external/libedhoc/tests/src/edhoc_trace_2/authentication_credentials_2.c +170 -0
  624. package/external/libedhoc/tests/src/edhoc_trace_2/test_edhoc_handshake_2.c +1783 -0
  625. package/external/libedhoc/tests/src/error_message/test_edhoc_error_message.c +226 -0
  626. package/external/libedhoc/tests/src/tests.c +228 -0
  627. package/external/libedhoc/tests/src/x509_chain_cs_0/authentication_credentials_x5chain_cs_0.c +332 -0
  628. package/external/libedhoc/tests/src/x509_chain_cs_0/test_edhoc_handshake_x5chain_cs_0.c +936 -0
  629. package/external/libedhoc/tests/src/x509_chain_cs_2/authentication_credentials_x5chain_cs_2.c +166 -0
  630. package/external/libedhoc/tests/src/x509_chain_cs_2/test_edhoc_handshake_x5chain_cs_2.c +587 -0
  631. package/external/libedhoc/tests/src/x509_chain_cs_2/test_edhoc_handshake_x5chain_cs_2_ead.c +917 -0
  632. package/external/libedhoc/tests/src/x509_chain_cs_2_static_dh/authentication_credentials_x5chain_cs_2_static_dh.c +186 -0
  633. package/external/libedhoc/tests/src/x509_chain_cs_2_static_dh/test_edhoc_handshake_x5chain_cs_2_static_dh_ead.c +743 -0
  634. package/external/libedhoc/tests/src/x509_hash_cs_2/authentication_credentials_x5t_cs_2.c +261 -0
  635. package/external/libedhoc/tests/src/x509_hash_cs_2/test_edhoc_handshake_x5t_cs_2_ead.c +854 -0
  636. package/include/EdhocComposeAsyncWorker.h +61 -0
  637. package/include/EdhocCredentialManager.h +100 -0
  638. package/include/EdhocCryptoManager.h +504 -0
  639. package/include/EdhocEadManager.h +151 -0
  640. package/include/EdhocExportAsyncWorker.h +71 -0
  641. package/include/EdhocProcessAsyncWorker.h +76 -0
  642. package/include/LibEDHOC.h +304 -0
  643. package/include/Suites.h +27 -0
  644. package/include/UserContext.h +79 -0
  645. package/include/Utils.h +110 -0
  646. package/package.json +5 -5
  647. package/prebuilds/win32-ia32/edhoc.node +0 -0
  648. package/prebuilds/win32-x64/edhoc.node +0 -0
  649. package/src/EdhocComposeAsyncWorker.cpp +88 -0
  650. package/src/EdhocCredentialManager.cpp +360 -0
  651. package/src/EdhocCryptoManager.cpp +967 -0
  652. package/src/EdhocEadManager.cpp +156 -0
  653. package/src/EdhocExportAsyncWorker.cpp +82 -0
  654. package/src/EdhocProcessAsyncWorker.cpp +74 -0
  655. package/src/LibEDHOC.cpp +369 -0
  656. package/src/Suites.cpp +153 -0
  657. package/src/Utils.cpp +115 -0
  658. package/dist/bindings.d.ts +0 -5
  659. package/dist/bindings.d.ts.map +0 -1
  660. package/dist/bindings.js +0 -10
  661. package/dist/credentials.d.ts +0 -16
  662. package/dist/credentials.d.ts.map +0 -1
  663. package/dist/credentials.js +0 -84
  664. package/dist/crypto.d.ts +0 -22
  665. package/dist/crypto.d.ts.map +0 -1
  666. package/dist/crypto.js +0 -177
  667. package/dist/edhoc.d.ts +0 -346
  668. package/dist/edhoc.d.ts.map +0 -1
  669. package/dist/edhoc.js +0 -76
  670. package/dist/index.d.ts +0 -4
  671. package/dist/index.d.ts.map +0 -1
  672. package/dist/index.js +0 -19
@@ -0,0 +1,4116 @@
1
+ /**
2
+ * \file mbedtls_config.h
3
+ *
4
+ * \brief Configuration options (set of defines)
5
+ *
6
+ * This set of compile-time options may be used to enable
7
+ * or disable features selectively, and reduce the global
8
+ * memory footprint.
9
+ */
10
+ /*
11
+ * Copyright The Mbed TLS Contributors
12
+ * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
13
+ */
14
+
15
+ /**
16
+ * This is an optional version symbol that enables compatibility handling of
17
+ * config files.
18
+ *
19
+ * It is equal to the #MBEDTLS_VERSION_NUMBER of the Mbed TLS version that
20
+ * introduced the config format we want to be compatible with.
21
+ */
22
+ //#define MBEDTLS_CONFIG_VERSION 0x03000000
23
+
24
+ /**
25
+ * \name SECTION: System support
26
+ *
27
+ * This section sets system specific settings.
28
+ * \{
29
+ */
30
+
31
+ /**
32
+ * \def MBEDTLS_HAVE_ASM
33
+ *
34
+ * The compiler has support for asm().
35
+ *
36
+ * Requires support for asm() in compiler.
37
+ *
38
+ * Used in:
39
+ * library/aesni.h
40
+ * library/aria.c
41
+ * library/bn_mul.h
42
+ * library/constant_time.c
43
+ * library/padlock.h
44
+ *
45
+ * Required by:
46
+ * MBEDTLS_AESCE_C
47
+ * MBEDTLS_AESNI_C (on some platforms)
48
+ * MBEDTLS_PADLOCK_C
49
+ *
50
+ * Comment to disable the use of assembly code.
51
+ */
52
+ #define MBEDTLS_HAVE_ASM
53
+
54
+ /**
55
+ * \def MBEDTLS_NO_UDBL_DIVISION
56
+ *
57
+ * The platform lacks support for double-width integer division (64-bit
58
+ * division on a 32-bit platform, 128-bit division on a 64-bit platform).
59
+ *
60
+ * Used in:
61
+ * include/mbedtls/bignum.h
62
+ * library/bignum.c
63
+ *
64
+ * The bignum code uses double-width division to speed up some operations.
65
+ * Double-width division is often implemented in software that needs to
66
+ * be linked with the program. The presence of a double-width integer
67
+ * type is usually detected automatically through preprocessor macros,
68
+ * but the automatic detection cannot know whether the code needs to
69
+ * and can be linked with an implementation of division for that type.
70
+ * By default division is assumed to be usable if the type is present.
71
+ * Uncomment this option to prevent the use of double-width division.
72
+ *
73
+ * Note that division for the native integer type is always required.
74
+ * Furthermore, a 64-bit type is always required even on a 32-bit
75
+ * platform, but it need not support multiplication or division. In some
76
+ * cases it is also desirable to disable some double-width operations. For
77
+ * example, if double-width division is implemented in software, disabling
78
+ * it can reduce code size in some embedded targets.
79
+ */
80
+ //#define MBEDTLS_NO_UDBL_DIVISION
81
+
82
+ /**
83
+ * \def MBEDTLS_NO_64BIT_MULTIPLICATION
84
+ *
85
+ * The platform lacks support for 32x32 -> 64-bit multiplication.
86
+ *
87
+ * Used in:
88
+ * library/poly1305.c
89
+ *
90
+ * Some parts of the library may use multiplication of two unsigned 32-bit
91
+ * operands with a 64-bit result in order to speed up computations. On some
92
+ * platforms, this is not available in hardware and has to be implemented in
93
+ * software, usually in a library provided by the toolchain.
94
+ *
95
+ * Sometimes it is not desirable to have to link to that library. This option
96
+ * removes the dependency of that library on platforms that lack a hardware
97
+ * 64-bit multiplier by embedding a software implementation in Mbed TLS.
98
+ *
99
+ * Note that depending on the compiler, this may decrease performance compared
100
+ * to using the library function provided by the toolchain.
101
+ */
102
+ //#define MBEDTLS_NO_64BIT_MULTIPLICATION
103
+
104
+ /**
105
+ * \def MBEDTLS_HAVE_SSE2
106
+ *
107
+ * CPU supports SSE2 instruction set.
108
+ *
109
+ * Uncomment if the CPU supports SSE2 (IA-32 specific).
110
+ */
111
+ //#define MBEDTLS_HAVE_SSE2
112
+
113
+ /**
114
+ * \def MBEDTLS_HAVE_TIME
115
+ *
116
+ * System has time.h and time().
117
+ * The time does not need to be correct, only time differences are used,
118
+ * by contrast with MBEDTLS_HAVE_TIME_DATE
119
+ *
120
+ * Defining MBEDTLS_HAVE_TIME allows you to specify MBEDTLS_PLATFORM_TIME_ALT,
121
+ * MBEDTLS_PLATFORM_TIME_MACRO, MBEDTLS_PLATFORM_TIME_TYPE_MACRO and
122
+ * MBEDTLS_PLATFORM_STD_TIME.
123
+ *
124
+ * Comment if your system does not support time functions.
125
+ *
126
+ * \note If MBEDTLS_TIMING_C is set - to enable the semi-portable timing
127
+ * interface - timing.c will include time.h on suitable platforms
128
+ * regardless of the setting of MBEDTLS_HAVE_TIME, unless
129
+ * MBEDTLS_TIMING_ALT is used. See timing.c for more information.
130
+ */
131
+ #define MBEDTLS_HAVE_TIME
132
+
133
+ /**
134
+ * \def MBEDTLS_HAVE_TIME_DATE
135
+ *
136
+ * System has time.h, time(), and an implementation for
137
+ * mbedtls_platform_gmtime_r() (see below).
138
+ * The time needs to be correct (not necessarily very accurate, but at least
139
+ * the date should be correct). This is used to verify the validity period of
140
+ * X.509 certificates.
141
+ *
142
+ * Comment if your system does not have a correct clock.
143
+ *
144
+ * \note mbedtls_platform_gmtime_r() is an abstraction in platform_util.h that
145
+ * behaves similarly to the gmtime_r() function from the C standard. Refer to
146
+ * the documentation for mbedtls_platform_gmtime_r() for more information.
147
+ *
148
+ * \note It is possible to configure an implementation for
149
+ * mbedtls_platform_gmtime_r() at compile-time by using the macro
150
+ * MBEDTLS_PLATFORM_GMTIME_R_ALT.
151
+ */
152
+ #define MBEDTLS_HAVE_TIME_DATE
153
+
154
+ /**
155
+ * \def MBEDTLS_PLATFORM_MEMORY
156
+ *
157
+ * Enable the memory allocation layer.
158
+ *
159
+ * By default Mbed TLS uses the system-provided calloc() and free().
160
+ * This allows different allocators (self-implemented or provided) to be
161
+ * provided to the platform abstraction layer.
162
+ *
163
+ * Enabling #MBEDTLS_PLATFORM_MEMORY without the
164
+ * MBEDTLS_PLATFORM_{FREE,CALLOC}_MACROs will provide
165
+ * "mbedtls_platform_set_calloc_free()" allowing you to set an alternative calloc() and
166
+ * free() function pointer at runtime.
167
+ *
168
+ * Enabling #MBEDTLS_PLATFORM_MEMORY and specifying
169
+ * MBEDTLS_PLATFORM_{CALLOC,FREE}_MACROs will allow you to specify the
170
+ * alternate function at compile time.
171
+ *
172
+ * An overview of how the value of mbedtls_calloc is determined:
173
+ *
174
+ * - if !MBEDTLS_PLATFORM_MEMORY
175
+ * - mbedtls_calloc = calloc
176
+ * - if MBEDTLS_PLATFORM_MEMORY
177
+ * - if (MBEDTLS_PLATFORM_CALLOC_MACRO && MBEDTLS_PLATFORM_FREE_MACRO):
178
+ * - mbedtls_calloc = MBEDTLS_PLATFORM_CALLOC_MACRO
179
+ * - if !(MBEDTLS_PLATFORM_CALLOC_MACRO && MBEDTLS_PLATFORM_FREE_MACRO):
180
+ * - Dynamic setup via mbedtls_platform_set_calloc_free is now possible with a default value MBEDTLS_PLATFORM_STD_CALLOC.
181
+ * - How is MBEDTLS_PLATFORM_STD_CALLOC handled?
182
+ * - if MBEDTLS_PLATFORM_NO_STD_FUNCTIONS:
183
+ * - MBEDTLS_PLATFORM_STD_CALLOC is not set to anything;
184
+ * - MBEDTLS_PLATFORM_STD_MEM_HDR can be included if present;
185
+ * - if !MBEDTLS_PLATFORM_NO_STD_FUNCTIONS:
186
+ * - if MBEDTLS_PLATFORM_STD_CALLOC is present:
187
+ * - User-defined MBEDTLS_PLATFORM_STD_CALLOC is respected;
188
+ * - if !MBEDTLS_PLATFORM_STD_CALLOC:
189
+ * - MBEDTLS_PLATFORM_STD_CALLOC = calloc
190
+ *
191
+ * - At this point the presence of MBEDTLS_PLATFORM_STD_CALLOC is checked.
192
+ * - if !MBEDTLS_PLATFORM_STD_CALLOC
193
+ * - MBEDTLS_PLATFORM_STD_CALLOC = uninitialized_calloc
194
+ *
195
+ * - mbedtls_calloc = MBEDTLS_PLATFORM_STD_CALLOC.
196
+ *
197
+ * Defining MBEDTLS_PLATFORM_CALLOC_MACRO and #MBEDTLS_PLATFORM_STD_CALLOC at the same time is not possible.
198
+ * MBEDTLS_PLATFORM_CALLOC_MACRO and MBEDTLS_PLATFORM_FREE_MACRO must both be defined or undefined at the same time.
199
+ * #MBEDTLS_PLATFORM_STD_CALLOC and #MBEDTLS_PLATFORM_STD_FREE do not have to be defined at the same time, as, if they are used,
200
+ * dynamic setup of these functions is possible. See the tree above to see how are they handled in all cases.
201
+ * An uninitialized #MBEDTLS_PLATFORM_STD_CALLOC always fails, returning a null pointer.
202
+ * An uninitialized #MBEDTLS_PLATFORM_STD_FREE does not do anything.
203
+ *
204
+ * Requires: MBEDTLS_PLATFORM_C
205
+ *
206
+ * Enable this layer to allow use of alternative memory allocators.
207
+ */
208
+ //#define MBEDTLS_PLATFORM_MEMORY
209
+
210
+ /**
211
+ * \def MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
212
+ *
213
+ * Do not assign standard functions in the platform layer (e.g. calloc() to
214
+ * MBEDTLS_PLATFORM_STD_CALLOC and printf() to MBEDTLS_PLATFORM_STD_PRINTF)
215
+ *
216
+ * This makes sure there are no linking errors on platforms that do not support
217
+ * these functions. You will HAVE to provide alternatives, either at runtime
218
+ * via the platform_set_xxx() functions or at compile time by setting
219
+ * the MBEDTLS_PLATFORM_STD_XXX defines, or enabling a
220
+ * MBEDTLS_PLATFORM_XXX_MACRO.
221
+ *
222
+ * Requires: MBEDTLS_PLATFORM_C
223
+ *
224
+ * Uncomment to prevent default assignment of standard functions in the
225
+ * platform layer.
226
+ */
227
+ //#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
228
+
229
+ /**
230
+ * \def MBEDTLS_PLATFORM_EXIT_ALT
231
+ *
232
+ * MBEDTLS_PLATFORM_XXX_ALT: Uncomment a macro to let Mbed TLS support the
233
+ * function in the platform abstraction layer.
234
+ *
235
+ * Example: In case you uncomment MBEDTLS_PLATFORM_PRINTF_ALT, Mbed TLS will
236
+ * provide a function "mbedtls_platform_set_printf()" that allows you to set an
237
+ * alternative printf function pointer.
238
+ *
239
+ * All these define require MBEDTLS_PLATFORM_C to be defined!
240
+ *
241
+ * \note MBEDTLS_PLATFORM_SNPRINTF_ALT is required on Windows;
242
+ * it will be enabled automatically by check_config.h
243
+ *
244
+ * \warning MBEDTLS_PLATFORM_XXX_ALT cannot be defined at the same time as
245
+ * MBEDTLS_PLATFORM_XXX_MACRO!
246
+ *
247
+ * Requires: MBEDTLS_PLATFORM_TIME_ALT requires MBEDTLS_HAVE_TIME
248
+ *
249
+ * Uncomment a macro to enable alternate implementation of specific base
250
+ * platform function
251
+ */
252
+ //#define MBEDTLS_PLATFORM_SETBUF_ALT
253
+ //#define MBEDTLS_PLATFORM_EXIT_ALT
254
+ //#define MBEDTLS_PLATFORM_TIME_ALT
255
+ //#define MBEDTLS_PLATFORM_FPRINTF_ALT
256
+ //#define MBEDTLS_PLATFORM_PRINTF_ALT
257
+ //#define MBEDTLS_PLATFORM_SNPRINTF_ALT
258
+ //#define MBEDTLS_PLATFORM_VSNPRINTF_ALT
259
+ //#define MBEDTLS_PLATFORM_NV_SEED_ALT
260
+ //#define MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT
261
+ //#define MBEDTLS_PLATFORM_MS_TIME_ALT
262
+
263
+ /**
264
+ * Uncomment the macro to let Mbed TLS use your alternate implementation of
265
+ * mbedtls_platform_gmtime_r(). This replaces the default implementation in
266
+ * platform_util.c.
267
+ *
268
+ * gmtime() is not a thread-safe function as defined in the C standard. The
269
+ * library will try to use safer implementations of this function, such as
270
+ * gmtime_r() when available. However, if Mbed TLS cannot identify the target
271
+ * system, the implementation of mbedtls_platform_gmtime_r() will default to
272
+ * using the standard gmtime(). In this case, calls from the library to
273
+ * gmtime() will be guarded by the global mutex mbedtls_threading_gmtime_mutex
274
+ * if MBEDTLS_THREADING_C is enabled. We recommend that calls from outside the
275
+ * library are also guarded with this mutex to avoid race conditions. However,
276
+ * if the macro MBEDTLS_PLATFORM_GMTIME_R_ALT is defined, Mbed TLS will
277
+ * unconditionally use the implementation for mbedtls_platform_gmtime_r()
278
+ * supplied at compile time.
279
+ */
280
+ //#define MBEDTLS_PLATFORM_GMTIME_R_ALT
281
+
282
+ /**
283
+ * Uncomment the macro to let Mbed TLS use your alternate implementation of
284
+ * mbedtls_platform_zeroize(), to wipe sensitive data in memory. This replaces
285
+ * the default implementation in platform_util.c.
286
+ *
287
+ * By default, the library uses a system function such as memset_s()
288
+ * (optional feature of C11), explicit_bzero() (BSD and compatible), or
289
+ * SecureZeroMemory (Windows). If no such function is detected, the library
290
+ * falls back to a plain C implementation. Compilers are technically
291
+ * permitted to optimize this implementation out, meaning that the memory is
292
+ * not actually wiped. The library tries to prevent that, but the C language
293
+ * makes it impossible to guarantee that the memory will always be wiped.
294
+ *
295
+ * If your platform provides a guaranteed method to wipe memory which
296
+ * `platform_util.c` does not detect, define this macro to the name of
297
+ * a function that takes two arguments, a `void *` pointer and a length,
298
+ * and wipes that many bytes starting at the specified address. For example,
299
+ * if your platform has explicit_bzero() but `platform_util.c` does not
300
+ * detect its presence, define `MBEDTLS_PLATFORM_ZEROIZE_ALT` to be
301
+ * `explicit_bzero` to use that function as mbedtls_platform_zeroize().
302
+ */
303
+ //#define MBEDTLS_PLATFORM_ZEROIZE_ALT
304
+
305
+ /**
306
+ * \def MBEDTLS_DEPRECATED_WARNING
307
+ *
308
+ * Mark deprecated functions and features so that they generate a warning if
309
+ * used. Functionality deprecated in one version will usually be removed in the
310
+ * next version. You can enable this to help you prepare the transition to a
311
+ * new major version by making sure your code is not using this functionality.
312
+ *
313
+ * This only works with GCC and Clang. With other compilers, you may want to
314
+ * use MBEDTLS_DEPRECATED_REMOVED
315
+ *
316
+ * Uncomment to get warnings on using deprecated functions and features.
317
+ */
318
+ //#define MBEDTLS_DEPRECATED_WARNING
319
+
320
+ /**
321
+ * \def MBEDTLS_DEPRECATED_REMOVED
322
+ *
323
+ * Remove deprecated functions and features so that they generate an error if
324
+ * used. Functionality deprecated in one version will usually be removed in the
325
+ * next version. You can enable this to help you prepare the transition to a
326
+ * new major version by making sure your code is not using this functionality.
327
+ *
328
+ * Uncomment to get errors on using deprecated functions and features.
329
+ */
330
+ //#define MBEDTLS_DEPRECATED_REMOVED
331
+
332
+ /** \} name SECTION: System support */
333
+
334
+ /**
335
+ * \name SECTION: Mbed TLS feature support
336
+ *
337
+ * This section sets support for features that are or are not needed
338
+ * within the modules that are enabled.
339
+ * \{
340
+ */
341
+
342
+ /**
343
+ * \def MBEDTLS_TIMING_ALT
344
+ *
345
+ * Uncomment to provide your own alternate implementation for
346
+ * mbedtls_timing_get_timer(), mbedtls_set_alarm(), mbedtls_set/get_delay()
347
+ *
348
+ * Only works if you have MBEDTLS_TIMING_C enabled.
349
+ *
350
+ * You will need to provide a header "timing_alt.h" and an implementation at
351
+ * compile time.
352
+ */
353
+ //#define MBEDTLS_TIMING_ALT
354
+
355
+ /**
356
+ * \def MBEDTLS_AES_ALT
357
+ *
358
+ * MBEDTLS__MODULE_NAME__ALT: Uncomment a macro to let Mbed TLS use your
359
+ * alternate core implementation of a symmetric crypto, an arithmetic or hash
360
+ * module (e.g. platform specific assembly optimized implementations). Keep
361
+ * in mind that the function prototypes should remain the same.
362
+ *
363
+ * This replaces the whole module. If you only want to replace one of the
364
+ * functions, use one of the MBEDTLS__FUNCTION_NAME__ALT flags.
365
+ *
366
+ * Example: In case you uncomment MBEDTLS_AES_ALT, Mbed TLS will no longer
367
+ * provide the "struct mbedtls_aes_context" definition and omit the base
368
+ * function declarations and implementations. "aes_alt.h" will be included from
369
+ * "aes.h" to include the new function definitions.
370
+ *
371
+ * Uncomment a macro to enable alternate implementation of the corresponding
372
+ * module.
373
+ *
374
+ * \warning MD5, DES and SHA-1 are considered weak and their
375
+ * use constitutes a security risk. If possible, we recommend
376
+ * avoiding dependencies on them, and considering stronger message
377
+ * digests and ciphers instead.
378
+ *
379
+ */
380
+ //#define MBEDTLS_AES_ALT
381
+ //#define MBEDTLS_ARIA_ALT
382
+ //#define MBEDTLS_CAMELLIA_ALT
383
+ //#define MBEDTLS_CCM_ALT
384
+ //#define MBEDTLS_CHACHA20_ALT
385
+ //#define MBEDTLS_CHACHAPOLY_ALT
386
+ //#define MBEDTLS_CMAC_ALT
387
+ //#define MBEDTLS_DES_ALT
388
+ //#define MBEDTLS_DHM_ALT
389
+ //#define MBEDTLS_ECJPAKE_ALT
390
+ //#define MBEDTLS_GCM_ALT
391
+ //#define MBEDTLS_NIST_KW_ALT
392
+ //#define MBEDTLS_MD5_ALT
393
+ //#define MBEDTLS_POLY1305_ALT
394
+ //#define MBEDTLS_RIPEMD160_ALT
395
+ //#define MBEDTLS_RSA_ALT
396
+ //#define MBEDTLS_SHA1_ALT
397
+ //#define MBEDTLS_SHA256_ALT
398
+ //#define MBEDTLS_SHA512_ALT
399
+
400
+ /*
401
+ * When replacing the elliptic curve module, please consider, that it is
402
+ * implemented with two .c files:
403
+ * - ecp.c
404
+ * - ecp_curves.c
405
+ * You can replace them very much like all the other MBEDTLS__MODULE_NAME__ALT
406
+ * macros as described above. The only difference is that you have to make sure
407
+ * that you provide functionality for both .c files.
408
+ */
409
+ //#define MBEDTLS_ECP_ALT
410
+
411
+ /**
412
+ * \def MBEDTLS_SHA256_PROCESS_ALT
413
+ *
414
+ * MBEDTLS__FUNCTION_NAME__ALT: Uncomment a macro to let Mbed TLS use you
415
+ * alternate core implementation of symmetric crypto or hash function. Keep in
416
+ * mind that function prototypes should remain the same.
417
+ *
418
+ * This replaces only one function. The header file from Mbed TLS is still
419
+ * used, in contrast to the MBEDTLS__MODULE_NAME__ALT flags.
420
+ *
421
+ * Example: In case you uncomment MBEDTLS_SHA256_PROCESS_ALT, Mbed TLS will
422
+ * no longer provide the mbedtls_sha1_process() function, but it will still provide
423
+ * the other function (using your mbedtls_sha1_process() function) and the definition
424
+ * of mbedtls_sha1_context, so your implementation of mbedtls_sha1_process must be compatible
425
+ * with this definition.
426
+ *
427
+ * \note If you use the AES_xxx_ALT macros, then it is recommended to also set
428
+ * MBEDTLS_AES_ROM_TABLES in order to help the linker garbage-collect the AES
429
+ * tables.
430
+ *
431
+ * Uncomment a macro to enable alternate implementation of the corresponding
432
+ * function.
433
+ *
434
+ * \warning MD5, DES and SHA-1 are considered weak and their use
435
+ * constitutes a security risk. If possible, we recommend avoiding
436
+ * dependencies on them, and considering stronger message digests
437
+ * and ciphers instead.
438
+ *
439
+ * \warning If both MBEDTLS_ECDSA_SIGN_ALT and MBEDTLS_ECDSA_DETERMINISTIC are
440
+ * enabled, then the deterministic ECDH signature functions pass the
441
+ * the static HMAC-DRBG as RNG to mbedtls_ecdsa_sign(). Therefore
442
+ * alternative implementations should use the RNG only for generating
443
+ * the ephemeral key and nothing else. If this is not possible, then
444
+ * MBEDTLS_ECDSA_DETERMINISTIC should be disabled and an alternative
445
+ * implementation should be provided for mbedtls_ecdsa_sign_det_ext().
446
+ *
447
+ */
448
+ //#define MBEDTLS_MD5_PROCESS_ALT
449
+ //#define MBEDTLS_RIPEMD160_PROCESS_ALT
450
+ //#define MBEDTLS_SHA1_PROCESS_ALT
451
+ //#define MBEDTLS_SHA256_PROCESS_ALT
452
+ //#define MBEDTLS_SHA512_PROCESS_ALT
453
+ //#define MBEDTLS_DES_SETKEY_ALT
454
+ //#define MBEDTLS_DES_CRYPT_ECB_ALT
455
+ //#define MBEDTLS_DES3_CRYPT_ECB_ALT
456
+ //#define MBEDTLS_AES_SETKEY_ENC_ALT
457
+ //#define MBEDTLS_AES_SETKEY_DEC_ALT
458
+ //#define MBEDTLS_AES_ENCRYPT_ALT
459
+ //#define MBEDTLS_AES_DECRYPT_ALT
460
+ //#define MBEDTLS_ECDH_GEN_PUBLIC_ALT
461
+ //#define MBEDTLS_ECDH_COMPUTE_SHARED_ALT
462
+ //#define MBEDTLS_ECDSA_VERIFY_ALT
463
+ //#define MBEDTLS_ECDSA_SIGN_ALT
464
+ //#define MBEDTLS_ECDSA_GENKEY_ALT
465
+
466
+ /**
467
+ * \def MBEDTLS_ECP_INTERNAL_ALT
468
+ *
469
+ * Expose a part of the internal interface of the Elliptic Curve Point module.
470
+ *
471
+ * MBEDTLS_ECP__FUNCTION_NAME__ALT: Uncomment a macro to let Mbed TLS use your
472
+ * alternative core implementation of elliptic curve arithmetic. Keep in mind
473
+ * that function prototypes should remain the same.
474
+ *
475
+ * This partially replaces one function. The header file from Mbed TLS is still
476
+ * used, in contrast to the MBEDTLS_ECP_ALT flag. The original implementation
477
+ * is still present and it is used for group structures not supported by the
478
+ * alternative.
479
+ *
480
+ * The original implementation can in addition be removed by setting the
481
+ * MBEDTLS_ECP_NO_FALLBACK option, in which case any function for which the
482
+ * corresponding MBEDTLS_ECP__FUNCTION_NAME__ALT macro is defined will not be
483
+ * able to fallback to curves not supported by the alternative implementation.
484
+ *
485
+ * Any of these options become available by defining MBEDTLS_ECP_INTERNAL_ALT
486
+ * and implementing the following functions:
487
+ * unsigned char mbedtls_internal_ecp_grp_capable(
488
+ * const mbedtls_ecp_group *grp )
489
+ * int mbedtls_internal_ecp_init( const mbedtls_ecp_group *grp )
490
+ * void mbedtls_internal_ecp_free( const mbedtls_ecp_group *grp )
491
+ * The mbedtls_internal_ecp_grp_capable function should return 1 if the
492
+ * replacement functions implement arithmetic for the given group and 0
493
+ * otherwise.
494
+ * The functions mbedtls_internal_ecp_init and mbedtls_internal_ecp_free are
495
+ * called before and after each point operation and provide an opportunity to
496
+ * implement optimized set up and tear down instructions.
497
+ *
498
+ * Example: In case you set MBEDTLS_ECP_INTERNAL_ALT and
499
+ * MBEDTLS_ECP_DOUBLE_JAC_ALT, Mbed TLS will still provide the ecp_double_jac()
500
+ * function, but will use your mbedtls_internal_ecp_double_jac() if the group
501
+ * for the operation is supported by your implementation (i.e. your
502
+ * mbedtls_internal_ecp_grp_capable() function returns 1 for this group). If the
503
+ * group is not supported by your implementation, then the original Mbed TLS
504
+ * implementation of ecp_double_jac() is used instead, unless this fallback
505
+ * behaviour is disabled by setting MBEDTLS_ECP_NO_FALLBACK (in which case
506
+ * ecp_double_jac() will return MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE).
507
+ *
508
+ * The function prototypes and the definition of mbedtls_ecp_group and
509
+ * mbedtls_ecp_point will not change based on MBEDTLS_ECP_INTERNAL_ALT, so your
510
+ * implementation of mbedtls_internal_ecp__function_name__ must be compatible
511
+ * with their definitions.
512
+ *
513
+ * Uncomment a macro to enable alternate implementation of the corresponding
514
+ * function.
515
+ */
516
+ /* Required for all the functions in this section */
517
+ //#define MBEDTLS_ECP_INTERNAL_ALT
518
+ /* Turn off software fallback for curves not supported in hardware */
519
+ //#define MBEDTLS_ECP_NO_FALLBACK
520
+ /* Support for Weierstrass curves with Jacobi representation */
521
+ //#define MBEDTLS_ECP_RANDOMIZE_JAC_ALT
522
+ //#define MBEDTLS_ECP_ADD_MIXED_ALT
523
+ //#define MBEDTLS_ECP_DOUBLE_JAC_ALT
524
+ //#define MBEDTLS_ECP_NORMALIZE_JAC_MANY_ALT
525
+ //#define MBEDTLS_ECP_NORMALIZE_JAC_ALT
526
+ /* Support for curves with Montgomery arithmetic */
527
+ //#define MBEDTLS_ECP_DOUBLE_ADD_MXZ_ALT
528
+ //#define MBEDTLS_ECP_RANDOMIZE_MXZ_ALT
529
+ //#define MBEDTLS_ECP_NORMALIZE_MXZ_ALT
530
+
531
+ /**
532
+ * \def MBEDTLS_ENTROPY_HARDWARE_ALT
533
+ *
534
+ * Uncomment this macro to let Mbed TLS use your own implementation of a
535
+ * hardware entropy collector.
536
+ *
537
+ * Your function must be called \c mbedtls_hardware_poll(), have the same
538
+ * prototype as declared in library/entropy_poll.h, and accept NULL as first
539
+ * argument.
540
+ *
541
+ * Uncomment to use your own hardware entropy collector.
542
+ */
543
+ //#define MBEDTLS_ENTROPY_HARDWARE_ALT
544
+
545
+ /**
546
+ * \def MBEDTLS_AES_ROM_TABLES
547
+ *
548
+ * Use precomputed AES tables stored in ROM.
549
+ *
550
+ * Uncomment this macro to use precomputed AES tables stored in ROM.
551
+ * Comment this macro to generate AES tables in RAM at runtime.
552
+ *
553
+ * Tradeoff: Using precomputed ROM tables reduces RAM usage by ~8kb
554
+ * (or ~2kb if \c MBEDTLS_AES_FEWER_TABLES is used) and reduces the
555
+ * initialization time before the first AES operation can be performed.
556
+ * It comes at the cost of additional ~8kb ROM use (resp. ~2kb if \c
557
+ * MBEDTLS_AES_FEWER_TABLES below is used), and potentially degraded
558
+ * performance if ROM access is slower than RAM access.
559
+ *
560
+ * This option is independent of \c MBEDTLS_AES_FEWER_TABLES.
561
+ */
562
+ //#define MBEDTLS_AES_ROM_TABLES
563
+
564
+ /**
565
+ * \def MBEDTLS_AES_FEWER_TABLES
566
+ *
567
+ * Use less ROM/RAM for AES tables.
568
+ *
569
+ * Uncommenting this macro omits 75% of the AES tables from
570
+ * ROM / RAM (depending on the value of \c MBEDTLS_AES_ROM_TABLES)
571
+ * by computing their values on the fly during operations
572
+ * (the tables are entry-wise rotations of one another).
573
+ *
574
+ * Tradeoff: Uncommenting this reduces the RAM / ROM footprint
575
+ * by ~6kb but at the cost of more arithmetic operations during
576
+ * runtime. Specifically, one has to compare 4 accesses within
577
+ * different tables to 4 accesses with additional arithmetic
578
+ * operations within the same table. The performance gain/loss
579
+ * depends on the system and memory details.
580
+ *
581
+ * This option is independent of \c MBEDTLS_AES_ROM_TABLES.
582
+ */
583
+ //#define MBEDTLS_AES_FEWER_TABLES
584
+
585
+ /**
586
+ * \def MBEDTLS_AES_ONLY_128_BIT_KEY_LENGTH
587
+ *
588
+ * Use only 128-bit keys in AES operations to save ROM.
589
+ *
590
+ * Uncomment this macro to remove support for AES operations that use 192-
591
+ * or 256-bit keys.
592
+ *
593
+ * Uncommenting this macro reduces the size of AES code by ~300 bytes
594
+ * on v8-M/Thumb2.
595
+ *
596
+ * Module: library/aes.c
597
+ *
598
+ * Requires: MBEDTLS_AES_C
599
+ */
600
+ //#define MBEDTLS_AES_ONLY_128_BIT_KEY_LENGTH
601
+
602
+ /*
603
+ * Disable plain C implementation for AES.
604
+ *
605
+ * When the plain C implementation is enabled, and an implementation using a
606
+ * special CPU feature (such as MBEDTLS_AESCE_C) is also enabled, runtime
607
+ * detection will be used to select between them.
608
+ *
609
+ * If only one implementation is present, runtime detection will not be used.
610
+ * This configuration will crash at runtime if running on a CPU without the
611
+ * necessary features. It will not build unless at least one of MBEDTLS_AESCE_C
612
+ * and/or MBEDTLS_AESNI_C is enabled & present in the build.
613
+ */
614
+ //#define MBEDTLS_AES_USE_HARDWARE_ONLY
615
+
616
+ /**
617
+ * \def MBEDTLS_CAMELLIA_SMALL_MEMORY
618
+ *
619
+ * Use less ROM for the Camellia implementation (saves about 768 bytes).
620
+ *
621
+ * Uncomment this macro to use less memory for Camellia.
622
+ */
623
+ //#define MBEDTLS_CAMELLIA_SMALL_MEMORY
624
+
625
+ /**
626
+ * \def MBEDTLS_CHECK_RETURN_WARNING
627
+ *
628
+ * If this macro is defined, emit a compile-time warning if application code
629
+ * calls a function without checking its return value, but the return value
630
+ * should generally be checked in portable applications.
631
+ *
632
+ * This is only supported on platforms where #MBEDTLS_CHECK_RETURN is
633
+ * implemented. Otherwise this option has no effect.
634
+ *
635
+ * Uncomment to get warnings on using fallible functions without checking
636
+ * their return value.
637
+ *
638
+ * \note This feature is a work in progress.
639
+ * Warnings will be added to more functions in the future.
640
+ *
641
+ * \note A few functions are considered critical, and ignoring the return
642
+ * value of these functions will trigger a warning even if this
643
+ * macro is not defined. To completely disable return value check
644
+ * warnings, define #MBEDTLS_CHECK_RETURN with an empty expansion.
645
+ */
646
+ //#define MBEDTLS_CHECK_RETURN_WARNING
647
+
648
+ /**
649
+ * \def MBEDTLS_CIPHER_MODE_CBC
650
+ *
651
+ * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
652
+ */
653
+ #define MBEDTLS_CIPHER_MODE_CBC
654
+
655
+ /**
656
+ * \def MBEDTLS_CIPHER_MODE_CFB
657
+ *
658
+ * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
659
+ */
660
+ #define MBEDTLS_CIPHER_MODE_CFB
661
+
662
+ /**
663
+ * \def MBEDTLS_CIPHER_MODE_CTR
664
+ *
665
+ * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
666
+ */
667
+ #define MBEDTLS_CIPHER_MODE_CTR
668
+
669
+ /**
670
+ * \def MBEDTLS_CIPHER_MODE_OFB
671
+ *
672
+ * Enable Output Feedback mode (OFB) for symmetric ciphers.
673
+ */
674
+ #define MBEDTLS_CIPHER_MODE_OFB
675
+
676
+ /**
677
+ * \def MBEDTLS_CIPHER_MODE_XTS
678
+ *
679
+ * Enable Xor-encrypt-xor with ciphertext stealing mode (XTS) for AES.
680
+ */
681
+ #define MBEDTLS_CIPHER_MODE_XTS
682
+
683
+ /**
684
+ * \def MBEDTLS_CIPHER_NULL_CIPHER
685
+ *
686
+ * Enable NULL cipher.
687
+ * Warning: Only do so when you know what you are doing. This allows for
688
+ * encryption or channels without any security!
689
+ *
690
+ * To enable the following ciphersuites:
691
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA
692
+ * MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA
693
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA
694
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA
695
+ * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384
696
+ * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256
697
+ * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA
698
+ * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384
699
+ * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256
700
+ * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA
701
+ * MBEDTLS_TLS_RSA_WITH_NULL_SHA256
702
+ * MBEDTLS_TLS_RSA_WITH_NULL_SHA
703
+ * MBEDTLS_TLS_RSA_WITH_NULL_MD5
704
+ * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384
705
+ * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256
706
+ * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA
707
+ * MBEDTLS_TLS_PSK_WITH_NULL_SHA384
708
+ * MBEDTLS_TLS_PSK_WITH_NULL_SHA256
709
+ * MBEDTLS_TLS_PSK_WITH_NULL_SHA
710
+ *
711
+ * Uncomment this macro to enable the NULL cipher and ciphersuites
712
+ */
713
+ //#define MBEDTLS_CIPHER_NULL_CIPHER
714
+
715
+ /**
716
+ * \def MBEDTLS_CIPHER_PADDING_PKCS7
717
+ *
718
+ * MBEDTLS_CIPHER_PADDING_XXX: Uncomment or comment macros to add support for
719
+ * specific padding modes in the cipher layer with cipher modes that support
720
+ * padding (e.g. CBC)
721
+ *
722
+ * If you disable all padding modes, only full blocks can be used with CBC.
723
+ *
724
+ * Enable padding modes in the cipher layer.
725
+ */
726
+ #define MBEDTLS_CIPHER_PADDING_PKCS7
727
+ #define MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
728
+ #define MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
729
+ #define MBEDTLS_CIPHER_PADDING_ZEROS
730
+
731
+ /** \def MBEDTLS_CTR_DRBG_USE_128_BIT_KEY
732
+ *
733
+ * Uncomment this macro to use a 128-bit key in the CTR_DRBG module.
734
+ * Without this, CTR_DRBG uses a 256-bit key
735
+ * unless \c MBEDTLS_AES_ONLY_128_BIT_KEY_LENGTH is set.
736
+ */
737
+ //#define MBEDTLS_CTR_DRBG_USE_128_BIT_KEY
738
+
739
+ /**
740
+ * Enable the verified implementations of ECDH primitives from Project Everest
741
+ * (currently only Curve25519). This feature changes the layout of ECDH
742
+ * contexts and therefore is a compatibility break for applications that access
743
+ * fields of a mbedtls_ecdh_context structure directly. See also
744
+ * MBEDTLS_ECDH_LEGACY_CONTEXT in include/mbedtls/ecdh.h.
745
+ *
746
+ * The Everest code is provided under the Apache 2.0 license only; therefore enabling this
747
+ * option is not compatible with taking the library under the GPL v2.0-or-later license.
748
+ */
749
+ //#define MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED
750
+
751
+ /**
752
+ * \def MBEDTLS_ECP_DP_SECP192R1_ENABLED
753
+ *
754
+ * MBEDTLS_ECP_XXXX_ENABLED: Enables specific curves within the Elliptic Curve
755
+ * module. By default all supported curves are enabled.
756
+ *
757
+ * Comment macros to disable the curve and functions for it
758
+ */
759
+ /* Short Weierstrass curves (supporting ECP, ECDH, ECDSA) */
760
+ #define MBEDTLS_ECP_DP_SECP192R1_ENABLED
761
+ #define MBEDTLS_ECP_DP_SECP224R1_ENABLED
762
+ #define MBEDTLS_ECP_DP_SECP256R1_ENABLED
763
+ #define MBEDTLS_ECP_DP_SECP384R1_ENABLED
764
+ #define MBEDTLS_ECP_DP_SECP521R1_ENABLED
765
+ #define MBEDTLS_ECP_DP_SECP192K1_ENABLED
766
+ #define MBEDTLS_ECP_DP_SECP224K1_ENABLED
767
+ #define MBEDTLS_ECP_DP_SECP256K1_ENABLED
768
+ #define MBEDTLS_ECP_DP_BP256R1_ENABLED
769
+ #define MBEDTLS_ECP_DP_BP384R1_ENABLED
770
+ #define MBEDTLS_ECP_DP_BP512R1_ENABLED
771
+ /* Montgomery curves (supporting ECP) */
772
+ #define MBEDTLS_ECP_DP_CURVE25519_ENABLED
773
+ #define MBEDTLS_ECP_DP_CURVE448_ENABLED
774
+
775
+ /**
776
+ * \def MBEDTLS_ECP_NIST_OPTIM
777
+ *
778
+ * Enable specific 'modulo p' routines for each NIST prime.
779
+ * Depending on the prime and architecture, makes operations 4 to 8 times
780
+ * faster on the corresponding curve.
781
+ *
782
+ * Comment this macro to disable NIST curves optimisation.
783
+ */
784
+ #define MBEDTLS_ECP_NIST_OPTIM
785
+
786
+ /**
787
+ * \def MBEDTLS_ECP_RESTARTABLE
788
+ *
789
+ * Enable "non-blocking" ECC operations that can return early and be resumed.
790
+ *
791
+ * This allows various functions to pause by returning
792
+ * #MBEDTLS_ERR_ECP_IN_PROGRESS (or, for functions in the SSL module,
793
+ * #MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS) and then be called later again in
794
+ * order to further progress and eventually complete their operation. This is
795
+ * controlled through mbedtls_ecp_set_max_ops() which limits the maximum
796
+ * number of ECC operations a function may perform before pausing; see
797
+ * mbedtls_ecp_set_max_ops() for more information.
798
+ *
799
+ * This is useful in non-threaded environments if you want to avoid blocking
800
+ * for too long on ECC (and, hence, X.509 or SSL/TLS) operations.
801
+ *
802
+ * This option:
803
+ * - Adds xxx_restartable() variants of existing operations in the
804
+ * following modules, with corresponding restart context types:
805
+ * - ECP (for Short Weierstrass curves only): scalar multiplication (mul),
806
+ * linear combination (muladd);
807
+ * - ECDSA: signature generation & verification;
808
+ * - PK: signature generation & verification;
809
+ * - X509: certificate chain verification.
810
+ * - Adds mbedtls_ecdh_enable_restart() in the ECDH module.
811
+ * - Changes the behaviour of TLS 1.2 clients (not servers) when using the
812
+ * ECDHE-ECDSA key exchange (not other key exchanges) to make all ECC
813
+ * computations restartable:
814
+ * - ECDH operations from the key exchange, only for Short Weierstrass
815
+ * curves, only when MBEDTLS_USE_PSA_CRYPTO is not enabled.
816
+ * - verification of the server's key exchange signature;
817
+ * - verification of the server's certificate chain;
818
+ * - generation of the client's signature if client authentication is used,
819
+ * with an ECC key/certificate.
820
+ *
821
+ * \note In the cases above, the usual SSL/TLS functions, such as
822
+ * mbedtls_ssl_handshake(), can now return
823
+ * MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS.
824
+ *
825
+ * \note When this option and MBEDTLS_USE_PSA_CRYPTO are both enabled,
826
+ * restartable operations in PK, X.509 and TLS (see above) are not
827
+ * using PSA. On the other hand, ECDH computations in TLS are using
828
+ * PSA, and are not restartable. These are temporary limitations that
829
+ * should be lifted in the future.
830
+ *
831
+ * \note This option only works with the default software implementation of
832
+ * elliptic curve functionality. It is incompatible with
833
+ * MBEDTLS_ECP_ALT, MBEDTLS_ECDH_XXX_ALT, MBEDTLS_ECDSA_XXX_ALT.
834
+ *
835
+ * Requires: MBEDTLS_ECP_C
836
+ *
837
+ * Uncomment this macro to enable restartable ECC computations.
838
+ */
839
+ //#define MBEDTLS_ECP_RESTARTABLE
840
+
841
+ /**
842
+ * Uncomment to enable using new bignum code in the ECC modules.
843
+ *
844
+ * \warning This is currently experimental, incomplete and therefore should not
845
+ * be used in production.
846
+ */
847
+ //#define MBEDTLS_ECP_WITH_MPI_UINT
848
+
849
+ /**
850
+ * \def MBEDTLS_ECDSA_DETERMINISTIC
851
+ *
852
+ * Enable deterministic ECDSA (RFC 6979).
853
+ * Standard ECDSA is "fragile" in the sense that lack of entropy when signing
854
+ * may result in a compromise of the long-term signing key. This is avoided by
855
+ * the deterministic variant.
856
+ *
857
+ * Requires: MBEDTLS_HMAC_DRBG_C, MBEDTLS_ECDSA_C
858
+ *
859
+ * Comment this macro to disable deterministic ECDSA.
860
+ */
861
+ #define MBEDTLS_ECDSA_DETERMINISTIC
862
+
863
+ /**
864
+ * \def MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
865
+ *
866
+ * Enable the PSK based ciphersuite modes in SSL / TLS.
867
+ *
868
+ * This enables the following ciphersuites (if other requisites are
869
+ * enabled as well):
870
+ * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384
871
+ * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384
872
+ * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA
873
+ * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
874
+ * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
875
+ * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256
876
+ * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256
877
+ * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA
878
+ * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
879
+ * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
880
+ */
881
+ #define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
882
+
883
+ /**
884
+ * \def MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
885
+ *
886
+ * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
887
+ *
888
+ * Requires: MBEDTLS_DHM_C
889
+ *
890
+ * This enables the following ciphersuites (if other requisites are
891
+ * enabled as well):
892
+ * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
893
+ * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
894
+ * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA
895
+ * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
896
+ * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
897
+ * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
898
+ * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
899
+ * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA
900
+ * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
901
+ * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
902
+ *
903
+ * \warning Using DHE constitutes a security risk as it
904
+ * is not possible to validate custom DH parameters.
905
+ * If possible, it is recommended users should consider
906
+ * preferring other methods of key exchange.
907
+ * See dhm.h for more details.
908
+ *
909
+ */
910
+ #define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
911
+
912
+ /**
913
+ * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
914
+ *
915
+ * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
916
+ *
917
+ * Requires: MBEDTLS_ECDH_C or (MBEDTLS_USE_PSA_CRYPTO and PSA_WANT_ALG_ECDH)
918
+ *
919
+ * This enables the following ciphersuites (if other requisites are
920
+ * enabled as well):
921
+ * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
922
+ * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
923
+ * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
924
+ * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
925
+ * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
926
+ * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
927
+ */
928
+ #define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
929
+
930
+ /**
931
+ * \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
932
+ *
933
+ * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
934
+ *
935
+ * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
936
+ * MBEDTLS_X509_CRT_PARSE_C
937
+ *
938
+ * This enables the following ciphersuites (if other requisites are
939
+ * enabled as well):
940
+ * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
941
+ * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
942
+ * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA
943
+ * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
944
+ * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
945
+ * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
946
+ * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
947
+ * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA
948
+ * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
949
+ * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
950
+ */
951
+ #define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
952
+
953
+ /**
954
+ * \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
955
+ *
956
+ * Enable the RSA-only based ciphersuite modes in SSL / TLS.
957
+ *
958
+ * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
959
+ * MBEDTLS_X509_CRT_PARSE_C
960
+ *
961
+ * This enables the following ciphersuites (if other requisites are
962
+ * enabled as well):
963
+ * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384
964
+ * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256
965
+ * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA
966
+ * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
967
+ * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
968
+ * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
969
+ * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256
970
+ * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256
971
+ * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA
972
+ * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
973
+ * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
974
+ * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
975
+ */
976
+ #define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
977
+
978
+ /**
979
+ * \def MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
980
+ *
981
+ * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
982
+ *
983
+ * Requires: MBEDTLS_DHM_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
984
+ * MBEDTLS_X509_CRT_PARSE_C
985
+ *
986
+ * This enables the following ciphersuites (if other requisites are
987
+ * enabled as well):
988
+ * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
989
+ * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
990
+ * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
991
+ * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
992
+ * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
993
+ * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
994
+ * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
995
+ * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
996
+ * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
997
+ * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
998
+ * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
999
+ * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1000
+ *
1001
+ * \warning Using DHE constitutes a security risk as it
1002
+ * is not possible to validate custom DH parameters.
1003
+ * If possible, it is recommended users should consider
1004
+ * preferring other methods of key exchange.
1005
+ * See dhm.h for more details.
1006
+ *
1007
+ */
1008
+ #define MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
1009
+
1010
+ /**
1011
+ * \def MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
1012
+ *
1013
+ * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
1014
+ *
1015
+ * Requires: MBEDTLS_ECDH_C or (MBEDTLS_USE_PSA_CRYPTO and PSA_WANT_ALG_ECDH)
1016
+ * MBEDTLS_RSA_C
1017
+ * MBEDTLS_PKCS1_V15
1018
+ * MBEDTLS_X509_CRT_PARSE_C
1019
+ *
1020
+ * This enables the following ciphersuites (if other requisites are
1021
+ * enabled as well):
1022
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
1023
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
1024
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
1025
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1026
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
1027
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
1028
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
1029
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1030
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1031
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1032
+ */
1033
+ #define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
1034
+
1035
+ /**
1036
+ * \def MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
1037
+ *
1038
+ * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
1039
+ *
1040
+ * Requires: MBEDTLS_ECDH_C or (MBEDTLS_USE_PSA_CRYPTO and PSA_WANT_ALG_ECDH)
1041
+ * MBEDTLS_ECDSA_C or (MBEDTLS_USE_PSA_CRYPTO and PSA_WANT_ALG_ECDSA)
1042
+ * MBEDTLS_X509_CRT_PARSE_C
1043
+ *
1044
+ * This enables the following ciphersuites (if other requisites are
1045
+ * enabled as well):
1046
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
1047
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
1048
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
1049
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1050
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1051
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
1052
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
1053
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
1054
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1055
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1056
+ */
1057
+ #define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
1058
+
1059
+ /**
1060
+ * \def MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
1061
+ *
1062
+ * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
1063
+ *
1064
+ * Requires: MBEDTLS_ECDH_C or (MBEDTLS_USE_PSA_CRYPTO and PSA_WANT_ALG_ECDH)
1065
+ * MBEDTLS_ECDSA_C or (MBEDTLS_USE_PSA_CRYPTO and PSA_WANT_ALG_ECDSA)
1066
+ * MBEDTLS_X509_CRT_PARSE_C
1067
+ *
1068
+ * This enables the following ciphersuites (if other requisites are
1069
+ * enabled as well):
1070
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
1071
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
1072
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
1073
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
1074
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
1075
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
1076
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1077
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1078
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1079
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1080
+ */
1081
+ #define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
1082
+
1083
+ /**
1084
+ * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
1085
+ *
1086
+ * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
1087
+ *
1088
+ * Requires: MBEDTLS_ECDH_C or (MBEDTLS_USE_PSA_CRYPTO and PSA_WANT_ALG_ECDH)
1089
+ * MBEDTLS_RSA_C
1090
+ * MBEDTLS_X509_CRT_PARSE_C
1091
+ *
1092
+ * This enables the following ciphersuites (if other requisites are
1093
+ * enabled as well):
1094
+ * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
1095
+ * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
1096
+ * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
1097
+ * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
1098
+ * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
1099
+ * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
1100
+ * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1101
+ * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1102
+ * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1103
+ * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
1104
+ */
1105
+ #define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
1106
+
1107
+ /**
1108
+ * \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
1109
+ *
1110
+ * Enable the ECJPAKE based ciphersuite modes in SSL / TLS.
1111
+ *
1112
+ * \warning This is currently experimental. EC J-PAKE support is based on the
1113
+ * Thread v1.0.0 specification; incompatible changes to the specification
1114
+ * might still happen. For this reason, this is disabled by default.
1115
+ *
1116
+ * Requires: MBEDTLS_ECJPAKE_C or (MBEDTLS_USE_PSA_CRYPTO and PSA_WANT_ALG_JPAKE)
1117
+ * SHA-256 (via MBEDTLS_SHA256_C or a PSA driver)
1118
+ * MBEDTLS_ECP_DP_SECP256R1_ENABLED
1119
+ *
1120
+ * \warning If SHA-256 is provided only by a PSA driver, you must call
1121
+ * psa_crypto_init() before the first hanshake (even if
1122
+ * MBEDTLS_USE_PSA_CRYPTO is disabled).
1123
+ *
1124
+ * This enables the following ciphersuites (if other requisites are
1125
+ * enabled as well):
1126
+ * MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8
1127
+ */
1128
+ //#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
1129
+
1130
+ /**
1131
+ * \def MBEDTLS_PK_PARSE_EC_EXTENDED
1132
+ *
1133
+ * Enhance support for reading EC keys using variants of SEC1 not allowed by
1134
+ * RFC 5915 and RFC 5480.
1135
+ *
1136
+ * Currently this means parsing the SpecifiedECDomain choice of EC
1137
+ * parameters (only known groups are supported, not arbitrary domains, to
1138
+ * avoid validation issues).
1139
+ *
1140
+ * Disable if you only need to support RFC 5915 + 5480 key formats.
1141
+ */
1142
+ #define MBEDTLS_PK_PARSE_EC_EXTENDED
1143
+
1144
+ /**
1145
+ * \def MBEDTLS_PK_PARSE_EC_COMPRESSED
1146
+ *
1147
+ * Enable the support for parsing public keys of type Short Weierstrass
1148
+ * (MBEDTLS_ECP_DP_SECP_XXX and MBEDTLS_ECP_DP_BP_XXX) which are using the
1149
+ * compressed point format. This parsing is done through ECP module's functions.
1150
+ *
1151
+ * \note As explained in the description of MBEDTLS_ECP_PF_COMPRESSED (in ecp.h)
1152
+ * the only unsupported curves are MBEDTLS_ECP_DP_SECP224R1 and
1153
+ * MBEDTLS_ECP_DP_SECP224K1.
1154
+ */
1155
+ #define MBEDTLS_PK_PARSE_EC_COMPRESSED
1156
+
1157
+ /**
1158
+ * \def MBEDTLS_ERROR_STRERROR_DUMMY
1159
+ *
1160
+ * Enable a dummy error function to make use of mbedtls_strerror() in
1161
+ * third party libraries easier when MBEDTLS_ERROR_C is disabled
1162
+ * (no effect when MBEDTLS_ERROR_C is enabled).
1163
+ *
1164
+ * You can safely disable this if MBEDTLS_ERROR_C is enabled, or if you're
1165
+ * not using mbedtls_strerror() or error_strerror() in your application.
1166
+ *
1167
+ * Disable if you run into name conflicts and want to really remove the
1168
+ * mbedtls_strerror()
1169
+ */
1170
+ #define MBEDTLS_ERROR_STRERROR_DUMMY
1171
+
1172
+ /**
1173
+ * \def MBEDTLS_GENPRIME
1174
+ *
1175
+ * Enable the prime-number generation code.
1176
+ *
1177
+ * Requires: MBEDTLS_BIGNUM_C
1178
+ */
1179
+ #define MBEDTLS_GENPRIME
1180
+
1181
+ /**
1182
+ * \def MBEDTLS_FS_IO
1183
+ *
1184
+ * Enable functions that use the filesystem.
1185
+ */
1186
+ #define MBEDTLS_FS_IO
1187
+
1188
+ /**
1189
+ * \def MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
1190
+ *
1191
+ * Do not add default entropy sources in mbedtls_entropy_init().
1192
+ *
1193
+ * This is useful to have more control over the added entropy sources in an
1194
+ * application.
1195
+ *
1196
+ * Uncomment this macro to prevent loading of default entropy functions.
1197
+ */
1198
+ //#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
1199
+
1200
+ /**
1201
+ * \def MBEDTLS_NO_PLATFORM_ENTROPY
1202
+ *
1203
+ * Do not use built-in platform entropy functions.
1204
+ * This is useful if your platform does not support
1205
+ * standards like the /dev/urandom or Windows CryptoAPI.
1206
+ *
1207
+ * Uncomment this macro to disable the built-in platform entropy functions.
1208
+ */
1209
+ //#define MBEDTLS_NO_PLATFORM_ENTROPY
1210
+
1211
+ /**
1212
+ * \def MBEDTLS_ENTROPY_FORCE_SHA256
1213
+ *
1214
+ * Force the entropy accumulator to use a SHA-256 accumulator instead of the
1215
+ * default SHA-512 based one (if both are available).
1216
+ *
1217
+ * Requires: MBEDTLS_SHA256_C
1218
+ *
1219
+ * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option
1220
+ * if you have performance concerns.
1221
+ *
1222
+ * This option is only useful if both MBEDTLS_SHA256_C and
1223
+ * MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used.
1224
+ */
1225
+ //#define MBEDTLS_ENTROPY_FORCE_SHA256
1226
+
1227
+ /**
1228
+ * \def MBEDTLS_ENTROPY_NV_SEED
1229
+ *
1230
+ * Enable the non-volatile (NV) seed file-based entropy source.
1231
+ * (Also enables the NV seed read/write functions in the platform layer)
1232
+ *
1233
+ * This is crucial (if not required) on systems that do not have a
1234
+ * cryptographic entropy source (in hardware or kernel) available.
1235
+ *
1236
+ * Requires: MBEDTLS_ENTROPY_C, MBEDTLS_PLATFORM_C
1237
+ *
1238
+ * \note The read/write functions that are used by the entropy source are
1239
+ * determined in the platform layer, and can be modified at runtime and/or
1240
+ * compile-time depending on the flags (MBEDTLS_PLATFORM_NV_SEED_*) used.
1241
+ *
1242
+ * \note If you use the default implementation functions that read a seedfile
1243
+ * with regular fopen(), please make sure you make a seedfile with the
1244
+ * proper name (defined in MBEDTLS_PLATFORM_STD_NV_SEED_FILE) and at
1245
+ * least MBEDTLS_ENTROPY_BLOCK_SIZE bytes in size that can be read from
1246
+ * and written to or you will get an entropy source error! The default
1247
+ * implementation will only use the first MBEDTLS_ENTROPY_BLOCK_SIZE
1248
+ * bytes from the file.
1249
+ *
1250
+ * \note The entropy collector will write to the seed file before entropy is
1251
+ * given to an external source, to update it.
1252
+ */
1253
+ //#define MBEDTLS_ENTROPY_NV_SEED
1254
+
1255
+ /* MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER
1256
+ *
1257
+ * Enable key identifiers that encode a key owner identifier.
1258
+ *
1259
+ * The owner of a key is identified by a value of type ::mbedtls_key_owner_id_t
1260
+ * which is currently hard-coded to be int32_t.
1261
+ *
1262
+ * Note that this option is meant for internal use only and may be removed
1263
+ * without notice.
1264
+ */
1265
+ //#define MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER
1266
+
1267
+ /**
1268
+ * \def MBEDTLS_MEMORY_DEBUG
1269
+ *
1270
+ * Enable debugging of buffer allocator memory issues. Automatically prints
1271
+ * (to stderr) all (fatal) messages on memory allocation issues. Enables
1272
+ * function for 'debug output' of allocated memory.
1273
+ *
1274
+ * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C
1275
+ *
1276
+ * Uncomment this macro to let the buffer allocator print out error messages.
1277
+ */
1278
+ //#define MBEDTLS_MEMORY_DEBUG
1279
+
1280
+ /**
1281
+ * \def MBEDTLS_MEMORY_BACKTRACE
1282
+ *
1283
+ * Include backtrace information with each allocated block.
1284
+ *
1285
+ * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C
1286
+ * GLIBC-compatible backtrace() and backtrace_symbols() support
1287
+ *
1288
+ * Uncomment this macro to include backtrace information
1289
+ */
1290
+ //#define MBEDTLS_MEMORY_BACKTRACE
1291
+
1292
+ /**
1293
+ * \def MBEDTLS_PK_RSA_ALT_SUPPORT
1294
+ *
1295
+ * Support external private RSA keys (eg from a HSM) in the PK layer.
1296
+ *
1297
+ * Comment this macro to disable support for external private RSA keys.
1298
+ */
1299
+ #define MBEDTLS_PK_RSA_ALT_SUPPORT
1300
+
1301
+ /**
1302
+ * \def MBEDTLS_PKCS1_V15
1303
+ *
1304
+ * Enable support for PKCS#1 v1.5 encoding.
1305
+ *
1306
+ * Requires: MBEDTLS_RSA_C
1307
+ *
1308
+ * This enables support for PKCS#1 v1.5 operations.
1309
+ */
1310
+ #define MBEDTLS_PKCS1_V15
1311
+
1312
+ /**
1313
+ * \def MBEDTLS_PKCS1_V21
1314
+ *
1315
+ * Enable support for PKCS#1 v2.1 encoding.
1316
+ *
1317
+ * Requires: MBEDTLS_RSA_C
1318
+ *
1319
+ * \warning If using a hash that is only provided by PSA drivers, you must
1320
+ * call psa_crypto_init() before doing any PKCS#1 v2.1 operation.
1321
+ *
1322
+ * This enables support for RSAES-OAEP and RSASSA-PSS operations.
1323
+ */
1324
+ #define MBEDTLS_PKCS1_V21
1325
+
1326
+ /** \def MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS
1327
+ *
1328
+ * Enable support for platform built-in keys. If you enable this feature,
1329
+ * you must implement the function mbedtls_psa_platform_get_builtin_key().
1330
+ * See the documentation of that function for more information.
1331
+ *
1332
+ * Built-in keys are typically derived from a hardware unique key or
1333
+ * stored in a secure element.
1334
+ *
1335
+ * Requires: MBEDTLS_PSA_CRYPTO_C.
1336
+ *
1337
+ * \warning This interface is experimental and may change or be removed
1338
+ * without notice.
1339
+ */
1340
+ //#define MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS
1341
+
1342
+ /** \def MBEDTLS_PSA_CRYPTO_CLIENT
1343
+ *
1344
+ * Enable support for PSA crypto client.
1345
+ *
1346
+ * \note This option allows to include the code necessary for a PSA
1347
+ * crypto client when the PSA crypto implementation is not included in
1348
+ * the library (MBEDTLS_PSA_CRYPTO_C disabled). The code included is the
1349
+ * code to set and get PSA key attributes.
1350
+ * The development of PSA drivers partially relying on the library to
1351
+ * fulfill the hardware gaps is another possible usage of this option.
1352
+ *
1353
+ * \warning This interface is experimental and may change or be removed
1354
+ * without notice.
1355
+ */
1356
+ //#define MBEDTLS_PSA_CRYPTO_CLIENT
1357
+
1358
+ /** \def MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG
1359
+ *
1360
+ * Make the PSA Crypto module use an external random generator provided
1361
+ * by a driver, instead of Mbed TLS's entropy and DRBG modules.
1362
+ *
1363
+ * \note This random generator must deliver random numbers with cryptographic
1364
+ * quality and high performance. It must supply unpredictable numbers
1365
+ * with a uniform distribution. The implementation of this function
1366
+ * is responsible for ensuring that the random generator is seeded
1367
+ * with sufficient entropy. If you have a hardware TRNG which is slow
1368
+ * or delivers non-uniform output, declare it as an entropy source
1369
+ * with mbedtls_entropy_add_source() instead of enabling this option.
1370
+ *
1371
+ * If you enable this option, you must configure the type
1372
+ * ::mbedtls_psa_external_random_context_t in psa/crypto_platform.h
1373
+ * and define a function called mbedtls_psa_external_get_random()
1374
+ * with the following prototype:
1375
+ * ```
1376
+ * psa_status_t mbedtls_psa_external_get_random(
1377
+ * mbedtls_psa_external_random_context_t *context,
1378
+ * uint8_t *output, size_t output_size, size_t *output_length);
1379
+ * );
1380
+ * ```
1381
+ * The \c context value is initialized to 0 before the first call.
1382
+ * The function must fill the \c output buffer with \c output_size bytes
1383
+ * of random data and set \c *output_length to \c output_size.
1384
+ *
1385
+ * Requires: MBEDTLS_PSA_CRYPTO_C
1386
+ *
1387
+ * \warning If you enable this option, code that uses the PSA cryptography
1388
+ * interface will not use any of the entropy sources set up for
1389
+ * the entropy module, nor the NV seed that MBEDTLS_ENTROPY_NV_SEED
1390
+ * enables.
1391
+ *
1392
+ * \note This option is experimental and may be removed without notice.
1393
+ */
1394
+ //#define MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG
1395
+
1396
+ /**
1397
+ * \def MBEDTLS_PSA_CRYPTO_SPM
1398
+ *
1399
+ * When MBEDTLS_PSA_CRYPTO_SPM is defined, the code is built for SPM (Secure
1400
+ * Partition Manager) integration which separates the code into two parts: a
1401
+ * NSPE (Non-Secure Process Environment) and an SPE (Secure Process
1402
+ * Environment).
1403
+ *
1404
+ * If you enable this option, your build environment must include a header
1405
+ * file `"crypto_spe.h"` (either in the `psa` subdirectory of the Mbed TLS
1406
+ * header files, or in another directory on the compiler's include search
1407
+ * path). Alternatively, your platform may customize the header
1408
+ * `psa/crypto_platform.h`, in which case it can skip or replace the
1409
+ * inclusion of `"crypto_spe.h"`.
1410
+ *
1411
+ * Module: library/psa_crypto.c
1412
+ * Requires: MBEDTLS_PSA_CRYPTO_C
1413
+ *
1414
+ */
1415
+ //#define MBEDTLS_PSA_CRYPTO_SPM
1416
+
1417
+ /**
1418
+ * Uncomment to enable p256-m. This is an alternative implementation of
1419
+ * key generation, ECDH and (randomized) ECDSA on the curve SECP256R1.
1420
+ * Compared to the default implementation:
1421
+ *
1422
+ * - p256-m has a much smaller code size and RAM footprint.
1423
+ * - p256-m is only available via the PSA API. This includes the pk module
1424
+ * when #MBEDTLS_USE_PSA_CRYPTO is enabled.
1425
+ * - p256-m does not support deterministic ECDSA, EC-JPAKE, custom protocols
1426
+ * over the core arithmetic, or deterministic derivation of keys.
1427
+ *
1428
+ * We recommend enabling this option if your application uses the PSA API
1429
+ * and the only elliptic curve support it needs is ECDH and ECDSA over
1430
+ * SECP256R1.
1431
+ *
1432
+ * If you enable this option, you do not need to enable any ECC-related
1433
+ * MBEDTLS_xxx option. You do need to separately request support for the
1434
+ * cryptographic mechanisms through the PSA API:
1435
+ * - #MBEDTLS_PSA_CRYPTO_C and #MBEDTLS_PSA_CRYPTO_CONFIG for PSA-based
1436
+ * configuration;
1437
+ * - #MBEDTLS_USE_PSA_CRYPTO if you want to use p256-m from PK, X.509 or TLS;
1438
+ * - #PSA_WANT_ECC_SECP_R1_256;
1439
+ * - #PSA_WANT_ALG_ECDH and/or #PSA_WANT_ALG_ECDSA as needed;
1440
+ * - #PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY, #PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_BASIC,
1441
+ * #PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT,
1442
+ * #PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_EXPORT and/or
1443
+ * #PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE as needed.
1444
+ *
1445
+ * \note To benefit from the smaller code size of p256-m, make sure that you
1446
+ * do not enable any ECC-related option not supported by p256-m: this
1447
+ * would cause the built-in ECC implementation to be built as well, in
1448
+ * order to provide the required option.
1449
+ * Make sure #PSA_WANT_ALG_DETERMINISTIC_ECDSA, #PSA_WANT_ALG_JPAKE and
1450
+ * #PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_DERIVE, and curves other than
1451
+ * SECP256R1 are disabled as they are not supported by this driver.
1452
+ * Also, avoid defining #MBEDTLS_PK_PARSE_EC_COMPRESSED or
1453
+ * #MBEDTLS_PK_PARSE_EC_EXTENDED as those currently require a subset of
1454
+ * the built-in ECC implementation, see docs/driver-only-builds.md.
1455
+ */
1456
+ //#define MBEDTLS_PSA_P256M_DRIVER_ENABLED
1457
+
1458
+ /**
1459
+ * \def MBEDTLS_PSA_INJECT_ENTROPY
1460
+ *
1461
+ * Enable support for entropy injection at first boot. This feature is
1462
+ * required on systems that do not have a built-in entropy source (TRNG).
1463
+ * This feature is currently not supported on systems that have a built-in
1464
+ * entropy source.
1465
+ *
1466
+ * Requires: MBEDTLS_PSA_CRYPTO_STORAGE_C, MBEDTLS_ENTROPY_NV_SEED
1467
+ *
1468
+ */
1469
+ //#define MBEDTLS_PSA_INJECT_ENTROPY
1470
+
1471
+ /**
1472
+ * \def MBEDTLS_RSA_NO_CRT
1473
+ *
1474
+ * Do not use the Chinese Remainder Theorem
1475
+ * for the RSA private operation.
1476
+ *
1477
+ * Uncomment this macro to disable the use of CRT in RSA.
1478
+ *
1479
+ */
1480
+ //#define MBEDTLS_RSA_NO_CRT
1481
+
1482
+ /**
1483
+ * \def MBEDTLS_SELF_TEST
1484
+ *
1485
+ * Enable the checkup functions (*_self_test).
1486
+ */
1487
+ #define MBEDTLS_SELF_TEST
1488
+
1489
+ /**
1490
+ * \def MBEDTLS_SHA256_SMALLER
1491
+ *
1492
+ * Enable an implementation of SHA-256 that has lower ROM footprint but also
1493
+ * lower performance.
1494
+ *
1495
+ * The default implementation is meant to be a reasonable compromise between
1496
+ * performance and size. This version optimizes more aggressively for size at
1497
+ * the expense of performance. Eg on Cortex-M4 it reduces the size of
1498
+ * mbedtls_sha256_process() from ~2KB to ~0.5KB for a performance hit of about
1499
+ * 30%.
1500
+ *
1501
+ * Uncomment to enable the smaller implementation of SHA256.
1502
+ */
1503
+ //#define MBEDTLS_SHA256_SMALLER
1504
+
1505
+ /**
1506
+ * \def MBEDTLS_SHA512_SMALLER
1507
+ *
1508
+ * Enable an implementation of SHA-512 that has lower ROM footprint but also
1509
+ * lower performance.
1510
+ *
1511
+ * Uncomment to enable the smaller implementation of SHA512.
1512
+ */
1513
+ //#define MBEDTLS_SHA512_SMALLER
1514
+
1515
+ /**
1516
+ * \def MBEDTLS_SSL_ALL_ALERT_MESSAGES
1517
+ *
1518
+ * Enable sending of alert messages in case of encountered errors as per RFC.
1519
+ * If you choose not to send the alert messages, Mbed TLS can still communicate
1520
+ * with other servers, only debugging of failures is harder.
1521
+ *
1522
+ * The advantage of not sending alert messages, is that no information is given
1523
+ * about reasons for failures thus preventing adversaries of gaining intel.
1524
+ *
1525
+ * Enable sending of all alert messages
1526
+ */
1527
+ #define MBEDTLS_SSL_ALL_ALERT_MESSAGES
1528
+
1529
+ /**
1530
+ * \def MBEDTLS_SSL_DTLS_CONNECTION_ID
1531
+ *
1532
+ * Enable support for the DTLS Connection ID (CID) extension,
1533
+ * which allows to identify DTLS connections across changes
1534
+ * in the underlying transport. The CID functionality is described
1535
+ * in RFC 9146.
1536
+ *
1537
+ * Setting this option enables the SSL APIs `mbedtls_ssl_set_cid()`,
1538
+ * mbedtls_ssl_get_own_cid()`, `mbedtls_ssl_get_peer_cid()` and
1539
+ * `mbedtls_ssl_conf_cid()`. See the corresponding documentation for
1540
+ * more information.
1541
+ *
1542
+ * The maximum lengths of outgoing and incoming CIDs can be configured
1543
+ * through the options
1544
+ * - MBEDTLS_SSL_CID_OUT_LEN_MAX
1545
+ * - MBEDTLS_SSL_CID_IN_LEN_MAX.
1546
+ *
1547
+ * Requires: MBEDTLS_SSL_PROTO_DTLS
1548
+ *
1549
+ * Uncomment to enable the Connection ID extension.
1550
+ */
1551
+ #define MBEDTLS_SSL_DTLS_CONNECTION_ID
1552
+
1553
+
1554
+ /**
1555
+ * \def MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT
1556
+ *
1557
+ * Defines whether RFC 9146 (default) or the legacy version
1558
+ * (version draft-ietf-tls-dtls-connection-id-05,
1559
+ * https://tools.ietf.org/html/draft-ietf-tls-dtls-connection-id-05)
1560
+ * is used.
1561
+ *
1562
+ * Set the value to 0 for the standard version, and
1563
+ * 1 for the legacy draft version.
1564
+ *
1565
+ * \deprecated Support for the legacy version of the DTLS
1566
+ * Connection ID feature is deprecated. Please
1567
+ * switch to the standardized version defined
1568
+ * in RFC 9146 enabled by utilizing
1569
+ * MBEDTLS_SSL_DTLS_CONNECTION_ID without use
1570
+ * of MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT.
1571
+ *
1572
+ * Requires: MBEDTLS_SSL_DTLS_CONNECTION_ID
1573
+ */
1574
+ #define MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT 0
1575
+
1576
+ /**
1577
+ * \def MBEDTLS_SSL_ASYNC_PRIVATE
1578
+ *
1579
+ * Enable asynchronous external private key operations in SSL. This allows
1580
+ * you to configure an SSL connection to call an external cryptographic
1581
+ * module to perform private key operations instead of performing the
1582
+ * operation inside the library.
1583
+ *
1584
+ * Requires: MBEDTLS_X509_CRT_PARSE_C
1585
+ */
1586
+ //#define MBEDTLS_SSL_ASYNC_PRIVATE
1587
+
1588
+ /**
1589
+ * \def MBEDTLS_SSL_CONTEXT_SERIALIZATION
1590
+ *
1591
+ * Enable serialization of the TLS context structures, through use of the
1592
+ * functions mbedtls_ssl_context_save() and mbedtls_ssl_context_load().
1593
+ *
1594
+ * This pair of functions allows one side of a connection to serialize the
1595
+ * context associated with the connection, then free or re-use that context
1596
+ * while the serialized state is persisted elsewhere, and finally deserialize
1597
+ * that state to a live context for resuming read/write operations on the
1598
+ * connection. From a protocol perspective, the state of the connection is
1599
+ * unaffected, in particular this is entirely transparent to the peer.
1600
+ *
1601
+ * Note: this is distinct from TLS session resumption, which is part of the
1602
+ * protocol and fully visible by the peer. TLS session resumption enables
1603
+ * establishing new connections associated to a saved session with shorter,
1604
+ * lighter handshakes, while context serialization is a local optimization in
1605
+ * handling a single, potentially long-lived connection.
1606
+ *
1607
+ * Enabling these APIs makes some SSL structures larger, as 64 extra bytes are
1608
+ * saved after the handshake to allow for more efficient serialization, so if
1609
+ * you don't need this feature you'll save RAM by disabling it.
1610
+ *
1611
+ * Requires: MBEDTLS_GCM_C or MBEDTLS_CCM_C or MBEDTLS_CHACHAPOLY_C
1612
+ *
1613
+ * Comment to disable the context serialization APIs.
1614
+ */
1615
+ #define MBEDTLS_SSL_CONTEXT_SERIALIZATION
1616
+
1617
+ /**
1618
+ * \def MBEDTLS_SSL_DEBUG_ALL
1619
+ *
1620
+ * Enable the debug messages in SSL module for all issues.
1621
+ * Debug messages have been disabled in some places to prevent timing
1622
+ * attacks due to (unbalanced) debugging function calls.
1623
+ *
1624
+ * If you need all error reporting you should enable this during debugging,
1625
+ * but remove this for production servers that should log as well.
1626
+ *
1627
+ * Uncomment this macro to report all debug messages on errors introducing
1628
+ * a timing side-channel.
1629
+ *
1630
+ */
1631
+ //#define MBEDTLS_SSL_DEBUG_ALL
1632
+
1633
+ /** \def MBEDTLS_SSL_ENCRYPT_THEN_MAC
1634
+ *
1635
+ * Enable support for Encrypt-then-MAC, RFC 7366.
1636
+ *
1637
+ * This allows peers that both support it to use a more robust protection for
1638
+ * ciphersuites using CBC, providing deep resistance against timing attacks
1639
+ * on the padding or underlying cipher.
1640
+ *
1641
+ * This only affects CBC ciphersuites, and is useless if none is defined.
1642
+ *
1643
+ * Requires: MBEDTLS_SSL_PROTO_TLS1_2
1644
+ *
1645
+ * Comment this macro to disable support for Encrypt-then-MAC
1646
+ */
1647
+ #define MBEDTLS_SSL_ENCRYPT_THEN_MAC
1648
+
1649
+ /** \def MBEDTLS_SSL_EXTENDED_MASTER_SECRET
1650
+ *
1651
+ * Enable support for RFC 7627: Session Hash and Extended Master Secret
1652
+ * Extension.
1653
+ *
1654
+ * This was introduced as "the proper fix" to the Triple Handshake family of
1655
+ * attacks, but it is recommended to always use it (even if you disable
1656
+ * renegotiation), since it actually fixes a more fundamental issue in the
1657
+ * original SSL/TLS design, and has implications beyond Triple Handshake.
1658
+ *
1659
+ * Requires: MBEDTLS_SSL_PROTO_TLS1_2
1660
+ *
1661
+ * Comment this macro to disable support for Extended Master Secret.
1662
+ */
1663
+ #define MBEDTLS_SSL_EXTENDED_MASTER_SECRET
1664
+
1665
+ /**
1666
+ * \def MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
1667
+ *
1668
+ * This option controls the availability of the API mbedtls_ssl_get_peer_cert()
1669
+ * giving access to the peer's certificate after completion of the handshake.
1670
+ *
1671
+ * Unless you need mbedtls_ssl_peer_cert() in your application, it is
1672
+ * recommended to disable this option for reduced RAM usage.
1673
+ *
1674
+ * \note If this option is disabled, mbedtls_ssl_get_peer_cert() is still
1675
+ * defined, but always returns \c NULL.
1676
+ *
1677
+ * \note This option has no influence on the protection against the
1678
+ * triple handshake attack. Even if it is disabled, Mbed TLS will
1679
+ * still ensure that certificates do not change during renegotiation,
1680
+ * for example by keeping a hash of the peer's certificate.
1681
+ *
1682
+ * \note This option is required if MBEDTLS_SSL_PROTO_TLS1_3 is set.
1683
+ *
1684
+ * Comment this macro to disable storing the peer's certificate
1685
+ * after the handshake.
1686
+ */
1687
+ #define MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
1688
+
1689
+ /**
1690
+ * \def MBEDTLS_SSL_RENEGOTIATION
1691
+ *
1692
+ * Enable support for TLS renegotiation.
1693
+ *
1694
+ * The two main uses of renegotiation are (1) refresh keys on long-lived
1695
+ * connections and (2) client authentication after the initial handshake.
1696
+ * If you don't need renegotiation, it's probably better to disable it, since
1697
+ * it has been associated with security issues in the past and is easy to
1698
+ * misuse/misunderstand.
1699
+ *
1700
+ * Requires: MBEDTLS_SSL_PROTO_TLS1_2
1701
+ *
1702
+ * Comment this to disable support for renegotiation.
1703
+ *
1704
+ * \note Even if this option is disabled, both client and server are aware
1705
+ * of the Renegotiation Indication Extension (RFC 5746) used to
1706
+ * prevent the SSL renegotiation attack (see RFC 5746 Sect. 1).
1707
+ * (See \c mbedtls_ssl_conf_legacy_renegotiation for the
1708
+ * configuration of this extension).
1709
+ *
1710
+ */
1711
+ #define MBEDTLS_SSL_RENEGOTIATION
1712
+
1713
+ /**
1714
+ * \def MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
1715
+ *
1716
+ * Enable support for RFC 6066 max_fragment_length extension in SSL.
1717
+ *
1718
+ * Comment this macro to disable support for the max_fragment_length extension
1719
+ */
1720
+ #define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
1721
+
1722
+ /**
1723
+ * \def MBEDTLS_SSL_RECORD_SIZE_LIMIT
1724
+ *
1725
+ * Enable support for RFC 8449 record_size_limit extension in SSL (TLS 1.3 only).
1726
+ *
1727
+ * \warning This extension is currently in development and must NOT be used except
1728
+ * for testing purposes.
1729
+ *
1730
+ * Requires: MBEDTLS_SSL_PROTO_TLS1_3
1731
+ *
1732
+ * Uncomment this macro to enable support for the record_size_limit extension
1733
+ */
1734
+ //#define MBEDTLS_SSL_RECORD_SIZE_LIMIT
1735
+
1736
+ /**
1737
+ * \def MBEDTLS_SSL_PROTO_TLS1_2
1738
+ *
1739
+ * Enable support for TLS 1.2 (and DTLS 1.2 if DTLS is enabled).
1740
+ *
1741
+ * Requires: Without MBEDTLS_USE_PSA_CRYPTO: MBEDTLS_MD_C and
1742
+ * (MBEDTLS_SHA256_C or MBEDTLS_SHA384_C or
1743
+ * SHA-256 or SHA-512 provided by a PSA driver)
1744
+ * With MBEDTLS_USE_PSA_CRYPTO:
1745
+ * PSA_WANT_ALG_SHA_256 or PSA_WANT_ALG_SHA_384
1746
+ *
1747
+ * \warning If building with MBEDTLS_USE_PSA_CRYPTO, or if the hash(es) used
1748
+ * are only provided by PSA drivers, you must call psa_crypto_init() before
1749
+ * doing any TLS operations.
1750
+ *
1751
+ * Comment this macro to disable support for TLS 1.2 / DTLS 1.2
1752
+ */
1753
+ #define MBEDTLS_SSL_PROTO_TLS1_2
1754
+
1755
+ /**
1756
+ * \def MBEDTLS_SSL_PROTO_TLS1_3
1757
+ *
1758
+ * Enable support for TLS 1.3.
1759
+ *
1760
+ * \note See docs/architecture/tls13-support.md for a description of the TLS
1761
+ * 1.3 support that this option enables.
1762
+ *
1763
+ * Requires: MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
1764
+ * Requires: MBEDTLS_PSA_CRYPTO_C
1765
+ *
1766
+ * \note TLS 1.3 uses PSA crypto for cryptographic operations that are
1767
+ * directly performed by TLS 1.3 code. As a consequence, you must
1768
+ * call psa_crypto_init() before the first TLS 1.3 handshake.
1769
+ *
1770
+ * \note Cryptographic operations performed indirectly via another module
1771
+ * (X.509, PK) or by code shared with TLS 1.2 (record protection,
1772
+ * running handshake hash) only use PSA crypto if
1773
+ * #MBEDTLS_USE_PSA_CRYPTO is enabled.
1774
+ *
1775
+ * Uncomment this macro to enable the support for TLS 1.3.
1776
+ */
1777
+ //#define MBEDTLS_SSL_PROTO_TLS1_3
1778
+
1779
+ /**
1780
+ * \def MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE
1781
+ *
1782
+ * Enable TLS 1.3 middlebox compatibility mode.
1783
+ *
1784
+ * As specified in Section D.4 of RFC 8446, TLS 1.3 offers a compatibility
1785
+ * mode to make a TLS 1.3 connection more likely to pass through middle boxes
1786
+ * expecting TLS 1.2 traffic.
1787
+ *
1788
+ * Turning on the compatibility mode comes at the cost of a few added bytes
1789
+ * on the wire, but it doesn't affect compatibility with TLS 1.3 implementations
1790
+ * that don't use it. Therefore, unless transmission bandwidth is critical and
1791
+ * you know that middlebox compatibility issues won't occur, it is therefore
1792
+ * recommended to set this option.
1793
+ *
1794
+ * Comment to disable compatibility mode for TLS 1.3. If
1795
+ * MBEDTLS_SSL_PROTO_TLS1_3 is not enabled, this option does not have any
1796
+ * effect on the build.
1797
+ *
1798
+ */
1799
+ //#define MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE
1800
+
1801
+ /**
1802
+ * \def MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED
1803
+ *
1804
+ * Enable TLS 1.3 PSK key exchange mode.
1805
+ *
1806
+ * Comment to disable support for the PSK key exchange mode in TLS 1.3. If
1807
+ * MBEDTLS_SSL_PROTO_TLS1_3 is not enabled, this option does not have any
1808
+ * effect on the build.
1809
+ *
1810
+ */
1811
+ #define MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED
1812
+
1813
+ /**
1814
+ * \def MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED
1815
+ *
1816
+ * Enable TLS 1.3 ephemeral key exchange mode.
1817
+ *
1818
+ * Requires: PSA_WANT_ALG_ECDH or PSA_WANT_ALG_FFDH
1819
+ * MBEDTLS_X509_CRT_PARSE_C
1820
+ * and at least one of:
1821
+ * MBEDTLS_ECDSA_C or (MBEDTLS_USE_PSA_CRYPTO and PSA_WANT_ALG_ECDSA)
1822
+ * MBEDTLS_PKCS1_V21
1823
+ *
1824
+ * Comment to disable support for the ephemeral key exchange mode in TLS 1.3.
1825
+ * If MBEDTLS_SSL_PROTO_TLS1_3 is not enabled, this option does not have any
1826
+ * effect on the build.
1827
+ *
1828
+ */
1829
+ #define MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED
1830
+
1831
+ /**
1832
+ * \def MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
1833
+ *
1834
+ * Enable TLS 1.3 PSK ephemeral key exchange mode.
1835
+ *
1836
+ * Requires: PSA_WANT_ALG_ECDH or PSA_WANT_ALG_FFDH
1837
+ *
1838
+ * Comment to disable support for the PSK ephemeral key exchange mode in
1839
+ * TLS 1.3. If MBEDTLS_SSL_PROTO_TLS1_3 is not enabled, this option does not
1840
+ * have any effect on the build.
1841
+ *
1842
+ */
1843
+ #define MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
1844
+
1845
+ /**
1846
+ * \def MBEDTLS_SSL_EARLY_DATA
1847
+ *
1848
+ * Enable support for RFC 8446 TLS 1.3 early data.
1849
+ *
1850
+ * Requires: MBEDTLS_SSL_SESSION_TICKETS and either
1851
+ * MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED or
1852
+ * MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
1853
+ *
1854
+ * Comment this to disable support for early data. If MBEDTLS_SSL_PROTO_TLS1_3
1855
+ * is not enabled, this option does not have any effect on the build.
1856
+ *
1857
+ * This feature is experimental, not completed and thus not ready for
1858
+ * production.
1859
+ *
1860
+ * \note The maximum amount of early data can be set with
1861
+ * MBEDTLS_SSL_MAX_EARLY_DATA_SIZE.
1862
+ *
1863
+ */
1864
+ //#define MBEDTLS_SSL_EARLY_DATA
1865
+
1866
+ /**
1867
+ * \def MBEDTLS_SSL_PROTO_DTLS
1868
+ *
1869
+ * Enable support for DTLS (all available versions).
1870
+ *
1871
+ * Enable this and MBEDTLS_SSL_PROTO_TLS1_2 to enable DTLS 1.2.
1872
+ *
1873
+ * Requires: MBEDTLS_SSL_PROTO_TLS1_2
1874
+ *
1875
+ * Comment this macro to disable support for DTLS
1876
+ */
1877
+ #define MBEDTLS_SSL_PROTO_DTLS
1878
+
1879
+ /**
1880
+ * \def MBEDTLS_SSL_ALPN
1881
+ *
1882
+ * Enable support for RFC 7301 Application Layer Protocol Negotiation.
1883
+ *
1884
+ * Comment this macro to disable support for ALPN.
1885
+ */
1886
+ #define MBEDTLS_SSL_ALPN
1887
+
1888
+ /**
1889
+ * \def MBEDTLS_SSL_DTLS_ANTI_REPLAY
1890
+ *
1891
+ * Enable support for the anti-replay mechanism in DTLS.
1892
+ *
1893
+ * Requires: MBEDTLS_SSL_TLS_C
1894
+ * MBEDTLS_SSL_PROTO_DTLS
1895
+ *
1896
+ * \warning Disabling this is often a security risk!
1897
+ * See mbedtls_ssl_conf_dtls_anti_replay() for details.
1898
+ *
1899
+ * Comment this to disable anti-replay in DTLS.
1900
+ */
1901
+ #define MBEDTLS_SSL_DTLS_ANTI_REPLAY
1902
+
1903
+ /**
1904
+ * \def MBEDTLS_SSL_DTLS_HELLO_VERIFY
1905
+ *
1906
+ * Enable support for HelloVerifyRequest on DTLS servers.
1907
+ *
1908
+ * This feature is highly recommended to prevent DTLS servers being used as
1909
+ * amplifiers in DoS attacks against other hosts. It should always be enabled
1910
+ * unless you know for sure amplification cannot be a problem in the
1911
+ * environment in which your server operates.
1912
+ *
1913
+ * \warning Disabling this can be a security risk! (see above)
1914
+ *
1915
+ * Requires: MBEDTLS_SSL_PROTO_DTLS
1916
+ *
1917
+ * Comment this to disable support for HelloVerifyRequest.
1918
+ */
1919
+ #define MBEDTLS_SSL_DTLS_HELLO_VERIFY
1920
+
1921
+ /**
1922
+ * \def MBEDTLS_SSL_DTLS_SRTP
1923
+ *
1924
+ * Enable support for negotiation of DTLS-SRTP (RFC 5764)
1925
+ * through the use_srtp extension.
1926
+ *
1927
+ * \note This feature provides the minimum functionality required
1928
+ * to negotiate the use of DTLS-SRTP and to allow the derivation of
1929
+ * the associated SRTP packet protection key material.
1930
+ * In particular, the SRTP packet protection itself, as well as the
1931
+ * demultiplexing of RTP and DTLS packets at the datagram layer
1932
+ * (see Section 5 of RFC 5764), are not handled by this feature.
1933
+ * Instead, after successful completion of a handshake negotiating
1934
+ * the use of DTLS-SRTP, the extended key exporter API
1935
+ * mbedtls_ssl_conf_export_keys_cb() should be used to implement
1936
+ * the key exporter described in Section 4.2 of RFC 5764 and RFC 5705
1937
+ * (this is implemented in the SSL example programs).
1938
+ * The resulting key should then be passed to an SRTP stack.
1939
+ *
1940
+ * Setting this option enables the runtime API
1941
+ * mbedtls_ssl_conf_dtls_srtp_protection_profiles()
1942
+ * through which the supported DTLS-SRTP protection
1943
+ * profiles can be configured. You must call this API at
1944
+ * runtime if you wish to negotiate the use of DTLS-SRTP.
1945
+ *
1946
+ * Requires: MBEDTLS_SSL_PROTO_DTLS
1947
+ *
1948
+ * Uncomment this to enable support for use_srtp extension.
1949
+ */
1950
+ //#define MBEDTLS_SSL_DTLS_SRTP
1951
+
1952
+ /**
1953
+ * \def MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
1954
+ *
1955
+ * Enable server-side support for clients that reconnect from the same port.
1956
+ *
1957
+ * Some clients unexpectedly close the connection and try to reconnect using the
1958
+ * same source port. This needs special support from the server to handle the
1959
+ * new connection securely, as described in section 4.2.8 of RFC 6347. This
1960
+ * flag enables that support.
1961
+ *
1962
+ * Requires: MBEDTLS_SSL_DTLS_HELLO_VERIFY
1963
+ *
1964
+ * Comment this to disable support for clients reusing the source port.
1965
+ */
1966
+ #define MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
1967
+
1968
+ /**
1969
+ * \def MBEDTLS_SSL_SESSION_TICKETS
1970
+ *
1971
+ * Enable support for RFC 5077 session tickets in SSL.
1972
+ * Client-side, provides full support for session tickets (maintenance of a
1973
+ * session store remains the responsibility of the application, though).
1974
+ * Server-side, you also need to provide callbacks for writing and parsing
1975
+ * tickets, including authenticated encryption and key management. Example
1976
+ * callbacks are provided by MBEDTLS_SSL_TICKET_C.
1977
+ *
1978
+ * Comment this macro to disable support for SSL session tickets
1979
+ */
1980
+ #define MBEDTLS_SSL_SESSION_TICKETS
1981
+
1982
+ /**
1983
+ * \def MBEDTLS_SSL_SERVER_NAME_INDICATION
1984
+ *
1985
+ * Enable support for RFC 6066 server name indication (SNI) in SSL.
1986
+ *
1987
+ * Requires: MBEDTLS_X509_CRT_PARSE_C
1988
+ *
1989
+ * Comment this macro to disable support for server name indication in SSL
1990
+ */
1991
+ #define MBEDTLS_SSL_SERVER_NAME_INDICATION
1992
+
1993
+ /**
1994
+ * \def MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH
1995
+ *
1996
+ * When this option is enabled, the SSL buffer will be resized automatically
1997
+ * based on the negotiated maximum fragment length in each direction.
1998
+ *
1999
+ * Requires: MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
2000
+ */
2001
+ //#define MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH
2002
+
2003
+ /**
2004
+ * \def MBEDTLS_TEST_CONSTANT_FLOW_MEMSAN
2005
+ *
2006
+ * Enable testing of the constant-flow nature of some sensitive functions with
2007
+ * clang's MemorySanitizer. This causes some existing tests to also test
2008
+ * this non-functional property of the code under test.
2009
+ *
2010
+ * This setting requires compiling with clang -fsanitize=memory. The test
2011
+ * suites can then be run normally.
2012
+ *
2013
+ * \warning This macro is only used for extended testing; it is not considered
2014
+ * part of the library's API, so it may change or disappear at any time.
2015
+ *
2016
+ * Uncomment to enable testing of the constant-flow nature of selected code.
2017
+ */
2018
+ //#define MBEDTLS_TEST_CONSTANT_FLOW_MEMSAN
2019
+
2020
+ /**
2021
+ * \def MBEDTLS_TEST_CONSTANT_FLOW_VALGRIND
2022
+ *
2023
+ * Enable testing of the constant-flow nature of some sensitive functions with
2024
+ * valgrind's memcheck tool. This causes some existing tests to also test
2025
+ * this non-functional property of the code under test.
2026
+ *
2027
+ * This setting requires valgrind headers for building, and is only useful for
2028
+ * testing if the tests suites are run with valgrind's memcheck. This can be
2029
+ * done for an individual test suite with 'valgrind ./test_suite_xxx', or when
2030
+ * using CMake, this can be done for all test suites with 'make memcheck'.
2031
+ *
2032
+ * \warning This macro is only used for extended testing; it is not considered
2033
+ * part of the library's API, so it may change or disappear at any time.
2034
+ *
2035
+ * Uncomment to enable testing of the constant-flow nature of selected code.
2036
+ */
2037
+ //#define MBEDTLS_TEST_CONSTANT_FLOW_VALGRIND
2038
+
2039
+ /**
2040
+ * \def MBEDTLS_TEST_HOOKS
2041
+ *
2042
+ * Enable features for invasive testing such as introspection functions and
2043
+ * hooks for fault injection. This enables additional unit tests.
2044
+ *
2045
+ * Merely enabling this feature should not change the behavior of the product.
2046
+ * It only adds new code, and new branching points where the default behavior
2047
+ * is the same as when this feature is disabled.
2048
+ * However, this feature increases the attack surface: there is an added
2049
+ * risk of vulnerabilities, and more gadgets that can make exploits easier.
2050
+ * Therefore this feature must never be enabled in production.
2051
+ *
2052
+ * See `docs/architecture/testing/mbed-crypto-invasive-testing.md` for more
2053
+ * information.
2054
+ *
2055
+ * Uncomment to enable invasive tests.
2056
+ */
2057
+ //#define MBEDTLS_TEST_HOOKS
2058
+
2059
+ /**
2060
+ * \def MBEDTLS_THREADING_ALT
2061
+ *
2062
+ * Provide your own alternate threading implementation.
2063
+ *
2064
+ * Requires: MBEDTLS_THREADING_C
2065
+ *
2066
+ * Uncomment this to allow your own alternate threading implementation.
2067
+ */
2068
+ //#define MBEDTLS_THREADING_ALT
2069
+
2070
+ /**
2071
+ * \def MBEDTLS_THREADING_PTHREAD
2072
+ *
2073
+ * Enable the pthread wrapper layer for the threading layer.
2074
+ *
2075
+ * Requires: MBEDTLS_THREADING_C
2076
+ *
2077
+ * Uncomment this to enable pthread mutexes.
2078
+ */
2079
+ //#define MBEDTLS_THREADING_PTHREAD
2080
+
2081
+ /**
2082
+ * \def MBEDTLS_USE_PSA_CRYPTO
2083
+ *
2084
+ * Make the X.509 and TLS libraries use PSA for cryptographic operations as
2085
+ * much as possible, and enable new APIs for using keys handled by PSA Crypto.
2086
+ *
2087
+ * \note Development of this option is currently in progress, and parts of Mbed
2088
+ * TLS's X.509 and TLS modules are not ported to PSA yet. However, these parts
2089
+ * will still continue to work as usual, so enabling this option should not
2090
+ * break backwards compatibility.
2091
+ *
2092
+ * \warning If you enable this option, you need to call `psa_crypto_init()`
2093
+ * before calling any function from the SSL/TLS, X.509 or PK modules, except
2094
+ * for the various mbedtls_xxx_init() functions which can be called at any time.
2095
+ *
2096
+ * \note An important and desirable effect of this option is that it allows
2097
+ * PK, X.509 and TLS to take advantage of PSA drivers. For example, enabling
2098
+ * this option is what allows use of drivers for ECDSA, ECDH and EC J-PAKE in
2099
+ * those modules. However, note that even with this option disabled, some code
2100
+ * in PK, X.509, TLS or the crypto library might still use PSA drivers, if it
2101
+ * can determine it's safe to do so; currently that's the case for hashes.
2102
+ *
2103
+ * \note See docs/use-psa-crypto.md for a complete description this option.
2104
+ *
2105
+ * Requires: MBEDTLS_PSA_CRYPTO_C.
2106
+ *
2107
+ * Uncomment this to enable internal use of PSA Crypto and new associated APIs.
2108
+ */
2109
+ //#define MBEDTLS_USE_PSA_CRYPTO
2110
+
2111
+ /**
2112
+ * \def MBEDTLS_PSA_CRYPTO_CONFIG
2113
+ *
2114
+ * This setting allows support for cryptographic mechanisms through the PSA
2115
+ * API to be configured separately from support through the mbedtls API.
2116
+ *
2117
+ * When this option is disabled, the PSA API exposes the cryptographic
2118
+ * mechanisms that can be implemented on top of the `mbedtls_xxx` API
2119
+ * configured with `MBEDTLS_XXX` symbols.
2120
+ *
2121
+ * When this option is enabled, the PSA API exposes the cryptographic
2122
+ * mechanisms requested by the `PSA_WANT_XXX` symbols defined in
2123
+ * include/psa/crypto_config.h. The corresponding `MBEDTLS_XXX` settings are
2124
+ * automatically enabled if required (i.e. if no PSA driver provides the
2125
+ * mechanism). You may still freely enable additional `MBEDTLS_XXX` symbols
2126
+ * in mbedtls_config.h.
2127
+ *
2128
+ * If the symbol #MBEDTLS_PSA_CRYPTO_CONFIG_FILE is defined, it specifies
2129
+ * an alternative header to include instead of include/psa/crypto_config.h.
2130
+ *
2131
+ * \warning This option is experimental, in that the set of `PSA_WANT_XXX`
2132
+ * symbols is not completely finalized yet, and the configuration
2133
+ * tooling is not ideally adapted to having two separate configuration
2134
+ * files.
2135
+ * Future minor releases of Mbed TLS may make minor changes to those
2136
+ * symbols, but we will endeavor to provide a transition path.
2137
+ * Nonetheless, this option is considered mature enough to use in
2138
+ * production, as long as you accept that you may need to make
2139
+ * minor changes to psa/crypto_config.h when upgrading Mbed TLS.
2140
+ */
2141
+ //#define MBEDTLS_PSA_CRYPTO_CONFIG
2142
+
2143
+ /**
2144
+ * \def MBEDTLS_VERSION_FEATURES
2145
+ *
2146
+ * Allow run-time checking of compile-time enabled features. Thus allowing users
2147
+ * to check at run-time if the library is for instance compiled with threading
2148
+ * support via mbedtls_version_check_feature().
2149
+ *
2150
+ * Requires: MBEDTLS_VERSION_C
2151
+ *
2152
+ * Comment this to disable run-time checking and save ROM space
2153
+ */
2154
+ #define MBEDTLS_VERSION_FEATURES
2155
+
2156
+ /**
2157
+ * \def MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK
2158
+ *
2159
+ * If set, this enables the X.509 API `mbedtls_x509_crt_verify_with_ca_cb()`
2160
+ * and the SSL API `mbedtls_ssl_conf_ca_cb()` which allow users to configure
2161
+ * the set of trusted certificates through a callback instead of a linked
2162
+ * list.
2163
+ *
2164
+ * This is useful for example in environments where a large number of trusted
2165
+ * certificates is present and storing them in a linked list isn't efficient
2166
+ * enough, or when the set of trusted certificates changes frequently.
2167
+ *
2168
+ * See the documentation of `mbedtls_x509_crt_verify_with_ca_cb()` and
2169
+ * `mbedtls_ssl_conf_ca_cb()` for more information.
2170
+ *
2171
+ * Requires: MBEDTLS_X509_CRT_PARSE_C
2172
+ *
2173
+ * Uncomment to enable trusted certificate callbacks.
2174
+ */
2175
+ //#define MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK
2176
+
2177
+ /**
2178
+ * \def MBEDTLS_X509_REMOVE_INFO
2179
+ *
2180
+ * Disable mbedtls_x509_*_info() and related APIs.
2181
+ *
2182
+ * Uncomment to omit mbedtls_x509_*_info(), as well as mbedtls_debug_print_crt()
2183
+ * and other functions/constants only used by these functions, thus reducing
2184
+ * the code footprint by several KB.
2185
+ */
2186
+ //#define MBEDTLS_X509_REMOVE_INFO
2187
+
2188
+ /**
2189
+ * \def MBEDTLS_X509_RSASSA_PSS_SUPPORT
2190
+ *
2191
+ * Enable parsing and verification of X.509 certificates, CRLs and CSRS
2192
+ * signed with RSASSA-PSS (aka PKCS#1 v2.1).
2193
+ *
2194
+ * Comment this macro to disallow using RSASSA-PSS in certificates.
2195
+ */
2196
+ #define MBEDTLS_X509_RSASSA_PSS_SUPPORT
2197
+ /** \} name SECTION: Mbed TLS feature support */
2198
+
2199
+ /**
2200
+ * \name SECTION: Mbed TLS modules
2201
+ *
2202
+ * This section enables or disables entire modules in Mbed TLS
2203
+ * \{
2204
+ */
2205
+
2206
+ /**
2207
+ * \def MBEDTLS_AESNI_C
2208
+ *
2209
+ * Enable AES-NI support on x86-64 or x86-32.
2210
+ *
2211
+ * \note AESNI is only supported with certain compilers and target options:
2212
+ * - Visual Studio 2013: supported.
2213
+ * - GCC, x86-64, target not explicitly supporting AESNI:
2214
+ * requires MBEDTLS_HAVE_ASM.
2215
+ * - GCC, x86-32, target not explicitly supporting AESNI:
2216
+ * not supported.
2217
+ * - GCC, x86-64 or x86-32, target supporting AESNI: supported.
2218
+ * For this assembly-less implementation, you must currently compile
2219
+ * `library/aesni.c` and `library/aes.c` with machine options to enable
2220
+ * SSE2 and AESNI instructions: `gcc -msse2 -maes -mpclmul` or
2221
+ * `clang -maes -mpclmul`.
2222
+ * - Non-x86 targets: this option is silently ignored.
2223
+ * - Other compilers: this option is silently ignored.
2224
+ *
2225
+ * \note
2226
+ * Above, "GCC" includes compatible compilers such as Clang.
2227
+ * The limitations on target support are likely to be relaxed in the future.
2228
+ *
2229
+ * Module: library/aesni.c
2230
+ * Caller: library/aes.c
2231
+ *
2232
+ * Requires: MBEDTLS_HAVE_ASM (on some platforms, see note)
2233
+ *
2234
+ * This modules adds support for the AES-NI instructions on x86.
2235
+ */
2236
+ #define MBEDTLS_AESNI_C
2237
+
2238
+ /**
2239
+ * \def MBEDTLS_AESCE_C
2240
+ *
2241
+ * Enable AES cryptographic extension support on 64-bit Arm.
2242
+ *
2243
+ * Module: library/aesce.c
2244
+ * Caller: library/aes.c
2245
+ *
2246
+ * Requires: MBEDTLS_AES_C
2247
+ *
2248
+ * \warning Runtime detection only works on Linux. For non-Linux operating
2249
+ * system, Armv8-A Cryptographic Extensions must be supported by
2250
+ * the CPU when this option is enabled.
2251
+ *
2252
+ * \note Minimum compiler versions for this feature are Clang 4.0,
2253
+ * armclang 6.6, GCC 6.0 or MSVC 2019 version 16.11.2.
2254
+ *
2255
+ * \note \c CFLAGS must be set to a minimum of \c -march=armv8-a+crypto for
2256
+ * armclang <= 6.9
2257
+ *
2258
+ * This module adds support for the AES Armv8-A Cryptographic Extensions on Aarch64 systems.
2259
+ */
2260
+ #define MBEDTLS_AESCE_C
2261
+
2262
+ /**
2263
+ * \def MBEDTLS_AES_C
2264
+ *
2265
+ * Enable the AES block cipher.
2266
+ *
2267
+ * Module: library/aes.c
2268
+ * Caller: library/cipher.c
2269
+ * library/pem.c
2270
+ * library/ctr_drbg.c
2271
+ *
2272
+ * This module enables the following ciphersuites (if other requisites are
2273
+ * enabled as well):
2274
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
2275
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
2276
+ * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
2277
+ * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
2278
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
2279
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
2280
+ * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
2281
+ * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
2282
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
2283
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
2284
+ * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
2285
+ * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
2286
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
2287
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
2288
+ * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
2289
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
2290
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
2291
+ * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
2292
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
2293
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
2294
+ * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
2295
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
2296
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
2297
+ * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
2298
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
2299
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
2300
+ * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
2301
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
2302
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
2303
+ * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
2304
+ * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
2305
+ * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
2306
+ * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
2307
+ * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
2308
+ * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA
2309
+ * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
2310
+ * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
2311
+ * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
2312
+ * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
2313
+ * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA
2314
+ * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384
2315
+ * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256
2316
+ * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA
2317
+ * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256
2318
+ * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256
2319
+ * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA
2320
+ * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
2321
+ * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
2322
+ * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA
2323
+ * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
2324
+ * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
2325
+ * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA
2326
+ * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384
2327
+ * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384
2328
+ * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA
2329
+ * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256
2330
+ * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256
2331
+ * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA
2332
+ *
2333
+ * PEM_PARSE uses AES for decrypting encrypted keys.
2334
+ */
2335
+ #define MBEDTLS_AES_C
2336
+
2337
+ /**
2338
+ * \def MBEDTLS_ASN1_PARSE_C
2339
+ *
2340
+ * Enable the generic ASN1 parser.
2341
+ *
2342
+ * Module: library/asn1.c
2343
+ * Caller: library/x509.c
2344
+ * library/dhm.c
2345
+ * library/pkcs12.c
2346
+ * library/pkcs5.c
2347
+ * library/pkparse.c
2348
+ */
2349
+ #define MBEDTLS_ASN1_PARSE_C
2350
+
2351
+ /**
2352
+ * \def MBEDTLS_ASN1_WRITE_C
2353
+ *
2354
+ * Enable the generic ASN1 writer.
2355
+ *
2356
+ * Module: library/asn1write.c
2357
+ * Caller: library/ecdsa.c
2358
+ * library/pkwrite.c
2359
+ * library/x509_create.c
2360
+ * library/x509write_crt.c
2361
+ * library/x509write_csr.c
2362
+ */
2363
+ #define MBEDTLS_ASN1_WRITE_C
2364
+
2365
+ /**
2366
+ * \def MBEDTLS_BASE64_C
2367
+ *
2368
+ * Enable the Base64 module.
2369
+ *
2370
+ * Module: library/base64.c
2371
+ * Caller: library/pem.c
2372
+ *
2373
+ * This module is required for PEM support (required by X.509).
2374
+ */
2375
+ #define MBEDTLS_BASE64_C
2376
+
2377
+ /**
2378
+ * \def MBEDTLS_BIGNUM_C
2379
+ *
2380
+ * Enable the multi-precision integer library.
2381
+ *
2382
+ * Module: library/bignum.c
2383
+ * library/bignum_core.c
2384
+ * library/bignum_mod.c
2385
+ * library/bignum_mod_raw.c
2386
+ * Caller: library/dhm.c
2387
+ * library/ecp.c
2388
+ * library/ecdsa.c
2389
+ * library/rsa.c
2390
+ * library/rsa_alt_helpers.c
2391
+ * library/ssl_tls.c
2392
+ *
2393
+ * This module is required for RSA, DHM and ECC (ECDH, ECDSA) support.
2394
+ */
2395
+ #define MBEDTLS_BIGNUM_C
2396
+
2397
+ /**
2398
+ * \def MBEDTLS_CAMELLIA_C
2399
+ *
2400
+ * Enable the Camellia block cipher.
2401
+ *
2402
+ * Module: library/camellia.c
2403
+ * Caller: library/cipher.c
2404
+ *
2405
+ * This module enables the following ciphersuites (if other requisites are
2406
+ * enabled as well):
2407
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
2408
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
2409
+ * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
2410
+ * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
2411
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
2412
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
2413
+ * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
2414
+ * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
2415
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
2416
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
2417
+ * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
2418
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
2419
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
2420
+ * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
2421
+ * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
2422
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
2423
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
2424
+ * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
2425
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
2426
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
2427
+ * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
2428
+ * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
2429
+ * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
2430
+ * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
2431
+ * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
2432
+ * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
2433
+ * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
2434
+ * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
2435
+ * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
2436
+ * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
2437
+ * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
2438
+ * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
2439
+ * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
2440
+ * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
2441
+ * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
2442
+ * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
2443
+ * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
2444
+ * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
2445
+ * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
2446
+ * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
2447
+ * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
2448
+ * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
2449
+ */
2450
+ #define MBEDTLS_CAMELLIA_C
2451
+
2452
+ /**
2453
+ * \def MBEDTLS_ARIA_C
2454
+ *
2455
+ * Enable the ARIA block cipher.
2456
+ *
2457
+ * Module: library/aria.c
2458
+ * Caller: library/cipher.c
2459
+ *
2460
+ * This module enables the following ciphersuites (if other requisites are
2461
+ * enabled as well):
2462
+ *
2463
+ * MBEDTLS_TLS_RSA_WITH_ARIA_128_CBC_SHA256
2464
+ * MBEDTLS_TLS_RSA_WITH_ARIA_256_CBC_SHA384
2465
+ * MBEDTLS_TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256
2466
+ * MBEDTLS_TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384
2467
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256
2468
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384
2469
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256
2470
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384
2471
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256
2472
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384
2473
+ * MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256
2474
+ * MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384
2475
+ * MBEDTLS_TLS_RSA_WITH_ARIA_128_GCM_SHA256
2476
+ * MBEDTLS_TLS_RSA_WITH_ARIA_256_GCM_SHA384
2477
+ * MBEDTLS_TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256
2478
+ * MBEDTLS_TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384
2479
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256
2480
+ * MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384
2481
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256
2482
+ * MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384
2483
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256
2484
+ * MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384
2485
+ * MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256
2486
+ * MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384
2487
+ * MBEDTLS_TLS_PSK_WITH_ARIA_128_CBC_SHA256
2488
+ * MBEDTLS_TLS_PSK_WITH_ARIA_256_CBC_SHA384
2489
+ * MBEDTLS_TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256
2490
+ * MBEDTLS_TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384
2491
+ * MBEDTLS_TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256
2492
+ * MBEDTLS_TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384
2493
+ * MBEDTLS_TLS_PSK_WITH_ARIA_128_GCM_SHA256
2494
+ * MBEDTLS_TLS_PSK_WITH_ARIA_256_GCM_SHA384
2495
+ * MBEDTLS_TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256
2496
+ * MBEDTLS_TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384
2497
+ * MBEDTLS_TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256
2498
+ * MBEDTLS_TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384
2499
+ * MBEDTLS_TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256
2500
+ * MBEDTLS_TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384
2501
+ */
2502
+ #define MBEDTLS_ARIA_C
2503
+
2504
+ /**
2505
+ * \def MBEDTLS_CCM_C
2506
+ *
2507
+ * Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher.
2508
+ *
2509
+ * Module: library/ccm.c
2510
+ *
2511
+ * Requires: MBEDTLS_CIPHER_C, MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C or
2512
+ * MBEDTLS_ARIA_C
2513
+ *
2514
+ * This module enables the AES-CCM ciphersuites, if other requisites are
2515
+ * enabled as well.
2516
+ */
2517
+ #define MBEDTLS_CCM_C
2518
+
2519
+ /**
2520
+ * \def MBEDTLS_CHACHA20_C
2521
+ *
2522
+ * Enable the ChaCha20 stream cipher.
2523
+ *
2524
+ * Module: library/chacha20.c
2525
+ */
2526
+ #define MBEDTLS_CHACHA20_C
2527
+
2528
+ /**
2529
+ * \def MBEDTLS_CHACHAPOLY_C
2530
+ *
2531
+ * Enable the ChaCha20-Poly1305 AEAD algorithm.
2532
+ *
2533
+ * Module: library/chachapoly.c
2534
+ *
2535
+ * This module requires: MBEDTLS_CHACHA20_C, MBEDTLS_POLY1305_C
2536
+ */
2537
+ #define MBEDTLS_CHACHAPOLY_C
2538
+
2539
+ /**
2540
+ * \def MBEDTLS_CIPHER_C
2541
+ *
2542
+ * Enable the generic cipher layer.
2543
+ *
2544
+ * Module: library/cipher.c
2545
+ * Caller: library/ccm.c
2546
+ * library/cmac.c
2547
+ * library/gcm.c
2548
+ * library/nist_kw.c
2549
+ * library/pkcs12.c
2550
+ * library/pkcs5.c
2551
+ * library/psa_crypto_aead.c
2552
+ * library/psa_crypto_mac.c
2553
+ * library/ssl_ciphersuites.c
2554
+ * library/ssl_msg.c
2555
+ * library/ssl_ticket.c (unless MBEDTLS_USE_PSA_CRYPTO is enabled)
2556
+ *
2557
+ * Uncomment to enable generic cipher wrappers.
2558
+ */
2559
+ #define MBEDTLS_CIPHER_C
2560
+
2561
+ /**
2562
+ * \def MBEDTLS_CMAC_C
2563
+ *
2564
+ * Enable the CMAC (Cipher-based Message Authentication Code) mode for block
2565
+ * ciphers.
2566
+ *
2567
+ * \note When #MBEDTLS_CMAC_ALT is active, meaning that the underlying
2568
+ * implementation of the CMAC algorithm is provided by an alternate
2569
+ * implementation, that alternate implementation may opt to not support
2570
+ * AES-192 or 3DES as underlying block ciphers for the CMAC operation.
2571
+ *
2572
+ * Module: library/cmac.c
2573
+ *
2574
+ * Requires: MBEDTLS_CIPHER_C, MBEDTLS_AES_C or MBEDTLS_DES_C
2575
+ *
2576
+ */
2577
+ #define MBEDTLS_CMAC_C
2578
+
2579
+ /**
2580
+ * \def MBEDTLS_CTR_DRBG_C
2581
+ *
2582
+ * Enable the CTR_DRBG AES-based random generator.
2583
+ * The CTR_DRBG generator uses AES-256 by default.
2584
+ * To use AES-128 instead, enable \c MBEDTLS_CTR_DRBG_USE_128_BIT_KEY above.
2585
+ *
2586
+ * \note AES-128 will be used if \c MBEDTLS_AES_ONLY_128_BIT_KEY_LENGTH is set.
2587
+ *
2588
+ * \note To achieve a 256-bit security strength with CTR_DRBG,
2589
+ * you must use AES-256 *and* use sufficient entropy.
2590
+ * See ctr_drbg.h for more details.
2591
+ *
2592
+ * Module: library/ctr_drbg.c
2593
+ * Caller:
2594
+ *
2595
+ * Requires: MBEDTLS_AES_C
2596
+ *
2597
+ * This module provides the CTR_DRBG AES random number generator.
2598
+ */
2599
+ #define MBEDTLS_CTR_DRBG_C
2600
+
2601
+ /**
2602
+ * \def MBEDTLS_DEBUG_C
2603
+ *
2604
+ * Enable the debug functions.
2605
+ *
2606
+ * Module: library/debug.c
2607
+ * Caller: library/ssl_msg.c
2608
+ * library/ssl_tls.c
2609
+ * library/ssl_tls12_*.c
2610
+ * library/ssl_tls13_*.c
2611
+ *
2612
+ * This module provides debugging functions.
2613
+ */
2614
+ #define MBEDTLS_DEBUG_C
2615
+
2616
+ /**
2617
+ * \def MBEDTLS_DES_C
2618
+ *
2619
+ * Enable the DES block cipher.
2620
+ *
2621
+ * Module: library/des.c
2622
+ * Caller: library/pem.c
2623
+ * library/cipher.c
2624
+ *
2625
+ * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
2626
+ *
2627
+ * \warning DES/3DES are considered weak ciphers and their use constitutes a
2628
+ * security risk. We recommend considering stronger ciphers instead.
2629
+ */
2630
+ #define MBEDTLS_DES_C
2631
+
2632
+ /**
2633
+ * \def MBEDTLS_DHM_C
2634
+ *
2635
+ * Enable the Diffie-Hellman-Merkle module.
2636
+ *
2637
+ * Module: library/dhm.c
2638
+ * Caller: library/ssl_tls.c
2639
+ * library/ssl*_client.c
2640
+ * library/ssl*_server.c
2641
+ *
2642
+ * This module is used by the following key exchanges:
2643
+ * DHE-RSA, DHE-PSK
2644
+ *
2645
+ * \warning Using DHE constitutes a security risk as it
2646
+ * is not possible to validate custom DH parameters.
2647
+ * If possible, it is recommended users should consider
2648
+ * preferring other methods of key exchange.
2649
+ * See dhm.h for more details.
2650
+ *
2651
+ */
2652
+ #define MBEDTLS_DHM_C
2653
+
2654
+ /**
2655
+ * \def MBEDTLS_ECDH_C
2656
+ *
2657
+ * Enable the elliptic curve Diffie-Hellman library.
2658
+ *
2659
+ * Module: library/ecdh.c
2660
+ * Caller: library/psa_crypto.c
2661
+ * library/ssl_tls.c
2662
+ * library/ssl*_client.c
2663
+ * library/ssl*_server.c
2664
+ *
2665
+ * This module is used by the following key exchanges:
2666
+ * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
2667
+ *
2668
+ * Requires: MBEDTLS_ECP_C
2669
+ */
2670
+ #define MBEDTLS_ECDH_C
2671
+
2672
+ /**
2673
+ * \def MBEDTLS_ECDSA_C
2674
+ *
2675
+ * Enable the elliptic curve DSA library.
2676
+ *
2677
+ * Module: library/ecdsa.c
2678
+ * Caller:
2679
+ *
2680
+ * This module is used by the following key exchanges:
2681
+ * ECDHE-ECDSA
2682
+ *
2683
+ * Requires: MBEDTLS_ECP_C, MBEDTLS_ASN1_WRITE_C, MBEDTLS_ASN1_PARSE_C,
2684
+ * and at least one MBEDTLS_ECP_DP_XXX_ENABLED for a
2685
+ * short Weierstrass curve.
2686
+ */
2687
+ #define MBEDTLS_ECDSA_C
2688
+
2689
+ /**
2690
+ * \def MBEDTLS_ECJPAKE_C
2691
+ *
2692
+ * Enable the elliptic curve J-PAKE library.
2693
+ *
2694
+ * \note EC J-PAKE support is based on the Thread v1.0.0 specification.
2695
+ * It has not been reviewed for compliance with newer standards such as
2696
+ * Thread v1.1 or RFC 8236.
2697
+ *
2698
+ * Module: library/ecjpake.c
2699
+ * Caller:
2700
+ *
2701
+ * This module is used by the following key exchanges:
2702
+ * ECJPAKE
2703
+ *
2704
+ * Requires: MBEDTLS_ECP_C and either MBEDTLS_MD_C or MBEDTLS_PSA_CRYPTO_C
2705
+ *
2706
+ * \warning If using a hash that is only provided by PSA drivers, you must
2707
+ * call psa_crypto_init() before doing any EC J-PAKE operations.
2708
+ */
2709
+ #define MBEDTLS_ECJPAKE_C
2710
+
2711
+ /**
2712
+ * \def MBEDTLS_ECP_C
2713
+ *
2714
+ * Enable the elliptic curve over GF(p) library.
2715
+ *
2716
+ * Module: library/ecp.c
2717
+ * Caller: library/ecdh.c
2718
+ * library/ecdsa.c
2719
+ * library/ecjpake.c
2720
+ *
2721
+ * Requires: MBEDTLS_BIGNUM_C and at least one MBEDTLS_ECP_DP_XXX_ENABLED
2722
+ */
2723
+ #define MBEDTLS_ECP_C
2724
+
2725
+ /**
2726
+ * \def MBEDTLS_ENTROPY_C
2727
+ *
2728
+ * Enable the platform-specific entropy code.
2729
+ *
2730
+ * Module: library/entropy.c
2731
+ * Caller:
2732
+ *
2733
+ * Requires: MBEDTLS_SHA512_C or MBEDTLS_SHA256_C
2734
+ *
2735
+ * This module provides a generic entropy pool
2736
+ */
2737
+ #define MBEDTLS_ENTROPY_C
2738
+
2739
+ /**
2740
+ * \def MBEDTLS_ERROR_C
2741
+ *
2742
+ * Enable error code to error string conversion.
2743
+ *
2744
+ * Module: library/error.c
2745
+ * Caller:
2746
+ *
2747
+ * This module enables mbedtls_strerror().
2748
+ */
2749
+ #define MBEDTLS_ERROR_C
2750
+
2751
+ /**
2752
+ * \def MBEDTLS_GCM_C
2753
+ *
2754
+ * Enable the Galois/Counter Mode (GCM).
2755
+ *
2756
+ * Module: library/gcm.c
2757
+ *
2758
+ * Requires: MBEDTLS_CIPHER_C, MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C or
2759
+ * MBEDTLS_ARIA_C
2760
+ *
2761
+ * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
2762
+ * requisites are enabled as well.
2763
+ */
2764
+ #define MBEDTLS_GCM_C
2765
+
2766
+ /**
2767
+ * \def MBEDTLS_HKDF_C
2768
+ *
2769
+ * Enable the HKDF algorithm (RFC 5869).
2770
+ *
2771
+ * Module: library/hkdf.c
2772
+ * Caller:
2773
+ *
2774
+ * Requires: MBEDTLS_MD_C
2775
+ *
2776
+ * This module adds support for the Hashed Message Authentication Code
2777
+ * (HMAC)-based key derivation function (HKDF).
2778
+ */
2779
+ #define MBEDTLS_HKDF_C
2780
+
2781
+ /**
2782
+ * \def MBEDTLS_HMAC_DRBG_C
2783
+ *
2784
+ * Enable the HMAC_DRBG random generator.
2785
+ *
2786
+ * Module: library/hmac_drbg.c
2787
+ * Caller:
2788
+ *
2789
+ * Requires: MBEDTLS_MD_C
2790
+ *
2791
+ * Uncomment to enable the HMAC_DRBG random number generator.
2792
+ */
2793
+ #define MBEDTLS_HMAC_DRBG_C
2794
+
2795
+ /**
2796
+ * \def MBEDTLS_LMS_C
2797
+ *
2798
+ * Enable the LMS stateful-hash asymmetric signature algorithm.
2799
+ *
2800
+ * Module: library/lms.c
2801
+ * Caller:
2802
+ *
2803
+ * Requires: MBEDTLS_PSA_CRYPTO_C
2804
+ *
2805
+ * Uncomment to enable the LMS verification algorithm and public key operations.
2806
+ */
2807
+ #define MBEDTLS_LMS_C
2808
+
2809
+ /**
2810
+ * \def MBEDTLS_LMS_PRIVATE
2811
+ *
2812
+ * Enable LMS private-key operations and signing code. Functions enabled by this
2813
+ * option are experimental, and should not be used in production.
2814
+ *
2815
+ * Requires: MBEDTLS_LMS_C
2816
+ *
2817
+ * Uncomment to enable the LMS signature algorithm and private key operations.
2818
+ */
2819
+ //#define MBEDTLS_LMS_PRIVATE
2820
+
2821
+ /**
2822
+ * \def MBEDTLS_NIST_KW_C
2823
+ *
2824
+ * Enable the Key Wrapping mode for 128-bit block ciphers,
2825
+ * as defined in NIST SP 800-38F. Only KW and KWP modes
2826
+ * are supported. At the moment, only AES is approved by NIST.
2827
+ *
2828
+ * Module: library/nist_kw.c
2829
+ *
2830
+ * Requires: MBEDTLS_AES_C and MBEDTLS_CIPHER_C
2831
+ */
2832
+ #define MBEDTLS_NIST_KW_C
2833
+
2834
+ /**
2835
+ * \def MBEDTLS_MD_C
2836
+ *
2837
+ * Enable the generic layer for message digest (hashing) and HMAC.
2838
+ *
2839
+ * Requires: one of: MBEDTLS_MD5_C, MBEDTLS_RIPEMD160_C, MBEDTLS_SHA1_C,
2840
+ * MBEDTLS_SHA224_C, MBEDTLS_SHA256_C, MBEDTLS_SHA384_C,
2841
+ * MBEDTLS_SHA512_C, or MBEDTLS_PSA_CRYPTO_C with at least
2842
+ * one hash.
2843
+ * Module: library/md.c
2844
+ * Caller: library/constant_time.c
2845
+ * library/ecdsa.c
2846
+ * library/ecjpake.c
2847
+ * library/hkdf.c
2848
+ * library/hmac_drbg.c
2849
+ * library/pk.c
2850
+ * library/pkcs5.c
2851
+ * library/pkcs12.c
2852
+ * library/psa_crypto_ecp.c
2853
+ * library/psa_crypto_rsa.c
2854
+ * library/rsa.c
2855
+ * library/ssl_cookie.c
2856
+ * library/ssl_msg.c
2857
+ * library/ssl_tls.c
2858
+ * library/x509.c
2859
+ * library/x509_crt.c
2860
+ * library/x509write_crt.c
2861
+ * library/x509write_csr.c
2862
+ *
2863
+ * Uncomment to enable generic message digest wrappers.
2864
+ */
2865
+ #define MBEDTLS_MD_C
2866
+
2867
+ /**
2868
+ * \def MBEDTLS_MD5_C
2869
+ *
2870
+ * Enable the MD5 hash algorithm.
2871
+ *
2872
+ * Module: library/md5.c
2873
+ * Caller: library/md.c
2874
+ * library/pem.c
2875
+ * library/ssl_tls.c
2876
+ *
2877
+ * This module is required for TLS 1.2 depending on the handshake parameters.
2878
+ * Further, it is used for checking MD5-signed certificates, and for PBKDF1
2879
+ * when decrypting PEM-encoded encrypted keys.
2880
+ *
2881
+ * \warning MD5 is considered a weak message digest and its use constitutes a
2882
+ * security risk. If possible, we recommend avoiding dependencies on
2883
+ * it, and considering stronger message digests instead.
2884
+ *
2885
+ */
2886
+ #define MBEDTLS_MD5_C
2887
+
2888
+ /**
2889
+ * \def MBEDTLS_MEMORY_BUFFER_ALLOC_C
2890
+ *
2891
+ * Enable the buffer allocator implementation that makes use of a (stack)
2892
+ * based buffer to 'allocate' dynamic memory. (replaces calloc() and free()
2893
+ * calls)
2894
+ *
2895
+ * Module: library/memory_buffer_alloc.c
2896
+ *
2897
+ * Requires: MBEDTLS_PLATFORM_C
2898
+ * MBEDTLS_PLATFORM_MEMORY (to use it within Mbed TLS)
2899
+ *
2900
+ * Enable this module to enable the buffer memory allocator.
2901
+ */
2902
+ //#define MBEDTLS_MEMORY_BUFFER_ALLOC_C
2903
+
2904
+ /**
2905
+ * \def MBEDTLS_NET_C
2906
+ *
2907
+ * Enable the TCP and UDP over IPv6/IPv4 networking routines.
2908
+ *
2909
+ * \note This module only works on POSIX/Unix (including Linux, BSD and OS X)
2910
+ * and Windows. For other platforms, you'll want to disable it, and write your
2911
+ * own networking callbacks to be passed to \c mbedtls_ssl_set_bio().
2912
+ *
2913
+ * \note See also our Knowledge Base article about porting to a new
2914
+ * environment:
2915
+ * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS
2916
+ *
2917
+ * Module: library/net_sockets.c
2918
+ *
2919
+ * This module provides networking routines.
2920
+ */
2921
+ #define MBEDTLS_NET_C
2922
+
2923
+ /**
2924
+ * \def MBEDTLS_OID_C
2925
+ *
2926
+ * Enable the OID database.
2927
+ *
2928
+ * Module: library/oid.c
2929
+ * Caller: library/asn1write.c
2930
+ * library/pkcs5.c
2931
+ * library/pkparse.c
2932
+ * library/pkwrite.c
2933
+ * library/rsa.c
2934
+ * library/x509.c
2935
+ * library/x509_create.c
2936
+ * library/x509_crl.c
2937
+ * library/x509_crt.c
2938
+ * library/x509_csr.c
2939
+ * library/x509write_crt.c
2940
+ * library/x509write_csr.c
2941
+ *
2942
+ * This modules translates between OIDs and internal values.
2943
+ */
2944
+ #define MBEDTLS_OID_C
2945
+
2946
+ /**
2947
+ * \def MBEDTLS_PADLOCK_C
2948
+ *
2949
+ * Enable VIA Padlock support on x86.
2950
+ *
2951
+ * Module: library/padlock.c
2952
+ * Caller: library/aes.c
2953
+ *
2954
+ * Requires: MBEDTLS_HAVE_ASM
2955
+ *
2956
+ * This modules adds support for the VIA PadLock on x86.
2957
+ */
2958
+ #define MBEDTLS_PADLOCK_C
2959
+
2960
+ /**
2961
+ * \def MBEDTLS_PEM_PARSE_C
2962
+ *
2963
+ * Enable PEM decoding / parsing.
2964
+ *
2965
+ * Module: library/pem.c
2966
+ * Caller: library/dhm.c
2967
+ * library/pkparse.c
2968
+ * library/x509_crl.c
2969
+ * library/x509_crt.c
2970
+ * library/x509_csr.c
2971
+ *
2972
+ * Requires: MBEDTLS_BASE64_C
2973
+ * optionally MBEDTLS_MD5_C, or PSA Crypto with MD5 (see below)
2974
+ *
2975
+ * \warning When parsing password-protected files, if MD5 is provided only by
2976
+ * a PSA driver, you must call psa_crypto_init() before the first file.
2977
+ *
2978
+ * This modules adds support for decoding / parsing PEM files.
2979
+ */
2980
+ #define MBEDTLS_PEM_PARSE_C
2981
+
2982
+ /**
2983
+ * \def MBEDTLS_PEM_WRITE_C
2984
+ *
2985
+ * Enable PEM encoding / writing.
2986
+ *
2987
+ * Module: library/pem.c
2988
+ * Caller: library/pkwrite.c
2989
+ * library/x509write_crt.c
2990
+ * library/x509write_csr.c
2991
+ *
2992
+ * Requires: MBEDTLS_BASE64_C
2993
+ *
2994
+ * This modules adds support for encoding / writing PEM files.
2995
+ */
2996
+ #define MBEDTLS_PEM_WRITE_C
2997
+
2998
+ /**
2999
+ * \def MBEDTLS_PK_C
3000
+ *
3001
+ * Enable the generic public (asymmetric) key layer.
3002
+ *
3003
+ * Module: library/pk.c
3004
+ * Caller: library/psa_crypto_rsa.c
3005
+ * library/ssl_tls.c
3006
+ * library/ssl*_client.c
3007
+ * library/ssl*_server.c
3008
+ * library/x509.c
3009
+ *
3010
+ * Requires: MBEDTLS_MD_C, MBEDTLS_RSA_C or MBEDTLS_ECP_C
3011
+ *
3012
+ * Uncomment to enable generic public key wrappers.
3013
+ */
3014
+ #define MBEDTLS_PK_C
3015
+
3016
+ /**
3017
+ * \def MBEDTLS_PK_PARSE_C
3018
+ *
3019
+ * Enable the generic public (asymmetric) key parser.
3020
+ *
3021
+ * Module: library/pkparse.c
3022
+ * Caller: library/x509_crt.c
3023
+ * library/x509_csr.c
3024
+ *
3025
+ * Requires: MBEDTLS_PK_C
3026
+ *
3027
+ * Uncomment to enable generic public key parse functions.
3028
+ */
3029
+ #define MBEDTLS_PK_PARSE_C
3030
+
3031
+ /**
3032
+ * \def MBEDTLS_PK_WRITE_C
3033
+ *
3034
+ * Enable the generic public (asymmetric) key writer.
3035
+ *
3036
+ * Module: library/pkwrite.c
3037
+ * Caller: library/x509write.c
3038
+ *
3039
+ * Requires: MBEDTLS_PK_C
3040
+ *
3041
+ * Uncomment to enable generic public key write functions.
3042
+ */
3043
+ #define MBEDTLS_PK_WRITE_C
3044
+
3045
+ /**
3046
+ * \def MBEDTLS_PKCS5_C
3047
+ *
3048
+ * Enable PKCS#5 functions.
3049
+ *
3050
+ * Module: library/pkcs5.c
3051
+ *
3052
+ * Requires: MBEDTLS_CIPHER_C
3053
+ * Auto-enables: MBEDTLS_MD_C
3054
+ *
3055
+ * \warning If using a hash that is only provided by PSA drivers, you must
3056
+ * call psa_crypto_init() before doing any PKCS5 operations.
3057
+ *
3058
+ * This module adds support for the PKCS#5 functions.
3059
+ */
3060
+ #define MBEDTLS_PKCS5_C
3061
+
3062
+ /**
3063
+ * \def MBEDTLS_PKCS7_C
3064
+ *
3065
+ * Enable PKCS #7 core for using PKCS #7-formatted signatures.
3066
+ * RFC Link - https://tools.ietf.org/html/rfc2315
3067
+ *
3068
+ * Module: library/pkcs7.c
3069
+ *
3070
+ * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_OID_C, MBEDTLS_PK_PARSE_C,
3071
+ * MBEDTLS_X509_CRT_PARSE_C MBEDTLS_X509_CRL_PARSE_C,
3072
+ * MBEDTLS_BIGNUM_C, MBEDTLS_MD_C
3073
+ *
3074
+ * This module is required for the PKCS #7 parsing modules.
3075
+ */
3076
+ #define MBEDTLS_PKCS7_C
3077
+
3078
+ /**
3079
+ * \def MBEDTLS_PKCS12_C
3080
+ *
3081
+ * Enable PKCS#12 PBE functions.
3082
+ * Adds algorithms for parsing PKCS#8 encrypted private keys
3083
+ *
3084
+ * Module: library/pkcs12.c
3085
+ * Caller: library/pkparse.c
3086
+ *
3087
+ * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_CIPHER_C and either
3088
+ * MBEDTLS_MD_C or MBEDTLS_PSA_CRYPTO_C.
3089
+ *
3090
+ * \warning If using a hash that is only provided by PSA drivers, you must
3091
+ * call psa_crypto_init() before doing any PKCS12 operations.
3092
+ *
3093
+ * This module enables PKCS#12 functions.
3094
+ */
3095
+ #define MBEDTLS_PKCS12_C
3096
+
3097
+ /**
3098
+ * \def MBEDTLS_PLATFORM_C
3099
+ *
3100
+ * Enable the platform abstraction layer that allows you to re-assign
3101
+ * functions like calloc(), free(), snprintf(), printf(), fprintf(), exit().
3102
+ *
3103
+ * Enabling MBEDTLS_PLATFORM_C enables to use of MBEDTLS_PLATFORM_XXX_ALT
3104
+ * or MBEDTLS_PLATFORM_XXX_MACRO directives, allowing the functions mentioned
3105
+ * above to be specified at runtime or compile time respectively.
3106
+ *
3107
+ * \note This abstraction layer must be enabled on Windows (including MSYS2)
3108
+ * as other modules rely on it for a fixed snprintf implementation.
3109
+ *
3110
+ * Module: library/platform.c
3111
+ * Caller: Most other .c files
3112
+ *
3113
+ * This module enables abstraction of common (libc) functions.
3114
+ */
3115
+ #define MBEDTLS_PLATFORM_C
3116
+
3117
+ /**
3118
+ * \def MBEDTLS_POLY1305_C
3119
+ *
3120
+ * Enable the Poly1305 MAC algorithm.
3121
+ *
3122
+ * Module: library/poly1305.c
3123
+ * Caller: library/chachapoly.c
3124
+ */
3125
+ #define MBEDTLS_POLY1305_C
3126
+
3127
+ /**
3128
+ * \def MBEDTLS_PSA_CRYPTO_C
3129
+ *
3130
+ * Enable the Platform Security Architecture cryptography API.
3131
+ *
3132
+ * Module: library/psa_crypto.c
3133
+ *
3134
+ * Requires: MBEDTLS_CIPHER_C,
3135
+ * either MBEDTLS_CTR_DRBG_C and MBEDTLS_ENTROPY_C,
3136
+ * or MBEDTLS_HMAC_DRBG_C and MBEDTLS_ENTROPY_C,
3137
+ * or MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG.
3138
+ *
3139
+ */
3140
+ #define MBEDTLS_PSA_CRYPTO_C
3141
+
3142
+ /**
3143
+ * \def MBEDTLS_PSA_CRYPTO_SE_C
3144
+ *
3145
+ * Enable dynamic secure element support in the Platform Security Architecture
3146
+ * cryptography API.
3147
+ *
3148
+ * \deprecated This feature is deprecated. Please switch to the PSA driver
3149
+ * interface.
3150
+ *
3151
+ * Module: library/psa_crypto_se.c
3152
+ *
3153
+ * Requires: MBEDTLS_PSA_CRYPTO_C, MBEDTLS_PSA_CRYPTO_STORAGE_C
3154
+ *
3155
+ */
3156
+ //#define MBEDTLS_PSA_CRYPTO_SE_C
3157
+
3158
+ /**
3159
+ * \def MBEDTLS_PSA_CRYPTO_STORAGE_C
3160
+ *
3161
+ * Enable the Platform Security Architecture persistent key storage.
3162
+ *
3163
+ * Module: library/psa_crypto_storage.c
3164
+ *
3165
+ * Requires: MBEDTLS_PSA_CRYPTO_C,
3166
+ * either MBEDTLS_PSA_ITS_FILE_C or a native implementation of
3167
+ * the PSA ITS interface
3168
+ */
3169
+ #define MBEDTLS_PSA_CRYPTO_STORAGE_C
3170
+
3171
+ /**
3172
+ * \def MBEDTLS_PSA_ITS_FILE_C
3173
+ *
3174
+ * Enable the emulation of the Platform Security Architecture
3175
+ * Internal Trusted Storage (PSA ITS) over files.
3176
+ *
3177
+ * Module: library/psa_its_file.c
3178
+ *
3179
+ * Requires: MBEDTLS_FS_IO
3180
+ */
3181
+ #define MBEDTLS_PSA_ITS_FILE_C
3182
+
3183
+ /**
3184
+ * \def MBEDTLS_RIPEMD160_C
3185
+ *
3186
+ * Enable the RIPEMD-160 hash algorithm.
3187
+ *
3188
+ * Module: library/ripemd160.c
3189
+ * Caller: library/md.c
3190
+ *
3191
+ */
3192
+ #define MBEDTLS_RIPEMD160_C
3193
+
3194
+ /**
3195
+ * \def MBEDTLS_RSA_C
3196
+ *
3197
+ * Enable the RSA public-key cryptosystem.
3198
+ *
3199
+ * Module: library/rsa.c
3200
+ * library/rsa_alt_helpers.c
3201
+ * Caller: library/pk.c
3202
+ * library/psa_crypto.c
3203
+ * library/ssl_tls.c
3204
+ * library/ssl*_client.c
3205
+ * library/ssl*_server.c
3206
+ *
3207
+ * This module is used by the following key exchanges:
3208
+ * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
3209
+ *
3210
+ * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C
3211
+ */
3212
+ #define MBEDTLS_RSA_C
3213
+
3214
+ /**
3215
+ * \def MBEDTLS_SHA1_C
3216
+ *
3217
+ * Enable the SHA1 cryptographic hash algorithm.
3218
+ *
3219
+ * Module: library/sha1.c
3220
+ * Caller: library/md.c
3221
+ * library/psa_crypto_hash.c
3222
+ *
3223
+ * This module is required for TLS 1.2 depending on the handshake parameters,
3224
+ * and for SHA1-signed certificates.
3225
+ *
3226
+ * \warning SHA-1 is considered a weak message digest and its use constitutes
3227
+ * a security risk. If possible, we recommend avoiding dependencies
3228
+ * on it, and considering stronger message digests instead.
3229
+ *
3230
+ */
3231
+ #define MBEDTLS_SHA1_C
3232
+
3233
+ /**
3234
+ * \def MBEDTLS_SHA224_C
3235
+ *
3236
+ * Enable the SHA-224 cryptographic hash algorithm.
3237
+ *
3238
+ * Module: library/sha256.c
3239
+ * Caller: library/md.c
3240
+ * library/ssl_cookie.c
3241
+ *
3242
+ * This module adds support for SHA-224.
3243
+ */
3244
+ #define MBEDTLS_SHA224_C
3245
+
3246
+ /**
3247
+ * \def MBEDTLS_SHA256_C
3248
+ *
3249
+ * Enable the SHA-256 cryptographic hash algorithm.
3250
+ *
3251
+ * Module: library/sha256.c
3252
+ * Caller: library/entropy.c
3253
+ * library/md.c
3254
+ * library/ssl_tls.c
3255
+ * library/ssl*_client.c
3256
+ * library/ssl*_server.c
3257
+ *
3258
+ * This module adds support for SHA-256.
3259
+ * This module is required for the SSL/TLS 1.2 PRF function.
3260
+ */
3261
+ #define MBEDTLS_SHA256_C
3262
+
3263
+ /**
3264
+ * \def MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT
3265
+ *
3266
+ * Enable acceleration of the SHA-256 and SHA-224 cryptographic hash algorithms
3267
+ * with the ARMv8 cryptographic extensions if they are available at runtime.
3268
+ * If not, the library will fall back to the C implementation.
3269
+ *
3270
+ * \note If MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT is defined when building
3271
+ * for a non-Aarch64 build it will be silently ignored.
3272
+ *
3273
+ * \note Minimum compiler versions for this feature are Clang 4.0,
3274
+ * armclang 6.6 or GCC 6.0.
3275
+ *
3276
+ * \note \c CFLAGS must be set to a minimum of \c -march=armv8-a+crypto for
3277
+ * armclang <= 6.9
3278
+ *
3279
+ * \warning MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT cannot be defined at the
3280
+ * same time as MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY.
3281
+ *
3282
+ * Requires: MBEDTLS_SHA256_C.
3283
+ *
3284
+ * Module: library/sha256.c
3285
+ *
3286
+ * Uncomment to have the library check for the A64 SHA-256 crypto extensions
3287
+ * and use them if available.
3288
+ */
3289
+ //#define MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT
3290
+
3291
+ /**
3292
+ * \def MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY
3293
+ *
3294
+ * Enable acceleration of the SHA-256 and SHA-224 cryptographic hash algorithms
3295
+ * with the ARMv8 cryptographic extensions, which must be available at runtime
3296
+ * or else an illegal instruction fault will occur.
3297
+ *
3298
+ * \note This allows builds with a smaller code size than with
3299
+ * MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT
3300
+ *
3301
+ * \note Minimum compiler versions for this feature are Clang 4.0,
3302
+ * armclang 6.6 or GCC 6.0.
3303
+ *
3304
+ * \note \c CFLAGS must be set to a minimum of \c -march=armv8-a+crypto for
3305
+ * armclang <= 6.9
3306
+ *
3307
+ * \warning MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY cannot be defined at the same
3308
+ * time as MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT.
3309
+ *
3310
+ * Requires: MBEDTLS_SHA256_C.
3311
+ *
3312
+ * Module: library/sha256.c
3313
+ *
3314
+ * Uncomment to have the library use the A64 SHA-256 crypto extensions
3315
+ * unconditionally.
3316
+ */
3317
+ //#define MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY
3318
+
3319
+ /**
3320
+ * \def MBEDTLS_SHA384_C
3321
+ *
3322
+ * Enable the SHA-384 cryptographic hash algorithm.
3323
+ *
3324
+ * Module: library/sha512.c
3325
+ * Caller: library/md.c
3326
+ * library/psa_crypto_hash.c
3327
+ * library/ssl_tls.c
3328
+ * library/ssl*_client.c
3329
+ * library/ssl*_server.c
3330
+ *
3331
+ * Comment to disable SHA-384
3332
+ */
3333
+ #define MBEDTLS_SHA384_C
3334
+
3335
+ /**
3336
+ * \def MBEDTLS_SHA512_C
3337
+ *
3338
+ * Enable SHA-512 cryptographic hash algorithms.
3339
+ *
3340
+ * Module: library/sha512.c
3341
+ * Caller: library/entropy.c
3342
+ * library/md.c
3343
+ * library/ssl_tls.c
3344
+ * library/ssl_cookie.c
3345
+ *
3346
+ * This module adds support for SHA-512.
3347
+ */
3348
+ #define MBEDTLS_SHA512_C
3349
+
3350
+ /**
3351
+ * \def MBEDTLS_SHA3_C
3352
+ *
3353
+ * Enable the SHA3 cryptographic hash algorithm.
3354
+ *
3355
+ * Module: library/sha3.c
3356
+ *
3357
+ * This module adds support for SHA3.
3358
+ */
3359
+ #define MBEDTLS_SHA3_C
3360
+
3361
+ /**
3362
+ * \def MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT
3363
+ *
3364
+ * Enable acceleration of the SHA-512 and SHA-384 cryptographic hash algorithms
3365
+ * with the ARMv8 cryptographic extensions if they are available at runtime.
3366
+ * If not, the library will fall back to the C implementation.
3367
+ *
3368
+ * \note If MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT is defined when building
3369
+ * for a non-Aarch64 build it will be silently ignored.
3370
+ *
3371
+ * \note Minimum compiler versions for this feature are Clang 7.0,
3372
+ * armclang 6.9 or GCC 8.0.
3373
+ *
3374
+ * \note \c CFLAGS must be set to a minimum of \c -march=armv8.2-a+sha3 for
3375
+ * armclang 6.9
3376
+ *
3377
+ * \warning MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT cannot be defined at the
3378
+ * same time as MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY.
3379
+ *
3380
+ * Requires: MBEDTLS_SHA512_C.
3381
+ *
3382
+ * Module: library/sha512.c
3383
+ *
3384
+ * Uncomment to have the library check for the A64 SHA-512 crypto extensions
3385
+ * and use them if available.
3386
+ */
3387
+ //#define MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT
3388
+
3389
+ /**
3390
+ * \def MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY
3391
+ *
3392
+ * Enable acceleration of the SHA-512 and SHA-384 cryptographic hash algorithms
3393
+ * with the ARMv8 cryptographic extensions, which must be available at runtime
3394
+ * or else an illegal instruction fault will occur.
3395
+ *
3396
+ * \note This allows builds with a smaller code size than with
3397
+ * MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT
3398
+ *
3399
+ * \note Minimum compiler versions for this feature are Clang 7.0,
3400
+ * armclang 6.9 or GCC 8.0.
3401
+ *
3402
+ * \note \c CFLAGS must be set to a minimum of \c -march=armv8.2-a+sha3 for
3403
+ * armclang 6.9
3404
+ *
3405
+ * \warning MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY cannot be defined at the same
3406
+ * time as MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT.
3407
+ *
3408
+ * Requires: MBEDTLS_SHA512_C.
3409
+ *
3410
+ * Module: library/sha512.c
3411
+ *
3412
+ * Uncomment to have the library use the A64 SHA-512 crypto extensions
3413
+ * unconditionally.
3414
+ */
3415
+ //#define MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY
3416
+
3417
+ /**
3418
+ * \def MBEDTLS_SSL_CACHE_C
3419
+ *
3420
+ * Enable simple SSL cache implementation.
3421
+ *
3422
+ * Module: library/ssl_cache.c
3423
+ * Caller:
3424
+ *
3425
+ * Requires: MBEDTLS_SSL_CACHE_C
3426
+ */
3427
+ #define MBEDTLS_SSL_CACHE_C
3428
+
3429
+ /**
3430
+ * \def MBEDTLS_SSL_COOKIE_C
3431
+ *
3432
+ * Enable basic implementation of DTLS cookies for hello verification.
3433
+ *
3434
+ * Module: library/ssl_cookie.c
3435
+ * Caller:
3436
+ */
3437
+ #define MBEDTLS_SSL_COOKIE_C
3438
+
3439
+ /**
3440
+ * \def MBEDTLS_SSL_TICKET_C
3441
+ *
3442
+ * Enable an implementation of TLS server-side callbacks for session tickets.
3443
+ *
3444
+ * Module: library/ssl_ticket.c
3445
+ * Caller:
3446
+ *
3447
+ * Requires: (MBEDTLS_CIPHER_C || MBEDTLS_USE_PSA_CRYPTO) &&
3448
+ * (MBEDTLS_GCM_C || MBEDTLS_CCM_C || MBEDTLS_CHACHAPOLY_C)
3449
+ */
3450
+ #define MBEDTLS_SSL_TICKET_C
3451
+
3452
+ /**
3453
+ * \def MBEDTLS_SSL_CLI_C
3454
+ *
3455
+ * Enable the SSL/TLS client code.
3456
+ *
3457
+ * Module: library/ssl*_client.c
3458
+ * Caller:
3459
+ *
3460
+ * Requires: MBEDTLS_SSL_TLS_C
3461
+ *
3462
+ * This module is required for SSL/TLS client support.
3463
+ */
3464
+ #define MBEDTLS_SSL_CLI_C
3465
+
3466
+ /**
3467
+ * \def MBEDTLS_SSL_SRV_C
3468
+ *
3469
+ * Enable the SSL/TLS server code.
3470
+ *
3471
+ * Module: library/ssl*_server.c
3472
+ * Caller:
3473
+ *
3474
+ * Requires: MBEDTLS_SSL_TLS_C
3475
+ *
3476
+ * This module is required for SSL/TLS server support.
3477
+ */
3478
+ #define MBEDTLS_SSL_SRV_C
3479
+
3480
+ /**
3481
+ * \def MBEDTLS_SSL_TLS_C
3482
+ *
3483
+ * Enable the generic SSL/TLS code.
3484
+ *
3485
+ * Module: library/ssl_tls.c
3486
+ * Caller: library/ssl*_client.c
3487
+ * library/ssl*_server.c
3488
+ *
3489
+ * Requires: MBEDTLS_CIPHER_C, MBEDTLS_MD_C
3490
+ * and at least one of the MBEDTLS_SSL_PROTO_XXX defines
3491
+ *
3492
+ * This module is required for SSL/TLS.
3493
+ */
3494
+ #define MBEDTLS_SSL_TLS_C
3495
+
3496
+ /**
3497
+ * \def MBEDTLS_THREADING_C
3498
+ *
3499
+ * Enable the threading abstraction layer.
3500
+ * By default Mbed TLS assumes it is used in a non-threaded environment or that
3501
+ * contexts are not shared between threads. If you do intend to use contexts
3502
+ * between threads, you will need to enable this layer to prevent race
3503
+ * conditions. See also our Knowledge Base article about threading:
3504
+ * https://mbed-tls.readthedocs.io/en/latest/kb/development/thread-safety-and-multi-threading
3505
+ *
3506
+ * Module: library/threading.c
3507
+ *
3508
+ * This allows different threading implementations (self-implemented or
3509
+ * provided).
3510
+ *
3511
+ * You will have to enable either MBEDTLS_THREADING_ALT or
3512
+ * MBEDTLS_THREADING_PTHREAD.
3513
+ *
3514
+ * Enable this layer to allow use of mutexes within Mbed TLS
3515
+ */
3516
+ //#define MBEDTLS_THREADING_C
3517
+
3518
+ /**
3519
+ * \def MBEDTLS_TIMING_C
3520
+ *
3521
+ * Enable the semi-portable timing interface.
3522
+ *
3523
+ * \note The provided implementation only works on POSIX/Unix (including Linux,
3524
+ * BSD and OS X) and Windows. On other platforms, you can either disable that
3525
+ * module and provide your own implementations of the callbacks needed by
3526
+ * \c mbedtls_ssl_set_timer_cb() for DTLS, or leave it enabled and provide
3527
+ * your own implementation of the whole module by setting
3528
+ * \c MBEDTLS_TIMING_ALT in the current file.
3529
+ *
3530
+ * \note The timing module will include time.h on suitable platforms
3531
+ * regardless of the setting of MBEDTLS_HAVE_TIME, unless
3532
+ * MBEDTLS_TIMING_ALT is used. See timing.c for more information.
3533
+ *
3534
+ * \note See also our Knowledge Base article about porting to a new
3535
+ * environment:
3536
+ * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS
3537
+ *
3538
+ * Module: library/timing.c
3539
+ */
3540
+ #define MBEDTLS_TIMING_C
3541
+
3542
+ /**
3543
+ * \def MBEDTLS_VERSION_C
3544
+ *
3545
+ * Enable run-time version information.
3546
+ *
3547
+ * Module: library/version.c
3548
+ *
3549
+ * This module provides run-time version information.
3550
+ */
3551
+ #define MBEDTLS_VERSION_C
3552
+
3553
+ /**
3554
+ * \def MBEDTLS_X509_USE_C
3555
+ *
3556
+ * Enable X.509 core for using certificates.
3557
+ *
3558
+ * Module: library/x509.c
3559
+ * Caller: library/x509_crl.c
3560
+ * library/x509_crt.c
3561
+ * library/x509_csr.c
3562
+ *
3563
+ * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_BIGNUM_C, MBEDTLS_OID_C, MBEDTLS_PK_PARSE_C,
3564
+ * (MBEDTLS_MD_C or MBEDTLS_USE_PSA_CRYPTO)
3565
+ *
3566
+ * \warning If building with MBEDTLS_USE_PSA_CRYPTO, you must call
3567
+ * psa_crypto_init() before doing any X.509 operation.
3568
+ *
3569
+ * This module is required for the X.509 parsing modules.
3570
+ */
3571
+ #define MBEDTLS_X509_USE_C
3572
+
3573
+ /**
3574
+ * \def MBEDTLS_X509_CRT_PARSE_C
3575
+ *
3576
+ * Enable X.509 certificate parsing.
3577
+ *
3578
+ * Module: library/x509_crt.c
3579
+ * Caller: library/ssl_tls.c
3580
+ * library/ssl*_client.c
3581
+ * library/ssl*_server.c
3582
+ *
3583
+ * Requires: MBEDTLS_X509_USE_C
3584
+ *
3585
+ * This module is required for X.509 certificate parsing.
3586
+ */
3587
+ #define MBEDTLS_X509_CRT_PARSE_C
3588
+
3589
+ /**
3590
+ * \def MBEDTLS_X509_CRL_PARSE_C
3591
+ *
3592
+ * Enable X.509 CRL parsing.
3593
+ *
3594
+ * Module: library/x509_crl.c
3595
+ * Caller: library/x509_crt.c
3596
+ *
3597
+ * Requires: MBEDTLS_X509_USE_C
3598
+ *
3599
+ * This module is required for X.509 CRL parsing.
3600
+ */
3601
+ #define MBEDTLS_X509_CRL_PARSE_C
3602
+
3603
+ /**
3604
+ * \def MBEDTLS_X509_CSR_PARSE_C
3605
+ *
3606
+ * Enable X.509 Certificate Signing Request (CSR) parsing.
3607
+ *
3608
+ * Module: library/x509_csr.c
3609
+ * Caller: library/x509_crt_write.c
3610
+ *
3611
+ * Requires: MBEDTLS_X509_USE_C
3612
+ *
3613
+ * This module is used for reading X.509 certificate request.
3614
+ */
3615
+ #define MBEDTLS_X509_CSR_PARSE_C
3616
+
3617
+ /**
3618
+ * \def MBEDTLS_X509_CREATE_C
3619
+ *
3620
+ * Enable X.509 core for creating certificates.
3621
+ *
3622
+ * Module: library/x509_create.c
3623
+ *
3624
+ * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C, MBEDTLS_PK_PARSE_C,
3625
+ * (MBEDTLS_MD_C or MBEDTLS_USE_PSA_CRYPTO)
3626
+ *
3627
+ * \warning If building with MBEDTLS_USE_PSA_CRYPTO, you must call
3628
+ * psa_crypto_init() before doing any X.509 create operation.
3629
+ *
3630
+ * This module is the basis for creating X.509 certificates and CSRs.
3631
+ */
3632
+ #define MBEDTLS_X509_CREATE_C
3633
+
3634
+ /**
3635
+ * \def MBEDTLS_X509_CRT_WRITE_C
3636
+ *
3637
+ * Enable creating X.509 certificates.
3638
+ *
3639
+ * Module: library/x509_crt_write.c
3640
+ *
3641
+ * Requires: MBEDTLS_X509_CREATE_C
3642
+ *
3643
+ * This module is required for X.509 certificate creation.
3644
+ */
3645
+ #define MBEDTLS_X509_CRT_WRITE_C
3646
+
3647
+ /**
3648
+ * \def MBEDTLS_X509_CSR_WRITE_C
3649
+ *
3650
+ * Enable creating X.509 Certificate Signing Requests (CSR).
3651
+ *
3652
+ * Module: library/x509_csr_write.c
3653
+ *
3654
+ * Requires: MBEDTLS_X509_CREATE_C
3655
+ *
3656
+ * This module is required for X.509 certificate request writing.
3657
+ */
3658
+ #define MBEDTLS_X509_CSR_WRITE_C
3659
+
3660
+ /** \} name SECTION: Mbed TLS modules */
3661
+
3662
+ /**
3663
+ * \name SECTION: General configuration options
3664
+ *
3665
+ * This section contains Mbed TLS build settings that are not associated
3666
+ * with a particular module.
3667
+ *
3668
+ * \{
3669
+ */
3670
+
3671
+ /**
3672
+ * \def MBEDTLS_CONFIG_FILE
3673
+ *
3674
+ * If defined, this is a header which will be included instead of
3675
+ * `"mbedtls/mbedtls_config.h"`.
3676
+ * This header file specifies the compile-time configuration of Mbed TLS.
3677
+ * Unlike other configuration options, this one must be defined on the
3678
+ * compiler command line: a definition in `mbedtls_config.h` would have
3679
+ * no effect.
3680
+ *
3681
+ * This macro is expanded after an <tt>\#include</tt> directive. This is a popular but
3682
+ * non-standard feature of the C language, so this feature is only available
3683
+ * with compilers that perform macro expansion on an <tt>\#include</tt> line.
3684
+ *
3685
+ * The value of this symbol is typically a path in double quotes, either
3686
+ * absolute or relative to a directory on the include search path.
3687
+ */
3688
+ //#define MBEDTLS_CONFIG_FILE "mbedtls/mbedtls_config.h"
3689
+
3690
+ /**
3691
+ * \def MBEDTLS_USER_CONFIG_FILE
3692
+ *
3693
+ * If defined, this is a header which will be included after
3694
+ * `"mbedtls/mbedtls_config.h"` or #MBEDTLS_CONFIG_FILE.
3695
+ * This allows you to modify the default configuration, including the ability
3696
+ * to undefine options that are enabled by default.
3697
+ *
3698
+ * This macro is expanded after an <tt>\#include</tt> directive. This is a popular but
3699
+ * non-standard feature of the C language, so this feature is only available
3700
+ * with compilers that perform macro expansion on an <tt>\#include</tt> line.
3701
+ *
3702
+ * The value of this symbol is typically a path in double quotes, either
3703
+ * absolute or relative to a directory on the include search path.
3704
+ */
3705
+ //#define MBEDTLS_USER_CONFIG_FILE "/dev/null"
3706
+
3707
+ /**
3708
+ * \def MBEDTLS_PSA_CRYPTO_CONFIG_FILE
3709
+ *
3710
+ * If defined, this is a header which will be included instead of
3711
+ * `"psa/crypto_config.h"`.
3712
+ * This header file specifies which cryptographic mechanisms are available
3713
+ * through the PSA API when #MBEDTLS_PSA_CRYPTO_CONFIG is enabled, and
3714
+ * is not used when #MBEDTLS_PSA_CRYPTO_CONFIG is disabled.
3715
+ *
3716
+ * This macro is expanded after an <tt>\#include</tt> directive. This is a popular but
3717
+ * non-standard feature of the C language, so this feature is only available
3718
+ * with compilers that perform macro expansion on an <tt>\#include</tt> line.
3719
+ *
3720
+ * The value of this symbol is typically a path in double quotes, either
3721
+ * absolute or relative to a directory on the include search path.
3722
+ */
3723
+ //#define MBEDTLS_PSA_CRYPTO_CONFIG_FILE "psa/crypto_config.h"
3724
+
3725
+ /**
3726
+ * \def MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE
3727
+ *
3728
+ * If defined, this is a header which will be included after
3729
+ * `"psa/crypto_config.h"` or #MBEDTLS_PSA_CRYPTO_CONFIG_FILE.
3730
+ * This allows you to modify the default configuration, including the ability
3731
+ * to undefine options that are enabled by default.
3732
+ *
3733
+ * This macro is expanded after an <tt>\#include</tt> directive. This is a popular but
3734
+ * non-standard feature of the C language, so this feature is only available
3735
+ * with compilers that perform macro expansion on an <tt>\#include</tt> line.
3736
+ *
3737
+ * The value of this symbol is typically a path in double quotes, either
3738
+ * absolute or relative to a directory on the include search path.
3739
+ */
3740
+ //#define MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE "/dev/null"
3741
+
3742
+ /**
3743
+ * \def MBEDTLS_PSA_CRYPTO_PLATFORM_FILE
3744
+ *
3745
+ * If defined, this is a header which will be included instead of
3746
+ * `"psa/crypto_platform.h"`. This file should declare the same identifiers
3747
+ * as the one in Mbed TLS, but with definitions adapted to the platform on
3748
+ * which the library code will run.
3749
+ *
3750
+ * \note The required content of this header can vary from one version of
3751
+ * Mbed TLS to the next. Integrators who provide an alternative file
3752
+ * should review the changes in the original file whenever they
3753
+ * upgrade Mbed TLS.
3754
+ *
3755
+ * This macro is expanded after an <tt>\#include</tt> directive. This is a popular but
3756
+ * non-standard feature of the C language, so this feature is only available
3757
+ * with compilers that perform macro expansion on an <tt>\#include</tt> line.
3758
+ *
3759
+ * The value of this symbol is typically a path in double quotes, either
3760
+ * absolute or relative to a directory on the include search path.
3761
+ */
3762
+ //#define MBEDTLS_PSA_CRYPTO_PLATFORM_FILE "psa/crypto_platform_alt.h"
3763
+
3764
+ /**
3765
+ * \def MBEDTLS_PSA_CRYPTO_STRUCT_FILE
3766
+ *
3767
+ * If defined, this is a header which will be included instead of
3768
+ * `"psa/crypto_struct.h"`. This file should declare the same identifiers
3769
+ * as the one in Mbed TLS, but with definitions adapted to the environment
3770
+ * in which the library code will run. The typical use for this feature
3771
+ * is to provide alternative type definitions on the client side in
3772
+ * client-server integrations of PSA crypto, where operation structures
3773
+ * contain handles instead of cryptographic data.
3774
+ *
3775
+ * \note The required content of this header can vary from one version of
3776
+ * Mbed TLS to the next. Integrators who provide an alternative file
3777
+ * should review the changes in the original file whenever they
3778
+ * upgrade Mbed TLS.
3779
+ *
3780
+ * This macro is expanded after an <tt>\#include</tt> directive. This is a popular but
3781
+ * non-standard feature of the C language, so this feature is only available
3782
+ * with compilers that perform macro expansion on an <tt>\#include</tt> line.
3783
+ *
3784
+ * The value of this symbol is typically a path in double quotes, either
3785
+ * absolute or relative to a directory on the include search path.
3786
+ */
3787
+ //#define MBEDTLS_PSA_CRYPTO_STRUCT_FILE "psa/crypto_struct_alt.h"
3788
+
3789
+ /** \} name SECTION: General configuration options */
3790
+
3791
+ /**
3792
+ * \name SECTION: Module configuration options
3793
+ *
3794
+ * This section allows for the setting of module specific sizes and
3795
+ * configuration options. The default values are already present in the
3796
+ * relevant header files and should suffice for the regular use cases.
3797
+ *
3798
+ * Our advice is to enable options and change their values here
3799
+ * only if you have a good reason and know the consequences.
3800
+ * \{
3801
+ */
3802
+ /* The Doxygen documentation here is used when a user comments out a
3803
+ * setting and runs doxygen themselves. On the other hand, when we typeset
3804
+ * the full documentation including disabled settings, the documentation
3805
+ * in specific modules' header files is used if present. When editing this
3806
+ * file, make sure that each option is documented in exactly one place,
3807
+ * plus optionally a same-line Doxygen comment here if there is a Doxygen
3808
+ * comment in the specific module. */
3809
+
3810
+ /* MPI / BIGNUM options */
3811
+ //#define MBEDTLS_MPI_WINDOW_SIZE 2 /**< Maximum window size used. */
3812
+ //#define MBEDTLS_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
3813
+
3814
+ /* CTR_DRBG options */
3815
+ //#define MBEDTLS_CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
3816
+ //#define MBEDTLS_CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
3817
+ //#define MBEDTLS_CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
3818
+ //#define MBEDTLS_CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
3819
+ //#define MBEDTLS_CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
3820
+
3821
+ /* HMAC_DRBG options */
3822
+ //#define MBEDTLS_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
3823
+ //#define MBEDTLS_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
3824
+ //#define MBEDTLS_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
3825
+ //#define MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
3826
+
3827
+ /* ECP options */
3828
+ //#define MBEDTLS_ECP_WINDOW_SIZE 4 /**< Maximum window size used */
3829
+ //#define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
3830
+
3831
+ /* Entropy options */
3832
+ //#define MBEDTLS_ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
3833
+ //#define MBEDTLS_ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
3834
+ //#define MBEDTLS_ENTROPY_MIN_HARDWARE 32 /**< Default minimum number of bytes required for the hardware entropy source mbedtls_hardware_poll() before entropy is released */
3835
+
3836
+ /* Memory buffer allocator options */
3837
+ //#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
3838
+
3839
+ /* Platform options */
3840
+ //#define MBEDTLS_PLATFORM_STD_MEM_HDR <stdlib.h> /**< Header to include if MBEDTLS_PLATFORM_NO_STD_FUNCTIONS is defined. Don't define if no header is needed. */
3841
+
3842
+ /** \def MBEDTLS_PLATFORM_STD_CALLOC
3843
+ *
3844
+ * Default allocator to use, can be undefined.
3845
+ * It must initialize the allocated buffer memory to zeroes.
3846
+ * The size of the buffer is the product of the two parameters.
3847
+ * The calloc function returns either a null pointer or a pointer to the allocated space.
3848
+ * If the product is 0, the function may either return NULL or a valid pointer to an array of size 0 which is a valid input to the deallocation function.
3849
+ * An uninitialized #MBEDTLS_PLATFORM_STD_CALLOC always fails, returning a null pointer.
3850
+ * See the description of #MBEDTLS_PLATFORM_MEMORY for more details.
3851
+ * The corresponding deallocation function is #MBEDTLS_PLATFORM_STD_FREE.
3852
+ */
3853
+ //#define MBEDTLS_PLATFORM_STD_CALLOC calloc
3854
+
3855
+ /** \def MBEDTLS_PLATFORM_STD_FREE
3856
+ *
3857
+ * Default free to use, can be undefined.
3858
+ * NULL is a valid parameter, and the function must do nothing.
3859
+ * A non-null parameter will always be a pointer previously returned by #MBEDTLS_PLATFORM_STD_CALLOC and not yet freed.
3860
+ * An uninitialized #MBEDTLS_PLATFORM_STD_FREE does not do anything.
3861
+ * See the description of #MBEDTLS_PLATFORM_MEMORY for more details (same principles as for MBEDTLS_PLATFORM_STD_CALLOC apply).
3862
+ */
3863
+ //#define MBEDTLS_PLATFORM_STD_FREE free
3864
+ //#define MBEDTLS_PLATFORM_STD_SETBUF setbuf /**< Default setbuf to use, can be undefined */
3865
+ //#define MBEDTLS_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */
3866
+ //#define MBEDTLS_PLATFORM_STD_TIME time /**< Default time to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */
3867
+ //#define MBEDTLS_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
3868
+ //#define MBEDTLS_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
3869
+ /* Note: your snprintf must correctly zero-terminate the buffer! */
3870
+ //#define MBEDTLS_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined */
3871
+ //#define MBEDTLS_PLATFORM_STD_EXIT_SUCCESS 0 /**< Default exit value to use, can be undefined */
3872
+ //#define MBEDTLS_PLATFORM_STD_EXIT_FAILURE 1 /**< Default exit value to use, can be undefined */
3873
+ //#define MBEDTLS_PLATFORM_STD_NV_SEED_READ mbedtls_platform_std_nv_seed_read /**< Default nv_seed_read function to use, can be undefined */
3874
+ //#define MBEDTLS_PLATFORM_STD_NV_SEED_WRITE mbedtls_platform_std_nv_seed_write /**< Default nv_seed_write function to use, can be undefined */
3875
+ //#define MBEDTLS_PLATFORM_STD_NV_SEED_FILE "seedfile" /**< Seed file to read/write with default implementation */
3876
+
3877
+ /* To use the following function macros, MBEDTLS_PLATFORM_C must be enabled. */
3878
+ /* MBEDTLS_PLATFORM_XXX_MACRO and MBEDTLS_PLATFORM_XXX_ALT cannot both be defined */
3879
+ //#define MBEDTLS_PLATFORM_CALLOC_MACRO calloc /**< Default allocator macro to use, can be undefined. See MBEDTLS_PLATFORM_STD_CALLOC for requirements. */
3880
+ //#define MBEDTLS_PLATFORM_FREE_MACRO free /**< Default free macro to use, can be undefined. See MBEDTLS_PLATFORM_STD_FREE for requirements. */
3881
+ //#define MBEDTLS_PLATFORM_EXIT_MACRO exit /**< Default exit macro to use, can be undefined */
3882
+ //#define MBEDTLS_PLATFORM_SETBUF_MACRO setbuf /**< Default setbuf macro to use, can be undefined */
3883
+ //#define MBEDTLS_PLATFORM_TIME_MACRO time /**< Default time macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */
3884
+ //#define MBEDTLS_PLATFORM_TIME_TYPE_MACRO time_t /**< Default time macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */
3885
+ //#define MBEDTLS_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */
3886
+ //#define MBEDTLS_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */
3887
+ /* Note: your snprintf must correctly zero-terminate the buffer! */
3888
+ //#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be undefined */
3889
+ //#define MBEDTLS_PLATFORM_VSNPRINTF_MACRO vsnprintf /**< Default vsnprintf macro to use, can be undefined */
3890
+ //#define MBEDTLS_PLATFORM_NV_SEED_READ_MACRO mbedtls_platform_std_nv_seed_read /**< Default nv_seed_read function to use, can be undefined */
3891
+ //#define MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO mbedtls_platform_std_nv_seed_write /**< Default nv_seed_write function to use, can be undefined */
3892
+ //#define MBEDTLS_PLATFORM_MS_TIME_TYPE_MACRO int64_t //#define MBEDTLS_PLATFORM_MS_TIME_TYPE_MACRO int64_t /**< Default milliseconds time macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled. It must be signed, and at least 64 bits. If it is changed from the default, MBEDTLS_PRINTF_MS_TIME must be updated to match.*/
3893
+ //#define MBEDTLS_PRINTF_MS_TIME PRId64 /**< Default fmt for printf. That's avoid compiler warning if mbedtls_ms_time_t is redefined */
3894
+
3895
+ /** \def MBEDTLS_CHECK_RETURN
3896
+ *
3897
+ * This macro is used at the beginning of the declaration of a function
3898
+ * to indicate that its return value should be checked. It should
3899
+ * instruct the compiler to emit a warning or an error if the function
3900
+ * is called without checking its return value.
3901
+ *
3902
+ * There is a default implementation for popular compilers in platform_util.h.
3903
+ * You can override the default implementation by defining your own here.
3904
+ *
3905
+ * If the implementation here is empty, this will effectively disable the
3906
+ * checking of functions' return values.
3907
+ */
3908
+ //#define MBEDTLS_CHECK_RETURN __attribute__((__warn_unused_result__))
3909
+
3910
+ /** \def MBEDTLS_IGNORE_RETURN
3911
+ *
3912
+ * This macro requires one argument, which should be a C function call.
3913
+ * If that function call would cause a #MBEDTLS_CHECK_RETURN warning, this
3914
+ * warning is suppressed.
3915
+ */
3916
+ //#define MBEDTLS_IGNORE_RETURN( result ) ((void) !(result))
3917
+
3918
+ /* PSA options */
3919
+ /**
3920
+ * Use HMAC_DRBG with the specified hash algorithm for HMAC_DRBG for the
3921
+ * PSA crypto subsystem.
3922
+ *
3923
+ * If this option is unset:
3924
+ * - If CTR_DRBG is available, the PSA subsystem uses it rather than HMAC_DRBG.
3925
+ * - Otherwise, the PSA subsystem uses HMAC_DRBG with either
3926
+ * #MBEDTLS_MD_SHA512 or #MBEDTLS_MD_SHA256 based on availability and
3927
+ * on unspecified heuristics.
3928
+ */
3929
+ //#define MBEDTLS_PSA_HMAC_DRBG_MD_TYPE MBEDTLS_MD_SHA256
3930
+
3931
+ /** \def MBEDTLS_PSA_KEY_SLOT_COUNT
3932
+ * Restrict the PSA library to supporting a maximum amount of simultaneously
3933
+ * loaded keys. A loaded key is a key stored by the PSA Crypto core as a
3934
+ * volatile key, or a persistent key which is loaded temporarily by the
3935
+ * library as part of a crypto operation in flight.
3936
+ *
3937
+ * If this option is unset, the library will fall back to a default value of
3938
+ * 32 keys.
3939
+ */
3940
+ //#define MBEDTLS_PSA_KEY_SLOT_COUNT 32
3941
+
3942
+ /* RSA OPTIONS */
3943
+ //#define MBEDTLS_RSA_GEN_KEY_MIN_BITS 1024 /**< Minimum RSA key size that can be generated in bits (Minimum possible value is 128 bits) */
3944
+
3945
+ /* SSL Cache options */
3946
+ //#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
3947
+ //#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
3948
+
3949
+ /* SSL options */
3950
+
3951
+ /** \def MBEDTLS_SSL_IN_CONTENT_LEN
3952
+ *
3953
+ * Maximum length (in bytes) of incoming plaintext fragments.
3954
+ *
3955
+ * This determines the size of the incoming TLS I/O buffer in such a way
3956
+ * that it is capable of holding the specified amount of plaintext data,
3957
+ * regardless of the protection mechanism used.
3958
+ *
3959
+ * \note When using a value less than the default of 16KB on the client, it is
3960
+ * recommended to use the Maximum Fragment Length (MFL) extension to
3961
+ * inform the server about this limitation. On the server, there
3962
+ * is no supported, standardized way of informing the client about
3963
+ * restriction on the maximum size of incoming messages, and unless
3964
+ * the limitation has been communicated by other means, it is recommended
3965
+ * to only change the outgoing buffer size #MBEDTLS_SSL_OUT_CONTENT_LEN
3966
+ * while keeping the default value of 16KB for the incoming buffer.
3967
+ *
3968
+ * Uncomment to set the maximum plaintext size of the incoming I/O buffer.
3969
+ */
3970
+ //#define MBEDTLS_SSL_IN_CONTENT_LEN 16384
3971
+
3972
+ /** \def MBEDTLS_SSL_CID_IN_LEN_MAX
3973
+ *
3974
+ * The maximum length of CIDs used for incoming DTLS messages.
3975
+ *
3976
+ */
3977
+ //#define MBEDTLS_SSL_CID_IN_LEN_MAX 32
3978
+
3979
+ /** \def MBEDTLS_SSL_CID_OUT_LEN_MAX
3980
+ *
3981
+ * The maximum length of CIDs used for outgoing DTLS messages.
3982
+ *
3983
+ */
3984
+ //#define MBEDTLS_SSL_CID_OUT_LEN_MAX 32
3985
+
3986
+ /** \def MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY
3987
+ *
3988
+ * This option controls the use of record plaintext padding
3989
+ * in TLS 1.3 and when using the Connection ID extension in DTLS 1.2.
3990
+ *
3991
+ * The padding will always be chosen so that the length of the
3992
+ * padded plaintext is a multiple of the value of this option.
3993
+ *
3994
+ * Note: A value of \c 1 means that no padding will be used
3995
+ * for outgoing records.
3996
+ *
3997
+ * Note: On systems lacking division instructions,
3998
+ * a power of two should be preferred.
3999
+ */
4000
+ //#define MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY 16
4001
+
4002
+ /** \def MBEDTLS_SSL_OUT_CONTENT_LEN
4003
+ *
4004
+ * Maximum length (in bytes) of outgoing plaintext fragments.
4005
+ *
4006
+ * This determines the size of the outgoing TLS I/O buffer in such a way
4007
+ * that it is capable of holding the specified amount of plaintext data,
4008
+ * regardless of the protection mechanism used.
4009
+ *
4010
+ * It is possible to save RAM by setting a smaller outward buffer, while keeping
4011
+ * the default inward 16384 byte buffer to conform to the TLS specification.
4012
+ *
4013
+ * The minimum required outward buffer size is determined by the handshake
4014
+ * protocol's usage. Handshaking will fail if the outward buffer is too small.
4015
+ * The specific size requirement depends on the configured ciphers and any
4016
+ * certificate data which is sent during the handshake.
4017
+ *
4018
+ * Uncomment to set the maximum plaintext size of the outgoing I/O buffer.
4019
+ */
4020
+ //#define MBEDTLS_SSL_OUT_CONTENT_LEN 16384
4021
+
4022
+ /** \def MBEDTLS_SSL_DTLS_MAX_BUFFERING
4023
+ *
4024
+ * Maximum number of heap-allocated bytes for the purpose of
4025
+ * DTLS handshake message reassembly and future message buffering.
4026
+ *
4027
+ * This should be at least 9/8 * MBEDTLS_SSL_IN_CONTENT_LEN
4028
+ * to account for a reassembled handshake message of maximum size,
4029
+ * together with its reassembly bitmap.
4030
+ *
4031
+ * A value of 2 * MBEDTLS_SSL_IN_CONTENT_LEN (32768 by default)
4032
+ * should be sufficient for all practical situations as it allows
4033
+ * to reassembly a large handshake message (such as a certificate)
4034
+ * while buffering multiple smaller handshake messages.
4035
+ *
4036
+ */
4037
+ //#define MBEDTLS_SSL_DTLS_MAX_BUFFERING 32768
4038
+
4039
+ //#define MBEDTLS_PSK_MAX_LEN 32 /**< Max size of TLS pre-shared keys, in bytes (default 256 or 384 bits) */
4040
+ //#define MBEDTLS_SSL_COOKIE_TIMEOUT 60 /**< Default expiration delay of DTLS cookies, in seconds if HAVE_TIME, or in number of cookies issued */
4041
+
4042
+ /**
4043
+ * Complete list of ciphersuites to use, in order of preference.
4044
+ *
4045
+ * \warning No dependency checking is done on that field! This option can only
4046
+ * be used to restrict the set of available ciphersuites. It is your
4047
+ * responsibility to make sure the needed modules are active.
4048
+ *
4049
+ * Use this to save a few hundred bytes of ROM (default ordering of all
4050
+ * available ciphersuites) and a few to a few hundred bytes of RAM.
4051
+ *
4052
+ * The value below is only an example, not the default.
4053
+ */
4054
+ //#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
4055
+
4056
+ /**
4057
+ * \def MBEDTLS_SSL_MAX_EARLY_DATA_SIZE
4058
+ *
4059
+ * The default maximum amount of 0-RTT data. See the documentation of
4060
+ * \c mbedtls_ssl_tls13_conf_max_early_data_size() for more information.
4061
+ *
4062
+ * It must be positive and smaller than UINT32_MAX.
4063
+ *
4064
+ * If MBEDTLS_SSL_EARLY_DATA is not defined, this default value does not
4065
+ * have any impact on the build.
4066
+ *
4067
+ * This feature is experimental, not completed and thus not ready for
4068
+ * production.
4069
+ *
4070
+ */
4071
+ //#define MBEDTLS_SSL_MAX_EARLY_DATA_SIZE 1024
4072
+
4073
+ /**
4074
+ * \def MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE
4075
+ *
4076
+ * Maximum time difference in milliseconds tolerated between the age of a
4077
+ * ticket from the server and client point of view.
4078
+ * From the client point of view, the age of a ticket is the time difference
4079
+ * between the time when the client proposes to the server to use the ticket
4080
+ * (time of writing of the Pre-Shared Key Extension including the ticket) and
4081
+ * the time the client received the ticket from the server.
4082
+ * From the server point of view, the age of a ticket is the time difference
4083
+ * between the time when the server receives a proposition from the client
4084
+ * to use the ticket and the time when the ticket was created by the server.
4085
+ * The server age is expected to be always greater than the client one and
4086
+ * MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE defines the
4087
+ * maximum difference tolerated for the server to accept the ticket.
4088
+ * This is not used in TLS 1.2.
4089
+ *
4090
+ */
4091
+ //#define MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE 6000
4092
+
4093
+ /**
4094
+ * \def MBEDTLS_SSL_TLS1_3_TICKET_NONCE_LENGTH
4095
+ *
4096
+ * Size in bytes of a ticket nonce. This is not used in TLS 1.2.
4097
+ *
4098
+ * This must be less than 256.
4099
+ */
4100
+ //#define MBEDTLS_SSL_TLS1_3_TICKET_NONCE_LENGTH 32
4101
+
4102
+ /**
4103
+ * \def MBEDTLS_SSL_TLS1_3_DEFAULT_NEW_SESSION_TICKETS
4104
+ *
4105
+ * Default number of NewSessionTicket messages to be sent by a TLS 1.3 server
4106
+ * after handshake completion. This is not used in TLS 1.2 and relevant only if
4107
+ * the MBEDTLS_SSL_SESSION_TICKETS option is enabled.
4108
+ *
4109
+ */
4110
+ //#define MBEDTLS_SSL_TLS1_3_DEFAULT_NEW_SESSION_TICKETS 1
4111
+
4112
+ /* X509 options */
4113
+ //#define MBEDTLS_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */
4114
+ //#define MBEDTLS_X509_MAX_FILE_PATH_LEN 512 /**< Maximum length of a path/filename string in bytes including the null terminator character ('\0'). */
4115
+
4116
+ /** \} name SECTION: Module configuration options */