README 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  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, NTRU, 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. Since current
  37. NTRU suites available do not use ephemeral keys, WOLFSSL_STATIC_RSA needs to be
  38. used in order to build with NTRU suites.
  39. When compiling ssl.c, wolfSSL will now issue a compiler error if no cipher
  40. suites are available. You can remove this error by defining
  41. WOLFSSL_ALLOW_NO_SUITES in the event that you desire that, i.e., you're not
  42. using TLS cipher suites.
  43. Note 2)
  44. wolfSSL takes a different approach to certificate verification than OpenSSL
  45. does. The default policy for the client is to verify the server, this means
  46. that if you don't load CAs to verify the server you'll get a connect error,
  47. no signer error to confirm failure (-188).
  48. If you want to mimic OpenSSL behavior of having SSL_connect succeed even if
  49. verifying the server fails and reducing security you can do this by calling:
  50. wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0);
  51. before calling wolfSSL_new();. Though it's not recommended.
  52. Note 3)
  53. The enum values SHA, SHA256, SHA384, SHA512 are no longer available when
  54. wolfSSL is built with --enable-opensslextra (OPENSSL_EXTRA) or with the macro
  55. NO_OLD_SHA_NAMES. These names get mapped to the OpenSSL API for a single call
  56. hash function. Instead the name WC_SHA, WC_SHA256, WC_SHA384 and WC_SHA512
  57. should be used for the enum name.
  58. *** end Notes ***
  59. # wolfSSL Release 4.8.1 (July 16, 2021)
  60. Release 4.8.1 of wolfSSL embedded TLS has an OCSP vulnerability fix:
  61. ### Vulnerabilities
  62. * [High] OCSP verification issue when response is for a certificate with no relation to the chain in question BUT that response contains the NoCheck extension which effectively disables ALL verification of that one cert. Users who should upgrade to 4.8.1 are TLS client users doing OCSP, TLS server users doing mutual auth with OCSP, and CertManager users doing OCSP independent of TLS. Thanks to Jan Nauber, Marco Smeets, Werner Rueschenbaum and Alissa Kim of Volkswagen Infotainment for the report.
  63. # wolfSSL Release 4.8.0 (July 09, 2021)
  64. Release 4.8.0 of wolfSSL embedded TLS has bug fixes and new features including:
  65. ### Vulnerabilities
  66. * [Low] CVE-2021-37155: OCSP request/response verification issue. In the case that the serial number in the OCSP request differs from the serial number in the OCSP response the error from the comparison was not resulting in a failed verification. We recommend users that have wolfSSL version 4.6.0 and 4.7.0 with OCSP enabled update their version of wolfSSL. Version 4.5.0 and earlier are not affected by this report. Thanks to Rainer Mueller-Amersdorffer, Roee Yankelevsky, Barak Gutman, Hila Cohen and Shoshi Berko (from CYMOTIVE Technologies and CARIAD) for the report.
  67. * [Low] CVE-2021-24116: Side-Channel cache look up vulnerability in base64 PEM decoding for versions of wolfSSL 4.5.0 and earlier. Versions 4.6.0 and up contain a fix and do not need to be updated for this report. If decoding a PEM format private key using version 4.5.0 and older of wolfSSL then we recommend updating the version of wolfSSL used. Thanks to Florian Sieck, Jan Wichelmann, Sebastian Berndt and Thomas Eisenbarth for the report.
  68. ### New Feature Additions
  69. ###### New Product
  70. * Added wolfSentry build with --enable-wolfsentry and tie-ins to wolfSSL code for use with wolfSentry
  71. ###### Ports
  72. * QNX CAAM driver added, supporting ECC black keys, CMAC, BLOBs, and TRNG use
  73. * _WIN32_WCE wolfCrypt port added
  74. * INTIME_RTOS directory support added
  75. * Added support for STM32G0
  76. * Renesas RX: Added intrinsics for rot[rl], revl (thanks @rliebscher)
  77. * Added support for running wolfcrypt/test/testwolfcrypt on Dolphin emulator to test DEVKITPRO port
  78. * Zephyr project port updated to latest version 2.6.X
  79. ###### ASN1 and PKCS
  80. * Storing policy constraint extension from certificate added
  81. * Added support for NID_favouriteDrink pilot
  82. * Added the API function wc_EncryptPKCS8Key to handle encrypting a DER, PKCS#8-formatted key
  83. ###### Compatibility Layer Additions
  84. * Open Source PORTS Added/Updated
  85. - OpenVPN
  86. - OpenLDAP
  87. - socat-1.7.4.1
  88. - Updated QT port for 5.15.2
  89. * Changes to extend set_cipher_list() compatibility layer API to have set_ciphersuites compatibility layer API capability
  90. * Added more support for SHA3 in the EVP layer
  91. * API Added
  92. - MD5/MD5_Transform
  93. - SHA/SHA_Transform/SHA1_Transform
  94. - SHA224/SHA256_Transform/SHA512_Transform
  95. - SSL_CTX_get0_param/SSL_CTX_set1_param
  96. - X509_load_crl_file
  97. - SSL_CTX_get_min_proto_version
  98. - EVP_ENCODE_CTX_new
  99. - EVP_ENCODE_CTX_free
  100. - EVP_EncodeInit
  101. - EVP_EncodeUpdate
  102. - EVP_EncodeFinal
  103. - EVP_DecodeInit
  104. - EVP_DecodeUpdate
  105. - EVP_DecodeFinal
  106. - EVP_PKEY_print_public
  107. - BIO_tell
  108. - THREADID_current
  109. - THREADID_hash
  110. - SSL_CTX_set_ecdh_auto
  111. - RAND_set_rand_method()
  112. - X509_LOOKUP_ctrl()
  113. - RSA_bits
  114. - EC_curve_nist2nid
  115. - EC_KEY_set_group
  116. - SSL_SESSION_set_cipher
  117. - SSL_set_psk_use_session_callback
  118. - EVP_PKEY_param_check
  119. - DH_get0_pqg
  120. - CRYPTO_get_ex_new_index
  121. - SSL_SESSION_is_resumable
  122. - SSL_CONF_cmd
  123. - SSL_CONF_CTX_finish
  124. - SSL_CTX_keylog_cb_func
  125. - SSL_CTX_set_keylog_callback
  126. - SSL_CTX_get_keylog_callback
  127. ###### Misc.
  128. * Added wolfSSL_CTX_get_TicketEncCtx getter function to return the ticket encryption ctx value
  129. * Added wc_AesKeyWrap_ex and wc_AesKeyUnWrap_ex APIs to accept an Aes object to use for the AES operations
  130. * Added implementation of AES-GCM streaming (--enable-aesgcm-stream)
  131. * Added deterministic generation of k with ECC following RFC6979 when the macro WOLFSL_ECDSA_DETERMINISTIC_K is defined and wc_ecc_set_deterministic function is called
  132. * Implemented wc_DsaParamsDecode and wc_DsaKeyToParamsDer
  133. * Asynchronous support for TLS v1.3 TLSX ECC/DH key generation and key agreement
  134. * Added crypto callback support for Ed/Curve25519 and SHA2-512/384
  135. * TLS 1.3 wolfSSL_key_update_response function added to see if a update response is needed
  136. ### Fixes
  137. * Fix for detecting extra unused bytes that are in an ASN1 sequence appended to the end of a valid ECC signature
  138. * Fix for keyid with ktri CMS (breaks compatibility with previous keyid ASN1 syntax)
  139. * Fix for failed handshake if a client offers more than 150 cipher suites. Thanks to Marcel Maehren, Philipp Nieting, Robert Merget from Ruhr University Bochum Sven Hebrok, Juraj Somorovsky from Paderborn University
  140. * Fix for default order of deprecated elliptic curves SECP224R1, SECP192R1, SECP160R1. Thanks to Marcel Maehren, Philipp Nieting, Robert Merget from Ruhr University Bochum Sven Hebrok, Juraj Somorovsky from Paderborn University
  141. * Fix for corner TLS downgrade case where a TLS 1.3 setup that allows for downgrades but has TLS 1.3 set as the minimum version would still downgrade to TLS 1.2
  142. ###### PKCS7 (Multiple fixes throughout regarding memory leaks with SMIME and heap buffer overflows due to streaming functionality)
  143. * Fix PKCS7 dynamic content save/restore in PKCS7_VerifySignedData
  144. * Fix for heap buffer overflow on compare with wc_PKCS7_DecryptKtri
  145. * Fix for heap buffer overflow with wc_PKCS7_VerifySignedData
  146. * Fix for heap buffer overflow with wc_PKCS7_DecodeEnvelopedData
  147. * Check size of public key used with certificate passed into wc_PKCS7_InitWithCert before XMEMCPY to avoid overflow
  148. * Fix for heap buffer overflow fix for wolfSSL_SMIME_read_PKCS7
  149. * Fix to cleanly free memory in error state with wolfSSL_SMIME_read_PKCS7
  150. * SMIME error checking improvements and canonicalize multi-part messages before hashing
  151. ###### DTLS Fixes
  152. * DTLS fix to correctly move the Tx sequence number forward
  153. * DTLS fix for sequence and epoch number with secure renegotiation cookie exchange
  154. * Fix for Chacha-Poly AEAD for DTLS 1.2 with secure renegotiation
  155. ###### PORT Fixes
  156. * Fix AES, aligned key for the HW module with DCP port
  157. * Fix ATECC608A TNGTLS certificate size issue (thanks @vppillai)
  158. * Fixes for mingw compile warnings
  159. * Fixes for NXP LTC ECC/RSA
  160. * Fix ESP32 RSA hw accelerator initialization issue
  161. * Fixes for STM32 PKA with ECC
  162. * Fixes for STM32 AES GCM for HAL's that support byte sized headers
  163. * Espressif ESP32 SHA_CTX macro conflict resolved
  164. ###### Math Library Fixes
  165. * For platforms that support limits.h or windows make sure both SIZEOF_LONG_LONG and SIZEOF_LONG are set to avoid issues with CTC_SETTINGS
  166. * SP C 32/64: fix corner cases around subtraction affecting RSA PSS use
  167. * Fix to return the error code from sp_cond_swap_ct when malloc fails
  168. * Fix potential memory leak with small stack in the function fp_gcd
  169. * Static Analysis Fixes
  170. * Fixes made from Coverity analysis including:
  171. * Cleanups for some return values,
  172. * Fix for leak with wolfSSL_a2i_ASN1_INTEGER
  173. * Sanity check on length in wolfSSL_BN_rand
  174. * Sanity check size in TLSX_Parse catching a possible integer overflow
  175. * Fixes found with -fsanitize=undefined testing
  176. * Fix null dereferences or undefined memcpy calls
  177. * Fix alignment in myCryptoDevCb
  178. * Fix default DTLS context assignment
  179. * Added align configure option to force data alignment
  180. ###### Misc.
  181. * Fix for wolfSSL_ASN1_TIME_adj set length
  182. * Fix for freeing structure on error case in the function AddTrustedPeer
  183. * Return value of SSL_read when called after bidirectional shutdown
  184. * Fix for build options ./configure --enable-dtls --disable-asn
  185. * FIx for detection of a salt length from an RSA PSS signature
  186. * Fix to free up globalRNGMutex mutex when cleaning up global RNG
  187. * Fix leak when multiple hardware names are in SAN
  188. * Fix nonblocking ret value from CRL I/O callbacks
  189. * Fix wolfSSL_BIO_free_all return type to better match for compatibility layer
  190. * Fix for make distcheck, maintainer-clean, to allow distribution builds
  191. * Fix for async with fragmented packets
  192. * Fix for the build or RSA verify or public only
  193. * Fix for return value of wolfSSL_BIO_set_ssl to better match expected compatibility layer return value
  194. * Fix for sanity checks on size of issuer hash and key along with better freeing on error cases with DecodeBasicOcspResponse
  195. * Fix for potential memory leak with wolfSSL_OCSP_cert_to_id
  196. ### Improvements/Optimizations
  197. ###### DTLS/TLS Code Base
  198. * Improved TLS v1.3 time rollover support
  199. * TLS 1.3 PSK: use the hash algorithm to choose cipher suite
  200. * TLS Extended Master Secret ext: TLS13 - send in second Client Hello if in first
  201. * TLS Encrypt then MAC: check all padding bytes are the same value
  202. * wolfSSL_GetMaxRecordSize updated to now take additional cipher data into account
  203. * Updated session export/import with DTLS to handle a new internal options flag
  204. * Refactored dtls_expected_peer_handshake_number handling
  205. * Added wolfSSL_CTX_get_ephemeral_key and wolfSSL_get_ephemeral_key for loading a constant key in place of an ephemeral one
  206. * Improved checking of XSNPRINTF return value in DecodePolicyOID
  207. ###### Build Options and Warnings
  208. * Added wolfSSL_CTX_set_verify to the ABI list
  209. * Adjusted FP_ECC build to not allow SECP160R1, SECP160R2, SECP160K1 and SECP224K1. FP_ECC does not work with scalars that are the length of the order when the order is longer than the prime.
  210. * Added CMake support for CURVE25519, ED25519, CURVE448, and ED448
  211. * cmake addition to test paths when building
  212. * Added support for session tickets in CMake
  213. * Added support for reproducible builds with CMake
  214. * Turn on reproducible-build by default when enable-distro
  215. * Windows Project: Include the X448 and Ed448 files
  216. * GCC-11 compile time warning fixes
  217. * Fix for compiling build of ./configure '--disable-tlsv12' '-enable-pkcallbacks'
  218. * Added build error for insecure build combination of secure renegotiation enabled with extended master secret disabled when session resumption is enabled
  219. * Updated building and running with Apple M1
  220. * Apache httpd build without TLS 1.3 macro guard added
  221. * Enable SHA3 and SHAKE256 requirements automatically when ED448 is enabled
  222. * Added option for AES CBC cipher routines to return BAD_LENGTH_E when called with an input buffer length not a multiple of AES_BLOCK_SIZE
  223. * Macro WOLFSSL_SP_INT_DIGIT_ALIGN added for alignment on buffers with SP build. This was needed for compiler building on a Renesas board.
  224. * Build support with no hashes enabled an no RNG compiled in
  225. * Allow use of FREESCALE hardware RNG without a specific port
  226. * Resolved some warnings with Windows builds and PBKDF disabled
  227. * Updated the version of autoconf and automake along with fixes for some new GCC-10 warnings
  228. ###### Math Libraries
  229. * SP: Thumb implementation that works with clang
  230. * SP math all: sp_cmp handling of negative values
  231. * SP C ECC: mont sub - always normalize after sub before check for add
  232. * TFM math library prime checking, added more error checks with small stack build
  233. * Sanity checks on 0 value with GCD math function
  234. * fp_exptmod_ct error checking and small stack variable free on error
  235. * Sanity check on supported digit size when calling mp_add_d in non fastmath builds
  236. * Support for mp_dump with SP Math ALL
  237. * WOLFSSL_SP_NO_MALLOC for both the normal SP build and small SP build now
  238. * WOLFSSL_SP_NO_DYN_STACK added for SP small code that is not small stack build to avoid dynamic stack
  239. ###### PKCS 7/8
  240. * wc_PKCS7_DecodeCompressedData to optionally handle a packet without content wrapping
  241. * Added setting of content type parsed with PKCS7 wc_PKCS7_DecodeAuthEnvelopedData and wc_PKCS7_DecodeEnvelopedData
  242. * PKCS8 code improvements and refactoring
  243. ###### Misc.
  244. * Sanity checks on null inputs to the functions wolfSSL_X509_get_serialNumber and wolfSSL_X509_NAME_print_ex
  245. * Added ARM CryptoCell support for importing public key with wc_ecc_import_x963_ex()
  246. * Improved checking for possible use of key->dp == NULL cases with ECC functions
  247. * Updated SHAKE256 to compile with NIST FIPS 202 standard and added support for OID values (thanks to strongX509)
  248. * Improved ECC operations when using WOLFSSL_NO_MALLOC
  249. * Added WOLFSSL_SNIFFER_FATAL_ERROR for an return value when sniffer is in a fatal state
  250. * Allow parsing spaces in Base64_SkipNewline
  251. * Issue callback when exceeding depth limit rather than error out with OPENSSL_EXTRA build
  252. * Added NXP LTC RSA key generation acceleration
  253. For additional vulnerability information visit the vulnerability page at
  254. https://www.wolfssl.com/docs/security-vulnerabilities/
  255. See INSTALL file for build instructions.
  256. More info can be found on-line at https://wolfssl.com/wolfSSL/Docs.html
  257. *** Resources ***
  258. [wolfSSL Website](https://www.wolfssl.com/)
  259. [wolfSSL Wiki](https://github.com/wolfSSL/wolfssl/wiki)
  260. [FIPS FAQ](https://wolfssl.com/license/fips)
  261. [wolfSSL Documents](https://wolfssl.com/wolfSSL/Docs.html)
  262. [wolfSSL Manual](https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-toc.html)
  263. [wolfSSL API Reference]
  264. (https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-17-wolfssl-api-reference.html)
  265. [wolfCrypt API Reference]
  266. (https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-18-wolfcrypt-api-reference.html)
  267. [TLS 1.3](https://www.wolfssl.com/docs/tls13/)
  268. [wolfSSL Vulnerabilities]
  269. (https://www.wolfssl.com/docs/security-vulnerabilities/)
  270. Additional wolfSSL Examples](https://github.com/wolfssl/wolfssl-examples)