1039e02dfSJerome ForissierMbed TLS ChangeLog (Sorted per branch, date) 2039e02dfSJerome Forissier 3*32b31808SJens Wiklander= Mbed TLS 3.4.0 branch released 2023-03-28 4*32b31808SJens Wiklander 5*32b31808SJens WiklanderDefault behavior changes 6*32b31808SJens Wiklander * The default priority order of TLS 1.3 cipher suites has been modified to 7*32b31808SJens Wiklander follow the same rules as the TLS 1.2 cipher suites (see 8*32b31808SJens Wiklander ssl_ciphersuites.c). The preferred cipher suite is now 9*32b31808SJens Wiklander TLS_CHACHA20_POLY1305_SHA256. 10*32b31808SJens Wiklander 11*32b31808SJens WiklanderNew deprecations 12*32b31808SJens Wiklander * mbedtls_x509write_crt_set_serial() is now being deprecated in favor of 13*32b31808SJens Wiklander mbedtls_x509write_crt_set_serial_raw(). The goal here is to remove any 14*32b31808SJens Wiklander direct dependency of X509 on BIGNUM_C. 15*32b31808SJens Wiklander * PSA to mbedtls error translation is now unified in psa_util.h, 16*32b31808SJens Wiklander deprecating mbedtls_md_error_from_psa. Each file that performs error 17*32b31808SJens Wiklander translation should define its own version of PSA_TO_MBEDTLS_ERR, 18*32b31808SJens Wiklander optionally providing file-specific error pairs. Please see psa_util.h for 19*32b31808SJens Wiklander more details. 20*32b31808SJens Wiklander 21*32b31808SJens WiklanderFeatures 22*32b31808SJens Wiklander * Added partial support for parsing the PKCS #7 Cryptographic Message 23*32b31808SJens Wiklander Syntax, as defined in RFC 2315. Currently, support is limited to the 24*32b31808SJens Wiklander following: 25*32b31808SJens Wiklander - Only the signed-data content type, version 1 is supported. 26*32b31808SJens Wiklander - Only DER encoding is supported. 27*32b31808SJens Wiklander - Only a single digest algorithm per message is supported. 28*32b31808SJens Wiklander - Certificates must be in X.509 format. A message must have either 0 29*32b31808SJens Wiklander or 1 certificates. 30*32b31808SJens Wiklander - There is no support for certificate revocation lists. 31*32b31808SJens Wiklander - The authenticated and unauthenticated attribute fields of SignerInfo 32*32b31808SJens Wiklander must be empty. 33*32b31808SJens Wiklander Many thanks to Daniel Axtens, Nayna Jain, and Nick Child from IBM for 34*32b31808SJens Wiklander contributing this feature, and to Demi-Marie Obenour for contributing 35*32b31808SJens Wiklander various improvements, tests and bug fixes. 36*32b31808SJens Wiklander * General performance improvements by accessing multiple bytes at a time. 37*32b31808SJens Wiklander Fixes #1666. 38*32b31808SJens Wiklander * Improvements to use of unaligned and byte-swapped memory, reducing code 39*32b31808SJens Wiklander size and improving performance (depending on compiler and target 40*32b31808SJens Wiklander architecture). 41*32b31808SJens Wiklander * Add support for reading points in compressed format 42*32b31808SJens Wiklander (MBEDTLS_ECP_PF_COMPRESSED) with mbedtls_ecp_point_read_binary() 43*32b31808SJens Wiklander (and callers) for Short Weierstrass curves with prime p where p = 3 mod 4 44*32b31808SJens Wiklander (all mbedtls MBEDTLS_ECP_DP_SECP* and MBEDTLS_ECP_DP_BP* curves 45*32b31808SJens Wiklander except MBEDTLS_ECP_DP_SECP224R1 and MBEDTLS_ECP_DP_SECP224K1) 46*32b31808SJens Wiklander * SHA224_C/SHA384_C are now independent from SHA384_C/SHA512_C respectively. 47*32b31808SJens Wiklander This helps in saving code size when some of the above hashes are not 48*32b31808SJens Wiklander required. 49*32b31808SJens Wiklander * Add parsing of V3 extensions (key usage, Netscape cert-type, 50*32b31808SJens Wiklander Subject Alternative Names) in x509 Certificate Sign Requests. 51*32b31808SJens Wiklander * Use HOSTCC (if it is set) when compiling C code during generation of the 52*32b31808SJens Wiklander configuration-independent files. This allows them to be generated when 53*32b31808SJens Wiklander CC is set for cross compilation. 54*32b31808SJens Wiklander * Add parsing of uniformResourceIdentifier subtype for subjectAltName 55*32b31808SJens Wiklander extension in x509 certificates. 56*32b31808SJens Wiklander * Add an interruptible version of sign and verify hash to the PSA interface, 57*32b31808SJens Wiklander backed by internal library support for ECDSA signing and verification. 58*32b31808SJens Wiklander * Add parsing of rfc822Name subtype for subjectAltName 59*32b31808SJens Wiklander extension in x509 certificates. 60*32b31808SJens Wiklander * The configuration macros MBEDTLS_PSA_CRYPTO_PLATFORM_FILE and 61*32b31808SJens Wiklander MBEDTLS_PSA_CRYPTO_STRUCT_FILE specify alternative locations for 62*32b31808SJens Wiklander the headers "psa/crypto_platform.h" and "psa/crypto_struct.h". 63*32b31808SJens Wiklander * When a PSA driver for ECDSA is present, it is now possible to disable 64*32b31808SJens Wiklander MBEDTLS_ECDSA_C in the build in order to save code size. For PK, X.509 65*32b31808SJens Wiklander and TLS to fully work, this requires MBEDTLS_USE_PSA_CRYPTO to be enabled. 66*32b31808SJens Wiklander Restartable/interruptible ECDSA operations in PK, X.509 and TLS are not 67*32b31808SJens Wiklander supported in those builds yet, as driver support for interruptible ECDSA 68*32b31808SJens Wiklander operations is not present yet. 69*32b31808SJens Wiklander * Add a driver dispatch layer for EC J-PAKE, enabling alternative 70*32b31808SJens Wiklander implementations of EC J-PAKE through the driver entry points. 71*32b31808SJens Wiklander * Add new API mbedtls_ssl_cache_remove for cache entry removal by 72*32b31808SJens Wiklander its session id. 73*32b31808SJens Wiklander * Add support to include the SubjectAltName extension to a CSR. 74*32b31808SJens Wiklander * Add support for AES with the Armv8-A Cryptographic Extension on 75*32b31808SJens Wiklander 64-bit Arm. A new configuration option, MBEDTLS_AESCE_C, can 76*32b31808SJens Wiklander be used to enable this feature. Run-time detection is supported 77*32b31808SJens Wiklander under Linux only. 78*32b31808SJens Wiklander * When a PSA driver for EC J-PAKE is present, it is now possible to disable 79*32b31808SJens Wiklander MBEDTLS_ECJPAKE_C in the build in order to save code size. For the 80*32b31808SJens Wiklander corresponding TLS 1.2 key exchange to work, MBEDTLS_USE_PSA_CRYPTO needs 81*32b31808SJens Wiklander to be enabled. 82*32b31808SJens Wiklander * Add functions mbedtls_rsa_get_padding_mode() and mbedtls_rsa_get_md_alg() 83*32b31808SJens Wiklander to read non-public fields for padding mode and hash id from 84*32b31808SJens Wiklander an mbedtls_rsa_context, as requested in #6917. 85*32b31808SJens Wiklander * AES-NI is now supported with Visual Studio. 86*32b31808SJens Wiklander * AES-NI is now supported in 32-bit builds, or when MBEDTLS_HAVE_ASM 87*32b31808SJens Wiklander is disabled, when compiling with GCC or Clang or a compatible compiler 88*32b31808SJens Wiklander for a target CPU that supports the requisite instructions (for example 89*32b31808SJens Wiklander gcc -m32 -msse2 -maes -mpclmul). (Generic x86 builds with GCC-like 90*32b31808SJens Wiklander compilers still require MBEDTLS_HAVE_ASM and a 64-bit target.) 91*32b31808SJens Wiklander * It is now possible to use a PSA-held (opaque) password with the TLS 1.2 92*32b31808SJens Wiklander ECJPAKE key exchange, using the new API function 93*32b31808SJens Wiklander mbedtls_ssl_set_hs_ecjpake_password_opaque(). 94*32b31808SJens Wiklander 95*32b31808SJens WiklanderSecurity 96*32b31808SJens Wiklander * Use platform-provided secure zeroization function where possible, such as 97*32b31808SJens Wiklander explicit_bzero(). 98*32b31808SJens Wiklander * Zeroize SSL cache entries when they are freed. 99*32b31808SJens Wiklander * Fix a potential heap buffer overread in TLS 1.3 client-side when 100*32b31808SJens Wiklander MBEDTLS_DEBUG_C is enabled. This may result in an application crash. 101*32b31808SJens Wiklander * Add support for AES with the Armv8-A Cryptographic Extension on 64-bit 102*32b31808SJens Wiklander Arm, so that these systems are no longer vulnerable to timing side-channel 103*32b31808SJens Wiklander attacks. This is configured by MBEDTLS_AESCE_C, which is on by default. 104*32b31808SJens Wiklander Reported by Demi Marie Obenour. 105*32b31808SJens Wiklander * MBEDTLS_AESNI_C, which is enabled by default, was silently ignored on 106*32b31808SJens Wiklander builds that couldn't compile the GCC-style assembly implementation 107*32b31808SJens Wiklander (most notably builds with Visual Studio), leaving them vulnerable to 108*32b31808SJens Wiklander timing side-channel attacks. There is now an intrinsics-based AES-NI 109*32b31808SJens Wiklander implementation as a fallback for when the assembly one cannot be used. 110*32b31808SJens Wiklander 111*32b31808SJens WiklanderBugfix 112*32b31808SJens Wiklander * Fix possible integer overflow in mbedtls_timing_hardclock(), which 113*32b31808SJens Wiklander could cause a crash in programs/test/benchmark. 114*32b31808SJens Wiklander * Fix IAR compiler warnings. Fixes #6924. 115*32b31808SJens Wiklander * Fix a bug in the build where directory names containing spaces were 116*32b31808SJens Wiklander causing generate_errors.pl to error out resulting in a build failure. 117*32b31808SJens Wiklander Fixes issue #6879. 118*32b31808SJens Wiklander * In TLS 1.3, when using a ticket for session resumption, tweak its age 119*32b31808SJens Wiklander calculation on the client side. It prevents a server with more accurate 120*32b31808SJens Wiklander ticket timestamps (typically timestamps in milliseconds) compared to the 121*32b31808SJens Wiklander Mbed TLS ticket timestamps (in seconds) to compute a ticket age smaller 122*32b31808SJens Wiklander than the age computed and transmitted by the client and thus potentially 123*32b31808SJens Wiklander reject the ticket. Fix #6623. 124*32b31808SJens Wiklander * Fix compile error where MBEDTLS_RSA_C and MBEDTLS_X509_CRT_WRITE_C are 125*32b31808SJens Wiklander defined, but MBEDTLS_PK_RSA_ALT_SUPPORT is not defined. Fixes #3174. 126*32b31808SJens Wiklander * List PSA_WANT_ALG_CCM_STAR_NO_TAG in psa/crypto_config.h so that it can 127*32b31808SJens Wiklander be toggled with config.py. 128*32b31808SJens Wiklander * The key derivation algorithm PSA_ALG_TLS12_ECJPAKE_TO_PMS cannot be 129*32b31808SJens Wiklander used on a shared secret from a key agreement since its input must be 130*32b31808SJens Wiklander an ECC public key. Reject this properly. 131*32b31808SJens Wiklander * mbedtls_x509write_crt_set_serial() now explicitly rejects serial numbers 132*32b31808SJens Wiklander whose binary representation is longer than 20 bytes. This was already 133*32b31808SJens Wiklander forbidden by the standard (RFC5280 - section 4.1.2.2) and now it's being 134*32b31808SJens Wiklander enforced also at code level. 135*32b31808SJens Wiklander * Fix potential undefined behavior in mbedtls_mpi_sub_abs(). Reported by 136*32b31808SJens Wiklander Pascal Cuoq using TrustInSoft Analyzer in #6701; observed independently by 137*32b31808SJens Wiklander Aaron Ucko under Valgrind. 138*32b31808SJens Wiklander * Fix behavior of certain sample programs which could, when run with no 139*32b31808SJens Wiklander arguments, access uninitialized memory in some cases. Fixes #6700 (which 140*32b31808SJens Wiklander was found by TrustInSoft Analyzer during REDOCS'22) and #1120. 141*32b31808SJens Wiklander * Fix parsing of X.509 SubjectAlternativeName extension. Previously, 142*32b31808SJens Wiklander malformed alternative name components were not caught during initial 143*32b31808SJens Wiklander certificate parsing, but only on subsequent calls to 144*32b31808SJens Wiklander mbedtls_x509_parse_subject_alt_name(). Fixes #2838. 145*32b31808SJens Wiklander * Make the fields of mbedtls_pk_rsassa_pss_options public. This makes it 146*32b31808SJens Wiklander possible to verify RSA PSS signatures with the pk module, which was 147*32b31808SJens Wiklander inadvertently broken since Mbed TLS 3.0. 148*32b31808SJens Wiklander * Fix bug in conversion from OID to string in 149*32b31808SJens Wiklander mbedtls_oid_get_numeric_string(). OIDs such as 2.40.0.25 are now printed 150*32b31808SJens Wiklander correctly. 151*32b31808SJens Wiklander * Reject OIDs with overlong-encoded subidentifiers when converting 152*32b31808SJens Wiklander them to a string. 153*32b31808SJens Wiklander * Reject OIDs with subidentifier values exceeding UINT_MAX. Such 154*32b31808SJens Wiklander subidentifiers can be valid, but Mbed TLS cannot currently handle them. 155*32b31808SJens Wiklander * Reject OIDs that have unterminated subidentifiers, or (equivalently) 156*32b31808SJens Wiklander have the most-significant bit set in their last byte. 157*32b31808SJens Wiklander * Silence warnings from clang -Wdocumentation about empty \retval 158*32b31808SJens Wiklander descriptions, which started appearing with Clang 15. Fixes #6960. 159*32b31808SJens Wiklander * Fix the handling of renegotiation attempts in TLS 1.3. They are now 160*32b31808SJens Wiklander systematically rejected. 161*32b31808SJens Wiklander * Fix an unused-variable warning in TLS 1.3-only builds if 162*32b31808SJens Wiklander MBEDTLS_SSL_RENEGOTIATION was enabled. Fixes #6200. 163*32b31808SJens Wiklander * Fix undefined behavior in mbedtls_ssl_read() and mbedtls_ssl_write() if 164*32b31808SJens Wiklander len argument is 0 and buffer is NULL. 165*32b31808SJens Wiklander * Allow setting user and peer identifiers for EC J-PAKE operation 166*32b31808SJens Wiklander instead of role in PAKE PSA Crypto API as described in the specification. 167*32b31808SJens Wiklander This is a partial fix that allows only "client" and "server" identifiers. 168*32b31808SJens Wiklander * Fix a compilation error when PSA Crypto is built with support for 169*32b31808SJens Wiklander TLS12_PRF but not TLS12_PSK_TO_MS. Reported by joerchan in #7125. 170*32b31808SJens Wiklander * In the TLS 1.3 server, select the preferred client cipher suite, not the 171*32b31808SJens Wiklander least preferred. The selection error was introduced in Mbed TLS 3.3.0. 172*32b31808SJens Wiklander * Fix TLS 1.3 session resumption when the established pre-shared key is 173*32b31808SJens Wiklander 384 bits long. That is the length of pre-shared keys created under a 174*32b31808SJens Wiklander session where the cipher suite is TLS_AES_256_GCM_SHA384. 175*32b31808SJens Wiklander * Fix an issue when compiling with MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT 176*32b31808SJens Wiklander enabled, which required specifying compiler flags enabling SHA3 Crypto 177*32b31808SJens Wiklander Extensions, where some compilers would emit EOR3 instructions in other 178*32b31808SJens Wiklander modules, which would then fail if run on a CPU without the SHA3 179*32b31808SJens Wiklander extensions. Fixes #5758. 180*32b31808SJens Wiklander 181*32b31808SJens WiklanderChanges 182*32b31808SJens Wiklander * Install the .cmake files into CMAKE_INSTALL_LIBDIR/cmake/MbedTLS, 183*32b31808SJens Wiklander typically /usr/lib/cmake/MbedTLS. 184*32b31808SJens Wiklander * Mixed-endian systems are explicitly not supported any more. 185*32b31808SJens Wiklander * When MBEDTLS_USE_PSA_CRYPTO and MBEDTLS_ECDSA_DETERMINISTIC are both 186*32b31808SJens Wiklander defined, mbedtls_pk_sign() now use deterministic ECDSA for ECDSA 187*32b31808SJens Wiklander signatures. This aligns the behaviour with MBEDTLS_USE_PSA_CRYPTO to 188*32b31808SJens Wiklander the behaviour without it, where deterministic ECDSA was already used. 189*32b31808SJens Wiklander * Visual Studio: Rename the directory containing Visual Studio files from 190*32b31808SJens Wiklander visualc/VS2010 to visualc/VS2013 as we do not support building with versions 191*32b31808SJens Wiklander older than 2013. Update the solution file to specify VS2013 as a minimum. 192*32b31808SJens Wiklander * programs/x509/cert_write: 193*32b31808SJens Wiklander - now it accepts the serial number in 2 different formats: decimal and 194*32b31808SJens Wiklander hex. They cannot be used simultaneously 195*32b31808SJens Wiklander - "serial" is used for the decimal format and it's limted in size to 196*32b31808SJens Wiklander unsigned long long int 197*32b31808SJens Wiklander - "serial_hex" is used for the hex format; max length here is 198*32b31808SJens Wiklander MBEDTLS_X509_RFC5280_MAX_SERIAL_LEN*2 199*32b31808SJens Wiklander * The C code follows a new coding style. This is transparent for users but 200*32b31808SJens Wiklander affects contributors and maintainers of local patches. For more 201*32b31808SJens Wiklander information, see 202*32b31808SJens Wiklander https://mbed-tls.readthedocs.io/en/latest/kb/how-to/rewrite-branch-for-coding-style/ 203*32b31808SJens Wiklander * Changed the default MBEDTLS_ECP_WINDOW_SIZE from 6 to 2. 204*32b31808SJens Wiklander As tested in issue 6790, the correlation between this define and 205*32b31808SJens Wiklander RSA decryption performance has changed lately due to security fixes. 206*32b31808SJens Wiklander To fix the performance degradation when using default values the 207*32b31808SJens Wiklander window was reduced from 6 to 2, a value that gives the best or close 208*32b31808SJens Wiklander to best results when tested on Cortex-M4 and Intel i7. 209*32b31808SJens Wiklander * When enabling MBEDTLS_SHA256_USE_A64_CRYPTO_* or 210*32b31808SJens Wiklander MBEDTLS_SHA512_USE_A64_CRYPTO_*, it is no longer necessary to specify 211*32b31808SJens Wiklander compiler target flags on the command line; the library now sets target 212*32b31808SJens Wiklander options within the appropriate modules. 213*32b31808SJens Wiklander 214*32b31808SJens Wiklander= Mbed TLS 3.3.0 branch released 2022-12-14 215*32b31808SJens Wiklander 216*32b31808SJens WiklanderDefault behavior changes 217*32b31808SJens Wiklander * Previously the macro MBEDTLS_SSL_DTLS_CONNECTION_ID implemented version 05 218*32b31808SJens Wiklander of the IETF draft, and was marked experimental and disabled by default. 219*32b31808SJens Wiklander It is now no longer experimental, and implements the final version from 220*32b31808SJens Wiklander RFC 9146, which is not interoperable with the draft-05 version. 221*32b31808SJens Wiklander If you need to communicate with peers that use earlier versions of 222*32b31808SJens Wiklander Mbed TLS, then you need to define MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT 223*32b31808SJens Wiklander to 1, but then you won't be able to communicate with peers that use the 224*32b31808SJens Wiklander standard (non-draft) version. 225*32b31808SJens Wiklander If you need to interoperate with both classes of peers with the 226*32b31808SJens Wiklander same build of Mbed TLS, please let us know about your situation on the 227*32b31808SJens Wiklander mailing list or GitHub. 228*32b31808SJens Wiklander 229*32b31808SJens WiklanderRequirement changes 230*32b31808SJens Wiklander * When building with PSA drivers using generate_driver_wrappers.py, or 231*32b31808SJens Wiklander when building the library from the development branch rather than 232*32b31808SJens Wiklander from a release, the Python module jsonschema is now necessary, in 233*32b31808SJens Wiklander addition to jinja2. The official list of required Python modules is 234*32b31808SJens Wiklander maintained in scripts/basic.requirements.txt and may change again 235*32b31808SJens Wiklander in the future. 236*32b31808SJens Wiklander 237*32b31808SJens WiklanderNew deprecations 238*32b31808SJens Wiklander * Deprecate mbedtls_asn1_free_named_data(). 239*32b31808SJens Wiklander Use mbedtls_asn1_free_named_data_list() 240*32b31808SJens Wiklander or mbedtls_asn1_free_named_data_list_shallow(). 241*32b31808SJens Wiklander 242*32b31808SJens WiklanderFeatures 243*32b31808SJens Wiklander * Support rsa_pss_rsae_* signature algorithms in TLS 1.2. 244*32b31808SJens Wiklander * make: enable building unversioned shared library, with e.g.: 245*32b31808SJens Wiklander "SHARED=1 SOEXT_TLS=so SOEXT_X509=so SOEXT_CRYPTO=so make lib" 246*32b31808SJens Wiklander resulting in library names like "libmbedtls.so" rather than 247*32b31808SJens Wiklander "libmbedcrypto.so.11". 248*32b31808SJens Wiklander * Expose the EC J-PAKE functionality through the Draft PSA PAKE Crypto API. 249*32b31808SJens Wiklander Only the ECC primitive with secp256r1 curve and SHA-256 hash algorithm 250*32b31808SJens Wiklander are supported in this implementation. 251*32b31808SJens Wiklander * Some modules can now use PSA drivers for hashes, including with no 252*32b31808SJens Wiklander built-in implementation present, but only in some configurations. 253*32b31808SJens Wiklander - RSA OAEP and PSS (PKCS#1 v2.1), PKCS5, PKCS12 and EC J-PAKE now use 254*32b31808SJens Wiklander hashes from PSA when (and only when) MBEDTLS_MD_C is disabled. 255*32b31808SJens Wiklander - PEM parsing of encrypted files now uses MD-5 from PSA when (and only 256*32b31808SJens Wiklander when) MBEDTLS_MD5_C is disabled. 257*32b31808SJens Wiklander See the documentation of the corresponding macros in mbedtls_config.h for 258*32b31808SJens Wiklander details. 259*32b31808SJens Wiklander Note that some modules are not able to use hashes from PSA yet, including 260*32b31808SJens Wiklander the entropy module. As a consequence, for now the only way to build with 261*32b31808SJens Wiklander all hashes only provided by drivers (no built-in hash) is to use 262*32b31808SJens Wiklander MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG. 263*32b31808SJens Wiklander * When MBEDTLS_USE_PSA_CRYPTO is enabled, X.509, TLS 1.2 and TLS 1.3 now 264*32b31808SJens Wiklander properly negotiate/accept hashes based on their availability in PSA. 265*32b31808SJens Wiklander As a consequence, they now work in configurations where the built-in 266*32b31808SJens Wiklander implementations of (some) hashes are excluded and those hashes are only 267*32b31808SJens Wiklander provided by PSA drivers. (See previous entry for limitation on RSA-PSS 268*32b31808SJens Wiklander though: that module only use hashes from PSA when MBEDTLS_MD_C is off). 269*32b31808SJens Wiklander * Add support for opaque keys as the private keys associated to certificates 270*32b31808SJens Wiklander for authentication in TLS 1.3. 271*32b31808SJens Wiklander * Add the LMS post-quantum-safe stateful-hash asymmetric signature scheme. 272*32b31808SJens Wiklander Signature verification is production-ready, but generation is for testing 273*32b31808SJens Wiklander purposes only. This currently only supports one parameter set 274*32b31808SJens Wiklander (LMS_SHA256_M32_H10), meaning that each private key can be used to sign 275*32b31808SJens Wiklander 1024 messages. As such, it is not intended for use in TLS, but instead 276*32b31808SJens Wiklander for verification of assets transmitted over an insecure channel, 277*32b31808SJens Wiklander particularly firmware images. 278*32b31808SJens Wiklander * Add the LM-OTS post-quantum-safe one-time signature scheme, which is 279*32b31808SJens Wiklander required for LMS. This can be used independently, but each key can only 280*32b31808SJens Wiklander be used to sign one message so is impractical for most circumstances. 281*32b31808SJens Wiklander * Mbed TLS now supports TLS 1.3 key establishment via pre-shared keys. 282*32b31808SJens Wiklander The pre-shared keys can be provisioned externally or via the ticket 283*32b31808SJens Wiklander mechanism (session resumption). 284*32b31808SJens Wiklander The ticket mechanism is supported when the configuration option 285*32b31808SJens Wiklander MBEDTLS_SSL_SESSION_TICKETS is enabled. 286*32b31808SJens Wiklander New options MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_xxx_ENABLED 287*32b31808SJens Wiklander control the support for the three possible TLS 1.3 key exchange modes. 288*32b31808SJens Wiklander * cert_write: support for setting extended key usage attributes. A 289*32b31808SJens Wiklander corresponding new public API call has been added in the library, 290*32b31808SJens Wiklander mbedtls_x509write_crt_set_ext_key_usage(). 291*32b31808SJens Wiklander * cert_write: support for writing certificate files in either PEM 292*32b31808SJens Wiklander or DER format. 293*32b31808SJens Wiklander * The PSA driver wrapper generator generate_driver_wrappers.py now 294*32b31808SJens Wiklander supports a subset of the driver description language, including 295*32b31808SJens Wiklander the following entry points: import_key, export_key, export_public_key, 296*32b31808SJens Wiklander get_builtin_key, copy_key. 297*32b31808SJens Wiklander * The new functions mbedtls_asn1_free_named_data_list() and 298*32b31808SJens Wiklander mbedtls_asn1_free_named_data_list_shallow() simplify the management 299*32b31808SJens Wiklander of memory in named data lists in X.509 structures. 300*32b31808SJens Wiklander * The TLS 1.2 EC J-PAKE key exchange can now use the PSA Crypto API. 301*32b31808SJens Wiklander Additional PSA key slots will be allocated in the process of such key 302*32b31808SJens Wiklander exchange for builds that enable MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED and 303*32b31808SJens Wiklander MBEDTLS_USE_PSA_CRYPTO. 304*32b31808SJens Wiklander * Add support for DTLS Connection ID as defined by RFC 9146, controlled by 305*32b31808SJens Wiklander MBEDTLS_SSL_DTLS_CONNECTION_ID (enabled by default) and configured with 306*32b31808SJens Wiklander mbedtls_ssl_set_cid(). 307*32b31808SJens Wiklander * Add a driver dispatch layer for raw key agreement, enabling alternative 308*32b31808SJens Wiklander implementations of raw key agreement through the key_agreement driver 309*32b31808SJens Wiklander entry point. This entry point is specified in the proposed PSA driver 310*32b31808SJens Wiklander interface, but had not yet been implemented. 311*32b31808SJens Wiklander * Add an ad-hoc key derivation function handling EC J-PAKE to PMS 312*32b31808SJens Wiklander calculation that can be used to derive the session secret in TLS 1.2, 313*32b31808SJens Wiklander as described in draft-cragie-tls-ecjpake-01. This can be achieved by 314*32b31808SJens Wiklander using PSA_ALG_TLS12_ECJPAKE_TO_PMS as the key derivation algorithm. 315*32b31808SJens Wiklander 316*32b31808SJens WiklanderSecurity 317*32b31808SJens Wiklander * Fix potential heap buffer overread and overwrite in DTLS if 318*32b31808SJens Wiklander MBEDTLS_SSL_DTLS_CONNECTION_ID is enabled and 319*32b31808SJens Wiklander MBEDTLS_SSL_CID_IN_LEN_MAX > 2 * MBEDTLS_SSL_CID_OUT_LEN_MAX. 320*32b31808SJens Wiklander * Fix an issue where an adversary with access to precise enough information 321*32b31808SJens Wiklander about memory accesses (typically, an untrusted operating system attacking 322*32b31808SJens Wiklander a secure enclave) could recover an RSA private key after observing the 323*32b31808SJens Wiklander victim performing a single private-key operation if the window size used 324*32b31808SJens Wiklander for the exponentiation was 3 or smaller. Found and reported by Zili KOU, 325*32b31808SJens Wiklander Wenjian HE, Sharad Sinha, and Wei ZHANG. See "Cache Side-channel Attacks 326*32b31808SJens Wiklander and Defenses of the Sliding Window Algorithm in TEEs" - Design, Automation 327*32b31808SJens Wiklander and Test in Europe 2023. 328*32b31808SJens Wiklander 329*32b31808SJens WiklanderBugfix 330*32b31808SJens Wiklander * Refactor mbedtls_aes_context to support shallow-copying. Fixes #2147. 331*32b31808SJens Wiklander * Fix an issue with in-tree CMake builds in releases with GEN_FILES 332*32b31808SJens Wiklander turned off: if a shipped file was missing from the working directory, 333*32b31808SJens Wiklander it could be turned into a symbolic link to itself. 334*32b31808SJens Wiklander * Fix a long-standing build failure when building x86 PIC code with old 335*32b31808SJens Wiklander gcc (4.x). The code will be slower, but will compile. We do however 336*32b31808SJens Wiklander recommend upgrading to a more recent compiler instead. Fixes #1910. 337*32b31808SJens Wiklander * Fix support for little-endian Microblaze when MBEDTLS_HAVE_ASM is defined. 338*32b31808SJens Wiklander Contributed by Kazuyuki Kimura to fix #2020. 339*32b31808SJens Wiklander * Use double quotes to include private header file psa_crypto_cipher.h. 340*32b31808SJens Wiklander Fixes 'file not found with <angled> include' error 341*32b31808SJens Wiklander when building with Xcode. 342*32b31808SJens Wiklander * Fix handling of broken symlinks when loading certificates using 343*32b31808SJens Wiklander mbedtls_x509_crt_parse_path(). Instead of returning an error as soon as a 344*32b31808SJens Wiklander broken link is encountered, skip the broken link and continue parsing 345*32b31808SJens Wiklander other certificate files. Contributed by Eduardo Silva in #2602. 346*32b31808SJens Wiklander * Fix an interoperability failure between an Mbed TLS client with both 347*32b31808SJens Wiklander TLS 1.2 and TLS 1.3 support, and a TLS 1.2 server that supports 348*32b31808SJens Wiklander rsa_pss_rsae_* signature algorithms. This failed because Mbed TLS 349*32b31808SJens Wiklander advertised support for PSS in both TLS 1.2 and 1.3, but only 350*32b31808SJens Wiklander actually supported PSS in TLS 1.3. 351*32b31808SJens Wiklander * Fix a compilation error when using CMake with an IAR toolchain. 352*32b31808SJens Wiklander Fixes #5964. 353*32b31808SJens Wiklander * Fix a build error due to a missing prototype warning when 354*32b31808SJens Wiklander MBEDTLS_DEPRECATED_REMOVED is enabled. 355*32b31808SJens Wiklander * Fix mbedtls_ctr_drbg_free() on an initialized but unseeded context. When 356*32b31808SJens Wiklander MBEDTLS_AES_ALT is enabled, it could call mbedtls_aes_free() on an 357*32b31808SJens Wiklander uninitialized context. 358*32b31808SJens Wiklander * Fix a build issue on Windows using CMake where the source and build 359*32b31808SJens Wiklander directories could not be on different drives. Fixes #5751. 360*32b31808SJens Wiklander * Fix bugs and missing dependencies when building and testing 361*32b31808SJens Wiklander configurations with only one encryption type enabled in TLS 1.2. 362*32b31808SJens Wiklander * Provide the missing definition of mbedtls_setbuf() in some configurations 363*32b31808SJens Wiklander with MBEDTLS_PLATFORM_C disabled. Fixes #6118, #6196. 364*32b31808SJens Wiklander * Fix compilation errors when trying to build with 365*32b31808SJens Wiklander PSA drivers for AEAD (GCM, CCM, Chacha20-Poly1305). 366*32b31808SJens Wiklander * Fix memory leak in ssl_parse_certificate_request() caused by 367*32b31808SJens Wiklander mbedtls_x509_get_name() not freeing allocated objects in case of error. 368*32b31808SJens Wiklander Change mbedtls_x509_get_name() to clean up allocated objects on error. 369*32b31808SJens Wiklander * Fix build failure with MBEDTLS_RSA_C and MBEDTLS_PSA_CRYPTO_C but not 370*32b31808SJens Wiklander MBEDTLS_USE_PSA_CRYPTO or MBEDTLS_PK_WRITE_C. Fixes #6408. 371*32b31808SJens Wiklander * Fix build failure with MBEDTLS_RSA_C and MBEDTLS_PSA_CRYPTO_C but not 372*32b31808SJens Wiklander MBEDTLS_PK_PARSE_C. Fixes #6409. 373*32b31808SJens Wiklander * Fix ECDSA verification, where it was not always validating the 374*32b31808SJens Wiklander public key. This bug meant that it was possible to verify a 375*32b31808SJens Wiklander signature with an invalid public key, in some cases. Reported by 376*32b31808SJens Wiklander Guido Vranken using Cryptofuzz in #4420. 377*32b31808SJens Wiklander * Fix a possible null pointer dereference if a memory allocation fails 378*32b31808SJens Wiklander in TLS PRF code. Reported by Michael Madsen in #6516. 379*32b31808SJens Wiklander * Fix TLS 1.3 session resumption. Fixes #6488. 380*32b31808SJens Wiklander * Add a configuration check to exclude optional client authentication 381*32b31808SJens Wiklander in TLS 1.3 (where it is forbidden). 382*32b31808SJens Wiklander * Fix a bug in which mbedtls_x509_crt_info() would produce non-printable 383*32b31808SJens Wiklander bytes when parsing certificates containing a binary RFC 4108 384*32b31808SJens Wiklander HardwareModuleName as a Subject Alternative Name extension. Hardware 385*32b31808SJens Wiklander serial numbers are now rendered in hex format. Fixes #6262. 386*32b31808SJens Wiklander * Fix bug in error reporting in dh_genprime.c where upon failure, 387*32b31808SJens Wiklander the error code returned by mbedtls_mpi_write_file() is overwritten 388*32b31808SJens Wiklander and therefore not printed. 389*32b31808SJens Wiklander * In the bignum module, operations of the form (-A) - (+A) or (-A) - (-A) 390*32b31808SJens Wiklander with A > 0 created an unintended representation of the value 0 which was 391*32b31808SJens Wiklander not processed correctly by some bignum operations. Fix this. This had no 392*32b31808SJens Wiklander consequence on cryptography code, but might affect applications that call 393*32b31808SJens Wiklander bignum directly and use negative numbers. 394*32b31808SJens Wiklander * Fix a bug whereby the list of signature algorithms sent as part of 395*32b31808SJens Wiklander the TLS 1.2 server certificate request would get corrupted, meaning the 396*32b31808SJens Wiklander first algorithm would not get sent and an entry consisting of two random 397*32b31808SJens Wiklander bytes would be sent instead. Found by Serban Bejan and Dudek Sebastian. 398*32b31808SJens Wiklander * Fix undefined behavior (typically harmless in practice) of 399*32b31808SJens Wiklander mbedtls_mpi_add_mpi(), mbedtls_mpi_add_abs() and mbedtls_mpi_add_int() 400*32b31808SJens Wiklander when both operands are 0 and the left operand is represented with 0 limbs. 401*32b31808SJens Wiklander * Fix undefined behavior (typically harmless in practice) when some bignum 402*32b31808SJens Wiklander functions receive the most negative value of mbedtls_mpi_sint. Credit 403*32b31808SJens Wiklander to OSS-Fuzz. Fixes #6597. 404*32b31808SJens Wiklander * Fix undefined behavior (typically harmless in practice) in PSA ECB 405*32b31808SJens Wiklander encryption and decryption. 406*32b31808SJens Wiklander * Move some SSL-specific code out of libmbedcrypto where it had been placed 407*32b31808SJens Wiklander accidentally. 408*32b31808SJens Wiklander * Fix a build error when compiling the bignum module for some Arm platforms. 409*32b31808SJens Wiklander Fixes #6089, #6124, #6217. 410*32b31808SJens Wiklander 411*32b31808SJens WiklanderChanges 412*32b31808SJens Wiklander * Add the ability to query PSA_WANT_xxx macros to query_compile_time_config. 413*32b31808SJens Wiklander * Calling AEAD tag-specific functions for non-AEAD algorithms (which 414*32b31808SJens Wiklander should not be done - they are documented for use only by AES-GCM and 415*32b31808SJens Wiklander ChaCha20+Poly1305) now returns MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE 416*32b31808SJens Wiklander instead of success (0). 417*32b31808SJens Wiklander 418*32b31808SJens Wiklander= Mbed TLS 3.2.1 branch released 2022-07-12 419*32b31808SJens Wiklander 420*32b31808SJens WiklanderBugfix 421*32b31808SJens Wiklander * Re-add missing generated file library/psa_crypto_driver_wrappers.c 422*32b31808SJens Wiklander 423*32b31808SJens Wiklander= Mbed TLS 3.2.0 branch released 2022-07-11 424039e02dfSJerome Forissier 425039e02dfSJerome ForissierDefault behavior changes 426039e02dfSJerome Forissier * mbedtls_cipher_set_iv will now fail with ChaCha20 and ChaCha20+Poly1305 427039e02dfSJerome Forissier for IV lengths other than 12. The library was silently overwriting this 428039e02dfSJerome Forissier length with 12, but did not inform the caller about it. Fixes #4301. 429039e02dfSJerome Forissier 430*32b31808SJens WiklanderRequirement changes 431*32b31808SJens Wiklander * The library will no longer compile out of the box on a platform without 432*32b31808SJens Wiklander setbuf(). If your platform does not have setbuf(), you can configure an 433*32b31808SJens Wiklander alternative function by enabling MBEDTLS_PLATFORM_SETBUF_ALT or 434*32b31808SJens Wiklander MBEDTLS_PLATFORM_SETBUF_MACRO. 435*32b31808SJens Wiklander 436*32b31808SJens WiklanderNew deprecations 437*32b31808SJens Wiklander * Deprecate mbedtls_ssl_conf_max_version() and 438*32b31808SJens Wiklander mbedtls_ssl_conf_min_version() in favor of 439*32b31808SJens Wiklander mbedtls_ssl_conf_max_tls_version() and 440*32b31808SJens Wiklander mbedtls_ssl_conf_min_tls_version(). 441*32b31808SJens Wiklander * Deprecate mbedtls_cipher_setup_psa(). Use psa_aead_xxx() or 442*32b31808SJens Wiklander psa_cipher_xxx() directly instead. 443*32b31808SJens Wiklander * Secure element drivers enabled by MBEDTLS_PSA_CRYPTO_SE_C are deprecated. 444*32b31808SJens Wiklander This was intended as an experimental feature, but had not been explicitly 445*32b31808SJens Wiklander documented as such. Use opaque drivers with the interface enabled by 446*32b31808SJens Wiklander MBEDTLS_PSA_CRYPTO_DRIVERS instead. 447*32b31808SJens Wiklander * Deprecate mbedtls_ssl_conf_sig_hashes() in favor of the more generic 448*32b31808SJens Wiklander mbedtls_ssl_conf_sig_algs(). Signature algorithms for the TLS 1.2 and 449*32b31808SJens Wiklander TLS 1.3 handshake should now be configured with 450*32b31808SJens Wiklander mbedtls_ssl_conf_sig_algs(). 451*32b31808SJens Wiklander 452039e02dfSJerome ForissierFeatures 453*32b31808SJens Wiklander * Add accessor to obtain ciphersuite id from ssl context. 454*32b31808SJens Wiklander * Add accessors to get members from ciphersuite info. 455*32b31808SJens Wiklander * Add mbedtls_ssl_ticket_rotate() for external ticket rotation. 456*32b31808SJens Wiklander * Add accessor to get the raw buffer pointer from a PEM context. 457*32b31808SJens Wiklander * The structures mbedtls_ssl_config and mbedtls_ssl_context now store 458*32b31808SJens Wiklander a piece of user data which is reserved for the application. The user 459*32b31808SJens Wiklander data can be either a pointer or an integer. 460*32b31808SJens Wiklander * Add an accessor function to get the configuration associated with 461*32b31808SJens Wiklander an SSL context. 462*32b31808SJens Wiklander * Add a function to access the protocol version from an SSL context in a 463*32b31808SJens Wiklander form that's easy to compare. Fixes #5407. 464*32b31808SJens Wiklander * Add function mbedtls_md_info_from_ctx() to recall the message digest 465*32b31808SJens Wiklander information that was used to set up a message digest context. 466*32b31808SJens Wiklander * Add ALPN support in TLS 1.3 clients. 467*32b31808SJens Wiklander * Add server certificate selection callback near end of Client Hello. 468*32b31808SJens Wiklander Register callback with mbedtls_ssl_conf_cert_cb(). 469*32b31808SJens Wiklander * Provide mechanism to reset handshake cert list by calling 470*32b31808SJens Wiklander mbedtls_ssl_set_hs_own_cert() with NULL value for own_cert param. 471*32b31808SJens Wiklander * Add accessor mbedtls_ssl_get_hs_sni() to retrieve SNI from within 472*32b31808SJens Wiklander cert callback (mbedtls_ssl_conf_cert_cb()) during handshake. 473*32b31808SJens Wiklander * The X.509 module now uses PSA hash acceleration if present. 474*32b31808SJens Wiklander * Add support for psa crypto key derivation for elliptic curve 475*32b31808SJens Wiklander keys. Fixes #3260. 476*32b31808SJens Wiklander * Add function mbedtls_timing_get_final_delay() to access the private 477*32b31808SJens Wiklander final delay field in an mbedtls_timing_delay_context, as requested in 478*32b31808SJens Wiklander #5183. 479*32b31808SJens Wiklander * Add mbedtls_pk_sign_ext() which allows generating RSA-PSS signatures when 480*32b31808SJens Wiklander PSA Crypto is enabled. 481*32b31808SJens Wiklander * Add function mbedtls_ecp_export() to export ECP key pair parameters. 482*32b31808SJens Wiklander Fixes #4838. 483*32b31808SJens Wiklander * Add function mbedtls_ssl_is_handshake_over() to enable querying if the SSL 484*32b31808SJens Wiklander Handshake has completed or not, and thus whether to continue calling 485*32b31808SJens Wiklander mbedtls_ssl_handshake_step(), requested in #4383. 486*32b31808SJens Wiklander * Add the function mbedtls_ssl_get_own_cid() to access our own connection id 487*32b31808SJens Wiklander within mbedtls_ssl_context, as requested in #5184. 488*32b31808SJens Wiklander * Introduce mbedtls_ssl_hs_cb_t typedef for use with 489*32b31808SJens Wiklander mbedtls_ssl_conf_cert_cb() and perhaps future callbacks 490*32b31808SJens Wiklander during TLS handshake. 491*32b31808SJens Wiklander * Add functions mbedtls_ssl_conf_max_tls_version() and 492*32b31808SJens Wiklander mbedtls_ssl_conf_min_tls_version() that use a single value to specify 493*32b31808SJens Wiklander the protocol version. 494*32b31808SJens Wiklander * Extend the existing PSA_ALG_TLS12_PSK_TO_MS() algorithm to support 495*32b31808SJens Wiklander mixed-PSK. Add an optional input PSA_KEY_DERIVATION_INPUT_OTHER_SECRET 496*32b31808SJens Wiklander holding the other secret. 497039e02dfSJerome Forissier * When MBEDTLS_PSA_CRYPTO_CONFIG is enabled, you may list the PSA crypto 498039e02dfSJerome Forissier feature requirements in the file named by the new macro 499039e02dfSJerome Forissier MBEDTLS_PSA_CRYPTO_CONFIG_FILE instead of the default psa/crypto_config.h. 500039e02dfSJerome Forissier Furthermore you may name an additional file to include after the main 501039e02dfSJerome Forissier file with the macro MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE. 502*32b31808SJens Wiklander * Add the function mbedtls_x509_crt_has_ext_type() to access the ext types 503*32b31808SJens Wiklander field within mbedtls_x509_crt context, as requested in #5585. 504*32b31808SJens Wiklander * Add HKDF-Expand and HKDF-Extract as separate algorithms in the PSA API. 505*32b31808SJens Wiklander * Add support for the ARMv8 SHA-2 acceleration instructions when building 506*32b31808SJens Wiklander for Aarch64. 507*32b31808SJens Wiklander * Add support for authentication of TLS 1.3 clients by TLS 1.3 servers. 508*32b31808SJens Wiklander * Add support for server HelloRetryRequest message. The TLS 1.3 client is 509*32b31808SJens Wiklander now capable of negotiating another shared secret if the one sent in its 510*32b31808SJens Wiklander first ClientHello was not suitable to the server. 511*32b31808SJens Wiklander * Add support for client-side TLS version negotiation. If both TLS 1.2 and 512*32b31808SJens Wiklander TLS 1.3 protocols are enabled in the build of Mbed TLS, the TLS client now 513*32b31808SJens Wiklander negotiates TLS 1.3 or TLS 1.2 with TLS servers. 514*32b31808SJens Wiklander * Enable building of Mbed TLS with TLS 1.3 protocol support but without TLS 515*32b31808SJens Wiklander 1.2 protocol support. 516*32b31808SJens Wiklander * Mbed TLS provides an implementation of a TLS 1.3 server (ephemeral key 517*32b31808SJens Wiklander establishment only). See docs/architecture/tls13-support.md for a 518*32b31808SJens Wiklander description of the support. The MBEDTLS_SSL_PROTO_TLS1_3 and 519*32b31808SJens Wiklander MBEDTLS_SSL_SRV_C configuration options control this. 520*32b31808SJens Wiklander * Add accessors to configure DN hints for certificate request: 521*32b31808SJens Wiklander mbedtls_ssl_conf_dn_hints() and mbedtls_ssl_set_hs_dn_hints() 522*32b31808SJens Wiklander * The configuration option MBEDTLS_USE_PSA_CRYPTO, which previously 523*32b31808SJens Wiklander affected only a limited subset of crypto operations in TLS, X.509 and PK, 524*32b31808SJens Wiklander now causes most of them to be done using PSA Crypto; see 525*32b31808SJens Wiklander docs/use-psa-crypto.md for the list of exceptions. 526*32b31808SJens Wiklander * The function mbedtls_pk_setup_opaque() now supports RSA key pairs as well. 527*32b31808SJens Wiklander Opaque keys can now be used everywhere a private key is expected in the 528*32b31808SJens Wiklander TLS and X.509 modules. 529*32b31808SJens Wiklander * Opaque pre-shared keys for TLS, provisioned with 530*32b31808SJens Wiklander mbedtls_ssl_conf_psk_opaque() or mbedtls_ssl_set_hs_psk_opaque(), which 531*32b31808SJens Wiklander previously only worked for "pure" PSK key exchange, now can also be used 532*32b31808SJens Wiklander for the "mixed" PSK key exchanges as well: ECDHE-PSK, DHE-PSK, RSA-PSK. 533*32b31808SJens Wiklander * cmake now detects if it is being built as a sub-project, and in that case 534*32b31808SJens Wiklander disables the target export/installation and package configuration. 535*32b31808SJens Wiklander * Make USE_PSA_CRYPTO compatible with KEY_ID_ENCODES_OWNER. Fixes #5259. 536*32b31808SJens Wiklander * Add example programs cipher_aead_demo.c, md_hmac_demo.c, aead_demo.c 537*32b31808SJens Wiklander and hmac_demo.c, which use PSA and the md/cipher interfaces side 538*32b31808SJens Wiklander by side in order to illustrate how the operation is performed in PSA. 539*32b31808SJens Wiklander Addresses #5208. 540039e02dfSJerome Forissier 541039e02dfSJerome ForissierSecurity 542039e02dfSJerome Forissier * Zeroize dynamically-allocated buffers used by the PSA Crypto key storage 543039e02dfSJerome Forissier module before freeing them. These buffers contain secret key material, and 544039e02dfSJerome Forissier could thus potentially leak the key through freed heap. 545*32b31808SJens Wiklander * Fix potential memory leak inside mbedtls_ssl_cache_set() with 546*32b31808SJens Wiklander an invalid session id length. 547*32b31808SJens Wiklander * Add the platform function mbedtls_setbuf() to allow buffering to be 548*32b31808SJens Wiklander disabled on stdio files, to stop secrets loaded from said files being 549*32b31808SJens Wiklander potentially left in memory after file operations. Reported by 550*32b31808SJens Wiklander Glenn Strauss. 551039e02dfSJerome Forissier * Fix a potential heap buffer overread in TLS 1.2 server-side when 552039e02dfSJerome Forissier MBEDTLS_USE_PSA_CRYPTO is enabled, an opaque key (created with 553039e02dfSJerome Forissier mbedtls_pk_setup_opaque()) is provisioned, and a static ECDH ciphersuite 554039e02dfSJerome Forissier is selected. This may result in an application crash or potentially an 555039e02dfSJerome Forissier information leak. 556039e02dfSJerome Forissier * Fix a buffer overread in DTLS ClientHello parsing in servers with 557039e02dfSJerome Forissier MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE enabled. An unauthenticated client 558039e02dfSJerome Forissier or a man-in-the-middle could cause a DTLS server to read up to 255 bytes 559039e02dfSJerome Forissier after the end of the SSL input buffer. The buffer overread only happens 560039e02dfSJerome Forissier when MBEDTLS_SSL_IN_CONTENT_LEN is less than a threshold that depends on 561039e02dfSJerome Forissier the exact configuration: 258 bytes if using mbedtls_ssl_cookie_check(), 562039e02dfSJerome Forissier and possibly up to 571 bytes with a custom cookie check function. 563039e02dfSJerome Forissier Reported by the Cybeats PSI Team. 564*32b31808SJens Wiklander * Fix a buffer overread in TLS 1.3 Certificate parsing. An unauthenticated 565*32b31808SJens Wiklander client or server could cause an MbedTLS server or client to overread up 566*32b31808SJens Wiklander to 64 kBytes of data and potentially overread the input buffer by that 567*32b31808SJens Wiklander amount minus the size of the input buffer. As overread data undergoes 568*32b31808SJens Wiklander various checks, the likelihood of reaching the boundary of the input 569*32b31808SJens Wiklander buffer is rather small but increases as its size 570*32b31808SJens Wiklander MBEDTLS_SSL_IN_CONTENT_LEN decreases. 571*32b31808SJens Wiklander * Fix check of certificate key usage in TLS 1.3. The usage of the public key 572*32b31808SJens Wiklander provided by a client or server certificate for authentication was not 573*32b31808SJens Wiklander checked properly when validating the certificate. This could cause a 574*32b31808SJens Wiklander client or server to be able to authenticate itself through a certificate 575*32b31808SJens Wiklander to an Mbed TLS TLS 1.3 server or client while it does not own a proper 576*32b31808SJens Wiklander certificate to do so. 577039e02dfSJerome Forissier 578039e02dfSJerome ForissierBugfix 579*32b31808SJens Wiklander * Declare or use PSA_WANT_ALG_CCM_STAR_NO_TAG following the general 580*32b31808SJens Wiklander pattern for PSA_WANT_xxx symbols. Previously you had to specify 581*32b31808SJens Wiklander PSA_WANT_ALG_CCM for PSA_ALG_CCM_STAR_NO_TAG. 582039e02dfSJerome Forissier * Fix a memory leak if mbedtls_ssl_config_defaults() is called twice. 583*32b31808SJens Wiklander * Fixed swap of client and server random bytes when exporting them alongside 584*32b31808SJens Wiklander TLS 1.3 handshake and application traffic secret. 585039e02dfSJerome Forissier * Fix several bugs (warnings, compiler and linker errors, test failures) 586039e02dfSJerome Forissier in reduced configurations when MBEDTLS_USE_PSA_CRYPTO is enabled. 587039e02dfSJerome Forissier * Fix a bug in (D)TLS curve negotiation: when MBEDTLS_USE_PSA_CRYPTO was 588039e02dfSJerome Forissier enabled and an ECDHE-ECDSA or ECDHE-RSA key exchange was used, the 589039e02dfSJerome Forissier client would fail to check that the curve selected by the server for 590039e02dfSJerome Forissier ECDHE was indeed one that was offered. As a result, the client would 591039e02dfSJerome Forissier accept any curve that it supported, even if that curve was not allowed 592039e02dfSJerome Forissier according to its configuration. Fixes #5291. 593*32b31808SJens Wiklander * The TLS 1.3 implementation is now compatible with the 594*32b31808SJens Wiklander MBEDTLS_USE_PSA_CRYPTO configuration option. 595039e02dfSJerome Forissier * Fix unit tests that used 0 as the file UID. This failed on some 596039e02dfSJerome Forissier implementations of PSA ITS. Fixes #3838. 597*32b31808SJens Wiklander * Fix mbedtls_ssl_get_version() not reporting TLSv1.3. Fixes #5406. 598039e02dfSJerome Forissier * Fix API violation in mbedtls_md_process() test by adding a call to 599039e02dfSJerome Forissier mbedtls_md_starts(). Fixes #2227. 600039e02dfSJerome Forissier * Fix compile errors when MBEDTLS_HAVE_TIME is not defined. Add tests 601039e02dfSJerome Forissier to catch bad uses of time.h. 602*32b31808SJens Wiklander * Fix a race condition in out-of-source builds with CMake when generated data 603*32b31808SJens Wiklander files are already present. Fixes #5374. 604039e02dfSJerome Forissier * Fix the library search path when building a shared library with CMake 605039e02dfSJerome Forissier on Windows. 606039e02dfSJerome Forissier * Fix bug in the alert sending function mbedtls_ssl_send_alert_message() 607039e02dfSJerome Forissier potentially leading to corrupted alert messages being sent in case 608039e02dfSJerome Forissier the function needs to be re-called after initially returning 609039e02dfSJerome Forissier MBEDTLS_SSL_WANT_WRITE. Fixes #1916. 610*32b31808SJens Wiklander * In configurations with MBEDTLS_SSL_DTLS_CONNECTION_ID enabled but not 611*32b31808SJens Wiklander MBEDTLS_DEBUG_C, DTLS handshakes using CID would crash due to a null 612*32b31808SJens Wiklander pointer dereference. Fix this. Fixes #3998. 613*32b31808SJens Wiklander The fix was released, but not announced, in Mbed TLS 3.1.0. 614039e02dfSJerome Forissier * Fix incorrect documentation of mbedtls_x509_crt_profile. The previous 615039e02dfSJerome Forissier documentation stated that the `allowed_pks` field applies to signatures 616039e02dfSJerome Forissier only, but in fact it does apply to the public key type of the end entity 617039e02dfSJerome Forissier certificate, too. Fixes #1992. 618039e02dfSJerome Forissier * Fix undefined behavior in mbedtls_asn1_find_named_data(), where val is 619039e02dfSJerome Forissier not NULL and val_len is zero. 620*32b31808SJens Wiklander * Fix compilation error with mingw32. Fixed by Cameron Cawley in #4211. 621*32b31808SJens Wiklander * Fix compilation error when using C++ Builder on Windows. Reported by 622*32b31808SJens Wiklander Miroslav Mastny in #4015. 623039e02dfSJerome Forissier * psa_raw_key_agreement() now returns PSA_ERROR_BUFFER_TOO_SMALL when 624039e02dfSJerome Forissier applicable. Fixes #5735. 625039e02dfSJerome Forissier * Fix a bug in the x25519 example program where the removal of 626039e02dfSJerome Forissier MBEDTLS_ECDH_LEGACY_CONTEXT caused the program not to run. Fixes #4901 and 627039e02dfSJerome Forissier #3191. 628*32b31808SJens Wiklander * Fix a TLS 1.3 handshake failure when the peer Finished message has not 629*32b31808SJens Wiklander been received yet when we first try to fetch it. 630039e02dfSJerome Forissier * Encode X.509 dates before 1/1/2000 as UTCTime rather than 631039e02dfSJerome Forissier GeneralizedTime. Fixes #5465. 632*32b31808SJens Wiklander * Add mbedtls_x509_dn_get_next function to return the next relative DN in 633*32b31808SJens Wiklander an X509 name, to allow walking the name list. Fixes #5431. 634039e02dfSJerome Forissier * Fix order value of curve x448. 635039e02dfSJerome Forissier * Fix string representation of DNs when outputting values containing commas 636039e02dfSJerome Forissier and other special characters, conforming to RFC 1779. Fixes #769. 637039e02dfSJerome Forissier * Silence a warning from GCC 12 in the selftest program. Fixes #5974. 638*32b31808SJens Wiklander * Fix check_config.h to check that we have MBEDTLS_SSL_KEEP_PEER_CERTIFICATE 639*32b31808SJens Wiklander when MBEDTLS_SSL_PROTO_TLS1_3 is specified, and make this and other 640*32b31808SJens Wiklander dependencies explicit in the documentation. Fixes #5610. 641039e02dfSJerome Forissier * Fix mbedtls_asn1_write_mpi() writing an incorrect encoding of 0. 642*32b31808SJens Wiklander * Fix a TLS 1.3 handshake failure when the first attempt to send the client 643*32b31808SJens Wiklander Finished message on the network cannot be satisfied. Fixes #5499. 644039e02dfSJerome Forissier * Fix resource leaks in mbedtls_pk_parse_public_key() in low 645039e02dfSJerome Forissier memory conditions. 646039e02dfSJerome Forissier * Fix server connection identifier setting for outgoing encrypted records 647039e02dfSJerome Forissier on DTLS 1.2 session resumption. After DTLS 1.2 session resumption with 648039e02dfSJerome Forissier connection identifier, the Mbed TLS client now properly sends the server 649039e02dfSJerome Forissier connection identifier in encrypted record headers. Fix #5872. 650039e02dfSJerome Forissier * Fix a null pointer dereference when performing some operations on zero 651039e02dfSJerome Forissier represented with 0 limbs (specifically mbedtls_mpi_mod_int() dividing 652039e02dfSJerome Forissier by 2, and mbedtls_mpi_write_string() in base 2). 653039e02dfSJerome Forissier * Fix record sizes larger than 16384 being sometimes accepted despite being 654039e02dfSJerome Forissier non-compliant. This could not lead to a buffer overflow. In particular, 655039e02dfSJerome Forissier application data size was already checked correctly. 656*32b31808SJens Wiklander * Fix MBEDTLS_SVC_KEY_ID_GET_KEY_ID() and MBEDTLS_SVC_KEY_ID_GET_OWNER_ID() 657*32b31808SJens Wiklander which have been broken, resulting in compilation errors, since Mbed TLS 658*32b31808SJens Wiklander 3.0. 659*32b31808SJens Wiklander * Ensure that TLS 1.2 ciphersuite/certificate and key selection takes into 660*32b31808SJens Wiklander account not just the type of the key (RSA vs EC) but also what it can 661*32b31808SJens Wiklander actually do. Resolves #5831. 662*32b31808SJens Wiklander * Fix CMake windows host detection, especially when cross compiling. 663*32b31808SJens Wiklander * Fix an error in make where the absence of a generated file caused 664*32b31808SJens Wiklander make to break on a clean checkout. Fixes #5340. 665*32b31808SJens Wiklander * Work around an MSVC ARM64 compiler bug causing incorrect behaviour 666*32b31808SJens Wiklander in mbedtls_mpi_exp_mod(). Reported by Tautvydas Žilys in #5467. 667*32b31808SJens Wiklander * Removed the prompt to exit from all windows build programs, which was causing 668*32b31808SJens Wiklander issues in CI/CD environments. 669039e02dfSJerome Forissier 670039e02dfSJerome ForissierChanges 671*32b31808SJens Wiklander * The file library/psa_crypto_driver_wrappers.c is now generated 672*32b31808SJens Wiklander from a template. In the future, the generation will support 673*32b31808SJens Wiklander driver descriptions. For the time being, to customize this file, 674*32b31808SJens Wiklander see docs/proposed/psa-driver-wrappers-codegen-migration-guide.md 675*32b31808SJens Wiklander * Return PSA_ERROR_INVALID_ARGUMENT if the algorithm passed to one-shot 676*32b31808SJens Wiklander AEAD functions is not an AEAD algorithm. This aligns them with the 677*32b31808SJens Wiklander multipart functions, and the PSA Crypto API 1.1 specification. 678*32b31808SJens Wiklander * In mbedtls_pk_parse_key(), if no password is provided, don't allocate a 679*32b31808SJens Wiklander temporary variable on the heap. Suggested by Sergey Kanatov in #5304. 680039e02dfSJerome Forissier * Assume source files are in UTF-8 when using MSVC with CMake. 681*32b31808SJens Wiklander * Fix runtime library install location when building with CMake and MinGW. 682*32b31808SJens Wiklander DLLs are now installed in the bin directory instead of lib. 683*32b31808SJens Wiklander * cmake: Use GnuInstallDirs to customize install directories 684*32b31808SJens Wiklander Replace custom LIB_INSTALL_DIR variable with standard CMAKE_INSTALL_LIBDIR 685*32b31808SJens Wiklander variable. For backward compatibility, set CMAKE_INSTALL_LIBDIR if 686*32b31808SJens Wiklander LIB_INSTALL_DIR is set. 687*32b31808SJens Wiklander * Add a CMake option that enables static linking of the runtime library 688*32b31808SJens Wiklander in Microsoft Visual C++ compiler. Contributed by Microplankton. 689*32b31808SJens Wiklander * In CMake builds, add aliases for libraries so that the normal MbedTLS::* 690*32b31808SJens Wiklander targets work when MbedTLS is built as a subdirectory. This allows the 691*32b31808SJens Wiklander use of FetchContent, as requested in #5688. 692039e02dfSJerome Forissier 693*32b31808SJens Wiklander= mbed TLS 3.1.0 branch released 2021-12-17 694039e02dfSJerome Forissier 695039e02dfSJerome ForissierAPI changes 696*32b31808SJens Wiklander * New error code for GCM: MBEDTLS_ERR_GCM_BUFFER_TOO_SMALL. 697*32b31808SJens Wiklander Alternative GCM implementations are expected to verify 698*32b31808SJens Wiklander the length of the provided output buffers and to return the 699*32b31808SJens Wiklander MBEDTLS_ERR_GCM_BUFFER_TOO_SMALL in case the buffer length is too small. 700*32b31808SJens Wiklander * You can configure groups for a TLS key exchange with the new function 701*32b31808SJens Wiklander mbedtls_ssl_conf_groups(). It extends mbedtls_ssl_conf_curves(). 702*32b31808SJens Wiklander * Declare a number of structure fields as public: the fields of 703*32b31808SJens Wiklander mbedtls_ecp_curve_info, the fields describing the result of ASN.1 and 704*32b31808SJens Wiklander X.509 parsing, and finally the field fd of mbedtls_net_context on 705*32b31808SJens Wiklander POSIX/Unix-like platforms. 706039e02dfSJerome Forissier 707039e02dfSJerome ForissierRequirement changes 708039e02dfSJerome Forissier * Sign-magnitude and one's complement representations for signed integers are 709039e02dfSJerome Forissier not supported. Two's complement is the only supported representation. 710039e02dfSJerome Forissier 711*32b31808SJens WiklanderNew deprecations 712*32b31808SJens Wiklander * Deprecate mbedtls_ssl_conf_curves() in favor of the more generic 713*32b31808SJens Wiklander mbedtls_ssl_conf_groups(). 714*32b31808SJens Wiklander 715039e02dfSJerome ForissierRemovals 716039e02dfSJerome Forissier * Remove the partial support for running unit tests via Greentea on Mbed OS, 717039e02dfSJerome Forissier which had been unmaintained since 2018. 718039e02dfSJerome Forissier 719039e02dfSJerome ForissierFeatures 720*32b31808SJens Wiklander * Enable support for Curve448 via the PSA API. Contributed by 721*32b31808SJens Wiklander Archana Madhavan in #4626. Fixes #3399 and #4249. 722039e02dfSJerome Forissier * The identifier of the CID TLS extension can be configured by defining 723039e02dfSJerome Forissier MBEDTLS_TLS_EXT_CID at compile time. 724*32b31808SJens Wiklander * Implement the PSA multipart AEAD interface, currently supporting 725*32b31808SJens Wiklander ChaChaPoly and GCM. 726039e02dfSJerome Forissier * Warn if errors from certain functions are ignored. This is currently 727039e02dfSJerome Forissier supported on GCC-like compilers and on MSVC and can be configured through 728039e02dfSJerome Forissier the macro MBEDTLS_CHECK_RETURN. The warnings are always enabled 729039e02dfSJerome Forissier (where supported) for critical functions where ignoring the return 730039e02dfSJerome Forissier value is almost always a bug. Enable the new configuration option 731039e02dfSJerome Forissier MBEDTLS_CHECK_RETURN_WARNING to get warnings for other functions. This 732039e02dfSJerome Forissier is currently implemented in the AES, DES and md modules, and will be 733039e02dfSJerome Forissier extended to other modules in the future. 734039e02dfSJerome Forissier * Add missing PSA macros declared by PSA Crypto API 1.0.0: 735039e02dfSJerome Forissier PSA_ALG_IS_SIGN_HASH, PSA_ALG_NONE, PSA_HASH_BLOCK_LENGTH, PSA_KEY_ID_NULL. 736*32b31808SJens Wiklander * Add support for CCM*-no-tag cipher to the PSA. 737*32b31808SJens Wiklander Currently only 13-byte long IV's are supported. 738*32b31808SJens Wiklander For decryption a minimum of 16-byte long input is expected. 739*32b31808SJens Wiklander These restrictions may be subject to change. 740039e02dfSJerome Forissier * Add new API mbedtls_ct_memcmp for constant time buffer comparison. 741*32b31808SJens Wiklander * Add functions to get the IV and block size from cipher_info structs. 742*32b31808SJens Wiklander * Add functions to check if a cipher supports variable IV or key size. 743*32b31808SJens Wiklander * Add the internal implementation of and support for CCM to the PSA multipart 744*32b31808SJens Wiklander AEAD interface. 745*32b31808SJens Wiklander * Mbed TLS provides a minimum viable implementation of the TLS 1.3 746*32b31808SJens Wiklander protocol. See docs/architecture/tls13-support.md for the definition of 747*32b31808SJens Wiklander the TLS 1.3 Minimum Viable Product (MVP). The MBEDTLS_SSL_PROTO_TLS1_3 748*32b31808SJens Wiklander configuration option controls the enablement of the support. The APIs 749*32b31808SJens Wiklander mbedtls_ssl_conf_min_version() and mbedtls_ssl_conf_max_version() allow 750*32b31808SJens Wiklander to select the 1.3 version of the protocol to establish a TLS connection. 751039e02dfSJerome Forissier * Add PSA API definition for ARIA. 752039e02dfSJerome Forissier 753039e02dfSJerome ForissierSecurity 754039e02dfSJerome Forissier * Zeroize several intermediate variables used to calculate the expected 755039e02dfSJerome Forissier value when verifying a MAC or AEAD tag. This hardens the library in 756039e02dfSJerome Forissier case the value leaks through a memory disclosure vulnerability. For 757039e02dfSJerome Forissier example, a memory disclosure vulnerability could have allowed a 758039e02dfSJerome Forissier man-in-the-middle to inject fake ciphertext into a DTLS connection. 759*32b31808SJens Wiklander * In psa_aead_generate_nonce(), do not read back from the output buffer. 760*32b31808SJens Wiklander This fixes a potential policy bypass or decryption oracle vulnerability 761*32b31808SJens Wiklander if the output buffer is in memory that is shared with an untrusted 762*32b31808SJens Wiklander application. 763039e02dfSJerome Forissier * In psa_cipher_generate_iv() and psa_cipher_encrypt(), do not read back 764039e02dfSJerome Forissier from the output buffer. This fixes a potential policy bypass or decryption 765039e02dfSJerome Forissier oracle vulnerability if the output buffer is in memory that is shared with 766039e02dfSJerome Forissier an untrusted application. 767039e02dfSJerome Forissier * Fix a double-free that happened after mbedtls_ssl_set_session() or 768039e02dfSJerome Forissier mbedtls_ssl_get_session() failed with MBEDTLS_ERR_SSL_ALLOC_FAILED 769039e02dfSJerome Forissier (out of memory). After that, calling mbedtls_ssl_session_free() 770039e02dfSJerome Forissier and mbedtls_ssl_free() would cause an internal session buffer to 771039e02dfSJerome Forissier be free()'d twice. 772039e02dfSJerome Forissier 773039e02dfSJerome ForissierBugfix 774039e02dfSJerome Forissier * Stop using reserved identifiers as local variables. Fixes #4630. 775039e02dfSJerome Forissier * The GNU makefiles invoke python3 in preference to python except on Windows. 776039e02dfSJerome Forissier The check was accidentally not performed when cross-compiling for Windows 777039e02dfSJerome Forissier on Linux. Fix this. Fixes #4774. 778039e02dfSJerome Forissier * Prevent divide by zero if either of PSA_CIPHER_ENCRYPT_OUTPUT_SIZE() or 779039e02dfSJerome Forissier PSA_CIPHER_UPDATE_OUTPUT_SIZE() were called using an asymmetric key type. 780039e02dfSJerome Forissier * Fix a parameter set but unused in psa_crypto_cipher.c. Fixes #4935. 781039e02dfSJerome Forissier * Don't use the obsolete header path sys/fcntl.h in unit tests. 782039e02dfSJerome Forissier These header files cause compilation errors in musl. 783039e02dfSJerome Forissier Fixes #4969. 784039e02dfSJerome Forissier * Fix missing constraints on x86_64 and aarch64 assembly code 785039e02dfSJerome Forissier for bignum multiplication that broke some bignum operations with 786039e02dfSJerome Forissier (at least) Clang 12. 787039e02dfSJerome Forissier Fixes #4116, #4786, #4917, #4962. 788039e02dfSJerome Forissier * Fix mbedtls_cipher_crypt: AES-ECB when MBEDTLS_USE_PSA_CRYPTO is enabled. 789039e02dfSJerome Forissier * Failures of alternative implementations of AES or DES single-block 790039e02dfSJerome Forissier functions enabled with MBEDTLS_AES_ENCRYPT_ALT, MBEDTLS_AES_DECRYPT_ALT, 791039e02dfSJerome Forissier MBEDTLS_DES_CRYPT_ECB_ALT or MBEDTLS_DES3_CRYPT_ECB_ALT were ignored. 792039e02dfSJerome Forissier This does not concern the implementation provided with Mbed TLS, 793039e02dfSJerome Forissier where this function cannot fail, or full-module replacements with 794039e02dfSJerome Forissier MBEDTLS_AES_ALT or MBEDTLS_DES_ALT. Reported by Armelle Duboc in #1092. 795039e02dfSJerome Forissier * Some failures of HMAC operations were ignored. These failures could only 796039e02dfSJerome Forissier happen with an alternative implementation of the underlying hash module. 797039e02dfSJerome Forissier * Fix the error returned by psa_generate_key() for a public key. Fixes #4551. 798*32b31808SJens Wiklander * Fix compile-time or run-time errors in PSA 799*32b31808SJens Wiklander AEAD functions when ChachaPoly is disabled. Fixes #5065. 800*32b31808SJens Wiklander * Remove PSA'a AEAD finish/verify output buffer limitation for GCM. 801*32b31808SJens Wiklander The requirement of minimum 15 bytes for output buffer in 802*32b31808SJens Wiklander psa_aead_finish() and psa_aead_verify() does not apply to the built-in 803*32b31808SJens Wiklander implementation of GCM. 804*32b31808SJens Wiklander * Move GCM's update output buffer length verification from PSA AEAD to 805*32b31808SJens Wiklander the built-in implementation of the GCM. 806*32b31808SJens Wiklander The requirement for output buffer size to be equal or greater then 807*32b31808SJens Wiklander input buffer size is valid only for the built-in implementation of GCM. 808*32b31808SJens Wiklander Alternative GCM implementations can process whole blocks only. 809039e02dfSJerome Forissier * Fix the build of sample programs when neither MBEDTLS_ERROR_C nor 810039e02dfSJerome Forissier MBEDTLS_ERROR_STRERROR_DUMMY is enabled. 811039e02dfSJerome Forissier * Fix PSA_ALG_RSA_PSS verification accepting an arbitrary salt length. 812039e02dfSJerome Forissier This algorithm now accepts only the same salt length for verification 813039e02dfSJerome Forissier that it produces when signing, as documented. Use the new algorithm 814039e02dfSJerome Forissier PSA_ALG_RSA_PSS_ANY_SALT to accept any salt length. Fixes #4946. 815039e02dfSJerome Forissier * The existing predicate macro name PSA_ALG_IS_HASH_AND_SIGN is now reserved 816039e02dfSJerome Forissier for algorithm values that fully encode the hashing step, as per the PSA 817039e02dfSJerome Forissier Crypto API specification. This excludes PSA_ALG_RSA_PKCS1V15_SIGN_RAW and 818039e02dfSJerome Forissier PSA_ALG_ECDSA_ANY. The new predicate macro PSA_ALG_IS_SIGN_HASH covers 819039e02dfSJerome Forissier all algorithms that can be used with psa_{sign,verify}_hash(), including 820039e02dfSJerome Forissier these two. 821039e02dfSJerome Forissier * Fix issue in Makefile on Linux with SHARED=1, that caused shared libraries 822039e02dfSJerome Forissier not to list other shared libraries they need. 823039e02dfSJerome Forissier * Fix a bug in mbedtls_gcm_starts() when the bit length of the iv 824039e02dfSJerome Forissier exceeds 2^32. Fixes #4884. 825039e02dfSJerome Forissier * Fix an uninitialized variable warning in test_suite_ssl.function with GCC 826039e02dfSJerome Forissier version 11. 827039e02dfSJerome Forissier * Fix the build when no SHA2 module is included. Fixes #4930. 828039e02dfSJerome Forissier * Fix the build when only the bignum module is included. Fixes #4929. 829039e02dfSJerome Forissier * Fix a potential invalid pointer dereference and infinite loop bugs in 830039e02dfSJerome Forissier pkcs12 functions when the password is empty. Fix the documentation to 831039e02dfSJerome Forissier better describe the inputs to these functions and their possible values. 832039e02dfSJerome Forissier Fixes #5136. 833039e02dfSJerome Forissier * The key usage flags PSA_KEY_USAGE_SIGN_MESSAGE now allows the MAC 834039e02dfSJerome Forissier operations psa_mac_compute() and psa_mac_sign_setup(). 835039e02dfSJerome Forissier * The key usage flags PSA_KEY_USAGE_VERIFY_MESSAGE now allows the MAC 836039e02dfSJerome Forissier operations psa_mac_verify() and psa_mac_verify_setup(). 837039e02dfSJerome Forissier 838039e02dfSJerome ForissierChanges 839*32b31808SJens Wiklander * Explicitly mark the fields mbedtls_ssl_session.exported and 840*32b31808SJens Wiklander mbedtls_ssl_config.respect_cli_pref as private. This was an 841*32b31808SJens Wiklander oversight during the run-up to the release of Mbed TLS 3.0. 842*32b31808SJens Wiklander The fields were never intended to be public. 843*32b31808SJens Wiklander * Implement multi-part CCM API. 844*32b31808SJens Wiklander The multi-part functions: mbedtls_ccm_starts(), mbedtls_ccm_set_lengths(), 845*32b31808SJens Wiklander mbedtls_ccm_update_ad(), mbedtls_ccm_update(), mbedtls_ccm_finish() 846*32b31808SJens Wiklander were introduced in mbedTLS 3.0 release, however their implementation was 847*32b31808SJens Wiklander postponed until now. 848*32b31808SJens Wiklander Implemented functions support chunked data input for both CCM and CCM* 849*32b31808SJens Wiklander algorithms. 850*32b31808SJens Wiklander * Remove MBEDTLS_SSL_EXPORT_KEYS, making it always on and increasing the 851*32b31808SJens Wiklander code size by about 80B on an M0 build. This option only gated an ability 852*32b31808SJens Wiklander to set a callback, but was deemed unnecessary as it was yet another define 853*32b31808SJens Wiklander to remember when writing tests, or test configurations. Fixes #4653. 854039e02dfSJerome Forissier * Improve the performance of base64 constant-flow code. The result is still 855039e02dfSJerome Forissier slower than the original non-constant-flow implementation, but much faster 856039e02dfSJerome Forissier than the previous constant-flow implementation. Fixes #4814. 857*32b31808SJens Wiklander * Ignore plaintext/ciphertext lengths for CCM*-no-tag operations. 858*32b31808SJens Wiklander For CCM* encryption/decryption without authentication, input 859*32b31808SJens Wiklander length will be ignored. 860039e02dfSJerome Forissier * Indicate in the error returned if the nonce length used with 861039e02dfSJerome Forissier ChaCha20-Poly1305 is invalid, and not just unsupported. 862039e02dfSJerome Forissier * The mbedcrypto library includes a new source code module constant_time.c, 863039e02dfSJerome Forissier containing various functions meant to resist timing side channel attacks. 864039e02dfSJerome Forissier This module does not have a separate configuration option, and functions 865039e02dfSJerome Forissier from this module will be included in the build as required. Currently 866039e02dfSJerome Forissier most of the interface of this module is private and may change at any 867039e02dfSJerome Forissier time. 868*32b31808SJens Wiklander * The generated configuration-independent files are now automatically 869*32b31808SJens Wiklander generated by the CMake build system on Unix-like systems. This is not 870*32b31808SJens Wiklander yet supported when cross-compiling. 871817466cbSJens Wiklander 872*32b31808SJens Wiklander= Mbed TLS 3.0.0 branch released 2021-07-07 8737901324dSJerome Forissier 8747901324dSJerome ForissierAPI changes 875*32b31808SJens Wiklander * Remove HAVEGE module. 876*32b31808SJens Wiklander The design of HAVEGE makes it unsuitable for microcontrollers. Platforms 877*32b31808SJens Wiklander with a more complex CPU usually have an operating system interface that 878*32b31808SJens Wiklander provides better randomness. Instead of HAVEGE, declare OS or hardware RNG 879*32b31808SJens Wiklander interfaces with mbedtls_entropy_add_source() and/or use an entropy seed 880*32b31808SJens Wiklander file created securely during device provisioning. See 881*32b31808SJens Wiklander https://mbed-tls.readthedocs.io/en/latest/kb/how-to/add-entropy-sources-to-entropy-pool/ for 882*32b31808SJens Wiklander more information. 883*32b31808SJens Wiklander * Add missing const attributes to API functions. 884*32b31808SJens Wiklander * Remove helpers for the transition from Mbed TLS 1.3 to Mbed TLS 2.0: the 885*32b31808SJens Wiklander header compat-1.3.h and the script rename.pl. 886*32b31808SJens Wiklander * Remove certs module from the API. 887*32b31808SJens Wiklander Transfer keys and certificates embedded in the library to the test 888*32b31808SJens Wiklander component. This contributes to minimizing library API and discourages 889*32b31808SJens Wiklander users from using unsafe keys in production. 890*32b31808SJens Wiklander * Move alt helpers and definitions. 891*32b31808SJens Wiklander Various helpers and definitions available for use in alt implementations 892*32b31808SJens Wiklander have been moved out of the include/ directory and into the library/ 893*32b31808SJens Wiklander directory. The files concerned are ecp_internal.h and rsa_internal.h 894*32b31808SJens Wiklander which have also been renamed to ecp_internal_alt.h and rsa_alt_helpers.h 895*32b31808SJens Wiklander respectively. 896*32b31808SJens Wiklander * Move internal headers. 897*32b31808SJens Wiklander Header files that were only meant for the library's internal use and 898*32b31808SJens Wiklander were not meant to be used in application code have been moved out of 899*32b31808SJens Wiklander the include/ directory. The headers concerned are bn_mul.h, aesni.h, 900*32b31808SJens Wiklander padlock.h, entropy_poll.h and *_internal.h. 901*32b31808SJens Wiklander * Drop support for parsing SSLv2 ClientHello 902*32b31808SJens Wiklander (MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO). 903*32b31808SJens Wiklander * Drop support for SSLv3 (MBEDTLS_SSL_PROTO_SSL3). 904*32b31808SJens Wiklander * Drop support for TLS record-level compression (MBEDTLS_ZLIB_SUPPORT). 905*32b31808SJens Wiklander * Drop support for RC4 TLS ciphersuites. 906*32b31808SJens Wiklander * Drop support for single-DES ciphersuites. 907*32b31808SJens Wiklander * Drop support for MBEDTLS_SSL_HW_RECORD_ACCEL. 9087901324dSJerome Forissier * Update AEAD output size macros to bring them in line with the PSA Crypto 9097901324dSJerome Forissier API version 1.0 spec. This version of the spec parameterizes them on the 9107901324dSJerome Forissier key type used, as well as the key bit-size in the case of 9117901324dSJerome Forissier PSA_AEAD_TAG_LENGTH. 912*32b31808SJens Wiklander * Add configuration option MBEDTLS_X509_REMOVE_INFO which 913*32b31808SJens Wiklander removes the mbedtls_x509_*_info(), mbedtls_debug_print_crt() 914*32b31808SJens Wiklander as well as other functions and constants only used by 915*32b31808SJens Wiklander those functions. This reduces the code footprint by 916*32b31808SJens Wiklander several kB. 917*32b31808SJens Wiklander * Remove SSL error codes `MBEDTLS_ERR_SSL_CERTIFICATE_REQUIRED` 918*32b31808SJens Wiklander and `MBEDTLS_ERR_SSL_INVALID_VERIFY_HASH` which are never 919*32b31808SJens Wiklander returned from the public SSL API. 920*32b31808SJens Wiklander * Remove `MBEDTLS_ERR_SSL_CERTIFICATE_TOO_LARGE` and return 921*32b31808SJens Wiklander `MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL` instead. 922*32b31808SJens Wiklander * The output parameter of mbedtls_sha512_finish, mbedtls_sha512, 923*32b31808SJens Wiklander mbedtls_sha256_finish and mbedtls_sha256 now has a pointer type 924*32b31808SJens Wiklander rather than array type. This removes spurious warnings in some compilers 925*32b31808SJens Wiklander when outputting a SHA-384 or SHA-224 hash into a buffer of exactly 926*32b31808SJens Wiklander the hash size. 927*32b31808SJens Wiklander * Remove the MBEDTLS_TEST_NULL_ENTROPY config option. Fixes #4388. 928*32b31808SJens Wiklander * The interface of the GCM module has changed to remove restrictions on 929*32b31808SJens Wiklander how the input to multipart operations is broken down. mbedtls_gcm_finish() 930*32b31808SJens Wiklander now takes extra output parameters for the last partial output block. 931*32b31808SJens Wiklander mbedtls_gcm_update() now takes extra parameters for the output length. 932*32b31808SJens Wiklander The software implementation always produces the full output at each 933*32b31808SJens Wiklander call to mbedtls_gcm_update(), but alternative implementations activated 934*32b31808SJens Wiklander by MBEDTLS_GCM_ALT may delay partial blocks to the next call to 935*32b31808SJens Wiklander mbedtls_gcm_update() or mbedtls_gcm_finish(). Furthermore, applications 936*32b31808SJens Wiklander no longer pass the associated data to mbedtls_gcm_starts(), but to the 937*32b31808SJens Wiklander new function mbedtls_gcm_update_ad(). 938*32b31808SJens Wiklander These changes are backward compatible for users of the cipher API. 939*32b31808SJens Wiklander * Replace MBEDTLS_SHA512_NO_SHA384 config option with MBEDTLS_SHA384_C. 940*32b31808SJens Wiklander This separates config option enabling the SHA384 algorithm from option 941*32b31808SJens Wiklander enabling the SHA512 algorithm. Fixes #4034. 942*32b31808SJens Wiklander * Introduce MBEDTLS_SHA224_C. 943*32b31808SJens Wiklander This separates config option enabling the SHA224 algorithm from option 944*32b31808SJens Wiklander enabling SHA256. 945*32b31808SJens Wiklander * The getter and setter API of the SSL session cache (used for 946*32b31808SJens Wiklander session-ID based session resumption) has changed to that of 947*32b31808SJens Wiklander a key-value store with keys being session IDs and values 948*32b31808SJens Wiklander being opaque instances of `mbedtls_ssl_session`. 949*32b31808SJens Wiklander * Remove the mode parameter from RSA operation functions. Signature and 950*32b31808SJens Wiklander decryption functions now always use the private key and verification and 951*32b31808SJens Wiklander encryption use the public key. Verification functions also no longer have 952*32b31808SJens Wiklander RNG parameters. 953*32b31808SJens Wiklander * Modify semantics of `mbedtls_ssl_conf_[opaque_]psk()`: 954*32b31808SJens Wiklander In Mbed TLS 2.X, the API prescribes that later calls overwrite 955*32b31808SJens Wiklander the effect of earlier calls. In Mbed TLS 3.0, calling 956*32b31808SJens Wiklander `mbedtls_ssl_conf_[opaque_]psk()` more than once will fail, 957*32b31808SJens Wiklander leaving the PSK that was configured first intact. 958*32b31808SJens Wiklander Support for more than one PSK may be added in 3.X. 959*32b31808SJens Wiklander * The function mbedtls_x509write_csr_set_extension() has an extra parameter 960*32b31808SJens Wiklander which allows to mark an extension as critical. Fixes #4055. 961*32b31808SJens Wiklander * For multi-part AEAD operations with the cipher module, calling 962*32b31808SJens Wiklander mbedtls_cipher_finish() is now mandatory. Previously the documentation 963*32b31808SJens Wiklander was unclear on this point, and this function happened to never do 964*32b31808SJens Wiklander anything with the currently implemented AEADs, so in practice it was 965*32b31808SJens Wiklander possible to skip calling it, which is no longer supported. 966*32b31808SJens Wiklander * The option MBEDTLS_ECP_FIXED_POINT_OPTIM use pre-computed comb tables 967*32b31808SJens Wiklander instead of computing tables in runtime. Thus, this option now increase 968*32b31808SJens Wiklander code size, and it does not increase RAM usage in runtime anymore. 969*32b31808SJens Wiklander * Remove the SSL APIs mbedtls_ssl_get_input_max_frag_len() and 970*32b31808SJens Wiklander mbedtls_ssl_get_output_max_frag_len(), and add a new API 971*32b31808SJens Wiklander mbedtls_ssl_get_max_in_record_payload(), complementing the existing 972*32b31808SJens Wiklander mbedtls_ssl_get_max_out_record_payload(). 973*32b31808SJens Wiklander Uses of mbedtls_ssl_get_input_max_frag_len() and 974*32b31808SJens Wiklander mbedtls_ssl_get_input_max_frag_len() should be replaced by 975*32b31808SJens Wiklander mbedtls_ssl_get_max_in_record_payload() and 976*32b31808SJens Wiklander mbedtls_ssl_get_max_out_record_payload(), respectively. 977*32b31808SJens Wiklander * mbedtls_rsa_init() now always selects the PKCS#1v1.5 encoding for an RSA 978*32b31808SJens Wiklander key. To use an RSA key with PSS or OAEP, call mbedtls_rsa_set_padding() 979*32b31808SJens Wiklander after initializing the context. mbedtls_rsa_set_padding() now returns an 980*32b31808SJens Wiklander error if its parameters are invalid. 981*32b31808SJens Wiklander * Replace MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE by a runtime 982*32b31808SJens Wiklander configuration function mbedtls_ssl_conf_preference_order(). Fixes #4398. 983*32b31808SJens Wiklander * Instead of accessing the len field of a DHM context, which is no longer 984*32b31808SJens Wiklander supported, use the new function mbedtls_dhm_get_len() . 985*32b31808SJens Wiklander * In modules that implement cryptographic hash functions, many functions 986*32b31808SJens Wiklander mbedtls_xxx() now return int instead of void, and the corresponding 987*32b31808SJens Wiklander function mbedtls_xxx_ret() which was identical except for returning int 988*32b31808SJens Wiklander has been removed. This also concerns mbedtls_xxx_drbg_update(). See the 989*32b31808SJens Wiklander migration guide for more information. Fixes #4212. 990*32b31808SJens Wiklander * For all functions that take a random number generator (RNG) as a 991*32b31808SJens Wiklander parameter, this parameter is now mandatory (that is, NULL is not an 992*32b31808SJens Wiklander acceptable value). Functions which previously accepted NULL and now 993*32b31808SJens Wiklander reject it are: the X.509 CRT and CSR writing functions; the PK and RSA 994*32b31808SJens Wiklander sign and decrypt function; mbedtls_rsa_private(); the functions 995*32b31808SJens Wiklander in DHM and ECDH that compute the shared secret; the scalar multiplication 996*32b31808SJens Wiklander functions in ECP. 997*32b31808SJens Wiklander * The following functions now require an RNG parameter: 998*32b31808SJens Wiklander mbedtls_ecp_check_pub_priv(), mbedtls_pk_check_pair(), 999*32b31808SJens Wiklander mbedtls_pk_parse_key(), mbedtls_pk_parse_keyfile(). 1000*32b31808SJens Wiklander * mbedtls_ssl_conf_export_keys_ext_cb() and 1001*32b31808SJens Wiklander mbedtls_ssl_conf_export_keys_cb() have been removed and 1002*32b31808SJens Wiklander replaced by a new API mbedtls_ssl_set_export_keys_cb(). 1003*32b31808SJens Wiklander Raw keys and IVs are no longer passed to the callback. 1004*32b31808SJens Wiklander Further, callbacks now receive an additional parameter 1005*32b31808SJens Wiklander indicating the type of secret that's being exported, 1006*32b31808SJens Wiklander paving the way for the larger number of secrets 1007*32b31808SJens Wiklander in TLS 1.3. Finally, the key export callback and 1008*32b31808SJens Wiklander context are now connection-specific. 1009*32b31808SJens Wiklander * Signature functions in the RSA and PK modules now require the hash 1010*32b31808SJens Wiklander length parameter to be the size of the hash input. For RSA signatures 1011*32b31808SJens Wiklander other than raw PKCS#1 v1.5, this must match the output size of the 1012*32b31808SJens Wiklander specified hash algorithm. 1013*32b31808SJens Wiklander * The functions mbedtls_pk_sign(), mbedtls_pk_sign_restartable(), 1014*32b31808SJens Wiklander mbedtls_ecdsa_write_signature() and 1015*32b31808SJens Wiklander mbedtls_ecdsa_write_signature_restartable() now take an extra parameter 1016*32b31808SJens Wiklander indicating the size of the output buffer for the signature. 10177901324dSJerome Forissier * Implement one-shot cipher functions, psa_cipher_encrypt and 10187901324dSJerome Forissier psa_cipher_decrypt, according to the PSA Crypto API 1.0.0 10197901324dSJerome Forissier specification. 1020*32b31808SJens Wiklander * Direct access to fields of structures declared in public headers is no 1021*32b31808SJens Wiklander longer supported except for fields that are documented public. Use accessor 1022*32b31808SJens Wiklander functions instead. For more information, see the migration guide entry 1023*32b31808SJens Wiklander "Most structure fields are now private". 1024*32b31808SJens Wiklander * mbedtls_ssl_get_session_pointer() has been removed, and 1025*32b31808SJens Wiklander mbedtls_ssl_{set,get}_session() may now only be called once for any given 1026*32b31808SJens Wiklander SSL context. 1027*32b31808SJens Wiklander 1028*32b31808SJens WiklanderDefault behavior changes 1029*32b31808SJens Wiklander * Enable by default the functionalities which have no reason to be disabled. 1030*32b31808SJens Wiklander They are: ARIA block cipher, CMAC mode, elliptic curve J-PAKE library and 1031*32b31808SJens Wiklander Key Wrapping mode as defined in NIST SP 800-38F. Fixes #4036. 1032*32b31808SJens Wiklander * Some default policies for X.509 certificate verification and TLS have 1033*32b31808SJens Wiklander changed: curves and hashes weaker than 255 bits are no longer accepted 1034*32b31808SJens Wiklander by default. The default order in TLS now favors faster curves over larger 1035*32b31808SJens Wiklander curves. 10367901324dSJerome Forissier 10377901324dSJerome ForissierRequirement changes 10387901324dSJerome Forissier * The library now uses the %zu format specifier with the printf() family of 10397901324dSJerome Forissier functions, so requires a toolchain that supports it. This change does not 10407901324dSJerome Forissier affect the maintained LTS branches, so when contributing changes please 10417901324dSJerome Forissier bear this in mind and do not add them to backported code. 1042*32b31808SJens Wiklander * If you build the development version of Mbed TLS, rather than an official 1043*32b31808SJens Wiklander release, some configuration-independent files are now generated at build 1044*32b31808SJens Wiklander time rather than checked into source control. This includes some library 1045*32b31808SJens Wiklander source files as well as the Visual Studio solution. Perl, Python 3 and a 1046*32b31808SJens Wiklander C compiler for the host platform are required. See “Generated source files 1047*32b31808SJens Wiklander in the development branch” in README.md for more information. 1048*32b31808SJens Wiklander * Refresh the minimum supported versions of tools to build the 1049*32b31808SJens Wiklander library. CMake versions older than 3.10.2 and Python older 1050*32b31808SJens Wiklander than 3.6 are no longer supported. 1051*32b31808SJens Wiklander 1052*32b31808SJens WiklanderRemovals 1053*32b31808SJens Wiklander * Remove the MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_CERTIFICATES 1054*32b31808SJens Wiklander compile-time option, which was off by default. Users should not trust 1055*32b31808SJens Wiklander certificates signed with SHA-1 due to the known attacks against SHA-1. 1056*32b31808SJens Wiklander If needed, SHA-1 certificates can still be verified by using a custom 1057*32b31808SJens Wiklander verification profile. 1058*32b31808SJens Wiklander * Removed deprecated things in psa/crypto_compat.h. Fixes #4284 1059*32b31808SJens Wiklander * Removed deprecated functions from hashing modules. Fixes #4280. 1060*32b31808SJens Wiklander * Remove PKCS#11 library wrapper. PKCS#11 has limited functionality, 1061*32b31808SJens Wiklander lacks automated tests and has scarce documentation. Also, PSA Crypto 1062*32b31808SJens Wiklander provides a more flexible private key management. 1063*32b31808SJens Wiklander More details on PCKS#11 wrapper removal can be found in the mailing list 1064*32b31808SJens Wiklander https://lists.trustedfirmware.org/pipermail/mbed-tls/2020-April/000024.html 1065*32b31808SJens Wiklander * Remove deprecated error codes. Fix #4283 1066*32b31808SJens Wiklander * Remove MBEDTLS_ENABLE_WEAK_CIPHERSUITES configuration option. Fixes #4416. 1067*32b31808SJens Wiklander * Remove the MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_CERTIFICATES 1068*32b31808SJens Wiklander compile-time option. This option has been inactive for a long time. 1069*32b31808SJens Wiklander Please use the `lifetime` parameter of `mbedtls_ssl_ticket_setup()` 1070*32b31808SJens Wiklander instead. 1071*32b31808SJens Wiklander * Remove the following deprecated functions and constants of hex-encoded 1072*32b31808SJens Wiklander primes based on RFC 5114 and RFC 3526 from library code and tests: 1073*32b31808SJens Wiklander mbedtls_aes_encrypt(), mbedtls_aes_decrypt(), mbedtls_mpi_is_prime(), 1074*32b31808SJens Wiklander mbedtls_cipher_auth_encrypt(), mbedtls_cipher_auth_decrypt(), 1075*32b31808SJens Wiklander mbedtls_ctr_drbg_update(), mbedtls_hmac_drbg_update(), 1076*32b31808SJens Wiklander mbedtls_ecdsa_write_signature_det(), mbedtls_ecdsa_sign_det(), 1077*32b31808SJens Wiklander mbedtls_ssl_conf_dh_param(), mbedtls_ssl_get_max_frag_len(), 1078*32b31808SJens Wiklander MBEDTLS_DHM_RFC5114_MODP_2048_P, MBEDTLS_DHM_RFC5114_MODP_2048_G, 1079*32b31808SJens Wiklander MBEDTLS_DHM_RFC3526_MODP_2048_P, MBEDTLS_DHM_RFC3526_MODP_2048_G, 1080*32b31808SJens Wiklander MBEDTLS_DHM_RFC3526_MODP_3072_P, MBEDTLS_DHM_RFC3526_MODP_3072_G, 1081*32b31808SJens Wiklander MBEDTLS_DHM_RFC3526_MODP_4096_P, MBEDTLS_DHM_RFC3526_MODP_4096_G. 1082*32b31808SJens Wiklander Remove the deprecated file: include/mbedtls/net.h. Fixes #4282. 1083*32b31808SJens Wiklander * Remove MBEDTLS_SSL_MAX_CONTENT_LEN configuration option, since 1084*32b31808SJens Wiklander MBEDTLS_SSL_IN_CONTENT_LEN and MBEDTLS_SSL_OUT_CONTENT_LEN replace 1085*32b31808SJens Wiklander it. Fixes #4362. 1086*32b31808SJens Wiklander * Remove the MBEDTLS_SSL_RECORD_CHECKING option and enable by default its 1087*32b31808SJens Wiklander previous action. Fixes #4361. 1088*32b31808SJens Wiklander * Remove support for TLS 1.0, TLS 1.1 and DTLS 1.0, as well as support for 1089*32b31808SJens Wiklander CBC record splitting, fallback SCSV, and the ability to configure 1090*32b31808SJens Wiklander ciphersuites per version, which are no longer relevant. This removes the 1091*32b31808SJens Wiklander configuration options MBEDTLS_SSL_PROTO_TLS1, 1092*32b31808SJens Wiklander MBEDTLS_SSL_PROTO_TLS1_1, MBEDTLS_SSL_CBC_RECORD_SPLITTING and 1093*32b31808SJens Wiklander MBEDTLS_SSL_FALLBACK_SCSV as well as the functions 1094*32b31808SJens Wiklander mbedtls_ssl_conf_cbc_record_splitting(), 1095*32b31808SJens Wiklander mbedtls_ssl_get_key_exchange_md_ssl_tls(), mbedtls_ssl_conf_fallback(), 1096*32b31808SJens Wiklander and mbedtls_ssl_conf_ciphersuites_for_version(). Fixes #4286. 1097*32b31808SJens Wiklander * The RSA module no longer supports private-key operations with the public 1098*32b31808SJens Wiklander key and vice versa. 1099*32b31808SJens Wiklander * Remove the MBEDTLS_SSL_DTLS_BADMAC_LIMIT config.h option. Fixes #4403. 1100*32b31808SJens Wiklander * Remove all the 3DES ciphersuites: 1101*32b31808SJens Wiklander MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA, 1102*32b31808SJens Wiklander MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, 1103*32b31808SJens Wiklander MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, 1104*32b31808SJens Wiklander MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA, 1105*32b31808SJens Wiklander MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, 1106*32b31808SJens Wiklander MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, 1107*32b31808SJens Wiklander MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA, 1108*32b31808SJens Wiklander MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA, 1109*32b31808SJens Wiklander MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA. Remove the 1110*32b31808SJens Wiklander MBEDTLS_REMOVE_3DES_CIPHERSUITES option which is no longer relevant. 1111*32b31808SJens Wiklander Fixes #4367. 1112*32b31808SJens Wiklander * Remove the MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 option and let the code 1113*32b31808SJens Wiklander behave as if it was always disabled. Fixes #4386. 1114*32b31808SJens Wiklander * Remove MBEDTLS_ECDH_LEGACY_CONTEXT config option since this was purely for 1115*32b31808SJens Wiklander backward compatibility which is no longer supported. Addresses #4404. 1116*32b31808SJens Wiklander * Remove the following macros: MBEDTLS_CHECK_PARAMS, 1117*32b31808SJens Wiklander MBEDTLS_CHECK_PARAMS_ASSERT, MBEDTLS_PARAM_FAILED, 1118*32b31808SJens Wiklander MBEDTLS_PARAM_FAILED_ALT. Fixes #4313. 1119*32b31808SJens Wiklander * Remove the MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION config.h 1120*32b31808SJens Wiklander option. The mbedtls_x509_crt_parse_der_with_ext_cb() is the way to go for 1121*32b31808SJens Wiklander migration path. Fixes #4378. 1122*32b31808SJens Wiklander * Remove the MBEDTLS_X509_CHECK_KEY_USAGE and 1123*32b31808SJens Wiklander MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE config.h options and let the code 1124*32b31808SJens Wiklander behave as if they were always enabled. Fixes #4405. 1125*32b31808SJens Wiklander * MBEDTLS_ECP_MAX_BITS is no longer a configuration option because it is 1126*32b31808SJens Wiklander now determined automatically based on supported curves. 1127*32b31808SJens Wiklander * Remove the following functions: mbedtls_timing_self_test(), 1128*32b31808SJens Wiklander mbedtls_hardclock_poll(), mbedtls_timing_hardclock() and 1129*32b31808SJens Wiklander mbedtls_set_alarm(). Fixes #4083. 1130*32b31808SJens Wiklander * The configuration option MBEDTLS_ECP_NO_INTERNAL_RNG has been removed as 1131*32b31808SJens Wiklander it no longer had any effect. 1132*32b31808SJens Wiklander * Remove all support for MD2, MD4, RC4, Blowfish and XTEA. This removes the 1133*32b31808SJens Wiklander corresponding modules and all their APIs and related configuration 1134*32b31808SJens Wiklander options. Fixes #4084. 1135*32b31808SJens Wiklander * Remove MBEDTLS_SSL_TRUNCATED_HMAC and also remove 1136*32b31808SJens Wiklander MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT config option. Users are better served by 1137*32b31808SJens Wiklander using a CCM-8 ciphersuite than a CBC ciphersuite with truncated HMAC. 1138*32b31808SJens Wiklander See issue #4341 for more details. 1139*32b31808SJens Wiklander * Remove the compile-time option 1140*32b31808SJens Wiklander MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_KEY_EXCHANGE. 11417901324dSJerome Forissier 11427901324dSJerome ForissierFeatures 11437901324dSJerome Forissier * Add mbedtls_rsa_rsassa_pss_sign_ext() function allowing to generate a 11447901324dSJerome Forissier signature with a specific salt length. This function allows to validate 11457901324dSJerome Forissier test cases provided in the NIST's CAVP test suite. Contributed by Cédric 11467901324dSJerome Forissier Meuter in PR #3183. 11477901324dSJerome Forissier * Added support for built-in driver keys through the PSA opaque crypto 11487901324dSJerome Forissier driver interface. Refer to the documentation of 11497901324dSJerome Forissier MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS for more information. 11507901324dSJerome Forissier * Implement psa_sign_message() and psa_verify_message(). 1151*32b31808SJens Wiklander * The multi-part GCM interface (mbedtls_gcm_update() or 1152*32b31808SJens Wiklander mbedtls_cipher_update()) no longer requires the size of partial inputs to 1153*32b31808SJens Wiklander be a multiple of 16. 1154*32b31808SJens Wiklander * The multi-part GCM interface now supports chunked associated data through 1155*32b31808SJens Wiklander multiple calls to mbedtls_gcm_update_ad(). 11567901324dSJerome Forissier * The new function mbedtls_mpi_random() generates a random value in a 11577901324dSJerome Forissier given range uniformly. 1158*32b31808SJens Wiklander * Alternative implementations of the AES, DHM, ECJPAKE, ECP, RSA and timing 1159*32b31808SJens Wiklander modules had undocumented constraints on their context types. These 1160*32b31808SJens Wiklander constraints have been relaxed. 1161*32b31808SJens Wiklander See docs/architecture/alternative-implementations.md for the remaining 1162*32b31808SJens Wiklander constraints. 1163*32b31808SJens Wiklander * The new functions mbedtls_dhm_get_len() and mbedtls_dhm_get_bitlen() 1164*32b31808SJens Wiklander query the size of the modulus in a Diffie-Hellman context. 1165*32b31808SJens Wiklander * The new function mbedtls_dhm_get_value() copy a field out of a 1166*32b31808SJens Wiklander Diffie-Hellman context. 1167*32b31808SJens Wiklander * Use the new function mbedtls_ecjpake_set_point_format() to select the 1168*32b31808SJens Wiklander point format for ECJPAKE instead of accessing the point_format field 1169*32b31808SJens Wiklander directly, which is no longer supported. 11707901324dSJerome Forissier * Implement psa_mac_compute() and psa_mac_verify() as defined in the 11717901324dSJerome Forissier PSA Cryptograpy API 1.0.0 specification. 11727901324dSJerome Forissier 11737901324dSJerome ForissierSecurity 11747901324dSJerome Forissier * Fix a bias in the generation of finite-field Diffie-Hellman-Merkle (DHM) 11757901324dSJerome Forissier private keys and of blinding values for DHM and elliptic curves (ECP) 11767901324dSJerome Forissier computations. Reported by FlorianF89 in #4245. 11777901324dSJerome Forissier * Fix a potential side channel vulnerability in ECDSA ephemeral key generation. 11787901324dSJerome Forissier An adversary who is capable of very precise timing measurements could 11797901324dSJerome Forissier learn partial information about the leading bits of the nonce used for the 11807901324dSJerome Forissier signature, allowing the recovery of the private key after observing a 11817901324dSJerome Forissier large number of signature operations. This completes a partial fix in 11827901324dSJerome Forissier Mbed TLS 2.20.0. 1183*32b31808SJens Wiklander * Fix an issue where an adversary with access to precise enough information 1184*32b31808SJens Wiklander about memory accesses (typically, an untrusted operating system attacking 1185*32b31808SJens Wiklander a secure enclave) could recover an RSA private key after observing the 1186*32b31808SJens Wiklander victim performing a single private-key operation. Found and reported by 11877901324dSJerome Forissier Zili KOU, Wenjian HE, Sharad Sinha, and Wei ZHANG. 1188*32b31808SJens Wiklander * Fix an issue where an adversary with access to precise enough timing 1189*32b31808SJens Wiklander information (typically, a co-located process) could recover a Curve25519 1190*32b31808SJens Wiklander or Curve448 static ECDH key after inputting a chosen public key and 1191*32b31808SJens Wiklander observing the victim performing the corresponding private-key operation. 1192*32b31808SJens Wiklander Found and reported by Leila Batina, Lukas Chmielewski, Björn Haase, Niels 1193*32b31808SJens Wiklander Samwel and Peter Schwabe. 11947901324dSJerome Forissier 11957901324dSJerome ForissierBugfix 11967901324dSJerome Forissier * Fix premature fopen() call in mbedtls_entropy_write_seed_file which may 1197*32b31808SJens Wiklander lead to the seed file corruption in case if the path to the seed file is 11987901324dSJerome Forissier equal to MBEDTLS_PLATFORM_STD_NV_SEED_FILE. Contributed by Victor 11997901324dSJerome Forissier Krasnoshchok in #3616. 12007901324dSJerome Forissier * PSA functions creating a key now return PSA_ERROR_INVALID_ARGUMENT rather 12017901324dSJerome Forissier than PSA_ERROR_INVALID_HANDLE when the identifier specified for the key 12027901324dSJerome Forissier to create is not valid, bringing them in line with version 1.0.0 of the 12037901324dSJerome Forissier specification. Fix #4271. 1204*32b31808SJens Wiklander * Add printf function attributes to mbedtls_debug_print_msg to ensure we 1205*32b31808SJens Wiklander get printf format specifier warnings. 1206*32b31808SJens Wiklander * PSA functions other than psa_open_key now return PSA_ERROR_INVALID_HANDLE 1207*32b31808SJens Wiklander rather than PSA_ERROR_DOES_NOT_EXIST for an invalid handle, bringing them 1208*32b31808SJens Wiklander in line with version 1.0.0 of the specification. Fix #4162. 1209*32b31808SJens Wiklander * Fix a bug in ECDSA that would cause it to fail when the hash is all-bits 1210*32b31808SJens Wiklander zero. Fixes #1792 12117901324dSJerome Forissier * Fix some cases in the bignum module where the library constructed an 12127901324dSJerome Forissier unintended representation of the value 0 which was not processed 12137901324dSJerome Forissier correctly by some bignum operations. This could happen when 12147901324dSJerome Forissier mbedtls_mpi_read_string() was called on "-0", or when 12157901324dSJerome Forissier mbedtls_mpi_mul_mpi() and mbedtls_mpi_mul_int() was called with one of 12167901324dSJerome Forissier the arguments being negative and the other being 0. Fixes #4643. 12177901324dSJerome Forissier * Fix a compilation error when MBEDTLS_ECP_RANDOMIZE_MXZ_ALT is 12187901324dSJerome Forissier defined. Fixes #4217. 12197901324dSJerome Forissier * Fix an incorrect error code when parsing a PKCS#8 private key. 12207901324dSJerome Forissier * In a TLS client, enforce the Diffie-Hellman minimum parameter size 12217901324dSJerome Forissier set with mbedtls_ssl_conf_dhm_min_bitlen() precisely. Before, the 12227901324dSJerome Forissier minimum size was rounded down to the nearest multiple of 8. 12237901324dSJerome Forissier * In library/net_sockets.c, _POSIX_C_SOURCE and _XOPEN_SOURCE are 12247901324dSJerome Forissier defined to specific values. If the code is used in a context 12257901324dSJerome Forissier where these are already defined, this can result in a compilation 12267901324dSJerome Forissier error. Instead, assume that if they are defined, the values will 12277901324dSJerome Forissier be adequate to build Mbed TLS. 1228*32b31808SJens Wiklander * With MBEDTLS_PSA_CRYPTO_C disabled, some functions were getting built 1229*32b31808SJens Wiklander nonetheless, resulting in undefined reference errors when building a 1230*32b31808SJens Wiklander shared library. Reported by Guillermo Garcia M. in #4411. 12317901324dSJerome Forissier * The cipher suite TLS-RSA-WITH-CAMELLIA-256-GCM-SHA384 was not available 12327901324dSJerome Forissier when SHA-1 was disabled and was offered when SHA-1 was enabled but SHA-384 12337901324dSJerome Forissier was disabled. Fix the dependency. Fixes #4472. 12347901324dSJerome Forissier * Do not offer SHA384 cipher suites when SHA-384 is disabled. Fixes #4499. 12357901324dSJerome Forissier * Fix test suite code on platforms where int32_t is not int, such as 12367901324dSJerome Forissier Arm Cortex-M. Fixes #4530. 12377901324dSJerome Forissier * Fix some issues affecting MBEDTLS_ARIA_ALT implementations: a misplaced 12387901324dSJerome Forissier directive in a header and a missing initialization in the self-test. 12397901324dSJerome Forissier * Fix a missing initialization in the Camellia self-test, affecting 12407901324dSJerome Forissier MBEDTLS_CAMELLIA_ALT implementations. 12417901324dSJerome Forissier * Restore the ability to configure PSA via Mbed TLS options to support RSA 12427901324dSJerome Forissier key pair operations but exclude RSA key generation. When MBEDTLS_GENPRIME 12437901324dSJerome Forissier is not defined PSA will no longer attempt to use mbedtls_rsa_gen_key(). 12447901324dSJerome Forissier Fixes #4512. 12457901324dSJerome Forissier * Fix a regression introduced in 2.24.0 which broke (D)TLS CBC ciphersuites 12467901324dSJerome Forissier (when the encrypt-then-MAC extension is not in use) with some ALT 12477901324dSJerome Forissier implementations of the underlying hash (SHA-1, SHA-256, SHA-384), causing 12487901324dSJerome Forissier the affected side to wrongly reject valid messages. Fixes #4118. 12497901324dSJerome Forissier * Remove outdated check-config.h check that prevented implementing the 12507901324dSJerome Forissier timing module on Mbed OS. Fixes #4633. 12517901324dSJerome Forissier * Fix PSA_ALG_TLS12_PRF and PSA_ALG_TLS12_PSK_TO_MS being too permissive 12527901324dSJerome Forissier about missing inputs. 12537901324dSJerome Forissier * Fix mbedtls_net_poll() and mbedtls_net_recv_timeout() often failing with 12547901324dSJerome Forissier MBEDTLS_ERR_NET_POLL_FAILED on Windows. Fixes #4465. 12557901324dSJerome Forissier * Fix a resource leak in a test suite with an alternative AES 12567901324dSJerome Forissier implementation. Fixes #4176. 12577901324dSJerome Forissier * Fix a crash in mbedtls_mpi_debug_mpi on a bignum having 0 limbs. This 12587901324dSJerome Forissier could notably be triggered by setting the TLS debug level to 3 or above 12597901324dSJerome Forissier and using a Montgomery curve for the key exchange. Reported by lhuang04 12607901324dSJerome Forissier in #4578. Fixes #4608. 12617901324dSJerome Forissier * psa_verify_hash() was relying on implementation-specific behavior of 12627901324dSJerome Forissier mbedtls_rsa_rsassa_pss_verify() and was causing failures in some _ALT 12637901324dSJerome Forissier implementations. This reliance is now removed. Fixes #3990. 12647901324dSJerome Forissier * Disallow inputs of length different from the corresponding hash when 12657901324dSJerome Forissier signing or verifying with PSA_ALG_RSA_PSS (The PSA Crypto API mandates 12667901324dSJerome Forissier that PSA_ALG_RSA_PSS uses the same hash throughout the algorithm.) 12677901324dSJerome Forissier * Fix a null pointer dereference when mbedtls_mpi_exp_mod() was called with 12687901324dSJerome Forissier A=0 represented with 0 limbs. Up to and including Mbed TLS 2.26, this bug 12697901324dSJerome Forissier could not be triggered by code that constructed A with one of the 12707901324dSJerome Forissier mbedtls_mpi_read_xxx functions (including in particular TLS code) since 12717901324dSJerome Forissier those always built an mpi object with at least one limb. 12727901324dSJerome Forissier Credit to OSS-Fuzz. Fixes #4641. 12737901324dSJerome Forissier * Fix mbedtls_mpi_gcd(G,A,B) when the value of B is zero. This had no 12747901324dSJerome Forissier effect on Mbed TLS's internal use of mbedtls_mpi_gcd(), but may affect 12757901324dSJerome Forissier applications that call mbedtls_mpi_gcd() directly. Fixes #4642. 12767901324dSJerome Forissier * The PSA API no longer allows the creation or destruction of keys with a 12777901324dSJerome Forissier read-only lifetime. The persistence level PSA_KEY_PERSISTENCE_READ_ONLY 12787901324dSJerome Forissier can now only be used as intended, for keys that cannot be modified through 12797901324dSJerome Forissier normal use of the API. 12807901324dSJerome Forissier * When MBEDTLS_PSA_CRYPTO_SPM is enabled, crypto_spe.h was not included 12817901324dSJerome Forissier in all the right places. Include it from crypto_platform.h, which is 12827901324dSJerome Forissier the natural place. Fixes #4649. 12837901324dSJerome Forissier * Fix which alert is sent in some cases to conform to the 12847901324dSJerome Forissier applicable RFC: on an invalid Finished message value, an 12857901324dSJerome Forissier invalid max_fragment_length extension, or an 12867901324dSJerome Forissier unsupported extension used by the server. 12877901324dSJerome Forissier * Correct (change from 12 to 13 bytes) the value of the macro describing the 12887901324dSJerome Forissier maximum nonce length returned by psa_aead_generate_nonce(). 12897901324dSJerome Forissier 12907901324dSJerome ForissierChanges 12917901324dSJerome Forissier * Fix the setting of the read timeout in the DTLS sample programs. 1292*32b31808SJens Wiklander * Add extra printf compiler warning flags to builds. 1293*32b31808SJens Wiklander * Fix memsan build false positive in x509_crt.c with clang 11 12947901324dSJerome Forissier * Alternative implementations of CMAC may now opt to not support 3DES as a 12957901324dSJerome Forissier CMAC block cipher, and still pass the CMAC self test. 1296*32b31808SJens Wiklander * Remove the AES sample application programs/aes/aescrypt2 which shows 1297*32b31808SJens Wiklander bad cryptographic practice. Fix #1906. 1298*32b31808SJens Wiklander * Remove configs/config-psa-crypto.h, which no longer had any intended 1299*32b31808SJens Wiklander differences from the default configuration, but had accidentally diverged. 13007901324dSJerome Forissier * When building the test suites with GNU make, invoke python3 or python, not 13017901324dSJerome Forissier python2, which is no longer supported upstream. 1302*32b31808SJens Wiklander * fix build failure on MinGW toolchain when __USE_MING_ANSI_STDIO is on. 13037901324dSJerome Forissier When that flag is on, standard GNU C printf format specifiers 13047901324dSJerome Forissier should be used. 1305*32b31808SJens Wiklander * Replace MBEDTLS_SSL_CID_PADDING_GRANULARITY and 1306*32b31808SJens Wiklander MBEDTLS_SSL_TLS1_3_PADDING_GRANULARITY with a new single unified option 1307*32b31808SJens Wiklander MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY. Fixes #4335. 13087901324dSJerome Forissier * Reduce the default value of MBEDTLS_ECP_WINDOW_SIZE. This reduces RAM usage 13097901324dSJerome Forissier during ECC operations at a negligible performance cost. 13107901324dSJerome Forissier * mbedtls_mpi_read_binary(), mbedtls_mpi_read_binary_le() and 13117901324dSJerome Forissier mbedtls_mpi_read_string() now construct an mbedtls_mpi object with 0 limbs 13127901324dSJerome Forissier when their input has length 0. Note that this is an implementation detail 13137901324dSJerome Forissier and can change at any time, so this change should be transparent, but it 13147901324dSJerome Forissier may result in mbedtls_mpi_write_binary() or mbedtls_mpi_write_string() 13157901324dSJerome Forissier now writing an empty string where it previously wrote one or more 13167901324dSJerome Forissier zero digits when operating from values constructed with an mpi_read 13177901324dSJerome Forissier function and some mpi operations. 1318*32b31808SJens Wiklander * Add CMake package config generation for CMake projects consuming Mbed TLS. 1319*32b31808SJens Wiklander * config.h has been split into build_info.h and mbedtls_config.h 1320*32b31808SJens Wiklander build_info.h is intended to be included from C code directly, while 1321*32b31808SJens Wiklander mbedtls_config.h is intended to be edited by end users wishing to 1322*32b31808SJens Wiklander change the build configuration, and should generally only be included from 1323*32b31808SJens Wiklander build_info.h. 1324*32b31808SJens Wiklander * The handling of MBEDTLS_CONFIG_FILE has been moved into build_info.h. 1325*32b31808SJens Wiklander * A config file version symbol, MBEDTLS_CONFIG_VERSION was introduced. 1326*32b31808SJens Wiklander Defining it to a particular value will ensure that Mbed TLS interprets 1327*32b31808SJens Wiklander the config file in a way that's compatible with the config file format 1328*32b31808SJens Wiklander used by the Mbed TLS release whose MBEDTLS_VERSION_NUMBER has the same 1329*32b31808SJens Wiklander value. 1330*32b31808SJens Wiklander The only value supported by Mbed TLS 3.0.0 is 0x03000000. 1331*32b31808SJens Wiklander * Various changes to which alert and/or error code may be returned 1332*32b31808SJens Wiklander * during the TLS handshake. 13337901324dSJerome Forissier * Implicitly add PSA_KEY_USAGE_SIGN_MESSAGE key usage policy flag when 13347901324dSJerome Forissier PSA_KEY_USAGE_SIGN_HASH flag is set and PSA_KEY_USAGE_VERIFY_MESSAGE flag 13357901324dSJerome Forissier when PSA_KEY_USAGE_VERIFY_HASH flag is set. This usage flag extension 13367901324dSJerome Forissier is also applied when loading a key from storage. 13377901324dSJerome Forissier 13387901324dSJerome Forissier= mbed TLS 2.26.0 branch released 2021-03-08 13397901324dSJerome Forissier 13407901324dSJerome ForissierAPI changes 13417901324dSJerome Forissier * Renamed the PSA Crypto API output buffer size macros to bring them in line 13427901324dSJerome Forissier with version 1.0.0 of the specification. 13437901324dSJerome Forissier * The API glue function mbedtls_ecc_group_of_psa() now takes the curve size 13447901324dSJerome Forissier in bits rather than bytes, with an additional flag to indicate if the 13457901324dSJerome Forissier size may have been rounded up to a whole number of bytes. 13467901324dSJerome Forissier * Renamed the PSA Crypto API AEAD tag length macros to bring them in line 13477901324dSJerome Forissier with version 1.0.0 of the specification. 13487901324dSJerome Forissier 13497901324dSJerome ForissierDefault behavior changes 13507901324dSJerome Forissier * In mbedtls_rsa_context objects, the ver field was formerly documented 13517901324dSJerome Forissier as always 0. It is now reserved for internal purposes and may take 13527901324dSJerome Forissier different values. 13537901324dSJerome Forissier 13547901324dSJerome ForissierNew deprecations 13557901324dSJerome Forissier * PSA_KEY_EXPORT_MAX_SIZE, PSA_HASH_SIZE, PSA_MAC_FINAL_SIZE, 13567901324dSJerome Forissier PSA_BLOCK_CIPHER_BLOCK_SIZE, PSA_MAX_BLOCK_CIPHER_BLOCK_SIZE and 13577901324dSJerome Forissier PSA_ALG_TLS12_PSK_TO_MS_MAX_PSK_LEN have been renamed, and the old names 13587901324dSJerome Forissier deprecated. 13597901324dSJerome Forissier * PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH and PSA_ALG_AEAD_WITH_TAG_LENGTH 13607901324dSJerome Forissier have been renamed, and the old names deprecated. 13617901324dSJerome Forissier 13627901324dSJerome ForissierFeatures 13637901324dSJerome Forissier * The PSA crypto subsystem can now use HMAC_DRBG instead of CTR_DRBG. 13647901324dSJerome Forissier CTR_DRBG is used by default if it is available, but you can override 13657901324dSJerome Forissier this choice by setting MBEDTLS_PSA_HMAC_DRBG_MD_TYPE at compile time. 13667901324dSJerome Forissier Fix #3354. 13677901324dSJerome Forissier * Automatic fallback to a software implementation of ECP when 13687901324dSJerome Forissier MBEDTLS_ECP_xxx_ALT accelerator hooks are in use can now be turned off 13697901324dSJerome Forissier through setting the new configuration flag MBEDTLS_ECP_NO_FALLBACK. 13707901324dSJerome Forissier * The PSA crypto subsystem can now be configured to use less static RAM by 13717901324dSJerome Forissier tweaking the setting for the maximum amount of keys simultaneously in RAM. 13727901324dSJerome Forissier MBEDTLS_PSA_KEY_SLOT_COUNT sets the maximum number of volatile keys that 13737901324dSJerome Forissier can exist simultaneously. It has a sensible default if not overridden. 13747901324dSJerome Forissier * Partial implementation of the PSA crypto driver interface: Mbed TLS can 13757901324dSJerome Forissier now use an external random generator instead of the library's own 13767901324dSJerome Forissier entropy collection and DRBG code. Enable MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG 13777901324dSJerome Forissier and see the documentation of mbedtls_psa_external_get_random() for details. 13787901324dSJerome Forissier * Applications using both mbedtls_xxx and psa_xxx functions (for example, 13797901324dSJerome Forissier applications using TLS and MBEDTLS_USE_PSA_CRYPTO) can now use the PSA 13807901324dSJerome Forissier random generator with mbedtls_xxx functions. See the documentation of 13817901324dSJerome Forissier mbedtls_psa_get_random() for details. 13827901324dSJerome Forissier * In the PSA API, the policy for a MAC or AEAD algorithm can specify a 13837901324dSJerome Forissier minimum MAC or tag length thanks to the new wildcards 13847901324dSJerome Forissier PSA_ALG_AT_LEAST_THIS_LENGTH_MAC and 13857901324dSJerome Forissier PSA_ALG_AEAD_WITH_AT_LEAST_THIS_LENGTH_TAG. 13867901324dSJerome Forissier 13877901324dSJerome ForissierSecurity 13887901324dSJerome Forissier * Fix a security reduction in CTR_DRBG when the initial seeding obtained a 13897901324dSJerome Forissier nonce from entropy. Applications were affected if they called 13907901324dSJerome Forissier mbedtls_ctr_drbg_set_nonce_len(), if they called 13917901324dSJerome Forissier mbedtls_ctr_drbg_set_entropy_len() with a size that was 3/2 times the key 13927901324dSJerome Forissier length, or when the entropy module uses SHA-256 and CTR_DRBG uses AES-256. 13937901324dSJerome Forissier In such cases, a random nonce was necessary to achieve the advertised 13947901324dSJerome Forissier security strength, but the code incorrectly used a constant instead of 13957901324dSJerome Forissier entropy from the nonce. 13967901324dSJerome Forissier Found by John Stroebel in #3819 and fixed in #3973. 13977901324dSJerome Forissier * Fix a buffer overflow in mbedtls_mpi_sub_abs() when calculating 13987901324dSJerome Forissier |A| - |B| where |B| is larger than |A| and has more limbs (so the 13997901324dSJerome Forissier function should return MBEDTLS_ERR_MPI_NEGATIVE_VALUE). Only 14007901324dSJerome Forissier applications calling mbedtls_mpi_sub_abs() directly are affected: 14017901324dSJerome Forissier all calls inside the library were safe since this function is 14027901324dSJerome Forissier only called with |A| >= |B|. Reported by Guido Vranken in #4042. 14037901324dSJerome Forissier * Fix an errorneous estimation for an internal buffer in 14047901324dSJerome Forissier mbedtls_pk_write_key_pem(). If MBEDTLS_MPI_MAX_SIZE is set to an odd 14057901324dSJerome Forissier value the function might fail to write a private RSA keys of the largest 14067901324dSJerome Forissier supported size. 14077901324dSJerome Forissier Found by Daniel Otte, reported in #4093 and fixed in #4094. 14087901324dSJerome Forissier * Fix a stack buffer overflow with mbedtls_net_poll() and 14097901324dSJerome Forissier mbedtls_net_recv_timeout() when given a file descriptor that is 14107901324dSJerome Forissier beyond FD_SETSIZE. Reported by FigBug in #4169. 14117901324dSJerome Forissier * Guard against strong local side channel attack against base64 tables by 14127901324dSJerome Forissier making access aceess to them use constant flow code. 14137901324dSJerome Forissier 14147901324dSJerome ForissierBugfix 14157901324dSJerome Forissier * Fix use-after-scope error in programs/ssl/ssl_client2.c and ssl_server2.c 14167901324dSJerome Forissier * Fix memory leak that occured when calling psa_close_key() on a 14177901324dSJerome Forissier wrapped key with MBEDTLS_PSA_CRYPTO_SE_C defined. 14187901324dSJerome Forissier * Fix an incorrect error code if an RSA private operation glitched. 14197901324dSJerome Forissier * Fix a memory leak in an error case in psa_generate_derived_key_internal(). 14207901324dSJerome Forissier * Fix a resource leak in CTR_DRBG and HMAC_DRBG when MBEDTLS_THREADING_C 14217901324dSJerome Forissier is enabled, on platforms where initializing a mutex allocates resources. 14227901324dSJerome Forissier This was a regression introduced in the previous release. Reported in 14237901324dSJerome Forissier #4017, #4045 and #4071. 14247901324dSJerome Forissier * Ensure that calling mbedtls_rsa_free() or mbedtls_entropy_free() 14257901324dSJerome Forissier twice is safe. This happens for RSA when some Mbed TLS library functions 14267901324dSJerome Forissier fail. Such a double-free was not safe when MBEDTLS_THREADING_C was 14277901324dSJerome Forissier enabled on platforms where freeing a mutex twice is not safe. 14287901324dSJerome Forissier * Fix a resource leak in a bad-arguments case of mbedtls_rsa_gen_key() 14297901324dSJerome Forissier when MBEDTLS_THREADING_C is enabled on platforms where initializing 14307901324dSJerome Forissier a mutex allocates resources. 14317901324dSJerome Forissier * Fixes a bug where, if the library was configured to include support for 14327901324dSJerome Forissier both the old SE interface and the new PSA driver interface, external keys were 14337901324dSJerome Forissier not loaded from storage. This was fixed by #3996. 14347901324dSJerome Forissier * This change makes 'mbedtls_x509write_crt_set_basic_constraints' 14357901324dSJerome Forissier consistent with RFC 5280 4.2.1.9 which says: "Conforming CAs MUST 14367901324dSJerome Forissier include this extension in all CA certificates that contain public keys 14377901324dSJerome Forissier used to validate digital signatures on certificates and MUST mark the 14387901324dSJerome Forissier extension as critical in such certificates." Previous to this change, 14397901324dSJerome Forissier the extension was always marked as non-critical. This was fixed by 14407901324dSJerome Forissier #3698. 14417901324dSJerome Forissier 14427901324dSJerome ForissierChanges 14437901324dSJerome Forissier * A new library C file psa_crypto_client.c has been created to contain 14447901324dSJerome Forissier the PSA code needed by a PSA crypto client when the PSA crypto 14457901324dSJerome Forissier implementation is not included into the library. 14467901324dSJerome Forissier * On recent enough versions of FreeBSD and DragonFlyBSD, the entropy module 14477901324dSJerome Forissier now uses the getrandom syscall instead of reading from /dev/urandom. 14487901324dSJerome Forissier 14497901324dSJerome Forissier= mbed TLS 2.25.0 branch released 2020-12-11 14507901324dSJerome Forissier 14517901324dSJerome ForissierAPI changes 14527901324dSJerome Forissier * The numerical values of the PSA Crypto API macros have been updated to 14537901324dSJerome Forissier conform to version 1.0.0 of the specification. 14547901324dSJerome Forissier * PSA_ALG_STREAM_CIPHER replaces PSA_ALG_CHACHA20 and PSA_ALG_ARC4. 14557901324dSJerome Forissier The underlying stream cipher is determined by the key type 14567901324dSJerome Forissier (PSA_KEY_TYPE_CHACHA20 or PSA_KEY_TYPE_ARC4). 14577901324dSJerome Forissier * The functions mbedtls_cipher_auth_encrypt() and 14587901324dSJerome Forissier mbedtls_cipher_auth_decrypt() no longer accept NIST_KW contexts, 14597901324dSJerome Forissier as they have no way to check if the output buffer is large enough. 14607901324dSJerome Forissier Please use mbedtls_cipher_auth_encrypt_ext() and 14617901324dSJerome Forissier mbedtls_cipher_auth_decrypt_ext() instead. Credit to OSS-Fuzz and 14627901324dSJerome Forissier Cryptofuzz. Fixes #3665. 14637901324dSJerome Forissier 14647901324dSJerome ForissierRequirement changes 14657901324dSJerome Forissier * Update the minimum required CMake version to 2.8.12. This silences a 14667901324dSJerome Forissier warning on CMake 3.19.0. #3801 14677901324dSJerome Forissier 14687901324dSJerome ForissierNew deprecations 14697901324dSJerome Forissier * PSA_ALG_CHACHA20 and PSA_ALG_ARC4 have been deprecated. 14707901324dSJerome Forissier Use PSA_ALG_STREAM_CIPHER instead. 14717901324dSJerome Forissier * The functions mbedtls_cipher_auth_encrypt() and 14727901324dSJerome Forissier mbedtls_cipher_auth_decrypt() are deprecated in favour of the new 14737901324dSJerome Forissier functions mbedtls_cipher_auth_encrypt_ext() and 14747901324dSJerome Forissier mbedtls_cipher_auth_decrypt_ext(). Please note that with AEAD ciphers, 14757901324dSJerome Forissier these new functions always append the tag to the ciphertext, and include 14767901324dSJerome Forissier the tag in the ciphertext length. 14777901324dSJerome Forissier 14787901324dSJerome ForissierFeatures 14797901324dSJerome Forissier * Partial implementation of the new PSA Crypto accelerator APIs. (Symmetric 14807901324dSJerome Forissier ciphers, asymmetric signing/verification and key generation, validate_key 14817901324dSJerome Forissier entry point, and export_public_key interface.) 14827901324dSJerome Forissier * Add support for ECB to the PSA cipher API. 14837901324dSJerome Forissier * In PSA, allow using a key declared with a base key agreement algorithm 14847901324dSJerome Forissier in combined key agreement and derivation operations, as long as the key 14857901324dSJerome Forissier agreement algorithm in use matches the algorithm the key was declared with. 14867901324dSJerome Forissier This is currently non-standard behaviour, but expected to make it into a 14877901324dSJerome Forissier future revision of the PSA Crypto standard. 14887901324dSJerome Forissier * Add MBEDTLS_TARGET_PREFIX CMake variable, which is prefixed to the mbedtls, 14897901324dSJerome Forissier mbedcrypto, mbedx509 and apidoc CMake target names. This can be used by 14907901324dSJerome Forissier external CMake projects that include this one to avoid CMake target name 14917901324dSJerome Forissier clashes. The default value of this variable is "", so default target names 14927901324dSJerome Forissier are unchanged. 14937901324dSJerome Forissier * Add support for DTLS-SRTP as defined in RFC 5764. Contributed by Johan 14947901324dSJerome Forissier Pascal, improved by Ron Eldor. 14957901324dSJerome Forissier * In the PSA API, it is no longer necessary to open persistent keys: 14967901324dSJerome Forissier operations now accept the key identifier. The type psa_key_handle_t is now 14977901324dSJerome Forissier identical to psa_key_id_t instead of being platform-defined. This bridges 14987901324dSJerome Forissier the last major gap to compliance with the PSA Cryptography specification 14997901324dSJerome Forissier version 1.0.0. Opening persistent keys is still supported for backward 15007901324dSJerome Forissier compatibility, but will be deprecated and later removed in future 15017901324dSJerome Forissier releases. 15027901324dSJerome Forissier * PSA_AEAD_NONCE_LENGTH, PSA_AEAD_NONCE_MAX_SIZE, PSA_CIPHER_IV_LENGTH and 15037901324dSJerome Forissier PSA_CIPHER_IV_MAX_SIZE macros have been added as defined in version 15047901324dSJerome Forissier 1.0.0 of the PSA Crypto API specification. 15057901324dSJerome Forissier 15067901324dSJerome ForissierSecurity 15077901324dSJerome Forissier * The functions mbedtls_cipher_auth_encrypt() and 15087901324dSJerome Forissier mbedtls_cipher_auth_decrypt() would write past the minimum documented 15097901324dSJerome Forissier size of the output buffer when used with NIST_KW. As a result, code using 15107901324dSJerome Forissier those functions as documented with NIST_KW could have a buffer overwrite 15117901324dSJerome Forissier of up to 15 bytes, with consequences ranging up to arbitrary code 15127901324dSJerome Forissier execution depending on the location of the output buffer. 15137901324dSJerome Forissier * Limit the size of calculations performed by mbedtls_mpi_exp_mod to 15147901324dSJerome Forissier MBEDTLS_MPI_MAX_SIZE to prevent a potential denial of service when 15157901324dSJerome Forissier generating Diffie-Hellman key pairs. Credit to OSS-Fuzz. 15167901324dSJerome Forissier * A failure of the random generator was ignored in mbedtls_mpi_fill_random(), 15177901324dSJerome Forissier which is how most uses of randomization in asymmetric cryptography 15187901324dSJerome Forissier (including key generation, intermediate value randomization and blinding) 15197901324dSJerome Forissier are implemented. This could cause failures or the silent use of non-random 15207901324dSJerome Forissier values. A random generator can fail if it needs reseeding and cannot not 15217901324dSJerome Forissier obtain entropy, or due to an internal failure (which, for Mbed TLS's own 15227901324dSJerome Forissier CTR_DRBG or HMAC_DRBG, can only happen due to a misconfiguration). 15237901324dSJerome Forissier * Fix a compliance issue whereby we were not checking the tag on the 15247901324dSJerome Forissier algorithm parameters (only the size) when comparing the signature in the 15257901324dSJerome Forissier description part of the cert to the real signature. This meant that a 15267901324dSJerome Forissier NULL algorithm parameters entry would look identical to an array of REAL 15277901324dSJerome Forissier (size zero) to the library and thus the certificate would be considered 15287901324dSJerome Forissier valid. However, if the parameters do not match in *any* way then the 15297901324dSJerome Forissier certificate should be considered invalid, and indeed OpenSSL marks these 15307901324dSJerome Forissier certs as invalid when mbedtls did not. 15317901324dSJerome Forissier Many thanks to guidovranken who found this issue via differential fuzzing 15327901324dSJerome Forissier and reported it in #3629. 15337901324dSJerome Forissier * Zeroising of local buffers and variables which are used for calculations 15347901324dSJerome Forissier in mbedtls_pkcs5_pbkdf2_hmac(), mbedtls_internal_sha*_process(), 15357901324dSJerome Forissier mbedtls_internal_md*_process() and mbedtls_internal_ripemd160_process() 15367901324dSJerome Forissier functions to erase sensitive data from memory. Reported by 15377901324dSJerome Forissier Johan Malmgren and Johan Uppman Bruce from Sectra. 15387901324dSJerome Forissier 15397901324dSJerome ForissierBugfix 1540*32b31808SJens Wiklander * Fix an invalid (but nonzero) return code from mbedtls_pk_parse_subpubkey() 15417901324dSJerome Forissier when the input has trailing garbage. Fixes #2512. 15427901324dSJerome Forissier * Fix build failure in configurations where MBEDTLS_USE_PSA_CRYPTO is 15437901324dSJerome Forissier enabled but ECDSA is disabled. Contributed by jdurkop. Fixes #3294. 15447901324dSJerome Forissier * Include the psa_constant_names generated source code in the source tree 15457901324dSJerome Forissier instead of generating it at build time. Fixes #3524. 15467901324dSJerome Forissier * Fix rsa_prepare_blinding() to retry when the blinding value is not 15477901324dSJerome Forissier invertible (mod N), instead of returning MBEDTLS_ERR_RSA_RNG_FAILED. This 15487901324dSJerome Forissier addresses a regression but is rare in practice (approx. 1 in 2/sqrt(N)). 15497901324dSJerome Forissier Found by Synopsys Coverity, fix contributed by Peter Kolbus (Garmin). 15507901324dSJerome Forissier Fixes #3647. 15517901324dSJerome Forissier * Use socklen_t on Android and other POSIX-compliant system 15527901324dSJerome Forissier * Fix the build when the macro _GNU_SOURCE is defined to a non-empty value. 15537901324dSJerome Forissier Fix #3432. 15547901324dSJerome Forissier * Consistently return PSA_ERROR_INVALID_ARGUMENT on invalid cipher input 15557901324dSJerome Forissier sizes (instead of PSA_ERROR_BAD_STATE in some cases) to make the 15567901324dSJerome Forissier psa_cipher_* functions compliant with the PSA Crypto API specification. 15577901324dSJerome Forissier * mbedtls_ecp_curve_list() now lists Curve25519 and Curve448 under the names 15587901324dSJerome Forissier "x25519" and "x448". These curves support ECDH but not ECDSA. If you need 15597901324dSJerome Forissier only the curves that support ECDSA, filter the list with 15607901324dSJerome Forissier mbedtls_ecdsa_can_do(). 15617901324dSJerome Forissier * Fix psa_generate_key() returning an error when asked to generate 15627901324dSJerome Forissier an ECC key pair on Curve25519 or secp244k1. 15637901324dSJerome Forissier * Fix psa_key_derivation_output_key() to allow the output of a combined key 15647901324dSJerome Forissier agreement and subsequent key derivation operation to be used as a key 15657901324dSJerome Forissier inside of the PSA Crypto core. 15667901324dSJerome Forissier * Fix handling of EOF against 0xff bytes and on platforms with unsigned 15677901324dSJerome Forissier chars. Fixes a build failure on platforms where char is unsigned. Fixes 15687901324dSJerome Forissier #3794. 15697901324dSJerome Forissier * Fix an off-by-one error in the additional data length check for 15707901324dSJerome Forissier CCM, which allowed encryption with a non-standard length field. 15717901324dSJerome Forissier Fixes #3719. 15727901324dSJerome Forissier * Correct the default IV size for mbedtls_cipher_info_t structures using 15737901324dSJerome Forissier MBEDTLS_MODE_ECB to 0, since ECB mode ciphers don't use IVs. 15747901324dSJerome Forissier * Make arc4random_buf available on NetBSD and OpenBSD when _POSIX_C_SOURCE is 15757901324dSJerome Forissier defined. Fix contributed in #3571. 15767901324dSJerome Forissier * Fix conditions for including string.h in error.c. Fixes #3866. 15777901324dSJerome Forissier * psa_set_key_id() now also sets the lifetime to persistent for keys located 15787901324dSJerome Forissier in a secure element. 15797901324dSJerome Forissier * Attempting to create a volatile key with a non-zero key identifier now 15807901324dSJerome Forissier fails. Previously the key identifier was just ignored when creating a 15817901324dSJerome Forissier volatile key. 15827901324dSJerome Forissier * Attempting to create or register a key with a key identifier in the vendor 15837901324dSJerome Forissier range now fails. 15847901324dSJerome Forissier * Fix build failures on GCC 11. Fixes #3782. 15857901324dSJerome Forissier * Add missing arguments of debug message in mbedtls_ssl_decrypt_buf. 15867901324dSJerome Forissier * Fix a memory leak in mbedtls_mpi_sub_abs() when the result was negative 15877901324dSJerome Forissier (an error condition) and the second operand was aliased to the result. 15887901324dSJerome Forissier * Fix a case in elliptic curve arithmetic where an out-of-memory condition 15897901324dSJerome Forissier could go undetected, resulting in an incorrect result. 15907901324dSJerome Forissier * In CTR_DRBG and HMAC_DRBG, don't reset the reseed interval in seed(). 15917901324dSJerome Forissier Fixes #2927. 15927901324dSJerome Forissier * In PEM writing functions, fill the trailing part of the buffer with null 15937901324dSJerome Forissier bytes. This guarantees that the corresponding parsing function can read 15947901324dSJerome Forissier the buffer back, which was the case for mbedtls_x509write_{crt,csr}_pem 15957901324dSJerome Forissier until this property was inadvertently broken in Mbed TLS 2.19.0. 15967901324dSJerome Forissier Fixes #3682. 15977901324dSJerome Forissier * Fix a build failure that occurred with the MBEDTLS_AES_SETKEY_DEC_ALT 15987901324dSJerome Forissier option on. In this configuration key management methods that are required 15997901324dSJerome Forissier for MBEDTLS_CIPHER_MODE_XTS were excluded from the build and made it fail. 16007901324dSJerome Forissier Fixes #3818. Reported by John Stroebel. 16017901324dSJerome Forissier 16027901324dSJerome ForissierChanges 16037901324dSJerome Forissier * Reduce stack usage significantly during sliding window exponentiation. 16047901324dSJerome Forissier Reported in #3591 and fix contributed in #3592 by Daniel Otte. 16057901324dSJerome Forissier * The PSA persistent storage format is updated to always store the key bits 16067901324dSJerome Forissier attribute. No automatic upgrade path is provided. Previously stored keys 16077901324dSJerome Forissier must be erased, or manually upgraded based on the key storage format 16087901324dSJerome Forissier specification (docs/architecture/mbed-crypto-storage-specification.md). 16097901324dSJerome Forissier Fixes #3740. 16107901324dSJerome Forissier * Remove the zeroization of a pointer variable in AES rounds. It was valid 16117901324dSJerome Forissier but spurious and misleading since it looked like a mistaken attempt to 16127901324dSJerome Forissier zeroize the pointed-to buffer. Reported by Antonio de la Piedra, CEA 16137901324dSJerome Forissier Leti, France. 16147901324dSJerome Forissier 16157901324dSJerome Forissier= mbed TLS 2.24.0 branch released 2020-09-01 16167901324dSJerome Forissier 16177901324dSJerome ForissierAPI changes 16187901324dSJerome Forissier * In the PSA API, rename the types of elliptic curve and Diffie-Hellman 16197901324dSJerome Forissier group families to psa_ecc_family_t and psa_dh_family_t, in line with the 16207901324dSJerome Forissier PSA Crypto API specification version 1.0.0. 16217901324dSJerome Forissier Rename associated macros as well: 16227901324dSJerome Forissier PSA_ECC_CURVE_xxx renamed to PSA_ECC_FAMILY_xxx 16237901324dSJerome Forissier PSA_DH_GROUP_xxx renamed to PSA_DH_FAMILY_xxx 16247901324dSJerome Forissier PSA_KEY_TYPE_GET_CURVE renamed to to PSA_KEY_TYPE_ECC_GET_FAMILY 16257901324dSJerome Forissier PSA_KEY_TYPE_GET_GROUP renamed to PSA_KEY_TYPE_DH_GET_FAMILY 16267901324dSJerome Forissier 16277901324dSJerome ForissierDefault behavior changes 16287901324dSJerome Forissier * Stop storing persistent information about externally stored keys created 16297901324dSJerome Forissier through PSA Crypto with a volatile lifetime. Reported in #3288 and 16307901324dSJerome Forissier contributed by Steven Cooreman in #3382. 16317901324dSJerome Forissier 16327901324dSJerome ForissierFeatures 16337901324dSJerome Forissier * The new function mbedtls_ecp_write_key() exports private ECC keys back to 16347901324dSJerome Forissier a byte buffer. It is the inverse of the existing mbedtls_ecp_read_key(). 16357901324dSJerome Forissier * Support building on e2k (Elbrus) architecture: correctly enable 16367901324dSJerome Forissier -Wformat-signedness, and fix the code that causes signed-one-bit-field 16377901324dSJerome Forissier and sign-compare warnings. Contributed by makise-homura (Igor Molchanov) 16387901324dSJerome Forissier <akemi_homura@kurisa.ch>. 16397901324dSJerome Forissier 16407901324dSJerome ForissierSecurity 16417901324dSJerome Forissier * Fix a vulnerability in the verification of X.509 certificates when 16427901324dSJerome Forissier matching the expected common name (the cn argument of 16437901324dSJerome Forissier mbedtls_x509_crt_verify()) with the actual certificate name: when the 16447901324dSJerome Forissier subjecAltName extension is present, the expected name was compared to any 16457901324dSJerome Forissier name in that extension regardless of its type. This means that an 16467901324dSJerome Forissier attacker could for example impersonate a 4-bytes or 16-byte domain by 16477901324dSJerome Forissier getting a certificate for the corresponding IPv4 or IPv6 (this would 16487901324dSJerome Forissier require the attacker to control that IP address, though). Similar attacks 16497901324dSJerome Forissier using other subjectAltName name types might be possible. Found and 16507901324dSJerome Forissier reported by kFYatek in #3498. 16517901324dSJerome Forissier * When checking X.509 CRLs, a certificate was only considered as revoked if 16527901324dSJerome Forissier its revocationDate was in the past according to the local clock if 16537901324dSJerome Forissier available. In particular, on builds without MBEDTLS_HAVE_TIME_DATE, 16547901324dSJerome Forissier certificates were never considered as revoked. On builds with 16557901324dSJerome Forissier MBEDTLS_HAVE_TIME_DATE, an attacker able to control the local clock (for 16567901324dSJerome Forissier example, an untrusted OS attacking a secure enclave) could prevent 16577901324dSJerome Forissier revocation of certificates via CRLs. Fixed by no longer checking the 16587901324dSJerome Forissier revocationDate field, in accordance with RFC 5280. Reported by 16597901324dSJerome Forissier yuemonangong in #3340. Reported independently and fixed by 16607901324dSJerome Forissier Raoul Strackx and Jethro Beekman in #3433. 16617901324dSJerome Forissier * In (D)TLS record decryption, when using a CBC ciphersuites without the 16627901324dSJerome Forissier Encrypt-then-Mac extension, use constant code flow memory access patterns 16637901324dSJerome Forissier to extract and check the MAC. This is an improvement to the existing 16647901324dSJerome Forissier countermeasure against Lucky 13 attacks. The previous countermeasure was 16657901324dSJerome Forissier effective against network-based attackers, but less so against local 16667901324dSJerome Forissier attackers. The new countermeasure defends against local attackers, even 16677901324dSJerome Forissier if they have access to fine-grained measurements. In particular, this 16687901324dSJerome Forissier fixes a local Lucky 13 cache attack found and reported by Tuba Yavuz, 16697901324dSJerome Forissier Farhaan Fowze, Ken (Yihan) Bai, Grant Hernandez, and Kevin Butler 16707901324dSJerome Forissier (University of Florida) and Dave Tian (Purdue University). 16717901324dSJerome Forissier * Fix side channel in RSA private key operations and static (finite-field) 16727901324dSJerome Forissier Diffie-Hellman. An adversary with precise enough timing and memory access 16737901324dSJerome Forissier information (typically an untrusted operating system attacking a secure 16747901324dSJerome Forissier enclave) could bypass an existing counter-measure (base blinding) and 16757901324dSJerome Forissier potentially fully recover the private key. 16767901324dSJerome Forissier * Fix a 1-byte buffer overread in mbedtls_x509_crl_parse_der(). 16777901324dSJerome Forissier Credit to OSS-Fuzz for detecting the problem and to Philippe Antoine 16787901324dSJerome Forissier for pinpointing the problematic code. 16797901324dSJerome Forissier * Zeroising of plaintext buffers in mbedtls_ssl_read() to erase unused 16807901324dSJerome Forissier application data from memory. Reported in #689 by 16817901324dSJerome Forissier Johan Uppman Bruce of Sectra. 16827901324dSJerome Forissier 16837901324dSJerome ForissierBugfix 16847901324dSJerome Forissier * Library files installed after a CMake build no longer have execute 16857901324dSJerome Forissier permission. 16867901324dSJerome Forissier * Use local labels in mbedtls_padlock_has_support() to fix an invalid symbol 16877901324dSJerome Forissier redefinition if the function is inlined. 16887901324dSJerome Forissier Reported in #3451 and fix contributed in #3452 by okhowang. 16897901324dSJerome Forissier * Fix the endianness of Curve25519 keys imported/exported through the PSA 16907901324dSJerome Forissier APIs. psa_import_key and psa_export_key will now correctly expect/output 16917901324dSJerome Forissier Montgomery keys in little-endian as defined by RFC7748. Contributed by 16927901324dSJerome Forissier Steven Cooreman in #3425. 16937901324dSJerome Forissier * Fix build errors when the only enabled elliptic curves are Montgomery 16947901324dSJerome Forissier curves. Raised by signpainter in #941 and by Taiki-San in #1412. This 16957901324dSJerome Forissier also fixes missing declarations reported by Steven Cooreman in #1147. 16967901324dSJerome Forissier * Fix self-test failure when the only enabled short Weierstrass elliptic 16977901324dSJerome Forissier curve is secp192k1. Fixes #2017. 16987901324dSJerome Forissier * PSA key import will now correctly import a Curve25519/Curve448 public key 16997901324dSJerome Forissier instead of erroring out. Contributed by Steven Cooreman in #3492. 17007901324dSJerome Forissier * Use arc4random_buf on NetBSD instead of rand implementation with cyclical 17017901324dSJerome Forissier lower bits. Fix contributed in #3540. 17027901324dSJerome Forissier * Fix a memory leak in mbedtls_md_setup() when using HMAC under low memory 17037901324dSJerome Forissier conditions. Reported and fix suggested by Guido Vranken in #3486. 17047901324dSJerome Forissier * Fix bug in redirection of unit test outputs on platforms where stdout is 17057901324dSJerome Forissier defined as a macro. First reported in #2311 and fix contributed in #3528. 17067901324dSJerome Forissier 17077901324dSJerome ForissierChanges 17087901324dSJerome Forissier * Only pass -Wformat-signedness to versions of GCC that support it. Reported 17097901324dSJerome Forissier in #3478 and fix contributed in #3479 by okhowang. 17107901324dSJerome Forissier * Reduce the stack consumption of mbedtls_x509write_csr_der() which 17117901324dSJerome Forissier previously could lead to stack overflow on constrained devices. 17127901324dSJerome Forissier Contributed by Doru Gucea and Simon Leet in #3464. 17137901324dSJerome Forissier * Undefine the ASSERT macro before defining it locally, in case it is defined 17147901324dSJerome Forissier in a platform header. Contributed by Abdelatif Guettouche in #3557. 17157901324dSJerome Forissier * Update copyright notices to use Linux Foundation guidance. As a result, 17167901324dSJerome Forissier the copyright of contributors other than Arm is now acknowledged, and the 17177901324dSJerome Forissier years of publishing are no longer tracked in the source files. This also 17187901324dSJerome Forissier eliminates the need for the lines declaring the files to be part of 17197901324dSJerome Forissier MbedTLS. Fixes #3457. 17207901324dSJerome Forissier * Add the command line parameter key_pwd to the ssl_client2 and ssl_server2 17217901324dSJerome Forissier example applications which allows to provide a password for the key file 17227901324dSJerome Forissier specified through the existing key_file argument. This allows the use of 17237901324dSJerome Forissier these applications with password-protected key files. Analogously but for 17247901324dSJerome Forissier ssl_server2 only, add the command line parameter key_pwd2 which allows to 17257901324dSJerome Forissier set a password for the key file provided through the existing key_file2 17267901324dSJerome Forissier argument. 17277901324dSJerome Forissier 17287901324dSJerome Forissier= mbed TLS 2.23.0 branch released 2020-07-01 17297901324dSJerome Forissier 17307901324dSJerome ForissierDefault behavior changes 17317901324dSJerome Forissier * In the experimental PSA secure element interface, change the encoding of 17327901324dSJerome Forissier key lifetimes to encode a persistence level and the location. Although C 17337901324dSJerome Forissier prototypes do not effectively change, code calling 17347901324dSJerome Forissier psa_register_se_driver() must be modified to pass the driver's location 17357901324dSJerome Forissier instead of the keys' lifetime. If the library is upgraded on an existing 17367901324dSJerome Forissier device, keys created with the old lifetime value will not be readable or 17377901324dSJerome Forissier removable through Mbed TLS after the upgrade. 17387901324dSJerome Forissier 17397901324dSJerome ForissierFeatures 17407901324dSJerome Forissier * New functions in the error module return constant strings for 17417901324dSJerome Forissier high- and low-level error codes, complementing mbedtls_strerror() 17427901324dSJerome Forissier which constructs a string for any error code, including compound 17437901324dSJerome Forissier ones, but requires a writable buffer. Contributed by Gaurav Aggarwal 17447901324dSJerome Forissier in #3176. 17457901324dSJerome Forissier * The new utility programs/ssl/ssl_context_info prints a human-readable 17467901324dSJerome Forissier dump of an SSL context saved with mbedtls_ssl_context_save(). 17477901324dSJerome Forissier * Add support for midipix, a POSIX layer for Microsoft Windows. 17487901324dSJerome Forissier * Add new mbedtls_x509_crt_parse_der_with_ext_cb() routine which allows 17497901324dSJerome Forissier parsing unsupported certificate extensions via user provided callback. 17507901324dSJerome Forissier Contributed by Nicola Di Lieto <nicola.dilieto@gmail.com> in #3243 as 17517901324dSJerome Forissier a solution to #3241. 17527901324dSJerome Forissier * Pass the "certificate policies" extension to the callback supplied to 17537901324dSJerome Forissier mbedtls_x509_crt_parse_der_with_ext_cb() if it contains unsupported 17547901324dSJerome Forissier policies (#3419). 17557901324dSJerome Forissier * Added support to entropy_poll for the kern.arandom syscall supported on 17567901324dSJerome Forissier some BSD systems. Contributed by Nia Alarie in #3423. 17577901324dSJerome Forissier * Add support for Windows 2000 in net_sockets. Contributed by opatomic. #3239 17587901324dSJerome Forissier 17597901324dSJerome ForissierSecurity 17607901324dSJerome Forissier * Fix a side channel vulnerability in modular exponentiation that could 17617901324dSJerome Forissier reveal an RSA private key used in a secure enclave. Noticed by Sangho Lee, 17627901324dSJerome Forissier Ming-Wei Shih, Prasun Gera, Taesoo Kim and Hyesoon Kim (Georgia Institute 17637901324dSJerome Forissier of Technology); and Marcus Peinado (Microsoft Research). Reported by Raoul 17647901324dSJerome Forissier Strackx (Fortanix) in #3394. 17657901324dSJerome Forissier * Fix side channel in mbedtls_ecp_check_pub_priv() and 17667901324dSJerome Forissier mbedtls_pk_parse_key() / mbedtls_pk_parse_keyfile() (when loading a 17677901324dSJerome Forissier private key that didn't include the uncompressed public key), as well as 17687901324dSJerome Forissier mbedtls_ecp_mul() / mbedtls_ecp_mul_restartable() when called with a NULL 17697901324dSJerome Forissier f_rng argument. An attacker with access to precise enough timing and 17707901324dSJerome Forissier memory access information (typically an untrusted operating system 17717901324dSJerome Forissier attacking a secure enclave) could fully recover the ECC private key. 17727901324dSJerome Forissier Found and reported by Alejandro Cabrera Aldaya and Billy Brumley. 17737901324dSJerome Forissier * Fix issue in Lucky 13 counter-measure that could make it ineffective when 17747901324dSJerome Forissier hardware accelerators were used (using one of the MBEDTLS_SHAxxx_ALT 17757901324dSJerome Forissier macros). This would cause the original Lucky 13 attack to be possible in 17767901324dSJerome Forissier those configurations, allowing an active network attacker to recover 17777901324dSJerome Forissier plaintext after repeated timing measurements under some conditions. 17787901324dSJerome Forissier Reported and fix suggested by Luc Perneel in #3246. 17797901324dSJerome Forissier 17807901324dSJerome ForissierBugfix 17817901324dSJerome Forissier * Fix the Visual Studio Release x64 build configuration for mbedtls itself. 17827901324dSJerome Forissier Completes a previous fix in Mbed TLS 2.19 that only fixed the build for 17837901324dSJerome Forissier the example programs. Reported in #1430 and fix contributed by irwir. 17847901324dSJerome Forissier * Fix undefined behavior in X.509 certificate parsing if the 17857901324dSJerome Forissier pathLenConstraint basic constraint value is equal to INT_MAX. 17867901324dSJerome Forissier The actual effect with almost every compiler is the intended 17877901324dSJerome Forissier behavior, so this is unlikely to be exploitable anywhere. #3192 17887901324dSJerome Forissier * Fix issue with a detected HW accelerated record error not being exposed 17897901324dSJerome Forissier due to shadowed variable. Contributed by Sander Visser in #3310. 17907901324dSJerome Forissier * Avoid NULL pointer dereferencing if mbedtls_ssl_free() is called with a 17917901324dSJerome Forissier NULL pointer argument. Contributed by Sander Visser in #3312. 17927901324dSJerome Forissier * Fix potential linker errors on dual world platforms by inlining 17937901324dSJerome Forissier mbedtls_gcc_group_to_psa(). This allows the pk.c module to link separately 17947901324dSJerome Forissier from psa_crypto.c. Fixes #3300. 17957901324dSJerome Forissier * Remove dead code in X.509 certificate parsing. Contributed by irwir in 17967901324dSJerome Forissier #2855. 17977901324dSJerome Forissier * Include asn1.h in error.c. Fixes #3328 reported by David Hu. 17987901324dSJerome Forissier * Fix potential memory leaks in ecp_randomize_jac() and ecp_randomize_mxz() 17997901324dSJerome Forissier when PRNG function fails. Contributed by Jonas Lejeune in #3318. 18007901324dSJerome Forissier * Remove unused macros from MSVC projects. Reported in #3297 and fix 18017901324dSJerome Forissier submitted in #3333 by irwir. 18027901324dSJerome Forissier * Add additional bounds checks in ssl_write_client_hello() preventing 18037901324dSJerome Forissier output buffer overflow if the configuration declared a buffer that was 18047901324dSJerome Forissier too small. 18057901324dSJerome Forissier * Set _POSIX_C_SOURCE to at least 200112L in C99 code. Reported in #3420 and 18067901324dSJerome Forissier fix submitted in #3421 by Nia Alarie. 18077901324dSJerome Forissier * Fix building library/net_sockets.c and the ssl_mail_client program on 18087901324dSJerome Forissier NetBSD. Contributed by Nia Alarie in #3422. 18097901324dSJerome Forissier * Fix false positive uninitialised variable reported by cpp-check. 18107901324dSJerome Forissier Contributed by Sander Visser in #3311. 18117901324dSJerome Forissier * Update iv and len context pointers manually when reallocating buffers 18127901324dSJerome Forissier using the MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH feature. This caused issues 18137901324dSJerome Forissier when receiving a connection with CID, when these fields were shifted 18147901324dSJerome Forissier in ssl_parse_record_header(). 18157901324dSJerome Forissier 18167901324dSJerome ForissierChanges 18177901324dSJerome Forissier * Fix warnings about signedness issues in format strings. The build is now 18187901324dSJerome Forissier clean of -Wformat-signedness warnings. Contributed by Kenneth Soerensen 18197901324dSJerome Forissier in #3153. 18207901324dSJerome Forissier * Fix minor performance issue in operations on Curve25519 caused by using a 18217901324dSJerome Forissier suboptimal modular reduction in one place. Found and fix contributed by 18227901324dSJerome Forissier Aurelien Jarno in #3209. 18237901324dSJerome Forissier * Combine identical cases in switch statements in md.c. Contributed 18247901324dSJerome Forissier by irwir in #3208. 18257901324dSJerome Forissier * Simplify a bounds check in ssl_write_certificate_request(). Contributed 18267901324dSJerome Forissier by irwir in #3150. 18277901324dSJerome Forissier * Unify the example programs termination to call mbedtls_exit() instead of 18287901324dSJerome Forissier using a return command. This has been done to enable customization of the 18297901324dSJerome Forissier behavior in bare metal environments. 18307901324dSJerome Forissier * Fix mbedtls_x509_dn_gets to escape non-ASCII characters as "?". 18317901324dSJerome Forissier Contributed by Koh M. Nakagawa in #3326. 18327901324dSJerome Forissier * Use FindPython3 when cmake version >= 3.15.0 18337901324dSJerome Forissier * Abort the ClientHello writing function as soon as some extension doesn't 18347901324dSJerome Forissier fit into the record buffer. Previously, such extensions were silently 18357901324dSJerome Forissier dropped. As a consequence, the TLS handshake now fails when the output 18367901324dSJerome Forissier buffer is not large enough to hold the ClientHello. 18377901324dSJerome Forissier * The unit tests now rely on header files in tests/include/test and source 18387901324dSJerome Forissier files in tests/src. When building with make or cmake, the files in 18397901324dSJerome Forissier tests/src are compiled and the resulting object linked into each test 18407901324dSJerome Forissier executable. 18417901324dSJerome Forissier * The ECP module, enabled by `MBEDTLS_ECP_C`, now depends on 18427901324dSJerome Forissier `MBEDTLS_CTR_DRBG_C` or `MBEDTLS_HMAC_DRBG_C` for some side-channel 18437901324dSJerome Forissier coutermeasures. If side channels are not a concern, this dependency can 18447901324dSJerome Forissier be avoided by enabling the new option `MBEDTLS_ECP_NO_INTERNAL_RNG`. 18457901324dSJerome Forissier * Align MSVC error flag with GCC and Clang. Contributed by Carlos Gomes 18467901324dSJerome Forissier Martinho. #3147 18477901324dSJerome Forissier * Remove superfluous assignment in mbedtls_ssl_parse_certificate(). Reported 18487901324dSJerome Forissier in #3182 and fix submitted by irwir. #3217 18497901324dSJerome Forissier * Fix typo in XTS tests. Reported and fix submitted by Kxuan. #3319 18507901324dSJerome Forissier 185111fa71b9SJerome Forissier= mbed TLS 2.22.0 branch released 2020-04-14 185211fa71b9SJerome Forissier 185311fa71b9SJerome ForissierNew deprecations 185411fa71b9SJerome Forissier * Deprecate MBEDTLS_SSL_HW_RECORD_ACCEL that enables function hooks in the 185511fa71b9SJerome Forissier SSL module for hardware acceleration of individual records. 185611fa71b9SJerome Forissier * Deprecate mbedtls_ssl_get_max_frag_len() in favour of 185711fa71b9SJerome Forissier mbedtls_ssl_get_output_max_frag_len() and 185811fa71b9SJerome Forissier mbedtls_ssl_get_input_max_frag_len() to be more precise about which max 185911fa71b9SJerome Forissier fragment length is desired. 186011fa71b9SJerome Forissier 186111fa71b9SJerome ForissierSecurity 186211fa71b9SJerome Forissier * Fix issue in DTLS handling of new associations with the same parameters 186311fa71b9SJerome Forissier (RFC 6347 section 4.2.8): an attacker able to send forged UDP packets to 186411fa71b9SJerome Forissier the server could cause it to drop established associations with 186511fa71b9SJerome Forissier legitimate clients, resulting in a Denial of Service. This could only 186611fa71b9SJerome Forissier happen when MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE was enabled in config.h 186711fa71b9SJerome Forissier (which it is by default). 186811fa71b9SJerome Forissier * Fix side channel in ECC code that allowed an adversary with access to 186911fa71b9SJerome Forissier precise enough timing and memory access information (typically an 187011fa71b9SJerome Forissier untrusted operating system attacking a secure enclave) to fully recover 187111fa71b9SJerome Forissier an ECDSA private key. Found and reported by Alejandro Cabrera Aldaya, 187211fa71b9SJerome Forissier Billy Brumley and Cesar Pereida Garcia. CVE-2020-10932 187311fa71b9SJerome Forissier * Fix a potentially remotely exploitable buffer overread in a 187411fa71b9SJerome Forissier DTLS client when parsing the Hello Verify Request message. 187511fa71b9SJerome Forissier 187611fa71b9SJerome ForissierFeatures 187711fa71b9SJerome Forissier * The new build option MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH automatically 187811fa71b9SJerome Forissier resizes the I/O buffers before and after handshakes, reducing the memory 187911fa71b9SJerome Forissier consumption during application data transfer. 188011fa71b9SJerome Forissier 188111fa71b9SJerome ForissierBugfix 188211fa71b9SJerome Forissier * Fix compilation failure when both MBEDTLS_SSL_PROTO_DTLS and 188311fa71b9SJerome Forissier MBEDTLS_SSL_HW_RECORD_ACCEL are enabled. 188411fa71b9SJerome Forissier * Remove a spurious check in ssl_parse_client_psk_identity that triggered 188511fa71b9SJerome Forissier a warning with some compilers. Fix contributed by irwir in #2856. 188611fa71b9SJerome Forissier * Fix a function name in a debug message. Contributed by Ercan Ozturk in 188711fa71b9SJerome Forissier #3013. 188811fa71b9SJerome Forissier 188911fa71b9SJerome ForissierChanges 189011fa71b9SJerome Forissier * Mbed Crypto is no longer a Git submodule. The crypto part of the library 189111fa71b9SJerome Forissier is back directly in the present repository. 189211fa71b9SJerome Forissier * Split mbedtls_ssl_get_max_frag_len() into 189311fa71b9SJerome Forissier mbedtls_ssl_get_output_max_frag_len() and 189411fa71b9SJerome Forissier mbedtls_ssl_get_input_max_frag_len() to ensure that a sufficient input 189511fa71b9SJerome Forissier buffer is allocated by the server (if MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH 189611fa71b9SJerome Forissier is defined), regardless of what MFL was configured for it. 189711fa71b9SJerome Forissier 189811fa71b9SJerome Forissier= mbed TLS 2.21.0 branch released 2020-02-20 189911fa71b9SJerome Forissier 190011fa71b9SJerome ForissierNew deprecations 190111fa71b9SJerome Forissier * Deprecate MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO that enables parsing 190211fa71b9SJerome Forissier SSLv2 ClientHello messages. 190311fa71b9SJerome Forissier * Deprecate MBEDTLS_SSL_PROTO_SSL3 that enables support for SSLv3. 190411fa71b9SJerome Forissier * Deprecate for MBEDTLS_PKCS11_C, the wrapper around the pkcs11-helper 190511fa71b9SJerome Forissier library which allows TLS authentication to use keys stored in a 190611fa71b9SJerome Forissier PKCS#11 token such as a smartcard. 19075b25c76aSJerome Forissier 19085b25c76aSJerome ForissierSecurity 19095b25c76aSJerome Forissier * Fix potential memory overread when performing an ECDSA signature 19105b25c76aSJerome Forissier operation. The overread only happens with cryptographically low 19115b25c76aSJerome Forissier probability (of the order of 2^-n where n is the bitsize of the curve) 19125b25c76aSJerome Forissier unless the RNG is broken, and could result in information disclosure or 19135b25c76aSJerome Forissier denial of service (application crash or extra resource consumption). 19145b25c76aSJerome Forissier Found by Auke Zeilstra and Peter Schwabe, using static analysis. 19155b25c76aSJerome Forissier * To avoid a side channel vulnerability when parsing an RSA private key, 19165b25c76aSJerome Forissier read all the CRT parameters from the DER structure rather than 19175b25c76aSJerome Forissier reconstructing them. Found by Alejandro Cabrera Aldaya and Billy Bob 19185b25c76aSJerome Forissier Brumley. Reported and fix contributed by Jack Lloyd. 19195b25c76aSJerome Forissier ARMmbed/mbed-crypto#352 19205b25c76aSJerome Forissier 192111fa71b9SJerome ForissierFeatures 192211fa71b9SJerome Forissier * The new build option MBEDTLS_SHA512_NO_SHA384 allows building SHA-512 192311fa71b9SJerome Forissier support without SHA-384. 192411fa71b9SJerome Forissier 192511fa71b9SJerome ForissierAPI changes 192611fa71b9SJerome Forissier * Change the encoding of key types and curves in the PSA API. The new 192711fa71b9SJerome Forissier values are aligned with the upcoming release of the PSA Crypto API 192811fa71b9SJerome Forissier specification version 1.0.0. The main change which may break some 192911fa71b9SJerome Forissier existing code is that elliptic curve key types no longer encode the 193011fa71b9SJerome Forissier exact curve: a psa_ecc_curve_t or psa_key_type_t value only encodes 193111fa71b9SJerome Forissier a curve family and the key size determines the exact curve (for example, 193211fa71b9SJerome Forissier PSA_ECC_CURVE_SECP_R1 with 256 bits is P256R1). ARMmbed/mbed-crypto#330 193311fa71b9SJerome Forissier 19345b25c76aSJerome ForissierBugfix 19355b25c76aSJerome Forissier * Fix an unchecked call to mbedtls_md() in the x509write module. 193611fa71b9SJerome Forissier * Fix build failure with MBEDTLS_ZLIB_SUPPORT enabled. Reported by 193711fa71b9SJerome Forissier Jack Lloyd in #2859. Fix submitted by jiblime in #2963. 193811fa71b9SJerome Forissier * Fix some false-positive uninitialized variable warnings in X.509. Fix 193911fa71b9SJerome Forissier contributed by apple-ihack-geek in #2663. 194011fa71b9SJerome Forissier * Fix a possible error code mangling in psa_mac_verify_finish() when 194111fa71b9SJerome Forissier a cryptographic accelerator fails. ARMmbed/mbed-crypto#345 19425b25c76aSJerome Forissier * Fix a bug in mbedtls_pk_parse_key() that would cause it to accept some 19435b25c76aSJerome Forissier RSA keys that would later be rejected by functions expecting private 19445b25c76aSJerome Forissier keys. Found by Catena cyber using oss-fuzz (issue 20467). 194511fa71b9SJerome Forissier * Fix a bug in mbedtls_pk_parse_key() that would cause it to 194611fa71b9SJerome Forissier accept some RSA keys with invalid values by silently fixing those values. 19475b25c76aSJerome Forissier 194811fa71b9SJerome Forissier= mbed TLS 2.20.0 branch released 2020-01-15 194911fa71b9SJerome Forissier 195011fa71b9SJerome ForissierDefault behavior changes 195111fa71b9SJerome Forissier * The initial seeding of a CTR_DRBG instance makes a second call to the 195211fa71b9SJerome Forissier entropy function to obtain entropy for a nonce if the entropy size is less 195311fa71b9SJerome Forissier than 3/2 times the key size. In case you want to disable the extra call to 195411fa71b9SJerome Forissier grab entropy, you can call mbedtls_ctr_drbg_set_nonce_len() to force the 195511fa71b9SJerome Forissier nonce length to 0. 19565b25c76aSJerome Forissier 19575b25c76aSJerome ForissierSecurity 195811fa71b9SJerome Forissier * Enforce that mbedtls_entropy_func() gathers a total of 195911fa71b9SJerome Forissier MBEDTLS_ENTROPY_BLOCK_SIZE bytes or more from strong sources. In the 196011fa71b9SJerome Forissier default configuration, on a platform with a single entropy source, the 196111fa71b9SJerome Forissier entropy module formerly only grabbed 32 bytes, which is good enough for 196211fa71b9SJerome Forissier security if the source is genuinely strong, but less than the expected 64 196311fa71b9SJerome Forissier bytes (size of the entropy accumulator). 19645b25c76aSJerome Forissier * Zeroize local variables in mbedtls_internal_aes_encrypt() and 19655b25c76aSJerome Forissier mbedtls_internal_aes_decrypt() before exiting the function. The value of 19665b25c76aSJerome Forissier these variables can be used to recover the last round key. To follow best 19675b25c76aSJerome Forissier practice and to limit the impact of buffer overread vulnerabilities (like 19685b25c76aSJerome Forissier Heartbleed) we need to zeroize them before exiting the function. 19695b25c76aSJerome Forissier Issue reported by Tuba Yavuz, Farhaan Fowze, Ken (Yihang) Bai, 19705b25c76aSJerome Forissier Grant Hernandez, and Kevin Butler (University of Florida) and 19715b25c76aSJerome Forissier Dave Tian (Purdue University). 197211fa71b9SJerome Forissier * Fix side channel vulnerability in ECDSA. Our bignum implementation is not 197311fa71b9SJerome Forissier constant time/constant trace, so side channel attacks can retrieve the 197411fa71b9SJerome Forissier blinded value, factor it (as it is smaller than RSA keys and not guaranteed 197511fa71b9SJerome Forissier to have only large prime factors), and then, by brute force, recover the 197611fa71b9SJerome Forissier key. Reported by Alejandro Cabrera Aldaya and Billy Brumley. 19775b25c76aSJerome Forissier * Fix side channel vulnerability in ECDSA key generation. Obtaining precise 19785b25c76aSJerome Forissier timings on the comparison in the key generation enabled the attacker to 19795b25c76aSJerome Forissier learn leading bits of the ephemeral key used during ECDSA signatures and to 19805b25c76aSJerome Forissier recover the private key. Reported by Jeremy Dubeuf. 19815b25c76aSJerome Forissier * Catch failure of AES functions in mbedtls_ctr_drbg_random(). Uncaught 19825b25c76aSJerome Forissier failures could happen with alternative implementations of AES. Bug 19835b25c76aSJerome Forissier reported and fix proposed by Johan Uppman Bruce and Christoffer Lauri, 19845b25c76aSJerome Forissier Sectra. 19855b25c76aSJerome Forissier 198611fa71b9SJerome ForissierFeatures 198711fa71b9SJerome Forissier * Key derivation inputs in the PSA API can now either come from a key object 198811fa71b9SJerome Forissier or from a buffer regardless of the step type. 198911fa71b9SJerome Forissier * The CTR_DRBG module can grab a nonce from the entropy source during the 199011fa71b9SJerome Forissier initial seeding. The default nonce length is chosen based on the key size 199111fa71b9SJerome Forissier to achieve the security strength defined by NIST SP 800-90A. You can 199211fa71b9SJerome Forissier change it with mbedtls_ctr_drbg_set_nonce_len(). 199311fa71b9SJerome Forissier * Add ENUMERATED tag support to the ASN.1 module. Contributed by 199411fa71b9SJerome Forissier msopiha-linaro in ARMmbed/mbed-crypto#307. 199511fa71b9SJerome Forissier 199611fa71b9SJerome ForissierAPI changes 199711fa71b9SJerome Forissier * In the PSA API, forbid zero-length keys. To pass a zero-length input to a 199811fa71b9SJerome Forissier key derivation function, use a buffer instead (this is now always 199911fa71b9SJerome Forissier possible). 200011fa71b9SJerome Forissier * Rename psa_asymmetric_sign() to psa_sign_hash() and 200111fa71b9SJerome Forissier psa_asymmetric_verify() to psa_verify_hash(). 200211fa71b9SJerome Forissier 20035b25c76aSJerome ForissierBugfix 200411fa71b9SJerome Forissier * Fix an incorrect size in a debugging message. Reported and fix 200511fa71b9SJerome Forissier submitted by irwir. Fixes #2717. 200611fa71b9SJerome Forissier * Fix an unused variable warning when compiling without DTLS. 200711fa71b9SJerome Forissier Reported and fix submitted by irwir. Fixes #2800. 200811fa71b9SJerome Forissier * Remove a useless assignment. Reported and fix submitted by irwir. 200911fa71b9SJerome Forissier Fixes #2801. 201011fa71b9SJerome Forissier * Fix a buffer overflow in the PSA HMAC code when using a long key with an 201111fa71b9SJerome Forissier unsupported algorithm. Fixes ARMmbed/mbed-crypto#254. 201211fa71b9SJerome Forissier * Fix mbedtls_asn1_get_int to support any number of leading zeros. Credit 201311fa71b9SJerome Forissier to OSS-Fuzz for finding a bug in an intermediate version of the fix. 201411fa71b9SJerome Forissier * Fix mbedtls_asn1_get_bitstring_null to correctly parse bitstrings of at 201511fa71b9SJerome Forissier most 2 bytes. 201611fa71b9SJerome Forissier * mbedtls_ctr_drbg_set_entropy_len() and 201711fa71b9SJerome Forissier mbedtls_hmac_drbg_set_entropy_len() now work if you call them before 201811fa71b9SJerome Forissier mbedtls_ctr_drbg_seed() or mbedtls_hmac_drbg_seed(). 20195b25c76aSJerome Forissier 20205b25c76aSJerome ForissierChanges 202111fa71b9SJerome Forissier * Remove the technical possibility to define custom mbedtls_md_info 202211fa71b9SJerome Forissier structures, which was exposed only in an internal header. 202311fa71b9SJerome Forissier * psa_close_key(0) and psa_destroy_key(0) now succeed (doing nothing, as 202411fa71b9SJerome Forissier before). 202511fa71b9SJerome Forissier * Variables containing error codes are now initialized to an error code 202611fa71b9SJerome Forissier rather than success, so that coding mistakes or memory corruption tends to 202711fa71b9SJerome Forissier cause functions to return this error code rather than a success. There are 202811fa71b9SJerome Forissier no known instances where this changes the behavior of the library: this is 202911fa71b9SJerome Forissier merely a robustness improvement. ARMmbed/mbed-crypto#323 203011fa71b9SJerome Forissier * Remove a useless call to mbedtls_ecp_group_free(). Contributed by 203111fa71b9SJerome Forissier Alexander Krizhanovsky in ARMmbed/mbed-crypto#210. 203211fa71b9SJerome Forissier * Speed up PBKDF2 by caching the digest calculation. Contributed by Jack 203311fa71b9SJerome Forissier Lloyd and Fortanix Inc in ARMmbed/mbed-crypto#277. 203411fa71b9SJerome Forissier * Small performance improvement of mbedtls_mpi_div_mpi(). Contributed by 203511fa71b9SJerome Forissier Alexander Krizhanovsky in ARMmbed/mbed-crypto#308. 20365b25c76aSJerome Forissier 203711fa71b9SJerome Forissier= mbed TLS 2.19.1 branch released 2019-09-16 203811fa71b9SJerome Forissier 203911fa71b9SJerome ForissierFeatures 204011fa71b9SJerome Forissier * Declare include headers as PUBLIC to propagate to CMake project consumers 204111fa71b9SJerome Forissier Contributed by Zachary J. Fields in PR #2949. 204211fa71b9SJerome Forissier * Add nss_keylog to ssl_client2 and ssl_server2, enabling easier analysis of 204311fa71b9SJerome Forissier TLS sessions with tools like Wireshark. 204411fa71b9SJerome Forissier 204511fa71b9SJerome ForissierAPI Changes 204611fa71b9SJerome Forissier * Make client_random and server_random const in 204711fa71b9SJerome Forissier mbedtls_ssl_export_keys_ext_t, so that the key exporter is discouraged 204811fa71b9SJerome Forissier from modifying the client/server hello. 204911fa71b9SJerome Forissier 205011fa71b9SJerome ForissierBugfix 205111fa71b9SJerome Forissier * Fix some false-positive uninitialized variable warnings in crypto. Fix 205211fa71b9SJerome Forissier contributed by apple-ihack-geek in #2663. 205311fa71b9SJerome Forissier 205411fa71b9SJerome Forissier= mbed TLS 2.19.0 branch released 2019-09-06 20555b25c76aSJerome Forissier 20565b25c76aSJerome ForissierSecurity 20575b25c76aSJerome Forissier * Fix a missing error detection in ECJPAKE. This could have caused a 20585b25c76aSJerome Forissier predictable shared secret if a hardware accelerator failed and the other 20595b25c76aSJerome Forissier side of the key exchange had a similar bug. 20605b25c76aSJerome Forissier * When writing a private EC key, use a constant size for the private 20615b25c76aSJerome Forissier value, as specified in RFC 5915. Previously, the value was written 20625b25c76aSJerome Forissier as an ASN.1 INTEGER, which caused the size of the key to leak 20635b25c76aSJerome Forissier about 1 bit of information on average and could cause the value to be 20645b25c76aSJerome Forissier 1 byte too large for the output buffer. 206511fa71b9SJerome Forissier * The deterministic ECDSA calculation reused the scheme's HMAC-DRBG to 206611fa71b9SJerome Forissier implement blinding. Because of this for the same key and message the same 206711fa71b9SJerome Forissier blinding value was generated. This reduced the effectiveness of the 206811fa71b9SJerome Forissier countermeasure and leaked information about the private key through side 206911fa71b9SJerome Forissier channels. Reported by Jack Lloyd. 207011fa71b9SJerome Forissier 207111fa71b9SJerome ForissierFeatures 207211fa71b9SJerome Forissier * Add new API functions mbedtls_ssl_session_save() and 207311fa71b9SJerome Forissier mbedtls_ssl_session_load() to allow serializing a session, for example to 207411fa71b9SJerome Forissier store it in non-volatile storage, and later using it for TLS session 207511fa71b9SJerome Forissier resumption. 207611fa71b9SJerome Forissier * Add a new API function mbedtls_ssl_check_record() to allow checking that 207711fa71b9SJerome Forissier an incoming record is valid, authentic and has not been seen before. This 207811fa71b9SJerome Forissier feature can be used alongside Connection ID and SSL context serialisation. 207911fa71b9SJerome Forissier The feature is enabled at compile-time by MBEDTLS_SSL_RECORD_CHECKING 208011fa71b9SJerome Forissier option. 208111fa71b9SJerome Forissier * New implementation of X25519 (ECDH using Curve25519) from Project Everest 208211fa71b9SJerome Forissier (https://project-everest.github.io/). It can be enabled at compile time 208311fa71b9SJerome Forissier with MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED. This implementation is formally 208411fa71b9SJerome Forissier verified and significantly faster, but is only supported on x86 platforms 208511fa71b9SJerome Forissier (32-bit and 64-bit) using GCC, Clang or Visual Studio. Contributed by 208611fa71b9SJerome Forissier Christoph Wintersteiger from Microsoft Research. 208711fa71b9SJerome Forissier * Add mbedtls_net_close(), enabling the building of forking servers where 208811fa71b9SJerome Forissier the parent process closes the client socket and continue accepting, and 208911fa71b9SJerome Forissier the child process closes the listening socket and handles the client 209011fa71b9SJerome Forissier socket. Contributed by Robert Larsen in #2803. 20915b25c76aSJerome Forissier 20925b25c76aSJerome ForissierAPI Changes 209311fa71b9SJerome Forissier * Add DER-encoded test CRTs to library/certs.c, allowing 209411fa71b9SJerome Forissier the example programs ssl_server2 and ssl_client2 to be run 209511fa71b9SJerome Forissier if MBEDTLS_FS_IO and MBEDTLS_PEM_PARSE_C are unset. Fixes #2254. 209611fa71b9SJerome Forissier * The HAVEGE state type now uses uint32_t elements instead of int. 209711fa71b9SJerome Forissier * The functions mbedtls_ecp_curve_list() and mbedtls_ecp_grp_id_list() now 209811fa71b9SJerome Forissier list all curves for which at least one of ECDH or ECDSA is supported, not 209911fa71b9SJerome Forissier just curves for which both are supported. Call mbedtls_ecdsa_can_do() or 210011fa71b9SJerome Forissier mbedtls_ecdh_can_do() on each result to check whether each algorithm is 210111fa71b9SJerome Forissier supported. 21025b25c76aSJerome Forissier * The new function mbedtls_ecdsa_sign_det_ext() is similar to 21035b25c76aSJerome Forissier mbedtls_ecdsa_sign_det() but allows passing an external RNG for the 21045b25c76aSJerome Forissier purpose of blinding. 21055b25c76aSJerome Forissier 210611fa71b9SJerome ForissierNew deprecations 210711fa71b9SJerome Forissier * Deprecate mbedtls_ecdsa_sign_det() in favor of a functions that can take an 210811fa71b9SJerome Forissier RNG function as an input. 210911fa71b9SJerome Forissier * Calling mbedtls_ecdsa_write_signature() with NULL as the f_rng argument 211011fa71b9SJerome Forissier is now deprecated. 211111fa71b9SJerome Forissier 21125b25c76aSJerome ForissierBugfix 211311fa71b9SJerome Forissier * Fix missing bounds checks in X.509 parsing functions that could 211411fa71b9SJerome Forissier lead to successful parsing of ill-formed X.509 CRTs. Fixes #2437. 211511fa71b9SJerome Forissier * Fix multiple X.509 functions previously returning ASN.1 low-level error 211611fa71b9SJerome Forissier codes to always wrap these codes into X.509 high level error codes before 211711fa71b9SJerome Forissier returning. Fixes #2431. 21185b25c76aSJerome Forissier * Fix to allow building test suites with any warning that detects unused 21195b25c76aSJerome Forissier functions. Fixes #1628. 21205b25c76aSJerome Forissier * Fix typo in net_would_block(). Fixes #528 reported by github-monoculture. 21215b25c76aSJerome Forissier * Remove redundant include file in timing.c. Fixes #2640 reported by irwir. 212211fa71b9SJerome Forissier * Fix build failure when building with mingw on Windows by including 212311fa71b9SJerome Forissier stdarg.h where needed. Fixes #2656. 21245b25c76aSJerome Forissier * Fix Visual Studio Release x64 build configuration by inheriting 21255b25c76aSJerome Forissier PlatformToolset from the project configuration. Fixes #1430 reported by 21265b25c76aSJerome Forissier irwir. 21275b25c76aSJerome Forissier * Enable Suite B with subset of ECP curves. Make sure the code compiles even 21285b25c76aSJerome Forissier if some curves are not defined. Fixes #1591 reported by dbedev. 21295b25c76aSJerome Forissier * Fix misuse of signed arithmetic in the HAVEGE module. #2598 213011fa71b9SJerome Forissier * Avoid use of statically sized stack buffers for certificate writing. 213111fa71b9SJerome Forissier This previously limited the maximum size of DER encoded certificates 213211fa71b9SJerome Forissier in mbedtls_x509write_crt_der() to 2Kb. Reported by soccerGB in #2631. 213311fa71b9SJerome Forissier * Fix partial zeroing in x509_get_other_name. Found and fixed by ekse, #2716. 21345b25c76aSJerome Forissier * Update test certificates that were about to expire. Reported by 21355b25c76aSJerome Forissier Bernhard M. Wiedemann in #2357. 21365b25c76aSJerome Forissier * Fix the build on ARMv5TE in ARM mode to not use assembly instructions 21375b25c76aSJerome Forissier that are only available in Thumb mode. Fix contributed by Aurelien Jarno 21385b25c76aSJerome Forissier in #2169. 21395b25c76aSJerome Forissier * Fix propagation of restart contexts in restartable EC operations. 21405b25c76aSJerome Forissier This could previously lead to segmentation faults in builds using an 21415b25c76aSJerome Forissier address-sanitizer and enabling but not using MBEDTLS_ECP_RESTARTABLE. 21425b25c76aSJerome Forissier * Fix memory leak in in mpi_miller_rabin(). Contributed by 21435b25c76aSJerome Forissier Jens Wiklander <jens.wiklander@linaro.org> in #2363 21445b25c76aSJerome Forissier * Improve code clarity in x509_crt module, removing false-positive 21455b25c76aSJerome Forissier uninitialized variable warnings on some recent toolchains (GCC8, etc). 21465b25c76aSJerome Forissier Discovered and fixed by Andy Gross (Linaro), #2392. 21475b25c76aSJerome Forissier * Fix bug in endianness conversion in bignum module. This lead to 21485b25c76aSJerome Forissier functionally incorrect code on bigendian systems which don't have 21495b25c76aSJerome Forissier __BYTE_ORDER__ defined. Reported by Brendan Shanks. Fixes #2622. 21505b25c76aSJerome Forissier 21515b25c76aSJerome ForissierChanges 215211fa71b9SJerome Forissier * Replace multiple uses of MD2 by SHA-256 in X.509 test suite. Fixes #821. 21535b25c76aSJerome Forissier * Make it easier to define MBEDTLS_PARAM_FAILED as assert (which config.h 21545b25c76aSJerome Forissier suggests). #2671 21555b25c76aSJerome Forissier * Make `make clean` clean all programs always. Fixes #1862. 215611fa71b9SJerome Forissier * Add a Dockerfile and helper scripts (all-in-docker.sh, basic-in-docker.sh, 215711fa71b9SJerome Forissier docker-env.sh) to simplify running test suites on a Linux host. Contributed 215811fa71b9SJerome Forissier by Peter Kolbus (Garmin). 215911fa71b9SJerome Forissier * Add `reproducible` option to `ssl_client2` and `ssl_server2` to enable 216011fa71b9SJerome Forissier test runs without variability. Contributed by Philippe Antoine (Catena 216111fa71b9SJerome Forissier cyber) in #2681. 216211fa71b9SJerome Forissier * Extended .gitignore to ignore Visual Studio artifacts. Fixed by ConfusedSushi. 216311fa71b9SJerome Forissier * Adds fuzz targets, especially for continuous fuzzing with OSS-Fuzz. 216411fa71b9SJerome Forissier Contributed by Philippe Antoine (Catena cyber). 216511fa71b9SJerome Forissier * Remove the crypto part of the library from Mbed TLS. The crypto 216611fa71b9SJerome Forissier code and tests are now only available via Mbed Crypto, which 216711fa71b9SJerome Forissier Mbed TLS references as a Git submodule. 21685b25c76aSJerome Forissier 216911fa71b9SJerome Forissier= mbed TLS 2.18.1 branch released 2019-07-12 21705b25c76aSJerome Forissier 21715b25c76aSJerome ForissierBugfix 217211fa71b9SJerome Forissier * Fix build failure when building with mingw on Windows by including 217311fa71b9SJerome Forissier stdarg.h where needed. Fixes #2656. 217411fa71b9SJerome Forissier 217511fa71b9SJerome ForissierChanges 217611fa71b9SJerome Forissier * Enable building of Mbed TLS as a CMake subproject. Suggested and fixed by 217711fa71b9SJerome Forissier Ashley Duncan in #2609. 217811fa71b9SJerome Forissier 217911fa71b9SJerome Forissier= mbed TLS 2.18.0 branch released 2019-06-11 218011fa71b9SJerome Forissier 218111fa71b9SJerome ForissierFeatures 218211fa71b9SJerome Forissier * Add the Any Policy certificate policy oid, as defined in 218311fa71b9SJerome Forissier rfc 5280 section 4.2.1.4. 218411fa71b9SJerome Forissier * It is now possible to use NIST key wrap mode via the mbedtls_cipher API. 218511fa71b9SJerome Forissier Contributed by Jack Lloyd and Fortanix Inc. 218611fa71b9SJerome Forissier * Add the Wi-SUN Field Area Network (FAN) device extended key usage. 218711fa71b9SJerome Forissier * Add the oid certificate policy x509 extension. 218811fa71b9SJerome Forissier * It is now possible to perform RSA PKCS v1.5 signatures with RIPEMD-160 digest. 218911fa71b9SJerome Forissier Contributed by Jack Lloyd and Fortanix Inc. 219011fa71b9SJerome Forissier * Extend the MBEDTLS_SSL_EXPORT_KEYS to export the handshake randbytes, 219111fa71b9SJerome Forissier and the used tls-prf. 219211fa71b9SJerome Forissier * Add public API for tls-prf function, according to requested enum. 219311fa71b9SJerome Forissier * Add support for parsing otherName entries in the Subject Alternative Name 219411fa71b9SJerome Forissier X.509 certificate extension, specifically type hardware module name, 219511fa71b9SJerome Forissier as defined in RFC 4108 section 5. 219611fa71b9SJerome Forissier * Add support for parsing certificate policies extension, as defined in 219711fa71b9SJerome Forissier RFC 5280 section 4.2.1.4. Currently, only the "Any Policy" policy is 219811fa71b9SJerome Forissier supported. 219911fa71b9SJerome Forissier * List all SAN types in the subject_alt_names field of the certificate. 220011fa71b9SJerome Forissier Resolves #459. 220111fa71b9SJerome Forissier * Add support for draft-05 of the Connection ID extension, as specified 220211fa71b9SJerome Forissier in https://tools.ietf.org/html/draft-ietf-tls-dtls-connection-id-05. 220311fa71b9SJerome Forissier The Connection ID extension allows to keep DTLS connections beyond the 220411fa71b9SJerome Forissier lifetime of the underlying transport by adding a connection identifier 220511fa71b9SJerome Forissier to the DTLS record header. This identifier can be used to associated an 220611fa71b9SJerome Forissier incoming record with the correct connection data even after the peer has 220711fa71b9SJerome Forissier changed its IP or port. The feature is enabled at compile-time by setting 220811fa71b9SJerome Forissier MBEDTLS_SSL_DTLS_CONNECTION_ID (disabled by default), and at run-time 220911fa71b9SJerome Forissier through the new APIs mbedtls_ssl_conf_cid() and mbedtls_ssl_set_cid(). 221011fa71b9SJerome Forissier 221111fa71b9SJerome Forissier 221211fa71b9SJerome ForissierAPI Changes 221311fa71b9SJerome Forissier * Extend the MBEDTLS_SSL_EXPORT_KEYS to export the handshake randbytes, 221411fa71b9SJerome Forissier and the used tls-prf. 221511fa71b9SJerome Forissier * Add public API for tls-prf function, according to requested enum. 221611fa71b9SJerome Forissier 221711fa71b9SJerome ForissierBugfix 22185b25c76aSJerome Forissier * Fix private key DER output in the key_app_writer example. File contents 22195b25c76aSJerome Forissier were shifted by one byte, creating an invalid ASN.1 tag. Fixed by 22205b25c76aSJerome Forissier Christian Walther in #2239. 22215b25c76aSJerome Forissier * Fix potential memory leak in X.509 self test. Found and fixed by 22225b25c76aSJerome Forissier Junhwan Park, #2106. 22235b25c76aSJerome Forissier * Reduce stack usage of hkdf tests. Fixes #2195. 22245b25c76aSJerome Forissier * Fix 1-byte buffer overflow in mbedtls_mpi_write_string() when 22255b25c76aSJerome Forissier used with negative inputs. Found by Guido Vranken in #2404. Credit to 22265b25c76aSJerome Forissier OSS-Fuzz. 22275b25c76aSJerome Forissier * Fix bugs in the AEAD test suite which would be exposed by ciphers which 22285b25c76aSJerome Forissier either used both encrypt and decrypt key schedules, or which perform padding. 22295b25c76aSJerome Forissier GCM and CCM were not affected. Fixed by Jack Lloyd. 22305b25c76aSJerome Forissier * Fix incorrect default port number in ssl_mail_client example's usage. 22315b25c76aSJerome Forissier Found and fixed by irwir. #2337 223211fa71b9SJerome Forissier * Add psa_util.h to test/cpp_dummy_build to fix build_default_make_gcc_and_cxx. 223311fa71b9SJerome Forissier Fixed by Peter Kolbus (Garmin). #2579 22345b25c76aSJerome Forissier * Add missing parentheses around parameters in the definition of the 22355b25c76aSJerome Forissier public macro MBEDTLS_X509_ID_FLAG. This could lead to invalid evaluation 22365b25c76aSJerome Forissier in case operators binding less strongly than subtraction were used 22375b25c76aSJerome Forissier for the parameter. 22385b25c76aSJerome Forissier * Add a check for MBEDTLS_X509_CRL_PARSE_C in ssl_server2, guarding the crl 22395b25c76aSJerome Forissier sni entry parameter. Reported by inestlerode in #560. 224011fa71b9SJerome Forissier * Set the next sequence of the subject_alt_name to NULL when deleting 224111fa71b9SJerome Forissier sequence on failure. Found and fix suggested by Philippe Antoine. 224211fa71b9SJerome Forissier Credit to OSS-Fuzz. 22435b25c76aSJerome Forissier 22445b25c76aSJerome ForissierChanges 224511fa71b9SJerome Forissier * Server's RSA certificate in certs.c was SHA-1 signed. In the default 224611fa71b9SJerome Forissier mbedTLS configuration only SHA-2 signed certificates are accepted. 224711fa71b9SJerome Forissier This certificate is used in the demo server programs, which lead the 224811fa71b9SJerome Forissier client programs to fail at the peer's certificate verification 224911fa71b9SJerome Forissier due to an unacceptable hash signature. The certificate has been 225011fa71b9SJerome Forissier updated to one that is SHA-256 signed. Fix contributed by 225111fa71b9SJerome Forissier Illya Gerasymchuk. 22525b25c76aSJerome Forissier * Return from various debugging routines immediately if the 22535b25c76aSJerome Forissier provided SSL context is unset. 22545b25c76aSJerome Forissier * Remove dead code from bignum.c in the default configuration. 22555b25c76aSJerome Forissier Found by Coverity, reported and fixed by Peter Kolbus (Garmin). Fixes #2309. 22565b25c76aSJerome Forissier * Add test for minimal value of MBEDTLS_MPI_WINDOW_SIZE to all.sh. 22575b25c76aSJerome Forissier Contributed by Peter Kolbus (Garmin). 22585b25c76aSJerome Forissier * Change wording in the `mbedtls_ssl_conf_max_frag_len()`'s documentation to 22595b25c76aSJerome Forissier improve clarity. Fixes #2258. 22605b25c76aSJerome Forissier 226111fa71b9SJerome Forissier= mbed TLS 2.17.0 branch released 2019-03-19 22625b25c76aSJerome Forissier 22635b25c76aSJerome ForissierFeatures 226411fa71b9SJerome Forissier * Add a new X.509 API call `mbedtls_x509_parse_der_nocopy()` 226511fa71b9SJerome Forissier which allows copy-less parsing of DER encoded X.509 CRTs, 226611fa71b9SJerome Forissier at the cost of additional lifetime constraints on the input 226711fa71b9SJerome Forissier buffer, but at the benefit of reduced RAM consumption. 226811fa71b9SJerome Forissier * Add a new function mbedtls_asn1_write_named_bitstring() to write ASN.1 226911fa71b9SJerome Forissier named bitstring in DER as required by RFC 5280 Appendix B. 22705b25c76aSJerome Forissier * Add MBEDTLS_REMOVE_3DES_CIPHERSUITES to allow removing 3DES ciphersuites 22715b25c76aSJerome Forissier from the default list (enabled by default). See 22725b25c76aSJerome Forissier https://sweet32.info/SWEET32_CCS16.pdf. 22735b25c76aSJerome Forissier 227411fa71b9SJerome ForissierAPI Changes 227511fa71b9SJerome Forissier * Add a new X.509 API call `mbedtls_x509_parse_der_nocopy()`. 227611fa71b9SJerome Forissier See the Features section for more information. 227711fa71b9SJerome Forissier * Allow to opt in to the removal the API mbedtls_ssl_get_peer_cert() 227811fa71b9SJerome Forissier for the benefit of saving RAM, by disabling the new compile-time 227911fa71b9SJerome Forissier option MBEDTLS_SSL_KEEP_PEER_CERTIFICATE (enabled by default for 228011fa71b9SJerome Forissier API stability). Disabling this option makes mbedtls_ssl_get_peer_cert() 228111fa71b9SJerome Forissier always return NULL, and removes the peer_cert field from the 228211fa71b9SJerome Forissier mbedtls_ssl_session structure which otherwise stores the peer's 228311fa71b9SJerome Forissier certificate. 228411fa71b9SJerome Forissier 228511fa71b9SJerome ForissierSecurity 228611fa71b9SJerome Forissier * Make mbedtls_ecdh_get_params return an error if the second key 228711fa71b9SJerome Forissier belongs to a different group from the first. Before, if an application 228811fa71b9SJerome Forissier passed keys that belonged to different group, the first key's data was 228911fa71b9SJerome Forissier interpreted according to the second group, which could lead to either 229011fa71b9SJerome Forissier an error or a meaningless output from mbedtls_ecdh_get_params. In the 229111fa71b9SJerome Forissier latter case, this could expose at most 5 bits of the private key. 229211fa71b9SJerome Forissier 22935b25c76aSJerome ForissierBugfix 22945b25c76aSJerome Forissier * Fix a compilation issue with mbedtls_ecp_restart_ctx not being defined 22955b25c76aSJerome Forissier when MBEDTLS_ECP_ALT is defined. Reported by jwhui. Fixes #2242. 22965b25c76aSJerome Forissier * Run the AD too long test only if MBEDTLS_CCM_ALT is not defined. 22975b25c76aSJerome Forissier Raised as a comment in #1996. 22985b25c76aSJerome Forissier * Reduce the stack consumption of mbedtls_mpi_fill_random() which could 22995b25c76aSJerome Forissier previously lead to a stack overflow on constrained targets. 23005b25c76aSJerome Forissier * Add `MBEDTLS_SELF_TEST` for the mbedtls_self_test functions 23015b25c76aSJerome Forissier in the header files, which missed the precompilation check. #971 230211fa71b9SJerome Forissier * Fix returning the value 1 when mbedtls_ecdsa_genkey failed. 230311fa71b9SJerome Forissier * Remove a duplicate #include in a sample program. Fixed by Masashi Honma #2326. 230411fa71b9SJerome Forissier * Remove the mbedtls namespacing from the header file, to fix a "file not found" 230511fa71b9SJerome Forissier build error. Fixed by Haijun Gu #2319. 23065b25c76aSJerome Forissier * Fix signed-to-unsigned integer conversion warning 23075b25c76aSJerome Forissier in X.509 module. Fixes #2212. 23085b25c76aSJerome Forissier * Reduce stack usage of `mpi_write_hlp()` by eliminating recursion. 23095b25c76aSJerome Forissier Fixes #2190. 23105b25c76aSJerome Forissier * Fix false failure in all.sh when backup files exist in include/mbedtls 23115b25c76aSJerome Forissier (e.g. config.h.bak). Fixed by Peter Kolbus (Garmin) #2407. 23125b25c76aSJerome Forissier * Ensure that unused bits are zero when writing ASN.1 bitstrings when using 23135b25c76aSJerome Forissier mbedtls_asn1_write_bitstring(). 23145b25c76aSJerome Forissier * Fix issue when writing the named bitstrings in KeyUsage and NsCertType 23155b25c76aSJerome Forissier extensions in CSRs and CRTs that caused these bitstrings to not be encoded 23165b25c76aSJerome Forissier correctly as trailing zeroes were not accounted for as unused bits in the 23175b25c76aSJerome Forissier leading content octet. Fixes #1610. 23185b25c76aSJerome Forissier 23195b25c76aSJerome ForissierChanges 232011fa71b9SJerome Forissier * Reduce RAM consumption during session renegotiation by not storing 232111fa71b9SJerome Forissier the peer CRT chain and session ticket twice. 23225b25c76aSJerome Forissier * Include configuration file in all header files that use configuration, 23235b25c76aSJerome Forissier instead of relying on other header files that they include. 23245b25c76aSJerome Forissier Inserted as an enhancement for #1371 23255b25c76aSJerome Forissier * Add support for alternative CSR headers, as used by Microsoft and defined 23265b25c76aSJerome Forissier in RFC 7468. Found by Michael Ernst. Fixes #767. 232711fa71b9SJerome Forissier * Correct many misspellings. Fixed by MisterDA #2371. 232811fa71b9SJerome Forissier * Provide an abstraction of vsnprintf to allow alternative implementations 232911fa71b9SJerome Forissier for platforms that don't provide it. Based on contributions by Joris Aerts 233011fa71b9SJerome Forissier and Nathaniel Wesley Filardo. 233111fa71b9SJerome Forissier * Fix clobber list in MIPS assembly for large integer multiplication. 233211fa71b9SJerome Forissier Previously, this could lead to functionally incorrect assembly being 233311fa71b9SJerome Forissier produced by some optimizing compilers, showing up as failures in 233411fa71b9SJerome Forissier e.g. RSA or ECC signature operations. Reported in #1722, fix suggested 233511fa71b9SJerome Forissier by Aurelien Jarno and submitted by Jeffrey Martin. 23365b25c76aSJerome Forissier * Reduce the complexity of the timing tests. They were assuming more than the 23375b25c76aSJerome Forissier underlying OS actually guarantees. 233811fa71b9SJerome Forissier * Fix configuration queries in ssl-opt.h. #2030 233911fa71b9SJerome Forissier * Ensure that ssl-opt.h can be run in OS X. #2029 23405b25c76aSJerome Forissier * Re-enable certain interoperability tests in ssl-opt.sh which had previously 23415b25c76aSJerome Forissier been disabled for lack of a sufficiently recent version of GnuTLS on the CI. 23425b25c76aSJerome Forissier * Ciphersuites based on 3DES now have the lowest priority by default when 23435b25c76aSJerome Forissier they are enabled. 23445b25c76aSJerome Forissier 23453d3b0591SJens Wiklander= mbed TLS 2.16.0 branch released 2018-12-21 23463d3b0591SJens Wiklander 23473d3b0591SJens WiklanderFeatures 23483d3b0591SJens Wiklander * Add a new config.h option of MBEDTLS_CHECK_PARAMS that enables validation 23493d3b0591SJens Wiklander of parameters in the API. This allows detection of obvious misuses of the 23503d3b0591SJens Wiklander API, such as passing NULL pointers. The API of existing functions hasn't 23513d3b0591SJens Wiklander changed, but requirements on parameters have been made more explicit in 23523d3b0591SJens Wiklander the documentation. See the corresponding API documentation for each 23533d3b0591SJens Wiklander function to see for which parameter values it is defined. This feature is 23543d3b0591SJens Wiklander disabled by default. See its API documentation in config.h for additional 23553d3b0591SJens Wiklander steps you have to take when enabling it. 23563d3b0591SJens Wiklander 23573d3b0591SJens WiklanderAPI Changes 23583d3b0591SJens Wiklander * The following functions in the random generator modules have been 23593d3b0591SJens Wiklander deprecated and replaced as shown below. The new functions change 23603d3b0591SJens Wiklander the return type from void to int to allow returning error codes when 23613d3b0591SJens Wiklander using MBEDTLS_<MODULE>_ALT for the underlying AES or message digest 23623d3b0591SJens Wiklander primitive. Fixes #1798. 23633d3b0591SJens Wiklander mbedtls_ctr_drbg_update() -> mbedtls_ctr_drbg_update_ret() 23643d3b0591SJens Wiklander mbedtls_hmac_drbg_update() -> mbedtls_hmac_drbg_update_ret() 23653d3b0591SJens Wiklander * Extend ECDH interface to enable alternative implementations. 23663d3b0591SJens Wiklander * Deprecate error codes of the form MBEDTLS_ERR_xxx_INVALID_KEY_LENGTH for 23673d3b0591SJens Wiklander ARIA, CAMELLIA and Blowfish. These error codes will be replaced by 23683d3b0591SJens Wiklander the more generic per-module error codes MBEDTLS_ERR_xxx_BAD_INPUT_DATA. 23693d3b0591SJens Wiklander * Additional parameter validation checks have been added for the following 23703d3b0591SJens Wiklander modules - AES, ARIA, Blowfish, CAMELLIA, CCM, GCM, DHM, ECP, ECDSA, ECDH, 23713d3b0591SJens Wiklander ECJPAKE, SHA, Chacha20 and Poly1305, cipher, pk, RSA, and MPI. 23723d3b0591SJens Wiklander Where modules have had parameter validation added, existing parameter 23733d3b0591SJens Wiklander checks may have changed. Some modules, such as Chacha20 had existing 23743d3b0591SJens Wiklander parameter validation whereas other modules had little. This has now been 23753d3b0591SJens Wiklander changed so that the same level of validation is present in all modules, and 23763d3b0591SJens Wiklander that it is now optional with the MBEDTLS_CHECK_PARAMS flag which by default 23773d3b0591SJens Wiklander is off. That means that checks which were previously present by default 23783d3b0591SJens Wiklander will no longer be. 23793d3b0591SJens Wiklander 23803d3b0591SJens WiklanderNew deprecations 23813d3b0591SJens Wiklander * Deprecate mbedtls_ctr_drbg_update and mbedtls_hmac_drbg_update 23823d3b0591SJens Wiklander in favor of functions that can return an error code. 2383817466cbSJens Wiklander 2384817466cbSJens WiklanderBugfix 23853d3b0591SJens Wiklander * Fix for Clang, which was reporting a warning for the bignum.c inline 23863d3b0591SJens Wiklander assembly for AMD64 targets creating string literals greater than those 23873d3b0591SJens Wiklander permitted by the ISO C99 standard. Found by Aaron Jones. Fixes #482. 23883d3b0591SJens Wiklander * Fix runtime error in `mbedtls_platform_entropy_poll()` when run 23893d3b0591SJens Wiklander through qemu user emulation. Reported and fix suggested by randombit 23903d3b0591SJens Wiklander in #1212. Fixes #1212. 23913d3b0591SJens Wiklander * Fix an unsafe bounds check when restoring an SSL session from a ticket. 23923d3b0591SJens Wiklander This could lead to a buffer overflow, but only in case ticket authentication 23933d3b0591SJens Wiklander was broken. Reported and fix suggested by Guido Vranken in #659. 23943d3b0591SJens Wiklander * Add explicit integer to enumeration type casts to example program 23953d3b0591SJens Wiklander programs/pkey/gen_key which previously led to compilation failure 23963d3b0591SJens Wiklander on some toolchains. Reported by phoenixmcallister. Fixes #2170. 23973d3b0591SJens Wiklander * Fix double initialization of ECC hardware that made some accelerators 23983d3b0591SJens Wiklander hang. 23993d3b0591SJens Wiklander * Clarify documentation of mbedtls_ssl_set_own_cert() regarding the absence 24003d3b0591SJens Wiklander of check for certificate/key matching. Reported by Attila Molnar, #507. 24013d3b0591SJens Wiklander 240211fa71b9SJerome Forissier = mbed TLS 2.15.1 branch released 2018-11-30 240311fa71b9SJerome Forissier 240411fa71b9SJerome Forissier Changes 240511fa71b9SJerome Forissier * Update the Mbed Crypto submodule to version 0.1.0b2. 240611fa71b9SJerome Forissier 240711fa71b9SJerome Forissier = mbed TLS 2.15.0 branch released 2018-11-23 240811fa71b9SJerome Forissier 240911fa71b9SJerome Forissier Features 241011fa71b9SJerome Forissier * Add an experimental build option, USE_CRYPTO_SUBMODULE, to enable use of 241111fa71b9SJerome Forissier Mbed Crypto as the source of the cryptography implementation. 241211fa71b9SJerome Forissier * Add an experimental configuration option, MBEDTLS_PSA_CRYPTO_C, to enable 241311fa71b9SJerome Forissier the PSA Crypto API from Mbed Crypto when additionally used with the 241411fa71b9SJerome Forissier USE_CRYPTO_SUBMODULE build option. 241511fa71b9SJerome Forissier 241611fa71b9SJerome Forissier Changes 241711fa71b9SJerome Forissier * Add unit tests for AES-GCM when called through mbedtls_cipher_auth_xxx() 241811fa71b9SJerome Forissier from the cipher abstraction layer. Fixes #2198. 241911fa71b9SJerome Forissier 24203d3b0591SJens Wiklander= mbed TLS 2.14.1 branch released 2018-11-30 24213d3b0591SJens Wiklander 24223d3b0591SJens WiklanderSecurity 24233d3b0591SJens Wiklander * Fix timing variations and memory access variations in RSA PKCS#1 v1.5 24243d3b0591SJens Wiklander decryption that could lead to a Bleichenbacher-style padding oracle 24253d3b0591SJens Wiklander attack. In TLS, this affects servers that accept ciphersuites based on 24263d3b0591SJens Wiklander RSA decryption (i.e. ciphersuites whose name contains RSA but not 24273d3b0591SJens Wiklander (EC)DH(E)). Discovered by Eyal Ronen (Weizmann Institute), Robert Gillham 24283d3b0591SJens Wiklander (University of Adelaide), Daniel Genkin (University of Michigan), 24293d3b0591SJens Wiklander Adi Shamir (Weizmann Institute), David Wong (NCC Group), and Yuval Yarom 24303d3b0591SJens Wiklander (University of Adelaide, Data61). The attack is described in more detail 24313d3b0591SJens Wiklander in the paper available here: http://cat.eyalro.net/cat.pdf CVE-2018-19608 24323d3b0591SJens Wiklander * In mbedtls_mpi_write_binary(), don't leak the exact size of the number 24333d3b0591SJens Wiklander via branching and memory access patterns. An attacker who could submit 24343d3b0591SJens Wiklander a plaintext for RSA PKCS#1 v1.5 decryption but only observe the timing 24353d3b0591SJens Wiklander of the decryption and not its result could nonetheless decrypt RSA 24363d3b0591SJens Wiklander plaintexts and forge RSA signatures. Other asymmetric algorithms may 24373d3b0591SJens Wiklander have been similarly vulnerable. Reported by Eyal Ronen, Robert Gillham, 24383d3b0591SJens Wiklander Daniel Genkin, Adi Shamir, David Wong and Yuval Yarom. 24393d3b0591SJens Wiklander * Wipe sensitive buffers on the stack in the CTR_DRBG and HMAC_DRBG 24403d3b0591SJens Wiklander modules. 24413d3b0591SJens Wiklander 24423d3b0591SJens WiklanderAPI Changes 24433d3b0591SJens Wiklander * The new functions mbedtls_ctr_drbg_update_ret() and 24443d3b0591SJens Wiklander mbedtls_hmac_drbg_update_ret() are similar to mbedtls_ctr_drbg_update() 24453d3b0591SJens Wiklander and mbedtls_hmac_drbg_update() respectively, but the new functions 24463d3b0591SJens Wiklander report errors whereas the old functions return void. We recommend that 24473d3b0591SJens Wiklander applications use the new functions. 24483d3b0591SJens Wiklander 24493d3b0591SJens Wiklander= mbed TLS 2.14.0 branch released 2018-11-19 24503d3b0591SJens Wiklander 24513d3b0591SJens WiklanderSecurity 24523d3b0591SJens Wiklander * Fix overly strict DN comparison when looking for CRLs belonging to a 24533d3b0591SJens Wiklander particular CA. This previously led to ignoring CRLs when the CRL's issuer 24543d3b0591SJens Wiklander name and the CA's subject name differed in their string encoding (e.g., 24553d3b0591SJens Wiklander one using PrintableString and the other UTF8String) or in the choice of 24563d3b0591SJens Wiklander upper and lower case. Reported by Henrik Andersson of Bosch GmbH in issue 24573d3b0591SJens Wiklander #1784. 24583d3b0591SJens Wiklander * Fix a flawed bounds check in server PSK hint parsing. In case the 24593d3b0591SJens Wiklander incoming message buffer was placed within the first 64KiB of address 24603d3b0591SJens Wiklander space and a PSK-(EC)DHE ciphersuite was used, this allowed an attacker 24613d3b0591SJens Wiklander to trigger a memory access up to 64KiB beyond the incoming message buffer, 24623d3b0591SJens Wiklander potentially leading to an application crash or information disclosure. 24633d3b0591SJens Wiklander * Fix mbedtls_mpi_is_prime() to use more rounds of probabilistic testing. The 24643d3b0591SJens Wiklander previous settings for the number of rounds made it practical for an 24653d3b0591SJens Wiklander adversary to construct non-primes that would be erroneously accepted as 24663d3b0591SJens Wiklander primes with high probability. This does not have an impact on the 24673d3b0591SJens Wiklander security of TLS, but can matter in other contexts with numbers chosen 24683d3b0591SJens Wiklander potentially by an adversary that should be prime and can be validated. 24693d3b0591SJens Wiklander For example, the number of rounds was enough to securely generate RSA key 24703d3b0591SJens Wiklander pairs or Diffie-Hellman parameters, but was insufficient to validate 24713d3b0591SJens Wiklander Diffie-Hellman parameters properly. 24723d3b0591SJens Wiklander See "Prime and Prejudice" by by Martin R. Albrecht and Jake Massimo and 24733d3b0591SJens Wiklander Kenneth G. Paterson and Juraj Somorovsky. 24743d3b0591SJens Wiklander 24753d3b0591SJens WiklanderFeatures 24763d3b0591SJens Wiklander * Add support for temporarily suspending expensive ECC computations after 24773d3b0591SJens Wiklander some configurable amount of operations. This is intended to be used in 24783d3b0591SJens Wiklander constrained, single-threaded systems where ECC is time consuming and can 24793d3b0591SJens Wiklander block other operations until they complete. This is disabled by default, 24803d3b0591SJens Wiklander but can be enabled by MBEDTLS_ECP_RESTARTABLE at compile time and 24813d3b0591SJens Wiklander configured by mbedtls_ecp_set_max_ops() at runtime. It applies to the new 24823d3b0591SJens Wiklander xxx_restartable functions in ECP, ECDSA, PK and X.509 (CRL not supported 24833d3b0591SJens Wiklander yet), and to existing functions in ECDH and SSL (currently only 24843d3b0591SJens Wiklander implemented client-side, for ECDHE-ECDSA ciphersuites in TLS 1.2, 24853d3b0591SJens Wiklander including client authentication). 24863d3b0591SJens Wiklander * Add support for Arm CPU DSP extensions to accelerate asymmetric key 24873d3b0591SJens Wiklander operations. On CPUs where the extensions are available, they can accelerate 24883d3b0591SJens Wiklander MPI multiplications used in ECC and RSA cryptography. Contributed by 24893d3b0591SJens Wiklander Aurelien Jarno. 24903d3b0591SJens Wiklander * Extend RSASSA-PSS signature to allow a smaller salt size. Previously, PSS 24913d3b0591SJens Wiklander signature always used a salt with the same length as the hash, and returned 24923d3b0591SJens Wiklander an error if this was not possible. Now the salt size may be up to two bytes 24933d3b0591SJens Wiklander shorter. This allows the library to support all hash and signature sizes 24943d3b0591SJens Wiklander that comply with FIPS 186-4, including SHA-512 with a 1024-bit key. 24953d3b0591SJens Wiklander * Add support for 128-bit keys in CTR_DRBG. Note that using keys shorter 24963d3b0591SJens Wiklander than 256 bits limits the security of generated material to 128 bits. 24973d3b0591SJens Wiklander 24983d3b0591SJens WiklanderAPI Changes 24993d3b0591SJens Wiklander * Add a common error code of `MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED` for 25003d3b0591SJens Wiklander a feature that is not supported by underlying alternative 25013d3b0591SJens Wiklander implementations implementing cryptographic primitives. This is useful for 25023d3b0591SJens Wiklander hardware accelerators that don't implement all options or features. 25033d3b0591SJens Wiklander 25043d3b0591SJens WiklanderNew deprecations 25053d3b0591SJens Wiklander * All module specific errors following the form 25063d3b0591SJens Wiklander MBEDTLS_ERR_XXX_FEATURE_UNAVAILABLE that indicate a feature is not 25073d3b0591SJens Wiklander supported are deprecated and are now replaced by the new equivalent 25083d3b0591SJens Wiklander platform error. 25093d3b0591SJens Wiklander * All module specific generic hardware acceleration errors following the 25103d3b0591SJens Wiklander form MBEDTLS_ERR_XXX_HW_ACCEL_FAILED that are deprecated and are replaced 25113d3b0591SJens Wiklander by the equivalent plaform error. 25123d3b0591SJens Wiklander * Deprecate the function mbedtls_mpi_is_prime() in favor of 25133d3b0591SJens Wiklander mbedtls_mpi_is_prime_ext() which allows specifying the number of 25143d3b0591SJens Wiklander Miller-Rabin rounds. 25153d3b0591SJens Wiklander 25163d3b0591SJens WiklanderBugfix 25173d3b0591SJens Wiklander * Fix wrong order of freeing in programs/ssl/ssl_server2 example 25183d3b0591SJens Wiklander application leading to a memory leak in case both 25193d3b0591SJens Wiklander MBEDTLS_MEMORY_BUFFER_ALLOC_C and MBEDTLS_MEMORY_BACKTRACE are set. 25203d3b0591SJens Wiklander Fixes #2069. 25213d3b0591SJens Wiklander * Fix a bug in the update function for SSL ticket keys which previously 25223d3b0591SJens Wiklander invalidated keys of a lifetime of less than a 1s. Fixes #1968. 25233d3b0591SJens Wiklander * Fix failure in hmac_drbg in the benchmark sample application, when 25243d3b0591SJens Wiklander MBEDTLS_THREADING_C is defined. Found by TrinityTonic, #1095 25253d3b0591SJens Wiklander * Fix a bug in the record decryption routine ssl_decrypt_buf() 25263d3b0591SJens Wiklander which lead to accepting properly authenticated but improperly 25273d3b0591SJens Wiklander padded records in case of CBC ciphersuites using Encrypt-then-MAC. 25283d3b0591SJens Wiklander * Fix memory leak and freeing without initialization in the example 25293d3b0591SJens Wiklander program programs/x509/cert_write. Fixes #1422. 25303d3b0591SJens Wiklander * Ignore IV in mbedtls_cipher_set_iv() when the cipher mode is 25313d3b0591SJens Wiklander MBEDTLS_MODE_ECB. Found by ezdevelop. Fixes #1091. 25323d3b0591SJens Wiklander * Zeroize memory used for buffering or reassembling handshake messages 25333d3b0591SJens Wiklander after use. 25343d3b0591SJens Wiklander * Use `mbedtls_platform_zeroize()` instead of `memset()` for zeroization 25353d3b0591SJens Wiklander of sensitive data in the example programs aescrypt2 and crypt_and_hash. 25363d3b0591SJens Wiklander * Change the default string format used for various X.509 DN attributes to 25373d3b0591SJens Wiklander UTF8String. Previously, the use of the PrintableString format led to 25383d3b0591SJens Wiklander wildcards and non-ASCII characters being unusable in some DN attributes. 25393d3b0591SJens Wiklander Reported by raprepo in #1860 and by kevinpt in #468. Fix contributed by 25403d3b0591SJens Wiklander Thomas-Dee. 25413d3b0591SJens Wiklander * Fix compilation failure for configurations which use compile time 25423d3b0591SJens Wiklander replacements of standard calloc/free functions through the macros 25433d3b0591SJens Wiklander MBEDTLS_PLATFORM_CALLOC_MACRO and MBEDTLS_PLATFORM_FREE_MACRO. 25443d3b0591SJens Wiklander Reported by ole-de and ddhome2006. Fixes #882, #1642 and #1706. 25453d3b0591SJens Wiklander 25463d3b0591SJens WiklanderChanges 25473d3b0591SJens Wiklander * Removed support for Yotta as a build tool. 25483d3b0591SJens Wiklander * Add tests for session resumption in DTLS. 25493d3b0591SJens Wiklander * Close a test gap in (D)TLS between the client side and the server side: 25503d3b0591SJens Wiklander test the handling of large packets and small packets on the client side 25513d3b0591SJens Wiklander in the same way as on the server side. 25523d3b0591SJens Wiklander * Change the dtls_client and dtls_server samples to work by default over 25533d3b0591SJens Wiklander IPv6 and optionally by a build option over IPv4. 25543d3b0591SJens Wiklander * Change the use of Windows threading to use Microsoft Visual C++ runtime 25553d3b0591SJens Wiklander calls, rather than Win32 API calls directly. This is necessary to avoid 25563d3b0591SJens Wiklander conflict with C runtime usage. Found and fixed by irwir. 25573d3b0591SJens Wiklander * Remember the string format of X.509 DN attributes when replicating 25583d3b0591SJens Wiklander X.509 DNs. Previously, DN attributes were always written in their default 25593d3b0591SJens Wiklander string format (mostly PrintableString), which could lead to CRTs being 25603d3b0591SJens Wiklander created which used PrintableStrings in the issuer field even though the 25613d3b0591SJens Wiklander signing CA used UTF8Strings in its subject field; while X.509 compliant, 25623d3b0591SJens Wiklander such CRTs were rejected in some applications, e.g. some versions of 25633d3b0591SJens Wiklander Firefox, curl and GnuTLS. Reported in #1033 by Moschn. Fix contributed by 25643d3b0591SJens Wiklander Thomas-Dee. 25653d3b0591SJens Wiklander * Improve documentation of mbedtls_ssl_get_verify_result(). 25663d3b0591SJens Wiklander Fixes #517 reported by github-monoculture. 25673d3b0591SJens Wiklander * Add MBEDTLS_MPI_GEN_PRIME_FLAG_LOW_ERR flag to mbedtls_mpi_gen_prime() and 25683d3b0591SJens Wiklander use it to reduce error probability in RSA key generation to levels mandated 25693d3b0591SJens Wiklander by FIPS-186-4. 25703d3b0591SJens Wiklander 25713d3b0591SJens Wiklander= mbed TLS 2.13.1 branch released 2018-09-06 25723d3b0591SJens Wiklander 25733d3b0591SJens WiklanderAPI Changes 25743d3b0591SJens Wiklander * Extend the platform module with an abstraction mbedtls_platform_gmtime_r() 25753d3b0591SJens Wiklander whose implementation should behave as a thread-safe version of gmtime(). 25763d3b0591SJens Wiklander This allows users to configure such an implementation at compile time when 25773d3b0591SJens Wiklander the target system cannot be deduced automatically, by setting the option 25783d3b0591SJens Wiklander MBEDTLS_PLATFORM_GMTIME_R_ALT. At this stage Mbed TLS is only able to 25793d3b0591SJens Wiklander automatically select implementations for Windows and POSIX C libraries. 25803d3b0591SJens Wiklander 25813d3b0591SJens WiklanderBugfix 25823d3b0591SJens Wiklander * Fix build failures on platforms where only gmtime() is available but 25833d3b0591SJens Wiklander neither gmtime_r() nor gmtime_s() are present. Fixes #1907. 25843d3b0591SJens Wiklander 25853d3b0591SJens Wiklander= mbed TLS 2.13.0 branch released 2018-08-31 25863d3b0591SJens Wiklander 25873d3b0591SJens WiklanderSecurity 25883d3b0591SJens Wiklander * Fix an issue in the X.509 module which could lead to a buffer overread 25893d3b0591SJens Wiklander during certificate extensions parsing. In case of receiving malformed 25903d3b0591SJens Wiklander input (extensions length field equal to 0), an illegal read of one byte 25913d3b0591SJens Wiklander beyond the input buffer is made. Found and analyzed by Nathan Crandall. 25923d3b0591SJens Wiklander 25933d3b0591SJens WiklanderFeatures 25943d3b0591SJens Wiklander * Add support for fragmentation of outgoing DTLS handshake messages. This 25953d3b0591SJens Wiklander is controlled by the maximum fragment length as set locally or negotiated 25963d3b0591SJens Wiklander with the peer, as well as by a new per-connection MTU option, set using 25973d3b0591SJens Wiklander mbedtls_ssl_set_mtu(). 25983d3b0591SJens Wiklander * Add support for auto-adjustment of MTU to a safe value during the 25993d3b0591SJens Wiklander handshake when flights do not get through (RFC 6347, section 4.1.1.1, 26003d3b0591SJens Wiklander last paragraph). 26013d3b0591SJens Wiklander * Add support for packing multiple records within a single datagram, 26023d3b0591SJens Wiklander enabled by default. 26033d3b0591SJens Wiklander * Add support for buffering out-of-order handshake messages in DTLS. 26043d3b0591SJens Wiklander The maximum amount of RAM used for this can be controlled by the 26053d3b0591SJens Wiklander compile-time constant MBEDTLS_SSL_DTLS_MAX_BUFFERING defined 26063d3b0591SJens Wiklander in mbedtls/config.h. 26073d3b0591SJens Wiklander 26083d3b0591SJens WiklanderAPI Changes 26093d3b0591SJens Wiklander * Add function mbedtls_ssl_set_datagram_packing() to configure 26103d3b0591SJens Wiklander the use of datagram packing (enabled by default). 26113d3b0591SJens Wiklander 26123d3b0591SJens WiklanderBugfix 26133d3b0591SJens Wiklander * Fix a potential memory leak in mbedtls_ssl_setup() function. An allocation 26143d3b0591SJens Wiklander failure in the function could lead to other buffers being leaked. 26153d3b0591SJens Wiklander * Fixes an issue with MBEDTLS_CHACHAPOLY_C which would not compile if 26163d3b0591SJens Wiklander MBEDTLS_ARC4_C and MBEDTLS_CIPHER_NULL_CIPHER weren't also defined. #1890 26173d3b0591SJens Wiklander * Fix a memory leak in ecp_mul_comb() if ecp_precompute_comb() fails. 26183d3b0591SJens Wiklander Fix contributed by Espressif Systems. 26193d3b0591SJens Wiklander * Add ecc extensions only if an ecc based ciphersuite is used. 26203d3b0591SJens Wiklander This improves compliance to RFC 4492, and as a result, solves 26213d3b0591SJens Wiklander interoperability issues with BouncyCastle. Raised by milenamil in #1157. 26223d3b0591SJens Wiklander * Replace printf with mbedtls_printf in the ARIA module. Found by 26233d3b0591SJens Wiklander TrinityTonic in #1908. 26243d3b0591SJens Wiklander * Fix potential use-after-free in mbedtls_ssl_get_max_frag_len() 26253d3b0591SJens Wiklander and mbedtls_ssl_get_record_expansion() after a session reset. Fixes #1941. 26263d3b0591SJens Wiklander * Fix a bug that caused SSL/TLS clients to incorrectly abort the handshake 26273d3b0591SJens Wiklander with TLS versions 1.1 and earlier when the server requested authentication 26283d3b0591SJens Wiklander without providing a list of CAs. This was due to an overly strict bounds 26293d3b0591SJens Wiklander check in parsing the CertificateRequest message, 26303d3b0591SJens Wiklander introduced in Mbed TLS 2.12.0. Fixes #1954. 26313d3b0591SJens Wiklander * Fix a miscalculation of the maximum record expansion in 26323d3b0591SJens Wiklander mbedtls_ssl_get_record_expansion() in case of ChachaPoly ciphersuites, 26333d3b0591SJens Wiklander or CBC ciphersuites in (D)TLS versions 1.1 or higher. Fixes #1913, #1914. 26343d3b0591SJens Wiklander * Fix undefined shifts with negative values in certificates parsing 26353d3b0591SJens Wiklander (found by Catena cyber using oss-fuzz) 26363d3b0591SJens Wiklander * Fix memory leak and free without initialization in pk_encrypt 26373d3b0591SJens Wiklander and pk_decrypt example programs. Reported by Brace Stout. Fixes #1128. 26383d3b0591SJens Wiklander * Remove redundant else statement. Raised by irwir. Fixes #1776. 26393d3b0591SJens Wiklander 26403d3b0591SJens WiklanderChanges 26413d3b0591SJens Wiklander * Copy headers preserving timestamps when doing a "make install". 26423d3b0591SJens Wiklander Contributed by xueruini. 26433d3b0591SJens Wiklander * Allow the forward declaration of public structs. Contributed by Dawid 26443d3b0591SJens Wiklander Drozd. Fixes #1215 raised by randombit. 26453d3b0591SJens Wiklander * Improve compatibility with some alternative CCM implementations by using 26463d3b0591SJens Wiklander CCM test vectors from RAM. 26473d3b0591SJens Wiklander * Add support for buffering of out-of-order handshake messages. 26483d3b0591SJens Wiklander * Add warnings to the documentation of the HKDF module to reduce the risk 26493d3b0591SJens Wiklander of misusing the mbedtls_hkdf_extract() and mbedtls_hkdf_expand() 26503d3b0591SJens Wiklander functions. Fixes #1775. Reported by Brian J. Murray. 26513d3b0591SJens Wiklander 26523d3b0591SJens Wiklander= mbed TLS 2.12.0 branch released 2018-07-25 26533d3b0591SJens Wiklander 26543d3b0591SJens WiklanderSecurity 26553d3b0591SJens Wiklander * Fix a vulnerability in TLS ciphersuites based on CBC and using SHA-384, 26563d3b0591SJens Wiklander in (D)TLS 1.0 to 1.2, that allowed an active network attacker to 26573d3b0591SJens Wiklander partially recover the plaintext of messages under some conditions by 26583d3b0591SJens Wiklander exploiting timing measurements. With DTLS, the attacker could perform 26593d3b0591SJens Wiklander this recovery by sending many messages in the same connection. With TLS 26603d3b0591SJens Wiklander or if mbedtls_ssl_conf_dtls_badmac_limit() was used, the attack only 26613d3b0591SJens Wiklander worked if the same secret (for example a HTTP Cookie) has been repeatedly 26623d3b0591SJens Wiklander sent over connections manipulated by the attacker. Connections using GCM 26633d3b0591SJens Wiklander or CCM instead of CBC, using hash sizes other than SHA-384, or using 26643d3b0591SJens Wiklander Encrypt-then-Mac (RFC 7366) were not affected. The vulnerability was 26653d3b0591SJens Wiklander caused by a miscalculation (for SHA-384) in a countermeasure to the 26663d3b0591SJens Wiklander original Lucky 13 attack. Found by Kenny Paterson, Eyal Ronen and Adi 26673d3b0591SJens Wiklander Shamir. 26683d3b0591SJens Wiklander * Fix a vulnerability in TLS ciphersuites based on CBC, in (D)TLS 1.0 to 26693d3b0591SJens Wiklander 1.2, that allowed a local attacker, able to execute code on the local 26703d3b0591SJens Wiklander machine as well as manipulate network packets, to partially recover the 26713d3b0591SJens Wiklander plaintext of messages under some conditions by using a cache attack 26725b25c76aSJerome Forissier targeting an internal MD/SHA buffer. With TLS or if 26733d3b0591SJens Wiklander mbedtls_ssl_conf_dtls_badmac_limit() was used, the attack only worked if 26743d3b0591SJens Wiklander the same secret (for example a HTTP Cookie) has been repeatedly sent over 26753d3b0591SJens Wiklander connections manipulated by the attacker. Connections using GCM or CCM 26763d3b0591SJens Wiklander instead of CBC or using Encrypt-then-Mac (RFC 7366) were not affected. 26773d3b0591SJens Wiklander Found by Kenny Paterson, Eyal Ronen and Adi Shamir. 26783d3b0591SJens Wiklander * Add a counter-measure against a vulnerability in TLS ciphersuites based 26793d3b0591SJens Wiklander on CBC, in (D)TLS 1.0 to 1.2, that allowed a local attacker, able to 26803d3b0591SJens Wiklander execute code on the local machine as well as manipulate network packets, 26813d3b0591SJens Wiklander to partially recover the plaintext of messages under some conditions (see 26823d3b0591SJens Wiklander previous entry) by using a cache attack targeting the SSL input record 26833d3b0591SJens Wiklander buffer. Connections using GCM or CCM instead of CBC or using 26843d3b0591SJens Wiklander Encrypt-then-Mac (RFC 7366) were not affected. Found by Kenny Paterson, 26853d3b0591SJens Wiklander Eyal Ronen and Adi Shamir. 26863d3b0591SJens Wiklander 26873d3b0591SJens WiklanderFeatures 26883d3b0591SJens Wiklander * Add new crypto primitives from RFC 7539: stream cipher Chacha20, one-time 26893d3b0591SJens Wiklander authenticator Poly1305 and AEAD construct Chacha20-Poly1305. Contributed 26903d3b0591SJens Wiklander by Daniel King. 26913d3b0591SJens Wiklander * Add support for CHACHA20-POLY1305 ciphersuites from RFC 7905. 26923d3b0591SJens Wiklander * Add platform support for the Haiku OS. (https://www.haiku-os.org). 26933d3b0591SJens Wiklander Contributed by Augustin Cavalier. 26943d3b0591SJens Wiklander * Make the receive and transmit buffers independent sizes, for situations 26953d3b0591SJens Wiklander where the outgoing buffer can be fixed at a smaller size than the incoming 26963d3b0591SJens Wiklander buffer, which can save some RAM. If buffer lengths are kept equal, there 26973d3b0591SJens Wiklander is no functional difference. Contributed by Angus Gratton, and also 26983d3b0591SJens Wiklander independently contributed again by Paul Sokolovsky. 26993d3b0591SJens Wiklander * Add support for key wrapping modes based on AES as defined by 27003d3b0591SJens Wiklander NIST SP 800-38F algorithms KW and KWP and by RFC 3394 and RFC 5649. 27013d3b0591SJens Wiklander 27023d3b0591SJens WiklanderBugfix 27033d3b0591SJens Wiklander * Fix the key_app_writer example which was writing a leading zero byte which 27043d3b0591SJens Wiklander was creating an invalid ASN.1 tag. Found by Aryeh R. Fixes #1257. 27053d3b0591SJens Wiklander * Fix compilation error on C++, because of a variable named new. 27063d3b0591SJens Wiklander Found and fixed by Hirotaka Niisato in #1783. 27073d3b0591SJens Wiklander * Fix "no symbols" warning issued by ranlib when building on Mac OS X. Fix 27083d3b0591SJens Wiklander contributed by tabascoeye. 27093d3b0591SJens Wiklander * Clarify documentation for mbedtls_ssl_write() to include 0 as a valid 27103d3b0591SJens Wiklander return value. Found by @davidwu2000. #839 27113d3b0591SJens Wiklander * Fix a memory leak in mbedtls_x509_csr_parse(), found by catenacyber, 27123d3b0591SJens Wiklander Philippe Antoine. Fixes #1623. 27133d3b0591SJens Wiklander * Remove unused headers included in x509.c. Found by Chris Hanson and fixed 27143d3b0591SJens Wiklander by Brendan Shanks. Part of a fix for #992. 27153d3b0591SJens Wiklander * Fix compilation error when MBEDTLS_ARC4_C is disabled and 27163d3b0591SJens Wiklander MBEDTLS_CIPHER_NULL_CIPHER is enabled. Found by TrinityTonic in #1719. 27173d3b0591SJens Wiklander * Added length checks to some TLS parsing functions. Found and fixed by 27183d3b0591SJens Wiklander Philippe Antoine from Catena cyber. #1663. 27193d3b0591SJens Wiklander * Fix the inline assembly for the MPI multiply helper function for i386 and 27203d3b0591SJens Wiklander i386 with SSE2. Found by László Langó. Fixes #1550 27213d3b0591SJens Wiklander * Fix namespacing in header files. Remove the `mbedtls` namespacing in 27223d3b0591SJens Wiklander the `#include` in the header files. Resolves #857 27233d3b0591SJens Wiklander * Fix compiler warning of 'use before initialisation' in 27243d3b0591SJens Wiklander mbedtls_pk_parse_key(). Found by Martin Boye Petersen and fixed by Dawid 27253d3b0591SJens Wiklander Drozd. #1098 27263d3b0591SJens Wiklander * Fix decryption for zero length messages (which contain all padding) when a 27273d3b0591SJens Wiklander CBC based ciphersuite is used together with Encrypt-then-MAC. Previously, 27283d3b0591SJens Wiklander such a message was wrongly reported as an invalid record and therefore lead 27293d3b0591SJens Wiklander to the connection being terminated. Seen most often with OpenSSL using 27303d3b0591SJens Wiklander TLS 1.0. Reported by @kFYatek and by Conor Murphy on the forum. Fix 27313d3b0591SJens Wiklander contributed by Espressif Systems. Fixes #1632 27323d3b0591SJens Wiklander * Fix ssl_client2 example to send application data with 0-length content 27333d3b0591SJens Wiklander when the request_size argument is set to 0 as stated in the documentation. 27343d3b0591SJens Wiklander Fixes #1833. 27353d3b0591SJens Wiklander * Correct the documentation for `mbedtls_ssl_get_session()`. This API has 27363d3b0591SJens Wiklander deep copy of the session, and the peer certificate is not lost. Fixes #926. 27373d3b0591SJens Wiklander * Fix build using -std=c99. Fixed by Nick Wilson. 27383d3b0591SJens Wiklander 27393d3b0591SJens WiklanderChanges 27403d3b0591SJens Wiklander * Fail when receiving a TLS alert message with an invalid length, or invalid 27413d3b0591SJens Wiklander zero-length messages when using TLS 1.2. Contributed by Espressif Systems. 27423d3b0591SJens Wiklander * Change the default behaviour of mbedtls_hkdf_extract() to return an error 27433d3b0591SJens Wiklander when calling with a NULL salt and non-zero salt_len. Contributed by 27443d3b0591SJens Wiklander Brian J Murray 27453d3b0591SJens Wiklander * Change the shebang line in Perl scripts to look up perl in the PATH. 27463d3b0591SJens Wiklander Contributed by fbrosson. 27473d3b0591SJens Wiklander * Allow overriding the time on Windows via the platform-time abstraction. 27483d3b0591SJens Wiklander Fixed by Nick Wilson. 27493d3b0591SJens Wiklander * Use gmtime_r/gmtime_s for thread-safety. Fixed by Nick Wilson. 27503d3b0591SJens Wiklander 27513d3b0591SJens Wiklander= mbed TLS 2.11.0 branch released 2018-06-18 27523d3b0591SJens Wiklander 27533d3b0591SJens WiklanderFeatures 27543d3b0591SJens Wiklander * Add additional block mode, OFB (Output Feedback), to the AES module and 27553d3b0591SJens Wiklander cipher abstraction module. 27563d3b0591SJens Wiklander * Implement the HMAC-based extract-and-expand key derivation function 27573d3b0591SJens Wiklander (HKDF) per RFC 5869. Contributed by Thomas Fossati. 27583d3b0591SJens Wiklander * Add support for the CCM* block cipher mode as defined in IEEE Std. 802.15.4. 27593d3b0591SJens Wiklander * Add support for the XTS block cipher mode with AES (AES-XTS). 27603d3b0591SJens Wiklander Contributed by Aorimn in pull request #414. 27613d3b0591SJens Wiklander * In TLS servers, support offloading private key operations to an external 27623d3b0591SJens Wiklander cryptoprocessor. Private key operations can be asynchronous to allow 27633d3b0591SJens Wiklander non-blocking operation of the TLS server stack. 27643d3b0591SJens Wiklander 27653d3b0591SJens WiklanderBugfix 27663d3b0591SJens Wiklander * Fix the cert_write example to handle certificates signed with elliptic 27673d3b0591SJens Wiklander curves as well as RSA. Fixes #777 found by dbedev. 27683d3b0591SJens Wiklander * Fix for redefinition of _WIN32_WINNT to avoid overriding a definition 27693d3b0591SJens Wiklander used by user applications. Found and fixed by Fabio Alessandrelli. 27703d3b0591SJens Wiklander * Fix compilation warnings with IAR toolchain, on 32 bit platform. 27713d3b0591SJens Wiklander Reported by rahmanih in #683 27723d3b0591SJens Wiklander * Fix braces in mbedtls_memory_buffer_alloc_status(). Found by sbranden, #552. 27733d3b0591SJens Wiklander 27743d3b0591SJens WiklanderChanges 27753d3b0591SJens Wiklander * Changed CMake defaults for IAR to treat all compiler warnings as errors. 27763d3b0591SJens Wiklander * Changed the Clang parameters used in the CMake build files to work for 27773d3b0591SJens Wiklander versions later than 3.6. Versions of Clang earlier than this may no longer 27783d3b0591SJens Wiklander work. Fixes #1072 27793d3b0591SJens Wiklander 27803d3b0591SJens Wiklander= mbed TLS 2.10.0 branch released 2018-06-06 27813d3b0591SJens Wiklander 27823d3b0591SJens WiklanderFeatures 27833d3b0591SJens Wiklander * Add support for ARIA cipher (RFC 5794) and associated TLS ciphersuites 27843d3b0591SJens Wiklander (RFC 6209). Disabled by default, see MBEDTLS_ARIA_C in config.h 27853d3b0591SJens Wiklander 27863d3b0591SJens WiklanderAPI Changes 27873d3b0591SJens Wiklander * Extend the platform module with a util component that contains 27883d3b0591SJens Wiklander functionality shared by multiple Mbed TLS modules. At this stage 27893d3b0591SJens Wiklander platform_util.h (and its associated platform_util.c) only contain 27903d3b0591SJens Wiklander mbedtls_platform_zeroize(), which is a critical function from a security 27913d3b0591SJens Wiklander point of view. mbedtls_platform_zeroize() needs to be regularly tested 27923d3b0591SJens Wiklander against compilers to ensure that calls to it are not removed from the 27933d3b0591SJens Wiklander output binary as part of redundant code elimination optimizations. 27943d3b0591SJens Wiklander Therefore, mbedtls_platform_zeroize() is moved to the platform module to 27953d3b0591SJens Wiklander facilitate testing and maintenance. 27963d3b0591SJens Wiklander 27973d3b0591SJens WiklanderBugfix 27983d3b0591SJens Wiklander * Fix an issue with MicroBlaze support in bn_mul.h which was causing the 27993d3b0591SJens Wiklander build to fail. Found by zv-io. Fixes #1651. 28003d3b0591SJens Wiklander 28013d3b0591SJens WiklanderChanges 28023d3b0591SJens Wiklander * Support TLS testing in out-of-source builds using cmake. Fixes #1193. 28033d3b0591SJens Wiklander * Fix redundant declaration of mbedtls_ssl_list_ciphersuites. Raised by 28043d3b0591SJens Wiklander TrinityTonic. #1359. 28053d3b0591SJens Wiklander 28063d3b0591SJens Wiklander= mbed TLS 2.9.0 branch released 2018-04-30 28073d3b0591SJens Wiklander 28083d3b0591SJens WiklanderSecurity 28093d3b0591SJens Wiklander * Fix an issue in the X.509 module which could lead to a buffer overread 28103d3b0591SJens Wiklander during certificate validation. Additionally, the issue could also lead to 28113d3b0591SJens Wiklander unnecessary callback checks being made or to some validation checks to be 28123d3b0591SJens Wiklander omitted. The overread could be triggered remotely, while the other issues 28133d3b0591SJens Wiklander would require a non DER-compliant certificate to be correctly signed by a 28143d3b0591SJens Wiklander trusted CA, or a trusted CA with a non DER-compliant certificate. Found by 28153d3b0591SJens Wiklander luocm. Fixes #825. 28163d3b0591SJens Wiklander * Fix the buffer length assertion in the ssl_parse_certificate_request() 28173d3b0591SJens Wiklander function which led to an arbitrary overread of the message buffer. The 28183d3b0591SJens Wiklander overreads could be caused by receiving a malformed message at the point 28193d3b0591SJens Wiklander where an optional signature algorithms list is expected when the signature 28203d3b0591SJens Wiklander algorithms section is too short. In builds with debug output, the overread 28213d3b0591SJens Wiklander data is output with the debug data. 28223d3b0591SJens Wiklander * Fix a client-side bug in the validation of the server's ciphersuite choice 28233d3b0591SJens Wiklander which could potentially lead to the client accepting a ciphersuite it didn't 28243d3b0591SJens Wiklander offer or a ciphersuite that cannot be used with the TLS or DTLS version 28253d3b0591SJens Wiklander chosen by the server. This could lead to corruption of internal data 28263d3b0591SJens Wiklander structures for some configurations. 28273d3b0591SJens Wiklander 28283d3b0591SJens WiklanderFeatures 28293d3b0591SJens Wiklander * Add an option, MBEDTLS_AES_FEWER_TABLES, to dynamically compute smaller AES 28303d3b0591SJens Wiklander tables during runtime, thereby reducing the RAM/ROM footprint by ~6KiB. 28313d3b0591SJens Wiklander Suggested and contributed by jkivilin in pull request #394. 28323d3b0591SJens Wiklander * Add initial support for Curve448 (RFC 7748). Only mbedtls_ecp_mul() and 28333d3b0591SJens Wiklander ECDH primitive functions (mbedtls_ecdh_gen_public(), 28343d3b0591SJens Wiklander mbedtls_ecdh_compute_shared()) are supported for now. Contributed by 28353d3b0591SJens Wiklander Nicholas Wilson in pull request #348. 28363d3b0591SJens Wiklander 28373d3b0591SJens WiklanderAPI Changes 28383d3b0591SJens Wiklander * Extend the public API with the function of mbedtls_net_poll() to allow user 28393d3b0591SJens Wiklander applications to wait for a network context to become ready before reading 28403d3b0591SJens Wiklander or writing. 28413d3b0591SJens Wiklander * Add function mbedtls_ssl_check_pending() to the public API to allow 28423d3b0591SJens Wiklander a check for whether more more data is pending to be processed in the 28433d3b0591SJens Wiklander internal message buffers. 28443d3b0591SJens Wiklander This function is necessary to determine when it is safe to idle on the 28453d3b0591SJens Wiklander underlying transport in case event-driven IO is used. 28463d3b0591SJens Wiklander 28473d3b0591SJens WiklanderBugfix 28483d3b0591SJens Wiklander * Fix a spurious uninitialized variable warning in cmac.c. Fix independently 28493d3b0591SJens Wiklander contributed by Brian J Murray and David Brown. 28503d3b0591SJens Wiklander * Add missing dependencies in test suites that led to build failures 28513d3b0591SJens Wiklander in configurations that omit certain hashes or public-key algorithms. 28523d3b0591SJens Wiklander Fixes #1040. 28533d3b0591SJens Wiklander * Fix C89 incompatibility in benchmark.c. Contributed by Brendan Shanks. 28543d3b0591SJens Wiklander #1353 28553d3b0591SJens Wiklander * Add missing dependencies for MBEDTLS_HAVE_TIME_DATE and 28563d3b0591SJens Wiklander MBEDTLS_VERSION_FEATURES in some test suites. Contributed by 28573d3b0591SJens Wiklander Deomid Ryabkov. Fixes #1299, #1475. 28583d3b0591SJens Wiklander * Fix the Makefile build process for building shared libraries on Mac OS X. 28593d3b0591SJens Wiklander Fixed by mnacamura. 28603d3b0591SJens Wiklander * Fix parsing of PKCS#8 encoded Elliptic Curve keys. Previously Mbed TLS was 28613d3b0591SJens Wiklander unable to parse keys which had only the optional parameters field of the 28623d3b0591SJens Wiklander ECPrivateKey structure. Found by Jethro Beekman, fixed in #1379. 28633d3b0591SJens Wiklander * Return the plaintext data more quickly on unpadded CBC decryption, as 28643d3b0591SJens Wiklander stated in the mbedtls_cipher_update() documentation. Contributed by 28653d3b0591SJens Wiklander Andy Leiserson. 28663d3b0591SJens Wiklander * Fix overriding and ignoring return values when parsing and writing to 28673d3b0591SJens Wiklander a file in pk_sign program. Found by kevlut in #1142. 28683d3b0591SJens Wiklander * Restrict usage of error code MBEDTLS_ERR_SSL_WANT_READ to situations 28693d3b0591SJens Wiklander where data needs to be fetched from the underlying transport in order 28703d3b0591SJens Wiklander to make progress. Previously, this error code was also occasionally 28713d3b0591SJens Wiklander returned when unexpected messages were being discarded, ignoring that 28723d3b0591SJens Wiklander further messages could potentially already be pending to be processed 28733d3b0591SJens Wiklander in the internal buffers; these cases led to deadlocks when event-driven 28743d3b0591SJens Wiklander I/O was used. Found and reported by Hubert Mis in #772. 28753d3b0591SJens Wiklander * Fix buffer length assertions in the ssl_parse_certificate_request() 28763d3b0591SJens Wiklander function which leads to a potential one byte overread of the message 28773d3b0591SJens Wiklander buffer. 28783d3b0591SJens Wiklander * Fix invalid buffer sizes passed to zlib during record compression and 28793d3b0591SJens Wiklander decompression. 28803d3b0591SJens Wiklander * Fix the soversion of libmbedcrypto to match the soversion of the 28813d3b0591SJens Wiklander maintained 2.7 branch. The soversion was increased in Mbed TLS 28823d3b0591SJens Wiklander version 2.7.1 to reflect breaking changes in that release, but the 28833d3b0591SJens Wiklander increment was missed in 2.8.0 and later releases outside of the 2.7 branch. 28843d3b0591SJens Wiklander 28853d3b0591SJens WiklanderChanges 28863d3b0591SJens Wiklander * Remove some redundant code in bignum.c. Contributed by Alexey Skalozub. 28873d3b0591SJens Wiklander * Support cmake builds where Mbed TLS is a subproject. Fix contributed 28883d3b0591SJens Wiklander independently by Matthieu Volat and Arne Schwabe. 28893d3b0591SJens Wiklander * Improve testing in configurations that omit certain hashes or 28903d3b0591SJens Wiklander public-key algorithms. Includes contributions by Gert van Dijk. 28913d3b0591SJens Wiklander * Improve negative testing of X.509 parsing. 28923d3b0591SJens Wiklander * Do not define global mutexes around readdir() and gmtime() in 28933d3b0591SJens Wiklander configurations where the feature is disabled. Found and fixed by Gergely 28943d3b0591SJens Wiklander Budai. 28953d3b0591SJens Wiklander * Harden the function mbedtls_ssl_config_free() against misuse, so that it 28963d3b0591SJens Wiklander doesn't leak memory if the user doesn't use mbedtls_ssl_conf_psk() and 28973d3b0591SJens Wiklander instead incorrectly manipulates the configuration structure directly. 28983d3b0591SJens Wiklander Found and fix submitted by junyeonLEE in #1220. 28993d3b0591SJens Wiklander * Provide an empty implementation of mbedtls_pkcs5_pbes2() when 29003d3b0591SJens Wiklander MBEDTLS_ASN1_PARSE_C is not enabled. This allows the use of PBKDF2 29013d3b0591SJens Wiklander without PBES2. Fixed by Marcos Del Sol Vives. 29023d3b0591SJens Wiklander * Add the order of the base point as N in the mbedtls_ecp_group structure 29033d3b0591SJens Wiklander for Curve25519 (other curves had it already). Contributed by Nicholas 29043d3b0591SJens Wiklander Wilson #481 29053d3b0591SJens Wiklander * Improve the documentation of mbedtls_net_accept(). Contributed by Ivan 29063d3b0591SJens Wiklander Krylov. 29073d3b0591SJens Wiklander * Improve the documentation of mbedtls_ssl_write(). Suggested by 29083d3b0591SJens Wiklander Paul Sokolovsky in #1356. 29093d3b0591SJens Wiklander * Add an option in the Makefile to support ar utilities where the operation 29103d3b0591SJens Wiklander letter must not be prefixed by '-', such as LLVM. Found and fixed by 29113d3b0591SJens Wiklander Alex Hixon. 29123d3b0591SJens Wiklander * Allow configuring the shared library extension by setting the DLEXT 29133d3b0591SJens Wiklander environment variable when using the project makefiles. 29143d3b0591SJens Wiklander * Optimize unnecessary zeroing in mbedtls_mpi_copy. Based on a contribution 29153d3b0591SJens Wiklander by Alexey Skalozub in #405. 29163d3b0591SJens Wiklander * In the SSL module, when f_send, f_recv or f_recv_timeout report 29173d3b0591SJens Wiklander transmitting more than the required length, return an error. Raised by 29183d3b0591SJens Wiklander Sam O'Connor in #1245. 29193d3b0591SJens Wiklander * Improve robustness of mbedtls_ssl_derive_keys against the use of 29203d3b0591SJens Wiklander HMAC functions with non-HMAC ciphersuites. Independently contributed 29213d3b0591SJens Wiklander by Jiayuan Chen in #1377. Fixes #1437. 29223d3b0591SJens Wiklander * Improve security of RSA key generation by including criteria from 29233d3b0591SJens Wiklander FIPS 186-4. Contributed by Jethro Beekman. #1380 29243d3b0591SJens Wiklander * Declare functions in header files even when an alternative implementation 29253d3b0591SJens Wiklander of the corresponding module is activated by defining the corresponding 29263d3b0591SJens Wiklander MBEDTLS_XXX_ALT macro. This means that alternative implementations do 29273d3b0591SJens Wiklander not need to copy the declarations, and ensures that they will have the 29283d3b0591SJens Wiklander same API. 29293d3b0591SJens Wiklander * Add platform setup and teardown calls in test suites. 29303d3b0591SJens Wiklander 29313d3b0591SJens Wiklander= mbed TLS 2.8.0 branch released 2018-03-16 29323d3b0591SJens Wiklander 29333d3b0591SJens WiklanderDefault behavior changes 29343d3b0591SJens Wiklander * The truncated HMAC extension now conforms to RFC 6066. This means 29353d3b0591SJens Wiklander that when both sides of a TLS connection negotiate the truncated 29363d3b0591SJens Wiklander HMAC extension, Mbed TLS can now interoperate with other 29373d3b0591SJens Wiklander compliant implementations, but this breaks interoperability with 29383d3b0591SJens Wiklander prior versions of Mbed TLS. To restore the old behavior, enable 29393d3b0591SJens Wiklander the (deprecated) option MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT in 29403d3b0591SJens Wiklander config.h. Found by Andreas Walz (ivESK, Offenburg University of 29413d3b0591SJens Wiklander Applied Sciences). 29423d3b0591SJens Wiklander 29433d3b0591SJens WiklanderSecurity 29443d3b0591SJens Wiklander * Fix implementation of the truncated HMAC extension. The previous 29453d3b0591SJens Wiklander implementation allowed an offline 2^80 brute force attack on the 29463d3b0591SJens Wiklander HMAC key of a single, uninterrupted connection (with no 29473d3b0591SJens Wiklander resumption of the session). 29483d3b0591SJens Wiklander * Verify results of RSA private key operations to defend 29493d3b0591SJens Wiklander against Bellcore glitch attack. 29503d3b0591SJens Wiklander * Fix a buffer overread in ssl_parse_server_key_exchange() that could cause 29513d3b0591SJens Wiklander a crash on invalid input. 29523d3b0591SJens Wiklander * Fix a buffer overread in ssl_parse_server_psk_hint() that could cause a 29533d3b0591SJens Wiklander crash on invalid input. 29543d3b0591SJens Wiklander * Fix CRL parsing to reject CRLs containing unsupported critical 29553d3b0591SJens Wiklander extensions. Found by Falko Strenzke and Evangelos Karatsiolis. 29563d3b0591SJens Wiklander 29573d3b0591SJens WiklanderFeatures 29583d3b0591SJens Wiklander * Extend PKCS#8 interface by introducing support for the entire SHA 29593d3b0591SJens Wiklander algorithms family when encrypting private keys using PKCS#5 v2.0. 29603d3b0591SJens Wiklander This allows reading encrypted PEM files produced by software that 29613d3b0591SJens Wiklander uses PBKDF2-SHA2, such as OpenSSL 1.1. Submitted by Antonio Quartulli, 29623d3b0591SJens Wiklander OpenVPN Inc. Fixes #1339 29633d3b0591SJens Wiklander * Add support for public keys encoded in PKCS#1 format. #1122 29643d3b0591SJens Wiklander 29653d3b0591SJens WiklanderNew deprecations 29663d3b0591SJens Wiklander * Deprecate support for record compression (configuration option 29673d3b0591SJens Wiklander MBEDTLS_ZLIB_SUPPORT). 29683d3b0591SJens Wiklander 29693d3b0591SJens WiklanderBugfix 29703d3b0591SJens Wiklander * Fix the name of a DHE parameter that was accidentally changed in 2.7.0. 29713d3b0591SJens Wiklander Fixes #1358. 29723d3b0591SJens Wiklander * Fix test_suite_pk to work on 64-bit ILP32 systems. #849 29733d3b0591SJens Wiklander * Fix mbedtls_x509_crt_profile_suiteb, which used to reject all certificates 29743d3b0591SJens Wiklander with flag MBEDTLS_X509_BADCERT_BAD_PK even when the key type was correct. 29753d3b0591SJens Wiklander In the context of SSL, this resulted in handshake failure. Reported by 29763d3b0591SJens Wiklander daniel in the Mbed TLS forum. #1351 29773d3b0591SJens Wiklander * Fix Windows x64 builds with the included mbedTLS.sln file. #1347 29783d3b0591SJens Wiklander * Fix setting version TLSv1 as minimal version, even if TLS 1 29793d3b0591SJens Wiklander is not enabled. Set MBEDTLS_SSL_MIN_MAJOR_VERSION 29803d3b0591SJens Wiklander and MBEDTLS_SSL_MIN_MINOR_VERSION instead of 29813d3b0591SJens Wiklander MBEDTLS_SSL_MAJOR_VERSION_3 and MBEDTLS_SSL_MINOR_VERSION_1. #664 29823d3b0591SJens Wiklander * Fix compilation error on Mingw32 when _TRUNCATE is defined. Use _TRUNCATE 29833d3b0591SJens Wiklander only if __MINGW32__ not defined. Fix suggested by Thomas Glanzmann and 29843d3b0591SJens Wiklander Nick Wilson on issue #355 29853d3b0591SJens Wiklander * In test_suite_pk, pass valid parameters when testing for hash length 29863d3b0591SJens Wiklander overflow. #1179 29873d3b0591SJens Wiklander * Fix memory allocation corner cases in memory_buffer_alloc.c module. Found 29883d3b0591SJens Wiklander by Guido Vranken. #639 29893d3b0591SJens Wiklander * Log correct number of ciphersuites used in Client Hello message. #918 29903d3b0591SJens Wiklander * Fix X509 CRT parsing that would potentially accept an invalid tag when 29913d3b0591SJens Wiklander parsing the subject alternative names. 29923d3b0591SJens Wiklander * Fix a possible arithmetic overflow in ssl_parse_server_key_exchange() 29933d3b0591SJens Wiklander that could cause a key exchange to fail on valid data. 29943d3b0591SJens Wiklander * Fix a possible arithmetic overflow in ssl_parse_server_psk_hint() that 29953d3b0591SJens Wiklander could cause a key exchange to fail on valid data. 29963d3b0591SJens Wiklander * Don't define mbedtls_aes_decrypt and mbedtls_aes_encrypt under 29973d3b0591SJens Wiklander MBEDTLS_DEPRECATED_REMOVED. #1388 29983d3b0591SJens Wiklander * Fix a 1-byte heap buffer overflow (read-only) during private key parsing. 29993d3b0591SJens Wiklander Found through fuzz testing. 30003d3b0591SJens Wiklander 30013d3b0591SJens WiklanderChanges 30023d3b0591SJens Wiklander * Fix tag lengths and value ranges in the documentation of CCM encryption. 30033d3b0591SJens Wiklander Contributed by Mathieu Briand. 30043d3b0591SJens Wiklander * Fix typo in a comment ctr_drbg.c. Contributed by Paul Sokolovsky. 30053d3b0591SJens Wiklander * Remove support for the library reference configuration for picocoin. 30063d3b0591SJens Wiklander * MD functions deprecated in 2.7.0 are no longer inline, to provide 30073d3b0591SJens Wiklander a migration path for those depending on the library's ABI. 30083d3b0591SJens Wiklander * Clarify the documentation of mbedtls_ssl_setup. 30093d3b0591SJens Wiklander * Use (void) when defining functions with no parameters. Contributed by 30103d3b0591SJens Wiklander Joris Aerts. #678 30113d3b0591SJens Wiklander 30123d3b0591SJens Wiklander= mbed TLS 2.7.0 branch released 2018-02-03 30133d3b0591SJens Wiklander 30143d3b0591SJens WiklanderSecurity 30153d3b0591SJens Wiklander * Fix a heap corruption issue in the implementation of the truncated HMAC 30163d3b0591SJens Wiklander extension. When the truncated HMAC extension is enabled and CBC is used, 30173d3b0591SJens Wiklander sending a malicious application packet could be used to selectively corrupt 30183d3b0591SJens Wiklander 6 bytes on the peer's heap, which could potentially lead to crash or remote 30193d3b0591SJens Wiklander code execution. The issue could be triggered remotely from either side in 30203d3b0591SJens Wiklander both TLS and DTLS. CVE-2018-0488 30213d3b0591SJens Wiklander * Fix a buffer overflow in RSA-PSS verification when the hash was too large 30223d3b0591SJens Wiklander for the key size, which could potentially lead to crash or remote code 30233d3b0591SJens Wiklander execution. Found by Seth Terashima, Qualcomm Product Security Initiative, 30243d3b0591SJens Wiklander Qualcomm Technologies Inc. CVE-2018-0487 30253d3b0591SJens Wiklander * Fix buffer overflow in RSA-PSS verification when the unmasked data is all 30263d3b0591SJens Wiklander zeros. 30273d3b0591SJens Wiklander * Fix an unsafe bounds check in ssl_parse_client_psk_identity() when adding 30283d3b0591SJens Wiklander 64 KiB to the address of the SSL buffer and causing a wrap around. 30293d3b0591SJens Wiklander * Fix a potential heap buffer overflow in mbedtls_ssl_write(). When the (by 30303d3b0591SJens Wiklander default enabled) maximum fragment length extension is disabled in the 30313d3b0591SJens Wiklander config and the application data buffer passed to mbedtls_ssl_write 30323d3b0591SJens Wiklander is larger than the internal message buffer (16384 bytes by default), the 30333d3b0591SJens Wiklander latter overflows. The exploitability of this issue depends on whether the 30343d3b0591SJens Wiklander application layer can be forced into sending such large packets. The issue 30353d3b0591SJens Wiklander was independently reported by Tim Nordell via e-mail and by Florin Petriuc 30363d3b0591SJens Wiklander and sjorsdewit on GitHub. Fix proposed by Florin Petriuc in #1022. 30373d3b0591SJens Wiklander Fixes #707. 30383d3b0591SJens Wiklander * Add a provision to prevent compiler optimizations breaking the time 30393d3b0591SJens Wiklander constancy of mbedtls_ssl_safer_memcmp(). 30403d3b0591SJens Wiklander * Ensure that buffers are cleared after use if they contain sensitive data. 30413d3b0591SJens Wiklander Changes were introduced in multiple places in the library. 30423d3b0591SJens Wiklander * Set PEM buffer to zero before freeing it, to avoid decoded private keys 30433d3b0591SJens Wiklander being leaked to memory after release. 30443d3b0591SJens Wiklander * Fix dhm_check_range() failing to detect trivial subgroups and potentially 30453d3b0591SJens Wiklander leaking 1 bit of the private key. Reported by prashantkspatil. 30463d3b0591SJens Wiklander * Make mbedtls_mpi_read_binary() constant-time with respect to the input 30473d3b0591SJens Wiklander data. Previously, trailing zero bytes were detected and omitted for the 30483d3b0591SJens Wiklander sake of saving memory, but potentially leading to slight timing 30493d3b0591SJens Wiklander differences. Reported by Marco Macchetti, Kudelski Group. 30503d3b0591SJens Wiklander * Wipe stack buffer temporarily holding EC private exponent 30513d3b0591SJens Wiklander after keypair generation. 30523d3b0591SJens Wiklander * Fix a potential heap buffer over-read in ALPN extension parsing 30533d3b0591SJens Wiklander (server-side). Could result in application crash, but only if an ALPN 30543d3b0591SJens Wiklander name larger than 16 bytes had been configured on the server. 30553d3b0591SJens Wiklander * Change default choice of DHE parameters from untrustworthy RFC 5114 30563d3b0591SJens Wiklander to RFC 3526 containing parameters generated in a nothing-up-my-sleeve 30573d3b0591SJens Wiklander manner. 30583d3b0591SJens Wiklander 30593d3b0591SJens WiklanderFeatures 30603d3b0591SJens Wiklander * Allow comments in test data files. 30613d3b0591SJens Wiklander * The selftest program can execute a subset of the tests based on command 30623d3b0591SJens Wiklander line arguments. 30633d3b0591SJens Wiklander * New unit tests for timing. Improve the self-test to be more robust 30643d3b0591SJens Wiklander when run on a heavily-loaded machine. 30653d3b0591SJens Wiklander * Add alternative implementation support for CCM and CMAC (MBEDTLS_CCM_ALT, 30663d3b0591SJens Wiklander MBEDTLS_CMAC_ALT). Submitted by Steven Cooreman, Silicon Labs. 30673d3b0591SJens Wiklander * Add support for alternative implementations of GCM, selected by the 30683d3b0591SJens Wiklander configuration flag MBEDTLS_GCM_ALT. 30693d3b0591SJens Wiklander * Add support for alternative implementations for ECDSA, controlled by new 30703d3b0591SJens Wiklander configuration flags MBEDTLS_ECDSA_SIGN_ALT, MBEDTLS_ECDSA_VERIFY_ALT and 30713d3b0591SJens Wiklander MBEDTLS_ECDSDA_GENKEY_AT in config.h. 30723d3b0591SJens Wiklander The following functions from the ECDSA module can be replaced 30733d3b0591SJens Wiklander with alternative implementation: 30743d3b0591SJens Wiklander mbedtls_ecdsa_sign(), mbedtls_ecdsa_verify() and mbedtls_ecdsa_genkey(). 30753d3b0591SJens Wiklander * Add support for alternative implementation of ECDH, controlled by the 30763d3b0591SJens Wiklander new configuration flags MBEDTLS_ECDH_COMPUTE_SHARED_ALT and 30773d3b0591SJens Wiklander MBEDTLS_ECDH_GEN_PUBLIC_ALT in config.h. 30783d3b0591SJens Wiklander The following functions from the ECDH module can be replaced 30793d3b0591SJens Wiklander with an alternative implementation: 30803d3b0591SJens Wiklander mbedtls_ecdh_gen_public() and mbedtls_ecdh_compute_shared(). 30813d3b0591SJens Wiklander * Add support for alternative implementation of ECJPAKE, controlled by 30823d3b0591SJens Wiklander the new configuration flag MBEDTLS_ECJPAKE_ALT. 30833d3b0591SJens Wiklander * Add mechanism to provide alternative implementation of the DHM module. 30843d3b0591SJens Wiklander 30853d3b0591SJens WiklanderAPI Changes 30863d3b0591SJens Wiklander * Extend RSA interface by multiple functions allowing structure- 30873d3b0591SJens Wiklander independent setup and export of RSA contexts. Most notably, 30883d3b0591SJens Wiklander mbedtls_rsa_import() and mbedtls_rsa_complete() are introduced for setting 30893d3b0591SJens Wiklander up RSA contexts from partial key material and having them completed to the 30903d3b0591SJens Wiklander needs of the implementation automatically. This allows to setup private RSA 30913d3b0591SJens Wiklander contexts from keys consisting of N,D,E only, even if P,Q are needed for the 30923d3b0591SJens Wiklander purpose or CRT and/or blinding. 30933d3b0591SJens Wiklander * The configuration option MBEDTLS_RSA_ALT can be used to define alternative 30943d3b0591SJens Wiklander implementations of the RSA interface declared in rsa.h. 30953d3b0591SJens Wiklander * The following functions in the message digest modules (MD2, MD4, MD5, 30963d3b0591SJens Wiklander SHA1, SHA256, SHA512) have been deprecated and replaced as shown below. 30973d3b0591SJens Wiklander The new functions change the return type from void to int to allow 30983d3b0591SJens Wiklander returning error codes when using MBEDTLS_<MODULE>_ALT. 30993d3b0591SJens Wiklander mbedtls_<MODULE>_starts() -> mbedtls_<MODULE>_starts_ret() 31003d3b0591SJens Wiklander mbedtls_<MODULE>_update() -> mbedtls_<MODULE>_update_ret() 31013d3b0591SJens Wiklander mbedtls_<MODULE>_finish() -> mbedtls_<MODULE>_finish_ret() 31023d3b0591SJens Wiklander mbedtls_<MODULE>_process() -> mbedtls_internal_<MODULE>_process() 31033d3b0591SJens Wiklander 31043d3b0591SJens WiklanderNew deprecations 31053d3b0591SJens Wiklander * Deprecate usage of RSA primitives with non-matching key-type 31063d3b0591SJens Wiklander (e.g. signing with a public key). 31073d3b0591SJens Wiklander * Direct manipulation of structure fields of RSA contexts is deprecated. 31083d3b0591SJens Wiklander Users are advised to use the extended RSA API instead. 31093d3b0591SJens Wiklander * Deprecate usage of message digest functions that return void 31103d3b0591SJens Wiklander (mbedtls_<MODULE>_starts, mbedtls_<MODULE>_update, 31113d3b0591SJens Wiklander mbedtls_<MODULE>_finish and mbedtls_<MODULE>_process where <MODULE> is 31123d3b0591SJens Wiklander any of MD2, MD4, MD5, SHA1, SHA256, SHA512) in favor of functions 31133d3b0591SJens Wiklander that can return an error code. 31143d3b0591SJens Wiklander * Deprecate untrustworthy DHE parameters from RFC 5114. Superseded by 31153d3b0591SJens Wiklander parameters from RFC 3526 or the newly added parameters from RFC 7919. 31163d3b0591SJens Wiklander * Deprecate hex string DHE constants MBEDTLS_DHM_RFC3526_MODP_2048_P etc. 31173d3b0591SJens Wiklander Supserseded by binary encoded constants MBEDTLS_DHM_RFC3526_MODP_2048_P_BIN 31183d3b0591SJens Wiklander etc. 31193d3b0591SJens Wiklander * Deprecate mbedtls_ssl_conf_dh_param() for setting default DHE parameters 31203d3b0591SJens Wiklander from hex strings. Superseded by mbedtls_ssl_conf_dh_param_bin() 31213d3b0591SJens Wiklander accepting DHM parameters in binary form, matching the new constants. 31223d3b0591SJens Wiklander 31233d3b0591SJens WiklanderBugfix 31243d3b0591SJens Wiklander * Fix ssl_parse_record_header() to silently discard invalid DTLS records 31253d3b0591SJens Wiklander as recommended in RFC 6347 Section 4.1.2.7. 31263d3b0591SJens Wiklander * Fix memory leak in mbedtls_ssl_set_hostname() when called multiple times. 31273d3b0591SJens Wiklander Found by projectgus and Jethro Beekman, #836. 31283d3b0591SJens Wiklander * Fix usage help in ssl_server2 example. Found and fixed by Bei Lin. 3129817466cbSJens Wiklander * Parse signature algorithm extension when renegotiating. Previously, 3130817466cbSJens Wiklander renegotiated handshakes would only accept signatures using SHA-1 3131817466cbSJens Wiklander regardless of the peer's preferences, or fail if SHA-1 was disabled. 31323d3b0591SJens Wiklander * Fix leap year calculation in x509_date_is_valid() to ensure that invalid 31333d3b0591SJens Wiklander dates on leap years with 100 and 400 intervals are handled correctly. Found 31343d3b0591SJens Wiklander by Nicholas Wilson. #694 31353d3b0591SJens Wiklander * Fix some invalid RSA-PSS signatures with keys of size 8N+1 that were 31363d3b0591SJens Wiklander accepted. Generating these signatures required the private key. 31373d3b0591SJens Wiklander * Fix out-of-memory problem when parsing 4096-bit PKCS8-encrypted RSA keys. 31383d3b0591SJens Wiklander Found independently by Florian in the mbed TLS forum and by Mishamax. 31393d3b0591SJens Wiklander #878, #1019. 31403d3b0591SJens Wiklander * Fix variable used before assignment compilation warnings with IAR 31413d3b0591SJens Wiklander toolchain. Found by gkerrien38. 31423d3b0591SJens Wiklander * Fix unchecked return codes from AES, DES and 3DES functions in 31433d3b0591SJens Wiklander pem_aes_decrypt(), pem_des_decrypt() and pem_des3_decrypt() respectively. 31443d3b0591SJens Wiklander If a call to one of the functions of the cryptographic primitive modules 31453d3b0591SJens Wiklander failed, the error may not be noticed by the function 31463d3b0591SJens Wiklander mbedtls_pem_read_buffer() causing it to return invalid values. Found by 31473d3b0591SJens Wiklander Guido Vranken. #756 31483d3b0591SJens Wiklander * Include configuration file in md.h, to fix compilation warnings. 31493d3b0591SJens Wiklander Reported by aaronmdjones in #1001 31503d3b0591SJens Wiklander * Correct extraction of signature-type from PK instance in X.509 CRT and CSR 31513d3b0591SJens Wiklander writing routines that prevented these functions to work with alternative 31523d3b0591SJens Wiklander RSA implementations. Raised by J.B. in the Mbed TLS forum. Fixes #1011. 31533d3b0591SJens Wiklander * Don't print X.509 version tag for v1 CRT's, and omit extensions for 31543d3b0591SJens Wiklander non-v3 CRT's. 31553d3b0591SJens Wiklander * Fix bugs in RSA test suite under MBEDTLS_NO_PLATFORM_ENTROPY. #1023 #1024 31563d3b0591SJens Wiklander * Fix net_would_block() to avoid modification by errno through fcntl() call. 31573d3b0591SJens Wiklander Found by nkolban. Fixes #845. 31583d3b0591SJens Wiklander * Fix handling of handshake messages in mbedtls_ssl_read() in case 31593d3b0591SJens Wiklander MBEDTLS_SSL_RENEGOTIATION is disabled. Found by erja-gp. 31603d3b0591SJens Wiklander * Add a check for invalid private parameters in mbedtls_ecdsa_sign(). 31613d3b0591SJens Wiklander Reported by Yolan Romailler. 31623d3b0591SJens Wiklander * Fix word size check in in pk.c to not depend on MBEDTLS_HAVE_INT64. 31633d3b0591SJens Wiklander * Fix incorrect unit in benchmark output. #850 31643d3b0591SJens Wiklander * Add size-checks for record and handshake message content, securing 31653d3b0591SJens Wiklander fragile yet non-exploitable code-paths. 31663d3b0591SJens Wiklander * Fix crash when calling mbedtls_ssl_cache_free() twice. Found by 31673d3b0591SJens Wiklander MilenkoMitrovic, #1104 31683d3b0591SJens Wiklander * Fix mbedtls_timing_alarm(0) on Unix and MinGW. 31693d3b0591SJens Wiklander * Fix use of uninitialized memory in mbedtls_timing_get_timer() when reset=1. 31703d3b0591SJens Wiklander * Fix possible memory leaks in mbedtls_gcm_self_test(). 31713d3b0591SJens Wiklander * Added missing return code checks in mbedtls_aes_self_test(). 31723d3b0591SJens Wiklander * Fix issues in RSA key generation program programs/x509/rsa_genkey and the 31733d3b0591SJens Wiklander RSA test suite where the failure of CTR DRBG initialization lead to 31743d3b0591SJens Wiklander freeing an RSA context and several MPI's without proper initialization 31753d3b0591SJens Wiklander beforehand. 31763d3b0591SJens Wiklander * Fix error message in programs/pkey/gen_key.c. Found and fixed by Chris Xue. 31773d3b0591SJens Wiklander * Fix programs/pkey/dh_server.c so that it actually works with dh_client.c. 31783d3b0591SJens Wiklander Found and fixed by Martijn de Milliano. 31793d3b0591SJens Wiklander * Fix an issue in the cipher decryption with the mode 31803d3b0591SJens Wiklander MBEDTLS_PADDING_ONE_AND_ZEROS that sometimes accepted invalid padding. 31813d3b0591SJens Wiklander Note, this padding mode is not used by the TLS protocol. Found and fixed by 31823d3b0591SJens Wiklander Micha Kraus. 31833d3b0591SJens Wiklander * Fix the entropy.c module to not call mbedtls_sha256_starts() or 31843d3b0591SJens Wiklander mbedtls_sha512_starts() in the mbedtls_entropy_init() function. 31853d3b0591SJens Wiklander * Fix the entropy.c module to ensure that mbedtls_sha256_init() or 31863d3b0591SJens Wiklander mbedtls_sha512_init() is called before operating on the relevant context 31873d3b0591SJens Wiklander structure. Do not assume that zeroizing a context is a correct way to 31883d3b0591SJens Wiklander reset it. Found independently by ccli8 on Github. 31893d3b0591SJens Wiklander * In mbedtls_entropy_free(), properly free the message digest context. 31903d3b0591SJens Wiklander * Fix status handshake status message in programs/ssl/dtls_client.c. Found 31913d3b0591SJens Wiklander and fixed by muddog. 31923d3b0591SJens Wiklander 31933d3b0591SJens WiklanderChanges 31943d3b0591SJens Wiklander * Extend cert_write example program by options to set the certificate version 31953d3b0591SJens Wiklander and the message digest. Further, allow enabling/disabling of authority 31963d3b0591SJens Wiklander identifier, subject identifier and basic constraints extensions. 31973d3b0591SJens Wiklander * Only check for necessary RSA structure fields in `mbedtls_rsa_private`. In 31983d3b0591SJens Wiklander particular, don't require P,Q if neither CRT nor blinding are 31993d3b0591SJens Wiklander used. Reported and fix proposed independently by satur9nine and sliai 32003d3b0591SJens Wiklander on GitHub. 32013d3b0591SJens Wiklander * Only run AES-192 self-test if AES-192 is available. Fixes #963. 32023d3b0591SJens Wiklander * Tighten the RSA PKCS#1 v1.5 signature verification code and remove the 32033d3b0591SJens Wiklander undeclared dependency of the RSA module on the ASN.1 module. 32043d3b0591SJens Wiklander * Update all internal usage of deprecated message digest functions to the 32053d3b0591SJens Wiklander new ones with return codes. In particular, this modifies the 32063d3b0591SJens Wiklander mbedtls_md_info_t structure. Propagate errors from these functions 32073d3b0591SJens Wiklander everywhere except some locations in the ssl_tls.c module. 32083d3b0591SJens Wiklander * Improve CTR_DRBG error handling by propagating underlying AES errors. 32093d3b0591SJens Wiklander * Add MBEDTLS_ERR_XXX_HW_ACCEL_FAILED error codes for all cryptography 32103d3b0591SJens Wiklander modules where the software implementation can be replaced by a hardware 32113d3b0591SJens Wiklander implementation. 32123d3b0591SJens Wiklander * Add explicit warnings for the use of MD2, MD4, MD5, SHA-1, DES and ARC4 32133d3b0591SJens Wiklander throughout the library. 3214817466cbSJens Wiklander 3215817466cbSJens Wiklander= mbed TLS 2.6.0 branch released 2017-08-10 3216817466cbSJens Wiklander 3217817466cbSJens WiklanderSecurity 3218817466cbSJens Wiklander * Fix authentication bypass in SSL/TLS: when authmode is set to optional, 3219817466cbSJens Wiklander mbedtls_ssl_get_verify_result() would incorrectly return 0 when the peer's 3220817466cbSJens Wiklander X.509 certificate chain had more than MBEDTLS_X509_MAX_INTERMEDIATE_CA 3221817466cbSJens Wiklander (default: 8) intermediates, even when it was not trusted. This could be 3222817466cbSJens Wiklander triggered remotely from either side. (With authmode set to 'required' 3223817466cbSJens Wiklander (the default), the handshake was correctly aborted). 3224817466cbSJens Wiklander * Reliably wipe sensitive data after use in the AES example applications 3225817466cbSJens Wiklander programs/aes/aescrypt2 and programs/aes/crypt_and_hash. 3226817466cbSJens Wiklander Found by Laurent Simon. 3227817466cbSJens Wiklander 3228817466cbSJens WiklanderFeatures 3229817466cbSJens Wiklander * Add the functions mbedtls_platform_setup() and mbedtls_platform_teardown() 3230817466cbSJens Wiklander and the context struct mbedtls_platform_context to perform 3231817466cbSJens Wiklander platform-specific setup and teardown operations. The macro 3232817466cbSJens Wiklander MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT allows the functions to be overridden 3233817466cbSJens Wiklander by the user in a platform_alt.h file. These new functions are required in 3234817466cbSJens Wiklander some embedded environments to provide a means of initialising underlying 3235817466cbSJens Wiklander cryptographic acceleration hardware. 3236817466cbSJens Wiklander 3237817466cbSJens WiklanderAPI Changes 3238817466cbSJens Wiklander * Reverted API/ABI breaking changes introduced in mbed TLS 2.5.1, to make the 3239817466cbSJens Wiklander API consistent with mbed TLS 2.5.0. Specifically removed the inline 3240817466cbSJens Wiklander qualifier from the functions mbedtls_aes_decrypt, mbedtls_aes_encrypt, 3241817466cbSJens Wiklander mbedtls_ssl_ciphersuite_uses_ec and mbedtls_ssl_ciphersuite_uses_psk. Found 3242817466cbSJens Wiklander by James Cowgill. #978 3243817466cbSJens Wiklander * Certificate verification functions now set flags to -1 in case the full 3244817466cbSJens Wiklander chain was not verified due to an internal error (including in the verify 3245817466cbSJens Wiklander callback) or chain length limitations. 3246817466cbSJens Wiklander * With authmode set to optional, the TLS handshake is now aborted if the 3247817466cbSJens Wiklander verification of the peer's certificate failed due to an overlong chain or 3248817466cbSJens Wiklander a fatal error in the verify callback. 3249817466cbSJens Wiklander 3250817466cbSJens WiklanderBugfix 3251817466cbSJens Wiklander * Add a check if iv_len is zero in GCM, and return an error if it is zero. 3252817466cbSJens Wiklander Reported by roberto. #716 3253817466cbSJens Wiklander * Replace preprocessor condition from #if defined(MBEDTLS_THREADING_PTHREAD) 3254817466cbSJens Wiklander to #if defined(MBEDTLS_THREADING_C) as the library cannot assume they will 3255817466cbSJens Wiklander always be implemented by pthread support. #696 3256817466cbSJens Wiklander * Fix a resource leak on Windows platforms in mbedtls_x509_crt_parse_path(), 3257817466cbSJens Wiklander in the case of an error. Found by redplait. #590 3258817466cbSJens Wiklander * Add MBEDTLS_MPI_CHK to check for error value of mbedtls_mpi_fill_random. 3259817466cbSJens Wiklander Reported and fix suggested by guidovranken. #740 3260817466cbSJens Wiklander * Fix conditional preprocessor directives in bignum.h to enable 64-bit 3261817466cbSJens Wiklander compilation when using ARM Compiler 6. 3262817466cbSJens Wiklander * Fix a potential integer overflow in the version verification for DER 3263817466cbSJens Wiklander encoded X.509 CRLs. The overflow could enable maliciously constructed CRLs 3264817466cbSJens Wiklander to bypass the version verification check. Found by Peng Li/Yueh-Hsun Lin, 3265817466cbSJens Wiklander KNOX Security, Samsung Research America 3266817466cbSJens Wiklander * Fix potential integer overflow in the version verification for DER 3267817466cbSJens Wiklander encoded X.509 CSRs. The overflow could enable maliciously constructed CSRs 3268817466cbSJens Wiklander to bypass the version verification check. Found by Peng Li/Yueh-Hsun Lin, 3269817466cbSJens Wiklander KNOX Security, Samsung Research America 3270817466cbSJens Wiklander * Fix a potential integer overflow in the version verification for DER 3271817466cbSJens Wiklander encoded X.509 certificates. The overflow could enable maliciously 3272817466cbSJens Wiklander constructed certificates to bypass the certificate verification check. 3273817466cbSJens Wiklander * Fix a call to the libc function time() to call the platform abstraction 3274817466cbSJens Wiklander function mbedtls_time() instead. Found by wairua. #666 3275817466cbSJens Wiklander * Avoid shadowing of time and index functions through mbed TLS function 3276817466cbSJens Wiklander arguments. Found by inestlerode. #557. 3277817466cbSJens Wiklander 3278817466cbSJens WiklanderChanges 3279817466cbSJens Wiklander * Added config.h option MBEDTLS_NO_UDBL_DIVISION, to prevent the use of 3280817466cbSJens Wiklander 64-bit division. This is useful on embedded platforms where 64-bit division 3281817466cbSJens Wiklander created a dependency on external libraries. #708 3282817466cbSJens Wiklander * Removed mutexes from ECP hardware accelerator code. Now all hardware 3283817466cbSJens Wiklander accelerator code in the library leaves concurrency handling to the 3284817466cbSJens Wiklander platform. Reported by Steven Cooreman. #863 3285817466cbSJens Wiklander * Define the macro MBEDTLS_AES_ROM_TABLES in the configuration file 3286817466cbSJens Wiklander config-no-entropy.h to reduce the RAM footprint. 3287817466cbSJens Wiklander * Added a test script that can be hooked into git that verifies commits 3288817466cbSJens Wiklander before they are pushed. 3289817466cbSJens Wiklander * Improve documentation of PKCS1 decryption functions. 3290817466cbSJens Wiklander 3291817466cbSJens Wiklander= mbed TLS 2.5.1 released 2017-06-21 3292817466cbSJens Wiklander 3293817466cbSJens WiklanderSecurity 3294817466cbSJens Wiklander * Fixed unlimited overread of heap-based buffer in mbedtls_ssl_read(). 3295817466cbSJens Wiklander The issue could only happen client-side with renegotiation enabled. 3296817466cbSJens Wiklander Could result in DoS (application crash) or information leak 3297817466cbSJens Wiklander (if the application layer sent data read from mbedtls_ssl_read() 3298817466cbSJens Wiklander back to the server or to a third party). Can be triggered remotely. 3299817466cbSJens Wiklander * Removed SHA-1 and RIPEMD-160 from the default hash algorithms for 3300817466cbSJens Wiklander certificate verification. SHA-1 can be turned back on with a compile-time 3301817466cbSJens Wiklander option if needed. 3302817466cbSJens Wiklander * Fixed offset in FALLBACK_SCSV parsing that caused TLS server to fail to 3303817466cbSJens Wiklander detect it sometimes. Reported by Hugo Leisink. #810 3304817466cbSJens Wiklander * Tighten parsing of RSA PKCS#1 v1.5 signatures, to avoid a 3305817466cbSJens Wiklander potential Bleichenbacher/BERserk-style attack. 3306817466cbSJens Wiklander 3307817466cbSJens WiklanderBugfix 3308817466cbSJens Wiklander * Remove size zero arrays from ECJPAKE test suite. Size zero arrays are not 3309817466cbSJens Wiklander valid C and they prevented the test from compiling in Visual Studio 2015 3310817466cbSJens Wiklander and with GCC using the -Wpedantic compilation option. 3311817466cbSJens Wiklander * Fix insufficient support for signature-hash-algorithm extension, 3312817466cbSJens Wiklander resulting in compatibility problems with Chrome. Found by hfloyrd. #823 3313817466cbSJens Wiklander * Fix behaviour that hid the original cause of fatal alerts in some cases 3314817466cbSJens Wiklander when sending the alert failed. The fix makes sure not to hide the error 3315817466cbSJens Wiklander that triggered the alert. 3316817466cbSJens Wiklander * Fix SSLv3 renegotiation behaviour and stop processing data received from 3317817466cbSJens Wiklander peer after sending a fatal alert to refuse a renegotiation attempt. 3318817466cbSJens Wiklander Previous behaviour was to keep processing data even after the alert has 3319817466cbSJens Wiklander been sent. 3320817466cbSJens Wiklander * Accept empty trusted CA chain in authentication mode 33213d3b0591SJens Wiklander MBEDTLS_SSL_VERIFY_OPTIONAL. Found by Jethro Beekman. #864 3322817466cbSJens Wiklander * Fix implementation of mbedtls_ssl_parse_certificate() to not annihilate 3323817466cbSJens Wiklander fatal errors in authentication mode MBEDTLS_SSL_VERIFY_OPTIONAL and to 3324817466cbSJens Wiklander reflect bad EC curves within verification result. 3325817466cbSJens Wiklander * Fix bug that caused the modular inversion function to accept the invalid 3326817466cbSJens Wiklander modulus 1 and therefore to hang. Found by blaufish. #641. 3327817466cbSJens Wiklander * Fix incorrect sign computation in modular exponentiation when the base is 3328817466cbSJens Wiklander a negative MPI. Previously the result was always negative. Found by Guido 3329817466cbSJens Wiklander Vranken. 3330817466cbSJens Wiklander * Fix a numerical underflow leading to stack overflow in mpi_read_file() 3331817466cbSJens Wiklander that was triggered uppon reading an empty line. Found by Guido Vranken. 3332817466cbSJens Wiklander 3333817466cbSJens WiklanderChanges 3334817466cbSJens Wiklander * Send fatal alerts in more cases. The previous behaviour was to skip 3335817466cbSJens Wiklander sending the fatal alert and just drop the connection. 3336817466cbSJens Wiklander * Clarify ECDSA documentation and improve the sample code to avoid 3337817466cbSJens Wiklander misunderstanding and potentially dangerous use of the API. Pointed out 3338817466cbSJens Wiklander by Jean-Philippe Aumasson. 3339817466cbSJens Wiklander 3340817466cbSJens Wiklander= mbed TLS 2.5.0 branch released 2017-05-17 3341817466cbSJens Wiklander 3342817466cbSJens WiklanderSecurity 3343817466cbSJens Wiklander * Wipe stack buffers in RSA private key operations 3344817466cbSJens Wiklander (rsa_rsaes_pkcs1_v15_decrypt(), rsa_rsaes_oaep_decrypt). Found by Laurent 3345817466cbSJens Wiklander Simon. 3346817466cbSJens Wiklander * Add exponent blinding to RSA private operations as a countermeasure 3347817466cbSJens Wiklander against side-channel attacks like the cache attack described in 3348817466cbSJens Wiklander https://arxiv.org/abs/1702.08719v2. 3349817466cbSJens Wiklander Found and fix proposed by Michael Schwarz, Samuel Weiser, Daniel Gruss, 3350817466cbSJens Wiklander Clémentine Maurice and Stefan Mangard. 3351817466cbSJens Wiklander 3352817466cbSJens WiklanderFeatures 3353817466cbSJens Wiklander * Add hardware acceleration support for the Elliptic Curve Point module. 3354817466cbSJens Wiklander This involved exposing parts of the internal interface to enable 3355817466cbSJens Wiklander replacing the core functions and adding and alternative, module level 3356817466cbSJens Wiklander replacement support for enabling the extension of the interface. 3357817466cbSJens Wiklander * Add a new configuration option to 'mbedtls_ssl_config' to enable 3358817466cbSJens Wiklander suppressing the CA list in Certificate Request messages. The default 3359817466cbSJens Wiklander behaviour has not changed, namely every configured CAs name is included. 3360817466cbSJens Wiklander 3361817466cbSJens WiklanderAPI Changes 3362817466cbSJens Wiklander * The following functions in the AES module have been deprecated and replaced 3363817466cbSJens Wiklander by the functions shown below. The new functions change the return type from 3364817466cbSJens Wiklander void to int to allow returning error codes when using MBEDTLS_AES_ALT, 3365817466cbSJens Wiklander MBEDTLS_AES_DECRYPT_ALT or MBEDTLS_AES_ENCRYPT_ALT. 3366817466cbSJens Wiklander mbedtls_aes_decrypt() -> mbedtls_internal_aes_decrypt() 3367817466cbSJens Wiklander mbedtls_aes_encrypt() -> mbedtls_internal_aes_encrypt() 3368817466cbSJens Wiklander 3369817466cbSJens WiklanderBugfix 3370817466cbSJens Wiklander * Remove macros from compat-1.3.h that correspond to deleted items from most 3371817466cbSJens Wiklander recent versions of the library. Found by Kyle Keen. 3372817466cbSJens Wiklander * Fixed issue in the Threading module that prevented mutexes from 3373817466cbSJens Wiklander initialising. Found by sznaider. #667 #843 3374817466cbSJens Wiklander * Add checks in the PK module for the RSA functions on 64-bit systems. 3375817466cbSJens Wiklander The PK and RSA modules use different types for passing hash length and 3376817466cbSJens Wiklander without these checks the type cast could lead to data loss. Found by Guido 3377817466cbSJens Wiklander Vranken. 3378817466cbSJens Wiklander 3379817466cbSJens Wiklander= mbed TLS 2.4.2 branch released 2017-03-08 3380817466cbSJens Wiklander 3381817466cbSJens WiklanderSecurity 3382817466cbSJens Wiklander * Add checks to prevent signature forgeries for very large messages while 3383817466cbSJens Wiklander using RSA through the PK module in 64-bit systems. The issue was caused by 3384817466cbSJens Wiklander some data loss when casting a size_t to an unsigned int value in the 3385817466cbSJens Wiklander functions rsa_verify_wrap(), rsa_sign_wrap(), rsa_alt_sign_wrap() and 3386817466cbSJens Wiklander mbedtls_pk_sign(). Found by Jean-Philippe Aumasson. 3387817466cbSJens Wiklander * Fixed potential livelock during the parsing of a CRL in PEM format in 3388817466cbSJens Wiklander mbedtls_x509_crl_parse(). A string containing a CRL followed by trailing 3389817466cbSJens Wiklander characters after the footer could result in the execution of an infinite 3390817466cbSJens Wiklander loop. The issue can be triggered remotely. Found by Greg Zaverucha, 3391817466cbSJens Wiklander Microsoft. 3392817466cbSJens Wiklander * Removed MD5 from the allowed hash algorithms for CertificateRequest and 3393817466cbSJens Wiklander CertificateVerify messages, to prevent SLOTH attacks against TLS 1.2. 3394817466cbSJens Wiklander Introduced by interoperability fix for #513. 3395817466cbSJens Wiklander * Fixed a bug that caused freeing a buffer that was allocated on the stack, 3396817466cbSJens Wiklander when verifying the validity of a key on secp224k1. This could be 3397817466cbSJens Wiklander triggered remotely for example with a maliciously constructed certificate 3398817466cbSJens Wiklander and potentially could lead to remote code execution on some platforms. 3399817466cbSJens Wiklander Reported independently by rongsaws and Aleksandar Nikolic, Cisco Talos 3400817466cbSJens Wiklander team. #569 CVE-2017-2784 3401817466cbSJens Wiklander 3402817466cbSJens WiklanderBugfix 3403817466cbSJens Wiklander * Fix output certificate verification flags set by x509_crt_verify_top() when 3404817466cbSJens Wiklander traversing a chain of trusted CA. The issue would cause both flags, 3405817466cbSJens Wiklander MBEDTLS_X509_BADCERT_NOT_TRUSTED and MBEDTLS_X509_BADCERT_EXPIRED, to be 3406817466cbSJens Wiklander set when the verification conditions are not met regardless of the cause. 3407817466cbSJens Wiklander Found by Harm Verhagen and inestlerode. #665 #561 3408817466cbSJens Wiklander * Fix the redefinition of macro ssl_set_bio to an undefined symbol 3409817466cbSJens Wiklander mbedtls_ssl_set_bio_timeout in compat-1.3.h, by removing it. 3410817466cbSJens Wiklander Found by omlib-lin. #673 3411817466cbSJens Wiklander * Fix unused variable/function compilation warnings in pem.c, x509_crt.c and 3412817466cbSJens Wiklander x509_csr.c that are reported when building mbed TLS with a config.h that 3413817466cbSJens Wiklander does not define MBEDTLS_PEM_PARSE_C. Found by omnium21. #562 3414817466cbSJens Wiklander * Fix incorrect renegotiation condition in ssl_check_ctr_renegotiate() that 3415817466cbSJens Wiklander would compare 64 bits of the record counter instead of 48 bits as indicated 3416817466cbSJens Wiklander in RFC 6347 Section 4.3.1. This could cause the execution of the 3417817466cbSJens Wiklander renegotiation routines at unexpected times when the protocol is DTLS. Found 3418817466cbSJens Wiklander by wariua. #687 3419817466cbSJens Wiklander * Fixed multiple buffer overreads in mbedtls_pem_read_buffer() when parsing 3420817466cbSJens Wiklander the input string in PEM format to extract the different components. Found 3421817466cbSJens Wiklander by Eyal Itkin. 3422817466cbSJens Wiklander * Fixed potential arithmetic overflow in mbedtls_ctr_drbg_reseed() that could 3423817466cbSJens Wiklander cause buffer bound checks to be bypassed. Found by Eyal Itkin. 3424817466cbSJens Wiklander * Fixed potential arithmetic overflows in mbedtls_cipher_update() that could 3425817466cbSJens Wiklander cause buffer bound checks to be bypassed. Found by Eyal Itkin. 3426817466cbSJens Wiklander * Fixed potential arithmetic overflow in mbedtls_md2_update() that could 3427817466cbSJens Wiklander cause buffer bound checks to be bypassed. Found by Eyal Itkin. 3428817466cbSJens Wiklander * Fixed potential arithmetic overflow in mbedtls_base64_decode() that could 3429817466cbSJens Wiklander cause buffer bound checks to be bypassed. Found by Eyal Itkin. 3430817466cbSJens Wiklander * Fixed heap overreads in mbedtls_x509_get_time(). Found by Peng 3431817466cbSJens Wiklander Li/Yueh-Hsun Lin, KNOX Security, Samsung Research America. 3432817466cbSJens Wiklander * Fix potential memory leak in mbedtls_x509_crl_parse(). The leak was caused 3433817466cbSJens Wiklander by missing calls to mbedtls_pem_free() in cases when a 3434817466cbSJens Wiklander MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT error was encountered. Found and 3435817466cbSJens Wiklander fix proposed by Guido Vranken. #722 3436817466cbSJens Wiklander * Fixed the templates used to generate project and solution files for Visual 3437817466cbSJens Wiklander Studio 2015 as well as the files themselves, to remove a build warning 3438817466cbSJens Wiklander generated in Visual Studio 2015. Reported by Steve Valliere. #742 3439817466cbSJens Wiklander * Fix a resource leak in ssl_cookie, when using MBEDTLS_THREADING_C. 3440817466cbSJens Wiklander Raised and fix suggested by Alan Gillingham in the mbed TLS forum. #771 3441817466cbSJens Wiklander * Fix 1 byte buffer overflow in mbedtls_mpi_write_string() when the MPI 3442817466cbSJens Wiklander number to write in hexadecimal is negative and requires an odd number of 3443817466cbSJens Wiklander digits. Found and fixed by Guido Vranken. 3444817466cbSJens Wiklander * Fix unlisted DES configuration dependency in some pkparse test cases. Found 3445817466cbSJens Wiklander by inestlerode. #555 3446817466cbSJens Wiklander 3447817466cbSJens Wiklander= mbed TLS 2.4.1 branch released 2016-12-13 3448817466cbSJens Wiklander 3449817466cbSJens WiklanderChanges 3450817466cbSJens Wiklander * Update to CMAC test data, taken from - NIST Special Publication 800-38B - 3451817466cbSJens Wiklander Recommendation for Block Cipher Modes of Operation: The CMAC Mode for 3452817466cbSJens Wiklander Authentication – October 2016 3453817466cbSJens Wiklander 3454817466cbSJens Wiklander= mbed TLS 2.4.0 branch released 2016-10-17 3455817466cbSJens Wiklander 3456817466cbSJens WiklanderSecurity 3457817466cbSJens Wiklander * Removed the MBEDTLS_SSL_AEAD_RANDOM_IV option, because it was not compliant 3458817466cbSJens Wiklander with RFC-5116 and could lead to session key recovery in very long TLS 3459817466cbSJens Wiklander sessions. "Nonce-Disrespecting Adversaries Practical Forgery Attacks on GCM in 3460817466cbSJens Wiklander TLS" - H. Bock, A. Zauner, S. Devlin, J. Somorovsky, P. Jovanovic. 3461817466cbSJens Wiklander https://eprint.iacr.org/2016/475.pdf 3462817466cbSJens Wiklander * Fixed potential stack corruption in mbedtls_x509write_crt_der() and 3463817466cbSJens Wiklander mbedtls_x509write_csr_der() when the signature is copied to the buffer 3464817466cbSJens Wiklander without checking whether there is enough space in the destination. The 3465817466cbSJens Wiklander issue cannot be triggered remotely. Found by Jethro Beekman. 3466817466cbSJens Wiklander 3467817466cbSJens WiklanderFeatures 3468817466cbSJens Wiklander * Added support for CMAC for AES and 3DES and AES-CMAC-PRF-128, as defined by 3469817466cbSJens Wiklander NIST SP 800-38B, RFC-4493 and RFC-4615. 3470817466cbSJens Wiklander * Added hardware entropy selftest to verify that the hardware entropy source 3471817466cbSJens Wiklander is functioning correctly. 3472817466cbSJens Wiklander * Added a script to print build environment info for diagnostic use in test 3473817466cbSJens Wiklander scripts, which is also now called by all.sh. 3474817466cbSJens Wiklander * Added the macro MBEDTLS_X509_MAX_FILE_PATH_LEN that enables the user to 3475817466cbSJens Wiklander configure the maximum length of a file path that can be buffered when 3476817466cbSJens Wiklander calling mbedtls_x509_crt_parse_path(). 3477817466cbSJens Wiklander * Added a configuration file config-no-entropy.h that configures the subset of 3478817466cbSJens Wiklander library features that do not require an entropy source. 3479817466cbSJens Wiklander * Added the macro MBEDTLS_ENTROPY_MIN_HARDWARE in config.h. This allows users 3480817466cbSJens Wiklander to configure the minimum number of bytes for entropy sources using the 3481817466cbSJens Wiklander mbedtls_hardware_poll() function. 3482817466cbSJens Wiklander 3483817466cbSJens WiklanderBugfix 3484817466cbSJens Wiklander * Fix for platform time abstraction to avoid dependency issues where a build 3485817466cbSJens Wiklander may need time but not the standard C library abstraction, and added 3486817466cbSJens Wiklander configuration consistency checks to check_config.h 3487817466cbSJens Wiklander * Fix dependency issue in Makefile to allow parallel builds. 3488817466cbSJens Wiklander * Fix incorrect handling of block lengths in crypt_and_hash.c sample program, 3489817466cbSJens Wiklander when GCM is used. Found by udf2457. #441 3490817466cbSJens Wiklander * Fix for key exchanges based on ECDH-RSA or ECDH-ECDSA which weren't 3491817466cbSJens Wiklander enabled unless others were also present. Found by David Fernandez. #428 3492817466cbSJens Wiklander * Fix for out-of-tree builds using CMake. Found by jwurzer, and fix based on 3493817466cbSJens Wiklander a contribution from Tobias Tangemann. #541 3494817466cbSJens Wiklander * Fixed cert_app.c sample program for debug output and for use when no root 3495817466cbSJens Wiklander certificates are provided. 3496817466cbSJens Wiklander * Fix conditional statement that would cause a 1 byte overread in 3497817466cbSJens Wiklander mbedtls_asn1_get_int(). Found and fixed by Guido Vranken. #599 3498817466cbSJens Wiklander * Fixed pthread implementation to avoid unintended double initialisations 3499817466cbSJens Wiklander and double frees. Found by Niklas Amnebratt. 3500817466cbSJens Wiklander * Fixed the sample applications gen_key.c, cert_req.c and cert_write.c for 3501817466cbSJens Wiklander builds where the configuration MBEDTLS_PEM_WRITE_C is not defined. Found 3502817466cbSJens Wiklander by inestlerode. #559. 3503817466cbSJens Wiklander * Fix mbedtls_x509_get_sig() to update the ASN1 type in the mbedtls_x509_buf 3504817466cbSJens Wiklander data structure until after error checks are successful. Found by 3505817466cbSJens Wiklander subramanyam-c. #622 3506817466cbSJens Wiklander * Fix documentation and implementation missmatch for function arguments of 3507817466cbSJens Wiklander mbedtls_gcm_finish(). Found by cmiatpaar. #602 3508817466cbSJens Wiklander * Guarantee that P>Q at RSA key generation. Found by inestlerode. #558 3509817466cbSJens Wiklander * Fix potential byte overread when verifying malformed SERVER_HELLO in 3510817466cbSJens Wiklander ssl_parse_hello_verify_request() for DTLS. Found by Guido Vranken. 3511817466cbSJens Wiklander * Fix check for validity of date when parsing in mbedtls_x509_get_time(). 3512817466cbSJens Wiklander Found by subramanyam-c. #626 3513817466cbSJens Wiklander * Fix compatibility issue with Internet Explorer client authentication, 3514817466cbSJens Wiklander where the limited hash choices prevented the client from sending its 3515817466cbSJens Wiklander certificate. Found by teumas. #513 3516817466cbSJens Wiklander * Fix compilation without MBEDTLS_SELF_TEST enabled. 3517817466cbSJens Wiklander 3518817466cbSJens WiklanderChanges 3519817466cbSJens Wiklander * Extended test coverage of special cases, and added new timing test suite. 3520817466cbSJens Wiklander * Removed self-tests from the basic-built-test.sh script, and added all 3521817466cbSJens Wiklander missing self-tests to the test suites, to ensure self-tests are only 3522817466cbSJens Wiklander executed once. 3523817466cbSJens Wiklander * Added support for 3 and 4 byte lengths to mbedtls_asn1_write_len(). 3524817466cbSJens Wiklander * Added support for a Yotta specific configuration file - 3525817466cbSJens Wiklander through the symbol YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE. 3526817466cbSJens Wiklander * Added optimization for code space for X.509/OID based on configured 3527817466cbSJens Wiklander features. Contributed by Aviv Palivoda. 3528817466cbSJens Wiklander * Renamed source file library/net.c to library/net_sockets.c to avoid 3529817466cbSJens Wiklander naming collision in projects which also have files with the common name 3530817466cbSJens Wiklander net.c. For consistency, the corresponding header file, net.h, is marked as 3531817466cbSJens Wiklander deprecated, and its contents moved to net_sockets.h. 3532817466cbSJens Wiklander * Changed the strategy for X.509 certificate parsing and validation, to no 3533817466cbSJens Wiklander longer disregard certificates with unrecognised fields. 3534817466cbSJens Wiklander 3535817466cbSJens Wiklander= mbed TLS 2.3.0 branch released 2016-06-28 3536817466cbSJens Wiklander 3537817466cbSJens WiklanderSecurity 3538817466cbSJens Wiklander * Fix missing padding length check in mbedtls_rsa_rsaes_pkcs1_v15_decrypt 3539817466cbSJens Wiklander required by PKCS1 v2.2 3540817466cbSJens Wiklander * Fix potential integer overflow to buffer overflow in 3541817466cbSJens Wiklander mbedtls_rsa_rsaes_pkcs1_v15_encrypt and mbedtls_rsa_rsaes_oaep_encrypt 3542817466cbSJens Wiklander (not triggerable remotely in (D)TLS). 3543817466cbSJens Wiklander * Fix a potential integer underflow to buffer overread in 3544817466cbSJens Wiklander mbedtls_rsa_rsaes_oaep_decrypt. It is not triggerable remotely in 3545817466cbSJens Wiklander SSL/TLS. 3546817466cbSJens Wiklander 3547817466cbSJens WiklanderFeatures 3548817466cbSJens Wiklander * Support for platform abstraction of the standard C library time() 3549817466cbSJens Wiklander function. 3550817466cbSJens Wiklander 3551817466cbSJens WiklanderBugfix 3552817466cbSJens Wiklander * Fix bug in mbedtls_mpi_add_mpi() that caused wrong results when the three 3553817466cbSJens Wiklander arguments where the same (in-place doubling). Found and fixed by Janos 3554817466cbSJens Wiklander Follath. #309 3555817466cbSJens Wiklander * Fix potential build failures related to the 'apidoc' target, introduced 3556817466cbSJens Wiklander in the previous patch release. Found by Robert Scheck. #390 #391 3557817466cbSJens Wiklander * Fix issue in Makefile that prevented building using armar. #386 35585b25c76aSJerome Forissier * Fix memory leak that occurred only when ECJPAKE was enabled and ECDHE and 3559817466cbSJens Wiklander ECDSA was disabled in config.h . The leak didn't occur by default. 3560817466cbSJens Wiklander * Fix an issue that caused valid certificates to be rejected whenever an 3561817466cbSJens Wiklander expired or not yet valid certificate was parsed before a valid certificate 3562817466cbSJens Wiklander in the trusted certificate list. 3563817466cbSJens Wiklander * Fix bug in mbedtls_x509_crt_parse that caused trailing extra data in the 3564817466cbSJens Wiklander buffer after DER certificates to be included in the raw representation. 3565817466cbSJens Wiklander * Fix issue that caused a hang when generating RSA keys of odd bitlength 3566817466cbSJens Wiklander * Fix bug in mbedtls_rsa_rsaes_pkcs1_v15_encrypt that made null pointer 3567817466cbSJens Wiklander dereference possible. 3568817466cbSJens Wiklander * Fix issue that caused a crash if invalid curves were passed to 3569817466cbSJens Wiklander mbedtls_ssl_conf_curves. #373 3570817466cbSJens Wiklander * Fix issue in ssl_fork_server which was preventing it from functioning. #429 3571817466cbSJens Wiklander * Fix memory leaks in test framework 3572817466cbSJens Wiklander * Fix test in ssl-opt.sh that does not run properly with valgrind 3573817466cbSJens Wiklander * Fix unchecked calls to mmbedtls_md_setup(). Fix by Brian Murray. #502 3574817466cbSJens Wiklander 3575817466cbSJens WiklanderChanges 3576817466cbSJens Wiklander * On ARM platforms, when compiling with -O0 with GCC, Clang or armcc5, 3577817466cbSJens Wiklander don't use the optimized assembly for bignum multiplication. This removes 3578817466cbSJens Wiklander the need to pass -fomit-frame-pointer to avoid a build error with -O0. 3579817466cbSJens Wiklander * Disabled SSLv3 in the default configuration. 3580817466cbSJens Wiklander * Optimized mbedtls_mpi_zeroize() for MPI integer size. (Fix by Alexey 3581817466cbSJens Wiklander Skalozub). 3582817466cbSJens Wiklander * Fix non-compliance server extension handling. Extensions for SSLv3 are now 3583817466cbSJens Wiklander ignored, as required by RFC6101. 3584817466cbSJens Wiklander 3585817466cbSJens Wiklander= mbed TLS 2.2.1 released 2016-01-05 3586817466cbSJens Wiklander 3587817466cbSJens WiklanderSecurity 3588817466cbSJens Wiklander * Fix potential double free when mbedtls_asn1_store_named_data() fails to 3589817466cbSJens Wiklander allocate memory. Only used for certificate generation, not triggerable 3590817466cbSJens Wiklander remotely in SSL/TLS. Found by Rafał Przywara. #367 3591817466cbSJens Wiklander * Disable MD5 handshake signatures in TLS 1.2 by default to prevent the 3592817466cbSJens Wiklander SLOTH attack on TLS 1.2 server authentication (other attacks from the 3593817466cbSJens Wiklander SLOTH paper do not apply to any version of mbed TLS or PolarSSL). 3594817466cbSJens Wiklander https://www.mitls.org/pages/attacks/SLOTH 3595817466cbSJens Wiklander 3596817466cbSJens WiklanderBugfix 3597817466cbSJens Wiklander * Fix over-restrictive length limit in GCM. Found by Andreas-N. #362 3598817466cbSJens Wiklander * Fix bug in certificate validation that caused valid chains to be rejected 3599817466cbSJens Wiklander when the first intermediate certificate has pathLenConstraint=0. Found by 3600817466cbSJens Wiklander Nicholas Wilson. Introduced in mbed TLS 2.2.0. #280 3601817466cbSJens Wiklander * Removed potential leak in mbedtls_rsa_rsassa_pkcs1_v15_sign(), found by 3602817466cbSJens Wiklander JayaraghavendranK. #372 3603817466cbSJens Wiklander * Fix suboptimal handling of unexpected records that caused interop issues 3604817466cbSJens Wiklander with some peers over unreliable links. Avoid dropping an entire DTLS 3605817466cbSJens Wiklander datagram if a single record in a datagram is unexpected, instead only 3606817466cbSJens Wiklander drop the record and look at subsequent records (if any are present) in 3607817466cbSJens Wiklander the same datagram. Found by jeannotlapin. #345 3608817466cbSJens Wiklander 3609817466cbSJens Wiklander= mbed TLS 2.2.0 released 2015-11-04 3610817466cbSJens Wiklander 3611817466cbSJens WiklanderSecurity 3612817466cbSJens Wiklander * Fix potential double free if mbedtls_ssl_conf_psk() is called more than 3613817466cbSJens Wiklander once and some allocation fails. Cannot be forced remotely. Found by Guido 3614817466cbSJens Wiklander Vranken, Intelworks. 3615817466cbSJens Wiklander * Fix potential heap corruption on Windows when 3616817466cbSJens Wiklander mbedtls_x509_crt_parse_path() is passed a path longer than 2GB. Cannot be 3617817466cbSJens Wiklander triggered remotely. Found by Guido Vranken, Intelworks. 3618817466cbSJens Wiklander * Fix potential buffer overflow in some asn1_write_xxx() functions. 3619817466cbSJens Wiklander Cannot be triggered remotely unless you create X.509 certificates based 3620817466cbSJens Wiklander on untrusted input or write keys of untrusted origin. Found by Guido 3621817466cbSJens Wiklander Vranken, Intelworks. 3622817466cbSJens Wiklander * The X509 max_pathlen constraint was not enforced on intermediate 3623817466cbSJens Wiklander certificates. Found by Nicholas Wilson, fix and tests provided by 3624817466cbSJens Wiklander Janos Follath. #280 and #319 3625817466cbSJens Wiklander 3626817466cbSJens WiklanderFeatures 3627817466cbSJens Wiklander * Experimental support for EC J-PAKE as defined in Thread 1.0.0. 3628817466cbSJens Wiklander Disabled by default as the specification might still change. 3629817466cbSJens Wiklander * Added a key extraction callback to accees the master secret and key 3630817466cbSJens Wiklander block. (Potential uses include EAP-TLS and Thread.) 3631817466cbSJens Wiklander 3632817466cbSJens WiklanderBugfix 3633817466cbSJens Wiklander * Self-signed certificates were not excluded from pathlen counting, 3634817466cbSJens Wiklander resulting in some valid X.509 being incorrectly rejected. Found and fix 3635817466cbSJens Wiklander provided by Janos Follath. #319 3636817466cbSJens Wiklander * Fix build error with configurations where ECDHE-PSK is the only key 3637817466cbSJens Wiklander exchange. Found and fix provided by Chris Hammond. #270 3638817466cbSJens Wiklander * Fix build error with configurations where RSA, RSA-PSK, ECDH-RSA or 3639817466cbSJens Wiklander ECHD-ECDSA if the only key exchange. Multiple reports. #310 3640817466cbSJens Wiklander * Fixed a bug causing some handshakes to fail due to some non-fatal alerts 3641817466cbSJens Wiklander not being properly ignored. Found by mancha and Kasom Koht-arsa, #308 3642817466cbSJens Wiklander * mbedtls_x509_crt_verify(_with_profile)() now also checks the key type and 3643817466cbSJens Wiklander size/curve against the profile. Before that, there was no way to set a 3644817466cbSJens Wiklander minimum key size for end-entity certificates with RSA keys. Found by 3645817466cbSJens Wiklander Matthew Page of Scannex Electronics Ltd. 3646817466cbSJens Wiklander * Fix failures in MPI on Sparc(64) due to use of bad assembly code. 3647817466cbSJens Wiklander Found by Kurt Danielson. #292 3648817466cbSJens Wiklander * Fix typo in name of the extKeyUsage OID. Found by inestlerode, #314 3649817466cbSJens Wiklander * Fix bug in ASN.1 encoding of booleans that caused generated CA 3650817466cbSJens Wiklander certificates to be rejected by some applications, including OS X 3651817466cbSJens Wiklander Keychain. Found and fixed by Jonathan Leroy, Inikup. 3652817466cbSJens Wiklander 3653817466cbSJens WiklanderChanges 3654817466cbSJens Wiklander * Improved performance of mbedtls_ecp_muladd() when one of the scalars is 1 3655817466cbSJens Wiklander or -1. 3656817466cbSJens Wiklander 3657817466cbSJens Wiklander= mbed TLS 2.1.2 released 2015-10-06 3658817466cbSJens Wiklander 3659817466cbSJens WiklanderSecurity 3660817466cbSJens Wiklander * Added fix for CVE-2015-5291 to prevent heap corruption due to buffer 3661817466cbSJens Wiklander overflow of the hostname or session ticket. Found by Guido Vranken, 3662817466cbSJens Wiklander Intelworks. 3663817466cbSJens Wiklander * Fix potential double-free if mbedtls_ssl_set_hs_psk() is called more than 3664817466cbSJens Wiklander once in the same handhake and mbedtls_ssl_conf_psk() was used. 3665817466cbSJens Wiklander Found and patch provided by Guido Vranken, Intelworks. Cannot be forced 3666817466cbSJens Wiklander remotely. 3667817466cbSJens Wiklander * Fix stack buffer overflow in pkcs12 decryption (used by 3668817466cbSJens Wiklander mbedtls_pk_parse_key(file)() when the password is > 129 bytes. 3669817466cbSJens Wiklander Found by Guido Vranken, Intelworks. Not triggerable remotely. 3670817466cbSJens Wiklander * Fix potential buffer overflow in mbedtls_mpi_read_string(). 3671817466cbSJens Wiklander Found by Guido Vranken, Intelworks. Not exploitable remotely in the context 3672817466cbSJens Wiklander of TLS, but might be in other uses. On 32 bit machines, requires reading a 3673817466cbSJens Wiklander string of close to or larger than 1GB to exploit; on 64 bit machines, would 3674817466cbSJens Wiklander require reading a string of close to or larger than 2^62 bytes. 3675817466cbSJens Wiklander * Fix potential random memory allocation in mbedtls_pem_read_buffer() 3676817466cbSJens Wiklander on crafted PEM input data. Found and fix provided by Guido Vranken, 3677817466cbSJens Wiklander Intelworks. Not triggerable remotely in TLS. Triggerable remotely if you 3678817466cbSJens Wiklander accept PEM data from an untrusted source. 3679817466cbSJens Wiklander * Fix possible heap buffer overflow in base64_encoded() when the input 3680817466cbSJens Wiklander buffer is 512MB or larger on 32-bit platforms. Found by Guido Vranken, 3681817466cbSJens Wiklander Intelworks. Not trigerrable remotely in TLS. 3682817466cbSJens Wiklander * Fix potential double-free if mbedtls_conf_psk() is called repeatedly on 3683817466cbSJens Wiklander the same mbedtls_ssl_config object and memory allocation fails. Found by 3684817466cbSJens Wiklander Guido Vranken, Intelworks. Cannot be forced remotely. 3685817466cbSJens Wiklander * Fix potential heap buffer overflow in servers that perform client 3686817466cbSJens Wiklander authentication against a crafted CA cert. Cannot be triggered remotely 3687817466cbSJens Wiklander unless you allow third parties to pick trust CAs for client auth. 3688817466cbSJens Wiklander Found by Guido Vranken, Intelworks. 3689817466cbSJens Wiklander 3690817466cbSJens WiklanderBugfix 3691817466cbSJens Wiklander * Fix compile error in net.c with musl libc. Found and patch provided by 3692817466cbSJens Wiklander zhasha (#278). 3693817466cbSJens Wiklander * Fix macroization of 'inline' keyword when building as C++. (#279) 3694817466cbSJens Wiklander 3695817466cbSJens WiklanderChanges 3696817466cbSJens Wiklander * Added checking of hostname length in mbedtls_ssl_set_hostname() to ensure 3697817466cbSJens Wiklander domain names are compliant with RFC 1035. 3698817466cbSJens Wiklander * Fixed paths for check_config.h in example config files. (Found by bachp) 3699817466cbSJens Wiklander (#291) 3700817466cbSJens Wiklander 3701817466cbSJens Wiklander= mbed TLS 2.1.1 released 2015-09-17 3702817466cbSJens Wiklander 3703817466cbSJens WiklanderSecurity 3704817466cbSJens Wiklander * Add countermeasure against Lenstra's RSA-CRT attack for PKCS#1 v1.5 3705817466cbSJens Wiklander signatures. (Found by Florian Weimer, Red Hat.) 3706817466cbSJens Wiklander https://securityblog.redhat.com/2015/09/02/factoring-rsa-keys-with-tls-perfect-forward-secrecy/ 3707817466cbSJens Wiklander * Fix possible client-side NULL pointer dereference (read) when the client 3708817466cbSJens Wiklander tries to continue the handshake after it failed (a misuse of the API). 3709817466cbSJens Wiklander (Found and patch provided by Fabian Foerg, Gotham Digital Science using 3710817466cbSJens Wiklander afl-fuzz.) 3711817466cbSJens Wiklander 3712817466cbSJens WiklanderBugfix 3713817466cbSJens Wiklander * Fix warning when using a 64bit platform. (found by embedthis) (#275) 3714817466cbSJens Wiklander * Fix off-by-one error in parsing Supported Point Format extension that 3715817466cbSJens Wiklander caused some handshakes to fail. 3716817466cbSJens Wiklander 3717817466cbSJens WiklanderChanges 3718817466cbSJens Wiklander * Made X509 profile pointer const in mbedtls_ssl_conf_cert_profile() to allow 3719817466cbSJens Wiklander use of mbedtls_x509_crt_profile_next. (found by NWilson) 3720817466cbSJens Wiklander * When a client initiates a reconnect from the same port as a live 3721817466cbSJens Wiklander connection, if cookie verification is available 3722817466cbSJens Wiklander (MBEDTLS_SSL_DTLS_HELLO_VERIFY defined in config.h, and usable cookie 3723817466cbSJens Wiklander callbacks set with mbedtls_ssl_conf_dtls_cookies()), this will be 3724817466cbSJens Wiklander detected and mbedtls_ssl_read() will return 3725817466cbSJens Wiklander MBEDTLS_ERR_SSL_CLIENT_RECONNECT - it is then possible to start a new 3726817466cbSJens Wiklander handshake with the same context. (See RFC 6347 section 4.2.8.) 3727817466cbSJens Wiklander 3728817466cbSJens Wiklander= mbed TLS 2.1.0 released 2015-09-04 3729817466cbSJens Wiklander 3730817466cbSJens WiklanderFeatures 3731817466cbSJens Wiklander * Added support for yotta as a build system. 3732817466cbSJens Wiklander * Primary open source license changed to Apache 2.0 license. 3733817466cbSJens Wiklander 3734817466cbSJens WiklanderBugfix 3735817466cbSJens Wiklander * Fix segfault in the benchmark program when benchmarking DHM. 3736817466cbSJens Wiklander * Fix build error with CMake and pre-4.5 versions of GCC (found by Hugo 3737817466cbSJens Wiklander Leisink). 3738817466cbSJens Wiklander * Fix bug when parsing a ServerHello without extensions (found by David 3739817466cbSJens Wiklander Sears). 3740817466cbSJens Wiklander * Fix bug in CMake lists that caused libmbedcrypto.a not to be installed 3741817466cbSJens Wiklander (found by Benoit Lecocq). 3742817466cbSJens Wiklander * Fix bug in Makefile that caused libmbedcrypto and libmbedx509 not to be 3743817466cbSJens Wiklander installed (found by Rawi666). 3744817466cbSJens Wiklander * Fix compile error with armcc 5 with --gnu option. 3745817466cbSJens Wiklander * Fix bug in Makefile that caused programs not to be installed correctly 3746817466cbSJens Wiklander (found by robotanarchy) (#232). 3747817466cbSJens Wiklander * Fix bug in Makefile that prevented from installing without building the 3748817466cbSJens Wiklander tests (found by robotanarchy) (#232). 3749817466cbSJens Wiklander * Fix missing -static-libgcc when building shared libraries for Windows 3750817466cbSJens Wiklander with make. 3751817466cbSJens Wiklander * Fix link error when building shared libraries for Windows with make. 3752817466cbSJens Wiklander * Fix error when loading libmbedtls.so. 3753817466cbSJens Wiklander * Fix bug in mbedtls_ssl_conf_default() that caused the default preset to 3754817466cbSJens Wiklander be always used (found by dcb314) (#235) 3755817466cbSJens Wiklander * Fix bug in mbedtls_rsa_public() and mbedtls_rsa_private() that could 3756817466cbSJens Wiklander result trying to unlock an unlocked mutex on invalid input (found by 3757817466cbSJens Wiklander Fredrik Axelsson) (#257) 3758817466cbSJens Wiklander * Fix -Wshadow warnings (found by hnrkp) (#240) 3759817466cbSJens Wiklander * Fix memory corruption on client with overlong PSK identity, around 3760817466cbSJens Wiklander SSL_MAX_CONTENT_LEN or higher - not triggerrable remotely (found by 3761817466cbSJens Wiklander Aleksandrs Saveljevs) (#238) 3762817466cbSJens Wiklander * Fix unused function warning when using MBEDTLS_MDx_ALT or 3763817466cbSJens Wiklander MBEDTLS_SHAxxx_ALT (found by Henrik) (#239) 3764817466cbSJens Wiklander * Fix memory corruption in pkey programs (found by yankuncheng) (#210) 3765817466cbSJens Wiklander 3766817466cbSJens WiklanderChanges 3767817466cbSJens Wiklander * The PEM parser now accepts a trailing space at end of lines (#226). 3768817466cbSJens Wiklander * It is now possible to #include a user-provided configuration file at the 3769817466cbSJens Wiklander end of the default config.h by defining MBEDTLS_USER_CONFIG_FILE on the 3770817466cbSJens Wiklander compiler's command line. 3771817466cbSJens Wiklander * When verifying a certificate chain, if an intermediate certificate is 3772817466cbSJens Wiklander trusted, no later cert is checked. (suggested by hannes-landeholm) 3773817466cbSJens Wiklander (#220). 3774817466cbSJens Wiklander * Prepend a "thread identifier" to debug messages (issue pointed out by 3775817466cbSJens Wiklander Hugo Leisink) (#210). 3776817466cbSJens Wiklander * Add mbedtls_ssl_get_max_frag_len() to query the current maximum fragment 3777817466cbSJens Wiklander length. 3778817466cbSJens Wiklander 3779817466cbSJens Wiklander= mbed TLS 2.0.0 released 2015-07-13 3780817466cbSJens Wiklander 3781817466cbSJens WiklanderFeatures 3782817466cbSJens Wiklander * Support for DTLS 1.0 and 1.2 (RFC 6347). 3783817466cbSJens Wiklander * Ability to override core functions from MDx, SHAx, AES and DES modules 3784817466cbSJens Wiklander with custom implementation (eg hardware accelerated), complementing the 3785817466cbSJens Wiklander ability to override the whole module. 3786817466cbSJens Wiklander * New server-side implementation of session tickets that rotate keys to 3787817466cbSJens Wiklander preserve forward secrecy, and allows sharing across multiple contexts. 3788817466cbSJens Wiklander * Added a concept of X.509 cerificate verification profile that controls 3789817466cbSJens Wiklander which algorithms and key sizes (curves for ECDSA) are acceptable. 3790817466cbSJens Wiklander * Expanded configurability of security parameters in the SSL module with 3791817466cbSJens Wiklander mbedtls_ssl_conf_dhm_min_bitlen() and mbedtls_ssl_conf_sig_hashes(). 3792817466cbSJens Wiklander * Introduced a concept of presets for SSL security-relevant configuration 3793817466cbSJens Wiklander parameters. 3794817466cbSJens Wiklander 3795817466cbSJens WiklanderAPI Changes 3796817466cbSJens Wiklander * The library has been split into libmbedcrypto, libmbedx509, libmbedtls. 3797817466cbSJens Wiklander You now need to link to all of them if you use TLS for example. 3798817466cbSJens Wiklander * All public identifiers moved to the mbedtls_* or MBEDTLS_* namespace. 3799817466cbSJens Wiklander Some names have been further changed to make them more consistent. 38005b25c76aSJerome Forissier Migration helpers scripts/rename.pl and include/mbedtls/compat-1.3.h are 3801817466cbSJens Wiklander provided. Full list of renamings in scripts/data_files/rename-1.3-2.0.txt 3802817466cbSJens Wiklander * Renamings of fields inside structures, not covered by the previous list: 3803817466cbSJens Wiklander mbedtls_cipher_info_t.key_length -> key_bitlen 3804817466cbSJens Wiklander mbedtls_cipher_context_t.key_length -> key_bitlen 3805817466cbSJens Wiklander mbedtls_ecp_curve_info.size -> bit_size 3806817466cbSJens Wiklander * Headers are now found in the 'mbedtls' directory (previously 'polarssl'). 3807817466cbSJens Wiklander * The following _init() functions that could return errors have 3808817466cbSJens Wiklander been split into an _init() that returns void and another function that 3809817466cbSJens Wiklander should generally be the first function called on this context after init: 3810817466cbSJens Wiklander mbedtls_ssl_init() -> mbedtls_ssl_setup() 3811817466cbSJens Wiklander mbedtls_ccm_init() -> mbedtls_ccm_setkey() 3812817466cbSJens Wiklander mbedtls_gcm_init() -> mbedtls_gcm_setkey() 3813817466cbSJens Wiklander mbedtls_hmac_drbg_init() -> mbedtls_hmac_drbg_seed(_buf)() 3814817466cbSJens Wiklander mbedtls_ctr_drbg_init() -> mbedtls_ctr_drbg_seed() 3815817466cbSJens Wiklander Note that for mbedtls_ssl_setup(), you need to be done setting up the 3816817466cbSJens Wiklander ssl_config structure before calling it. 3817817466cbSJens Wiklander * Most ssl_set_xxx() functions (all except ssl_set_bio(), ssl_set_hostname(), 3818817466cbSJens Wiklander ssl_set_session() and ssl_set_client_transport_id(), plus 3819817466cbSJens Wiklander ssl_legacy_renegotiation()) have been renamed to mbedtls_ssl_conf_xxx() 3820817466cbSJens Wiklander (see rename.pl and compat-1.3.h above) and their first argument's type 3821817466cbSJens Wiklander changed from ssl_context to ssl_config. 3822817466cbSJens Wiklander * ssl_set_bio() changed signature (contexts merged, order switched, one 3823817466cbSJens Wiklander additional callback for read-with-timeout). 3824817466cbSJens Wiklander * The following functions have been introduced and must be used in callback 3825817466cbSJens Wiklander implementations (SNI, PSK) instead of their *conf counterparts: 3826817466cbSJens Wiklander mbedtls_ssl_set_hs_own_cert() 3827817466cbSJens Wiklander mbedtls_ssl_set_hs_ca_chain() 3828817466cbSJens Wiklander mbedtls_ssl_set_hs_psk() 3829817466cbSJens Wiklander * mbedtls_ssl_conf_ca_chain() lost its last argument (peer_cn), now set 3830817466cbSJens Wiklander using mbedtls_ssl_set_hostname(). 3831817466cbSJens Wiklander * mbedtls_ssl_conf_session_cache() changed prototype (only one context 3832817466cbSJens Wiklander pointer, parameters reordered). 3833817466cbSJens Wiklander * On server, mbedtls_ssl_conf_session_tickets_cb() must now be used in 3834817466cbSJens Wiklander place of mbedtls_ssl_conf_session_tickets() to enable session tickets. 3835817466cbSJens Wiklander * The SSL debug callback gained two new arguments (file name, line number). 3836817466cbSJens Wiklander * Debug modes were removed. 3837817466cbSJens Wiklander * mbedtls_ssl_conf_truncated_hmac() now returns void. 3838817466cbSJens Wiklander * mbedtls_memory_buffer_alloc_init() now returns void. 3839817466cbSJens Wiklander * X.509 verification flags are now an uint32_t. Affect the signature of: 3840817466cbSJens Wiklander mbedtls_ssl_get_verify_result() 3841817466cbSJens Wiklander mbedtls_x509_ctr_verify_info() 3842817466cbSJens Wiklander mbedtls_x509_crt_verify() (flags, f_vrfy -> needs to be updated) 3843817466cbSJens Wiklander mbedtls_ssl_conf_verify() (f_vrfy -> needs to be updated) 3844817466cbSJens Wiklander * The following functions changed prototype to avoid an in-out length 3845817466cbSJens Wiklander parameter: 3846817466cbSJens Wiklander mbedtls_base64_encode() 3847817466cbSJens Wiklander mbedtls_base64_decode() 3848817466cbSJens Wiklander mbedtls_mpi_write_string() 3849817466cbSJens Wiklander mbedtls_dhm_calc_secret() 3850817466cbSJens Wiklander * In the NET module, all "int" and "int *" arguments for file descriptors 3851817466cbSJens Wiklander changed type to "mbedtls_net_context *". 3852817466cbSJens Wiklander * net_accept() gained new arguments for the size of the client_ip buffer. 3853817466cbSJens Wiklander * In the threading layer, mbedtls_mutex_init() and mbedtls_mutex_free() now 3854817466cbSJens Wiklander return void. 38555b25c76aSJerome Forissier * ecdsa_write_signature() gained an additional md_alg argument and 3856817466cbSJens Wiklander ecdsa_write_signature_det() was deprecated. 3857817466cbSJens Wiklander * pk_sign() no longer accepts md_alg == POLARSSL_MD_NONE with ECDSA. 3858817466cbSJens Wiklander * Last argument of x509_crt_check_key_usage() and 3859817466cbSJens Wiklander mbedtls_x509write_crt_set_key_usage() changed from int to unsigned. 3860817466cbSJens Wiklander * test_ca_list (from certs.h) is renamed to test_cas_pem and is only 3861817466cbSJens Wiklander available if POLARSSL_PEM_PARSE_C is defined (it never worked without). 3862817466cbSJens Wiklander * Test certificates in certs.c are no longer guaranteed to be nul-terminated 3863817466cbSJens Wiklander strings; use the new *_len variables instead of strlen(). 3864817466cbSJens Wiklander * Functions mbedtls_x509_xxx_parse(), mbedtls_pk_parse_key(), 3865817466cbSJens Wiklander mbedtls_pk_parse_public_key() and mbedtls_dhm_parse_dhm() now expect the 3866817466cbSJens Wiklander length parameter to include the terminating null byte for PEM input. 3867817466cbSJens Wiklander * Signature of mpi_mul_mpi() changed to make the last argument unsigned 3868817466cbSJens Wiklander * calloc() is now used instead of malloc() everywhere. API of platform 3869817466cbSJens Wiklander layer and the memory_buffer_alloc module changed accordingly. 3870817466cbSJens Wiklander (Thanks to Mansour Moufid for helping with the replacement.) 3871817466cbSJens Wiklander * Change SSL_DISABLE_RENEGOTIATION config.h flag to SSL_RENEGOTIATION 3872817466cbSJens Wiklander (support for renegotiation now needs explicit enabling in config.h). 3873817466cbSJens Wiklander * Split MBEDTLS_HAVE_TIME into MBEDTLS_HAVE_TIME and MBEDTLS_HAVE_TIME_DATE 3874817466cbSJens Wiklander in config.h 3875817466cbSJens Wiklander * net_connect() and net_bind() have a new 'proto' argument to choose 3876817466cbSJens Wiklander between TCP and UDP, using the macros NET_PROTO_TCP or NET_PROTO_UDP. 3877817466cbSJens Wiklander Their 'port' argument type is changed to a string. 3878817466cbSJens Wiklander * Some constness fixes 3879817466cbSJens Wiklander 3880817466cbSJens WiklanderRemovals 3881817466cbSJens Wiklander * Removed mbedtls_ecp_group_read_string(). Only named groups are supported. 3882817466cbSJens Wiklander * Removed mbedtls_ecp_sub() and mbedtls_ecp_add(), use 3883817466cbSJens Wiklander mbedtls_ecp_muladd(). 3884817466cbSJens Wiklander * Removed individual mdX_hmac, shaX_hmac, mdX_file and shaX_file functions 3885817466cbSJens Wiklander (use generic functions from md.h) 3886817466cbSJens Wiklander * Removed mbedtls_timing_msleep(). Use mbedtls_net_usleep() or a custom 3887817466cbSJens Wiklander waiting function. 3888817466cbSJens Wiklander * Removed test DHM parameters from the test certs module. 3889817466cbSJens Wiklander * Removed the PBKDF2 module (use PKCS5). 3890817466cbSJens Wiklander * Removed POLARSSL_ERROR_STRERROR_BC (use mbedtls_strerror()). 3891817466cbSJens Wiklander * Removed compat-1.2.h (helper for migrating from 1.2 to 1.3). 3892817466cbSJens Wiklander * Removed openssl.h (very partial OpenSSL compatibility layer). 3893817466cbSJens Wiklander * Configuration options POLARSSL_HAVE_LONGLONG was removed (now always on). 3894817466cbSJens Wiklander * Configuration options POLARSSL_HAVE_INT8 and POLARSSL_HAVE_INT16 have 3895817466cbSJens Wiklander been removed (compiler is required to support 32-bit operations). 3896817466cbSJens Wiklander * Configuration option POLARSSL_HAVE_IPV6 was removed (always enabled). 3897817466cbSJens Wiklander * Removed test program o_p_test, the script compat.sh does more. 3898817466cbSJens Wiklander * Removed test program ssl_test, superseded by ssl-opt.sh. 3899817466cbSJens Wiklander * Removed helper script active-config.pl 3900817466cbSJens Wiklander 3901817466cbSJens WiklanderNew deprecations 3902817466cbSJens Wiklander * md_init_ctx() is deprecated in favour of md_setup(), that adds a third 3903817466cbSJens Wiklander argument (allowing memory savings if HMAC is not used) 3904817466cbSJens Wiklander 3905817466cbSJens WiklanderSemi-API changes (technically public, morally private) 3906817466cbSJens Wiklander * Renamed a few headers to include _internal in the name. Those headers are 3907817466cbSJens Wiklander not supposed to be included by users. 3908817466cbSJens Wiklander * Changed md_info_t into an opaque structure (use md_get_xxx() accessors). 3909817466cbSJens Wiklander * Changed pk_info_t into an opaque structure. 3910817466cbSJens Wiklander * Changed cipher_base_t into an opaque structure. 3911817466cbSJens Wiklander * Removed sig_oid2 and rename sig_oid1 to sig_oid in x509_crt and x509_crl. 3912817466cbSJens Wiklander * x509_crt.key_usage changed from unsigned char to unsigned int. 3913817466cbSJens Wiklander * Removed r and s from ecdsa_context 3914817466cbSJens Wiklander * Removed mode from des_context and des3_context 3915817466cbSJens Wiklander 3916817466cbSJens WiklanderDefault behavior changes 3917817466cbSJens Wiklander * The default minimum TLS version is now TLS 1.0. 3918817466cbSJens Wiklander * RC4 is now blacklisted by default in the SSL/TLS layer, and excluded from the 3919817466cbSJens Wiklander default ciphersuite list returned by ssl_list_ciphersuites() 3920817466cbSJens Wiklander * Support for receiving SSLv2 ClientHello is now disabled by default at 3921817466cbSJens Wiklander compile time. 3922817466cbSJens Wiklander * The default authmode for SSL/TLS clients is now REQUIRED. 3923817466cbSJens Wiklander * Support for RSA_ALT contexts in the PK layer is now optional. Since is is 3924817466cbSJens Wiklander enabled in the default configuration, this is only noticeable if using a 3925817466cbSJens Wiklander custom config.h 3926817466cbSJens Wiklander * Default DHM parameters server-side upgraded from 1024 to 2048 bits. 3927817466cbSJens Wiklander * A minimum RSA key size of 2048 bits is now enforced during ceritificate 3928817466cbSJens Wiklander chain verification. 3929817466cbSJens Wiklander * Negotiation of truncated HMAC is now disabled by default on server too. 3930817466cbSJens Wiklander * The following functions are now case-sensitive: 3931817466cbSJens Wiklander mbedtls_cipher_info_from_string() 3932817466cbSJens Wiklander mbedtls_ecp_curve_info_from_name() 3933817466cbSJens Wiklander mbedtls_md_info_from_string() 3934817466cbSJens Wiklander mbedtls_ssl_ciphersuite_from_string() 3935817466cbSJens Wiklander mbedtls_version_check_feature() 3936817466cbSJens Wiklander 3937817466cbSJens WiklanderRequirement changes 3938817466cbSJens Wiklander * The minimum MSVC version required is now 2010 (better C99 support). 3939817466cbSJens Wiklander * The NET layer now unconditionnaly relies on getaddrinfo() and select(). 3940817466cbSJens Wiklander * Compiler is required to support C99 types such as long long and uint32_t. 3941817466cbSJens Wiklander 3942817466cbSJens WiklanderAPI changes from the 1.4 preview branch 3943817466cbSJens Wiklander * ssl_set_bio_timeout() was removed, split into mbedtls_ssl_set_bio() with 3944817466cbSJens Wiklander new prototype, and mbedtls_ssl_set_read_timeout(). 3945817466cbSJens Wiklander * The following functions now return void: 3946817466cbSJens Wiklander mbedtls_ssl_conf_transport() 3947817466cbSJens Wiklander mbedtls_ssl_conf_max_version() 3948817466cbSJens Wiklander mbedtls_ssl_conf_min_version() 3949817466cbSJens Wiklander * DTLS no longer hard-depends on TIMING_C, but uses a callback interface 3950817466cbSJens Wiklander instead, see mbedtls_ssl_set_timer_cb(), with the Timing module providing 3951817466cbSJens Wiklander an example implementation, see mbedtls_timing_delay_context and 3952817466cbSJens Wiklander mbedtls_timing_set/get_delay(). 3953817466cbSJens Wiklander * With UDP sockets, it is no longer necessary to call net_bind() again 3954817466cbSJens Wiklander after a successful net_accept(). 3955817466cbSJens Wiklander 3956817466cbSJens WiklanderChanges 3957817466cbSJens Wiklander * mbedtls_ctr_drbg_random() and mbedtls_hmac_drbg_random() are now 3958817466cbSJens Wiklander thread-safe if MBEDTLS_THREADING_C is enabled. 3959817466cbSJens Wiklander * Reduced ROM fooprint of SHA-256 and added an option to reduce it even 3960817466cbSJens Wiklander more (at the expense of performance) MBEDTLS_SHA256_SMALLER. 3961817466cbSJens Wiklander 3962817466cbSJens Wiklander= mbed TLS 1.3 branch 3963817466cbSJens Wiklander 3964817466cbSJens WiklanderSecurity 3965817466cbSJens Wiklander * With authmode set to SSL_VERIFY_OPTIONAL, verification of keyUsage and 3966817466cbSJens Wiklander extendedKeyUsage on the leaf certificate was lost (results not accessible 3967817466cbSJens Wiklander via ssl_get_verify_results()). 3968817466cbSJens Wiklander * Add countermeasure against "Lucky 13 strikes back" cache-based attack, 3969817466cbSJens Wiklander https://dl.acm.org/citation.cfm?id=2714625 3970817466cbSJens Wiklander 3971817466cbSJens WiklanderFeatures 3972817466cbSJens Wiklander * Improve ECC performance by using more efficient doubling formulas 3973817466cbSJens Wiklander (contributed by Peter Dettman). 3974817466cbSJens Wiklander * Add x509_crt_verify_info() to display certificate verification results. 3975817466cbSJens Wiklander * Add support for reading DH parameters with privateValueLength included 3976817466cbSJens Wiklander (contributed by Daniel Kahn Gillmor). 3977817466cbSJens Wiklander * Add support for bit strings in X.509 names (request by Fredrik Axelsson). 3978817466cbSJens Wiklander * Add support for id-at-uniqueIdentifier in X.509 names. 3979817466cbSJens Wiklander * Add support for overriding snprintf() (except on Windows) and exit() in 3980817466cbSJens Wiklander the platform layer. 3981817466cbSJens Wiklander * Add an option to use macros instead of function pointers in the platform 3982817466cbSJens Wiklander layer (helps get rid of unwanted references). 3983817466cbSJens Wiklander * Improved Makefiles for Windows targets by fixing library targets and making 3984817466cbSJens Wiklander cross-compilation easier (thanks to Alon Bar-Lev). 3985817466cbSJens Wiklander * The benchmark program also prints heap usage for public-key primitives 3986817466cbSJens Wiklander if POLARSSL_MEMORY_BUFFER_ALLOC_C and POLARSSL_MEMORY_DEBUG are defined. 3987817466cbSJens Wiklander * New script ecc-heap.sh helps measuring the impact of ECC parameters on 3988817466cbSJens Wiklander speed and RAM (heap only for now) usage. 3989817466cbSJens Wiklander * New script memory.sh helps measuring the ROM and RAM requirements of two 3990817466cbSJens Wiklander reduced configurations (PSK-CCM and NSA suite B). 3991817466cbSJens Wiklander * Add config flag POLARSSL_DEPRECATED_WARNING (off by default) to produce 3992817466cbSJens Wiklander warnings on use of deprecated functions (with GCC and Clang only). 3993817466cbSJens Wiklander * Add config flag POLARSSL_DEPRECATED_REMOVED (off by default) to produce 3994817466cbSJens Wiklander errors on use of deprecated functions. 3995817466cbSJens Wiklander 3996817466cbSJens WiklanderBugfix 3997817466cbSJens Wiklander * Fix compile errors with PLATFORM_NO_STD_FUNCTIONS. 3998817466cbSJens Wiklander * Fix compile error with PLATFORM_EXIT_ALT (thanks to Rafał Przywara). 3999817466cbSJens Wiklander * Fix bug in entropy.c when THREADING_C is also enabled that caused 4000817466cbSJens Wiklander entropy_free() to crash (thanks to Rafał Przywara). 4001817466cbSJens Wiklander * Fix memory leak when gcm_setkey() and ccm_setkey() are used more than 4002817466cbSJens Wiklander once on the same context. 4003817466cbSJens Wiklander * Fix bug in ssl_mail_client when password is longer that username (found 4004817466cbSJens Wiklander by Bruno Pape). 4005817466cbSJens Wiklander * Fix undefined behaviour (memcmp( NULL, NULL, 0 );) in X.509 modules 4006817466cbSJens Wiklander (detected by Clang's 3.6 UBSan). 4007817466cbSJens Wiklander * mpi_size() and mpi_msb() would segfault when called on an mpi that is 4008817466cbSJens Wiklander initialized but not set (found by pravic). 4009817466cbSJens Wiklander * Fix detection of support for getrandom() on Linux (reported by syzzer) by 4010817466cbSJens Wiklander doing it at runtime (using uname) rather that compile time. 4011817466cbSJens Wiklander * Fix handling of symlinks by "make install" (found by Gaël PORTAY). 4012817466cbSJens Wiklander * Fix potential NULL pointer dereference (not trigerrable remotely) when 4013817466cbSJens Wiklander ssl_write() is called before the handshake is finished (introduced in 4014817466cbSJens Wiklander 1.3.10) (first reported by Martin Blumenstingl). 4015817466cbSJens Wiklander * Fix bug in pk_parse_key() that caused some valid private EC keys to be 4016817466cbSJens Wiklander rejected. 4017817466cbSJens Wiklander * Fix bug in Via Padlock support (found by Nikos Mavrogiannopoulos). 4018817466cbSJens Wiklander * Fix thread safety bug in RSA operations (found by Fredrik Axelsson). 4019817466cbSJens Wiklander * Fix hardclock() (only used in the benchmarking program) with some 4020817466cbSJens Wiklander versions of mingw64 (found by kxjhlele). 4021817466cbSJens Wiklander * Fix warnings from mingw64 in timing.c (found by kxjklele). 4022817466cbSJens Wiklander * Fix potential unintended sign extension in asn1_get_len() on 64-bit 4023817466cbSJens Wiklander platforms. 4024817466cbSJens Wiklander * Fix potential memory leak in ssl_set_psk() (found by Mansour Moufid). 4025817466cbSJens Wiklander * Fix compile error when POLARSSL_SSL_DISABLE_RENEGOTATION and 4026817466cbSJens Wiklander POLARSSL_SSL_SSESSION_TICKETS where both enabled in config.h (introduced 4027817466cbSJens Wiklander in 1.3.10). 4028817466cbSJens Wiklander * Add missing extern "C" guard in aesni.h (reported by amir zamani). 4029817466cbSJens Wiklander * Add missing dependency on SHA-256 in some x509 programs (reported by 4030817466cbSJens Wiklander Gergely Budai). 4031817466cbSJens Wiklander * Fix bug related to ssl_set_curves(): the client didn't check that the 4032817466cbSJens Wiklander curve picked by the server was actually allowed. 4033817466cbSJens Wiklander 4034817466cbSJens WiklanderChanges 4035817466cbSJens Wiklander * Remove bias in mpi_gen_prime (contributed by Pascal Junod). 4036817466cbSJens Wiklander * Remove potential sources of timing variations (some contributed by Pascal 4037817466cbSJens Wiklander Junod). 4038817466cbSJens Wiklander * Options POLARSSL_HAVE_INT8 and POLARSSL_HAVE_INT16 are deprecated. 4039817466cbSJens Wiklander * Enabling POLARSSL_NET_C without POLARSSL_HAVE_IPV6 is deprecated. 4040817466cbSJens Wiklander * compat-1.2.h and openssl.h are deprecated. 4041817466cbSJens Wiklander * Adjusting/overriding CFLAGS and LDFLAGS with the make build system is now 4042817466cbSJens Wiklander more flexible (warning: OFLAGS is not used any more) (see the README) 4043817466cbSJens Wiklander (contributed by Alon Bar-Lev). 4044817466cbSJens Wiklander * ssl_set_own_cert() no longer calls pk_check_pair() since the 4045817466cbSJens Wiklander performance impact was bad for some users (this was introduced in 1.3.10). 4046817466cbSJens Wiklander * Move from SHA-1 to SHA-256 in example programs using signatures 4047817466cbSJens Wiklander (suggested by Thorsten Mühlfelder). 4048817466cbSJens Wiklander * Remove some unneeded inclusions of header files from the standard library 4049817466cbSJens Wiklander "minimize" others (eg use stddef.h if only size_t is needed). 4050817466cbSJens Wiklander * Change #include lines in test files to use double quotes instead of angle 4051817466cbSJens Wiklander brackets for uniformity with the rest of the code. 4052817466cbSJens Wiklander * Remove dependency on sscanf() in X.509 parsing modules. 4053817466cbSJens Wiklander 4054817466cbSJens Wiklander= mbed TLS 1.3.10 released 2015-02-09 4055817466cbSJens WiklanderSecurity 4056817466cbSJens Wiklander * NULL pointer dereference in the buffer-based allocator when the buffer is 4057817466cbSJens Wiklander full and polarssl_free() is called (found by Mark Hasemeyer) 4058817466cbSJens Wiklander (only possible if POLARSSL_MEMORY_BUFFER_ALLOC_C is enabled, which it is 4059817466cbSJens Wiklander not by default). 4060817466cbSJens Wiklander * Fix remotely-triggerable uninitialised pointer dereference caused by 4061817466cbSJens Wiklander crafted X.509 certificate (TLS server is not affected if it doesn't ask for a 4062817466cbSJens Wiklander client certificate) (found using Codenomicon Defensics). 4063817466cbSJens Wiklander * Fix remotely-triggerable memory leak caused by crafted X.509 certificates 4064817466cbSJens Wiklander (TLS server is not affected if it doesn't ask for a client certificate) 4065817466cbSJens Wiklander (found using Codenomicon Defensics). 4066817466cbSJens Wiklander * Fix potential stack overflow while parsing crafted X.509 certificates 4067817466cbSJens Wiklander (TLS server is not affected if it doesn't ask for a client certificate) 4068817466cbSJens Wiklander (found using Codenomicon Defensics). 4069817466cbSJens Wiklander * Fix timing difference that could theoretically lead to a 4070817466cbSJens Wiklander Bleichenbacher-style attack in the RSA and RSA-PSK key exchanges 4071817466cbSJens Wiklander (reported by Sebastian Schinzel). 4072817466cbSJens Wiklander 4073817466cbSJens WiklanderFeatures 4074817466cbSJens Wiklander * Add support for FALLBACK_SCSV (draft-ietf-tls-downgrade-scsv). 4075817466cbSJens Wiklander * Add support for Extended Master Secret (draft-ietf-tls-session-hash). 4076817466cbSJens Wiklander * Add support for Encrypt-then-MAC (RFC 7366). 4077817466cbSJens Wiklander * Add function pk_check_pair() to test if public and private keys match. 4078817466cbSJens Wiklander * Add x509_crl_parse_der(). 4079817466cbSJens Wiklander * Add compile-time option POLARSSL_X509_MAX_INTERMEDIATE_CA to limit the 4080817466cbSJens Wiklander length of an X.509 verification chain. 4081817466cbSJens Wiklander * Support for renegotiation can now be disabled at compile-time 4082817466cbSJens Wiklander * Support for 1/n-1 record splitting, a countermeasure against BEAST. 4083817466cbSJens Wiklander * Certificate selection based on signature hash, preferring SHA-1 over SHA-2 4084817466cbSJens Wiklander for pre-1.2 clients when multiple certificates are available. 4085817466cbSJens Wiklander * Add support for getrandom() syscall on recent Linux kernels with Glibc or 4086817466cbSJens Wiklander a compatible enough libc (eg uClibc). 4087817466cbSJens Wiklander * Add ssl_set_arc4_support() to make it easier to disable RC4 at runtime 4088817466cbSJens Wiklander while using the default ciphersuite list. 4089817466cbSJens Wiklander * Added new error codes and debug messages about selection of 4090817466cbSJens Wiklander ciphersuite/certificate. 4091817466cbSJens Wiklander 4092817466cbSJens WiklanderBugfix 4093817466cbSJens Wiklander * Stack buffer overflow if ctr_drbg_update() is called with too large 4094817466cbSJens Wiklander add_len (found by Jean-Philippe Aumasson) (not triggerable remotely). 4095817466cbSJens Wiklander * Possible buffer overflow of length at most POLARSSL_MEMORY_ALIGN_MULTIPLE 4096817466cbSJens Wiklander if memory_buffer_alloc_init() was called with buf not aligned and len not 4097817466cbSJens Wiklander a multiple of POLARSSL_MEMORY_ALIGN_MULTIPLE (not triggerable remotely). 4098817466cbSJens Wiklander * User set CFLAGS were ignored by Cmake with gcc (introduced in 1.3.9, found 4099817466cbSJens Wiklander by Julian Ospald). 4100817466cbSJens Wiklander * Fix potential undefined behaviour in Camellia. 4101817466cbSJens Wiklander * Fix potential failure in ECDSA signatures when POLARSSL_ECP_MAX_BITS is a 4102817466cbSJens Wiklander multiple of 8 (found by Gergely Budai). 4103817466cbSJens Wiklander * Fix unchecked return code in x509_crt_parse_path() on Windows (found by 4104817466cbSJens Wiklander Peter Vaskovic). 4105817466cbSJens Wiklander * Fix assembly selection for MIPS64 (thanks to James Cowgill). 4106817466cbSJens Wiklander * ssl_get_verify_result() now works even if the handshake was aborted due 4107817466cbSJens Wiklander to a failed verification (found by Fredrik Axelsson). 4108817466cbSJens Wiklander * Skip writing and parsing signature_algorithm extension if none of the 4109817466cbSJens Wiklander key exchanges enabled needs certificates. This fixes a possible interop 4110817466cbSJens Wiklander issue with some servers when a zero-length extension was sent. (Reported 4111817466cbSJens Wiklander by Peter Dettman.) 4112817466cbSJens Wiklander * On a 0-length input, base64_encode() did not correctly set output length 4113817466cbSJens Wiklander (found by Hendrik van den Boogaard). 4114817466cbSJens Wiklander 4115817466cbSJens WiklanderChanges 4116817466cbSJens Wiklander * Use deterministic nonces for AEAD ciphers in TLS by default (possible to 4117817466cbSJens Wiklander switch back to random with POLARSSL_SSL_AEAD_RANDOM_IV in config.h). 4118817466cbSJens Wiklander * Blind RSA private operations even when POLARSSL_RSA_NO_CRT is defined. 4119817466cbSJens Wiklander * ssl_set_own_cert() now returns an error on key-certificate mismatch. 4120817466cbSJens Wiklander * Forbid repeated extensions in X.509 certificates. 4121817466cbSJens Wiklander * debug_print_buf() now prints a text view in addition to hexadecimal. 4122817466cbSJens Wiklander * A specific error is now returned when there are ciphersuites in common 4123817466cbSJens Wiklander but none of them is usable due to external factors such as no certificate 4124817466cbSJens Wiklander with a suitable (extended)KeyUsage or curve or no PSK set. 4125817466cbSJens Wiklander * It is now possible to disable negotiation of truncated HMAC server-side 4126817466cbSJens Wiklander at runtime with ssl_set_truncated_hmac(). 4127817466cbSJens Wiklander * Example programs for SSL client and server now disable SSLv3 by default. 4128817466cbSJens Wiklander * Example programs for SSL client and server now disable RC4 by default. 4129817466cbSJens Wiklander * Use platform.h in all test suites and programs. 4130817466cbSJens Wiklander 4131817466cbSJens Wiklander= PolarSSL 1.3.9 released 2014-10-20 4132817466cbSJens WiklanderSecurity 4133817466cbSJens Wiklander * Lowest common hash was selected from signature_algorithms extension in 4134817466cbSJens Wiklander TLS 1.2 (found by Darren Bane) (introduced in 1.3.8). 4135817466cbSJens Wiklander * Remotely-triggerable memory leak when parsing some X.509 certificates 4136817466cbSJens Wiklander (server is not affected if it doesn't ask for a client certificate) 4137817466cbSJens Wiklander (found using Codenomicon Defensics). 4138817466cbSJens Wiklander * Remotely-triggerable memory leak when parsing crafted ClientHello 4139817466cbSJens Wiklander (not affected if ECC support was compiled out) (found using Codenomicon 4140817466cbSJens Wiklander Defensics). 4141817466cbSJens Wiklander 4142817466cbSJens WiklanderBugfix 4143817466cbSJens Wiklander * Support escaping of commas in x509_string_to_names() 4144817466cbSJens Wiklander * Fix compile error in ssl_pthread_server (found by Julian Ospald). 4145817466cbSJens Wiklander * Fix net_accept() regarding non-blocking sockets (found by Luca Pesce). 4146817466cbSJens Wiklander * Don't print uninitialised buffer in ssl_mail_client (found by Marc Abel). 4147817466cbSJens Wiklander * Fix warnings from Clang's scan-build (contributed by Alfred Klomp). 4148817466cbSJens Wiklander * Fix compile error in timing.c when POLARSSL_NET_C and POLARSSL_SELFTEST 4149817466cbSJens Wiklander are defined but not POLARSSL_HAVE_TIME (found by Stephane Di Vito). 4150817466cbSJens Wiklander * Remove non-existent file from VS projects (found by Peter Vaskovic). 4151817466cbSJens Wiklander * ssl_read() could return non-application data records on server while 4152817466cbSJens Wiklander renegotation was pending, and on client when a HelloRequest was received. 4153817466cbSJens Wiklander * Server-initiated renegotiation would fail with non-blocking I/O if the 4154817466cbSJens Wiklander write callback returned WANT_WRITE when requesting renegotiation. 4155817466cbSJens Wiklander * ssl_close_notify() could send more than one message in some circumstances 4156817466cbSJens Wiklander with non-blocking I/O. 4157817466cbSJens Wiklander * Fix compiler warnings on iOS (found by Sander Niemeijer). 4158817466cbSJens Wiklander * x509_crt_parse() did not increase total_failed on PEM error 4159817466cbSJens Wiklander * Fix compile error with armcc in mpi_is_prime() 4160817466cbSJens Wiklander * Fix potential bad read in parsing ServerHello (found by Adrien 4161817466cbSJens Wiklander Vialletelle). 4162817466cbSJens Wiklander 4163817466cbSJens WiklanderChanges 4164817466cbSJens Wiklander * Ciphersuites using SHA-256 or SHA-384 now require TLS 1.x (there is no 4165817466cbSJens Wiklander standard defining how to use SHA-2 with SSL 3.0). 4166817466cbSJens Wiklander * Ciphersuites using RSA-PSK key exchange new require TLS 1.x (the spec is 4167817466cbSJens Wiklander ambiguous on how to encode some packets with SSL 3.0). 4168817466cbSJens Wiklander * Made buffer size in pk_write_(pub)key_pem() more dynamic, eg smaller if 4169817466cbSJens Wiklander RSA is disabled, larger if POLARSSL_MPI_MAX_SIZE is larger. 4170817466cbSJens Wiklander * ssl_read() now returns POLARSSL_ERR_NET_WANT_READ rather than 4171817466cbSJens Wiklander POLARSSL_ERR_SSL_UNEXPECTED_MESSAGE on harmless alerts. 4172817466cbSJens Wiklander * POLARSSL_MPI_MAX_SIZE now defaults to 1024 in order to allow 8192 bits 4173817466cbSJens Wiklander RSA keys. 4174817466cbSJens Wiklander * Accept spaces at end of line or end of buffer in base64_decode(). 4175817466cbSJens Wiklander * X.509 certificates with more than one AttributeTypeAndValue per 4176817466cbSJens Wiklander RelativeDistinguishedName are not accepted any more. 4177817466cbSJens Wiklander 4178817466cbSJens Wiklander= PolarSSL 1.3.8 released 2014-07-11 4179817466cbSJens WiklanderSecurity 4180817466cbSJens Wiklander * Fix length checking for AEAD ciphersuites (found by Codenomicon). 4181817466cbSJens Wiklander It was possible to crash the server (and client) using crafted messages 4182817466cbSJens Wiklander when a GCM suite was chosen. 4183817466cbSJens Wiklander 4184817466cbSJens WiklanderFeatures 4185817466cbSJens Wiklander * Add CCM module and cipher mode to Cipher Layer 4186817466cbSJens Wiklander * Support for CCM and CCM_8 ciphersuites 4187817466cbSJens Wiklander * Support for parsing and verifying RSASSA-PSS signatures in the X.509 4188817466cbSJens Wiklander modules (certificates, CRLs and CSRs). 4189817466cbSJens Wiklander * Blowfish in the cipher layer now supports variable length keys. 4190817466cbSJens Wiklander * Add example config.h for PSK with CCM, optimized for low RAM usage. 4191817466cbSJens Wiklander * Optimize for RAM usage in example config.h for NSA Suite B profile. 4192817466cbSJens Wiklander * Add POLARSSL_REMOVE_ARC4_CIPHERSUITES to allow removing RC4 ciphersuites 4193817466cbSJens Wiklander from the default list (inactive by default). 4194817466cbSJens Wiklander * Add server-side enforcement of sent renegotiation requests 4195817466cbSJens Wiklander (ssl_set_renegotiation_enforced()) 4196817466cbSJens Wiklander * Add SSL_CIPHERSUITES config.h flag to allow specifying a list of 4197817466cbSJens Wiklander ciphersuites to use and save some memory if the list is small. 4198817466cbSJens Wiklander 4199817466cbSJens WiklanderChanges 4200817466cbSJens Wiklander * Add LINK_WITH_PTHREAD option in CMake for explicit linking that is 4201817466cbSJens Wiklander required on some platforms (e.g. OpenBSD) 4202817466cbSJens Wiklander * Migrate zeroizing of data to polarssl_zeroize() instead of memset() 4203817466cbSJens Wiklander against unwanted compiler optimizations 4204817466cbSJens Wiklander * md_list() now returns hashes strongest first 4205817466cbSJens Wiklander * Selection of hash for signing ServerKeyExchange in TLS 1.2 now picks 4206817466cbSJens Wiklander strongest offered by client. 4207817466cbSJens Wiklander * All public contexts have _init() and _free() functions now for simpler 4208817466cbSJens Wiklander usage pattern 4209817466cbSJens Wiklander 4210817466cbSJens WiklanderBugfix 4211817466cbSJens Wiklander * Fix in debug_print_msg() 4212817466cbSJens Wiklander * Enforce alignment in the buffer allocator even if buffer is not aligned 4213817466cbSJens Wiklander * Remove less-than-zero checks on unsigned numbers 4214817466cbSJens Wiklander * Stricter check on SSL ClientHello internal sizes compared to actual packet 4215817466cbSJens Wiklander size (found by TrustInSoft) 4216817466cbSJens Wiklander * Fix WSAStartup() return value check (found by Peter Vaskovic) 4217817466cbSJens Wiklander * Other minor issues (found by Peter Vaskovic) 4218817466cbSJens Wiklander * Fix symlink command for cross compiling with CMake (found by Andre 4219817466cbSJens Wiklander Heinecke) 4220817466cbSJens Wiklander * Fix DER output of gen_key app (found by Gergely Budai) 4221817466cbSJens Wiklander * Very small records were incorrectly rejected when truncated HMAC was in 4222817466cbSJens Wiklander use with some ciphersuites and versions (RC4 in all versions, CBC with 4223817466cbSJens Wiklander versions < TLS 1.1). 4224817466cbSJens Wiklander * Very large records using more than 224 bytes of padding were incorrectly 4225817466cbSJens Wiklander rejected with CBC-based ciphersuites and TLS >= 1.1 4226817466cbSJens Wiklander * Very large records using less padding could cause a buffer overread of up 4227817466cbSJens Wiklander to 32 bytes with CBC-based ciphersuites and TLS >= 1.1 4228817466cbSJens Wiklander * Restore ability to use a v1 cert as a CA if trusted locally. (This had 4229817466cbSJens Wiklander been removed in 1.3.6.) 4230817466cbSJens Wiklander * Restore ability to locally trust a self-signed cert that is not a proper 4231817466cbSJens Wiklander CA for use as an end entity certificate. (This had been removed in 4232817466cbSJens Wiklander 1.3.6.) 4233817466cbSJens Wiklander * Fix preprocessor checks for bn_mul PPC asm (found by Barry K. Nathan). 4234817466cbSJens Wiklander * Use \n\t rather than semicolons for bn_mul asm, since some assemblers 4235817466cbSJens Wiklander interpret semicolons as comment delimiters (found by Barry K. Nathan). 4236817466cbSJens Wiklander * Fix off-by-one error in parsing Supported Point Format extension that 4237817466cbSJens Wiklander caused some handshakes to fail. 4238817466cbSJens Wiklander * Fix possible miscomputation of the premaster secret with DHE-PSK key 4239817466cbSJens Wiklander exchange that caused some handshakes to fail with other implementations. 4240817466cbSJens Wiklander (Failure rate <= 1/255 with common DHM moduli.) 4241817466cbSJens Wiklander * Disable broken Sparc64 bn_mul assembly (found by Florian Obser). 4242817466cbSJens Wiklander * Fix base64_decode() to return and check length correctly (in case of 4243817466cbSJens Wiklander tight buffers) 4244817466cbSJens Wiklander * Fix mpi_write_string() to write "00" as hex output for empty MPI (found 4245817466cbSJens Wiklander by Hui Dong) 4246817466cbSJens Wiklander 4247817466cbSJens Wiklander= PolarSSL 1.3.7 released on 2014-05-02 4248817466cbSJens WiklanderFeatures 4249817466cbSJens Wiklander * debug_set_log_mode() added to determine raw or full logging 4250817466cbSJens Wiklander * debug_set_threshold() added to ignore messages over threshold level 4251817466cbSJens Wiklander * version_check_feature() added to check for compile-time options at 4252817466cbSJens Wiklander run-time 4253817466cbSJens Wiklander 4254817466cbSJens WiklanderChanges 4255817466cbSJens Wiklander * POLARSSL_CONFIG_OPTIONS has been removed. All values are individually 4256817466cbSJens Wiklander checked and filled in the relevant module headers 4257817466cbSJens Wiklander * Debug module only outputs full lines instead of parts 4258817466cbSJens Wiklander * Better support for the different Attribute Types from IETF PKIX (RFC 5280) 4259817466cbSJens Wiklander * AES-NI now compiles with "old" assemblers too 4260817466cbSJens Wiklander * Ciphersuites based on RC4 now have the lowest priority by default 4261817466cbSJens Wiklander 4262817466cbSJens WiklanderBugfix 4263817466cbSJens Wiklander * Only iterate over actual certificates in ssl_write_certificate_request() 4264817466cbSJens Wiklander (found by Matthew Page) 4265817466cbSJens Wiklander * Typos in platform.c and pkcs11.c (found by Daniel Phillips and Steffan 4266817466cbSJens Wiklander Karger) 4267817466cbSJens Wiklander * cert_write app should use subject of issuer certificate as issuer of cert 4268817466cbSJens Wiklander * Fix false reject in padding check in ssl_decrypt_buf() for CBC 4269817466cbSJens Wiklander ciphersuites, for full SSL frames of data. 4270817466cbSJens Wiklander * Improve interoperability by not writing extension length in ClientHello / 4271817466cbSJens Wiklander ServerHello when no extensions are present (found by Matthew Page) 4272817466cbSJens Wiklander * rsa_check_pubkey() now allows an E up to N 4273817466cbSJens Wiklander * On OpenBSD, use arc4random_buf() instead of rand() to prevent warnings 4274817466cbSJens Wiklander * mpi_fill_random() was creating numbers larger than requested on 4275817466cbSJens Wiklander big-endian platform when size was not an integer number of limbs 4276817466cbSJens Wiklander * Fix dependencies issues in X.509 test suite. 4277817466cbSJens Wiklander * Some parts of ssl_tls.c were compiled even when the module was disabled. 4278817466cbSJens Wiklander * Fix detection of DragonflyBSD in net.c (found by Markus Pfeiffer) 4279817466cbSJens Wiklander * Fix detection of Clang on some Apple platforms with CMake 4280817466cbSJens Wiklander (found by Barry K. Nathan) 4281817466cbSJens Wiklander 4282817466cbSJens Wiklander= PolarSSL 1.3.6 released on 2014-04-11 4283817466cbSJens Wiklander 4284817466cbSJens WiklanderFeatures 4285817466cbSJens Wiklander * Support for the ALPN SSL extension 4286817466cbSJens Wiklander * Add option 'use_dev_random' to gen_key application 4287817466cbSJens Wiklander * Enable verification of the keyUsage extension for CA and leaf 4288817466cbSJens Wiklander certificates (POLARSSL_X509_CHECK_KEY_USAGE) 4289817466cbSJens Wiklander * Enable verification of the extendedKeyUsage extension 4290817466cbSJens Wiklander (POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE) 4291817466cbSJens Wiklander 4292817466cbSJens WiklanderChanges 4293817466cbSJens Wiklander * x509_crt_info() now prints information about parsed extensions as well 4294817466cbSJens Wiklander * pk_verify() now returns a specific error code when the signature is valid 4295817466cbSJens Wiklander but shorter than the supplied length. 4296817466cbSJens Wiklander * Use UTC time to check certificate validity. 4297817466cbSJens Wiklander * Reject certificates with times not in UTC, per RFC 5280. 4298817466cbSJens Wiklander 4299817466cbSJens WiklanderSecurity 4300817466cbSJens Wiklander * Avoid potential timing leak in ecdsa_sign() by blinding modular division. 4301817466cbSJens Wiklander (Found by Watson Ladd.) 4302817466cbSJens Wiklander * The notAfter date of some certificates was no longer checked since 1.3.5. 4303817466cbSJens Wiklander This affects certificates in the user-supplied chain except the top 4304817466cbSJens Wiklander certificate. If the user-supplied chain contains only one certificates, 4305817466cbSJens Wiklander it is not affected (ie, its notAfter date is properly checked). 4306817466cbSJens Wiklander * Prevent potential NULL pointer dereference in ssl_read_record() (found by 4307817466cbSJens Wiklander TrustInSoft) 4308817466cbSJens Wiklander 4309817466cbSJens WiklanderBugfix 4310817466cbSJens Wiklander * The length of various ClientKeyExchange messages was not properly checked. 4311817466cbSJens Wiklander * Some example server programs were not sending the close_notify alert. 4312817466cbSJens Wiklander * Potential memory leak in mpi_exp_mod() when error occurs during 4313817466cbSJens Wiklander calculation of RR. 4314817466cbSJens Wiklander * Fixed malloc/free default #define in platform.c (found by Gergely Budai). 4315817466cbSJens Wiklander * Fixed type which made POLARSSL_ENTROPY_FORCE_SHA256 uneffective (found by 4316817466cbSJens Wiklander Gergely Budai). 4317817466cbSJens Wiklander * Fix #include path in ecdsa.h which wasn't accepted by some compilers. 4318817466cbSJens Wiklander (found by Gergely Budai) 4319817466cbSJens Wiklander * Fix compile errors when POLARSSL_ERROR_STRERROR_BC is undefined (found by 4320817466cbSJens Wiklander Shuo Chen). 4321817466cbSJens Wiklander * oid_get_numeric_string() used to truncate the output without returning an 4322817466cbSJens Wiklander error if the output buffer was just 1 byte too small. 4323817466cbSJens Wiklander * dhm_parse_dhm() (hence dhm_parse_dhmfile()) did not set dhm->len. 4324817466cbSJens Wiklander * Calling pk_debug() on an RSA-alt key would segfault. 4325817466cbSJens Wiklander * pk_get_size() and pk_get_len() were off by a factor 8 for RSA-alt keys. 4326817466cbSJens Wiklander * Potential buffer overwrite in pem_write_buffer() because of low length 4327817466cbSJens Wiklander indication (found by Thijs Alkemade) 4328817466cbSJens Wiklander * EC curves constants, which should be only in ROM since 1.3.3, were also 4329817466cbSJens Wiklander stored in RAM due to missing 'const's (found by Gergely Budai). 4330817466cbSJens Wiklander 4331817466cbSJens Wiklander= PolarSSL 1.3.5 released on 2014-03-26 4332817466cbSJens WiklanderFeatures 4333817466cbSJens Wiklander * HMAC-DRBG as a separate module 4334817466cbSJens Wiklander * Option to set the Curve preference order (disabled by default) 4335817466cbSJens Wiklander * Single Platform compatilibity layer (for memory / printf / fprintf) 4336817466cbSJens Wiklander * Ability to provide alternate timing implementation 4337817466cbSJens Wiklander * Ability to force the entropy module to use SHA-256 as its basis 4338817466cbSJens Wiklander (POLARSSL_ENTROPY_FORCE_SHA256) 4339817466cbSJens Wiklander * Testing script ssl-opt.sh added for testing 'live' ssl option 4340817466cbSJens Wiklander interoperability against OpenSSL and PolarSSL 4341817466cbSJens Wiklander * Support for reading EC keys that use SpecifiedECDomain in some cases. 4342817466cbSJens Wiklander * Entropy module now supports seed writing and reading 4343817466cbSJens Wiklander 4344817466cbSJens WiklanderChanges 4345817466cbSJens Wiklander * Deprecated the Memory layer 4346817466cbSJens Wiklander * entropy_add_source(), entropy_update_manual() and entropy_gather() 4347817466cbSJens Wiklander now thread-safe if POLARSSL_THREADING_C defined 4348817466cbSJens Wiklander * Improvements to the CMake build system, contributed by Julian Ospald. 4349817466cbSJens Wiklander * Work around a bug of the version of Clang shipped by Apple with Mavericks 4350817466cbSJens Wiklander that prevented bignum.c from compiling. (Reported by Rafael Baptista.) 4351817466cbSJens Wiklander * Revamped the compat.sh interoperatibility script to include support for 4352817466cbSJens Wiklander testing against GnuTLS 4353817466cbSJens Wiklander * Deprecated ssl_set_own_cert_rsa() and ssl_set_own_cert_rsa_alt() 4354817466cbSJens Wiklander * Improvements to tests/Makefile, contributed by Oden Eriksson. 4355817466cbSJens Wiklander 4356817466cbSJens WiklanderSecurity 4357817466cbSJens Wiklander * Forbid change of server certificate during renegotiation to prevent 4358817466cbSJens Wiklander "triple handshake" attack when authentication mode is 'optional' (the 4359817466cbSJens Wiklander attack was already impossible when authentication is required). 4360817466cbSJens Wiklander * Check notBefore timestamp of certificates and CRLs from the future. 4361817466cbSJens Wiklander * Forbid sequence number wrapping 4362817466cbSJens Wiklander * Fixed possible buffer overflow with overlong PSK 4363817466cbSJens Wiklander * Possible remotely-triggered out-of-bounds memory access fixed (found by 4364817466cbSJens Wiklander TrustInSoft) 4365817466cbSJens Wiklander 4366817466cbSJens WiklanderBugfix 4367817466cbSJens Wiklander * ecp_gen_keypair() does more tries to prevent failure because of 4368817466cbSJens Wiklander statistics 4369817466cbSJens Wiklander * Fixed bug in RSA PKCS#1 v1.5 "reversed" operations 4370817466cbSJens Wiklander * Fixed testing with out-of-source builds using cmake 4371817466cbSJens Wiklander * Fixed version-major intolerance in server 4372817466cbSJens Wiklander * Fixed CMake symlinking on out-of-source builds 4373817466cbSJens Wiklander * Fixed dependency issues in test suite 4374817466cbSJens Wiklander * Programs rsa_sign_pss and rsa_verify_pss were not using PSS since 1.3.0 4375817466cbSJens Wiklander * Bignum's MIPS-32 assembly was used on MIPS-64, causing chaos. (Found by 4376817466cbSJens Wiklander Alex Wilson.) 4377817466cbSJens Wiklander * ssl_cache was creating entries when max_entries=0 if TIMING_C was enabled. 4378817466cbSJens Wiklander * m_sleep() was sleeping twice too long on most Unix platforms. 4379817466cbSJens Wiklander * Fixed bug with session tickets and non-blocking I/O in the unlikely case 4380817466cbSJens Wiklander send() would return an EAGAIN error when sending the ticket. 4381817466cbSJens Wiklander * ssl_cache was leaking memory when reusing a timed out entry containing a 4382817466cbSJens Wiklander client certificate. 4383817466cbSJens Wiklander * ssl_srv was leaking memory when client presented a timed out ticket 4384817466cbSJens Wiklander containing a client certificate 4385817466cbSJens Wiklander * ssl_init() was leaving a dirty pointer in ssl_context if malloc of 4386817466cbSJens Wiklander out_ctr failed 4387817466cbSJens Wiklander * ssl_handshake_init() was leaving dirty pointers in subcontexts if malloc 4388817466cbSJens Wiklander of one of them failed 4389817466cbSJens Wiklander * Fix typo in rsa_copy() that impacted PKCS#1 v2 contexts 4390817466cbSJens Wiklander * x509_get_current_time() uses localtime_r() to prevent thread issues 4391817466cbSJens Wiklander 4392817466cbSJens Wiklander= PolarSSL 1.3.4 released on 2014-01-27 4393817466cbSJens WiklanderFeatures 4394817466cbSJens Wiklander * Support for the Koblitz curves: secp192k1, secp224k1, secp256k1 4395817466cbSJens Wiklander * Support for RIPEMD-160 4396817466cbSJens Wiklander * Support for AES CFB8 mode 4397817466cbSJens Wiklander * Support for deterministic ECDSA (RFC 6979) 4398817466cbSJens Wiklander 4399817466cbSJens WiklanderBugfix 4400817466cbSJens Wiklander * Potential memory leak in bignum_selftest() 4401817466cbSJens Wiklander * Replaced expired test certificate 4402817466cbSJens Wiklander * ssl_mail_client now terminates lines with CRLF, instead of LF 4403817466cbSJens Wiklander * net module handles timeouts on blocking sockets better (found by Tilman 4404817466cbSJens Wiklander Sauerbeck) 4405817466cbSJens Wiklander * Assembly format fixes in bn_mul.h 4406817466cbSJens Wiklander 4407817466cbSJens WiklanderSecurity 4408817466cbSJens Wiklander * Missing MPI_CHK calls added around unguarded mpi calls (found by 4409817466cbSJens Wiklander TrustInSoft) 4410817466cbSJens Wiklander 4411817466cbSJens Wiklander= PolarSSL 1.3.3 released on 2013-12-31 4412817466cbSJens WiklanderFeatures 4413817466cbSJens Wiklander * EC key generation support in gen_key app 4414817466cbSJens Wiklander * Support for adhering to client ciphersuite order preference 4415817466cbSJens Wiklander (POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE) 4416817466cbSJens Wiklander * Support for Curve25519 4417817466cbSJens Wiklander * Support for ECDH-RSA and ECDH-ECDSA key exchanges and ciphersuites 4418817466cbSJens Wiklander * Support for IPv6 in the NET module 4419817466cbSJens Wiklander * AES-NI support for AES, AES-GCM and AES key scheduling 4420817466cbSJens Wiklander * SSL Pthread-based server example added (ssl_pthread_server) 4421817466cbSJens Wiklander 4422817466cbSJens WiklanderChanges 4423817466cbSJens Wiklander * gen_prime() speedup 4424817466cbSJens Wiklander * Speedup of ECP multiplication operation 4425817466cbSJens Wiklander * Relaxed some SHA2 ciphersuite's version requirements 4426817466cbSJens Wiklander * Dropped use of readdir_r() instead of readdir() with threading support 4427817466cbSJens Wiklander * More constant-time checks in the RSA module 4428817466cbSJens Wiklander * Split off curves from ecp.c into ecp_curves.c 4429817466cbSJens Wiklander * Curves are now stored fully in ROM 4430817466cbSJens Wiklander * Memory usage optimizations in ECP module 4431817466cbSJens Wiklander * Removed POLARSSL_THREADING_DUMMY 4432817466cbSJens Wiklander 4433817466cbSJens WiklanderBugfix 4434817466cbSJens Wiklander * Fixed bug in mpi_set_bit() on platforms where t_uint is wider than int 4435817466cbSJens Wiklander * Fixed X.509 hostname comparison (with non-regular characters) 4436817466cbSJens Wiklander * SSL now gracefully handles missing RNG 4437817466cbSJens Wiklander * Missing defines / cases for RSA_PSK key exchange 4438817466cbSJens Wiklander * crypt_and_hash app checks MAC before final decryption 4439817466cbSJens Wiklander * Potential memory leak in ssl_ticket_keys_init() 4440817466cbSJens Wiklander * Memory leak in benchmark application 4441817466cbSJens Wiklander * Fixed x509_crt_parse_path() bug on Windows platforms 4442817466cbSJens Wiklander * Added missing MPI_CHK() around some statements in mpi_div_mpi() (found by 4443817466cbSJens Wiklander TrustInSoft) 4444817466cbSJens Wiklander * Fixed potential overflow in certificate size verification in 4445817466cbSJens Wiklander ssl_write_certificate() (found by TrustInSoft) 4446817466cbSJens Wiklander 4447817466cbSJens WiklanderSecurity 4448817466cbSJens Wiklander * Possible remotely-triggered out-of-bounds memory access fixed (found by 4449817466cbSJens Wiklander TrustInSoft) 4450817466cbSJens Wiklander 4451817466cbSJens Wiklander= PolarSSL 1.3.2 released on 2013-11-04 4452817466cbSJens WiklanderFeatures 4453817466cbSJens Wiklander * PK tests added to test framework 4454817466cbSJens Wiklander * Added optional optimization for NIST MODP curves (POLARSSL_ECP_NIST_OPTIM) 4455817466cbSJens Wiklander * Support for Camellia-GCM mode and ciphersuites 4456817466cbSJens Wiklander 4457817466cbSJens WiklanderChanges 4458817466cbSJens Wiklander * Padding checks in cipher layer are now constant-time 4459817466cbSJens Wiklander * Value comparisons in SSL layer are now constant-time 4460817466cbSJens Wiklander * Support for serialNumber, postalAddress and postalCode in X509 names 4461817466cbSJens Wiklander * SSL Renegotiation was refactored 4462817466cbSJens Wiklander 4463817466cbSJens WiklanderBugfix 4464817466cbSJens Wiklander * More stringent checks in cipher layer 4465817466cbSJens Wiklander * Server does not send out extensions not advertised by client 4466817466cbSJens Wiklander * Prevent possible alignment warnings on casting from char * to 'aligned *' 4467817466cbSJens Wiklander * Misc fixes and additions to dependency checks 4468817466cbSJens Wiklander * Const correctness 4469817466cbSJens Wiklander * cert_write with selfsign should use issuer_name as subject_name 4470817466cbSJens Wiklander * Fix ECDSA corner case: missing reduction mod N (found by DualTachyon) 4471817466cbSJens Wiklander * Defines to handle UEFI environment under MSVC 4472817466cbSJens Wiklander * Server-side initiated renegotiations send HelloRequest 4473817466cbSJens Wiklander 4474817466cbSJens Wiklander= PolarSSL 1.3.1 released on 2013-10-15 4475817466cbSJens WiklanderFeatures 4476817466cbSJens Wiklander * Support for Brainpool curves and TLS ciphersuites (RFC 7027) 4477817466cbSJens Wiklander * Support for ECDHE-PSK key-exchange and ciphersuites 4478817466cbSJens Wiklander * Support for RSA-PSK key-exchange and ciphersuites 4479817466cbSJens Wiklander 4480817466cbSJens WiklanderChanges 4481817466cbSJens Wiklander * RSA blinding locks for a smaller amount of time 4482817466cbSJens Wiklander * TLS compression only allocates working buffer once 4483817466cbSJens Wiklander * Introduced POLARSSL_HAVE_READDIR_R for systems without it 4484817466cbSJens Wiklander * config.h is more script-friendly 4485817466cbSJens Wiklander 4486817466cbSJens WiklanderBugfix 4487817466cbSJens Wiklander * Missing MSVC defines added 4488817466cbSJens Wiklander * Compile errors with POLARSSL_RSA_NO_CRT 4489817466cbSJens Wiklander * Header files with 'polarssl/' 4490817466cbSJens Wiklander * Const correctness 4491817466cbSJens Wiklander * Possible naming collision in dhm_context 4492817466cbSJens Wiklander * Better support for MSVC 4493817466cbSJens Wiklander * threading_set_alt() name 4494817466cbSJens Wiklander * Added missing x509write_crt_set_version() 4495817466cbSJens Wiklander 4496817466cbSJens Wiklander= PolarSSL 1.3.0 released on 2013-10-01 4497817466cbSJens WiklanderFeatures 4498817466cbSJens Wiklander * Elliptic Curve Cryptography module added 4499817466cbSJens Wiklander * Elliptic Curve Diffie Hellman module added 4500817466cbSJens Wiklander * Ephemeral Elliptic Curve Diffie Hellman support for SSL/TLS 4501817466cbSJens Wiklander (ECDHE-based ciphersuites) 4502817466cbSJens Wiklander * Ephemeral Elliptic Curve Digital Signature Algorithm support for SSL/TLS 4503817466cbSJens Wiklander (ECDSA-based ciphersuites) 4504817466cbSJens Wiklander * Ability to specify allowed ciphersuites based on the protocol version. 4505817466cbSJens Wiklander * PSK and DHE-PSK based ciphersuites added 4506817466cbSJens Wiklander * Memory allocation abstraction layer added 4507817466cbSJens Wiklander * Buffer-based memory allocator added (no malloc() / free() / HEAP usage) 4508817466cbSJens Wiklander * Threading abstraction layer added (dummy / pthread / alternate) 4509817466cbSJens Wiklander * Public Key abstraction layer added 4510817466cbSJens Wiklander * Parsing Elliptic Curve keys 4511817466cbSJens Wiklander * Parsing Elliptic Curve certificates 4512817466cbSJens Wiklander * Support for max_fragment_length extension (RFC 6066) 4513817466cbSJens Wiklander * Support for truncated_hmac extension (RFC 6066) 4514817466cbSJens Wiklander * Support for zeros-and-length (ANSI X.923) padding, one-and-zeros 4515817466cbSJens Wiklander (ISO/IEC 7816-4) padding and zero padding in the cipher layer 4516817466cbSJens Wiklander * Support for session tickets (RFC 5077) 4517817466cbSJens Wiklander * Certificate Request (CSR) generation with extensions (key_usage, 4518817466cbSJens Wiklander ns_cert_type) 4519817466cbSJens Wiklander * X509 Certificate writing with extensions (basic_constraints, 4520817466cbSJens Wiklander issuer_key_identifier, etc) 4521817466cbSJens Wiklander * Optional blinding for RSA, DHM and EC 4522817466cbSJens Wiklander * Support for multiple active certificate / key pairs in SSL servers for 4523817466cbSJens Wiklander the same host (Not to be confused with SNI!) 4524817466cbSJens Wiklander 4525817466cbSJens WiklanderChanges 4526817466cbSJens Wiklander * Ability to enable / disable SSL v3 / TLS 1.0 / TLS 1.1 / TLS 1.2 4527817466cbSJens Wiklander individually 4528817466cbSJens Wiklander * Introduced separate SSL Ciphersuites module that is based on 4529817466cbSJens Wiklander Cipher and MD information 4530817466cbSJens Wiklander * Internals for SSL module adapted to have separate IV pointer that is 4531817466cbSJens Wiklander dynamically set (Better support for hardware acceleration) 4532817466cbSJens Wiklander * Moved all OID functionality to a separate module. RSA function 4533817466cbSJens Wiklander prototypes for the RSA sign and verify functions changed as a result 4534817466cbSJens Wiklander * Split up the GCM module into a starts/update/finish cycle 4535817466cbSJens Wiklander * Client and server now filter sent and accepted ciphersuites on minimum 4536817466cbSJens Wiklander and maximum protocol version 4537817466cbSJens Wiklander * Ability to disable server_name extension (RFC 6066) 4538817466cbSJens Wiklander * Renamed error_strerror() to the less conflicting polarssl_strerror() 4539817466cbSJens Wiklander (Ability to keep old as well with POLARSSL_ERROR_STRERROR_BC) 4540817466cbSJens Wiklander * SHA2 renamed to SHA256, SHA4 renamed to SHA512 and functions accordingly 4541817466cbSJens Wiklander * All RSA operations require a random generator for blinding purposes 4542817466cbSJens Wiklander * X509 core refactored 4543817466cbSJens Wiklander * x509_crt_verify() now case insensitive for cn (RFC 6125 6.4) 4544817466cbSJens Wiklander * Also compiles / runs without time-based functions (!POLARSSL_HAVE_TIME) 4545817466cbSJens Wiklander * Support faulty X509 v1 certificates with extensions 4546817466cbSJens Wiklander (POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3) 4547817466cbSJens Wiklander 4548817466cbSJens WiklanderBugfix 4549817466cbSJens Wiklander * Fixed parse error in ssl_parse_certificate_request() 4550817466cbSJens Wiklander * zlib compression/decompression skipped on empty blocks 4551817466cbSJens Wiklander * Support for AIX header locations in net.c module 4552817466cbSJens Wiklander * Fixed file descriptor leaks 4553817466cbSJens Wiklander 4554817466cbSJens WiklanderSecurity 4555817466cbSJens Wiklander * RSA blinding on CRT operations to counter timing attacks 4556817466cbSJens Wiklander (found by Cyril Arnaud and Pierre-Alain Fouque) 4557817466cbSJens Wiklander 4558817466cbSJens Wiklander 4559817466cbSJens Wiklander= Version 1.2.14 released 2015-05-?? 4560817466cbSJens Wiklander 4561817466cbSJens WiklanderSecurity 4562817466cbSJens Wiklander * Fix potential invalid memory read in the server, that allows a client to 4563817466cbSJens Wiklander crash it remotely (found by Caj Larsson). 4564817466cbSJens Wiklander * Fix potential invalid memory read in certificate parsing, that allows a 4565817466cbSJens Wiklander client to crash the server remotely if client authentication is enabled 4566817466cbSJens Wiklander (found using Codenomicon Defensics). 4567817466cbSJens Wiklander * Add countermeasure against "Lucky 13 strikes back" cache-based attack, 4568817466cbSJens Wiklander https://dl.acm.org/citation.cfm?id=2714625 4569817466cbSJens Wiklander 4570817466cbSJens WiklanderBugfix 4571817466cbSJens Wiklander * Fix bug in Via Padlock support (found by Nikos Mavrogiannopoulos). 4572817466cbSJens Wiklander * Fix hardclock() (only used in the benchmarking program) with some 4573817466cbSJens Wiklander versions of mingw64 (found by kxjhlele). 4574817466cbSJens Wiklander * Fix warnings from mingw64 in timing.c (found by kxjklele). 4575817466cbSJens Wiklander * Fix potential unintended sign extension in asn1_get_len() on 64-bit 4576817466cbSJens Wiklander platforms (found with Coverity Scan). 4577817466cbSJens Wiklander 4578817466cbSJens Wiklander= Version 1.2.13 released 2015-02-16 4579817466cbSJens WiklanderNote: Although PolarSSL has been renamed to mbed TLS, no changes reflecting 4580817466cbSJens Wiklander this will be made in the 1.2 branch at this point. 4581817466cbSJens Wiklander 4582817466cbSJens WiklanderSecurity 4583817466cbSJens Wiklander * Fix remotely-triggerable uninitialised pointer dereference caused by 4584817466cbSJens Wiklander crafted X.509 certificate (TLS server is not affected if it doesn't ask 4585817466cbSJens Wiklander for a client certificate) (found using Codenomicon Defensics). 4586817466cbSJens Wiklander * Fix remotely-triggerable memory leak caused by crafted X.509 certificates 4587817466cbSJens Wiklander (TLS server is not affected if it doesn't ask for a client certificate) 4588817466cbSJens Wiklander (found using Codenomicon Defensics). 4589817466cbSJens Wiklander * Fix potential stack overflow while parsing crafted X.509 certificates 4590817466cbSJens Wiklander (TLS server is not affected if it doesn't ask for a client certificate) 4591817466cbSJens Wiklander found using Codenomicon Defensics). 4592817466cbSJens Wiklander * Fix buffer overread of size 1 when parsing crafted X.509 certificates 4593817466cbSJens Wiklander (TLS server is not affected if it doesn't ask for a client certificate). 4594817466cbSJens Wiklander 4595817466cbSJens WiklanderBugfix 4596817466cbSJens Wiklander * Fix potential undefined behaviour in Camellia. 4597817466cbSJens Wiklander * Fix memory leaks in PKCS#5 and PKCS#12. 4598817466cbSJens Wiklander * Stack buffer overflow if ctr_drbg_update() is called with too large 4599817466cbSJens Wiklander add_len (found by Jean-Philippe Aumasson) (not triggerable remotely). 4600817466cbSJens Wiklander * Fix bug in MPI/bignum on s390/s390x (reported by Dan Horák) (introduced 4601817466cbSJens Wiklander in 1.2.12). 4602817466cbSJens Wiklander * Fix unchecked return code in x509_crt_parse_path() on Windows (found by 4603817466cbSJens Wiklander Peter Vaskovic). 4604817466cbSJens Wiklander * Fix assembly selection for MIPS64 (thanks to James Cowgill). 4605817466cbSJens Wiklander * ssl_get_verify_result() now works even if the handshake was aborted due 4606817466cbSJens Wiklander to a failed verification (found by Fredrik Axelsson). 4607817466cbSJens Wiklander * Skip writing and parsing signature_algorithm extension if none of the 4608817466cbSJens Wiklander key exchanges enabled needs certificates. This fixes a possible interop 4609817466cbSJens Wiklander issue with some servers when a zero-length extension was sent. (Reported 4610817466cbSJens Wiklander by Peter Dettman.) 4611817466cbSJens Wiklander * On a 0-length input, base64_encode() did not correctly set output length 4612817466cbSJens Wiklander (found by Hendrik van den Boogaard). 4613817466cbSJens Wiklander 4614817466cbSJens WiklanderChanges 4615817466cbSJens Wiklander * Blind RSA private operations even when POLARSSL_RSA_NO_CRT is defined. 4616817466cbSJens Wiklander * Forbid repeated extensions in X.509 certificates. 4617817466cbSJens Wiklander * Add compile-time option POLARSSL_X509_MAX_INTERMEDIATE_CA to limit the 4618817466cbSJens Wiklander length of an X.509 verification chain (default = 8). 4619817466cbSJens Wiklander= Version 1.2.12 released 2014-10-24 4620817466cbSJens Wiklander 4621817466cbSJens WiklanderSecurity 4622817466cbSJens Wiklander * Remotely-triggerable memory leak when parsing some X.509 certificates 4623817466cbSJens Wiklander (server is not affected if it doesn't ask for a client certificate). 4624817466cbSJens Wiklander (Found using Codenomicon Defensics.) 4625817466cbSJens Wiklander 4626817466cbSJens WiklanderBugfix 4627817466cbSJens Wiklander * Fix potential bad read in parsing ServerHello (found by Adrien 4628817466cbSJens Wiklander Vialletelle). 4629817466cbSJens Wiklander * ssl_close_notify() could send more than one message in some circumstances 4630817466cbSJens Wiklander with non-blocking I/O. 4631817466cbSJens Wiklander * x509_crt_parse() did not increase total_failed on PEM error 4632817466cbSJens Wiklander * Fix compiler warnings on iOS (found by Sander Niemeijer). 4633817466cbSJens Wiklander * Don't print uninitialised buffer in ssl_mail_client (found by Marc Abel). 4634817466cbSJens Wiklander * Fix net_accept() regarding non-blocking sockets (found by Luca Pesce). 4635817466cbSJens Wiklander * ssl_read() could return non-application data records on server while 4636817466cbSJens Wiklander renegotation was pending, and on client when a HelloRequest was received. 4637817466cbSJens Wiklander * Fix warnings from Clang's scan-build (contributed by Alfred Klomp). 4638817466cbSJens Wiklander 4639817466cbSJens WiklanderChanges 4640817466cbSJens Wiklander * X.509 certificates with more than one AttributeTypeAndValue per 4641817466cbSJens Wiklander RelativeDistinguishedName are not accepted any more. 4642817466cbSJens Wiklander * ssl_read() now returns POLARSSL_ERR_NET_WANT_READ rather than 4643817466cbSJens Wiklander POLARSSL_ERR_SSL_UNEXPECTED_MESSAGE on harmless alerts. 4644817466cbSJens Wiklander * Accept spaces at end of line or end of buffer in base64_decode(). 4645817466cbSJens Wiklander 4646817466cbSJens Wiklander= Version 1.2.11 released 2014-07-11 4647817466cbSJens WiklanderFeatures 4648817466cbSJens Wiklander * Entropy module now supports seed writing and reading 4649817466cbSJens Wiklander 4650817466cbSJens WiklanderChanges 4651817466cbSJens Wiklander * Introduced POLARSSL_HAVE_READDIR_R for systems without it 4652817466cbSJens Wiklander * Improvements to the CMake build system, contributed by Julian Ospald. 4653817466cbSJens Wiklander * Work around a bug of the version of Clang shipped by Apple with Mavericks 4654817466cbSJens Wiklander that prevented bignum.c from compiling. (Reported by Rafael Baptista.) 4655817466cbSJens Wiklander * Improvements to tests/Makefile, contributed by Oden Eriksson. 4656817466cbSJens Wiklander * Use UTC time to check certificate validity. 4657817466cbSJens Wiklander * Reject certificates with times not in UTC, per RFC 5280. 4658817466cbSJens Wiklander * Migrate zeroizing of data to polarssl_zeroize() instead of memset() 4659817466cbSJens Wiklander against unwanted compiler optimizations 4660817466cbSJens Wiklander 4661817466cbSJens WiklanderSecurity 4662817466cbSJens Wiklander * Forbid change of server certificate during renegotiation to prevent 4663817466cbSJens Wiklander "triple handshake" attack when authentication mode is optional (the 4664817466cbSJens Wiklander attack was already impossible when authentication is required). 4665817466cbSJens Wiklander * Check notBefore timestamp of certificates and CRLs from the future. 4666817466cbSJens Wiklander * Forbid sequence number wrapping 4667817466cbSJens Wiklander * Prevent potential NULL pointer dereference in ssl_read_record() (found by 4668817466cbSJens Wiklander TrustInSoft) 4669817466cbSJens Wiklander * Fix length checking for AEAD ciphersuites (found by Codenomicon). 4670817466cbSJens Wiklander It was possible to crash the server (and client) using crafted messages 4671817466cbSJens Wiklander when a GCM suite was chosen. 4672817466cbSJens Wiklander 4673817466cbSJens WiklanderBugfix 4674817466cbSJens Wiklander * Fixed X.509 hostname comparison (with non-regular characters) 4675817466cbSJens Wiklander * SSL now gracefully handles missing RNG 4676817466cbSJens Wiklander * crypt_and_hash app checks MAC before final decryption 4677817466cbSJens Wiklander * Fixed x509_crt_parse_path() bug on Windows platforms 4678817466cbSJens Wiklander * Added missing MPI_CHK() around some statements in mpi_div_mpi() (found by 4679817466cbSJens Wiklander TrustInSoft) 4680817466cbSJens Wiklander * Fixed potential overflow in certificate size verification in 4681817466cbSJens Wiklander ssl_write_certificate() (found by TrustInSoft) 4682817466cbSJens Wiklander * Fix ASM format in bn_mul.h 4683817466cbSJens Wiklander * Potential memory leak in bignum_selftest() 4684817466cbSJens Wiklander * Replaced expired test certificate 4685817466cbSJens Wiklander * ssl_mail_client now terminates lines with CRLF, instead of LF 4686817466cbSJens Wiklander * Fix bug in RSA PKCS#1 v1.5 "reversed" operations 4687817466cbSJens Wiklander * Fixed testing with out-of-source builds using cmake 4688817466cbSJens Wiklander * Fixed version-major intolerance in server 4689817466cbSJens Wiklander * Fixed CMake symlinking on out-of-source builds 4690817466cbSJens Wiklander * Bignum's MIPS-32 assembly was used on MIPS-64, causing chaos. (Found by 4691817466cbSJens Wiklander Alex Wilson.) 4692817466cbSJens Wiklander * ssl_init() was leaving a dirty pointer in ssl_context if malloc of 4693817466cbSJens Wiklander out_ctr failed 4694817466cbSJens Wiklander * ssl_handshake_init() was leaving dirty pointers in subcontexts if malloc 4695817466cbSJens Wiklander of one of them failed 4696817466cbSJens Wiklander * x509_get_current_time() uses localtime_r() to prevent thread issues 4697817466cbSJens Wiklander * Some example server programs were not sending the close_notify alert. 4698817466cbSJens Wiklander * Potential memory leak in mpi_exp_mod() when error occurs during 4699817466cbSJens Wiklander calculation of RR. 4700817466cbSJens Wiklander * Improve interoperability by not writing extension length in ClientHello 4701817466cbSJens Wiklander when no extensions are present (found by Matthew Page) 4702817466cbSJens Wiklander * rsa_check_pubkey() now allows an E up to N 4703817466cbSJens Wiklander * On OpenBSD, use arc4random_buf() instead of rand() to prevent warnings 4704817466cbSJens Wiklander * mpi_fill_random() was creating numbers larger than requested on 4705817466cbSJens Wiklander big-endian platform when size was not an integer number of limbs 4706817466cbSJens Wiklander * Fix detection of DragonflyBSD in net.c (found by Markus Pfeiffer) 4707817466cbSJens Wiklander * Stricter check on SSL ClientHello internal sizes compared to actual packet 4708817466cbSJens Wiklander size (found by TrustInSoft) 4709817466cbSJens Wiklander * Fix preprocessor checks for bn_mul PPC asm (found by Barry K. Nathan). 4710817466cbSJens Wiklander * Use \n\t rather than semicolons for bn_mul asm, since some assemblers 4711817466cbSJens Wiklander interpret semicolons as comment delimiters (found by Barry K. Nathan). 4712817466cbSJens Wiklander * Disable broken Sparc64 bn_mul assembly (found by Florian Obser). 4713817466cbSJens Wiklander * Fix base64_decode() to return and check length correctly (in case of 4714817466cbSJens Wiklander tight buffers) 4715817466cbSJens Wiklander 4716817466cbSJens Wiklander= Version 1.2.10 released 2013-10-07 4717817466cbSJens WiklanderChanges 4718817466cbSJens Wiklander * Changed RSA blinding to a slower but thread-safe version 4719817466cbSJens Wiklander 4720817466cbSJens WiklanderBugfix 4721817466cbSJens Wiklander * Fixed memory leak in RSA as a result of introduction of blinding 4722817466cbSJens Wiklander * Fixed ssl_pkcs11_decrypt() prototype 4723817466cbSJens Wiklander * Fixed MSVC project files 4724817466cbSJens Wiklander 4725817466cbSJens Wiklander= Version 1.2.9 released 2013-10-01 4726817466cbSJens WiklanderChanges 4727817466cbSJens Wiklander * x509_verify() now case insensitive for cn (RFC 6125 6.4) 4728817466cbSJens Wiklander 4729817466cbSJens WiklanderBugfix 4730817466cbSJens Wiklander * Fixed potential memory leak when failing to resume a session 4731817466cbSJens Wiklander * Fixed potential file descriptor leaks (found by Remi Gacogne) 4732817466cbSJens Wiklander * Minor fixes 4733817466cbSJens Wiklander 4734817466cbSJens WiklanderSecurity 4735817466cbSJens Wiklander * Fixed potential heap buffer overflow on large hostname setting 4736817466cbSJens Wiklander * Fixed potential negative value misinterpretation in load_file() 4737817466cbSJens Wiklander * RSA blinding on CRT operations to counter timing attacks 4738817466cbSJens Wiklander (found by Cyril Arnaud and Pierre-Alain Fouque) 4739817466cbSJens Wiklander 4740817466cbSJens Wiklander= Version 1.2.8 released 2013-06-19 4741817466cbSJens WiklanderFeatures 4742817466cbSJens Wiklander * Parsing of PKCS#8 encrypted private key files 4743817466cbSJens Wiklander * PKCS#12 PBE and derivation functions 4744817466cbSJens Wiklander * Centralized module option values in config.h to allow user-defined 4745817466cbSJens Wiklander settings without editing header files by using POLARSSL_CONFIG_OPTIONS 4746817466cbSJens Wiklander 4747817466cbSJens WiklanderChanges 4748817466cbSJens Wiklander * HAVEGE random generator disabled by default 4749817466cbSJens Wiklander * Internally split up x509parse_key() into a (PEM) handler function 4750817466cbSJens Wiklander and specific DER parser functions for the PKCS#1 and unencrypted 4751817466cbSJens Wiklander PKCS#8 private key formats 4752817466cbSJens Wiklander * Added mechanism to provide alternative implementations for all 4753817466cbSJens Wiklander symmetric cipher and hash algorithms (e.g. POLARSSL_AES_ALT in 4754817466cbSJens Wiklander config.h) 4755817466cbSJens Wiklander * PKCS#5 module added. Moved PBKDF2 functionality inside and deprecated 4756817466cbSJens Wiklander old PBKDF2 module 4757817466cbSJens Wiklander 4758817466cbSJens WiklanderBugfix 4759817466cbSJens Wiklander * Secure renegotiation extension should only be sent in case client 4760817466cbSJens Wiklander supports secure renegotiation 4761817466cbSJens Wiklander * Fixed offset for cert_type list in ssl_parse_certificate_request() 4762817466cbSJens Wiklander * Fixed const correctness issues that have no impact on the ABI 4763817466cbSJens Wiklander * x509parse_crt() now better handles PEM error situations 4764817466cbSJens Wiklander * ssl_parse_certificate() now calls x509parse_crt_der() directly 4765817466cbSJens Wiklander instead of the x509parse_crt() wrapper that can also parse PEM 4766817466cbSJens Wiklander certificates 4767817466cbSJens Wiklander * x509parse_crtpath() is now reentrant and uses more portable stat() 4768817466cbSJens Wiklander * Fixed bignum.c and bn_mul.h to support Thumb2 and LLVM compiler 4769817466cbSJens Wiklander * Fixed values for 2-key Triple DES in cipher layer 4770817466cbSJens Wiklander * ssl_write_certificate_request() can handle empty ca_chain 4771817466cbSJens Wiklander 4772817466cbSJens WiklanderSecurity 4773817466cbSJens Wiklander * A possible DoS during the SSL Handshake, due to faulty parsing of 4774817466cbSJens Wiklander PEM-encoded certificates has been fixed (found by Jack Lloyd) 4775817466cbSJens Wiklander 4776817466cbSJens Wiklander= Version 1.2.7 released 2013-04-13 4777817466cbSJens WiklanderFeatures 4778817466cbSJens Wiklander * Ability to specify allowed ciphersuites based on the protocol version. 4779817466cbSJens Wiklander 4780817466cbSJens WiklanderChanges 4781817466cbSJens Wiklander * Default Blowfish keysize is now 128-bits 4782817466cbSJens Wiklander * Test suites made smaller to accommodate Raspberry Pi 4783817466cbSJens Wiklander 4784817466cbSJens WiklanderBugfix 4785817466cbSJens Wiklander * Fix for MPI assembly for ARM 4786817466cbSJens Wiklander * GCM adapted to support sizes > 2^29 4787817466cbSJens Wiklander 4788817466cbSJens Wiklander= Version 1.2.6 released 2013-03-11 4789817466cbSJens WiklanderBugfix 4790817466cbSJens Wiklander * Fixed memory leak in ssl_free() and ssl_reset() for active session 4791817466cbSJens Wiklander * Corrected GCM counter incrementation to use only 32-bits instead of 4792817466cbSJens Wiklander 128-bits (found by Yawning Angel) 4793817466cbSJens Wiklander * Fixes for 64-bit compilation with MS Visual Studio 4794817466cbSJens Wiklander * Fixed net_bind() for specified IP addresses on little endian systems 4795817466cbSJens Wiklander * Fixed assembly code for ARM (Thumb and regular) for some compilers 4796817466cbSJens Wiklander 4797817466cbSJens WiklanderChanges 4798817466cbSJens Wiklander * Internally split up rsa_pkcs1_encrypt(), rsa_pkcs1_decrypt(), 4799817466cbSJens Wiklander rsa_pkcs1_sign() and rsa_pkcs1_verify() to separate PKCS#1 v1.5 and 4800817466cbSJens Wiklander PKCS#1 v2.1 functions 4801817466cbSJens Wiklander * Added support for custom labels when using rsa_rsaes_oaep_encrypt() 4802817466cbSJens Wiklander or rsa_rsaes_oaep_decrypt() 4803817466cbSJens Wiklander * Re-added handling for SSLv2 Client Hello when the define 4804817466cbSJens Wiklander POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO is set 4805817466cbSJens Wiklander * The SSL session cache module (ssl_cache) now also retains peer_cert 4806817466cbSJens Wiklander information (not the entire chain) 4807817466cbSJens Wiklander 4808817466cbSJens WiklanderSecurity 4809817466cbSJens Wiklander * Removed further timing differences during SSL message decryption in 4810817466cbSJens Wiklander ssl_decrypt_buf() 4811817466cbSJens Wiklander * Removed timing differences due to bad padding from 4812817466cbSJens Wiklander rsa_rsaes_pkcs1_v15_decrypt() and rsa_pkcs1_decrypt() for PKCS#1 v1.5 4813817466cbSJens Wiklander operations 4814817466cbSJens Wiklander 4815817466cbSJens Wiklander= Version 1.2.5 released 2013-02-02 4816817466cbSJens WiklanderChanges 4817817466cbSJens Wiklander * Allow enabling of dummy error_strerror() to support some use-cases 4818817466cbSJens Wiklander * Debug messages about padding errors during SSL message decryption are 4819817466cbSJens Wiklander disabled by default and can be enabled with POLARSSL_SSL_DEBUG_ALL 4820817466cbSJens Wiklander * Sending of security-relevant alert messages that do not break 4821817466cbSJens Wiklander interoperability can be switched on/off with the flag 4822817466cbSJens Wiklander POLARSSL_SSL_ALL_ALERT_MESSAGES 4823817466cbSJens Wiklander 4824817466cbSJens WiklanderSecurity 4825817466cbSJens Wiklander * Removed timing differences during SSL message decryption in 4826817466cbSJens Wiklander ssl_decrypt_buf() due to badly formatted padding 4827817466cbSJens Wiklander 4828817466cbSJens Wiklander= Version 1.2.4 released 2013-01-25 4829817466cbSJens WiklanderChanges 4830817466cbSJens Wiklander * More advanced SSL ciphersuite representation and moved to more dynamic 4831817466cbSJens Wiklander SSL core 4832817466cbSJens Wiklander * Added ssl_handshake_step() to allow single stepping the handshake process 4833817466cbSJens Wiklander 4834817466cbSJens WiklanderBugfix 4835817466cbSJens Wiklander * Memory leak when using RSA_PKCS_V21 operations fixed 4836817466cbSJens Wiklander * Handle future version properly in ssl_write_certificate_request() 4837817466cbSJens Wiklander * Correctly handle CertificateRequest message in client for <= TLS 1.1 4838817466cbSJens Wiklander without DN list 4839817466cbSJens Wiklander 4840817466cbSJens Wiklander= Version 1.2.3 released 2012-11-26 4841817466cbSJens WiklanderBugfix 4842817466cbSJens Wiklander * Server not always sending correct CertificateRequest message 4843817466cbSJens Wiklander 4844817466cbSJens Wiklander= Version 1.2.2 released 2012-11-24 4845817466cbSJens WiklanderChanges 4846817466cbSJens Wiklander * Added p_hw_data to ssl_context for context specific hardware acceleration 4847817466cbSJens Wiklander data 4848817466cbSJens Wiklander * During verify trust-CA is only checked for expiration and CRL presence 4849817466cbSJens Wiklander 4850817466cbSJens WiklanderBugfixes 4851817466cbSJens Wiklander * Fixed client authentication compatibility 4852817466cbSJens Wiklander * Fixed dependency on POLARSSL_SHA4_C in SSL modules 4853817466cbSJens Wiklander 4854817466cbSJens Wiklander= Version 1.2.1 released 2012-11-20 4855817466cbSJens WiklanderChanges 4856817466cbSJens Wiklander * Depth that the certificate verify callback receives is now numbered 4857817466cbSJens Wiklander bottom-up (Peer cert depth is 0) 4858817466cbSJens Wiklander 4859817466cbSJens WiklanderBugfixes 4860817466cbSJens Wiklander * Fixes for MSVC6 4861817466cbSJens Wiklander * Moved mpi_inv_mod() outside POLARSSL_GENPRIME 4862817466cbSJens Wiklander * Allow R and A to point to same mpi in mpi_div_mpi (found by Manuel 4863817466cbSJens Wiklander Pégourié-Gonnard) 4864817466cbSJens Wiklander * Fixed possible segfault in mpi_shift_r() (found by Manuel 4865817466cbSJens Wiklander Pégourié-Gonnard) 4866817466cbSJens Wiklander * Added max length check for rsa_pkcs1_sign with PKCS#1 v2.1 4867817466cbSJens Wiklander 4868817466cbSJens Wiklander= Version 1.2.0 released 2012-10-31 4869817466cbSJens WiklanderFeatures 4870817466cbSJens Wiklander * Added support for NULL cipher (POLARSSL_CIPHER_NULL_CIPHER) and weak 4871817466cbSJens Wiklander ciphersuites (POLARSSL_ENABLE_WEAK_CIPHERSUITES). They are disabled by 4872817466cbSJens Wiklander default! 4873817466cbSJens Wiklander * Added support for wildcard certificates 4874817466cbSJens Wiklander * Added support for multi-domain certificates through the X509 Subject 4875817466cbSJens Wiklander Alternative Name extension 4876817466cbSJens Wiklander * Added preliminary ASN.1 buffer writing support 4877817466cbSJens Wiklander * Added preliminary X509 Certificate Request writing support 4878817466cbSJens Wiklander * Added key_app_writer example application 4879817466cbSJens Wiklander * Added cert_req example application 4880817466cbSJens Wiklander * Added base Galois Counter Mode (GCM) for AES 4881817466cbSJens Wiklander * Added TLS 1.2 support (RFC 5246) 4882817466cbSJens Wiklander * Added GCM suites to TLS 1.2 (RFC 5288) 4883817466cbSJens Wiklander * Added commandline error code convertor (util/strerror) 4884817466cbSJens Wiklander * Added support for Hardware Acceleration hooking in SSL/TLS 4885817466cbSJens Wiklander * Added OpenSSL / PolarSSL compatibility script (tests/compat.sh) and 4886817466cbSJens Wiklander example application (programs/ssl/o_p_test) (requires OpenSSL) 4887817466cbSJens Wiklander * Added X509 CA Path support 4888817466cbSJens Wiklander * Added Thumb assembly optimizations 4889817466cbSJens Wiklander * Added DEFLATE compression support as per RFC3749 (requires zlib) 4890817466cbSJens Wiklander * Added blowfish algorithm (Generic and cipher layer) 4891817466cbSJens Wiklander * Added PKCS#5 PBKDF2 key derivation function 4892817466cbSJens Wiklander * Added Secure Renegotiation (RFC 5746) 4893817466cbSJens Wiklander * Added predefined DHM groups from RFC 5114 4894817466cbSJens Wiklander * Added simple SSL session cache implementation 4895817466cbSJens Wiklander * Added ServerName extension parsing (SNI) at server side 4896817466cbSJens Wiklander * Added option to add minimum accepted SSL/TLS protocol version 4897817466cbSJens Wiklander 4898817466cbSJens WiklanderChanges 4899817466cbSJens Wiklander * Removed redundant POLARSSL_DEBUG_MSG define 4900817466cbSJens Wiklander * AES code only check for Padlock once 4901817466cbSJens Wiklander * Fixed const-correctness mpi_get_bit() 4902817466cbSJens Wiklander * Documentation for mpi_lsb() and mpi_msb() 4903817466cbSJens Wiklander * Moved out_msg to out_hdr + 32 to support hardware acceleration 4904817466cbSJens Wiklander * Changed certificate verify behaviour to comply with RFC 6125 section 6.3 4905817466cbSJens Wiklander to not match CN if subjectAltName extension is present (Closes ticket #56) 4906817466cbSJens Wiklander * Cipher layer cipher_mode_t POLARSSL_MODE_CFB128 is renamed to 4907817466cbSJens Wiklander POLARSSL_MODE_CFB, to also handle different block size CFB modes. 4908817466cbSJens Wiklander * Removed handling for SSLv2 Client Hello (as per RFC 5246 recommendation) 4909817466cbSJens Wiklander * Revamped session resumption handling 4910817466cbSJens Wiklander * Generalized external private key implementation handling (like PKCS#11) 4911817466cbSJens Wiklander in SSL/TLS 4912817466cbSJens Wiklander * Revamped x509_verify() and the SSL f_vrfy callback implementations 4913817466cbSJens Wiklander * Moved from unsigned long to fixed width uint32_t types throughout code 4914817466cbSJens Wiklander * Renamed ciphersuites naming scheme to IANA reserved names 4915817466cbSJens Wiklander 4916817466cbSJens WiklanderBugfix 4917817466cbSJens Wiklander * Fixed handling error in mpi_cmp_mpi() on longer B values (found by 4918817466cbSJens Wiklander Hui Dong) 4919817466cbSJens Wiklander * Fixed potential heap corruption in x509_name allocation 4920817466cbSJens Wiklander * Fixed single RSA test that failed on Big Endian systems (Closes ticket #54) 4921817466cbSJens Wiklander * mpi_exp_mod() now correctly handles negative base numbers (Closes ticket 4922817466cbSJens Wiklander #52) 4923817466cbSJens Wiklander * Handle encryption with private key and decryption with public key as per 4924817466cbSJens Wiklander RFC 2313 4925817466cbSJens Wiklander * Handle empty certificate subject names 4926817466cbSJens Wiklander * Prevent reading over buffer boundaries on X509 certificate parsing 4927817466cbSJens Wiklander * mpi_add_abs() now correctly handles adding short numbers to long numbers 4928817466cbSJens Wiklander with carry rollover (found by Ruslan Yushchenko) 4929817466cbSJens Wiklander * Handle existence of OpenSSL Trust Extensions at end of X.509 DER blob 4930817466cbSJens Wiklander * Fixed MPI assembly for SPARC64 platform 4931817466cbSJens Wiklander 4932817466cbSJens WiklanderSecurity 4933817466cbSJens Wiklander * Fixed potential memory zeroization on miscrafted RSA key (found by Eloi 4934817466cbSJens Wiklander Vanderbeken) 4935817466cbSJens Wiklander 4936817466cbSJens Wiklander= Version 1.1.8 released on 2013-10-01 4937817466cbSJens WiklanderBugfix 4938817466cbSJens Wiklander * Fixed potential memory leak when failing to resume a session 4939817466cbSJens Wiklander * Fixed potential file descriptor leaks 4940817466cbSJens Wiklander 4941817466cbSJens WiklanderSecurity 4942817466cbSJens Wiklander * Potential buffer-overflow for ssl_read_record() (independently found by 4943817466cbSJens Wiklander both TrustInSoft and Paul Brodeur of Leviathan Security Group) 4944817466cbSJens Wiklander * Potential negative value misinterpretation in load_file() 4945817466cbSJens Wiklander * Potential heap buffer overflow on large hostname setting 4946817466cbSJens Wiklander 4947817466cbSJens Wiklander= Version 1.1.7 released on 2013-06-19 4948817466cbSJens WiklanderChanges 4949817466cbSJens Wiklander * HAVEGE random generator disabled by default 4950817466cbSJens Wiklander 4951817466cbSJens WiklanderBugfix 4952817466cbSJens Wiklander * x509parse_crt() now better handles PEM error situations 4953817466cbSJens Wiklander * ssl_parse_certificate() now calls x509parse_crt_der() directly 4954817466cbSJens Wiklander instead of the x509parse_crt() wrapper that can also parse PEM 4955817466cbSJens Wiklander certificates 4956817466cbSJens Wiklander * Fixed values for 2-key Triple DES in cipher layer 4957817466cbSJens Wiklander * ssl_write_certificate_request() can handle empty ca_chain 4958817466cbSJens Wiklander 4959817466cbSJens WiklanderSecurity 4960817466cbSJens Wiklander * A possible DoS during the SSL Handshake, due to faulty parsing of 4961817466cbSJens Wiklander PEM-encoded certificates has been fixed (found by Jack Lloyd) 4962817466cbSJens Wiklander 4963817466cbSJens Wiklander= Version 1.1.6 released on 2013-03-11 4964817466cbSJens WiklanderBugfix 4965817466cbSJens Wiklander * Fixed net_bind() for specified IP addresses on little endian systems 4966817466cbSJens Wiklander 4967817466cbSJens WiklanderChanges 4968817466cbSJens Wiklander * Allow enabling of dummy error_strerror() to support some use-cases 4969817466cbSJens Wiklander * Debug messages about padding errors during SSL message decryption are 4970817466cbSJens Wiklander disabled by default and can be enabled with POLARSSL_SSL_DEBUG_ALL 4971817466cbSJens Wiklander 4972817466cbSJens WiklanderSecurity 4973817466cbSJens Wiklander * Removed timing differences during SSL message decryption in 4974817466cbSJens Wiklander ssl_decrypt_buf() 4975817466cbSJens Wiklander * Removed timing differences due to bad padding from 4976817466cbSJens Wiklander rsa_rsaes_pkcs1_v15_decrypt() and rsa_pkcs1_decrypt() for PKCS#1 v1.5 4977817466cbSJens Wiklander operations 4978817466cbSJens Wiklander 4979817466cbSJens Wiklander= Version 1.1.5 released on 2013-01-16 4980817466cbSJens WiklanderBugfix 4981817466cbSJens Wiklander * Fixed MPI assembly for SPARC64 platform 4982817466cbSJens Wiklander * Handle existence of OpenSSL Trust Extensions at end of X.509 DER blob 4983817466cbSJens Wiklander * mpi_add_abs() now correctly handles adding short numbers to long numbers 4984817466cbSJens Wiklander with carry rollover 4985817466cbSJens Wiklander * Moved mpi_inv_mod() outside POLARSSL_GENPRIME 4986817466cbSJens Wiklander * Prevent reading over buffer boundaries on X509 certificate parsing 4987817466cbSJens Wiklander * mpi_exp_mod() now correctly handles negative base numbers (Closes ticket 4988817466cbSJens Wiklander #52) 4989817466cbSJens Wiklander * Fixed possible segfault in mpi_shift_r() (found by Manuel 4990817466cbSJens Wiklander Pégourié-Gonnard) 4991817466cbSJens Wiklander * Allow R and A to point to same mpi in mpi_div_mpi (found by Manuel 4992817466cbSJens Wiklander Pégourié-Gonnard) 4993817466cbSJens Wiklander * Added max length check for rsa_pkcs1_sign with PKCS#1 v2.1 4994817466cbSJens Wiklander * Memory leak when using RSA_PKCS_V21 operations fixed 4995817466cbSJens Wiklander * Handle encryption with private key and decryption with public key as per 4996817466cbSJens Wiklander RFC 2313 4997817466cbSJens Wiklander * Fixes for MSVC6 4998817466cbSJens Wiklander 4999817466cbSJens WiklanderSecurity 5000817466cbSJens Wiklander * Fixed potential memory zeroization on miscrafted RSA key (found by Eloi 5001817466cbSJens Wiklander Vanderbeken) 5002817466cbSJens Wiklander 5003817466cbSJens Wiklander= Version 1.1.4 released on 2012-05-31 5004817466cbSJens WiklanderBugfix 5005817466cbSJens Wiklander * Correctly handle empty SSL/TLS packets (Found by James Yonan) 5006817466cbSJens Wiklander * Fixed potential heap corruption in x509_name allocation 5007817466cbSJens Wiklander * Fixed single RSA test that failed on Big Endian systems (Closes ticket #54) 5008817466cbSJens Wiklander 5009817466cbSJens Wiklander= Version 1.1.3 released on 2012-04-29 5010817466cbSJens WiklanderBugfix 5011817466cbSJens Wiklander * Fixed random MPI generation to not generate more size than requested. 5012817466cbSJens Wiklander 5013817466cbSJens Wiklander= Version 1.1.2 released on 2012-04-26 5014817466cbSJens WiklanderBugfix 5015817466cbSJens Wiklander * Fixed handling error in mpi_cmp_mpi() on longer B values (found by 5016817466cbSJens Wiklander Hui Dong) 5017817466cbSJens Wiklander 5018817466cbSJens WiklanderSecurity 5019817466cbSJens Wiklander * Fixed potential memory corruption on miscrafted client messages (found by 5020817466cbSJens Wiklander Frama-C team at CEA LIST) 5021817466cbSJens Wiklander * Fixed generation of DHM parameters to correct length (found by Ruslan 5022817466cbSJens Wiklander Yushchenko) 5023817466cbSJens Wiklander 5024817466cbSJens Wiklander= Version 1.1.1 released on 2012-01-23 5025817466cbSJens WiklanderBugfix 5026817466cbSJens Wiklander * Check for failed malloc() in ssl_set_hostname() and x509_get_entries() 5027817466cbSJens Wiklander (Closes ticket #47, found by Hugo Leisink) 5028817466cbSJens Wiklander * Fixed issues with Intel compiler on 64-bit systems (Closes ticket #50) 5029817466cbSJens Wiklander * Fixed multiple compiler warnings for VS6 and armcc 5030817466cbSJens Wiklander * Fixed bug in CTR_CRBG selftest 5031817466cbSJens Wiklander 5032817466cbSJens Wiklander= Version 1.1.0 released on 2011-12-22 5033817466cbSJens WiklanderFeatures 5034817466cbSJens Wiklander * Added ssl_session_reset() to allow better multi-connection pools of 5035817466cbSJens Wiklander SSL contexts without needing to set all non-connection-specific 5036817466cbSJens Wiklander data and pointers again. Adapted ssl_server to use this functionality. 5037817466cbSJens Wiklander * Added ssl_set_max_version() to allow clients to offer a lower maximum 5038817466cbSJens Wiklander supported version to a server to help buggy server implementations. 5039817466cbSJens Wiklander (Closes ticket #36) 5040817466cbSJens Wiklander * Added cipher_get_cipher_mode() and cipher_get_cipher_operation() 5041817466cbSJens Wiklander introspection functions (Closes ticket #40) 5042817466cbSJens Wiklander * Added CTR_DRBG based on AES-256-CTR (NIST SP 800-90) random generator 5043817466cbSJens Wiklander * Added a generic entropy accumulator that provides support for adding 5044817466cbSJens Wiklander custom entropy sources and added some generic and platform dependent 5045817466cbSJens Wiklander entropy sources 5046817466cbSJens Wiklander 5047817466cbSJens WiklanderChanges 5048817466cbSJens Wiklander * Documentation for AES and Camellia in modes CTR and CFB128 clarified. 5049817466cbSJens Wiklander * Fixed rsa_encrypt and rsa_decrypt examples to use public key for 5050817466cbSJens Wiklander encryption and private key for decryption. (Closes ticket #34) 5051817466cbSJens Wiklander * Inceased maximum size of ASN1 length reads to 32-bits. 5052817466cbSJens Wiklander * Added an EXPLICIT tag number parameter to x509_get_ext() 5053817466cbSJens Wiklander * Added a separate CRL entry extension parsing function 5054817466cbSJens Wiklander * Separated the ASN.1 parsing code from the X.509 specific parsing code. 5055817466cbSJens Wiklander So now there is a module that is controlled with POLARSSL_ASN1_PARSE_C. 5056817466cbSJens Wiklander * Changed the defined key-length of DES ciphers in cipher.h to include the 5057817466cbSJens Wiklander parity bits, to prevent mistakes in copying data. (Closes ticket #33) 5058817466cbSJens Wiklander * Loads of minimal changes to better support WINCE as a build target 5059817466cbSJens Wiklander (Credits go to Marco Lizza) 5060817466cbSJens Wiklander * Added POLARSSL_MPI_WINDOW_SIZE definition to allow easier time to memory 5061817466cbSJens Wiklander trade-off 5062817466cbSJens Wiklander * Introduced POLARSSL_MPI_MAX_SIZE and POLARSSL_MPI_MAX_BITS for MPI size 5063817466cbSJens Wiklander management (Closes ticket #44) 5064817466cbSJens Wiklander * Changed the used random function pointer to more flexible format. Renamed 5065817466cbSJens Wiklander havege_rand() to havege_random() to prevent mistakes. Lots of changes as 5066817466cbSJens Wiklander a consequence in library code and programs 5067817466cbSJens Wiklander * Moved all examples programs to use the new entropy and CTR_DRBG 5068817466cbSJens Wiklander * Added permissive certificate parsing to x509parse_crt() and 5069817466cbSJens Wiklander x509parse_crtfile(). With permissive parsing the parsing does not stop on 5070817466cbSJens Wiklander encountering a parse-error. Beware that the meaning of return values has 5071817466cbSJens Wiklander changed! 5072817466cbSJens Wiklander * All error codes are now negative. Even on mermory failures and IO errors. 5073817466cbSJens Wiklander 5074817466cbSJens WiklanderBugfix 5075817466cbSJens Wiklander * Fixed faulty HMAC-MD2 implementation. Found by dibac. (Closes 5076817466cbSJens Wiklander ticket #37) 5077817466cbSJens Wiklander * Fixed a bug where the CRL parser expected an EXPLICIT ASN.1 tag 5078817466cbSJens Wiklander before version numbers 5079817466cbSJens Wiklander * Allowed X509 key usage parsing to accept 4 byte values instead of the 5080817466cbSJens Wiklander standard 1 byte version sometimes used by Microsoft. (Closes ticket #38) 5081817466cbSJens Wiklander * Fixed incorrect behaviour in case of RSASSA-PSS with a salt length 5082817466cbSJens Wiklander smaller than the hash length. (Closes ticket #41) 5083817466cbSJens Wiklander * If certificate serial is longer than 32 octets, serial number is now 5084817466cbSJens Wiklander appended with '....' after first 28 octets 5085817466cbSJens Wiklander * Improved build support for s390x and sparc64 in bignum.h 5086817466cbSJens Wiklander * Fixed MS Visual C++ name clash with int64 in sha4.h 5087817466cbSJens Wiklander * Corrected removal of leading "00:" in printing serial numbers in 5088817466cbSJens Wiklander certificates and CRLs 5089817466cbSJens Wiklander 5090817466cbSJens Wiklander= Version 1.0.0 released on 2011-07-27 5091817466cbSJens WiklanderFeatures 5092817466cbSJens Wiklander * Expanded cipher layer with support for CFB128 and CTR mode 5093817466cbSJens Wiklander * Added rsa_encrypt and rsa_decrypt simple example programs. 5094817466cbSJens Wiklander 5095817466cbSJens WiklanderChanges 5096817466cbSJens Wiklander * The generic cipher and message digest layer now have normal error 5097817466cbSJens Wiklander codes instead of integers 5098817466cbSJens Wiklander 5099817466cbSJens WiklanderBugfix 5100817466cbSJens Wiklander * Undid faulty bug fix in ssl_write() when flushing old data (Ticket 5101817466cbSJens Wiklander #18) 5102817466cbSJens Wiklander 5103817466cbSJens Wiklander= Version 0.99-pre5 released on 2011-05-26 5104817466cbSJens WiklanderFeatures 5105817466cbSJens Wiklander * Added additional Cipher Block Modes to symmetric ciphers 5106817466cbSJens Wiklander (AES CTR, Camellia CTR, XTEA CBC) including the option to 5107817466cbSJens Wiklander enable and disable individual modes when needed 5108817466cbSJens Wiklander * Functions requiring File System functions can now be disabled 5109817466cbSJens Wiklander by undefining POLARSSL_FS_IO 5110817466cbSJens Wiklander * A error_strerror function() has been added to translate between 5111817466cbSJens Wiklander error codes and their description. 5112817466cbSJens Wiklander * Added mpi_get_bit() and mpi_set_bit() individual bit setter/getter 5113817466cbSJens Wiklander functions. 5114817466cbSJens Wiklander * Added ssl_mail_client and ssl_fork_server as example programs. 5115817466cbSJens Wiklander 5116817466cbSJens WiklanderChanges 5117817466cbSJens Wiklander * Major argument / variable rewrite. Introduced use of size_t 5118817466cbSJens Wiklander instead of int for buffer lengths and loop variables for 5119817466cbSJens Wiklander better unsigned / signed use. Renamed internal bigint types 5120817466cbSJens Wiklander t_int and t_dbl to t_uint and t_udbl in the process 5121817466cbSJens Wiklander * mpi_init() and mpi_free() now only accept a single MPI 5122817466cbSJens Wiklander argument and do not accept variable argument lists anymore. 5123817466cbSJens Wiklander * The error codes have been remapped and combining error codes 5124817466cbSJens Wiklander is now done with a PLUS instead of an OR as error codes 5125817466cbSJens Wiklander used are negative. 5126817466cbSJens Wiklander * Changed behaviour of net_read(), ssl_fetch_input() and ssl_recv(). 5127817466cbSJens Wiklander net_recv() now returns 0 on EOF instead of 5128817466cbSJens Wiklander POLARSSL_ERR_NET_CONN_RESET. ssl_fetch_input() returns 5129817466cbSJens Wiklander POLARSSL_ERR_SSL_CONN_EOF on an EOF from its f_recv() function. 5130817466cbSJens Wiklander ssl_read() returns 0 if a POLARSSL_ERR_SSL_CONN_EOF is received 5131817466cbSJens Wiklander after the handshake. 5132817466cbSJens Wiklander * Network functions now return POLARSSL_ERR_NET_WANT_READ or 5133817466cbSJens Wiklander POLARSSL_ERR_NET_WANT_WRITE instead of the ambiguous 5134817466cbSJens Wiklander POLARSSL_ERR_NET_TRY_AGAIN 5135817466cbSJens Wiklander 5136817466cbSJens Wiklander= Version 0.99-pre4 released on 2011-04-01 5137817466cbSJens WiklanderFeatures 5138817466cbSJens Wiklander * Added support for PKCS#1 v2.1 encoding and thus support 5139817466cbSJens Wiklander for the RSAES-OAEP and RSASSA-PSS operations. 5140817466cbSJens Wiklander * Reading of Public Key files incorporated into default x509 5141817466cbSJens Wiklander functionality as well. 5142817466cbSJens Wiklander * Added mpi_fill_random() for centralized filling of big numbers 5143817466cbSJens Wiklander with random data (Fixed ticket #10) 5144817466cbSJens Wiklander 5145817466cbSJens WiklanderChanges 5146817466cbSJens Wiklander * Debug print of MPI now removes leading zero octets and 5147817466cbSJens Wiklander displays actual bit size of the value. 5148817466cbSJens Wiklander * x509parse_key() (and as a consequence x509parse_keyfile()) 5149817466cbSJens Wiklander does not zeroize memory in advance anymore. Use rsa_init() 5150817466cbSJens Wiklander before parsing a key or keyfile! 5151817466cbSJens Wiklander 5152817466cbSJens WiklanderBugfix 5153817466cbSJens Wiklander * Debug output of MPI's now the same independent of underlying 5154817466cbSJens Wiklander platform (32-bit / 64-bit) (Fixes ticket #19, found by Mads 5155817466cbSJens Wiklander Kiilerich and Mihai Militaru) 5156817466cbSJens Wiklander * Fixed bug in ssl_write() when flushing old data (Fixed ticket 5157817466cbSJens Wiklander #18, found by Nikolay Epifanov) 5158817466cbSJens Wiklander * Fixed proper handling of RSASSA-PSS verification with variable 5159817466cbSJens Wiklander length salt lengths 5160817466cbSJens Wiklander 5161817466cbSJens Wiklander= Version 0.99-pre3 released on 2011-02-28 5162817466cbSJens WiklanderThis release replaces version 0.99-pre2 which had possible copyright issues. 5163817466cbSJens WiklanderFeatures 5164817466cbSJens Wiklander * Parsing PEM private keys encrypted with DES and AES 5165817466cbSJens Wiklander are now supported as well (Fixes ticket #5) 5166817466cbSJens Wiklander * Added crl_app program to allow easy reading and 5167817466cbSJens Wiklander printing of X509 CRLs from file 5168817466cbSJens Wiklander 5169817466cbSJens WiklanderChanges 5170817466cbSJens Wiklander * Parsing of PEM files moved to separate module (Fixes 5171817466cbSJens Wiklander ticket #13). Also possible to remove PEM support for 5172817466cbSJens Wiklander systems only using DER encoding 5173817466cbSJens Wiklander 5174817466cbSJens WiklanderBugfixes 5175817466cbSJens Wiklander * Corrected parsing of UTCTime dates before 1990 and 5176817466cbSJens Wiklander after 1950 5177817466cbSJens Wiklander * Support more exotic OID's when parsing certificates 5178817466cbSJens Wiklander (found by Mads Kiilerich) 5179817466cbSJens Wiklander * Support more exotic name representations when parsing 5180817466cbSJens Wiklander certificates (found by Mads Kiilerich) 5181817466cbSJens Wiklander * Replaced the expired test certificates 5182817466cbSJens Wiklander * Do not bail out if no client certificate specified. Try 5183817466cbSJens Wiklander to negotiate anonymous connection (Fixes ticket #12, 5184817466cbSJens Wiklander found by Boris Krasnovskiy) 5185817466cbSJens Wiklander 5186817466cbSJens WiklanderSecurity fixes 5187817466cbSJens Wiklander * Fixed a possible Man-in-the-Middle attack on the 5188817466cbSJens Wiklander Diffie Hellman key exchange (thanks to Larry Highsmith, 5189817466cbSJens Wiklander Subreption LLC) 5190817466cbSJens Wiklander 5191817466cbSJens Wiklander= Version 0.99-pre1 released on 2011-01-30 5192817466cbSJens WiklanderFeatures 5193817466cbSJens WiklanderNote: Most of these features have been donated by Fox-IT 5194817466cbSJens Wiklander * Added Doxygen source code documentation parts 5195817466cbSJens Wiklander * Added reading of DHM context from memory and file 5196817466cbSJens Wiklander * Improved X509 certificate parsing to include extended 5197817466cbSJens Wiklander certificate fields, including Key Usage 5198817466cbSJens Wiklander * Improved certificate verification and verification 5199817466cbSJens Wiklander against the available CRLs 5200817466cbSJens Wiklander * Detection for DES weak keys and parity bits added 5201817466cbSJens Wiklander * Improvements to support integration in other 5202817466cbSJens Wiklander applications: 5203817466cbSJens Wiklander + Added generic message digest and cipher wrapper 5204817466cbSJens Wiklander + Improved information about current capabilities, 5205817466cbSJens Wiklander status, objects and configuration 5206817466cbSJens Wiklander + Added verification callback on certificate chain 5207817466cbSJens Wiklander verification to allow external blacklisting 5208817466cbSJens Wiklander + Additional example programs to show usage 5209817466cbSJens Wiklander * Added support for PKCS#11 through the use of the 5210817466cbSJens Wiklander libpkcs11-helper library 5211817466cbSJens Wiklander 5212817466cbSJens WiklanderChanges 5213817466cbSJens Wiklander * x509parse_time_expired() checks time in addition to 5214817466cbSJens Wiklander the existing date check 5215817466cbSJens Wiklander * The ciphers member of ssl_context and the cipher member 5216817466cbSJens Wiklander of ssl_session have been renamed to ciphersuites and 5217817466cbSJens Wiklander ciphersuite respectively. This clarifies the difference 5218817466cbSJens Wiklander with the generic cipher layer and is better naming 5219817466cbSJens Wiklander altogether 5220817466cbSJens Wiklander 5221817466cbSJens Wiklander= Version 0.14.0 released on 2010-08-16 5222817466cbSJens WiklanderFeatures 5223817466cbSJens Wiklander * Added support for SSL_EDH_RSA_AES_128_SHA and 5224817466cbSJens Wiklander SSL_EDH_RSA_CAMELLIA_128_SHA ciphersuites 5225817466cbSJens Wiklander * Added compile-time and run-time version information 5226817466cbSJens Wiklander * Expanded ssl_client2 arguments for more flexibility 5227817466cbSJens Wiklander * Added support for TLS v1.1 5228817466cbSJens Wiklander 5229817466cbSJens WiklanderChanges 5230817466cbSJens Wiklander * Made Makefile cleaner 5231817466cbSJens Wiklander * Removed dependency on rand() in rsa_pkcs1_encrypt(). 5232817466cbSJens Wiklander Now using random fuction provided to function and 5233817466cbSJens Wiklander changed the prototype of rsa_pkcs1_encrypt(), 5234817466cbSJens Wiklander rsa_init() and rsa_gen_key(). 5235817466cbSJens Wiklander * Some SSL defines were renamed in order to avoid 5236817466cbSJens Wiklander future confusion 5237817466cbSJens Wiklander 5238817466cbSJens WiklanderBug fixes 5239817466cbSJens Wiklander * Fixed CMake out of source build for tests (found by 5240817466cbSJens Wiklander kkert) 5241817466cbSJens Wiklander * rsa_check_private() now supports PKCS1v2 keys as well 5242817466cbSJens Wiklander * Fixed deadlock in rsa_pkcs1_encrypt() on failing random 5243817466cbSJens Wiklander generator 5244817466cbSJens Wiklander 5245817466cbSJens Wiklander= Version 0.13.1 released on 2010-03-24 5246817466cbSJens WiklanderBug fixes 5247817466cbSJens Wiklander * Fixed Makefile in library that was mistakenly merged 5248817466cbSJens Wiklander * Added missing const string fixes 5249817466cbSJens Wiklander 5250817466cbSJens Wiklander= Version 0.13.0 released on 2010-03-21 5251817466cbSJens WiklanderFeatures 5252817466cbSJens Wiklander * Added option parsing for host and port selection to 5253817466cbSJens Wiklander ssl_client2 5254817466cbSJens Wiklander * Added support for GeneralizedTime in X509 parsing 5255817466cbSJens Wiklander * Added cert_app program to allow easy reading and 5256817466cbSJens Wiklander printing of X509 certificates from file or SSL 5257817466cbSJens Wiklander connection. 5258817466cbSJens Wiklander 5259817466cbSJens WiklanderChanges 5260817466cbSJens Wiklander * Added const correctness for main code base 5261817466cbSJens Wiklander * X509 signature algorithm determination is now 5262817466cbSJens Wiklander in a function to allow easy future expansion 5263817466cbSJens Wiklander * Changed symmetric cipher functions to 5264817466cbSJens Wiklander identical interface (returning int result values) 5265817466cbSJens Wiklander * Changed ARC4 to use separate input/output buffer 5266817466cbSJens Wiklander * Added reset function for HMAC context as speed-up 5267817466cbSJens Wiklander for specific use-cases 5268817466cbSJens Wiklander 5269817466cbSJens WiklanderBug fixes 5270817466cbSJens Wiklander * Fixed bug resulting in failure to send the last 5271817466cbSJens Wiklander certificate in the chain in ssl_write_certificate() and 5272817466cbSJens Wiklander ssl_write_certificate_request() (found by fatbob) 5273817466cbSJens Wiklander * Added small fixes for compiler warnings on a Mac 5274817466cbSJens Wiklander (found by Frank de Brabander) 5275817466cbSJens Wiklander * Fixed algorithmic bug in mpi_is_prime() (found by 5276817466cbSJens Wiklander Smbat Tonoyan) 5277817466cbSJens Wiklander 5278817466cbSJens Wiklander= Version 0.12.1 released on 2009-10-04 5279817466cbSJens WiklanderChanges 5280817466cbSJens Wiklander * Coverage test definitions now support 'depends_on' 5281817466cbSJens Wiklander tagging system. 5282817466cbSJens Wiklander * Tests requiring specific hashing algorithms now honor 5283817466cbSJens Wiklander the defines. 5284817466cbSJens Wiklander 5285817466cbSJens WiklanderBug fixes 5286817466cbSJens Wiklander * Changed typo in #ifdef in x509parse.c (found 5287817466cbSJens Wiklander by Eduardo) 5288817466cbSJens Wiklander 5289817466cbSJens Wiklander= Version 0.12.0 released on 2009-07-28 5290817466cbSJens WiklanderFeatures 5291817466cbSJens Wiklander * Added CMake makefiles as alternative to regular Makefiles. 5292817466cbSJens Wiklander * Added preliminary Code Coverage tests for AES, ARC4, 5293817466cbSJens Wiklander Base64, MPI, SHA-family, MD-family, HMAC-SHA-family, 5294817466cbSJens Wiklander Camellia, DES, 3-DES, RSA PKCS#1, XTEA, Diffie-Hellman 5295817466cbSJens Wiklander and X509parse. 5296817466cbSJens Wiklander 5297817466cbSJens WiklanderChanges 5298817466cbSJens Wiklander * Error codes are not (necessarily) negative. Keep 5299817466cbSJens Wiklander this is mind when checking for errors. 5300817466cbSJens Wiklander * RSA_RAW renamed to SIG_RSA_RAW for consistency. 5301817466cbSJens Wiklander * Fixed typo in name of POLARSSL_ERR_RSA_OUTPUT_TOO_LARGE. 5302817466cbSJens Wiklander * Changed interface for AES and Camellia setkey functions 5303817466cbSJens Wiklander to indicate invalid key lengths. 5304817466cbSJens Wiklander 5305817466cbSJens WiklanderBug fixes 5306817466cbSJens Wiklander * Fixed include location of endian.h on FreeBSD (found by 5307817466cbSJens Wiklander Gabriel) 5308817466cbSJens Wiklander * Fixed include location of endian.h and name clash on 5309817466cbSJens Wiklander Apples (found by Martin van Hensbergen) 5310817466cbSJens Wiklander * Fixed HMAC-MD2 by modifying md2_starts(), so that the 5311817466cbSJens Wiklander required HMAC ipad and opad variables are not cleared. 5312817466cbSJens Wiklander (found by code coverage tests) 5313817466cbSJens Wiklander * Prevented use of long long in bignum if 5314817466cbSJens Wiklander POLARSSL_HAVE_LONGLONG not defined (found by Giles 5315817466cbSJens Wiklander Bathgate). 5316817466cbSJens Wiklander * Fixed incorrect handling of negative strings in 5317817466cbSJens Wiklander mpi_read_string() (found by code coverage tests). 5318817466cbSJens Wiklander * Fixed segfault on handling empty rsa_context in 5319817466cbSJens Wiklander rsa_check_pubkey() and rsa_check_privkey() (found by 5320817466cbSJens Wiklander code coverage tests). 5321817466cbSJens Wiklander * Fixed incorrect handling of one single negative input 5322817466cbSJens Wiklander value in mpi_add_abs() (found by code coverage tests). 5323817466cbSJens Wiklander * Fixed incorrect handling of negative first input 5324817466cbSJens Wiklander value in mpi_sub_abs() (found by code coverage tests). 5325817466cbSJens Wiklander * Fixed incorrect handling of negative first input 5326817466cbSJens Wiklander value in mpi_mod_mpi() and mpi_mod_int(). Resulting 5327817466cbSJens Wiklander change also affects mpi_write_string() (found by code 5328817466cbSJens Wiklander coverage tests). 5329817466cbSJens Wiklander * Corrected is_prime() results for 0, 1 and 2 (found by 5330817466cbSJens Wiklander code coverage tests). 5331817466cbSJens Wiklander * Fixed Camellia and XTEA for 64-bit Windows systems. 5332817466cbSJens Wiklander 5333817466cbSJens Wiklander= Version 0.11.1 released on 2009-05-17 5334817466cbSJens Wiklander * Fixed missing functionality for SHA-224, SHA-256, SHA384, 5335817466cbSJens Wiklander SHA-512 in rsa_pkcs1_sign() 5336817466cbSJens Wiklander 5337817466cbSJens Wiklander= Version 0.11.0 released on 2009-05-03 5338817466cbSJens Wiklander * Fixed a bug in mpi_gcd() so that it also works when both 5339817466cbSJens Wiklander input numbers are even and added testcases to check 5340817466cbSJens Wiklander (found by Pierre Habouzit). 5341817466cbSJens Wiklander * Added support for SHA-224, SHA-256, SHA-384 and SHA-512 5342817466cbSJens Wiklander one way hash functions with the PKCS#1 v1.5 signing and 5343817466cbSJens Wiklander verification. 5344817466cbSJens Wiklander * Fixed minor bug regarding mpi_gcd located within the 5345817466cbSJens Wiklander POLARSSL_GENPRIME block. 5346817466cbSJens Wiklander * Fixed minor memory leak in x509parse_crt() and added better 5347817466cbSJens Wiklander handling of 'full' certificate chains (found by Mathias 5348817466cbSJens Wiklander Olsson). 5349817466cbSJens Wiklander * Centralized file opening and reading for x509 files into 5350817466cbSJens Wiklander load_file() 5351817466cbSJens Wiklander * Made definition of net_htons() endian-clean for big endian 5352817466cbSJens Wiklander systems (Found by Gernot). 5353817466cbSJens Wiklander * Undefining POLARSSL_HAVE_ASM now also handles prevents asm in 5354817466cbSJens Wiklander padlock and timing code. 5355817466cbSJens Wiklander * Fixed an off-by-one buffer allocation in ssl_set_hostname() 5356817466cbSJens Wiklander responsible for crashes and unwanted behaviour. 5357817466cbSJens Wiklander * Added support for Certificate Revocation List (CRL) parsing. 5358817466cbSJens Wiklander * Added support for CRL revocation to x509parse_verify() and 5359817466cbSJens Wiklander SSL/TLS code. 5360817466cbSJens Wiklander * Fixed compatibility of XTEA and Camellia on a 64-bit system 5361817466cbSJens Wiklander (found by Felix von Leitner). 5362817466cbSJens Wiklander 5363817466cbSJens Wiklander= Version 0.10.0 released on 2009-01-12 5364817466cbSJens Wiklander * Migrated XySSL to PolarSSL 5365817466cbSJens Wiklander * Added XTEA symmetric cipher 5366817466cbSJens Wiklander * Added Camellia symmetric cipher 5367817466cbSJens Wiklander * Added support for ciphersuites: SSL_RSA_CAMELLIA_128_SHA, 5368817466cbSJens Wiklander SSL_RSA_CAMELLIA_256_SHA and SSL_EDH_RSA_CAMELLIA_256_SHA 5369817466cbSJens Wiklander * Fixed dangerous bug that can cause a heap overflow in 5370817466cbSJens Wiklander rsa_pkcs1_decrypt (found by Christophe Devine) 5371817466cbSJens Wiklander 5372817466cbSJens Wiklander================================================================ 5373817466cbSJens WiklanderXySSL ChangeLog 5374817466cbSJens Wiklander 5375817466cbSJens Wiklander= Version 0.9 released on 2008-03-16 5376817466cbSJens Wiklander 5377817466cbSJens Wiklander * Added support for ciphersuite: SSL_RSA_AES_128_SHA 5378817466cbSJens Wiklander * Enabled support for large files by default in aescrypt2.c 5379817466cbSJens Wiklander * Preliminary openssl wrapper contributed by David Barrett 5380817466cbSJens Wiklander * Fixed a bug in ssl_write() that caused the same payload to 5381817466cbSJens Wiklander be sent twice in non-blocking mode when send returns EAGAIN 5382817466cbSJens Wiklander * Fixed ssl_parse_client_hello(): session id and challenge must 5383817466cbSJens Wiklander not be swapped in the SSLv2 ClientHello (found by Greg Robson) 5384817466cbSJens Wiklander * Added user-defined callback debug function (Krystian Kolodziej) 5385817466cbSJens Wiklander * Before freeing a certificate, properly zero out all cert. data 5386817466cbSJens Wiklander * Fixed the "mode" parameter so that encryption/decryption are 5387817466cbSJens Wiklander not swapped on PadLock; also fixed compilation on older versions 5388817466cbSJens Wiklander of gcc (bug reported by David Barrett) 5389817466cbSJens Wiklander * Correctly handle the case in padlock_xcryptcbc() when input or 53905b25c76aSJerome Forissier output data is non-aligned by falling back to the software 5391817466cbSJens Wiklander implementation, as VIA Nehemiah cannot handle non-aligned buffers 5392817466cbSJens Wiklander * Fixed a memory leak in x509parse_crt() which was reported by Greg 5393817466cbSJens Wiklander Robson-Garth; some x509write.c fixes by Pascal Vizeli, thanks to 5394817466cbSJens Wiklander Matthew Page who reported several bugs 5395817466cbSJens Wiklander * Fixed x509_get_ext() to accept some rare certificates which have 5396817466cbSJens Wiklander an INTEGER instead of a BOOLEAN for BasicConstraints::cA. 5397817466cbSJens Wiklander * Added support on the client side for the TLS "hostname" extension 5398817466cbSJens Wiklander (patch contributed by David Patino) 5399817466cbSJens Wiklander * Make x509parse_verify() return BADCERT_CN_MISMATCH when an empty 5400817466cbSJens Wiklander string is passed as the CN (bug reported by spoofy) 5401817466cbSJens Wiklander * Added an option to enable/disable the BN assembly code 5402817466cbSJens Wiklander * Updated rsa_check_privkey() to verify that (D*E) = 1 % (P-1)*(Q-1) 5403817466cbSJens Wiklander * Disabled obsolete hash functions by default (MD2, MD4); updated 5404817466cbSJens Wiklander selftest and benchmark to not test ciphers that have been disabled 5405817466cbSJens Wiklander * Updated x509parse_cert_info() to correctly display byte 0 of the 5406817466cbSJens Wiklander serial number, setup correct server port in the ssl client example 5407817466cbSJens Wiklander * Fixed a critical denial-of-service with X.509 cert. verification: 5408817466cbSJens Wiklander peer may cause xyssl to loop indefinitely by sending a certificate 5409817466cbSJens Wiklander for which the RSA signature check fails (bug reported by Benoit) 5410817466cbSJens Wiklander * Added test vectors for: AES-CBC, AES-CFB, DES-CBC and 3DES-CBC, 5411817466cbSJens Wiklander HMAC-MD5, HMAC-SHA1, HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 5412817466cbSJens Wiklander * Fixed HMAC-SHA-384 and HMAC-SHA-512 (thanks to Josh Sinykin) 5413817466cbSJens Wiklander * Modified ssl_parse_client_key_exchange() to protect against 5414817466cbSJens Wiklander Daniel Bleichenbacher attack on PKCS#1 v1.5 padding, as well 5415817466cbSJens Wiklander as the Klima-Pokorny-Rosa extension of Bleichenbacher's attack 5416817466cbSJens Wiklander * Updated rsa_gen_key() so that ctx->N is always nbits in size 5417817466cbSJens Wiklander * Fixed assembly PPC compilation errors on Mac OS X, thanks to 5418817466cbSJens Wiklander David Barrett and Dusan Semen 5419817466cbSJens Wiklander 5420817466cbSJens Wiklander= Version 0.8 released on 2007-10-20 5421817466cbSJens Wiklander 5422817466cbSJens Wiklander * Modified the HMAC functions to handle keys larger 5423817466cbSJens Wiklander than 64 bytes, thanks to Stephane Desneux and gary ng 5424817466cbSJens Wiklander * Fixed ssl_read_record() to properly update the handshake 5425817466cbSJens Wiklander message digests, which fixes IE6/IE7 client authentication 5426817466cbSJens Wiklander * Cleaned up the XYSSL* #defines, suggested by Azriel Fasten 5427817466cbSJens Wiklander * Fixed net_recv(), thanks to Lorenz Schori and Egon Kocjan 5428817466cbSJens Wiklander * Added user-defined callbacks for handling I/O and sessions 5429817466cbSJens Wiklander * Added lots of debugging output in the SSL/TLS functions 5430817466cbSJens Wiklander * Added preliminary X.509 cert. writing by Pascal Vizeli 5431817466cbSJens Wiklander * Added preliminary support for the VIA PadLock routines 5432817466cbSJens Wiklander * Added AES-CFB mode of operation, contributed by chmike 5433817466cbSJens Wiklander * Added an SSL/TLS stress testing program (ssl_test.c) 5434817466cbSJens Wiklander * Updated the RSA PKCS#1 code to allow choosing between 5435817466cbSJens Wiklander RSA_PUBLIC and RSA_PRIVATE, as suggested by David Barrett 5436817466cbSJens Wiklander * Updated ssl_read() to skip 0-length records from OpenSSL 5437817466cbSJens Wiklander * Fixed the make install target to comply with *BSD make 5438817466cbSJens Wiklander * Fixed a bug in mpi_read_binary() on 64-bit platforms 5439817466cbSJens Wiklander * mpi_is_prime() speedups, thanks to Kevin McLaughlin 5440817466cbSJens Wiklander * Fixed a long standing memory leak in mpi_is_prime() 5441817466cbSJens Wiklander * Replaced realloc with malloc in mpi_grow(), and set 5442817466cbSJens Wiklander the sign of zero as positive in mpi_init() (reported 5443817466cbSJens Wiklander by Jonathan M. McCune) 5444817466cbSJens Wiklander 5445817466cbSJens Wiklander= Version 0.7 released on 2007-07-07 5446817466cbSJens Wiklander 5447817466cbSJens Wiklander * Added support for the MicroBlaze soft-core processor 5448817466cbSJens Wiklander * Fixed a bug in ssl_tls.c which sometimes prevented SSL 5449817466cbSJens Wiklander connections from being established with non-blocking I/O 5450817466cbSJens Wiklander * Fixed a couple bugs in the VS6 and UNIX Makefiles 5451817466cbSJens Wiklander * Fixed the "PIC register ebx clobbered in asm" bug 5452817466cbSJens Wiklander * Added HMAC starts/update/finish support functions 5453817466cbSJens Wiklander * Added the SHA-224, SHA-384 and SHA-512 hash functions 5454817466cbSJens Wiklander * Fixed the net_set_*block routines, thanks to Andreas 5455817466cbSJens Wiklander * Added a few demonstration programs: md5sum, sha1sum, 5456817466cbSJens Wiklander dh_client, dh_server, rsa_genkey, rsa_sign, rsa_verify 5457817466cbSJens Wiklander * Added new bignum import and export helper functions 5458817466cbSJens Wiklander * Rewrote README.txt in program/ssl/ca to better explain 5459817466cbSJens Wiklander how to create a test PKI 5460817466cbSJens Wiklander 5461817466cbSJens Wiklander= Version 0.6 released on 2007-04-01 5462817466cbSJens Wiklander 5463817466cbSJens Wiklander * Ciphers used in SSL/TLS can now be disabled at compile 5464817466cbSJens Wiklander time, to reduce the memory footprint on embedded systems 5465817466cbSJens Wiklander * Added multiply assembly code for the TriCore and modified 5466817466cbSJens Wiklander havege_struct for this processor, thanks to David Patiño 5467817466cbSJens Wiklander * Added multiply assembly code for 64-bit PowerPCs, 5468817466cbSJens Wiklander thanks to Peking University and the OSU Open Source Lab 5469817466cbSJens Wiklander * Added experimental support of Quantum Cryptography 5470817466cbSJens Wiklander * Added support for autoconf, contributed by Arnaud Cornet 5471817466cbSJens Wiklander * Fixed "long long" compilation issues on IA-64 and PPC64 5472817466cbSJens Wiklander * Fixed a bug introduced in xyssl-0.5/timing.c: hardclock 5473817466cbSJens Wiklander was not being correctly defined on ARM and MIPS 5474817466cbSJens Wiklander 5475817466cbSJens Wiklander= Version 0.5 released on 2007-03-01 5476817466cbSJens Wiklander 5477817466cbSJens Wiklander * Added multiply assembly code for SPARC and Alpha 5478817466cbSJens Wiklander * Added (beta) support for non-blocking I/O operations 5479817466cbSJens Wiklander * Implemented session resuming and client authentication 5480817466cbSJens Wiklander * Fixed some portability issues on WinCE, MINIX 3, Plan9 5481817466cbSJens Wiklander (thanks to Benjamin Newman), HP-UX, FreeBSD and Solaris 5482817466cbSJens Wiklander * Improved the performance of the EDH key exchange 5483817466cbSJens Wiklander * Fixed a bug that caused valid packets with a payload 5484817466cbSJens Wiklander size of 16384 bytes to be rejected 5485817466cbSJens Wiklander 5486817466cbSJens Wiklander= Version 0.4 released on 2007-02-01 5487817466cbSJens Wiklander 5488817466cbSJens Wiklander * Added support for Ephemeral Diffie-Hellman key exchange 5489817466cbSJens Wiklander * Added multiply asm code for SSE2, ARM, PPC, MIPS and M68K 5490817466cbSJens Wiklander * Various improvement to the modular exponentiation code 5491817466cbSJens Wiklander * Rewrote the headers to generate the API docs with doxygen 5492817466cbSJens Wiklander * Fixed a bug in ssl_encrypt_buf (incorrect padding was 5493817466cbSJens Wiklander generated) and in ssl_parse_client_hello (max. client 5494817466cbSJens Wiklander version was not properly set), thanks to Didier Rebeix 5495817466cbSJens Wiklander * Fixed another bug in ssl_parse_client_hello: clients with 5496817466cbSJens Wiklander cipherlists larger than 96 bytes were incorrectly rejected 5497817466cbSJens Wiklander * Fixed a couple memory leak in x509_read.c 5498817466cbSJens Wiklander 5499817466cbSJens Wiklander= Version 0.3 released on 2007-01-01 5500817466cbSJens Wiklander 5501817466cbSJens Wiklander * Added server-side SSLv3 and TLSv1.0 support 5502817466cbSJens Wiklander * Multiple fixes to enhance the compatibility with g++, 5503817466cbSJens Wiklander thanks to Xosé Antón Otero Ferreira 5504817466cbSJens Wiklander * Fixed a bug in the CBC code, thanks to dowst; also, 5505817466cbSJens Wiklander the bignum code is no longer dependent on long long 5506817466cbSJens Wiklander * Updated rsa_pkcs1_sign to handle arbitrary large inputs 5507817466cbSJens Wiklander * Updated timing.c for improved compatibility with i386 5508817466cbSJens Wiklander and 486 processors, thanks to Arnaud Cornet 5509817466cbSJens Wiklander 5510817466cbSJens Wiklander= Version 0.2 released on 2006-12-01 5511817466cbSJens Wiklander 5512817466cbSJens Wiklander * Updated timing.c to support ARM and MIPS arch 5513817466cbSJens Wiklander * Updated the MPI code to support 8086 on MSVC 1.5 5514817466cbSJens Wiklander * Added the copyright notice at the top of havege.h 5515817466cbSJens Wiklander * Fixed a bug in sha2_hmac, thanks to newsoft/Wenfang Zhang 5516817466cbSJens Wiklander * Fixed a bug reported by Adrian Rüegsegger in x509_read_key 5517817466cbSJens Wiklander * Fixed a bug reported by Torsten Lauter in ssl_read_record 5518817466cbSJens Wiklander * Fixed a bug in rsa_check_privkey that would wrongly cause 5519817466cbSJens Wiklander valid RSA keys to be dismissed (thanks to oldwolf) 5520817466cbSJens Wiklander * Fixed a bug in mpi_is_prime that caused some primes to fail 5521817466cbSJens Wiklander the Miller-Rabin primality test 5522817466cbSJens Wiklander 5523817466cbSJens Wiklander I'd also like to thank Younès Hafri for the CRUX linux port, 5524817466cbSJens Wiklander Khalil Petit who added XySSL into pkgsrc and Arnaud Cornet 5525817466cbSJens Wiklander who maintains the Debian package :-) 5526817466cbSJens Wiklander 5527817466cbSJens Wiklander= Version 0.1 released on 2006-11-01 5528