README 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  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.6.0 (Mar 24, 2023)
  58. Release 5.6.0 has been developed according to wolfSSL's development and QA process (see link below) and successfully passed the quality criteria.
  59. https://www.wolfssl.com/about/wolfssl-software-development-process-quality-assurance
  60. NOTE: * --enable-heapmath is being deprecated and will be removed by 2024
  61. * This release makes ASN Template the default with ./configure, the previous ASN parsing can be built with --enable-asn=original
  62. Release 5.6.0 of wolfSSL embedded TLS has bug fixes and new features including:
  63. ## New Feature Additions
  64. * ASN template is now the default ASN parsing implementation when compiling with configure
  65. * Added in support for TLS v1.3 Encrypted Client Hello (ECH) and HPKE (Hybrid Public Key Encryption)
  66. * DTLS 1.3 stateless server ClientHello parsing support added
  67. ### Ports
  68. * Add RX64/RX71 SHA hardware support
  69. * Port to RT1170 and expand NXP CAAM driver support
  70. * Add NuttX integration files for ease of use
  71. * Updated Stunnel support for version 5.67
  72. Compatibility Layer
  73. * Add in support for AES-CCM with EVP
  74. * BN compatibility API refactoring and separate API created
  75. * Expanding public key type cipher suite list strings support
  76. ### Misc.
  77. * Support pthread_rwlock and add enable option
  78. * Add wolfSSL_CertManagerLoadCABuffer_ex() that takes a user certificate chain flag and additional verify flag options
  79. * Docker build additions for wolfSSL library and wolfCLU application
  80. * Add favorite drink pilot attribute type to get it from the encoding
  81. * Added in support for indefinite length BER parsing with PKCS12
  82. * Add dynamic session cache which allocates sessions from the heap with macro SESSION_CACHE_DYNAMIC_MEM
  83. ## Improvements / Optimizations
  84. ### Tests
  85. * Additional CI (continuous integration) testing and leveraging of GitHub workflows
  86. * Add CI testing for wpa_supplicant, OpenWrt and OpenVPN using GitHub workflows
  87. * Add compilation of Espressif to GitHub workflows tests
  88. * Refactoring and improving error results with wolfCrypt unit test application
  89. * Minor warning fixes from Coverity static analysis scan
  90. * Add new SHA-512/224 and SHA-512/256 tests
  91. * Used codespell and fixed some minor typos
  92. ### Ports
  93. * Improve TLS1.2 client authentication to use TSIP
  94. * Updated Kyber macro to be WOLFSSL_HAVE_KYBER and made changes that make Kyber work on STM32
  95. * AES-GCM Windows assembly additions
  96. * CRLF line endings, trailing spaces for C# Wrapper Projects
  97. Compatibility Layer
  98. * Update `PubKey` and `Key` PEM-to-DER APIs to support return of needed DER size
  99. * Allow reading ENC EC PRIVATE KEY as well via wolfSSL_PEM_read_bio_ECPrivateKey
  100. * Improve wolfSSL_EC_POINT_cmp to handle Jacobian ordinates
  101. * Fix issue with BIO_reset() and add BIO_FLAGS_MEM_RDONLY flag support for read only BIOs
  102. ### SP
  103. * In SP math library rework mod 3 and use count leading zero instruction
  104. * Fix with SP ECC sign to reject the random k generated when r is 0
  105. * With SP math add better detection of when add won't work and double is needed with point_add_qz1 internal function
  106. * With SP int fail when buffer writing to is too small for number rather than discarding the extra values
  107. ### Builds
  108. * Define WOLFSSL_SP_SMALL_STACK if wolfSSL is build with --enable-smallstack
  109. * Fix CMake to exclude libm when DH is not enabled
  110. * Allow building of SAKKE as external non-FIPS algorithm with wolfmikey product
  111. * Add option to add library suffix, --with-libsuffix
  112. * ASN template compile option WOLFSSL_ASN_INT_LEAD_0_ANY to allow leading zeros
  113. * Add user_settings.h template for wolfTPM to examples/configs/user_settings_wolftpm.h
  114. * Purge the AES variant of Dilithium
  115. * Expand WOLFSSL_NO_ASN_STRICT to allow parsing of explicit ECC public key
  116. * Remove relocatable text in ARMv7a AES assembly for use with FIPS builds
  117. * Expand checking for hardware that supports ARMv7a neon with autotools configure
  118. * Sanity check on allocation fails with DSA and FP_ECC build when zeroizing internal buffer
  119. * Additional TLS alerts sent when compiling with WOLFSSL_EXTRA_ALERTS macro defined
  120. ### Benchmarking
  121. * Update wolfCrypt benchmark Windows build files to support x64 Platform
  122. * Add SHA512/224 and SHA512/256 benchmarks, fixed CVS macro and display sizes
  123. * Separate AES-GCM streaming runs when benchmarked
  124. * No longer call external implementation of Kyber from benchmark
  125. * Fix for benchmarking shake with custom block size
  126. * Fixes for benchmark help `-alg` list and block format
  127. Documentation/Examples
  128. * Document use of wc_AesFree() and update documentation of Ed25519 with Doxygen
  129. * Move the wolfSSL Configuration section higher in QUIC.md
  130. * Add Japanese Doxygen documentation for cmac.h, quic.h and remove incomplete Japanese doxygen in asn_public.h
  131. * Espressif examples run with local wolfSSL now with no additional setup needed
  132. * Added a fix for StartTLS use In the example client
  133. * Add a base-line user_settings.h for use with FIPS 140-3 in XCode example app
  134. ### Optimizations
  135. * AES-NI usage added for AES modes ECB/CTR/XTS
  136. ### Misc
  137. * Update AES-GCM stream decryption to allow long IVs
  138. * Internal refactor to use wolfSSL_Ref functions when incrementing or decrementing the structures reference count and fixes for static analysis reports
  139. * Cleanup function logging making adjustments to the debug log print outs
  140. * Remove realloc dependency in DtlsMsgCombineFragBuckets function
  141. * Refactor to use WOLFSSL_CTX’s cipher suite list when possible
  142. * Update internal padding of 0’s with DSA sign and additional tests with mp_to_unsigned_bin_len function
  143. * With DTLS SRTP use wolfSSL_export_keying_material instead of wc_PRF_TLS
  144. * Updated macro naming from HAVE_KYBER to be WOLFSSL_HAVE_KYBER
  145. * Update AES XTS encrypt to handle in-place encryption properly
  146. * With TLS 1.3 add option to require only PSK with DHE
  147. ## Fixes
  148. ### Ports
  149. * Fix for AES use with CAAM on imx8qxp with SECO builds
  150. * Fix for PIC32 crypto HW and unused `TLSX_SetResponse`
  151. * Fix warning if ltime is unsigned seen with QNX build
  152. * Updates and fix for Zephyr project support
  153. * Include sys/time.h for WOLFSSL_RIOT_OS
  154. * Move X509_V errors from enums to defines for use with HAProxy CLI
  155. * Fix IAR compiler warnings resolved
  156. * Fix for STM32 Hash peripherals (like on F437) with FIFO depth = 1
  157. * ESP32 fix for SHA384 init with hardware acceleration
  158. ### Builds
  159. * Add WOLFSSL_IP_ALT_NAME macro define to --enable-curl
  160. * Fixes for building with C++17 and avoiding clashing with byte naming
  161. * Fixes SP math all build issue with small-stack and no hardening
  162. * Fix for building with ASN template with `NO_ASN_TIME` defined
  163. * Fix building FIPSv2 with WOLFSSL_ECDSA_SET_K defined
  164. * Don't allow aesgcm-stream option with kcapi
  165. * Fix DTLS test case for when able to read peers close notify alert on FreeBSD systems
  166. * Fix for "expression must have a constant value" in tls13.c with Green Hills compiler
  167. * Fixes for building KCAPI with opensslextra enabled
  168. * Fix warnings of shadows min and subscript with i486-netbsd-gcc compiler
  169. * Fix issue with async and `WOLFSSL_CHECK_ALERT_ON_ERR`
  170. * Fix for PKCS7 with asynchronous crypto enabled
  171. ### Math Library
  172. * SP Aarch64 fix for conditional changed in asm needing "cc" and fix for ECC P256 mont reduce
  173. * In SP builds add sanity check with DH exp. to check the output length for minimum size
  174. * In SP math fix scalar length check with EC scalar multiply
  175. * With SP int fix handling negative character properly with read radix
  176. * Add error checks before setting variable err in SP int with the function sp_invmod_mont_ct
  177. * Fix to add sanity check for malloc of zero size in fastmath builds
  178. * In fastmath fix a possible overflow in fp_to_unsigned_bin_len length check
  179. * Heapmath fast mod. reduce fix
  180. ### Compatibility Layer
  181. * Fixes for encoding/decoding ecc public keys and ensure i2d public key functions do not include any private key information
  182. * Fix for EVP_EncryptUpdate to update outl on empty input
  183. * Fix SE050 RSA public key loading and RSA/ECC SE050 TLS Compatibility
  184. * Rework EC API and validate point after setting it
  185. * Fix for X509 RSA PSS with compatibility layer functions
  186. * Fix size of structures used with SHA operations when built with opensslextra for Espressif hardware accelerated hashing
  187. * Added sanity check on key length with wolfSSL_CMAC_Init function
  188. * Fix for return value type conversion of bad mutex error in logging function
  189. * Fix NID conflict NID_givenName and NID_md5WithRSAEncryption
  190. * Fix unguarded XFPRINTF calls with opensslextra build
  191. * Fix wolfSSL_ASN1_INTEGER_to_BN for negative values
  192. * Fix for potential ASN1_STRING leak in wolfSSL_X509_NAME_ENTRY_create_by_txt and wolfSSL_X509_NAME_ENTRY_create_by_NID when memory allocation fails
  193. ### Misc.
  194. * Add sanity check to prevent an out of bounds read with OCSP response decoding
  195. * Sanity check to not allow 0 length with bit string and integer when parsing ASN1 syntax
  196. * Adjust RNG sanity checks and remove error prone first byte comparison
  197. * With PKCS7 add a fix for GetAsnTimeString() to correctly increment internal data pointer
  198. * PKCS7 addition of sequence around algo parameters with authenvelop
  199. * DSA fixes for clearing mp_int before re-reading data and avoid mp_clear without first calling mp_init
  200. * Fix for SRTP setting bitfield when it is encoded for the TLS extension
  201. * Fix for handling small http headers when doing CRL verification
  202. * Fix for ECCSI hash function to validate the output size and curve size
  203. * Fix for value of givenName and name being reversed with CSR generation
  204. * Fix for error type returned (OCSP_CERT_UNKNOWN) with OCSP verification
  205. * Fix for a potential memory leak with ProcessCSR when handling OCSP responses
  206. * Fix for VERIFY_SKIP_DATE flag not ignoring date errors when set
  207. * Fix for zlib decompression buffer issue with PKCS7
  208. * Fix for DTLS message pool send size used and DTLS server saving of the handshake sequence
  209. * Fix to propagate WOLFSSL_TICKET_RET_CREATE error return value from DoDecryptTicket()
  210. * Fix for handling long session IDs with TLS 1.3 session tickets
  211. * Fix for AES-GCM streaming when caching an IV
  212. * Fix for test case with older selftest that returns bad padding instead of salt len error
  213. * Add fix for siphash cache and added in additional tests
  214. * Fix potential out of bounds memset to 0 in error case with session export function used with --enable-sessionexport builds
  215. * Fix possible NULL dereference in TLSX_CSR_Parse with TLS 1.3
  216. * Fix for sanity check on RSA pad length with no padding using the build macro WC_RSA_NO_PADDING
  217. For additional vulnerability information visit the vulnerability page at:
  218. https://www.wolfssl.com/docs/security-vulnerabilities/
  219. See INSTALL file for build instructions.
  220. More info can be found on-line at: https://wolfssl.com/wolfSSL/Docs.html
  221. *** Resources ***
  222. [wolfSSL Website](https://www.wolfssl.com/)
  223. [wolfSSL Wiki](https://github.com/wolfSSL/wolfssl/wiki)
  224. [FIPS FAQ](https://wolfssl.com/license/fips)
  225. [wolfSSL Documents](https://wolfssl.com/wolfSSL/Docs.html)
  226. [wolfSSL Manual](https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-toc.html)
  227. [wolfSSL API Reference]
  228. (https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-17-wolfssl-api-reference.html)
  229. [wolfCrypt API Reference]
  230. (https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-18-wolfcrypt-api-reference.html)
  231. [TLS 1.3](https://www.wolfssl.com/docs/tls13/)
  232. [wolfSSL Vulnerabilities]
  233. (https://www.wolfssl.com/docs/security-vulnerabilities/)
  234. Additional wolfSSL Examples](https://github.com/wolfssl/wolfssl-examples)