README 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. *** Description ***
  2. The wolfSSL embedded SSL library (formerly CyaSSL) is a lightweight SSL/TLS
  3. library written in ANSI C and targeted for embedded, RTOS, and
  4. resource-constrained environments - primarily because of its small size, speed,
  5. and feature set. It is commonly used in standard operating environments as well
  6. because of its royalty-free pricing and excellent cross platform support.
  7. wolfSSL supports industry standards up to the current TLS 1.3 and DTLS 1.2
  8. levels, is up to 20 times smaller than OpenSSL, and offers progressive ciphers
  9. such as ChaCha20, Curve25519, and Blake2b. User benchmarking and feedback
  10. reports dramatically better performance when using wolfSSL over OpenSSL.
  11. wolfSSL is powered by the wolfCrypt library. Two versions of the wolfCrypt
  12. cryptography library have been FIPS 140-2 validated (Certificate #2425 and
  13. certificate #3389). For additional information, visit the wolfCrypt FIPS FAQ
  14. (https://www.wolfssl.com/license/fips/) or contact fips@wolfssl.com
  15. *** Why choose wolfSSL? ***
  16. There are many reasons to choose wolfSSL as your embedded SSL solution. Some of
  17. the top reasons include size (typical footprint sizes range from 20-100 kB),
  18. support for the newest standards (SSL 3.0, TLS 1.0, TLS 1.1, TLS 1.2, TLS 1.3,
  19. DTLS 1.0, and DTLS 1.2), current and progressive cipher support (including
  20. stream ciphers), multi-platform, royalty free, and an OpenSSL compatibility API
  21. to ease porting into existing applications which have previously used the
  22. OpenSSL package. For a complete feature list, see chapter 4 of the wolfSSL
  23. manual. (https://www.wolfssl.com/docs/wolfssl-manual/ch4/)
  24. *** Notes, Please read ***
  25. Note 1)
  26. wolfSSL as of 3.6.6 no longer enables SSLv3 by default. wolfSSL also no longer
  27. supports static key cipher suites with PSK, RSA, or ECDH. This means if you
  28. plan to use TLS cipher suites you must enable DH (DH is on by default), or
  29. enable ECC (ECC is on by default), or you must enable static key cipher suites
  30. with
  31. WOLFSSL_STATIC_DH
  32. WOLFSSL_STATIC_RSA
  33. or
  34. WOLFSSL_STATIC_PSK
  35. though static key cipher suites are deprecated and will be removed from future
  36. versions of TLS. They also lower your security by removing PFS.
  37. When compiling ssl.c, wolfSSL will now issue a compiler error if no cipher
  38. suites are available. You can remove this error by defining
  39. WOLFSSL_ALLOW_NO_SUITES in the event that you desire that, i.e., you're not
  40. using TLS cipher suites.
  41. Note 2)
  42. wolfSSL takes a different approach to certificate verification than OpenSSL
  43. does. The default policy for the client is to verify the server, this means
  44. that if you don't load CAs to verify the server you'll get a connect error,
  45. no signer error to confirm failure (-188).
  46. If you want to mimic OpenSSL behavior of having SSL_connect succeed even if
  47. verifying the server fails and reducing security you can do this by calling:
  48. wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0);
  49. before calling wolfSSL_new();. Though it's not recommended.
  50. Note 3)
  51. The enum values SHA, SHA256, SHA384, SHA512 are no longer available when
  52. wolfSSL is built with --enable-opensslextra (OPENSSL_EXTRA) or with the macro
  53. NO_OLD_SHA_NAMES. These names get mapped to the OpenSSL API for a single call
  54. hash function. Instead the name WC_SHA, WC_SHA256, WC_SHA384 and WC_SHA512
  55. should be used for the enum name.
  56. *** end Notes ***
  57. # wolfSSL Release 5.3.0 (May 3rd, 2022)
  58. Release 5.3.0 of wolfSSL embedded TLS has bug fixes and new features including:
  59. ## New Feature Additions
  60. ### Ports
  61. * Updated support for Stunnel to version 5.61
  62. * Add i.MX8 NXP SECO use for secure private ECC keys and expand cryptodev-linux for use with the RSA/Curve25519 with the Linux CAAM driver
  63. * Allow encrypt then mac with Apache port
  64. * Update Renesas TSIP version to 1.15 on GR-ROSE and certificate signature data for TSIP / SCE example
  65. * Add IAR MSP430 example, located in IDE/IAR-MSP430 directory
  66. * Add support for FFMPEG with the enable option `--enable-ffmpeg`, FFMPEG is used for recording and converting video and audio (https://ffmpeg.org/)
  67. * Update the bind port to version 9.18.0
  68. ### Post Quantum
  69. * Add Post-quantum KEM benchmark for STM32
  70. * Enable support for using post quantum algorithms with embedded STM32 boards and port to STM32U585
  71. ### Compatibility Layer Additions
  72. * Add port to support libspdm (https://github.com/DMTF/libspdm/blob/main/README.md), compatibility functions added for the port were:
  73. - ASN1_TIME_compare
  74. - DH_new_by_nid
  75. - OBJ_length, OBJ_get0_data,
  76. - EVP layer ChaCha20-Poly1305, HKDF
  77. - EC_POINT_get_affine_coordinates
  78. - EC_POINT_set_affine_coordinates
  79. * Additional functions added were:
  80. - EC_KEY_print_fp
  81. - EVP_PKEY_paramgen
  82. - EVP_PKEY_sign/verify functionality
  83. - PEM_write_RSAPublicKey
  84. - PEM_write_EC_PUBKEY
  85. - PKCS7_sign
  86. - PKCS7_final
  87. - SMIME_write_PKCS7
  88. - EC_KEY/DH_up_ref
  89. - EVP_DecodeBlock
  90. - EVP_EncodeBlock
  91. - EC_KEY_get_conv_form
  92. - BIO_eof
  93. - Add support for BIO_CTRL_SET and BIO_CTRL_GET
  94. * Add compile time support for the type SSL_R_NULL_SSL_METHOD_PASSED
  95. * Enhanced X509_NAME_print_ex() to support RFC5523 basic escape
  96. * More checks on OPENSSL_VERSION_NUMBER for API prototype differences
  97. * Add extended key usage support to wolfSSL_X509_set_ext
  98. * SSL_VERIFY_FAIL_IF_NO_PEER_CERT now can also connect with compatibility layer enabled and a TLS 1.3 PSK connection is used
  99. * Improve wolfSSL_BN_rand to handle non byte boundaries and top/bottom parameters
  100. * Changed X509_V_ERR codes to better match OpenSSL values used
  101. * Improve wolfSSL_i2d_X509_name to allow for a NULL input in order to get the expected resulting size
  102. * Enhance the smallstack build to reduce stack size farther when built with compatibility layer enabled
  103. ### Misc.
  104. * Sniffer asynchronous support addition, handling of DH shared secret and tested with Intel QuickAssist
  105. * Added in support for OCSP with IPv6
  106. * Enhance SP (single precision) optimizations for use with the ECC P521
  107. * Add new public API wc_CheckCertSigPubKey() for use to easily check the signature of a certificate given a public key buffer
  108. * Add CSR (Certificate Signing Request) userId support in subject name
  109. * Injection and parsing of custom extensions in X.509 certificates
  110. * Add WOLF_CRYPTO_CB_ONLY_RSA and WOLF_CRYPTO_CB_ONLY_ECC to reduce code size if using only crypto callback functions with RSA and ECC
  111. * Created new --enable-engine configure flag used to build wolfSSL for use with wolfEngine
  112. * With TLS 1.3 PSK, when WOLFSSL_PSK_MULTI_ID_PER_CS is defined multiple IDs for a cipher suite can be handled
  113. * Added private key id/label support with improving the PK (Public Key) callbacks
  114. * Support for Intel QuickAssist ECC KeyGen acceleration
  115. * Add the function wolfSSL_CTX_SetCertCbCtx to set user context for certificate call back
  116. * Add the functions wolfSSL_CTX_SetEccSignCtx(WOLFSSL_CTX* ctx, void *userCtx) and wolfSSL_CTX_GetEccSignCtx(WOLFSSL_CTX* ctx) for setting and getting a user context
  117. * wolfRand for AMD --enable-amdrand
  118. ## Fixes
  119. ### PORT Fixes
  120. * KCAPI memory optimizations and page alignment fixes for ECC, AES mode fixes and reduction to memory usage
  121. * Add the new kdf.c file to the TI-RTOS build
  122. * Fix wait-until-done in RSA hardware primitive acceleration of ESP-IDF port
  123. * IOTSafe workarounds when reading files with ending 0’s and for ECC signatures
  124. ### Math Library Fixes
  125. * Sanity check with SP math that ECC points ordinates are not greater than modulus length
  126. * Additional sanity checks that _sp_add_d does not error due to overflow
  127. * Wycheproof fixes, testing integration, and fixes for AVX / AArch64 ASM edge case tests
  128. * TFM fp_div_2_ct rework to avoid potential overflow
  129. ### Misc.
  130. * Fix for PKCS#7 with Crypto Callbacks
  131. * Fix for larger curve sizes with deterministic ECC sign
  132. * Fixes for building wolfSSL alongside openssl using --enable-opensslcoexist
  133. * Fix for compatibility layer handling of certificates with SHA256 SKID (Subject Key ID)
  134. * Fix for wolfSSL_ASN1_TIME_diff erroring out on a return value of 0 from mktime
  135. * Remove extra padding when AES-CBC encrypted with PemToDer
  136. * Fixes for TLS v1.3 early data with async.
  137. * Fixes for async disables around the DevCopy calls
  138. * Fixes for Windows AES-NI with clang compiler
  139. * Fix for handling the detection of processing a plaintext TLS alert packet
  140. * Fix for potential memory leak in an error case with TLSX supported groups
  141. * Sanity check on `input` size in `DecodeNsCertType`
  142. * AES-GCM stack alignment fixes with assembly code written for AVX/AVX2
  143. * Fix for PK callbacks with server side and setting a public key
  144. ## Improvements/Optimizations
  145. ### Build Options and Warnings
  146. * Added example user settings template for FIPS v5 ready
  147. * Automake file touch cleanup for use with Yocto devtool
  148. * Allow disabling forced 'make clean' at the end of ./configure by using --disable-makeclean
  149. * Enable TLS 1.3 early data when specifying `--enable-all` option
  150. * Disable PK Callbacks with JNI FIPS builds
  151. * Add a FIPS cert 3389 ready option, this is the fips-ready build
  152. * Support (no)inline with Wind River Diab compiler
  153. * ECDH_compute_key allow setting of globalRNG with FIPS 140-3
  154. * Add logic equivalent to configure.ac in settings.h for Poly1305
  155. * Fixes to support building opensslextra with SP math
  156. * CPP protection for extern references to x86_64 asm code
  157. * Updates and enhancements for Espressif ESP-IDF wolfSSL setup_win.bat
  158. * Documentation improvements with auto generation
  159. * Fix reproducible-build for working an updated version of libtool, version 2.4.7
  160. * Fixes for Diab C89 and armclang
  161. * Fix `mcapi_test.c` to include the settings.h before crypto.h
  162. * Update and handle builds with NO_WOLFSSL_SERVER and NO_WOLFSSL_CLIENT
  163. * Fix for some macro defines with FIPS 140-3 build so that RSA_PKCS1_PSS_PADDING can be used with RSA sign/verify functions
  164. ### Math Libraries
  165. * Add RSA/DH check for even modulus
  166. * Enhance TFM math to handle more alloc failure cases gracefully
  167. * SP ASM performance improvements mostly around AArch64
  168. * SP ASM improvements for additional cache attack resistance
  169. * Add RSA check for small difference between p and q
  170. * 6-8% performance increase with ECC operations using SP int by improving the Montgomery Reduction
  171. ### Testing and Validation
  172. * All shell scripts in source tree now tested for correctness using shellcheck and bash -n
  173. * Added build testing under gcc-12 and -std=c++17 and fixed warnings
  174. * TLS 1.3 script test improvement to wait for server to write file
  175. * Unit tests for ECC r/s zeroness handling
  176. * CI server was expanded with a very “quiet” machine that can support multiple ContantTime tests ensuring ongoing mitigation against side-channel timing based attacks. Algorithms being assessed on this machine are: AES-CBC, AES-GCM, CHACHA20, ECC, POLY1305, RSA, SHA256, SHA512, CURVE25519.
  177. * Added new multi configuration windows builds to CI testing for greater testing coverage of windows use-cases
  178. ### Misc.
  179. * Support for ECC import to check validity of key on import even if one of the coordinates (x or y) is 0
  180. * Modify example app to work with FreeRTOS+IoT
  181. * Ease of access for cert used for verifying a PKCS#7 bundle
  182. * Clean up Visual Studio output and intermediate directories
  183. * With TLS 1.3 fail immediately if a server sends empty certificate message
  184. * Enhance the benchmark application to support multi-threaded testing
  185. * Improvement for `wc_EccPublicKeyToDer` to not overestimate the buffer size required
  186. * Fix to check if `wc_EccPublicKeyToDer` has enough output buffer space
  187. * Fix year 2038 problem in wolfSSL_ASN1_TIME_diff
  188. * Various portability improvements (Time, DTLS epoch size, IV alloc)
  189. * Prefer status_request_v2 over status_request when both are present
  190. * Add separate "struct stat" definition XSTATSTRUCT to make overriding XSTAT easier for portability
  191. * With SipHash replace gcc specific ASM instruction with generic
  192. * Don't force a ECC CA when a custom CA is passed with `-A`
  193. * Add peer authentication failsafe for TLS 1.2 and below
  194. * Improve parsing of UID from subject and issuer name with the compatibility layer by
  195. * Fallback to full TLS handshake if session ticket fails
  196. * Internal refactoring of code to reduce ssl.c file size
  197. For additional vulnerability information visit the vulnerability page at https://www.wolfssl.com/docs/security-vulnerabilities/
  198. See INSTALL file for build instructions.
  199. More info can be found on-line at https://wolfssl.com/wolfSSL/Docs.html
  200. *** Resources ***
  201. [wolfSSL Website](https://www.wolfssl.com/)
  202. [wolfSSL Wiki](https://github.com/wolfSSL/wolfssl/wiki)
  203. [FIPS FAQ](https://wolfssl.com/license/fips)
  204. [wolfSSL Documents](https://wolfssl.com/wolfSSL/Docs.html)
  205. [wolfSSL Manual](https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-toc.html)
  206. [wolfSSL API Reference]
  207. (https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-17-wolfssl-api-reference.html)
  208. [wolfCrypt API Reference]
  209. (https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-18-wolfcrypt-api-reference.html)
  210. [TLS 1.3](https://www.wolfssl.com/docs/tls13/)
  211. [wolfSSL Vulnerabilities]
  212. (https://www.wolfssl.com/docs/security-vulnerabilities/)
  213. Additional wolfSSL Examples](https://github.com/wolfssl/wolfssl-examples)