1039e02dfSJerome ForissierMbed TLS ChangeLog (Sorted per branch, date) 2039e02dfSJerome Forissier 3*b0563631STom Van Eyck= Mbed TLS 3.6.0 branch released 2024-03-28 4*b0563631STom Van Eyck 5*b0563631STom Van EyckAPI changes 6*b0563631STom Van Eyck * Remove `tls13_` in mbedtls_ssl_tls13_conf_early_data() and 7*b0563631STom Van Eyck mbedtls_ssl_tls13_conf_max_early_data_size() API names. Early data 8*b0563631STom Van Eyck feature may not be TLS 1.3 specific in the future. Fixes #6909. 9*b0563631STom Van Eyck 10*b0563631STom Van EyckDefault behavior changes 11*b0563631STom Van Eyck * psa_import_key() now only accepts RSA keys in the PSA standard formats. 12*b0563631STom Van Eyck The undocumented ability to import other formats (PKCS#8, SubjectPublicKey, 13*b0563631STom Van Eyck PEM) accepted by the pkparse module has been removed. Applications that 14*b0563631STom Van Eyck need these formats can call mbedtls_pk_parse_{public,}key() followed by 15*b0563631STom Van Eyck mbedtls_pk_import_into_psa(). 16*b0563631STom Van Eyck 17*b0563631STom Van EyckRequirement changes 18*b0563631STom Van Eyck * Drop support for Visual Studio 2013 and 2015, and Arm Compiler 5. 19*b0563631STom Van Eyck 20*b0563631STom Van EyckNew deprecations 21*b0563631STom Van Eyck * Rename the MBEDTLS_SHA256_USE_A64_CRYPTO_xxx config options to 22*b0563631STom Van Eyck MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_xxx. The old names may still 23*b0563631STom Van Eyck be used, but are deprecated. 24*b0563631STom Van Eyck * In the PSA API, domain parameters are no longer used for anything. 25*b0563631STom Van Eyck They are deprecated and will be removed in a future version of the 26*b0563631STom Van Eyck library. 27*b0563631STom Van Eyck * mbedtls_ecp_write_key() is deprecated in favor of 28*b0563631STom Van Eyck mbedtls_ecp_write_key_ext(). 29*b0563631STom Van Eyck 30*b0563631STom Van EyckRemovals 31*b0563631STom Van Eyck * In the PSA API, the experimental way to encode the public exponent of 32*b0563631STom Van Eyck an RSA key as a domain parameter is no longer supported. Use 33*b0563631STom Van Eyck psa_generate_key_ext() instead. 34*b0563631STom Van Eyck * Temporary function mbedtls_pk_wrap_as_opaque() is removed. To mimic the 35*b0563631STom Van Eyck same behavior mbedtls_pk_get_psa_attributes() and 36*b0563631STom Van Eyck mbedtls_pk_import_into_psa() can be used to import a PK key into PSA, 37*b0563631STom Van Eyck while mbedtls_pk_setup_opaque() can be used to wrap a PSA key into a opaque 38*b0563631STom Van Eyck PK context. 39*b0563631STom Van Eyck 40*b0563631STom Van EyckFeatures 41*b0563631STom Van Eyck * Added an example program showing how to hash with the PSA API. 42*b0563631STom Van Eyck * Support Armv8-A Crypto Extension acceleration for SHA-256 43*b0563631STom Van Eyck when compiling for Thumb (T32) or 32-bit Arm (A32). 44*b0563631STom Van Eyck * AES-NI is now supported in Windows builds with clang and clang-cl. 45*b0563631STom Van Eyck Resolves #8372. 46*b0563631STom Van Eyck * Add new mbedtls_x509_csr_parse_der_with_ext_cb() routine which allows 47*b0563631STom Van Eyck parsing unsupported certificate extensions via user provided callback. 48*b0563631STom Van Eyck * Enable the new option MBEDTLS_BLOCK_CIPHER_NO_DECRYPT to omit 49*b0563631STom Van Eyck the decryption direction of block ciphers (AES, ARIA, Camellia). 50*b0563631STom Van Eyck This affects both the low-level modules and the high-level APIs 51*b0563631STom Van Eyck (the cipher and PSA interfaces). This option is incompatible with modes 52*b0563631STom Van Eyck that use the decryption direction (ECB in PSA, CBC, XTS, KW) and with DES. 53*b0563631STom Van Eyck * Support use of Armv8-A Cryptographic Extensions for hardware acclerated 54*b0563631STom Van Eyck AES when compiling for Thumb (T32) or 32-bit Arm (A32). 55*b0563631STom Van Eyck * If a cipher or AEAD mechanism has a PSA driver, you can now build the 56*b0563631STom Van Eyck library without the corresponding built-in implementation. Generally 57*b0563631STom Van Eyck speaking that requires both the key type and algorithm to be accelerated 58*b0563631STom Van Eyck or they'll both be built in. However, for CCM and GCM the built-in 59*b0563631STom Van Eyck implementation is able to take advantage of a driver that only 60*b0563631STom Van Eyck accelerates the key type (that is, the block cipher primitive). See 61*b0563631STom Van Eyck docs/driver-only-builds.md for full details and current limitations. 62*b0563631STom Van Eyck * The CTR_DRBG module will now use AES from a PSA driver if MBEDTLS_AES_C is 63*b0563631STom Van Eyck disabled. This requires PSA_WANT_ALG_ECB_NO_PADDING in addition to 64*b0563631STom Van Eyck MBEDTLS_PSA_CRYPTO_C and PSA_WANT_KEY_TYPE_AES. 65*b0563631STom Van Eyck * Fewer modules depend on MBEDTLS_CIPHER_C, making it possible to save code 66*b0563631STom Van Eyck size by disabling it in more circumstances. In particular, the CCM and 67*b0563631STom Van Eyck GCM modules no longer depend on MBEDTLS_CIPHER_C. Also, 68*b0563631STom Van Eyck MBEDTLS_PSA_CRYPTO can now be enabled without MBEDTLS_CIPHER_C if all 69*b0563631STom Van Eyck unauthenticated (non-AEAD) ciphers are disabled, or if they're all 70*b0563631STom Van Eyck fully provided by drivers. See docs/driver-only-builds.md for full 71*b0563631STom Van Eyck details and current limitations; in particular, NIST_KW and PKCS5/PKCS12 72*b0563631STom Van Eyck decryption still unconditionally depend on MBEDTLS_CIPHER_C. 73*b0563631STom Van Eyck * Add support for record size limit extension as defined by RFC 8449 74*b0563631STom Van Eyck and configured with MBEDTLS_SSL_RECORD_SIZE_LIMIT. 75*b0563631STom Van Eyck Application data sent and received will be fragmented according to 76*b0563631STom Van Eyck Record size limits negotiated during handshake. 77*b0563631STom Van Eyck * Improve performance of AES-GCM, AES-CTR and CTR-DRBG when 78*b0563631STom Van Eyck hardware accelerated AES is not present (around 13-23% on 64-bit Arm). 79*b0563631STom Van Eyck * Add functions mbedtls_ecc_group_to_psa() and mbedtls_ecc_group_from_psa() 80*b0563631STom Van Eyck to convert between Mbed TLS and PSA curve identifiers. 81*b0563631STom Van Eyck * Add utility functions to manipulate mbedtls_ecp_keypair objects, filling 82*b0563631STom Van Eyck gaps made by making its fields private: mbedtls_ecp_set_public_key(), 83*b0563631STom Van Eyck mbedtls_ecp_write_public_key(), mbedtls_ecp_keypair_calc_public(), 84*b0563631STom Van Eyck mbedtls_ecp_keypair_get_group_id(). Fixes #5017, #5441, #8367, #8652. 85*b0563631STom Van Eyck * Add functions mbedtls_md_psa_alg_from_type() and 86*b0563631STom Van Eyck mbedtls_md_type_from_psa_alg() to convert between mbedtls_md_type_t and 87*b0563631STom Van Eyck psa_algorithm_t. 88*b0563631STom Van Eyck * Add partial platform support for z/OS. 89*b0563631STom Van Eyck * Improve performance for gcc (versions older than 9.3.0) and IAR. 90*b0563631STom Van Eyck * Add functions mbedtls_ecdsa_raw_to_der() and mbedtls_ecdsa_der_to_raw() to 91*b0563631STom Van Eyck convert ECDSA signatures between raw and DER (ASN.1) formats. 92*b0563631STom Van Eyck * Add support for using AES-CBC 128, 192, and 256 bit schemes 93*b0563631STom Van Eyck with PKCS#5 PBES2. Keys encrypted this way can now be parsed by PK parse. 94*b0563631STom Van Eyck * The new function mbedtls_rsa_get_bitlen() returns the length of the modulus 95*b0563631STom Van Eyck in bits, i.e. the key size for an RSA key. 96*b0563631STom Van Eyck * Add pc files for pkg-config, e.g.: 97*b0563631STom Van Eyck pkg-config --cflags --libs (mbedtls|mbedcrypto|mbedx509) 98*b0563631STom Van Eyck * Add getter (mbedtls_ssl_session_get_ticket_creation_time()) to access 99*b0563631STom Van Eyck `mbedtls_ssl_session.ticket_creation_time`. 100*b0563631STom Van Eyck * The new functions mbedtls_pk_get_psa_attributes() and 101*b0563631STom Van Eyck mbedtls_pk_import_into_psa() provide a uniform way to create a PSA 102*b0563631STom Van Eyck key from a PK key. 103*b0563631STom Van Eyck * The benchmark program now reports times for both ephemeral and static 104*b0563631STom Van Eyck ECDH in all ECDH configurations. 105*b0563631STom Van Eyck * Add support for 8-bit GCM tables for Shoup's algorithm to speedup GCM 106*b0563631STom Van Eyck operations when hardware accelerated AES is not present. Improves 107*b0563631STom Van Eyck performance by around 30% on 64-bit Intel; 125% on Armv7-M. 108*b0563631STom Van Eyck * The new function psa_generate_key_ext() allows generating an RSA 109*b0563631STom Van Eyck key pair with a custom public exponent. 110*b0563631STom Van Eyck * The new function mbedtls_ecp_write_key_ext() is similar to 111*b0563631STom Van Eyck mbedtls_ecp_write_key(), but can be used without separately calculating 112*b0563631STom Van Eyck the output length. 113*b0563631STom Van Eyck * Add new accessor to expose the private group id member of 114*b0563631STom Van Eyck `mbedtls_ecdh_context` structure. 115*b0563631STom Van Eyck * Add new accessor to expose the `MBEDTLS_PRIVATE(ca_istrue)` member of 116*b0563631STom Van Eyck `mbedtls_x509_crt` structure. This requires setting 117*b0563631STom Van Eyck the MBEDTLS_X509_EXT_BASIC_CONSTRAINTS bit in the certificate's 118*b0563631STom Van Eyck ext_types field. 119*b0563631STom Van Eyck * mbedtls_psa_get_random() is always available as soon as 120*b0563631STom Van Eyck MBEDTLS_PSA_CRYPTO_CLIENT is enabled at build time and psa_crypto_init() is 121*b0563631STom Van Eyck called at runtime. This together with MBEDTLS_PSA_RANDOM_STATE can be 122*b0563631STom Van Eyck used as random number generator function (f_rng) and context (p_rng) in 123*b0563631STom Van Eyck legacy functions. 124*b0563631STom Van Eyck * The new functions mbedtls_pk_copy_from_psa() and 125*b0563631STom Van Eyck mbedtls_pk_copy_public_from_psa() provide ways to set up a PK context 126*b0563631STom Van Eyck with the same content as a PSA key. 127*b0563631STom Van Eyck * Add new accessors to expose the private session-id, 128*b0563631STom Van Eyck session-id length, and ciphersuite-id members of 129*b0563631STom Van Eyck `mbedtls_ssl_session` structure. 130*b0563631STom Van Eyck Add new accessor to expose the ciphersuite-id of 131*b0563631STom Van Eyck `mbedtls_ssl_ciphersuite_t` structure.Design ref: #8529 132*b0563631STom Van Eyck * Mbed TLS now supports the writing and reading of TLS 1.3 early data (see 133*b0563631STom Van Eyck docs/tls13-early-data.md). The support enablement is controlled at build 134*b0563631STom Van Eyck time by the MBEDTLS_SSL_EARLY_DATA configuration option and at runtime by 135*b0563631STom Van Eyck the mbedtls_ssl_conf_early_data() API (by default disabled in both cases). 136*b0563631STom Van Eyck * Add protection for multithreaded access to the PSA keystore and protection 137*b0563631STom Van Eyck for multithreaded access to the the PSA global state, including 138*b0563631STom Van Eyck concurrently calling psa_crypto_init() when MBEDTLS_THREADING_C and 139*b0563631STom Van Eyck MBEDTLS_THREADING_PTHREAD are defined. See 140*b0563631STom Van Eyck docs/architecture/psa-thread-safety/psa-thread-safety.md for more details. 141*b0563631STom Van Eyck Resolves issues #3263 and #7945. 142*b0563631STom Van Eyck 143*b0563631STom Van EyckSecurity 144*b0563631STom Van Eyck * Fix a stack buffer overread (less than 256 bytes) when parsing a TLS 1.3 145*b0563631STom Van Eyck ClientHello in a TLS 1.3 server supporting some PSK key exchange mode. A 146*b0563631STom Van Eyck malicious client could cause information disclosure or a denial of service. 147*b0563631STom Van Eyck * Passing buffers that are stored in untrusted memory as arguments 148*b0563631STom Van Eyck to PSA functions is now secure by default. 149*b0563631STom Van Eyck The PSA core now protects against modification of inputs or exposure 150*b0563631STom Van Eyck of intermediate outputs during operations. This is currently implemented 151*b0563631STom Van Eyck by copying buffers. 152*b0563631STom Van Eyck This feature increases code size and memory usage. If buffers passed to 153*b0563631STom Van Eyck PSA functions are owned exclusively by the PSA core for the duration of 154*b0563631STom Van Eyck the function call (i.e. no buffer parameters are in shared memory), 155*b0563631STom Van Eyck copying may be disabled by setting MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS. 156*b0563631STom Van Eyck Note that setting this option will cause input-output buffer overlap to 157*b0563631STom Van Eyck be only partially supported (#3266). 158*b0563631STom Van Eyck Fixes CVE-2024-28960. 159*b0563631STom Van Eyck * Restore the maximum TLS version to be negotiated to the configured one 160*b0563631STom Van Eyck when an SSL context is reset with the mbedtls_ssl_session_reset() API. 161*b0563631STom Van Eyck An attacker was able to prevent an Mbed TLS server from establishing any 162*b0563631STom Van Eyck TLS 1.3 connection potentially resulting in a Denial of Service or forced 163*b0563631STom Van Eyck version downgrade from TLS 1.3 to TLS 1.2. Fixes #8654 reported by hey3e. 164*b0563631STom Van Eyck Fixes CVE-2024-28755. 165*b0563631STom Van Eyck * When negotiating TLS version on server side, do not fall back to the 166*b0563631STom Van Eyck TLS 1.2 implementation of the protocol if it is disabled. 167*b0563631STom Van Eyck - If the TLS 1.2 implementation was disabled at build time, a TLS 1.2 168*b0563631STom Van Eyck client could put the TLS 1.3-only server in an infinite loop processing 169*b0563631STom Van Eyck a TLS 1.2 ClientHello, resulting in a denial of service. Reported by 170*b0563631STom Van Eyck Matthias Mucha and Thomas Blattmann, SICK AG. 171*b0563631STom Van Eyck - If the TLS 1.2 implementation was disabled at runtime, a TLS 1.2 client 172*b0563631STom Van Eyck was able to successfully establish a TLS 1.2 connection with the server. 173*b0563631STom Van Eyck Reported by alluettiv on GitHub. 174*b0563631STom Van Eyck Fixes CVE-2024-28836. 175*b0563631STom Van Eyck 176*b0563631STom Van EyckBugfix 177*b0563631STom Van Eyck * Fix the build with CMake when Everest or P256-m is enabled through 178*b0563631STom Van Eyck a user configuration file or the compiler command line. Fixes #8165. 179*b0563631STom Van Eyck * Fix compilation error in C++ programs when MBEDTLS_ASN1_PARSE_C is 180*b0563631STom Van Eyck disabled. 181*b0563631STom Van Eyck * Fix possible NULL dereference issue in X509 cert_req program if an entry 182*b0563631STom Van Eyck in the san parameter is not separated by a colon. 183*b0563631STom Van Eyck * Fix possible NULL dereference issue in X509 cert_write program if an entry 184*b0563631STom Van Eyck in the san parameter is not separated by a colon. 185*b0563631STom Van Eyck * Fix an inconsistency between implementations and usages of `__cpuid`, 186*b0563631STom Van Eyck which mainly causes failures when building Windows target using 187*b0563631STom Van Eyck mingw or clang. Fixes #8334 & #8332. 188*b0563631STom Van Eyck * Fix build failure in conda-forge. Fixes #8422. 189*b0563631STom Van Eyck * Fix parsing of CSRs with critical extensions. 190*b0563631STom Van Eyck * Switch to milliseconds as the unit for ticket creation and reception time 191*b0563631STom Van Eyck instead of seconds. That avoids rounding errors when computing the age of 192*b0563631STom Van Eyck tickets compared to peer using a millisecond clock (observed with GnuTLS). 193*b0563631STom Van Eyck Fixes #6623. 194*b0563631STom Van Eyck * Fix TLS server accepting TLS 1.2 handshake while TLS 1.2 195*b0563631STom Van Eyck is disabled at runtime. Fixes #8593. 196*b0563631STom Van Eyck * Remove accidental introduction of RSA signature algorithms 197*b0563631STom Van Eyck in TLS Suite B Profile. Fixes #8221. 198*b0563631STom Van Eyck * Fix unsupported PSA asymmetric encryption and decryption 199*b0563631STom Van Eyck (psa_asymmetric_[en|de]crypt) with opaque keys. 200*b0563631STom Van Eyck Resolves #8461. 201*b0563631STom Van Eyck * On Linux on ARMv8, fix a build error with SHA-256 and SHA-512 202*b0563631STom Van Eyck acceleration detection when the libc headers do not define the 203*b0563631STom Van Eyck corresponding constant. Reported by valord577. 204*b0563631STom Van Eyck * Correct initial capacities for key derivation algorithms:TLS12_PRF, 205*b0563631STom Van Eyck TLS12_PSK_TO_MS, PBKDF2-HMAC, PBKDF2-CMAC 206*b0563631STom Van Eyck * Fix mbedtls_pk_get_bitlen() for RSA keys whose size is not a 207*b0563631STom Van Eyck multiple of 8. Fixes #868. 208*b0563631STom Van Eyck * Avoid segmentation fault caused by releasing not initialized 209*b0563631STom Van Eyck entropy resource in gen_key example. Fixes #8809. 210*b0563631STom Van Eyck * mbedtls_pem_read_buffer() now performs a check on the padding data of 211*b0563631STom Van Eyck decrypted keys and it rejects invalid ones. 212*b0563631STom Van Eyck * Fix mbedtls_pk_sign(), mbedtls_pk_verify(), mbedtls_pk_decrypt() and 213*b0563631STom Van Eyck mbedtls_pk_encrypt() on non-opaque RSA keys to honor the padding mode in 214*b0563631STom Van Eyck the RSA context. Before, if MBEDTLS_USE_PSA_CRYPTO was enabled and the 215*b0563631STom Van Eyck RSA context was configured for PKCS#1 v2.1 (PSS/OAEP), the sign/verify 216*b0563631STom Van Eyck functions performed a PKCS#1 v1.5 signature instead and the 217*b0563631STom Van Eyck encrypt/decrypt functions returned an error. Fixes #8824. 218*b0563631STom Van Eyck * Fix missing bitflags in SSL session serialization headers. Their absence 219*b0563631STom Van Eyck allowed SSL sessions saved in one configuration to be loaded in a 220*b0563631STom Van Eyck different, incompatible configuration. 221*b0563631STom Van Eyck * In TLS 1.3 clients, fix an interoperability problem due to the client 222*b0563631STom Van Eyck generating a new random after a HelloRetryRequest. Fixes #8669. 223*b0563631STom Van Eyck * Fix the restoration of the ALPN when loading serialized connection with 224*b0563631STom Van Eyck the mbedtls_ssl_context_load() API. 225*b0563631STom Van Eyck * Fix NULL pointer dereference in mbedtls_pk_verify_ext() when called using 226*b0563631STom Van Eyck an opaque RSA context and specifying MBEDTLS_PK_RSASSA_PSS as key type. 227*b0563631STom Van Eyck * Fix RSA opaque keys always using PKCS1 v1.5 algorithms instead of the 228*b0563631STom Van Eyck primary algorithm of the wrapped PSA key. 229*b0563631STom Van Eyck * Fully support arbitrary overlap between inputs and outputs of PSA 230*b0563631STom Van Eyck functions. Note that overlap is still only partially supported when 231*b0563631STom Van Eyck MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS is set (#3266). 232*b0563631STom Van Eyck 233*b0563631STom Van EyckChanges 234*b0563631STom Van Eyck * Use heap memory to allocate DER encoded public/private key. 235*b0563631STom Van Eyck This reduces stack usage significantly for writing a public/private 236*b0563631STom Van Eyck key to a PEM string. 237*b0563631STom Van Eyck * PSA_WANT_ALG_CCM and PSA_WANT_ALG_CCM_STAR_NO_TAG are no more synonyms and 238*b0563631STom Van Eyck they are now treated separately. This means that they should be 239*b0563631STom Van Eyck individually enabled in order to enable respective support; also the 240*b0563631STom Van Eyck corresponding MBEDTLS_PSA_ACCEL symbol should be defined in case 241*b0563631STom Van Eyck acceleration is required. 242*b0563631STom Van Eyck * Moved declaration of functions mbedtls_ecc_group_to_psa and 243*b0563631STom Van Eyck mbedtls_ecc_group_of_psa from psa/crypto_extra.h to mbedtls/psa_util.h 244*b0563631STom Van Eyck * mbedtls_pk_sign_ext() is now always available, not just when 245*b0563631STom Van Eyck PSA (MBEDTLS_PSA_CRYPTO_C) is enabled. 246*b0563631STom Van Eyck * Extended PSA Crypto configurations options for FFDH by making it possible 247*b0563631STom Van Eyck to select only some of the parameters / groups, with the macros 248*b0563631STom Van Eyck PSA_WANT_DH_RFC7919_XXXX. You now need to defined the corresponding macro 249*b0563631STom Van Eyck for each size you want to support. Also, if you have an FFDH accelerator, 250*b0563631STom Van Eyck you'll need to define the appropriate MBEDTLS_PSA_ACCEL macros to signal 251*b0563631STom Van Eyck support for these domain parameters. 252*b0563631STom Van Eyck * RSA support in PSA no longer auto-enables the pkparse and pkwrite modules, 253*b0563631STom Van Eyck saving code size when those are not otherwise enabled. 254*b0563631STom Van Eyck * mbedtls_mpi_exp_mod and code that uses it, notably RSA and DHM operations, 255*b0563631STom Van Eyck have changed their speed/memory compromise as part of a proactive security 256*b0563631STom Van Eyck improvement. The new default value of MBEDTLS_MPI_WINDOW_SIZE roughly 257*b0563631STom Van Eyck preserves the current speed, at the expense of increasing memory 258*b0563631STom Van Eyck consumption. 259*b0563631STom Van Eyck * Rename directory containing Visual Studio files from visualc/VS2013 to 260*b0563631STom Van Eyck visualc/VS2017. 261*b0563631STom Van Eyck * The TLS 1.3 protocol is now enabled in the default configuration. 262*b0563631STom Van Eyck 263*b0563631STom Van Eyck= Mbed TLS 3.5.2 branch released 2024-01-26 264*b0563631STom Van Eyck 265*b0563631STom Van EyckSecurity 266*b0563631STom Van Eyck * Fix a timing side channel in private key RSA operations. This side channel 267*b0563631STom Van Eyck could be sufficient for an attacker to recover the plaintext. A local 268*b0563631STom Van Eyck attacker or a remote attacker who is close to the victim on the network 269*b0563631STom Van Eyck might have precise enough timing measurements to exploit this. It requires 270*b0563631STom Van Eyck the attacker to send a large number of messages for decryption. For 271*b0563631STom Van Eyck details, see "Everlasting ROBOT: the Marvin Attack", Hubert Kario. Reported 272*b0563631STom Van Eyck by Hubert Kario, Red Hat. 273*b0563631STom Van Eyck * Fix a failure to validate input when writing x509 extensions lengths which 274*b0563631STom Van Eyck could result in an integer overflow, causing a zero-length buffer to be 275*b0563631STom Van Eyck allocated to hold the extension. The extension would then be copied into 276*b0563631STom Van Eyck the buffer, causing a heap buffer overflow. 277*b0563631STom Van Eyck 278*b0563631STom Van Eyck= Mbed TLS 3.5.1 branch released 2023-11-06 279*b0563631STom Van Eyck 280*b0563631STom Van EyckChanges 281*b0563631STom Van Eyck * Mbed TLS is now released under a dual Apache-2.0 OR GPL-2.0-or-later 282*b0563631STom Van Eyck license. Users may choose which license they take the code under. 283*b0563631STom Van Eyck 284*b0563631STom Van EyckBugfix 285*b0563631STom Van Eyck * Fix accidental omission of MBEDTLS_TARGET_PREFIX in 3rdparty modules 286*b0563631STom Van Eyck in CMake. 287*b0563631STom Van Eyck 288*b0563631STom Van Eyck= Mbed TLS 3.5.0 branch released 2023-10-05 289*b0563631STom Van Eyck 290*b0563631STom Van EyckAPI changes 291*b0563631STom Van Eyck * Mbed TLS 3.4 introduced support for omitting the built-in implementation 292*b0563631STom Van Eyck of ECDSA and/or EC J-PAKE when those are provided by a driver. However, 293*b0563631STom Van Eyck there was a flaw in the logic checking if the built-in implementation, in 294*b0563631STom Van Eyck that it failed to check if all the relevant curves were supported by the 295*b0563631STom Van Eyck accelerator. As a result, it was possible to declare no curves as 296*b0563631STom Van Eyck accelerated and still have the built-in implementation compiled out. 297*b0563631STom Van Eyck Starting with this release, it is necessary to declare which curves are 298*b0563631STom Van Eyck accelerated (using MBEDTLS_PSA_ACCEL_ECC_xxx macros), or they will be 299*b0563631STom Van Eyck considered not accelerated, and the built-in implementation of the curves 300*b0563631STom Van Eyck and any algorithm possible using them will be included in the build. 301*b0563631STom Van Eyck * Add new millisecond time type `mbedtls_ms_time_t` and `mbedtls_ms_time()` 302*b0563631STom Van Eyck function, needed for TLS 1.3 ticket lifetimes. Alternative implementations 303*b0563631STom Van Eyck can be created using an ALT interface. 304*b0563631STom Van Eyck 305*b0563631STom Van EyckRequirement changes 306*b0563631STom Van Eyck * Officially require Python 3.8 now that earlier versions are out of support. 307*b0563631STom Van Eyck * Minimum required Windows version is now Windows Vista, or 308*b0563631STom Van Eyck Windows Server 2008. 309*b0563631STom Van Eyck 310*b0563631STom Van EyckNew deprecations 311*b0563631STom Van Eyck * PSA_WANT_KEY_TYPE_xxx_KEY_PAIR and 312*b0563631STom Van Eyck MBEDTLS_PSA_ACCEL_KEY_TYPE_xxx_KEY_PAIR, where xxx is either ECC or RSA, 313*b0563631STom Van Eyck are now being deprecated in favor of PSA_WANT_KEY_TYPE_xxx_KEY_PAIR_yyy and 314*b0563631STom Van Eyck MBEDTLS_PSA_ACCEL_KEY_TYPE_xxx_KEY_PAIR_yyy. Here yyy can be: BASIC, 315*b0563631STom Van Eyck IMPORT, EXPORT, GENERATE, DERIVE. The goal is to have a finer detail about 316*b0563631STom Van Eyck the capabilities of the PSA side for either key. 317*b0563631STom Van Eyck * MBEDTLS_CIPHER_BLKSIZE_MAX is deprecated in favor of 318*b0563631STom Van Eyck MBEDTLS_MAX_BLOCK_LENGTH (if you intended what the name suggests: 319*b0563631STom Van Eyck maximum size of any supported block cipher) or the new name 320*b0563631STom Van Eyck MBEDTLS_CMAC_MAX_BLOCK_SIZE (if you intended the actual semantics: 321*b0563631STom Van Eyck maximum size of a block cipher supported by the CMAC module). 322*b0563631STom Van Eyck * mbedtls_pkcs5_pbes2() and mbedtls_pkcs12_pbe() functions are now 323*b0563631STom Van Eyck deprecated in favor of mbedtls_pkcs5_pbes2_ext() and 324*b0563631STom Van Eyck mbedtls_pkcs12_pbe_ext() as they offer more security by checking 325*b0563631STom Van Eyck for overflow of the output buffer and reporting the actual length 326*b0563631STom Van Eyck of the output. 327*b0563631STom Van Eyck 328*b0563631STom Van EyckFeatures 329*b0563631STom Van Eyck * All modules that use hashes or HMAC can now take advantage of PSA Crypto 330*b0563631STom Van Eyck drivers when MBEDTLS_PSA_CRYPTO_C is enabled and psa_crypto_init() has 331*b0563631STom Van Eyck been called. Previously (in 3.3), this was restricted to a few modules, 332*b0563631STom Van Eyck and only in builds where MBEDTLS_MD_C was disabled; in particular the 333*b0563631STom Van Eyck entropy module was not covered which meant an external RNG had to be 334*b0563631STom Van Eyck provided - these limitations are lifted in this version. A new set of 335*b0563631STom Van Eyck feature macros, MBEDTLS_MD_CAN_xxx, has been introduced that can be used 336*b0563631STom Van Eyck to check for availability of hash algorithms, regardless of whether 337*b0563631STom Van Eyck they're provided by a built-in implementation, a driver or both. See 338*b0563631STom Van Eyck docs/driver-only-builds.md. 339*b0563631STom Van Eyck * When a PSA driver for ECDH is present, it is now possible to disable 340*b0563631STom Van Eyck MBEDTLS_ECDH_C in the build in order to save code size. For TLS 1.2 341*b0563631STom Van Eyck key exchanges based on ECDH(E) to work, this requires 342*b0563631STom Van Eyck MBEDTLS_USE_PSA_CRYPTO. Restartable/interruptible ECDHE operations in 343*b0563631STom Van Eyck TLS 1.2 (ECDHE-ECDSA key exchange) are not supported in those builds yet, 344*b0563631STom Van Eyck as PSA does not have an API for restartable ECDH yet. 345*b0563631STom Van Eyck * When all of ECDH, ECDSA and EC J-PAKE are either disabled or provided by 346*b0563631STom Van Eyck a driver, it is possible to disable MBEDTLS_ECP_C (and MBEDTLS_BIGNUM_C 347*b0563631STom Van Eyck if not required by another module) and still get support for ECC keys and 348*b0563631STom Van Eyck algorithms in PSA, with some limitations. See docs/driver-only-builds.txt 349*b0563631STom Van Eyck for details. 350*b0563631STom Van Eyck * Add parsing of directoryName subtype for subjectAltName extension in 351*b0563631STom Van Eyck x509 certificates. 352*b0563631STom Van Eyck * Add support for server-side TLS version negotiation. If both TLS 1.2 and 353*b0563631STom Van Eyck TLS 1.3 protocols are enabled, the TLS server now selects TLS 1.2 or 354*b0563631STom Van Eyck TLS 1.3 depending on the capabilities and preferences of TLS clients. 355*b0563631STom Van Eyck Fixes #6867. 356*b0563631STom Van Eyck * X.509 hostname verification now supports IPAddress Subject Alternate Names. 357*b0563631STom Van Eyck * Add support for reading and writing X25519 and X448 358*b0563631STom Van Eyck public and private keys in RFC 8410 format using the existing PK APIs. 359*b0563631STom Van Eyck * When parsing X.509 certificates, support the extensions 360*b0563631STom Van Eyck SignatureKeyIdentifier and AuthorityKeyIdentifier. 361*b0563631STom Van Eyck * Don't include the PSA dispatch functions for PAKEs (psa_pake_setup() etc) 362*b0563631STom Van Eyck if no PAKE algorithms are requested 363*b0563631STom Van Eyck * Add support for the FFDH algorithm and DH key types in PSA, with 364*b0563631STom Van Eyck parameters from RFC 7919. This includes a built-in implementation based 365*b0563631STom Van Eyck on MBEDTLS_BIGNUM_C, and a driver dispatch layer enabling alternative 366*b0563631STom Van Eyck implementations of FFDH through the driver entry points. 367*b0563631STom Van Eyck * It is now possible to generate certificates with SubjectAltNames. 368*b0563631STom Van Eyck Currently supported subtypes: DnsName, UniformResourceIdentifier, 369*b0563631STom Van Eyck IP address, OtherName, and DirectoryName, as defined in RFC 5280. 370*b0563631STom Van Eyck See mbedtls_x509write_crt_set_subject_alternative_name for 371*b0563631STom Van Eyck more information. 372*b0563631STom Van Eyck * X.509 hostname verification now partially supports URI Subject Alternate 373*b0563631STom Van Eyck Names. Only exact matching, without any normalization procedures 374*b0563631STom Van Eyck described in 7.4 of RFC5280, will result in a positive URI verification. 375*b0563631STom Van Eyck * Add function mbedtls_oid_from_numeric_string() to parse an OID from a 376*b0563631STom Van Eyck string to a DER-encoded mbedtls_asn1_buf. 377*b0563631STom Van Eyck * Add SHA-3 family hash functions. 378*b0563631STom Van Eyck * Add support to restrict AES to 128-bit keys in order to save code size. 379*b0563631STom Van Eyck A new configuration option, MBEDTLS_AES_ONLY_128_BIT_KEY_LENGTH, can be 380*b0563631STom Van Eyck used to enable this feature. 381*b0563631STom Van Eyck * AES performance improvements. Uplift varies by platform, 382*b0563631STom Van Eyck toolchain, optimisation flags and mode. 383*b0563631STom Van Eyck Aarch64, gcc -Os and CCM, GCM and XTS benefit the most. 384*b0563631STom Van Eyck On Aarch64, uplift is typically around 20 - 110%. 385*b0563631STom Van Eyck When compiling with gcc -Os on Aarch64, AES-XTS improves 386*b0563631STom Van Eyck by 4.5x. 387*b0563631STom Van Eyck * Add support for PBKDF2-HMAC through the PSA API. 388*b0563631STom Van Eyck * New symbols PSA_WANT_KEY_TYPE_xxx_KEY_PAIR_yyy and 389*b0563631STom Van Eyck MBEDTLS_PSA_ACCEL_KEY_TYPE_xxx_KEY_PAIR_yyy (where xxx is either ECC, RSA 390*b0563631STom Van Eyck or DH) were introduced in order to have finer accuracy in defining the 391*b0563631STom Van Eyck PSA capabilities for each key. These capabilities, named yyy above, can be 392*b0563631STom Van Eyck any of: BASIC, IMPORT, EXPORT, GENERATE, DERIVE. 393*b0563631STom Van Eyck - DERIVE is only available for ECC keys, not for RSA or DH ones. 394*b0563631STom Van Eyck - implementations are free to enable more than what it was strictly 395*b0563631STom Van Eyck requested. For example BASIC internally enables IMPORT and EXPORT 396*b0563631STom Van Eyck (useful for testing purposes), but this might change in the future. 397*b0563631STom Van Eyck * Add support for FFDH key exchange in TLS 1.3. 398*b0563631STom Van Eyck This is automatically enabled as soon as PSA_WANT_ALG_FFDH 399*b0563631STom Van Eyck and the ephemeral or psk-ephemeral key exchange mode are enabled. 400*b0563631STom Van Eyck By default, all groups are offered; the list of groups can be 401*b0563631STom Van Eyck configured using the existing API function mbedtls_ssl_conf_groups(). 402*b0563631STom Van Eyck * Improve mbedtls_x509_time performance and reduce memory use. 403*b0563631STom Van Eyck * Reduce syscalls to time() during certificate verification. 404*b0563631STom Van Eyck * Allow MBEDTLS_CONFIG_FILE and MBEDTLS_USER_CONFIG_FILE to be set by 405*b0563631STom Van Eyck setting the CMake variable of the same name at configuration time. 406*b0563631STom Van Eyck * Add getter (mbedtls_ssl_cache_get_timeout()) to access 407*b0563631STom Van Eyck `mbedtls_ssl_cache_context.timeout`. 408*b0563631STom Van Eyck * Add getter (mbedtls_ssl_get_hostname()) to access 409*b0563631STom Van Eyck `mbedtls_ssl_context.hostname`. 410*b0563631STom Van Eyck * Add getter (mbedtls_ssl_conf_get_endpoint()) to access 411*b0563631STom Van Eyck `mbedtls_ssl_config.endpoint`. 412*b0563631STom Van Eyck * Support for "opaque" (PSA-held) ECC keys in the PK module has been 413*b0563631STom Van Eyck extended: it is now possible to use mbedtls_pk_write_key_der(), 414*b0563631STom Van Eyck mbedtls_pk_write_key_pem(), mbedtls_pk_check_pair(), and 415*b0563631STom Van Eyck mbedtls_pk_verify() with opaque ECC keys (provided the PSA attributes 416*b0563631STom Van Eyck allow it). 417*b0563631STom Van Eyck * The documentation of mbedtls_ecp_group now describes the optimized 418*b0563631STom Van Eyck representation of A for some curves. Fixes #8045. 419*b0563631STom Van Eyck * Add a possibility to generate CSR's with RCF822 and directoryName subtype 420*b0563631STom Van Eyck of subjectAltName extension in x509 certificates. 421*b0563631STom Van Eyck * Add support for PBKDF2-CMAC through the PSA API. 422*b0563631STom Van Eyck * New configuration option MBEDTLS_AES_USE_HARDWARE_ONLY introduced. When 423*b0563631STom Van Eyck using CPU-accelerated AES (e.g., Arm Crypto Extensions), this option 424*b0563631STom Van Eyck disables the plain C implementation and the run-time detection for the 425*b0563631STom Van Eyck CPU feature, which reduces code size and avoids the vulnerability of the 426*b0563631STom Van Eyck plain C implementation. 427*b0563631STom Van Eyck * Accept arbitrary AttributeType and AttributeValue in certificate 428*b0563631STom Van Eyck Distinguished Names using RFC 4514 syntax. 429*b0563631STom Van Eyck * Applications using ECC over secp256r1 through the PSA API can use a 430*b0563631STom Van Eyck new implementation with a much smaller footprint, but some minor 431*b0563631STom Van Eyck usage restrictions. See the documentation of the new configuration 432*b0563631STom Van Eyck option MBEDTLS_PSA_P256M_DRIVER_ENABLED for details. 433*b0563631STom Van Eyck 434*b0563631STom Van EyckSecurity 435*b0563631STom Van Eyck * Fix a case where potentially sensitive information held in memory would not 436*b0563631STom Van Eyck be completely zeroized during TLS 1.2 handshake, in both server and client 437*b0563631STom Van Eyck configurations. 438*b0563631STom Van Eyck * In configurations with ARIA or Camellia but not AES, the value of 439*b0563631STom Van Eyck MBEDTLS_CIPHER_BLKSIZE_MAX was 8, rather than 16 as the name might 440*b0563631STom Van Eyck suggest. This did not affect any library code, because this macro was 441*b0563631STom Van Eyck only used in relation with CMAC which does not support these ciphers. 442*b0563631STom Van Eyck This may affect application code that uses this macro. 443*b0563631STom Van Eyck * Developers using mbedtls_pkcs5_pbes2() or mbedtls_pkcs12_pbe() should 444*b0563631STom Van Eyck review the size of the output buffer passed to this function, and note 445*b0563631STom Van Eyck that the output after decryption may include CBC padding. Consider moving 446*b0563631STom Van Eyck to the new functions mbedtls_pkcs5_pbes2_ext() or mbedtls_pkcs12_pbe_ext() 447*b0563631STom Van Eyck which checks for overflow of the output buffer and reports the actual 448*b0563631STom Van Eyck length of the output. 449*b0563631STom Van Eyck * Improve padding calculations in CBC decryption, NIST key unwrapping and 450*b0563631STom Van Eyck RSA OAEP decryption. With the previous implementation, some compilers 451*b0563631STom Van Eyck (notably recent versions of Clang and IAR) could produce non-constant 452*b0563631STom Van Eyck time code, which could allow a padding oracle attack if the attacker 453*b0563631STom Van Eyck has access to precise timing measurements. 454*b0563631STom Van Eyck * Updates to constant-time C code so that compilers are less likely to use 455*b0563631STom Van Eyck conditional instructions, which can have an observable difference in 456*b0563631STom Van Eyck timing. (Clang has been seen to do this.) Also introduce assembly 457*b0563631STom Van Eyck implementations for 32- and 64-bit Arm and for x86 and x86-64, which are 458*b0563631STom Van Eyck guaranteed not to use conditional instructions. 459*b0563631STom Van Eyck * Fix definition of MBEDTLS_MD_MAX_BLOCK_SIZE, which was too 460*b0563631STom Van Eyck small when MBEDTLS_SHA384_C was defined and MBEDTLS_SHA512_C was 461*b0563631STom Van Eyck undefined. Mbed TLS itself was unaffected by this, but user code 462*b0563631STom Van Eyck which used MBEDTLS_MD_MAX_BLOCK_SIZE could be affected. The only 463*b0563631STom Van Eyck release containing this bug was Mbed TLS 3.4.0. 464*b0563631STom Van Eyck * Fix a buffer overread when parsing short TLS application data records in 465*b0563631STom Van Eyck null-cipher cipher suites. Credit to OSS-Fuzz. 466*b0563631STom Van Eyck * Fix a remotely exploitable heap buffer overflow in TLS handshake parsing. 467*b0563631STom Van Eyck In TLS 1.3, all configurations are affected except PSK-only ones, and 468*b0563631STom Van Eyck both clients and servers are affected. 469*b0563631STom Van Eyck In TLS 1.2, the affected configurations are those with 470*b0563631STom Van Eyck MBEDTLS_USE_PSA_CRYPTO and ECDH enabled but DHM and RSA disabled, 471*b0563631STom Van Eyck and only servers are affected, not clients. 472*b0563631STom Van Eyck Credit to OSS-Fuzz. 473*b0563631STom Van Eyck 474*b0563631STom Van EyckBugfix 475*b0563631STom Van Eyck * Fix proper sizing for PSA_EXPORT_[KEY_PAIR/PUBLIC_KEY]_MAX_SIZE and 476*b0563631STom Van Eyck PSA_SIGNATURE_MAX_SIZE buffers when at least one accelerated EC is bigger 477*b0563631STom Van Eyck than all built-in ones and RSA is disabled. 478*b0563631STom Van Eyck Resolves #6622. 479*b0563631STom Van Eyck * Add missing md.h includes to some of the external programs from 480*b0563631STom Van Eyck the programs directory. Without this, even though the configuration 481*b0563631STom Van Eyck was sufficient for a particular program to work, it would only print 482*b0563631STom Van Eyck a message that one of the required defines is missing. 483*b0563631STom Van Eyck * Fix declaration of mbedtls_ecdsa_sign_det_restartable() function 484*b0563631STom Van Eyck in the ecdsa.h header file. There was a build warning when the 485*b0563631STom Van Eyck configuration macro MBEDTLS_ECDSA_SIGN_ALT was defined. 486*b0563631STom Van Eyck Resolves #7407. 487*b0563631STom Van Eyck * Fix an error when MBEDTLS_ECDSA_SIGN_ALT is defined but not 488*b0563631STom Van Eyck MBEDTLS_ECDSA_VERIFY_ALT, causing ecdsa verify to fail. Fixes #7498. 489*b0563631STom Van Eyck * Fix missing PSA initialization in sample programs when 490*b0563631STom Van Eyck MBEDTLS_USE_PSA_CRYPTO is enabled. 491*b0563631STom Van Eyck * Fix the J-PAKE driver interface for user and peer to accept any values 492*b0563631STom Van Eyck (previously accepted values were limited to "client" or "server"). 493*b0563631STom Van Eyck * Fix clang and armclang compilation error when targeting certain Arm 494*b0563631STom Van Eyck M-class CPUs (Cortex-M0, Cortex-M0+, Cortex-M1, Cortex-M23, 495*b0563631STom Van Eyck SecurCore SC000). Fixes #1077. 496*b0563631STom Van Eyck * Fix "unterminated '#pragma clang attribute push'" in sha256/sha512.c when 497*b0563631STom Van Eyck built with MBEDTLS_SHAxxx_USE_A64_CRYPTO_IF_PRESENT but don't have a 498*b0563631STom Van Eyck way to detect the crypto extensions required. A warning is still issued. 499*b0563631STom Van Eyck * Fixed an issue that caused compile errors when using CMake and the IAR 500*b0563631STom Van Eyck toolchain. 501*b0563631STom Van Eyck * Fix very high stack usage in SSL debug code. Reported by Maximilian 502*b0563631STom Van Eyck Gerhardt in #7804. 503*b0563631STom Van Eyck * Fix a compilation failure in the constant_time module when 504*b0563631STom Van Eyck building for arm64_32 (e.g., for watchos). Reported by Paulo 505*b0563631STom Van Eyck Coutinho in #7787. 506*b0563631STom Van Eyck * Fix crypt_and_hash decryption fail when used with a stream cipher 507*b0563631STom Van Eyck mode of operation due to the input not being multiple of block size. 508*b0563631STom Van Eyck Resolves #7417. 509*b0563631STom Van Eyck * Fix a bug in which mbedtls_x509_string_to_names() would return success 510*b0563631STom Van Eyck when given a invalid name string if it did not contain '=' or ','. 511*b0563631STom Van Eyck * Fix compilation warnings in aes.c, which prevented the 512*b0563631STom Van Eyck example TF-M configuration in configs/ from building cleanly: 513*b0563631STom Van Eyck tfm_mbedcrypto_config_profile_medium.h with 514*b0563631STom Van Eyck crypto_config_profile_medium.h. 515*b0563631STom Van Eyck * In TLS 1.3, fix handshake failure when a client in its ClientHello 516*b0563631STom Van Eyck proposes an handshake based on PSK only key exchange mode or at least 517*b0563631STom Van Eyck one of the key exchange modes using ephemeral keys to a server that 518*b0563631STom Van Eyck supports only the PSK key exchange mode. 519*b0563631STom Van Eyck * Fix CCM* with no tag being not supported in a build with CCM as the only 520*b0563631STom Van Eyck symmetric encryption algorithm and the PSA configuration enabled. 521*b0563631STom Van Eyck * Fix the build with MBEDTLS_PSA_INJECT_ENTROPY. Fixes #7516. 522*b0563631STom Van Eyck * Fix a compilation error on some platforms when including mbedtls/ssl.h 523*b0563631STom Van Eyck with all TLS support disabled. Fixes #6628. 524*b0563631STom Van Eyck * Fix x509 certificate generation to conform to RFC 5480 / RFC 5758 when 525*b0563631STom Van Eyck using ECC key. The certificate was rejected by some crypto frameworks. 526*b0563631STom Van Eyck Fixes #2924. 527*b0563631STom Van Eyck * Fix a potential corruption of the passed-in IV when mbedtls_aes_crypt_cbc() 528*b0563631STom Van Eyck is called with zero length and padlock is not enabled. 529*b0563631STom Van Eyck * Fix compile failure due to empty enum in cipher_wrap.c, when building 530*b0563631STom Van Eyck with a very minimal configuration. Fixes #7625. 531*b0563631STom Van Eyck * Fix some cases where mbedtls_mpi_mod_exp, RSA key construction or ECDSA 532*b0563631STom Van Eyck signature can silently return an incorrect result in low memory conditions. 533*b0563631STom Van Eyck * Don't try to include MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE when 534*b0563631STom Van Eyck MBEDTLS_PSA_CRYPTO_CONFIG is disabled. 535*b0563631STom Van Eyck * Fix IAR compiler warnings. 536*b0563631STom Van Eyck * Fix an issue when parsing an otherName subject alternative name into a 537*b0563631STom Van Eyck mbedtls_x509_san_other_name struct. The type-id of the otherName was not 538*b0563631STom Van Eyck copied to the struct. This meant that the struct had incomplete 539*b0563631STom Van Eyck information about the otherName SAN and contained uninitialized memory. 540*b0563631STom Van Eyck * Fix the detection of HardwareModuleName otherName SANs. These were being 541*b0563631STom Van Eyck detected by comparing the wrong field and the check was erroneously 542*b0563631STom Van Eyck inverted. 543*b0563631STom Van Eyck * Fix a build error in some configurations with MBEDTLS_PSA_CRYPTO_CONFIG 544*b0563631STom Van Eyck enabled, where some low-level modules required by requested PSA crypto 545*b0563631STom Van Eyck features were not getting automatically enabled. Fixes #7420. 546*b0563631STom Van Eyck * Fix undefined symbols in some builds using TLS 1.3 with a custom 547*b0563631STom Van Eyck configuration file. 548*b0563631STom Van Eyck * Fix log level for the got supported group message. Fixes #6765 549*b0563631STom Van Eyck * Functions in the ssl_cache module now return a negative MBEDTLS_ERR_xxx 550*b0563631STom Van Eyck error code on failure. Before, they returned 1 to indicate failure in 551*b0563631STom Van Eyck some cases involving a missing entry or a full cache. 552*b0563631STom Van Eyck * mbedtls_pk_parse_key() now rejects trailing garbage in encrypted keys. 553*b0563631STom Van Eyck * Fix the build with CMake when Everest or P256-m is enabled through 554*b0563631STom Van Eyck a user configuration file or the compiler command line. Fixes #8165. 555*b0563631STom Van Eyck 556*b0563631STom Van EyckChanges 557*b0563631STom Van Eyck * Enable Arm / Thumb bignum assembly for most Arm platforms when 558*b0563631STom Van Eyck compiling with gcc, clang or armclang and -O0. 559*b0563631STom Van Eyck * Enforce minimum RSA key size when generating a key 560*b0563631STom Van Eyck to avoid accidental misuse. 561*b0563631STom Van Eyck * Use heap memory to allocate DER encoded RSA private key. 562*b0563631STom Van Eyck This reduces stack usage significantly for RSA signature 563*b0563631STom Van Eyck operations when MBEDTLS_PSA_CRYPTO_C is defined. 564*b0563631STom Van Eyck * Update Windows code to use BCryptGenRandom and wcslen, and 565*b0563631STom Van Eyck ensure that conversions between size_t, ULONG, and int are 566*b0563631STom Van Eyck always done safely. Original contribution by Kevin Kane #635, #730 567*b0563631STom Van Eyck followed by Simon Butcher #1453. 568*b0563631STom Van Eyck * Users integrating their own PSA drivers should be aware that 569*b0563631STom Van Eyck the file library/psa_crypto_driver_wrappers.c has been renamed 570*b0563631STom Van Eyck to psa_crypto_driver_wrappers_no_static.c. 571*b0563631STom Van Eyck * When using CBC with the cipher module, the requirement to call 572*b0563631STom Van Eyck mbedtls_cipher_set_padding_mode() is now enforced. Previously, omitting 573*b0563631STom Van Eyck this call accidentally applied a default padding mode chosen at compile 574*b0563631STom Van Eyck time. 575*b0563631STom Van Eyck 576*b0563631STom Van Eyck= Mbed TLS 3.4.1 branch released 2023-08-04 577*b0563631STom Van Eyck 578*b0563631STom Van EyckBugfix 579*b0563631STom Van Eyck * Fix builds on Windows with clang 580*b0563631STom Van Eyck 581*b0563631STom Van EyckChanges 582*b0563631STom Van Eyck * Update test data to avoid failures of unit tests after 2023-08-07. 583*b0563631STom Van Eyck 58432b31808SJens Wiklander= Mbed TLS 3.4.0 branch released 2023-03-28 58532b31808SJens Wiklander 58632b31808SJens WiklanderDefault behavior changes 58732b31808SJens Wiklander * The default priority order of TLS 1.3 cipher suites has been modified to 58832b31808SJens Wiklander follow the same rules as the TLS 1.2 cipher suites (see 58932b31808SJens Wiklander ssl_ciphersuites.c). The preferred cipher suite is now 59032b31808SJens Wiklander TLS_CHACHA20_POLY1305_SHA256. 59132b31808SJens Wiklander 59232b31808SJens WiklanderNew deprecations 59332b31808SJens Wiklander * mbedtls_x509write_crt_set_serial() is now being deprecated in favor of 59432b31808SJens Wiklander mbedtls_x509write_crt_set_serial_raw(). The goal here is to remove any 59532b31808SJens Wiklander direct dependency of X509 on BIGNUM_C. 59632b31808SJens Wiklander * PSA to mbedtls error translation is now unified in psa_util.h, 59732b31808SJens Wiklander deprecating mbedtls_md_error_from_psa. Each file that performs error 59832b31808SJens Wiklander translation should define its own version of PSA_TO_MBEDTLS_ERR, 59932b31808SJens Wiklander optionally providing file-specific error pairs. Please see psa_util.h for 60032b31808SJens Wiklander more details. 60132b31808SJens Wiklander 60232b31808SJens WiklanderFeatures 60332b31808SJens Wiklander * Added partial support for parsing the PKCS #7 Cryptographic Message 60432b31808SJens Wiklander Syntax, as defined in RFC 2315. Currently, support is limited to the 60532b31808SJens Wiklander following: 60632b31808SJens Wiklander - Only the signed-data content type, version 1 is supported. 60732b31808SJens Wiklander - Only DER encoding is supported. 60832b31808SJens Wiklander - Only a single digest algorithm per message is supported. 60932b31808SJens Wiklander - Certificates must be in X.509 format. A message must have either 0 61032b31808SJens Wiklander or 1 certificates. 61132b31808SJens Wiklander - There is no support for certificate revocation lists. 61232b31808SJens Wiklander - The authenticated and unauthenticated attribute fields of SignerInfo 61332b31808SJens Wiklander must be empty. 61432b31808SJens Wiklander Many thanks to Daniel Axtens, Nayna Jain, and Nick Child from IBM for 61532b31808SJens Wiklander contributing this feature, and to Demi-Marie Obenour for contributing 61632b31808SJens Wiklander various improvements, tests and bug fixes. 61732b31808SJens Wiklander * General performance improvements by accessing multiple bytes at a time. 61832b31808SJens Wiklander Fixes #1666. 61932b31808SJens Wiklander * Improvements to use of unaligned and byte-swapped memory, reducing code 62032b31808SJens Wiklander size and improving performance (depending on compiler and target 62132b31808SJens Wiklander architecture). 62232b31808SJens Wiklander * Add support for reading points in compressed format 62332b31808SJens Wiklander (MBEDTLS_ECP_PF_COMPRESSED) with mbedtls_ecp_point_read_binary() 62432b31808SJens Wiklander (and callers) for Short Weierstrass curves with prime p where p = 3 mod 4 62532b31808SJens Wiklander (all mbedtls MBEDTLS_ECP_DP_SECP* and MBEDTLS_ECP_DP_BP* curves 62632b31808SJens Wiklander except MBEDTLS_ECP_DP_SECP224R1 and MBEDTLS_ECP_DP_SECP224K1) 62732b31808SJens Wiklander * SHA224_C/SHA384_C are now independent from SHA384_C/SHA512_C respectively. 62832b31808SJens Wiklander This helps in saving code size when some of the above hashes are not 62932b31808SJens Wiklander required. 63032b31808SJens Wiklander * Add parsing of V3 extensions (key usage, Netscape cert-type, 63132b31808SJens Wiklander Subject Alternative Names) in x509 Certificate Sign Requests. 63232b31808SJens Wiklander * Use HOSTCC (if it is set) when compiling C code during generation of the 63332b31808SJens Wiklander configuration-independent files. This allows them to be generated when 63432b31808SJens Wiklander CC is set for cross compilation. 63532b31808SJens Wiklander * Add parsing of uniformResourceIdentifier subtype for subjectAltName 63632b31808SJens Wiklander extension in x509 certificates. 63732b31808SJens Wiklander * Add an interruptible version of sign and verify hash to the PSA interface, 63832b31808SJens Wiklander backed by internal library support for ECDSA signing and verification. 63932b31808SJens Wiklander * Add parsing of rfc822Name subtype for subjectAltName 64032b31808SJens Wiklander extension in x509 certificates. 64132b31808SJens Wiklander * The configuration macros MBEDTLS_PSA_CRYPTO_PLATFORM_FILE and 64232b31808SJens Wiklander MBEDTLS_PSA_CRYPTO_STRUCT_FILE specify alternative locations for 64332b31808SJens Wiklander the headers "psa/crypto_platform.h" and "psa/crypto_struct.h". 64432b31808SJens Wiklander * When a PSA driver for ECDSA is present, it is now possible to disable 64532b31808SJens Wiklander MBEDTLS_ECDSA_C in the build in order to save code size. For PK, X.509 64632b31808SJens Wiklander and TLS to fully work, this requires MBEDTLS_USE_PSA_CRYPTO to be enabled. 64732b31808SJens Wiklander Restartable/interruptible ECDSA operations in PK, X.509 and TLS are not 64832b31808SJens Wiklander supported in those builds yet, as driver support for interruptible ECDSA 64932b31808SJens Wiklander operations is not present yet. 65032b31808SJens Wiklander * Add a driver dispatch layer for EC J-PAKE, enabling alternative 65132b31808SJens Wiklander implementations of EC J-PAKE through the driver entry points. 65232b31808SJens Wiklander * Add new API mbedtls_ssl_cache_remove for cache entry removal by 65332b31808SJens Wiklander its session id. 65432b31808SJens Wiklander * Add support to include the SubjectAltName extension to a CSR. 65532b31808SJens Wiklander * Add support for AES with the Armv8-A Cryptographic Extension on 65632b31808SJens Wiklander 64-bit Arm. A new configuration option, MBEDTLS_AESCE_C, can 65732b31808SJens Wiklander be used to enable this feature. Run-time detection is supported 65832b31808SJens Wiklander under Linux only. 65932b31808SJens Wiklander * When a PSA driver for EC J-PAKE is present, it is now possible to disable 66032b31808SJens Wiklander MBEDTLS_ECJPAKE_C in the build in order to save code size. For the 66132b31808SJens Wiklander corresponding TLS 1.2 key exchange to work, MBEDTLS_USE_PSA_CRYPTO needs 66232b31808SJens Wiklander to be enabled. 66332b31808SJens Wiklander * Add functions mbedtls_rsa_get_padding_mode() and mbedtls_rsa_get_md_alg() 66432b31808SJens Wiklander to read non-public fields for padding mode and hash id from 66532b31808SJens Wiklander an mbedtls_rsa_context, as requested in #6917. 66632b31808SJens Wiklander * AES-NI is now supported with Visual Studio. 66732b31808SJens Wiklander * AES-NI is now supported in 32-bit builds, or when MBEDTLS_HAVE_ASM 66832b31808SJens Wiklander is disabled, when compiling with GCC or Clang or a compatible compiler 66932b31808SJens Wiklander for a target CPU that supports the requisite instructions (for example 67032b31808SJens Wiklander gcc -m32 -msse2 -maes -mpclmul). (Generic x86 builds with GCC-like 67132b31808SJens Wiklander compilers still require MBEDTLS_HAVE_ASM and a 64-bit target.) 67232b31808SJens Wiklander * It is now possible to use a PSA-held (opaque) password with the TLS 1.2 67332b31808SJens Wiklander ECJPAKE key exchange, using the new API function 67432b31808SJens Wiklander mbedtls_ssl_set_hs_ecjpake_password_opaque(). 67532b31808SJens Wiklander 67632b31808SJens WiklanderSecurity 67732b31808SJens Wiklander * Use platform-provided secure zeroization function where possible, such as 67832b31808SJens Wiklander explicit_bzero(). 67932b31808SJens Wiklander * Zeroize SSL cache entries when they are freed. 68032b31808SJens Wiklander * Fix a potential heap buffer overread in TLS 1.3 client-side when 68132b31808SJens Wiklander MBEDTLS_DEBUG_C is enabled. This may result in an application crash. 68232b31808SJens Wiklander * Add support for AES with the Armv8-A Cryptographic Extension on 64-bit 68332b31808SJens Wiklander Arm, so that these systems are no longer vulnerable to timing side-channel 68432b31808SJens Wiklander attacks. This is configured by MBEDTLS_AESCE_C, which is on by default. 68532b31808SJens Wiklander Reported by Demi Marie Obenour. 68632b31808SJens Wiklander * MBEDTLS_AESNI_C, which is enabled by default, was silently ignored on 68732b31808SJens Wiklander builds that couldn't compile the GCC-style assembly implementation 68832b31808SJens Wiklander (most notably builds with Visual Studio), leaving them vulnerable to 68932b31808SJens Wiklander timing side-channel attacks. There is now an intrinsics-based AES-NI 69032b31808SJens Wiklander implementation as a fallback for when the assembly one cannot be used. 69132b31808SJens Wiklander 69232b31808SJens WiklanderBugfix 69332b31808SJens Wiklander * Fix possible integer overflow in mbedtls_timing_hardclock(), which 69432b31808SJens Wiklander could cause a crash in programs/test/benchmark. 69532b31808SJens Wiklander * Fix IAR compiler warnings. Fixes #6924. 69632b31808SJens Wiklander * Fix a bug in the build where directory names containing spaces were 69732b31808SJens Wiklander causing generate_errors.pl to error out resulting in a build failure. 69832b31808SJens Wiklander Fixes issue #6879. 69932b31808SJens Wiklander * In TLS 1.3, when using a ticket for session resumption, tweak its age 70032b31808SJens Wiklander calculation on the client side. It prevents a server with more accurate 70132b31808SJens Wiklander ticket timestamps (typically timestamps in milliseconds) compared to the 70232b31808SJens Wiklander Mbed TLS ticket timestamps (in seconds) to compute a ticket age smaller 70332b31808SJens Wiklander than the age computed and transmitted by the client and thus potentially 70432b31808SJens Wiklander reject the ticket. Fix #6623. 70532b31808SJens Wiklander * Fix compile error where MBEDTLS_RSA_C and MBEDTLS_X509_CRT_WRITE_C are 70632b31808SJens Wiklander defined, but MBEDTLS_PK_RSA_ALT_SUPPORT is not defined. Fixes #3174. 70732b31808SJens Wiklander * List PSA_WANT_ALG_CCM_STAR_NO_TAG in psa/crypto_config.h so that it can 70832b31808SJens Wiklander be toggled with config.py. 70932b31808SJens Wiklander * The key derivation algorithm PSA_ALG_TLS12_ECJPAKE_TO_PMS cannot be 71032b31808SJens Wiklander used on a shared secret from a key agreement since its input must be 71132b31808SJens Wiklander an ECC public key. Reject this properly. 71232b31808SJens Wiklander * mbedtls_x509write_crt_set_serial() now explicitly rejects serial numbers 71332b31808SJens Wiklander whose binary representation is longer than 20 bytes. This was already 71432b31808SJens Wiklander forbidden by the standard (RFC5280 - section 4.1.2.2) and now it's being 71532b31808SJens Wiklander enforced also at code level. 71632b31808SJens Wiklander * Fix potential undefined behavior in mbedtls_mpi_sub_abs(). Reported by 71732b31808SJens Wiklander Pascal Cuoq using TrustInSoft Analyzer in #6701; observed independently by 71832b31808SJens Wiklander Aaron Ucko under Valgrind. 71932b31808SJens Wiklander * Fix behavior of certain sample programs which could, when run with no 72032b31808SJens Wiklander arguments, access uninitialized memory in some cases. Fixes #6700 (which 72132b31808SJens Wiklander was found by TrustInSoft Analyzer during REDOCS'22) and #1120. 72232b31808SJens Wiklander * Fix parsing of X.509 SubjectAlternativeName extension. Previously, 72332b31808SJens Wiklander malformed alternative name components were not caught during initial 72432b31808SJens Wiklander certificate parsing, but only on subsequent calls to 72532b31808SJens Wiklander mbedtls_x509_parse_subject_alt_name(). Fixes #2838. 72632b31808SJens Wiklander * Make the fields of mbedtls_pk_rsassa_pss_options public. This makes it 72732b31808SJens Wiklander possible to verify RSA PSS signatures with the pk module, which was 72832b31808SJens Wiklander inadvertently broken since Mbed TLS 3.0. 72932b31808SJens Wiklander * Fix bug in conversion from OID to string in 73032b31808SJens Wiklander mbedtls_oid_get_numeric_string(). OIDs such as 2.40.0.25 are now printed 73132b31808SJens Wiklander correctly. 73232b31808SJens Wiklander * Reject OIDs with overlong-encoded subidentifiers when converting 73332b31808SJens Wiklander them to a string. 73432b31808SJens Wiklander * Reject OIDs with subidentifier values exceeding UINT_MAX. Such 73532b31808SJens Wiklander subidentifiers can be valid, but Mbed TLS cannot currently handle them. 73632b31808SJens Wiklander * Reject OIDs that have unterminated subidentifiers, or (equivalently) 73732b31808SJens Wiklander have the most-significant bit set in their last byte. 73832b31808SJens Wiklander * Silence warnings from clang -Wdocumentation about empty \retval 73932b31808SJens Wiklander descriptions, which started appearing with Clang 15. Fixes #6960. 74032b31808SJens Wiklander * Fix the handling of renegotiation attempts in TLS 1.3. They are now 74132b31808SJens Wiklander systematically rejected. 74232b31808SJens Wiklander * Fix an unused-variable warning in TLS 1.3-only builds if 74332b31808SJens Wiklander MBEDTLS_SSL_RENEGOTIATION was enabled. Fixes #6200. 74432b31808SJens Wiklander * Fix undefined behavior in mbedtls_ssl_read() and mbedtls_ssl_write() if 74532b31808SJens Wiklander len argument is 0 and buffer is NULL. 74632b31808SJens Wiklander * Allow setting user and peer identifiers for EC J-PAKE operation 74732b31808SJens Wiklander instead of role in PAKE PSA Crypto API as described in the specification. 74832b31808SJens Wiklander This is a partial fix that allows only "client" and "server" identifiers. 74932b31808SJens Wiklander * Fix a compilation error when PSA Crypto is built with support for 75032b31808SJens Wiklander TLS12_PRF but not TLS12_PSK_TO_MS. Reported by joerchan in #7125. 75132b31808SJens Wiklander * In the TLS 1.3 server, select the preferred client cipher suite, not the 75232b31808SJens Wiklander least preferred. The selection error was introduced in Mbed TLS 3.3.0. 75332b31808SJens Wiklander * Fix TLS 1.3 session resumption when the established pre-shared key is 75432b31808SJens Wiklander 384 bits long. That is the length of pre-shared keys created under a 75532b31808SJens Wiklander session where the cipher suite is TLS_AES_256_GCM_SHA384. 75632b31808SJens Wiklander * Fix an issue when compiling with MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT 75732b31808SJens Wiklander enabled, which required specifying compiler flags enabling SHA3 Crypto 75832b31808SJens Wiklander Extensions, where some compilers would emit EOR3 instructions in other 75932b31808SJens Wiklander modules, which would then fail if run on a CPU without the SHA3 76032b31808SJens Wiklander extensions. Fixes #5758. 76132b31808SJens Wiklander 76232b31808SJens WiklanderChanges 76332b31808SJens Wiklander * Install the .cmake files into CMAKE_INSTALL_LIBDIR/cmake/MbedTLS, 76432b31808SJens Wiklander typically /usr/lib/cmake/MbedTLS. 76532b31808SJens Wiklander * Mixed-endian systems are explicitly not supported any more. 76632b31808SJens Wiklander * When MBEDTLS_USE_PSA_CRYPTO and MBEDTLS_ECDSA_DETERMINISTIC are both 76732b31808SJens Wiklander defined, mbedtls_pk_sign() now use deterministic ECDSA for ECDSA 76832b31808SJens Wiklander signatures. This aligns the behaviour with MBEDTLS_USE_PSA_CRYPTO to 76932b31808SJens Wiklander the behaviour without it, where deterministic ECDSA was already used. 77032b31808SJens Wiklander * Visual Studio: Rename the directory containing Visual Studio files from 77132b31808SJens Wiklander visualc/VS2010 to visualc/VS2013 as we do not support building with versions 77232b31808SJens Wiklander older than 2013. Update the solution file to specify VS2013 as a minimum. 77332b31808SJens Wiklander * programs/x509/cert_write: 77432b31808SJens Wiklander - now it accepts the serial number in 2 different formats: decimal and 77532b31808SJens Wiklander hex. They cannot be used simultaneously 77632b31808SJens Wiklander - "serial" is used for the decimal format and it's limted in size to 77732b31808SJens Wiklander unsigned long long int 77832b31808SJens Wiklander - "serial_hex" is used for the hex format; max length here is 77932b31808SJens Wiklander MBEDTLS_X509_RFC5280_MAX_SERIAL_LEN*2 78032b31808SJens Wiklander * The C code follows a new coding style. This is transparent for users but 78132b31808SJens Wiklander affects contributors and maintainers of local patches. For more 78232b31808SJens Wiklander information, see 78332b31808SJens Wiklander https://mbed-tls.readthedocs.io/en/latest/kb/how-to/rewrite-branch-for-coding-style/ 78432b31808SJens Wiklander * Changed the default MBEDTLS_ECP_WINDOW_SIZE from 6 to 2. 78532b31808SJens Wiklander As tested in issue 6790, the correlation between this define and 78632b31808SJens Wiklander RSA decryption performance has changed lately due to security fixes. 78732b31808SJens Wiklander To fix the performance degradation when using default values the 78832b31808SJens Wiklander window was reduced from 6 to 2, a value that gives the best or close 78932b31808SJens Wiklander to best results when tested on Cortex-M4 and Intel i7. 79032b31808SJens Wiklander * When enabling MBEDTLS_SHA256_USE_A64_CRYPTO_* or 79132b31808SJens Wiklander MBEDTLS_SHA512_USE_A64_CRYPTO_*, it is no longer necessary to specify 79232b31808SJens Wiklander compiler target flags on the command line; the library now sets target 79332b31808SJens Wiklander options within the appropriate modules. 79432b31808SJens Wiklander 79532b31808SJens Wiklander= Mbed TLS 3.3.0 branch released 2022-12-14 79632b31808SJens Wiklander 79732b31808SJens WiklanderDefault behavior changes 79832b31808SJens Wiklander * Previously the macro MBEDTLS_SSL_DTLS_CONNECTION_ID implemented version 05 79932b31808SJens Wiklander of the IETF draft, and was marked experimental and disabled by default. 80032b31808SJens Wiklander It is now no longer experimental, and implements the final version from 80132b31808SJens Wiklander RFC 9146, which is not interoperable with the draft-05 version. 80232b31808SJens Wiklander If you need to communicate with peers that use earlier versions of 80332b31808SJens Wiklander Mbed TLS, then you need to define MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT 80432b31808SJens Wiklander to 1, but then you won't be able to communicate with peers that use the 80532b31808SJens Wiklander standard (non-draft) version. 80632b31808SJens Wiklander If you need to interoperate with both classes of peers with the 80732b31808SJens Wiklander same build of Mbed TLS, please let us know about your situation on the 80832b31808SJens Wiklander mailing list or GitHub. 80932b31808SJens Wiklander 81032b31808SJens WiklanderRequirement changes 81132b31808SJens Wiklander * When building with PSA drivers using generate_driver_wrappers.py, or 81232b31808SJens Wiklander when building the library from the development branch rather than 81332b31808SJens Wiklander from a release, the Python module jsonschema is now necessary, in 81432b31808SJens Wiklander addition to jinja2. The official list of required Python modules is 81532b31808SJens Wiklander maintained in scripts/basic.requirements.txt and may change again 81632b31808SJens Wiklander in the future. 81732b31808SJens Wiklander 81832b31808SJens WiklanderNew deprecations 81932b31808SJens Wiklander * Deprecate mbedtls_asn1_free_named_data(). 82032b31808SJens Wiklander Use mbedtls_asn1_free_named_data_list() 82132b31808SJens Wiklander or mbedtls_asn1_free_named_data_list_shallow(). 82232b31808SJens Wiklander 82332b31808SJens WiklanderFeatures 82432b31808SJens Wiklander * Support rsa_pss_rsae_* signature algorithms in TLS 1.2. 82532b31808SJens Wiklander * make: enable building unversioned shared library, with e.g.: 82632b31808SJens Wiklander "SHARED=1 SOEXT_TLS=so SOEXT_X509=so SOEXT_CRYPTO=so make lib" 82732b31808SJens Wiklander resulting in library names like "libmbedtls.so" rather than 82832b31808SJens Wiklander "libmbedcrypto.so.11". 82932b31808SJens Wiklander * Expose the EC J-PAKE functionality through the Draft PSA PAKE Crypto API. 83032b31808SJens Wiklander Only the ECC primitive with secp256r1 curve and SHA-256 hash algorithm 83132b31808SJens Wiklander are supported in this implementation. 83232b31808SJens Wiklander * Some modules can now use PSA drivers for hashes, including with no 83332b31808SJens Wiklander built-in implementation present, but only in some configurations. 83432b31808SJens Wiklander - RSA OAEP and PSS (PKCS#1 v2.1), PKCS5, PKCS12 and EC J-PAKE now use 83532b31808SJens Wiklander hashes from PSA when (and only when) MBEDTLS_MD_C is disabled. 83632b31808SJens Wiklander - PEM parsing of encrypted files now uses MD-5 from PSA when (and only 83732b31808SJens Wiklander when) MBEDTLS_MD5_C is disabled. 83832b31808SJens Wiklander See the documentation of the corresponding macros in mbedtls_config.h for 83932b31808SJens Wiklander details. 84032b31808SJens Wiklander Note that some modules are not able to use hashes from PSA yet, including 84132b31808SJens Wiklander the entropy module. As a consequence, for now the only way to build with 84232b31808SJens Wiklander all hashes only provided by drivers (no built-in hash) is to use 84332b31808SJens Wiklander MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG. 84432b31808SJens Wiklander * When MBEDTLS_USE_PSA_CRYPTO is enabled, X.509, TLS 1.2 and TLS 1.3 now 84532b31808SJens Wiklander properly negotiate/accept hashes based on their availability in PSA. 84632b31808SJens Wiklander As a consequence, they now work in configurations where the built-in 84732b31808SJens Wiklander implementations of (some) hashes are excluded and those hashes are only 84832b31808SJens Wiklander provided by PSA drivers. (See previous entry for limitation on RSA-PSS 84932b31808SJens Wiklander though: that module only use hashes from PSA when MBEDTLS_MD_C is off). 85032b31808SJens Wiklander * Add support for opaque keys as the private keys associated to certificates 85132b31808SJens Wiklander for authentication in TLS 1.3. 85232b31808SJens Wiklander * Add the LMS post-quantum-safe stateful-hash asymmetric signature scheme. 85332b31808SJens Wiklander Signature verification is production-ready, but generation is for testing 85432b31808SJens Wiklander purposes only. This currently only supports one parameter set 85532b31808SJens Wiklander (LMS_SHA256_M32_H10), meaning that each private key can be used to sign 85632b31808SJens Wiklander 1024 messages. As such, it is not intended for use in TLS, but instead 85732b31808SJens Wiklander for verification of assets transmitted over an insecure channel, 85832b31808SJens Wiklander particularly firmware images. 85932b31808SJens Wiklander * Add the LM-OTS post-quantum-safe one-time signature scheme, which is 86032b31808SJens Wiklander required for LMS. This can be used independently, but each key can only 86132b31808SJens Wiklander be used to sign one message so is impractical for most circumstances. 86232b31808SJens Wiklander * Mbed TLS now supports TLS 1.3 key establishment via pre-shared keys. 86332b31808SJens Wiklander The pre-shared keys can be provisioned externally or via the ticket 86432b31808SJens Wiklander mechanism (session resumption). 86532b31808SJens Wiklander The ticket mechanism is supported when the configuration option 86632b31808SJens Wiklander MBEDTLS_SSL_SESSION_TICKETS is enabled. 86732b31808SJens Wiklander New options MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_xxx_ENABLED 86832b31808SJens Wiklander control the support for the three possible TLS 1.3 key exchange modes. 86932b31808SJens Wiklander * cert_write: support for setting extended key usage attributes. A 87032b31808SJens Wiklander corresponding new public API call has been added in the library, 87132b31808SJens Wiklander mbedtls_x509write_crt_set_ext_key_usage(). 87232b31808SJens Wiklander * cert_write: support for writing certificate files in either PEM 87332b31808SJens Wiklander or DER format. 87432b31808SJens Wiklander * The PSA driver wrapper generator generate_driver_wrappers.py now 87532b31808SJens Wiklander supports a subset of the driver description language, including 87632b31808SJens Wiklander the following entry points: import_key, export_key, export_public_key, 87732b31808SJens Wiklander get_builtin_key, copy_key. 87832b31808SJens Wiklander * The new functions mbedtls_asn1_free_named_data_list() and 87932b31808SJens Wiklander mbedtls_asn1_free_named_data_list_shallow() simplify the management 88032b31808SJens Wiklander of memory in named data lists in X.509 structures. 88132b31808SJens Wiklander * The TLS 1.2 EC J-PAKE key exchange can now use the PSA Crypto API. 88232b31808SJens Wiklander Additional PSA key slots will be allocated in the process of such key 88332b31808SJens Wiklander exchange for builds that enable MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED and 88432b31808SJens Wiklander MBEDTLS_USE_PSA_CRYPTO. 88532b31808SJens Wiklander * Add support for DTLS Connection ID as defined by RFC 9146, controlled by 88632b31808SJens Wiklander MBEDTLS_SSL_DTLS_CONNECTION_ID (enabled by default) and configured with 88732b31808SJens Wiklander mbedtls_ssl_set_cid(). 88832b31808SJens Wiklander * Add a driver dispatch layer for raw key agreement, enabling alternative 88932b31808SJens Wiklander implementations of raw key agreement through the key_agreement driver 89032b31808SJens Wiklander entry point. This entry point is specified in the proposed PSA driver 89132b31808SJens Wiklander interface, but had not yet been implemented. 89232b31808SJens Wiklander * Add an ad-hoc key derivation function handling EC J-PAKE to PMS 89332b31808SJens Wiklander calculation that can be used to derive the session secret in TLS 1.2, 89432b31808SJens Wiklander as described in draft-cragie-tls-ecjpake-01. This can be achieved by 89532b31808SJens Wiklander using PSA_ALG_TLS12_ECJPAKE_TO_PMS as the key derivation algorithm. 89632b31808SJens Wiklander 89732b31808SJens WiklanderSecurity 89832b31808SJens Wiklander * Fix potential heap buffer overread and overwrite in DTLS if 89932b31808SJens Wiklander MBEDTLS_SSL_DTLS_CONNECTION_ID is enabled and 90032b31808SJens Wiklander MBEDTLS_SSL_CID_IN_LEN_MAX > 2 * MBEDTLS_SSL_CID_OUT_LEN_MAX. 90132b31808SJens Wiklander * Fix an issue where an adversary with access to precise enough information 90232b31808SJens Wiklander about memory accesses (typically, an untrusted operating system attacking 90332b31808SJens Wiklander a secure enclave) could recover an RSA private key after observing the 90432b31808SJens Wiklander victim performing a single private-key operation if the window size used 90532b31808SJens Wiklander for the exponentiation was 3 or smaller. Found and reported by Zili KOU, 90632b31808SJens Wiklander Wenjian HE, Sharad Sinha, and Wei ZHANG. See "Cache Side-channel Attacks 90732b31808SJens Wiklander and Defenses of the Sliding Window Algorithm in TEEs" - Design, Automation 90832b31808SJens Wiklander and Test in Europe 2023. 90932b31808SJens Wiklander 91032b31808SJens WiklanderBugfix 91132b31808SJens Wiklander * Refactor mbedtls_aes_context to support shallow-copying. Fixes #2147. 91232b31808SJens Wiklander * Fix an issue with in-tree CMake builds in releases with GEN_FILES 91332b31808SJens Wiklander turned off: if a shipped file was missing from the working directory, 91432b31808SJens Wiklander it could be turned into a symbolic link to itself. 91532b31808SJens Wiklander * Fix a long-standing build failure when building x86 PIC code with old 91632b31808SJens Wiklander gcc (4.x). The code will be slower, but will compile. We do however 91732b31808SJens Wiklander recommend upgrading to a more recent compiler instead. Fixes #1910. 91832b31808SJens Wiklander * Fix support for little-endian Microblaze when MBEDTLS_HAVE_ASM is defined. 91932b31808SJens Wiklander Contributed by Kazuyuki Kimura to fix #2020. 92032b31808SJens Wiklander * Use double quotes to include private header file psa_crypto_cipher.h. 92132b31808SJens Wiklander Fixes 'file not found with <angled> include' error 92232b31808SJens Wiklander when building with Xcode. 92332b31808SJens Wiklander * Fix handling of broken symlinks when loading certificates using 92432b31808SJens Wiklander mbedtls_x509_crt_parse_path(). Instead of returning an error as soon as a 92532b31808SJens Wiklander broken link is encountered, skip the broken link and continue parsing 92632b31808SJens Wiklander other certificate files. Contributed by Eduardo Silva in #2602. 92732b31808SJens Wiklander * Fix an interoperability failure between an Mbed TLS client with both 92832b31808SJens Wiklander TLS 1.2 and TLS 1.3 support, and a TLS 1.2 server that supports 92932b31808SJens Wiklander rsa_pss_rsae_* signature algorithms. This failed because Mbed TLS 93032b31808SJens Wiklander advertised support for PSS in both TLS 1.2 and 1.3, but only 93132b31808SJens Wiklander actually supported PSS in TLS 1.3. 93232b31808SJens Wiklander * Fix a compilation error when using CMake with an IAR toolchain. 93332b31808SJens Wiklander Fixes #5964. 93432b31808SJens Wiklander * Fix a build error due to a missing prototype warning when 93532b31808SJens Wiklander MBEDTLS_DEPRECATED_REMOVED is enabled. 93632b31808SJens Wiklander * Fix mbedtls_ctr_drbg_free() on an initialized but unseeded context. When 93732b31808SJens Wiklander MBEDTLS_AES_ALT is enabled, it could call mbedtls_aes_free() on an 93832b31808SJens Wiklander uninitialized context. 93932b31808SJens Wiklander * Fix a build issue on Windows using CMake where the source and build 94032b31808SJens Wiklander directories could not be on different drives. Fixes #5751. 94132b31808SJens Wiklander * Fix bugs and missing dependencies when building and testing 94232b31808SJens Wiklander configurations with only one encryption type enabled in TLS 1.2. 94332b31808SJens Wiklander * Provide the missing definition of mbedtls_setbuf() in some configurations 94432b31808SJens Wiklander with MBEDTLS_PLATFORM_C disabled. Fixes #6118, #6196. 94532b31808SJens Wiklander * Fix compilation errors when trying to build with 94632b31808SJens Wiklander PSA drivers for AEAD (GCM, CCM, Chacha20-Poly1305). 94732b31808SJens Wiklander * Fix memory leak in ssl_parse_certificate_request() caused by 94832b31808SJens Wiklander mbedtls_x509_get_name() not freeing allocated objects in case of error. 94932b31808SJens Wiklander Change mbedtls_x509_get_name() to clean up allocated objects on error. 95032b31808SJens Wiklander * Fix build failure with MBEDTLS_RSA_C and MBEDTLS_PSA_CRYPTO_C but not 95132b31808SJens Wiklander MBEDTLS_USE_PSA_CRYPTO or MBEDTLS_PK_WRITE_C. Fixes #6408. 95232b31808SJens Wiklander * Fix build failure with MBEDTLS_RSA_C and MBEDTLS_PSA_CRYPTO_C but not 95332b31808SJens Wiklander MBEDTLS_PK_PARSE_C. Fixes #6409. 95432b31808SJens Wiklander * Fix ECDSA verification, where it was not always validating the 95532b31808SJens Wiklander public key. This bug meant that it was possible to verify a 95632b31808SJens Wiklander signature with an invalid public key, in some cases. Reported by 95732b31808SJens Wiklander Guido Vranken using Cryptofuzz in #4420. 95832b31808SJens Wiklander * Fix a possible null pointer dereference if a memory allocation fails 95932b31808SJens Wiklander in TLS PRF code. Reported by Michael Madsen in #6516. 96032b31808SJens Wiklander * Fix TLS 1.3 session resumption. Fixes #6488. 96132b31808SJens Wiklander * Add a configuration check to exclude optional client authentication 96232b31808SJens Wiklander in TLS 1.3 (where it is forbidden). 96332b31808SJens Wiklander * Fix a bug in which mbedtls_x509_crt_info() would produce non-printable 96432b31808SJens Wiklander bytes when parsing certificates containing a binary RFC 4108 96532b31808SJens Wiklander HardwareModuleName as a Subject Alternative Name extension. Hardware 96632b31808SJens Wiklander serial numbers are now rendered in hex format. Fixes #6262. 96732b31808SJens Wiklander * Fix bug in error reporting in dh_genprime.c where upon failure, 96832b31808SJens Wiklander the error code returned by mbedtls_mpi_write_file() is overwritten 96932b31808SJens Wiklander and therefore not printed. 97032b31808SJens Wiklander * In the bignum module, operations of the form (-A) - (+A) or (-A) - (-A) 97132b31808SJens Wiklander with A > 0 created an unintended representation of the value 0 which was 97232b31808SJens Wiklander not processed correctly by some bignum operations. Fix this. This had no 97332b31808SJens Wiklander consequence on cryptography code, but might affect applications that call 97432b31808SJens Wiklander bignum directly and use negative numbers. 97532b31808SJens Wiklander * Fix a bug whereby the list of signature algorithms sent as part of 97632b31808SJens Wiklander the TLS 1.2 server certificate request would get corrupted, meaning the 97732b31808SJens Wiklander first algorithm would not get sent and an entry consisting of two random 97832b31808SJens Wiklander bytes would be sent instead. Found by Serban Bejan and Dudek Sebastian. 97932b31808SJens Wiklander * Fix undefined behavior (typically harmless in practice) of 98032b31808SJens Wiklander mbedtls_mpi_add_mpi(), mbedtls_mpi_add_abs() and mbedtls_mpi_add_int() 98132b31808SJens Wiklander when both operands are 0 and the left operand is represented with 0 limbs. 98232b31808SJens Wiklander * Fix undefined behavior (typically harmless in practice) when some bignum 98332b31808SJens Wiklander functions receive the most negative value of mbedtls_mpi_sint. Credit 98432b31808SJens Wiklander to OSS-Fuzz. Fixes #6597. 98532b31808SJens Wiklander * Fix undefined behavior (typically harmless in practice) in PSA ECB 98632b31808SJens Wiklander encryption and decryption. 98732b31808SJens Wiklander * Move some SSL-specific code out of libmbedcrypto where it had been placed 98832b31808SJens Wiklander accidentally. 98932b31808SJens Wiklander * Fix a build error when compiling the bignum module for some Arm platforms. 99032b31808SJens Wiklander Fixes #6089, #6124, #6217. 99132b31808SJens Wiklander 99232b31808SJens WiklanderChanges 99332b31808SJens Wiklander * Add the ability to query PSA_WANT_xxx macros to query_compile_time_config. 99432b31808SJens Wiklander * Calling AEAD tag-specific functions for non-AEAD algorithms (which 99532b31808SJens Wiklander should not be done - they are documented for use only by AES-GCM and 99632b31808SJens Wiklander ChaCha20+Poly1305) now returns MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE 99732b31808SJens Wiklander instead of success (0). 99832b31808SJens Wiklander 99932b31808SJens Wiklander= Mbed TLS 3.2.1 branch released 2022-07-12 100032b31808SJens Wiklander 100132b31808SJens WiklanderBugfix 100232b31808SJens Wiklander * Re-add missing generated file library/psa_crypto_driver_wrappers.c 100332b31808SJens Wiklander 100432b31808SJens Wiklander= Mbed TLS 3.2.0 branch released 2022-07-11 1005039e02dfSJerome Forissier 1006039e02dfSJerome ForissierDefault behavior changes 1007039e02dfSJerome Forissier * mbedtls_cipher_set_iv will now fail with ChaCha20 and ChaCha20+Poly1305 1008039e02dfSJerome Forissier for IV lengths other than 12. The library was silently overwriting this 1009039e02dfSJerome Forissier length with 12, but did not inform the caller about it. Fixes #4301. 1010039e02dfSJerome Forissier 101132b31808SJens WiklanderRequirement changes 101232b31808SJens Wiklander * The library will no longer compile out of the box on a platform without 101332b31808SJens Wiklander setbuf(). If your platform does not have setbuf(), you can configure an 101432b31808SJens Wiklander alternative function by enabling MBEDTLS_PLATFORM_SETBUF_ALT or 101532b31808SJens Wiklander MBEDTLS_PLATFORM_SETBUF_MACRO. 101632b31808SJens Wiklander 101732b31808SJens WiklanderNew deprecations 101832b31808SJens Wiklander * Deprecate mbedtls_ssl_conf_max_version() and 101932b31808SJens Wiklander mbedtls_ssl_conf_min_version() in favor of 102032b31808SJens Wiklander mbedtls_ssl_conf_max_tls_version() and 102132b31808SJens Wiklander mbedtls_ssl_conf_min_tls_version(). 102232b31808SJens Wiklander * Deprecate mbedtls_cipher_setup_psa(). Use psa_aead_xxx() or 102332b31808SJens Wiklander psa_cipher_xxx() directly instead. 102432b31808SJens Wiklander * Secure element drivers enabled by MBEDTLS_PSA_CRYPTO_SE_C are deprecated. 102532b31808SJens Wiklander This was intended as an experimental feature, but had not been explicitly 102632b31808SJens Wiklander documented as such. Use opaque drivers with the interface enabled by 102732b31808SJens Wiklander MBEDTLS_PSA_CRYPTO_DRIVERS instead. 102832b31808SJens Wiklander * Deprecate mbedtls_ssl_conf_sig_hashes() in favor of the more generic 102932b31808SJens Wiklander mbedtls_ssl_conf_sig_algs(). Signature algorithms for the TLS 1.2 and 103032b31808SJens Wiklander TLS 1.3 handshake should now be configured with 103132b31808SJens Wiklander mbedtls_ssl_conf_sig_algs(). 103232b31808SJens Wiklander 1033039e02dfSJerome ForissierFeatures 103432b31808SJens Wiklander * Add accessor to obtain ciphersuite id from ssl context. 103532b31808SJens Wiklander * Add accessors to get members from ciphersuite info. 103632b31808SJens Wiklander * Add mbedtls_ssl_ticket_rotate() for external ticket rotation. 103732b31808SJens Wiklander * Add accessor to get the raw buffer pointer from a PEM context. 103832b31808SJens Wiklander * The structures mbedtls_ssl_config and mbedtls_ssl_context now store 103932b31808SJens Wiklander a piece of user data which is reserved for the application. The user 104032b31808SJens Wiklander data can be either a pointer or an integer. 104132b31808SJens Wiklander * Add an accessor function to get the configuration associated with 104232b31808SJens Wiklander an SSL context. 104332b31808SJens Wiklander * Add a function to access the protocol version from an SSL context in a 104432b31808SJens Wiklander form that's easy to compare. Fixes #5407. 104532b31808SJens Wiklander * Add function mbedtls_md_info_from_ctx() to recall the message digest 104632b31808SJens Wiklander information that was used to set up a message digest context. 104732b31808SJens Wiklander * Add ALPN support in TLS 1.3 clients. 104832b31808SJens Wiklander * Add server certificate selection callback near end of Client Hello. 104932b31808SJens Wiklander Register callback with mbedtls_ssl_conf_cert_cb(). 105032b31808SJens Wiklander * Provide mechanism to reset handshake cert list by calling 105132b31808SJens Wiklander mbedtls_ssl_set_hs_own_cert() with NULL value for own_cert param. 105232b31808SJens Wiklander * Add accessor mbedtls_ssl_get_hs_sni() to retrieve SNI from within 105332b31808SJens Wiklander cert callback (mbedtls_ssl_conf_cert_cb()) during handshake. 105432b31808SJens Wiklander * The X.509 module now uses PSA hash acceleration if present. 105532b31808SJens Wiklander * Add support for psa crypto key derivation for elliptic curve 105632b31808SJens Wiklander keys. Fixes #3260. 105732b31808SJens Wiklander * Add function mbedtls_timing_get_final_delay() to access the private 105832b31808SJens Wiklander final delay field in an mbedtls_timing_delay_context, as requested in 105932b31808SJens Wiklander #5183. 106032b31808SJens Wiklander * Add mbedtls_pk_sign_ext() which allows generating RSA-PSS signatures when 106132b31808SJens Wiklander PSA Crypto is enabled. 106232b31808SJens Wiklander * Add function mbedtls_ecp_export() to export ECP key pair parameters. 106332b31808SJens Wiklander Fixes #4838. 106432b31808SJens Wiklander * Add function mbedtls_ssl_is_handshake_over() to enable querying if the SSL 106532b31808SJens Wiklander Handshake has completed or not, and thus whether to continue calling 106632b31808SJens Wiklander mbedtls_ssl_handshake_step(), requested in #4383. 106732b31808SJens Wiklander * Add the function mbedtls_ssl_get_own_cid() to access our own connection id 106832b31808SJens Wiklander within mbedtls_ssl_context, as requested in #5184. 106932b31808SJens Wiklander * Introduce mbedtls_ssl_hs_cb_t typedef for use with 107032b31808SJens Wiklander mbedtls_ssl_conf_cert_cb() and perhaps future callbacks 107132b31808SJens Wiklander during TLS handshake. 107232b31808SJens Wiklander * Add functions mbedtls_ssl_conf_max_tls_version() and 107332b31808SJens Wiklander mbedtls_ssl_conf_min_tls_version() that use a single value to specify 107432b31808SJens Wiklander the protocol version. 107532b31808SJens Wiklander * Extend the existing PSA_ALG_TLS12_PSK_TO_MS() algorithm to support 107632b31808SJens Wiklander mixed-PSK. Add an optional input PSA_KEY_DERIVATION_INPUT_OTHER_SECRET 107732b31808SJens Wiklander holding the other secret. 1078039e02dfSJerome Forissier * When MBEDTLS_PSA_CRYPTO_CONFIG is enabled, you may list the PSA crypto 1079039e02dfSJerome Forissier feature requirements in the file named by the new macro 1080039e02dfSJerome Forissier MBEDTLS_PSA_CRYPTO_CONFIG_FILE instead of the default psa/crypto_config.h. 1081039e02dfSJerome Forissier Furthermore you may name an additional file to include after the main 1082039e02dfSJerome Forissier file with the macro MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE. 108332b31808SJens Wiklander * Add the function mbedtls_x509_crt_has_ext_type() to access the ext types 108432b31808SJens Wiklander field within mbedtls_x509_crt context, as requested in #5585. 108532b31808SJens Wiklander * Add HKDF-Expand and HKDF-Extract as separate algorithms in the PSA API. 108632b31808SJens Wiklander * Add support for the ARMv8 SHA-2 acceleration instructions when building 108732b31808SJens Wiklander for Aarch64. 108832b31808SJens Wiklander * Add support for authentication of TLS 1.3 clients by TLS 1.3 servers. 108932b31808SJens Wiklander * Add support for server HelloRetryRequest message. The TLS 1.3 client is 109032b31808SJens Wiklander now capable of negotiating another shared secret if the one sent in its 109132b31808SJens Wiklander first ClientHello was not suitable to the server. 109232b31808SJens Wiklander * Add support for client-side TLS version negotiation. If both TLS 1.2 and 109332b31808SJens Wiklander TLS 1.3 protocols are enabled in the build of Mbed TLS, the TLS client now 109432b31808SJens Wiklander negotiates TLS 1.3 or TLS 1.2 with TLS servers. 109532b31808SJens Wiklander * Enable building of Mbed TLS with TLS 1.3 protocol support but without TLS 109632b31808SJens Wiklander 1.2 protocol support. 109732b31808SJens Wiklander * Mbed TLS provides an implementation of a TLS 1.3 server (ephemeral key 109832b31808SJens Wiklander establishment only). See docs/architecture/tls13-support.md for a 109932b31808SJens Wiklander description of the support. The MBEDTLS_SSL_PROTO_TLS1_3 and 110032b31808SJens Wiklander MBEDTLS_SSL_SRV_C configuration options control this. 110132b31808SJens Wiklander * Add accessors to configure DN hints for certificate request: 110232b31808SJens Wiklander mbedtls_ssl_conf_dn_hints() and mbedtls_ssl_set_hs_dn_hints() 110332b31808SJens Wiklander * The configuration option MBEDTLS_USE_PSA_CRYPTO, which previously 110432b31808SJens Wiklander affected only a limited subset of crypto operations in TLS, X.509 and PK, 110532b31808SJens Wiklander now causes most of them to be done using PSA Crypto; see 110632b31808SJens Wiklander docs/use-psa-crypto.md for the list of exceptions. 110732b31808SJens Wiklander * The function mbedtls_pk_setup_opaque() now supports RSA key pairs as well. 110832b31808SJens Wiklander Opaque keys can now be used everywhere a private key is expected in the 110932b31808SJens Wiklander TLS and X.509 modules. 111032b31808SJens Wiklander * Opaque pre-shared keys for TLS, provisioned with 111132b31808SJens Wiklander mbedtls_ssl_conf_psk_opaque() or mbedtls_ssl_set_hs_psk_opaque(), which 111232b31808SJens Wiklander previously only worked for "pure" PSK key exchange, now can also be used 111332b31808SJens Wiklander for the "mixed" PSK key exchanges as well: ECDHE-PSK, DHE-PSK, RSA-PSK. 111432b31808SJens Wiklander * cmake now detects if it is being built as a sub-project, and in that case 111532b31808SJens Wiklander disables the target export/installation and package configuration. 111632b31808SJens Wiklander * Make USE_PSA_CRYPTO compatible with KEY_ID_ENCODES_OWNER. Fixes #5259. 111732b31808SJens Wiklander * Add example programs cipher_aead_demo.c, md_hmac_demo.c, aead_demo.c 111832b31808SJens Wiklander and hmac_demo.c, which use PSA and the md/cipher interfaces side 111932b31808SJens Wiklander by side in order to illustrate how the operation is performed in PSA. 112032b31808SJens Wiklander Addresses #5208. 1121039e02dfSJerome Forissier 1122039e02dfSJerome ForissierSecurity 1123039e02dfSJerome Forissier * Zeroize dynamically-allocated buffers used by the PSA Crypto key storage 1124039e02dfSJerome Forissier module before freeing them. These buffers contain secret key material, and 1125039e02dfSJerome Forissier could thus potentially leak the key through freed heap. 112632b31808SJens Wiklander * Fix potential memory leak inside mbedtls_ssl_cache_set() with 112732b31808SJens Wiklander an invalid session id length. 112832b31808SJens Wiklander * Add the platform function mbedtls_setbuf() to allow buffering to be 112932b31808SJens Wiklander disabled on stdio files, to stop secrets loaded from said files being 113032b31808SJens Wiklander potentially left in memory after file operations. Reported by 113132b31808SJens Wiklander Glenn Strauss. 1132039e02dfSJerome Forissier * Fix a potential heap buffer overread in TLS 1.2 server-side when 1133039e02dfSJerome Forissier MBEDTLS_USE_PSA_CRYPTO is enabled, an opaque key (created with 1134039e02dfSJerome Forissier mbedtls_pk_setup_opaque()) is provisioned, and a static ECDH ciphersuite 1135039e02dfSJerome Forissier is selected. This may result in an application crash or potentially an 1136039e02dfSJerome Forissier information leak. 1137039e02dfSJerome Forissier * Fix a buffer overread in DTLS ClientHello parsing in servers with 1138039e02dfSJerome Forissier MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE enabled. An unauthenticated client 1139039e02dfSJerome Forissier or a man-in-the-middle could cause a DTLS server to read up to 255 bytes 1140039e02dfSJerome Forissier after the end of the SSL input buffer. The buffer overread only happens 1141039e02dfSJerome Forissier when MBEDTLS_SSL_IN_CONTENT_LEN is less than a threshold that depends on 1142039e02dfSJerome Forissier the exact configuration: 258 bytes if using mbedtls_ssl_cookie_check(), 1143039e02dfSJerome Forissier and possibly up to 571 bytes with a custom cookie check function. 1144039e02dfSJerome Forissier Reported by the Cybeats PSI Team. 114532b31808SJens Wiklander * Fix a buffer overread in TLS 1.3 Certificate parsing. An unauthenticated 114632b31808SJens Wiklander client or server could cause an MbedTLS server or client to overread up 114732b31808SJens Wiklander to 64 kBytes of data and potentially overread the input buffer by that 114832b31808SJens Wiklander amount minus the size of the input buffer. As overread data undergoes 114932b31808SJens Wiklander various checks, the likelihood of reaching the boundary of the input 115032b31808SJens Wiklander buffer is rather small but increases as its size 115132b31808SJens Wiklander MBEDTLS_SSL_IN_CONTENT_LEN decreases. 115232b31808SJens Wiklander * Fix check of certificate key usage in TLS 1.3. The usage of the public key 115332b31808SJens Wiklander provided by a client or server certificate for authentication was not 115432b31808SJens Wiklander checked properly when validating the certificate. This could cause a 115532b31808SJens Wiklander client or server to be able to authenticate itself through a certificate 115632b31808SJens Wiklander to an Mbed TLS TLS 1.3 server or client while it does not own a proper 115732b31808SJens Wiklander certificate to do so. 1158039e02dfSJerome Forissier 1159039e02dfSJerome ForissierBugfix 116032b31808SJens Wiklander * Declare or use PSA_WANT_ALG_CCM_STAR_NO_TAG following the general 116132b31808SJens Wiklander pattern for PSA_WANT_xxx symbols. Previously you had to specify 116232b31808SJens Wiklander PSA_WANT_ALG_CCM for PSA_ALG_CCM_STAR_NO_TAG. 1163039e02dfSJerome Forissier * Fix a memory leak if mbedtls_ssl_config_defaults() is called twice. 116432b31808SJens Wiklander * Fixed swap of client and server random bytes when exporting them alongside 116532b31808SJens Wiklander TLS 1.3 handshake and application traffic secret. 1166039e02dfSJerome Forissier * Fix several bugs (warnings, compiler and linker errors, test failures) 1167039e02dfSJerome Forissier in reduced configurations when MBEDTLS_USE_PSA_CRYPTO is enabled. 1168039e02dfSJerome Forissier * Fix a bug in (D)TLS curve negotiation: when MBEDTLS_USE_PSA_CRYPTO was 1169039e02dfSJerome Forissier enabled and an ECDHE-ECDSA or ECDHE-RSA key exchange was used, the 1170039e02dfSJerome Forissier client would fail to check that the curve selected by the server for 1171039e02dfSJerome Forissier ECDHE was indeed one that was offered. As a result, the client would 1172039e02dfSJerome Forissier accept any curve that it supported, even if that curve was not allowed 1173039e02dfSJerome Forissier according to its configuration. Fixes #5291. 117432b31808SJens Wiklander * The TLS 1.3 implementation is now compatible with the 117532b31808SJens Wiklander MBEDTLS_USE_PSA_CRYPTO configuration option. 1176039e02dfSJerome Forissier * Fix unit tests that used 0 as the file UID. This failed on some 1177039e02dfSJerome Forissier implementations of PSA ITS. Fixes #3838. 117832b31808SJens Wiklander * Fix mbedtls_ssl_get_version() not reporting TLSv1.3. Fixes #5406. 1179039e02dfSJerome Forissier * Fix API violation in mbedtls_md_process() test by adding a call to 1180039e02dfSJerome Forissier mbedtls_md_starts(). Fixes #2227. 1181039e02dfSJerome Forissier * Fix compile errors when MBEDTLS_HAVE_TIME is not defined. Add tests 1182039e02dfSJerome Forissier to catch bad uses of time.h. 118332b31808SJens Wiklander * Fix a race condition in out-of-source builds with CMake when generated data 118432b31808SJens Wiklander files are already present. Fixes #5374. 1185039e02dfSJerome Forissier * Fix the library search path when building a shared library with CMake 1186039e02dfSJerome Forissier on Windows. 1187039e02dfSJerome Forissier * Fix bug in the alert sending function mbedtls_ssl_send_alert_message() 1188039e02dfSJerome Forissier potentially leading to corrupted alert messages being sent in case 1189039e02dfSJerome Forissier the function needs to be re-called after initially returning 1190039e02dfSJerome Forissier MBEDTLS_SSL_WANT_WRITE. Fixes #1916. 119132b31808SJens Wiklander * In configurations with MBEDTLS_SSL_DTLS_CONNECTION_ID enabled but not 119232b31808SJens Wiklander MBEDTLS_DEBUG_C, DTLS handshakes using CID would crash due to a null 119332b31808SJens Wiklander pointer dereference. Fix this. Fixes #3998. 119432b31808SJens Wiklander The fix was released, but not announced, in Mbed TLS 3.1.0. 1195039e02dfSJerome Forissier * Fix incorrect documentation of mbedtls_x509_crt_profile. The previous 1196039e02dfSJerome Forissier documentation stated that the `allowed_pks` field applies to signatures 1197039e02dfSJerome Forissier only, but in fact it does apply to the public key type of the end entity 1198039e02dfSJerome Forissier certificate, too. Fixes #1992. 1199039e02dfSJerome Forissier * Fix undefined behavior in mbedtls_asn1_find_named_data(), where val is 1200039e02dfSJerome Forissier not NULL and val_len is zero. 120132b31808SJens Wiklander * Fix compilation error with mingw32. Fixed by Cameron Cawley in #4211. 120232b31808SJens Wiklander * Fix compilation error when using C++ Builder on Windows. Reported by 120332b31808SJens Wiklander Miroslav Mastny in #4015. 1204039e02dfSJerome Forissier * psa_raw_key_agreement() now returns PSA_ERROR_BUFFER_TOO_SMALL when 1205039e02dfSJerome Forissier applicable. Fixes #5735. 1206039e02dfSJerome Forissier * Fix a bug in the x25519 example program where the removal of 1207039e02dfSJerome Forissier MBEDTLS_ECDH_LEGACY_CONTEXT caused the program not to run. Fixes #4901 and 1208039e02dfSJerome Forissier #3191. 120932b31808SJens Wiklander * Fix a TLS 1.3 handshake failure when the peer Finished message has not 121032b31808SJens Wiklander been received yet when we first try to fetch it. 1211039e02dfSJerome Forissier * Encode X.509 dates before 1/1/2000 as UTCTime rather than 1212039e02dfSJerome Forissier GeneralizedTime. Fixes #5465. 121332b31808SJens Wiklander * Add mbedtls_x509_dn_get_next function to return the next relative DN in 121432b31808SJens Wiklander an X509 name, to allow walking the name list. Fixes #5431. 1215039e02dfSJerome Forissier * Fix order value of curve x448. 1216039e02dfSJerome Forissier * Fix string representation of DNs when outputting values containing commas 1217039e02dfSJerome Forissier and other special characters, conforming to RFC 1779. Fixes #769. 1218039e02dfSJerome Forissier * Silence a warning from GCC 12 in the selftest program. Fixes #5974. 121932b31808SJens Wiklander * Fix check_config.h to check that we have MBEDTLS_SSL_KEEP_PEER_CERTIFICATE 122032b31808SJens Wiklander when MBEDTLS_SSL_PROTO_TLS1_3 is specified, and make this and other 122132b31808SJens Wiklander dependencies explicit in the documentation. Fixes #5610. 1222039e02dfSJerome Forissier * Fix mbedtls_asn1_write_mpi() writing an incorrect encoding of 0. 122332b31808SJens Wiklander * Fix a TLS 1.3 handshake failure when the first attempt to send the client 122432b31808SJens Wiklander Finished message on the network cannot be satisfied. Fixes #5499. 1225039e02dfSJerome Forissier * Fix resource leaks in mbedtls_pk_parse_public_key() in low 1226039e02dfSJerome Forissier memory conditions. 1227039e02dfSJerome Forissier * Fix server connection identifier setting for outgoing encrypted records 1228039e02dfSJerome Forissier on DTLS 1.2 session resumption. After DTLS 1.2 session resumption with 1229039e02dfSJerome Forissier connection identifier, the Mbed TLS client now properly sends the server 1230039e02dfSJerome Forissier connection identifier in encrypted record headers. Fix #5872. 1231039e02dfSJerome Forissier * Fix a null pointer dereference when performing some operations on zero 1232039e02dfSJerome Forissier represented with 0 limbs (specifically mbedtls_mpi_mod_int() dividing 1233039e02dfSJerome Forissier by 2, and mbedtls_mpi_write_string() in base 2). 1234039e02dfSJerome Forissier * Fix record sizes larger than 16384 being sometimes accepted despite being 1235039e02dfSJerome Forissier non-compliant. This could not lead to a buffer overflow. In particular, 1236039e02dfSJerome Forissier application data size was already checked correctly. 123732b31808SJens Wiklander * Fix MBEDTLS_SVC_KEY_ID_GET_KEY_ID() and MBEDTLS_SVC_KEY_ID_GET_OWNER_ID() 123832b31808SJens Wiklander which have been broken, resulting in compilation errors, since Mbed TLS 123932b31808SJens Wiklander 3.0. 124032b31808SJens Wiklander * Ensure that TLS 1.2 ciphersuite/certificate and key selection takes into 124132b31808SJens Wiklander account not just the type of the key (RSA vs EC) but also what it can 124232b31808SJens Wiklander actually do. Resolves #5831. 124332b31808SJens Wiklander * Fix CMake windows host detection, especially when cross compiling. 124432b31808SJens Wiklander * Fix an error in make where the absence of a generated file caused 124532b31808SJens Wiklander make to break on a clean checkout. Fixes #5340. 124632b31808SJens Wiklander * Work around an MSVC ARM64 compiler bug causing incorrect behaviour 124732b31808SJens Wiklander in mbedtls_mpi_exp_mod(). Reported by Tautvydas Žilys in #5467. 124832b31808SJens Wiklander * Removed the prompt to exit from all windows build programs, which was causing 124932b31808SJens Wiklander issues in CI/CD environments. 1250039e02dfSJerome Forissier 1251039e02dfSJerome ForissierChanges 125232b31808SJens Wiklander * The file library/psa_crypto_driver_wrappers.c is now generated 125332b31808SJens Wiklander from a template. In the future, the generation will support 125432b31808SJens Wiklander driver descriptions. For the time being, to customize this file, 125532b31808SJens Wiklander see docs/proposed/psa-driver-wrappers-codegen-migration-guide.md 125632b31808SJens Wiklander * Return PSA_ERROR_INVALID_ARGUMENT if the algorithm passed to one-shot 125732b31808SJens Wiklander AEAD functions is not an AEAD algorithm. This aligns them with the 125832b31808SJens Wiklander multipart functions, and the PSA Crypto API 1.1 specification. 125932b31808SJens Wiklander * In mbedtls_pk_parse_key(), if no password is provided, don't allocate a 126032b31808SJens Wiklander temporary variable on the heap. Suggested by Sergey Kanatov in #5304. 1261039e02dfSJerome Forissier * Assume source files are in UTF-8 when using MSVC with CMake. 126232b31808SJens Wiklander * Fix runtime library install location when building with CMake and MinGW. 126332b31808SJens Wiklander DLLs are now installed in the bin directory instead of lib. 126432b31808SJens Wiklander * cmake: Use GnuInstallDirs to customize install directories 126532b31808SJens Wiklander Replace custom LIB_INSTALL_DIR variable with standard CMAKE_INSTALL_LIBDIR 126632b31808SJens Wiklander variable. For backward compatibility, set CMAKE_INSTALL_LIBDIR if 126732b31808SJens Wiklander LIB_INSTALL_DIR is set. 126832b31808SJens Wiklander * Add a CMake option that enables static linking of the runtime library 126932b31808SJens Wiklander in Microsoft Visual C++ compiler. Contributed by Microplankton. 127032b31808SJens Wiklander * In CMake builds, add aliases for libraries so that the normal MbedTLS::* 127132b31808SJens Wiklander targets work when MbedTLS is built as a subdirectory. This allows the 127232b31808SJens Wiklander use of FetchContent, as requested in #5688. 1273039e02dfSJerome Forissier 127432b31808SJens Wiklander= mbed TLS 3.1.0 branch released 2021-12-17 1275039e02dfSJerome Forissier 1276039e02dfSJerome ForissierAPI changes 127732b31808SJens Wiklander * New error code for GCM: MBEDTLS_ERR_GCM_BUFFER_TOO_SMALL. 127832b31808SJens Wiklander Alternative GCM implementations are expected to verify 127932b31808SJens Wiklander the length of the provided output buffers and to return the 128032b31808SJens Wiklander MBEDTLS_ERR_GCM_BUFFER_TOO_SMALL in case the buffer length is too small. 128132b31808SJens Wiklander * You can configure groups for a TLS key exchange with the new function 128232b31808SJens Wiklander mbedtls_ssl_conf_groups(). It extends mbedtls_ssl_conf_curves(). 128332b31808SJens Wiklander * Declare a number of structure fields as public: the fields of 128432b31808SJens Wiklander mbedtls_ecp_curve_info, the fields describing the result of ASN.1 and 128532b31808SJens Wiklander X.509 parsing, and finally the field fd of mbedtls_net_context on 128632b31808SJens Wiklander POSIX/Unix-like platforms. 1287039e02dfSJerome Forissier 1288039e02dfSJerome ForissierRequirement changes 1289039e02dfSJerome Forissier * Sign-magnitude and one's complement representations for signed integers are 1290039e02dfSJerome Forissier not supported. Two's complement is the only supported representation. 1291039e02dfSJerome Forissier 129232b31808SJens WiklanderNew deprecations 129332b31808SJens Wiklander * Deprecate mbedtls_ssl_conf_curves() in favor of the more generic 129432b31808SJens Wiklander mbedtls_ssl_conf_groups(). 129532b31808SJens Wiklander 1296039e02dfSJerome ForissierRemovals 1297039e02dfSJerome Forissier * Remove the partial support for running unit tests via Greentea on Mbed OS, 1298039e02dfSJerome Forissier which had been unmaintained since 2018. 1299039e02dfSJerome Forissier 1300039e02dfSJerome ForissierFeatures 130132b31808SJens Wiklander * Enable support for Curve448 via the PSA API. Contributed by 130232b31808SJens Wiklander Archana Madhavan in #4626. Fixes #3399 and #4249. 1303039e02dfSJerome Forissier * The identifier of the CID TLS extension can be configured by defining 1304039e02dfSJerome Forissier MBEDTLS_TLS_EXT_CID at compile time. 130532b31808SJens Wiklander * Implement the PSA multipart AEAD interface, currently supporting 130632b31808SJens Wiklander ChaChaPoly and GCM. 1307039e02dfSJerome Forissier * Warn if errors from certain functions are ignored. This is currently 1308039e02dfSJerome Forissier supported on GCC-like compilers and on MSVC and can be configured through 1309039e02dfSJerome Forissier the macro MBEDTLS_CHECK_RETURN. The warnings are always enabled 1310039e02dfSJerome Forissier (where supported) for critical functions where ignoring the return 1311039e02dfSJerome Forissier value is almost always a bug. Enable the new configuration option 1312039e02dfSJerome Forissier MBEDTLS_CHECK_RETURN_WARNING to get warnings for other functions. This 1313039e02dfSJerome Forissier is currently implemented in the AES, DES and md modules, and will be 1314039e02dfSJerome Forissier extended to other modules in the future. 1315039e02dfSJerome Forissier * Add missing PSA macros declared by PSA Crypto API 1.0.0: 1316039e02dfSJerome Forissier PSA_ALG_IS_SIGN_HASH, PSA_ALG_NONE, PSA_HASH_BLOCK_LENGTH, PSA_KEY_ID_NULL. 131732b31808SJens Wiklander * Add support for CCM*-no-tag cipher to the PSA. 131832b31808SJens Wiklander Currently only 13-byte long IV's are supported. 131932b31808SJens Wiklander For decryption a minimum of 16-byte long input is expected. 132032b31808SJens Wiklander These restrictions may be subject to change. 1321039e02dfSJerome Forissier * Add new API mbedtls_ct_memcmp for constant time buffer comparison. 132232b31808SJens Wiklander * Add functions to get the IV and block size from cipher_info structs. 132332b31808SJens Wiklander * Add functions to check if a cipher supports variable IV or key size. 132432b31808SJens Wiklander * Add the internal implementation of and support for CCM to the PSA multipart 132532b31808SJens Wiklander AEAD interface. 132632b31808SJens Wiklander * Mbed TLS provides a minimum viable implementation of the TLS 1.3 132732b31808SJens Wiklander protocol. See docs/architecture/tls13-support.md for the definition of 132832b31808SJens Wiklander the TLS 1.3 Minimum Viable Product (MVP). The MBEDTLS_SSL_PROTO_TLS1_3 132932b31808SJens Wiklander configuration option controls the enablement of the support. The APIs 133032b31808SJens Wiklander mbedtls_ssl_conf_min_version() and mbedtls_ssl_conf_max_version() allow 133132b31808SJens Wiklander to select the 1.3 version of the protocol to establish a TLS connection. 1332039e02dfSJerome Forissier * Add PSA API definition for ARIA. 1333039e02dfSJerome Forissier 1334039e02dfSJerome ForissierSecurity 1335039e02dfSJerome Forissier * Zeroize several intermediate variables used to calculate the expected 1336039e02dfSJerome Forissier value when verifying a MAC or AEAD tag. This hardens the library in 1337039e02dfSJerome Forissier case the value leaks through a memory disclosure vulnerability. For 1338039e02dfSJerome Forissier example, a memory disclosure vulnerability could have allowed a 1339039e02dfSJerome Forissier man-in-the-middle to inject fake ciphertext into a DTLS connection. 134032b31808SJens Wiklander * In psa_aead_generate_nonce(), do not read back from the output buffer. 134132b31808SJens Wiklander This fixes a potential policy bypass or decryption oracle vulnerability 134232b31808SJens Wiklander if the output buffer is in memory that is shared with an untrusted 134332b31808SJens Wiklander application. 1344039e02dfSJerome Forissier * In psa_cipher_generate_iv() and psa_cipher_encrypt(), do not read back 1345039e02dfSJerome Forissier from the output buffer. This fixes a potential policy bypass or decryption 1346039e02dfSJerome Forissier oracle vulnerability if the output buffer is in memory that is shared with 1347039e02dfSJerome Forissier an untrusted application. 1348039e02dfSJerome Forissier * Fix a double-free that happened after mbedtls_ssl_set_session() or 1349039e02dfSJerome Forissier mbedtls_ssl_get_session() failed with MBEDTLS_ERR_SSL_ALLOC_FAILED 1350039e02dfSJerome Forissier (out of memory). After that, calling mbedtls_ssl_session_free() 1351039e02dfSJerome Forissier and mbedtls_ssl_free() would cause an internal session buffer to 1352039e02dfSJerome Forissier be free()'d twice. 1353039e02dfSJerome Forissier 1354039e02dfSJerome ForissierBugfix 1355039e02dfSJerome Forissier * Stop using reserved identifiers as local variables. Fixes #4630. 1356039e02dfSJerome Forissier * The GNU makefiles invoke python3 in preference to python except on Windows. 1357039e02dfSJerome Forissier The check was accidentally not performed when cross-compiling for Windows 1358039e02dfSJerome Forissier on Linux. Fix this. Fixes #4774. 1359039e02dfSJerome Forissier * Prevent divide by zero if either of PSA_CIPHER_ENCRYPT_OUTPUT_SIZE() or 1360039e02dfSJerome Forissier PSA_CIPHER_UPDATE_OUTPUT_SIZE() were called using an asymmetric key type. 1361039e02dfSJerome Forissier * Fix a parameter set but unused in psa_crypto_cipher.c. Fixes #4935. 1362039e02dfSJerome Forissier * Don't use the obsolete header path sys/fcntl.h in unit tests. 1363039e02dfSJerome Forissier These header files cause compilation errors in musl. 1364039e02dfSJerome Forissier Fixes #4969. 1365039e02dfSJerome Forissier * Fix missing constraints on x86_64 and aarch64 assembly code 1366039e02dfSJerome Forissier for bignum multiplication that broke some bignum operations with 1367039e02dfSJerome Forissier (at least) Clang 12. 1368039e02dfSJerome Forissier Fixes #4116, #4786, #4917, #4962. 1369039e02dfSJerome Forissier * Fix mbedtls_cipher_crypt: AES-ECB when MBEDTLS_USE_PSA_CRYPTO is enabled. 1370039e02dfSJerome Forissier * Failures of alternative implementations of AES or DES single-block 1371039e02dfSJerome Forissier functions enabled with MBEDTLS_AES_ENCRYPT_ALT, MBEDTLS_AES_DECRYPT_ALT, 1372039e02dfSJerome Forissier MBEDTLS_DES_CRYPT_ECB_ALT or MBEDTLS_DES3_CRYPT_ECB_ALT were ignored. 1373039e02dfSJerome Forissier This does not concern the implementation provided with Mbed TLS, 1374039e02dfSJerome Forissier where this function cannot fail, or full-module replacements with 1375039e02dfSJerome Forissier MBEDTLS_AES_ALT or MBEDTLS_DES_ALT. Reported by Armelle Duboc in #1092. 1376039e02dfSJerome Forissier * Some failures of HMAC operations were ignored. These failures could only 1377039e02dfSJerome Forissier happen with an alternative implementation of the underlying hash module. 1378039e02dfSJerome Forissier * Fix the error returned by psa_generate_key() for a public key. Fixes #4551. 137932b31808SJens Wiklander * Fix compile-time or run-time errors in PSA 138032b31808SJens Wiklander AEAD functions when ChachaPoly is disabled. Fixes #5065. 138132b31808SJens Wiklander * Remove PSA'a AEAD finish/verify output buffer limitation for GCM. 138232b31808SJens Wiklander The requirement of minimum 15 bytes for output buffer in 138332b31808SJens Wiklander psa_aead_finish() and psa_aead_verify() does not apply to the built-in 138432b31808SJens Wiklander implementation of GCM. 138532b31808SJens Wiklander * Move GCM's update output buffer length verification from PSA AEAD to 138632b31808SJens Wiklander the built-in implementation of the GCM. 138732b31808SJens Wiklander The requirement for output buffer size to be equal or greater then 138832b31808SJens Wiklander input buffer size is valid only for the built-in implementation of GCM. 138932b31808SJens Wiklander Alternative GCM implementations can process whole blocks only. 1390039e02dfSJerome Forissier * Fix the build of sample programs when neither MBEDTLS_ERROR_C nor 1391039e02dfSJerome Forissier MBEDTLS_ERROR_STRERROR_DUMMY is enabled. 1392039e02dfSJerome Forissier * Fix PSA_ALG_RSA_PSS verification accepting an arbitrary salt length. 1393039e02dfSJerome Forissier This algorithm now accepts only the same salt length for verification 1394039e02dfSJerome Forissier that it produces when signing, as documented. Use the new algorithm 1395039e02dfSJerome Forissier PSA_ALG_RSA_PSS_ANY_SALT to accept any salt length. Fixes #4946. 1396039e02dfSJerome Forissier * The existing predicate macro name PSA_ALG_IS_HASH_AND_SIGN is now reserved 1397039e02dfSJerome Forissier for algorithm values that fully encode the hashing step, as per the PSA 1398039e02dfSJerome Forissier Crypto API specification. This excludes PSA_ALG_RSA_PKCS1V15_SIGN_RAW and 1399039e02dfSJerome Forissier PSA_ALG_ECDSA_ANY. The new predicate macro PSA_ALG_IS_SIGN_HASH covers 1400039e02dfSJerome Forissier all algorithms that can be used with psa_{sign,verify}_hash(), including 1401039e02dfSJerome Forissier these two. 1402039e02dfSJerome Forissier * Fix issue in Makefile on Linux with SHARED=1, that caused shared libraries 1403039e02dfSJerome Forissier not to list other shared libraries they need. 1404039e02dfSJerome Forissier * Fix a bug in mbedtls_gcm_starts() when the bit length of the iv 1405039e02dfSJerome Forissier exceeds 2^32. Fixes #4884. 1406039e02dfSJerome Forissier * Fix an uninitialized variable warning in test_suite_ssl.function with GCC 1407039e02dfSJerome Forissier version 11. 1408039e02dfSJerome Forissier * Fix the build when no SHA2 module is included. Fixes #4930. 1409039e02dfSJerome Forissier * Fix the build when only the bignum module is included. Fixes #4929. 1410039e02dfSJerome Forissier * Fix a potential invalid pointer dereference and infinite loop bugs in 1411039e02dfSJerome Forissier pkcs12 functions when the password is empty. Fix the documentation to 1412039e02dfSJerome Forissier better describe the inputs to these functions and their possible values. 1413039e02dfSJerome Forissier Fixes #5136. 1414039e02dfSJerome Forissier * The key usage flags PSA_KEY_USAGE_SIGN_MESSAGE now allows the MAC 1415039e02dfSJerome Forissier operations psa_mac_compute() and psa_mac_sign_setup(). 1416039e02dfSJerome Forissier * The key usage flags PSA_KEY_USAGE_VERIFY_MESSAGE now allows the MAC 1417039e02dfSJerome Forissier operations psa_mac_verify() and psa_mac_verify_setup(). 1418039e02dfSJerome Forissier 1419039e02dfSJerome ForissierChanges 142032b31808SJens Wiklander * Explicitly mark the fields mbedtls_ssl_session.exported and 142132b31808SJens Wiklander mbedtls_ssl_config.respect_cli_pref as private. This was an 142232b31808SJens Wiklander oversight during the run-up to the release of Mbed TLS 3.0. 142332b31808SJens Wiklander The fields were never intended to be public. 142432b31808SJens Wiklander * Implement multi-part CCM API. 142532b31808SJens Wiklander The multi-part functions: mbedtls_ccm_starts(), mbedtls_ccm_set_lengths(), 142632b31808SJens Wiklander mbedtls_ccm_update_ad(), mbedtls_ccm_update(), mbedtls_ccm_finish() 142732b31808SJens Wiklander were introduced in mbedTLS 3.0 release, however their implementation was 142832b31808SJens Wiklander postponed until now. 142932b31808SJens Wiklander Implemented functions support chunked data input for both CCM and CCM* 143032b31808SJens Wiklander algorithms. 143132b31808SJens Wiklander * Remove MBEDTLS_SSL_EXPORT_KEYS, making it always on and increasing the 143232b31808SJens Wiklander code size by about 80B on an M0 build. This option only gated an ability 143332b31808SJens Wiklander to set a callback, but was deemed unnecessary as it was yet another define 143432b31808SJens Wiklander to remember when writing tests, or test configurations. Fixes #4653. 1435039e02dfSJerome Forissier * Improve the performance of base64 constant-flow code. The result is still 1436039e02dfSJerome Forissier slower than the original non-constant-flow implementation, but much faster 1437039e02dfSJerome Forissier than the previous constant-flow implementation. Fixes #4814. 143832b31808SJens Wiklander * Ignore plaintext/ciphertext lengths for CCM*-no-tag operations. 143932b31808SJens Wiklander For CCM* encryption/decryption without authentication, input 144032b31808SJens Wiklander length will be ignored. 1441039e02dfSJerome Forissier * Indicate in the error returned if the nonce length used with 1442039e02dfSJerome Forissier ChaCha20-Poly1305 is invalid, and not just unsupported. 1443039e02dfSJerome Forissier * The mbedcrypto library includes a new source code module constant_time.c, 1444039e02dfSJerome Forissier containing various functions meant to resist timing side channel attacks. 1445039e02dfSJerome Forissier This module does not have a separate configuration option, and functions 1446039e02dfSJerome Forissier from this module will be included in the build as required. Currently 1447039e02dfSJerome Forissier most of the interface of this module is private and may change at any 1448039e02dfSJerome Forissier time. 144932b31808SJens Wiklander * The generated configuration-independent files are now automatically 145032b31808SJens Wiklander generated by the CMake build system on Unix-like systems. This is not 145132b31808SJens Wiklander yet supported when cross-compiling. 1452817466cbSJens Wiklander 145332b31808SJens Wiklander= Mbed TLS 3.0.0 branch released 2021-07-07 14547901324dSJerome Forissier 14557901324dSJerome ForissierAPI changes 145632b31808SJens Wiklander * Remove HAVEGE module. 145732b31808SJens Wiklander The design of HAVEGE makes it unsuitable for microcontrollers. Platforms 145832b31808SJens Wiklander with a more complex CPU usually have an operating system interface that 145932b31808SJens Wiklander provides better randomness. Instead of HAVEGE, declare OS or hardware RNG 146032b31808SJens Wiklander interfaces with mbedtls_entropy_add_source() and/or use an entropy seed 146132b31808SJens Wiklander file created securely during device provisioning. See 146232b31808SJens Wiklander https://mbed-tls.readthedocs.io/en/latest/kb/how-to/add-entropy-sources-to-entropy-pool/ for 146332b31808SJens Wiklander more information. 146432b31808SJens Wiklander * Add missing const attributes to API functions. 146532b31808SJens Wiklander * Remove helpers for the transition from Mbed TLS 1.3 to Mbed TLS 2.0: the 146632b31808SJens Wiklander header compat-1.3.h and the script rename.pl. 146732b31808SJens Wiklander * Remove certs module from the API. 146832b31808SJens Wiklander Transfer keys and certificates embedded in the library to the test 146932b31808SJens Wiklander component. This contributes to minimizing library API and discourages 147032b31808SJens Wiklander users from using unsafe keys in production. 147132b31808SJens Wiklander * Move alt helpers and definitions. 147232b31808SJens Wiklander Various helpers and definitions available for use in alt implementations 147332b31808SJens Wiklander have been moved out of the include/ directory and into the library/ 147432b31808SJens Wiklander directory. The files concerned are ecp_internal.h and rsa_internal.h 147532b31808SJens Wiklander which have also been renamed to ecp_internal_alt.h and rsa_alt_helpers.h 147632b31808SJens Wiklander respectively. 147732b31808SJens Wiklander * Move internal headers. 147832b31808SJens Wiklander Header files that were only meant for the library's internal use and 147932b31808SJens Wiklander were not meant to be used in application code have been moved out of 148032b31808SJens Wiklander the include/ directory. The headers concerned are bn_mul.h, aesni.h, 148132b31808SJens Wiklander padlock.h, entropy_poll.h and *_internal.h. 148232b31808SJens Wiklander * Drop support for parsing SSLv2 ClientHello 148332b31808SJens Wiklander (MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO). 148432b31808SJens Wiklander * Drop support for SSLv3 (MBEDTLS_SSL_PROTO_SSL3). 148532b31808SJens Wiklander * Drop support for TLS record-level compression (MBEDTLS_ZLIB_SUPPORT). 148632b31808SJens Wiklander * Drop support for RC4 TLS ciphersuites. 148732b31808SJens Wiklander * Drop support for single-DES ciphersuites. 148832b31808SJens Wiklander * Drop support for MBEDTLS_SSL_HW_RECORD_ACCEL. 14897901324dSJerome Forissier * Update AEAD output size macros to bring them in line with the PSA Crypto 14907901324dSJerome Forissier API version 1.0 spec. This version of the spec parameterizes them on the 14917901324dSJerome Forissier key type used, as well as the key bit-size in the case of 14927901324dSJerome Forissier PSA_AEAD_TAG_LENGTH. 149332b31808SJens Wiklander * Add configuration option MBEDTLS_X509_REMOVE_INFO which 149432b31808SJens Wiklander removes the mbedtls_x509_*_info(), mbedtls_debug_print_crt() 149532b31808SJens Wiklander as well as other functions and constants only used by 149632b31808SJens Wiklander those functions. This reduces the code footprint by 149732b31808SJens Wiklander several kB. 149832b31808SJens Wiklander * Remove SSL error codes `MBEDTLS_ERR_SSL_CERTIFICATE_REQUIRED` 149932b31808SJens Wiklander and `MBEDTLS_ERR_SSL_INVALID_VERIFY_HASH` which are never 150032b31808SJens Wiklander returned from the public SSL API. 150132b31808SJens Wiklander * Remove `MBEDTLS_ERR_SSL_CERTIFICATE_TOO_LARGE` and return 150232b31808SJens Wiklander `MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL` instead. 150332b31808SJens Wiklander * The output parameter of mbedtls_sha512_finish, mbedtls_sha512, 150432b31808SJens Wiklander mbedtls_sha256_finish and mbedtls_sha256 now has a pointer type 150532b31808SJens Wiklander rather than array type. This removes spurious warnings in some compilers 150632b31808SJens Wiklander when outputting a SHA-384 or SHA-224 hash into a buffer of exactly 150732b31808SJens Wiklander the hash size. 150832b31808SJens Wiklander * Remove the MBEDTLS_TEST_NULL_ENTROPY config option. Fixes #4388. 150932b31808SJens Wiklander * The interface of the GCM module has changed to remove restrictions on 151032b31808SJens Wiklander how the input to multipart operations is broken down. mbedtls_gcm_finish() 151132b31808SJens Wiklander now takes extra output parameters for the last partial output block. 151232b31808SJens Wiklander mbedtls_gcm_update() now takes extra parameters for the output length. 151332b31808SJens Wiklander The software implementation always produces the full output at each 151432b31808SJens Wiklander call to mbedtls_gcm_update(), but alternative implementations activated 151532b31808SJens Wiklander by MBEDTLS_GCM_ALT may delay partial blocks to the next call to 151632b31808SJens Wiklander mbedtls_gcm_update() or mbedtls_gcm_finish(). Furthermore, applications 151732b31808SJens Wiklander no longer pass the associated data to mbedtls_gcm_starts(), but to the 151832b31808SJens Wiklander new function mbedtls_gcm_update_ad(). 151932b31808SJens Wiklander These changes are backward compatible for users of the cipher API. 152032b31808SJens Wiklander * Replace MBEDTLS_SHA512_NO_SHA384 config option with MBEDTLS_SHA384_C. 152132b31808SJens Wiklander This separates config option enabling the SHA384 algorithm from option 152232b31808SJens Wiklander enabling the SHA512 algorithm. Fixes #4034. 152332b31808SJens Wiklander * Introduce MBEDTLS_SHA224_C. 152432b31808SJens Wiklander This separates config option enabling the SHA224 algorithm from option 152532b31808SJens Wiklander enabling SHA256. 152632b31808SJens Wiklander * The getter and setter API of the SSL session cache (used for 152732b31808SJens Wiklander session-ID based session resumption) has changed to that of 152832b31808SJens Wiklander a key-value store with keys being session IDs and values 152932b31808SJens Wiklander being opaque instances of `mbedtls_ssl_session`. 153032b31808SJens Wiklander * Remove the mode parameter from RSA operation functions. Signature and 153132b31808SJens Wiklander decryption functions now always use the private key and verification and 153232b31808SJens Wiklander encryption use the public key. Verification functions also no longer have 153332b31808SJens Wiklander RNG parameters. 153432b31808SJens Wiklander * Modify semantics of `mbedtls_ssl_conf_[opaque_]psk()`: 153532b31808SJens Wiklander In Mbed TLS 2.X, the API prescribes that later calls overwrite 153632b31808SJens Wiklander the effect of earlier calls. In Mbed TLS 3.0, calling 153732b31808SJens Wiklander `mbedtls_ssl_conf_[opaque_]psk()` more than once will fail, 153832b31808SJens Wiklander leaving the PSK that was configured first intact. 153932b31808SJens Wiklander Support for more than one PSK may be added in 3.X. 154032b31808SJens Wiklander * The function mbedtls_x509write_csr_set_extension() has an extra parameter 154132b31808SJens Wiklander which allows to mark an extension as critical. Fixes #4055. 154232b31808SJens Wiklander * For multi-part AEAD operations with the cipher module, calling 154332b31808SJens Wiklander mbedtls_cipher_finish() is now mandatory. Previously the documentation 154432b31808SJens Wiklander was unclear on this point, and this function happened to never do 154532b31808SJens Wiklander anything with the currently implemented AEADs, so in practice it was 154632b31808SJens Wiklander possible to skip calling it, which is no longer supported. 154732b31808SJens Wiklander * The option MBEDTLS_ECP_FIXED_POINT_OPTIM use pre-computed comb tables 154832b31808SJens Wiklander instead of computing tables in runtime. Thus, this option now increase 154932b31808SJens Wiklander code size, and it does not increase RAM usage in runtime anymore. 155032b31808SJens Wiklander * Remove the SSL APIs mbedtls_ssl_get_input_max_frag_len() and 155132b31808SJens Wiklander mbedtls_ssl_get_output_max_frag_len(), and add a new API 155232b31808SJens Wiklander mbedtls_ssl_get_max_in_record_payload(), complementing the existing 155332b31808SJens Wiklander mbedtls_ssl_get_max_out_record_payload(). 155432b31808SJens Wiklander Uses of mbedtls_ssl_get_input_max_frag_len() and 155532b31808SJens Wiklander mbedtls_ssl_get_input_max_frag_len() should be replaced by 155632b31808SJens Wiklander mbedtls_ssl_get_max_in_record_payload() and 155732b31808SJens Wiklander mbedtls_ssl_get_max_out_record_payload(), respectively. 155832b31808SJens Wiklander * mbedtls_rsa_init() now always selects the PKCS#1v1.5 encoding for an RSA 155932b31808SJens Wiklander key. To use an RSA key with PSS or OAEP, call mbedtls_rsa_set_padding() 156032b31808SJens Wiklander after initializing the context. mbedtls_rsa_set_padding() now returns an 156132b31808SJens Wiklander error if its parameters are invalid. 156232b31808SJens Wiklander * Replace MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE by a runtime 156332b31808SJens Wiklander configuration function mbedtls_ssl_conf_preference_order(). Fixes #4398. 156432b31808SJens Wiklander * Instead of accessing the len field of a DHM context, which is no longer 156532b31808SJens Wiklander supported, use the new function mbedtls_dhm_get_len() . 156632b31808SJens Wiklander * In modules that implement cryptographic hash functions, many functions 156732b31808SJens Wiklander mbedtls_xxx() now return int instead of void, and the corresponding 156832b31808SJens Wiklander function mbedtls_xxx_ret() which was identical except for returning int 156932b31808SJens Wiklander has been removed. This also concerns mbedtls_xxx_drbg_update(). See the 157032b31808SJens Wiklander migration guide for more information. Fixes #4212. 157132b31808SJens Wiklander * For all functions that take a random number generator (RNG) as a 157232b31808SJens Wiklander parameter, this parameter is now mandatory (that is, NULL is not an 157332b31808SJens Wiklander acceptable value). Functions which previously accepted NULL and now 157432b31808SJens Wiklander reject it are: the X.509 CRT and CSR writing functions; the PK and RSA 157532b31808SJens Wiklander sign and decrypt function; mbedtls_rsa_private(); the functions 157632b31808SJens Wiklander in DHM and ECDH that compute the shared secret; the scalar multiplication 157732b31808SJens Wiklander functions in ECP. 157832b31808SJens Wiklander * The following functions now require an RNG parameter: 157932b31808SJens Wiklander mbedtls_ecp_check_pub_priv(), mbedtls_pk_check_pair(), 158032b31808SJens Wiklander mbedtls_pk_parse_key(), mbedtls_pk_parse_keyfile(). 158132b31808SJens Wiklander * mbedtls_ssl_conf_export_keys_ext_cb() and 158232b31808SJens Wiklander mbedtls_ssl_conf_export_keys_cb() have been removed and 158332b31808SJens Wiklander replaced by a new API mbedtls_ssl_set_export_keys_cb(). 158432b31808SJens Wiklander Raw keys and IVs are no longer passed to the callback. 158532b31808SJens Wiklander Further, callbacks now receive an additional parameter 158632b31808SJens Wiklander indicating the type of secret that's being exported, 158732b31808SJens Wiklander paving the way for the larger number of secrets 158832b31808SJens Wiklander in TLS 1.3. Finally, the key export callback and 158932b31808SJens Wiklander context are now connection-specific. 159032b31808SJens Wiklander * Signature functions in the RSA and PK modules now require the hash 159132b31808SJens Wiklander length parameter to be the size of the hash input. For RSA signatures 159232b31808SJens Wiklander other than raw PKCS#1 v1.5, this must match the output size of the 159332b31808SJens Wiklander specified hash algorithm. 159432b31808SJens Wiklander * The functions mbedtls_pk_sign(), mbedtls_pk_sign_restartable(), 159532b31808SJens Wiklander mbedtls_ecdsa_write_signature() and 159632b31808SJens Wiklander mbedtls_ecdsa_write_signature_restartable() now take an extra parameter 159732b31808SJens Wiklander indicating the size of the output buffer for the signature. 15987901324dSJerome Forissier * Implement one-shot cipher functions, psa_cipher_encrypt and 15997901324dSJerome Forissier psa_cipher_decrypt, according to the PSA Crypto API 1.0.0 16007901324dSJerome Forissier specification. 160132b31808SJens Wiklander * Direct access to fields of structures declared in public headers is no 160232b31808SJens Wiklander longer supported except for fields that are documented public. Use accessor 160332b31808SJens Wiklander functions instead. For more information, see the migration guide entry 160432b31808SJens Wiklander "Most structure fields are now private". 160532b31808SJens Wiklander * mbedtls_ssl_get_session_pointer() has been removed, and 160632b31808SJens Wiklander mbedtls_ssl_{set,get}_session() may now only be called once for any given 160732b31808SJens Wiklander SSL context. 160832b31808SJens Wiklander 160932b31808SJens WiklanderDefault behavior changes 161032b31808SJens Wiklander * Enable by default the functionalities which have no reason to be disabled. 161132b31808SJens Wiklander They are: ARIA block cipher, CMAC mode, elliptic curve J-PAKE library and 161232b31808SJens Wiklander Key Wrapping mode as defined in NIST SP 800-38F. Fixes #4036. 161332b31808SJens Wiklander * Some default policies for X.509 certificate verification and TLS have 161432b31808SJens Wiklander changed: curves and hashes weaker than 255 bits are no longer accepted 161532b31808SJens Wiklander by default. The default order in TLS now favors faster curves over larger 161632b31808SJens Wiklander curves. 16177901324dSJerome Forissier 16187901324dSJerome ForissierRequirement changes 16197901324dSJerome Forissier * The library now uses the %zu format specifier with the printf() family of 16207901324dSJerome Forissier functions, so requires a toolchain that supports it. This change does not 16217901324dSJerome Forissier affect the maintained LTS branches, so when contributing changes please 16227901324dSJerome Forissier bear this in mind and do not add them to backported code. 162332b31808SJens Wiklander * If you build the development version of Mbed TLS, rather than an official 162432b31808SJens Wiklander release, some configuration-independent files are now generated at build 162532b31808SJens Wiklander time rather than checked into source control. This includes some library 162632b31808SJens Wiklander source files as well as the Visual Studio solution. Perl, Python 3 and a 162732b31808SJens Wiklander C compiler for the host platform are required. See “Generated source files 162832b31808SJens Wiklander in the development branch” in README.md for more information. 162932b31808SJens Wiklander * Refresh the minimum supported versions of tools to build the 163032b31808SJens Wiklander library. CMake versions older than 3.10.2 and Python older 163132b31808SJens Wiklander than 3.6 are no longer supported. 163232b31808SJens Wiklander 163332b31808SJens WiklanderRemovals 163432b31808SJens Wiklander * Remove the MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_CERTIFICATES 163532b31808SJens Wiklander compile-time option, which was off by default. Users should not trust 163632b31808SJens Wiklander certificates signed with SHA-1 due to the known attacks against SHA-1. 163732b31808SJens Wiklander If needed, SHA-1 certificates can still be verified by using a custom 163832b31808SJens Wiklander verification profile. 163932b31808SJens Wiklander * Removed deprecated things in psa/crypto_compat.h. Fixes #4284 164032b31808SJens Wiklander * Removed deprecated functions from hashing modules. Fixes #4280. 164132b31808SJens Wiklander * Remove PKCS#11 library wrapper. PKCS#11 has limited functionality, 164232b31808SJens Wiklander lacks automated tests and has scarce documentation. Also, PSA Crypto 164332b31808SJens Wiklander provides a more flexible private key management. 164432b31808SJens Wiklander More details on PCKS#11 wrapper removal can be found in the mailing list 164532b31808SJens Wiklander https://lists.trustedfirmware.org/pipermail/mbed-tls/2020-April/000024.html 164632b31808SJens Wiklander * Remove deprecated error codes. Fix #4283 164732b31808SJens Wiklander * Remove MBEDTLS_ENABLE_WEAK_CIPHERSUITES configuration option. Fixes #4416. 164832b31808SJens Wiklander * Remove the MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_CERTIFICATES 164932b31808SJens Wiklander compile-time option. This option has been inactive for a long time. 165032b31808SJens Wiklander Please use the `lifetime` parameter of `mbedtls_ssl_ticket_setup()` 165132b31808SJens Wiklander instead. 165232b31808SJens Wiklander * Remove the following deprecated functions and constants of hex-encoded 165332b31808SJens Wiklander primes based on RFC 5114 and RFC 3526 from library code and tests: 165432b31808SJens Wiklander mbedtls_aes_encrypt(), mbedtls_aes_decrypt(), mbedtls_mpi_is_prime(), 165532b31808SJens Wiklander mbedtls_cipher_auth_encrypt(), mbedtls_cipher_auth_decrypt(), 165632b31808SJens Wiklander mbedtls_ctr_drbg_update(), mbedtls_hmac_drbg_update(), 165732b31808SJens Wiklander mbedtls_ecdsa_write_signature_det(), mbedtls_ecdsa_sign_det(), 165832b31808SJens Wiklander mbedtls_ssl_conf_dh_param(), mbedtls_ssl_get_max_frag_len(), 165932b31808SJens Wiklander MBEDTLS_DHM_RFC5114_MODP_2048_P, MBEDTLS_DHM_RFC5114_MODP_2048_G, 166032b31808SJens Wiklander MBEDTLS_DHM_RFC3526_MODP_2048_P, MBEDTLS_DHM_RFC3526_MODP_2048_G, 166132b31808SJens Wiklander MBEDTLS_DHM_RFC3526_MODP_3072_P, MBEDTLS_DHM_RFC3526_MODP_3072_G, 166232b31808SJens Wiklander MBEDTLS_DHM_RFC3526_MODP_4096_P, MBEDTLS_DHM_RFC3526_MODP_4096_G. 166332b31808SJens Wiklander Remove the deprecated file: include/mbedtls/net.h. Fixes #4282. 166432b31808SJens Wiklander * Remove MBEDTLS_SSL_MAX_CONTENT_LEN configuration option, since 166532b31808SJens Wiklander MBEDTLS_SSL_IN_CONTENT_LEN and MBEDTLS_SSL_OUT_CONTENT_LEN replace 166632b31808SJens Wiklander it. Fixes #4362. 166732b31808SJens Wiklander * Remove the MBEDTLS_SSL_RECORD_CHECKING option and enable by default its 166832b31808SJens Wiklander previous action. Fixes #4361. 166932b31808SJens Wiklander * Remove support for TLS 1.0, TLS 1.1 and DTLS 1.0, as well as support for 167032b31808SJens Wiklander CBC record splitting, fallback SCSV, and the ability to configure 167132b31808SJens Wiklander ciphersuites per version, which are no longer relevant. This removes the 167232b31808SJens Wiklander configuration options MBEDTLS_SSL_PROTO_TLS1, 167332b31808SJens Wiklander MBEDTLS_SSL_PROTO_TLS1_1, MBEDTLS_SSL_CBC_RECORD_SPLITTING and 167432b31808SJens Wiklander MBEDTLS_SSL_FALLBACK_SCSV as well as the functions 167532b31808SJens Wiklander mbedtls_ssl_conf_cbc_record_splitting(), 167632b31808SJens Wiklander mbedtls_ssl_get_key_exchange_md_ssl_tls(), mbedtls_ssl_conf_fallback(), 167732b31808SJens Wiklander and mbedtls_ssl_conf_ciphersuites_for_version(). Fixes #4286. 167832b31808SJens Wiklander * The RSA module no longer supports private-key operations with the public 167932b31808SJens Wiklander key and vice versa. 168032b31808SJens Wiklander * Remove the MBEDTLS_SSL_DTLS_BADMAC_LIMIT config.h option. Fixes #4403. 168132b31808SJens Wiklander * Remove all the 3DES ciphersuites: 168232b31808SJens Wiklander MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA, 168332b31808SJens Wiklander MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, 168432b31808SJens Wiklander MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, 168532b31808SJens Wiklander MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA, 168632b31808SJens Wiklander MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, 168732b31808SJens Wiklander MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, 168832b31808SJens Wiklander MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA, 168932b31808SJens Wiklander MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA, 169032b31808SJens Wiklander MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA. Remove the 169132b31808SJens Wiklander MBEDTLS_REMOVE_3DES_CIPHERSUITES option which is no longer relevant. 169232b31808SJens Wiklander Fixes #4367. 169332b31808SJens Wiklander * Remove the MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 option and let the code 169432b31808SJens Wiklander behave as if it was always disabled. Fixes #4386. 169532b31808SJens Wiklander * Remove MBEDTLS_ECDH_LEGACY_CONTEXT config option since this was purely for 169632b31808SJens Wiklander backward compatibility which is no longer supported. Addresses #4404. 169732b31808SJens Wiklander * Remove the following macros: MBEDTLS_CHECK_PARAMS, 169832b31808SJens Wiklander MBEDTLS_CHECK_PARAMS_ASSERT, MBEDTLS_PARAM_FAILED, 169932b31808SJens Wiklander MBEDTLS_PARAM_FAILED_ALT. Fixes #4313. 170032b31808SJens Wiklander * Remove the MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION config.h 170132b31808SJens Wiklander option. The mbedtls_x509_crt_parse_der_with_ext_cb() is the way to go for 170232b31808SJens Wiklander migration path. Fixes #4378. 170332b31808SJens Wiklander * Remove the MBEDTLS_X509_CHECK_KEY_USAGE and 170432b31808SJens Wiklander MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE config.h options and let the code 170532b31808SJens Wiklander behave as if they were always enabled. Fixes #4405. 170632b31808SJens Wiklander * MBEDTLS_ECP_MAX_BITS is no longer a configuration option because it is 170732b31808SJens Wiklander now determined automatically based on supported curves. 170832b31808SJens Wiklander * Remove the following functions: mbedtls_timing_self_test(), 170932b31808SJens Wiklander mbedtls_hardclock_poll(), mbedtls_timing_hardclock() and 171032b31808SJens Wiklander mbedtls_set_alarm(). Fixes #4083. 171132b31808SJens Wiklander * The configuration option MBEDTLS_ECP_NO_INTERNAL_RNG has been removed as 171232b31808SJens Wiklander it no longer had any effect. 171332b31808SJens Wiklander * Remove all support for MD2, MD4, RC4, Blowfish and XTEA. This removes the 171432b31808SJens Wiklander corresponding modules and all their APIs and related configuration 171532b31808SJens Wiklander options. Fixes #4084. 171632b31808SJens Wiklander * Remove MBEDTLS_SSL_TRUNCATED_HMAC and also remove 171732b31808SJens Wiklander MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT config option. Users are better served by 171832b31808SJens Wiklander using a CCM-8 ciphersuite than a CBC ciphersuite with truncated HMAC. 171932b31808SJens Wiklander See issue #4341 for more details. 172032b31808SJens Wiklander * Remove the compile-time option 172132b31808SJens Wiklander MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_KEY_EXCHANGE. 17227901324dSJerome Forissier 17237901324dSJerome ForissierFeatures 17247901324dSJerome Forissier * Add mbedtls_rsa_rsassa_pss_sign_ext() function allowing to generate a 17257901324dSJerome Forissier signature with a specific salt length. This function allows to validate 17267901324dSJerome Forissier test cases provided in the NIST's CAVP test suite. Contributed by Cédric 17277901324dSJerome Forissier Meuter in PR #3183. 17287901324dSJerome Forissier * Added support for built-in driver keys through the PSA opaque crypto 17297901324dSJerome Forissier driver interface. Refer to the documentation of 17307901324dSJerome Forissier MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS for more information. 17317901324dSJerome Forissier * Implement psa_sign_message() and psa_verify_message(). 173232b31808SJens Wiklander * The multi-part GCM interface (mbedtls_gcm_update() or 173332b31808SJens Wiklander mbedtls_cipher_update()) no longer requires the size of partial inputs to 173432b31808SJens Wiklander be a multiple of 16. 173532b31808SJens Wiklander * The multi-part GCM interface now supports chunked associated data through 173632b31808SJens Wiklander multiple calls to mbedtls_gcm_update_ad(). 17377901324dSJerome Forissier * The new function mbedtls_mpi_random() generates a random value in a 17387901324dSJerome Forissier given range uniformly. 173932b31808SJens Wiklander * Alternative implementations of the AES, DHM, ECJPAKE, ECP, RSA and timing 174032b31808SJens Wiklander modules had undocumented constraints on their context types. These 174132b31808SJens Wiklander constraints have been relaxed. 174232b31808SJens Wiklander See docs/architecture/alternative-implementations.md for the remaining 174332b31808SJens Wiklander constraints. 174432b31808SJens Wiklander * The new functions mbedtls_dhm_get_len() and mbedtls_dhm_get_bitlen() 174532b31808SJens Wiklander query the size of the modulus in a Diffie-Hellman context. 174632b31808SJens Wiklander * The new function mbedtls_dhm_get_value() copy a field out of a 174732b31808SJens Wiklander Diffie-Hellman context. 174832b31808SJens Wiklander * Use the new function mbedtls_ecjpake_set_point_format() to select the 174932b31808SJens Wiklander point format for ECJPAKE instead of accessing the point_format field 175032b31808SJens Wiklander directly, which is no longer supported. 17517901324dSJerome Forissier * Implement psa_mac_compute() and psa_mac_verify() as defined in the 17527901324dSJerome Forissier PSA Cryptograpy API 1.0.0 specification. 17537901324dSJerome Forissier 17547901324dSJerome ForissierSecurity 17557901324dSJerome Forissier * Fix a bias in the generation of finite-field Diffie-Hellman-Merkle (DHM) 17567901324dSJerome Forissier private keys and of blinding values for DHM and elliptic curves (ECP) 17577901324dSJerome Forissier computations. Reported by FlorianF89 in #4245. 17587901324dSJerome Forissier * Fix a potential side channel vulnerability in ECDSA ephemeral key generation. 17597901324dSJerome Forissier An adversary who is capable of very precise timing measurements could 17607901324dSJerome Forissier learn partial information about the leading bits of the nonce used for the 17617901324dSJerome Forissier signature, allowing the recovery of the private key after observing a 17627901324dSJerome Forissier large number of signature operations. This completes a partial fix in 17637901324dSJerome Forissier Mbed TLS 2.20.0. 176432b31808SJens Wiklander * Fix an issue where an adversary with access to precise enough information 176532b31808SJens Wiklander about memory accesses (typically, an untrusted operating system attacking 176632b31808SJens Wiklander a secure enclave) could recover an RSA private key after observing the 176732b31808SJens Wiklander victim performing a single private-key operation. Found and reported by 17687901324dSJerome Forissier Zili KOU, Wenjian HE, Sharad Sinha, and Wei ZHANG. 176932b31808SJens Wiklander * Fix an issue where an adversary with access to precise enough timing 177032b31808SJens Wiklander information (typically, a co-located process) could recover a Curve25519 177132b31808SJens Wiklander or Curve448 static ECDH key after inputting a chosen public key and 177232b31808SJens Wiklander observing the victim performing the corresponding private-key operation. 177332b31808SJens Wiklander Found and reported by Leila Batina, Lukas Chmielewski, Björn Haase, Niels 177432b31808SJens Wiklander Samwel and Peter Schwabe. 17757901324dSJerome Forissier 17767901324dSJerome ForissierBugfix 17777901324dSJerome Forissier * Fix premature fopen() call in mbedtls_entropy_write_seed_file which may 177832b31808SJens Wiklander lead to the seed file corruption in case if the path to the seed file is 17797901324dSJerome Forissier equal to MBEDTLS_PLATFORM_STD_NV_SEED_FILE. Contributed by Victor 17807901324dSJerome Forissier Krasnoshchok in #3616. 17817901324dSJerome Forissier * PSA functions creating a key now return PSA_ERROR_INVALID_ARGUMENT rather 17827901324dSJerome Forissier than PSA_ERROR_INVALID_HANDLE when the identifier specified for the key 17837901324dSJerome Forissier to create is not valid, bringing them in line with version 1.0.0 of the 17847901324dSJerome Forissier specification. Fix #4271. 178532b31808SJens Wiklander * Add printf function attributes to mbedtls_debug_print_msg to ensure we 178632b31808SJens Wiklander get printf format specifier warnings. 178732b31808SJens Wiklander * PSA functions other than psa_open_key now return PSA_ERROR_INVALID_HANDLE 178832b31808SJens Wiklander rather than PSA_ERROR_DOES_NOT_EXIST for an invalid handle, bringing them 178932b31808SJens Wiklander in line with version 1.0.0 of the specification. Fix #4162. 179032b31808SJens Wiklander * Fix a bug in ECDSA that would cause it to fail when the hash is all-bits 179132b31808SJens Wiklander zero. Fixes #1792 17927901324dSJerome Forissier * Fix some cases in the bignum module where the library constructed an 17937901324dSJerome Forissier unintended representation of the value 0 which was not processed 17947901324dSJerome Forissier correctly by some bignum operations. This could happen when 17957901324dSJerome Forissier mbedtls_mpi_read_string() was called on "-0", or when 17967901324dSJerome Forissier mbedtls_mpi_mul_mpi() and mbedtls_mpi_mul_int() was called with one of 17977901324dSJerome Forissier the arguments being negative and the other being 0. Fixes #4643. 17987901324dSJerome Forissier * Fix a compilation error when MBEDTLS_ECP_RANDOMIZE_MXZ_ALT is 17997901324dSJerome Forissier defined. Fixes #4217. 18007901324dSJerome Forissier * Fix an incorrect error code when parsing a PKCS#8 private key. 18017901324dSJerome Forissier * In a TLS client, enforce the Diffie-Hellman minimum parameter size 18027901324dSJerome Forissier set with mbedtls_ssl_conf_dhm_min_bitlen() precisely. Before, the 18037901324dSJerome Forissier minimum size was rounded down to the nearest multiple of 8. 18047901324dSJerome Forissier * In library/net_sockets.c, _POSIX_C_SOURCE and _XOPEN_SOURCE are 18057901324dSJerome Forissier defined to specific values. If the code is used in a context 18067901324dSJerome Forissier where these are already defined, this can result in a compilation 18077901324dSJerome Forissier error. Instead, assume that if they are defined, the values will 18087901324dSJerome Forissier be adequate to build Mbed TLS. 180932b31808SJens Wiklander * With MBEDTLS_PSA_CRYPTO_C disabled, some functions were getting built 181032b31808SJens Wiklander nonetheless, resulting in undefined reference errors when building a 181132b31808SJens Wiklander shared library. Reported by Guillermo Garcia M. in #4411. 18127901324dSJerome Forissier * The cipher suite TLS-RSA-WITH-CAMELLIA-256-GCM-SHA384 was not available 18137901324dSJerome Forissier when SHA-1 was disabled and was offered when SHA-1 was enabled but SHA-384 18147901324dSJerome Forissier was disabled. Fix the dependency. Fixes #4472. 18157901324dSJerome Forissier * Do not offer SHA384 cipher suites when SHA-384 is disabled. Fixes #4499. 18167901324dSJerome Forissier * Fix test suite code on platforms where int32_t is not int, such as 18177901324dSJerome Forissier Arm Cortex-M. Fixes #4530. 18187901324dSJerome Forissier * Fix some issues affecting MBEDTLS_ARIA_ALT implementations: a misplaced 18197901324dSJerome Forissier directive in a header and a missing initialization in the self-test. 18207901324dSJerome Forissier * Fix a missing initialization in the Camellia self-test, affecting 18217901324dSJerome Forissier MBEDTLS_CAMELLIA_ALT implementations. 18227901324dSJerome Forissier * Restore the ability to configure PSA via Mbed TLS options to support RSA 18237901324dSJerome Forissier key pair operations but exclude RSA key generation. When MBEDTLS_GENPRIME 18247901324dSJerome Forissier is not defined PSA will no longer attempt to use mbedtls_rsa_gen_key(). 18257901324dSJerome Forissier Fixes #4512. 18267901324dSJerome Forissier * Fix a regression introduced in 2.24.0 which broke (D)TLS CBC ciphersuites 18277901324dSJerome Forissier (when the encrypt-then-MAC extension is not in use) with some ALT 18287901324dSJerome Forissier implementations of the underlying hash (SHA-1, SHA-256, SHA-384), causing 18297901324dSJerome Forissier the affected side to wrongly reject valid messages. Fixes #4118. 18307901324dSJerome Forissier * Remove outdated check-config.h check that prevented implementing the 18317901324dSJerome Forissier timing module on Mbed OS. Fixes #4633. 18327901324dSJerome Forissier * Fix PSA_ALG_TLS12_PRF and PSA_ALG_TLS12_PSK_TO_MS being too permissive 18337901324dSJerome Forissier about missing inputs. 18347901324dSJerome Forissier * Fix mbedtls_net_poll() and mbedtls_net_recv_timeout() often failing with 18357901324dSJerome Forissier MBEDTLS_ERR_NET_POLL_FAILED on Windows. Fixes #4465. 18367901324dSJerome Forissier * Fix a resource leak in a test suite with an alternative AES 18377901324dSJerome Forissier implementation. Fixes #4176. 18387901324dSJerome Forissier * Fix a crash in mbedtls_mpi_debug_mpi on a bignum having 0 limbs. This 18397901324dSJerome Forissier could notably be triggered by setting the TLS debug level to 3 or above 18407901324dSJerome Forissier and using a Montgomery curve for the key exchange. Reported by lhuang04 18417901324dSJerome Forissier in #4578. Fixes #4608. 18427901324dSJerome Forissier * psa_verify_hash() was relying on implementation-specific behavior of 18437901324dSJerome Forissier mbedtls_rsa_rsassa_pss_verify() and was causing failures in some _ALT 18447901324dSJerome Forissier implementations. This reliance is now removed. Fixes #3990. 18457901324dSJerome Forissier * Disallow inputs of length different from the corresponding hash when 18467901324dSJerome Forissier signing or verifying with PSA_ALG_RSA_PSS (The PSA Crypto API mandates 18477901324dSJerome Forissier that PSA_ALG_RSA_PSS uses the same hash throughout the algorithm.) 18487901324dSJerome Forissier * Fix a null pointer dereference when mbedtls_mpi_exp_mod() was called with 18497901324dSJerome Forissier A=0 represented with 0 limbs. Up to and including Mbed TLS 2.26, this bug 18507901324dSJerome Forissier could not be triggered by code that constructed A with one of the 18517901324dSJerome Forissier mbedtls_mpi_read_xxx functions (including in particular TLS code) since 18527901324dSJerome Forissier those always built an mpi object with at least one limb. 18537901324dSJerome Forissier Credit to OSS-Fuzz. Fixes #4641. 18547901324dSJerome Forissier * Fix mbedtls_mpi_gcd(G,A,B) when the value of B is zero. This had no 18557901324dSJerome Forissier effect on Mbed TLS's internal use of mbedtls_mpi_gcd(), but may affect 18567901324dSJerome Forissier applications that call mbedtls_mpi_gcd() directly. Fixes #4642. 18577901324dSJerome Forissier * The PSA API no longer allows the creation or destruction of keys with a 18587901324dSJerome Forissier read-only lifetime. The persistence level PSA_KEY_PERSISTENCE_READ_ONLY 18597901324dSJerome Forissier can now only be used as intended, for keys that cannot be modified through 18607901324dSJerome Forissier normal use of the API. 18617901324dSJerome Forissier * When MBEDTLS_PSA_CRYPTO_SPM is enabled, crypto_spe.h was not included 18627901324dSJerome Forissier in all the right places. Include it from crypto_platform.h, which is 18637901324dSJerome Forissier the natural place. Fixes #4649. 18647901324dSJerome Forissier * Fix which alert is sent in some cases to conform to the 18657901324dSJerome Forissier applicable RFC: on an invalid Finished message value, an 18667901324dSJerome Forissier invalid max_fragment_length extension, or an 18677901324dSJerome Forissier unsupported extension used by the server. 18687901324dSJerome Forissier * Correct (change from 12 to 13 bytes) the value of the macro describing the 18697901324dSJerome Forissier maximum nonce length returned by psa_aead_generate_nonce(). 18707901324dSJerome Forissier 18717901324dSJerome ForissierChanges 18727901324dSJerome Forissier * Fix the setting of the read timeout in the DTLS sample programs. 187332b31808SJens Wiklander * Add extra printf compiler warning flags to builds. 187432b31808SJens Wiklander * Fix memsan build false positive in x509_crt.c with clang 11 18757901324dSJerome Forissier * Alternative implementations of CMAC may now opt to not support 3DES as a 18767901324dSJerome Forissier CMAC block cipher, and still pass the CMAC self test. 187732b31808SJens Wiklander * Remove the AES sample application programs/aes/aescrypt2 which shows 187832b31808SJens Wiklander bad cryptographic practice. Fix #1906. 187932b31808SJens Wiklander * Remove configs/config-psa-crypto.h, which no longer had any intended 188032b31808SJens Wiklander differences from the default configuration, but had accidentally diverged. 18817901324dSJerome Forissier * When building the test suites with GNU make, invoke python3 or python, not 18827901324dSJerome Forissier python2, which is no longer supported upstream. 188332b31808SJens Wiklander * fix build failure on MinGW toolchain when __USE_MING_ANSI_STDIO is on. 18847901324dSJerome Forissier When that flag is on, standard GNU C printf format specifiers 18857901324dSJerome Forissier should be used. 188632b31808SJens Wiklander * Replace MBEDTLS_SSL_CID_PADDING_GRANULARITY and 188732b31808SJens Wiklander MBEDTLS_SSL_TLS1_3_PADDING_GRANULARITY with a new single unified option 188832b31808SJens Wiklander MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY. Fixes #4335. 18897901324dSJerome Forissier * Reduce the default value of MBEDTLS_ECP_WINDOW_SIZE. This reduces RAM usage 18907901324dSJerome Forissier during ECC operations at a negligible performance cost. 18917901324dSJerome Forissier * mbedtls_mpi_read_binary(), mbedtls_mpi_read_binary_le() and 18927901324dSJerome Forissier mbedtls_mpi_read_string() now construct an mbedtls_mpi object with 0 limbs 18937901324dSJerome Forissier when their input has length 0. Note that this is an implementation detail 18947901324dSJerome Forissier and can change at any time, so this change should be transparent, but it 18957901324dSJerome Forissier may result in mbedtls_mpi_write_binary() or mbedtls_mpi_write_string() 18967901324dSJerome Forissier now writing an empty string where it previously wrote one or more 18977901324dSJerome Forissier zero digits when operating from values constructed with an mpi_read 18987901324dSJerome Forissier function and some mpi operations. 189932b31808SJens Wiklander * Add CMake package config generation for CMake projects consuming Mbed TLS. 190032b31808SJens Wiklander * config.h has been split into build_info.h and mbedtls_config.h 190132b31808SJens Wiklander build_info.h is intended to be included from C code directly, while 190232b31808SJens Wiklander mbedtls_config.h is intended to be edited by end users wishing to 190332b31808SJens Wiklander change the build configuration, and should generally only be included from 190432b31808SJens Wiklander build_info.h. 190532b31808SJens Wiklander * The handling of MBEDTLS_CONFIG_FILE has been moved into build_info.h. 190632b31808SJens Wiklander * A config file version symbol, MBEDTLS_CONFIG_VERSION was introduced. 190732b31808SJens Wiklander Defining it to a particular value will ensure that Mbed TLS interprets 190832b31808SJens Wiklander the config file in a way that's compatible with the config file format 190932b31808SJens Wiklander used by the Mbed TLS release whose MBEDTLS_VERSION_NUMBER has the same 191032b31808SJens Wiklander value. 191132b31808SJens Wiklander The only value supported by Mbed TLS 3.0.0 is 0x03000000. 191232b31808SJens Wiklander * Various changes to which alert and/or error code may be returned 191332b31808SJens Wiklander * during the TLS handshake. 19147901324dSJerome Forissier * Implicitly add PSA_KEY_USAGE_SIGN_MESSAGE key usage policy flag when 19157901324dSJerome Forissier PSA_KEY_USAGE_SIGN_HASH flag is set and PSA_KEY_USAGE_VERIFY_MESSAGE flag 19167901324dSJerome Forissier when PSA_KEY_USAGE_VERIFY_HASH flag is set. This usage flag extension 19177901324dSJerome Forissier is also applied when loading a key from storage. 19187901324dSJerome Forissier 19197901324dSJerome Forissier= mbed TLS 2.26.0 branch released 2021-03-08 19207901324dSJerome Forissier 19217901324dSJerome ForissierAPI changes 19227901324dSJerome Forissier * Renamed the PSA Crypto API output buffer size macros to bring them in line 19237901324dSJerome Forissier with version 1.0.0 of the specification. 19247901324dSJerome Forissier * The API glue function mbedtls_ecc_group_of_psa() now takes the curve size 19257901324dSJerome Forissier in bits rather than bytes, with an additional flag to indicate if the 19267901324dSJerome Forissier size may have been rounded up to a whole number of bytes. 19277901324dSJerome Forissier * Renamed the PSA Crypto API AEAD tag length macros to bring them in line 19287901324dSJerome Forissier with version 1.0.0 of the specification. 19297901324dSJerome Forissier 19307901324dSJerome ForissierDefault behavior changes 19317901324dSJerome Forissier * In mbedtls_rsa_context objects, the ver field was formerly documented 19327901324dSJerome Forissier as always 0. It is now reserved for internal purposes and may take 19337901324dSJerome Forissier different values. 19347901324dSJerome Forissier 19357901324dSJerome ForissierNew deprecations 19367901324dSJerome Forissier * PSA_KEY_EXPORT_MAX_SIZE, PSA_HASH_SIZE, PSA_MAC_FINAL_SIZE, 19377901324dSJerome Forissier PSA_BLOCK_CIPHER_BLOCK_SIZE, PSA_MAX_BLOCK_CIPHER_BLOCK_SIZE and 19387901324dSJerome Forissier PSA_ALG_TLS12_PSK_TO_MS_MAX_PSK_LEN have been renamed, and the old names 19397901324dSJerome Forissier deprecated. 19407901324dSJerome Forissier * PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH and PSA_ALG_AEAD_WITH_TAG_LENGTH 19417901324dSJerome Forissier have been renamed, and the old names deprecated. 19427901324dSJerome Forissier 19437901324dSJerome ForissierFeatures 19447901324dSJerome Forissier * The PSA crypto subsystem can now use HMAC_DRBG instead of CTR_DRBG. 19457901324dSJerome Forissier CTR_DRBG is used by default if it is available, but you can override 19467901324dSJerome Forissier this choice by setting MBEDTLS_PSA_HMAC_DRBG_MD_TYPE at compile time. 19477901324dSJerome Forissier Fix #3354. 19487901324dSJerome Forissier * Automatic fallback to a software implementation of ECP when 19497901324dSJerome Forissier MBEDTLS_ECP_xxx_ALT accelerator hooks are in use can now be turned off 19507901324dSJerome Forissier through setting the new configuration flag MBEDTLS_ECP_NO_FALLBACK. 19517901324dSJerome Forissier * The PSA crypto subsystem can now be configured to use less static RAM by 19527901324dSJerome Forissier tweaking the setting for the maximum amount of keys simultaneously in RAM. 19537901324dSJerome Forissier MBEDTLS_PSA_KEY_SLOT_COUNT sets the maximum number of volatile keys that 19547901324dSJerome Forissier can exist simultaneously. It has a sensible default if not overridden. 19557901324dSJerome Forissier * Partial implementation of the PSA crypto driver interface: Mbed TLS can 19567901324dSJerome Forissier now use an external random generator instead of the library's own 19577901324dSJerome Forissier entropy collection and DRBG code. Enable MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG 19587901324dSJerome Forissier and see the documentation of mbedtls_psa_external_get_random() for details. 19597901324dSJerome Forissier * Applications using both mbedtls_xxx and psa_xxx functions (for example, 19607901324dSJerome Forissier applications using TLS and MBEDTLS_USE_PSA_CRYPTO) can now use the PSA 19617901324dSJerome Forissier random generator with mbedtls_xxx functions. See the documentation of 19627901324dSJerome Forissier mbedtls_psa_get_random() for details. 19637901324dSJerome Forissier * In the PSA API, the policy for a MAC or AEAD algorithm can specify a 19647901324dSJerome Forissier minimum MAC or tag length thanks to the new wildcards 19657901324dSJerome Forissier PSA_ALG_AT_LEAST_THIS_LENGTH_MAC and 19667901324dSJerome Forissier PSA_ALG_AEAD_WITH_AT_LEAST_THIS_LENGTH_TAG. 19677901324dSJerome Forissier 19687901324dSJerome ForissierSecurity 19697901324dSJerome Forissier * Fix a security reduction in CTR_DRBG when the initial seeding obtained a 19707901324dSJerome Forissier nonce from entropy. Applications were affected if they called 19717901324dSJerome Forissier mbedtls_ctr_drbg_set_nonce_len(), if they called 19727901324dSJerome Forissier mbedtls_ctr_drbg_set_entropy_len() with a size that was 3/2 times the key 19737901324dSJerome Forissier length, or when the entropy module uses SHA-256 and CTR_DRBG uses AES-256. 19747901324dSJerome Forissier In such cases, a random nonce was necessary to achieve the advertised 19757901324dSJerome Forissier security strength, but the code incorrectly used a constant instead of 19767901324dSJerome Forissier entropy from the nonce. 19777901324dSJerome Forissier Found by John Stroebel in #3819 and fixed in #3973. 19787901324dSJerome Forissier * Fix a buffer overflow in mbedtls_mpi_sub_abs() when calculating 19797901324dSJerome Forissier |A| - |B| where |B| is larger than |A| and has more limbs (so the 19807901324dSJerome Forissier function should return MBEDTLS_ERR_MPI_NEGATIVE_VALUE). Only 19817901324dSJerome Forissier applications calling mbedtls_mpi_sub_abs() directly are affected: 19827901324dSJerome Forissier all calls inside the library were safe since this function is 19837901324dSJerome Forissier only called with |A| >= |B|. Reported by Guido Vranken in #4042. 19847901324dSJerome Forissier * Fix an errorneous estimation for an internal buffer in 19857901324dSJerome Forissier mbedtls_pk_write_key_pem(). If MBEDTLS_MPI_MAX_SIZE is set to an odd 19867901324dSJerome Forissier value the function might fail to write a private RSA keys of the largest 19877901324dSJerome Forissier supported size. 19887901324dSJerome Forissier Found by Daniel Otte, reported in #4093 and fixed in #4094. 19897901324dSJerome Forissier * Fix a stack buffer overflow with mbedtls_net_poll() and 19907901324dSJerome Forissier mbedtls_net_recv_timeout() when given a file descriptor that is 19917901324dSJerome Forissier beyond FD_SETSIZE. Reported by FigBug in #4169. 19927901324dSJerome Forissier * Guard against strong local side channel attack against base64 tables by 19937901324dSJerome Forissier making access aceess to them use constant flow code. 19947901324dSJerome Forissier 19957901324dSJerome ForissierBugfix 19967901324dSJerome Forissier * Fix use-after-scope error in programs/ssl/ssl_client2.c and ssl_server2.c 19977901324dSJerome Forissier * Fix memory leak that occured when calling psa_close_key() on a 19987901324dSJerome Forissier wrapped key with MBEDTLS_PSA_CRYPTO_SE_C defined. 19997901324dSJerome Forissier * Fix an incorrect error code if an RSA private operation glitched. 20007901324dSJerome Forissier * Fix a memory leak in an error case in psa_generate_derived_key_internal(). 20017901324dSJerome Forissier * Fix a resource leak in CTR_DRBG and HMAC_DRBG when MBEDTLS_THREADING_C 20027901324dSJerome Forissier is enabled, on platforms where initializing a mutex allocates resources. 20037901324dSJerome Forissier This was a regression introduced in the previous release. Reported in 20047901324dSJerome Forissier #4017, #4045 and #4071. 20057901324dSJerome Forissier * Ensure that calling mbedtls_rsa_free() or mbedtls_entropy_free() 20067901324dSJerome Forissier twice is safe. This happens for RSA when some Mbed TLS library functions 20077901324dSJerome Forissier fail. Such a double-free was not safe when MBEDTLS_THREADING_C was 20087901324dSJerome Forissier enabled on platforms where freeing a mutex twice is not safe. 20097901324dSJerome Forissier * Fix a resource leak in a bad-arguments case of mbedtls_rsa_gen_key() 20107901324dSJerome Forissier when MBEDTLS_THREADING_C is enabled on platforms where initializing 20117901324dSJerome Forissier a mutex allocates resources. 20127901324dSJerome Forissier * Fixes a bug where, if the library was configured to include support for 20137901324dSJerome Forissier both the old SE interface and the new PSA driver interface, external keys were 20147901324dSJerome Forissier not loaded from storage. This was fixed by #3996. 20157901324dSJerome Forissier * This change makes 'mbedtls_x509write_crt_set_basic_constraints' 20167901324dSJerome Forissier consistent with RFC 5280 4.2.1.9 which says: "Conforming CAs MUST 20177901324dSJerome Forissier include this extension in all CA certificates that contain public keys 20187901324dSJerome Forissier used to validate digital signatures on certificates and MUST mark the 20197901324dSJerome Forissier extension as critical in such certificates." Previous to this change, 20207901324dSJerome Forissier the extension was always marked as non-critical. This was fixed by 20217901324dSJerome Forissier #3698. 20227901324dSJerome Forissier 20237901324dSJerome ForissierChanges 20247901324dSJerome Forissier * A new library C file psa_crypto_client.c has been created to contain 20257901324dSJerome Forissier the PSA code needed by a PSA crypto client when the PSA crypto 20267901324dSJerome Forissier implementation is not included into the library. 20277901324dSJerome Forissier * On recent enough versions of FreeBSD and DragonFlyBSD, the entropy module 20287901324dSJerome Forissier now uses the getrandom syscall instead of reading from /dev/urandom. 20297901324dSJerome Forissier 20307901324dSJerome Forissier= mbed TLS 2.25.0 branch released 2020-12-11 20317901324dSJerome Forissier 20327901324dSJerome ForissierAPI changes 20337901324dSJerome Forissier * The numerical values of the PSA Crypto API macros have been updated to 20347901324dSJerome Forissier conform to version 1.0.0 of the specification. 20357901324dSJerome Forissier * PSA_ALG_STREAM_CIPHER replaces PSA_ALG_CHACHA20 and PSA_ALG_ARC4. 20367901324dSJerome Forissier The underlying stream cipher is determined by the key type 20377901324dSJerome Forissier (PSA_KEY_TYPE_CHACHA20 or PSA_KEY_TYPE_ARC4). 20387901324dSJerome Forissier * The functions mbedtls_cipher_auth_encrypt() and 20397901324dSJerome Forissier mbedtls_cipher_auth_decrypt() no longer accept NIST_KW contexts, 20407901324dSJerome Forissier as they have no way to check if the output buffer is large enough. 20417901324dSJerome Forissier Please use mbedtls_cipher_auth_encrypt_ext() and 20427901324dSJerome Forissier mbedtls_cipher_auth_decrypt_ext() instead. Credit to OSS-Fuzz and 20437901324dSJerome Forissier Cryptofuzz. Fixes #3665. 20447901324dSJerome Forissier 20457901324dSJerome ForissierRequirement changes 20467901324dSJerome Forissier * Update the minimum required CMake version to 2.8.12. This silences a 20477901324dSJerome Forissier warning on CMake 3.19.0. #3801 20487901324dSJerome Forissier 20497901324dSJerome ForissierNew deprecations 20507901324dSJerome Forissier * PSA_ALG_CHACHA20 and PSA_ALG_ARC4 have been deprecated. 20517901324dSJerome Forissier Use PSA_ALG_STREAM_CIPHER instead. 20527901324dSJerome Forissier * The functions mbedtls_cipher_auth_encrypt() and 20537901324dSJerome Forissier mbedtls_cipher_auth_decrypt() are deprecated in favour of the new 20547901324dSJerome Forissier functions mbedtls_cipher_auth_encrypt_ext() and 20557901324dSJerome Forissier mbedtls_cipher_auth_decrypt_ext(). Please note that with AEAD ciphers, 20567901324dSJerome Forissier these new functions always append the tag to the ciphertext, and include 20577901324dSJerome Forissier the tag in the ciphertext length. 20587901324dSJerome Forissier 20597901324dSJerome ForissierFeatures 20607901324dSJerome Forissier * Partial implementation of the new PSA Crypto accelerator APIs. (Symmetric 20617901324dSJerome Forissier ciphers, asymmetric signing/verification and key generation, validate_key 20627901324dSJerome Forissier entry point, and export_public_key interface.) 20637901324dSJerome Forissier * Add support for ECB to the PSA cipher API. 20647901324dSJerome Forissier * In PSA, allow using a key declared with a base key agreement algorithm 20657901324dSJerome Forissier in combined key agreement and derivation operations, as long as the key 20667901324dSJerome Forissier agreement algorithm in use matches the algorithm the key was declared with. 20677901324dSJerome Forissier This is currently non-standard behaviour, but expected to make it into a 20687901324dSJerome Forissier future revision of the PSA Crypto standard. 20697901324dSJerome Forissier * Add MBEDTLS_TARGET_PREFIX CMake variable, which is prefixed to the mbedtls, 20707901324dSJerome Forissier mbedcrypto, mbedx509 and apidoc CMake target names. This can be used by 20717901324dSJerome Forissier external CMake projects that include this one to avoid CMake target name 20727901324dSJerome Forissier clashes. The default value of this variable is "", so default target names 20737901324dSJerome Forissier are unchanged. 20747901324dSJerome Forissier * Add support for DTLS-SRTP as defined in RFC 5764. Contributed by Johan 20757901324dSJerome Forissier Pascal, improved by Ron Eldor. 20767901324dSJerome Forissier * In the PSA API, it is no longer necessary to open persistent keys: 20777901324dSJerome Forissier operations now accept the key identifier. The type psa_key_handle_t is now 20787901324dSJerome Forissier identical to psa_key_id_t instead of being platform-defined. This bridges 20797901324dSJerome Forissier the last major gap to compliance with the PSA Cryptography specification 20807901324dSJerome Forissier version 1.0.0. Opening persistent keys is still supported for backward 20817901324dSJerome Forissier compatibility, but will be deprecated and later removed in future 20827901324dSJerome Forissier releases. 20837901324dSJerome Forissier * PSA_AEAD_NONCE_LENGTH, PSA_AEAD_NONCE_MAX_SIZE, PSA_CIPHER_IV_LENGTH and 20847901324dSJerome Forissier PSA_CIPHER_IV_MAX_SIZE macros have been added as defined in version 20857901324dSJerome Forissier 1.0.0 of the PSA Crypto API specification. 20867901324dSJerome Forissier 20877901324dSJerome ForissierSecurity 20887901324dSJerome Forissier * The functions mbedtls_cipher_auth_encrypt() and 20897901324dSJerome Forissier mbedtls_cipher_auth_decrypt() would write past the minimum documented 20907901324dSJerome Forissier size of the output buffer when used with NIST_KW. As a result, code using 20917901324dSJerome Forissier those functions as documented with NIST_KW could have a buffer overwrite 20927901324dSJerome Forissier of up to 15 bytes, with consequences ranging up to arbitrary code 20937901324dSJerome Forissier execution depending on the location of the output buffer. 20947901324dSJerome Forissier * Limit the size of calculations performed by mbedtls_mpi_exp_mod to 20957901324dSJerome Forissier MBEDTLS_MPI_MAX_SIZE to prevent a potential denial of service when 20967901324dSJerome Forissier generating Diffie-Hellman key pairs. Credit to OSS-Fuzz. 20977901324dSJerome Forissier * A failure of the random generator was ignored in mbedtls_mpi_fill_random(), 20987901324dSJerome Forissier which is how most uses of randomization in asymmetric cryptography 20997901324dSJerome Forissier (including key generation, intermediate value randomization and blinding) 21007901324dSJerome Forissier are implemented. This could cause failures or the silent use of non-random 21017901324dSJerome Forissier values. A random generator can fail if it needs reseeding and cannot not 21027901324dSJerome Forissier obtain entropy, or due to an internal failure (which, for Mbed TLS's own 21037901324dSJerome Forissier CTR_DRBG or HMAC_DRBG, can only happen due to a misconfiguration). 21047901324dSJerome Forissier * Fix a compliance issue whereby we were not checking the tag on the 21057901324dSJerome Forissier algorithm parameters (only the size) when comparing the signature in the 21067901324dSJerome Forissier description part of the cert to the real signature. This meant that a 21077901324dSJerome Forissier NULL algorithm parameters entry would look identical to an array of REAL 21087901324dSJerome Forissier (size zero) to the library and thus the certificate would be considered 21097901324dSJerome Forissier valid. However, if the parameters do not match in *any* way then the 21107901324dSJerome Forissier certificate should be considered invalid, and indeed OpenSSL marks these 21117901324dSJerome Forissier certs as invalid when mbedtls did not. 21127901324dSJerome Forissier Many thanks to guidovranken who found this issue via differential fuzzing 21137901324dSJerome Forissier and reported it in #3629. 21147901324dSJerome Forissier * Zeroising of local buffers and variables which are used for calculations 21157901324dSJerome Forissier in mbedtls_pkcs5_pbkdf2_hmac(), mbedtls_internal_sha*_process(), 21167901324dSJerome Forissier mbedtls_internal_md*_process() and mbedtls_internal_ripemd160_process() 21177901324dSJerome Forissier functions to erase sensitive data from memory. Reported by 21187901324dSJerome Forissier Johan Malmgren and Johan Uppman Bruce from Sectra. 21197901324dSJerome Forissier 21207901324dSJerome ForissierBugfix 212132b31808SJens Wiklander * Fix an invalid (but nonzero) return code from mbedtls_pk_parse_subpubkey() 21227901324dSJerome Forissier when the input has trailing garbage. Fixes #2512. 21237901324dSJerome Forissier * Fix build failure in configurations where MBEDTLS_USE_PSA_CRYPTO is 21247901324dSJerome Forissier enabled but ECDSA is disabled. Contributed by jdurkop. Fixes #3294. 21257901324dSJerome Forissier * Include the psa_constant_names generated source code in the source tree 21267901324dSJerome Forissier instead of generating it at build time. Fixes #3524. 21277901324dSJerome Forissier * Fix rsa_prepare_blinding() to retry when the blinding value is not 21287901324dSJerome Forissier invertible (mod N), instead of returning MBEDTLS_ERR_RSA_RNG_FAILED. This 21297901324dSJerome Forissier addresses a regression but is rare in practice (approx. 1 in 2/sqrt(N)). 21307901324dSJerome Forissier Found by Synopsys Coverity, fix contributed by Peter Kolbus (Garmin). 21317901324dSJerome Forissier Fixes #3647. 21327901324dSJerome Forissier * Use socklen_t on Android and other POSIX-compliant system 21337901324dSJerome Forissier * Fix the build when the macro _GNU_SOURCE is defined to a non-empty value. 21347901324dSJerome Forissier Fix #3432. 21357901324dSJerome Forissier * Consistently return PSA_ERROR_INVALID_ARGUMENT on invalid cipher input 21367901324dSJerome Forissier sizes (instead of PSA_ERROR_BAD_STATE in some cases) to make the 21377901324dSJerome Forissier psa_cipher_* functions compliant with the PSA Crypto API specification. 21387901324dSJerome Forissier * mbedtls_ecp_curve_list() now lists Curve25519 and Curve448 under the names 21397901324dSJerome Forissier "x25519" and "x448". These curves support ECDH but not ECDSA. If you need 21407901324dSJerome Forissier only the curves that support ECDSA, filter the list with 21417901324dSJerome Forissier mbedtls_ecdsa_can_do(). 21427901324dSJerome Forissier * Fix psa_generate_key() returning an error when asked to generate 21437901324dSJerome Forissier an ECC key pair on Curve25519 or secp244k1. 21447901324dSJerome Forissier * Fix psa_key_derivation_output_key() to allow the output of a combined key 21457901324dSJerome Forissier agreement and subsequent key derivation operation to be used as a key 21467901324dSJerome Forissier inside of the PSA Crypto core. 21477901324dSJerome Forissier * Fix handling of EOF against 0xff bytes and on platforms with unsigned 21487901324dSJerome Forissier chars. Fixes a build failure on platforms where char is unsigned. Fixes 21497901324dSJerome Forissier #3794. 21507901324dSJerome Forissier * Fix an off-by-one error in the additional data length check for 21517901324dSJerome Forissier CCM, which allowed encryption with a non-standard length field. 21527901324dSJerome Forissier Fixes #3719. 21537901324dSJerome Forissier * Correct the default IV size for mbedtls_cipher_info_t structures using 21547901324dSJerome Forissier MBEDTLS_MODE_ECB to 0, since ECB mode ciphers don't use IVs. 21557901324dSJerome Forissier * Make arc4random_buf available on NetBSD and OpenBSD when _POSIX_C_SOURCE is 21567901324dSJerome Forissier defined. Fix contributed in #3571. 21577901324dSJerome Forissier * Fix conditions for including string.h in error.c. Fixes #3866. 21587901324dSJerome Forissier * psa_set_key_id() now also sets the lifetime to persistent for keys located 21597901324dSJerome Forissier in a secure element. 21607901324dSJerome Forissier * Attempting to create a volatile key with a non-zero key identifier now 21617901324dSJerome Forissier fails. Previously the key identifier was just ignored when creating a 21627901324dSJerome Forissier volatile key. 21637901324dSJerome Forissier * Attempting to create or register a key with a key identifier in the vendor 21647901324dSJerome Forissier range now fails. 21657901324dSJerome Forissier * Fix build failures on GCC 11. Fixes #3782. 21667901324dSJerome Forissier * Add missing arguments of debug message in mbedtls_ssl_decrypt_buf. 21677901324dSJerome Forissier * Fix a memory leak in mbedtls_mpi_sub_abs() when the result was negative 21687901324dSJerome Forissier (an error condition) and the second operand was aliased to the result. 21697901324dSJerome Forissier * Fix a case in elliptic curve arithmetic where an out-of-memory condition 21707901324dSJerome Forissier could go undetected, resulting in an incorrect result. 21717901324dSJerome Forissier * In CTR_DRBG and HMAC_DRBG, don't reset the reseed interval in seed(). 21727901324dSJerome Forissier Fixes #2927. 21737901324dSJerome Forissier * In PEM writing functions, fill the trailing part of the buffer with null 21747901324dSJerome Forissier bytes. This guarantees that the corresponding parsing function can read 21757901324dSJerome Forissier the buffer back, which was the case for mbedtls_x509write_{crt,csr}_pem 21767901324dSJerome Forissier until this property was inadvertently broken in Mbed TLS 2.19.0. 21777901324dSJerome Forissier Fixes #3682. 21787901324dSJerome Forissier * Fix a build failure that occurred with the MBEDTLS_AES_SETKEY_DEC_ALT 21797901324dSJerome Forissier option on. In this configuration key management methods that are required 21807901324dSJerome Forissier for MBEDTLS_CIPHER_MODE_XTS were excluded from the build and made it fail. 21817901324dSJerome Forissier Fixes #3818. Reported by John Stroebel. 21827901324dSJerome Forissier 21837901324dSJerome ForissierChanges 21847901324dSJerome Forissier * Reduce stack usage significantly during sliding window exponentiation. 21857901324dSJerome Forissier Reported in #3591 and fix contributed in #3592 by Daniel Otte. 21867901324dSJerome Forissier * The PSA persistent storage format is updated to always store the key bits 21877901324dSJerome Forissier attribute. No automatic upgrade path is provided. Previously stored keys 21887901324dSJerome Forissier must be erased, or manually upgraded based on the key storage format 21897901324dSJerome Forissier specification (docs/architecture/mbed-crypto-storage-specification.md). 21907901324dSJerome Forissier Fixes #3740. 21917901324dSJerome Forissier * Remove the zeroization of a pointer variable in AES rounds. It was valid 21927901324dSJerome Forissier but spurious and misleading since it looked like a mistaken attempt to 21937901324dSJerome Forissier zeroize the pointed-to buffer. Reported by Antonio de la Piedra, CEA 21947901324dSJerome Forissier Leti, France. 21957901324dSJerome Forissier 21967901324dSJerome Forissier= mbed TLS 2.24.0 branch released 2020-09-01 21977901324dSJerome Forissier 21987901324dSJerome ForissierAPI changes 21997901324dSJerome Forissier * In the PSA API, rename the types of elliptic curve and Diffie-Hellman 22007901324dSJerome Forissier group families to psa_ecc_family_t and psa_dh_family_t, in line with the 22017901324dSJerome Forissier PSA Crypto API specification version 1.0.0. 22027901324dSJerome Forissier Rename associated macros as well: 22037901324dSJerome Forissier PSA_ECC_CURVE_xxx renamed to PSA_ECC_FAMILY_xxx 22047901324dSJerome Forissier PSA_DH_GROUP_xxx renamed to PSA_DH_FAMILY_xxx 22057901324dSJerome Forissier PSA_KEY_TYPE_GET_CURVE renamed to to PSA_KEY_TYPE_ECC_GET_FAMILY 22067901324dSJerome Forissier PSA_KEY_TYPE_GET_GROUP renamed to PSA_KEY_TYPE_DH_GET_FAMILY 22077901324dSJerome Forissier 22087901324dSJerome ForissierDefault behavior changes 22097901324dSJerome Forissier * Stop storing persistent information about externally stored keys created 22107901324dSJerome Forissier through PSA Crypto with a volatile lifetime. Reported in #3288 and 22117901324dSJerome Forissier contributed by Steven Cooreman in #3382. 22127901324dSJerome Forissier 22137901324dSJerome ForissierFeatures 22147901324dSJerome Forissier * The new function mbedtls_ecp_write_key() exports private ECC keys back to 22157901324dSJerome Forissier a byte buffer. It is the inverse of the existing mbedtls_ecp_read_key(). 22167901324dSJerome Forissier * Support building on e2k (Elbrus) architecture: correctly enable 22177901324dSJerome Forissier -Wformat-signedness, and fix the code that causes signed-one-bit-field 22187901324dSJerome Forissier and sign-compare warnings. Contributed by makise-homura (Igor Molchanov) 22197901324dSJerome Forissier <akemi_homura@kurisa.ch>. 22207901324dSJerome Forissier 22217901324dSJerome ForissierSecurity 22227901324dSJerome Forissier * Fix a vulnerability in the verification of X.509 certificates when 22237901324dSJerome Forissier matching the expected common name (the cn argument of 22247901324dSJerome Forissier mbedtls_x509_crt_verify()) with the actual certificate name: when the 22257901324dSJerome Forissier subjecAltName extension is present, the expected name was compared to any 22267901324dSJerome Forissier name in that extension regardless of its type. This means that an 22277901324dSJerome Forissier attacker could for example impersonate a 4-bytes or 16-byte domain by 22287901324dSJerome Forissier getting a certificate for the corresponding IPv4 or IPv6 (this would 22297901324dSJerome Forissier require the attacker to control that IP address, though). Similar attacks 22307901324dSJerome Forissier using other subjectAltName name types might be possible. Found and 22317901324dSJerome Forissier reported by kFYatek in #3498. 22327901324dSJerome Forissier * When checking X.509 CRLs, a certificate was only considered as revoked if 22337901324dSJerome Forissier its revocationDate was in the past according to the local clock if 22347901324dSJerome Forissier available. In particular, on builds without MBEDTLS_HAVE_TIME_DATE, 22357901324dSJerome Forissier certificates were never considered as revoked. On builds with 22367901324dSJerome Forissier MBEDTLS_HAVE_TIME_DATE, an attacker able to control the local clock (for 22377901324dSJerome Forissier example, an untrusted OS attacking a secure enclave) could prevent 22387901324dSJerome Forissier revocation of certificates via CRLs. Fixed by no longer checking the 22397901324dSJerome Forissier revocationDate field, in accordance with RFC 5280. Reported by 22407901324dSJerome Forissier yuemonangong in #3340. Reported independently and fixed by 22417901324dSJerome Forissier Raoul Strackx and Jethro Beekman in #3433. 22427901324dSJerome Forissier * In (D)TLS record decryption, when using a CBC ciphersuites without the 22437901324dSJerome Forissier Encrypt-then-Mac extension, use constant code flow memory access patterns 22447901324dSJerome Forissier to extract and check the MAC. This is an improvement to the existing 22457901324dSJerome Forissier countermeasure against Lucky 13 attacks. The previous countermeasure was 22467901324dSJerome Forissier effective against network-based attackers, but less so against local 22477901324dSJerome Forissier attackers. The new countermeasure defends against local attackers, even 22487901324dSJerome Forissier if they have access to fine-grained measurements. In particular, this 22497901324dSJerome Forissier fixes a local Lucky 13 cache attack found and reported by Tuba Yavuz, 22507901324dSJerome Forissier Farhaan Fowze, Ken (Yihan) Bai, Grant Hernandez, and Kevin Butler 22517901324dSJerome Forissier (University of Florida) and Dave Tian (Purdue University). 22527901324dSJerome Forissier * Fix side channel in RSA private key operations and static (finite-field) 22537901324dSJerome Forissier Diffie-Hellman. An adversary with precise enough timing and memory access 22547901324dSJerome Forissier information (typically an untrusted operating system attacking a secure 22557901324dSJerome Forissier enclave) could bypass an existing counter-measure (base blinding) and 22567901324dSJerome Forissier potentially fully recover the private key. 22577901324dSJerome Forissier * Fix a 1-byte buffer overread in mbedtls_x509_crl_parse_der(). 22587901324dSJerome Forissier Credit to OSS-Fuzz for detecting the problem and to Philippe Antoine 22597901324dSJerome Forissier for pinpointing the problematic code. 22607901324dSJerome Forissier * Zeroising of plaintext buffers in mbedtls_ssl_read() to erase unused 22617901324dSJerome Forissier application data from memory. Reported in #689 by 22627901324dSJerome Forissier Johan Uppman Bruce of Sectra. 22637901324dSJerome Forissier 22647901324dSJerome ForissierBugfix 22657901324dSJerome Forissier * Library files installed after a CMake build no longer have execute 22667901324dSJerome Forissier permission. 22677901324dSJerome Forissier * Use local labels in mbedtls_padlock_has_support() to fix an invalid symbol 22687901324dSJerome Forissier redefinition if the function is inlined. 22697901324dSJerome Forissier Reported in #3451 and fix contributed in #3452 by okhowang. 22707901324dSJerome Forissier * Fix the endianness of Curve25519 keys imported/exported through the PSA 22717901324dSJerome Forissier APIs. psa_import_key and psa_export_key will now correctly expect/output 22727901324dSJerome Forissier Montgomery keys in little-endian as defined by RFC7748. Contributed by 22737901324dSJerome Forissier Steven Cooreman in #3425. 22747901324dSJerome Forissier * Fix build errors when the only enabled elliptic curves are Montgomery 22757901324dSJerome Forissier curves. Raised by signpainter in #941 and by Taiki-San in #1412. This 22767901324dSJerome Forissier also fixes missing declarations reported by Steven Cooreman in #1147. 22777901324dSJerome Forissier * Fix self-test failure when the only enabled short Weierstrass elliptic 22787901324dSJerome Forissier curve is secp192k1. Fixes #2017. 22797901324dSJerome Forissier * PSA key import will now correctly import a Curve25519/Curve448 public key 22807901324dSJerome Forissier instead of erroring out. Contributed by Steven Cooreman in #3492. 22817901324dSJerome Forissier * Use arc4random_buf on NetBSD instead of rand implementation with cyclical 22827901324dSJerome Forissier lower bits. Fix contributed in #3540. 22837901324dSJerome Forissier * Fix a memory leak in mbedtls_md_setup() when using HMAC under low memory 22847901324dSJerome Forissier conditions. Reported and fix suggested by Guido Vranken in #3486. 22857901324dSJerome Forissier * Fix bug in redirection of unit test outputs on platforms where stdout is 22867901324dSJerome Forissier defined as a macro. First reported in #2311 and fix contributed in #3528. 22877901324dSJerome Forissier 22887901324dSJerome ForissierChanges 22897901324dSJerome Forissier * Only pass -Wformat-signedness to versions of GCC that support it. Reported 22907901324dSJerome Forissier in #3478 and fix contributed in #3479 by okhowang. 22917901324dSJerome Forissier * Reduce the stack consumption of mbedtls_x509write_csr_der() which 22927901324dSJerome Forissier previously could lead to stack overflow on constrained devices. 22937901324dSJerome Forissier Contributed by Doru Gucea and Simon Leet in #3464. 22947901324dSJerome Forissier * Undefine the ASSERT macro before defining it locally, in case it is defined 22957901324dSJerome Forissier in a platform header. Contributed by Abdelatif Guettouche in #3557. 22967901324dSJerome Forissier * Update copyright notices to use Linux Foundation guidance. As a result, 22977901324dSJerome Forissier the copyright of contributors other than Arm is now acknowledged, and the 22987901324dSJerome Forissier years of publishing are no longer tracked in the source files. This also 22997901324dSJerome Forissier eliminates the need for the lines declaring the files to be part of 23007901324dSJerome Forissier MbedTLS. Fixes #3457. 23017901324dSJerome Forissier * Add the command line parameter key_pwd to the ssl_client2 and ssl_server2 23027901324dSJerome Forissier example applications which allows to provide a password for the key file 23037901324dSJerome Forissier specified through the existing key_file argument. This allows the use of 23047901324dSJerome Forissier these applications with password-protected key files. Analogously but for 23057901324dSJerome Forissier ssl_server2 only, add the command line parameter key_pwd2 which allows to 23067901324dSJerome Forissier set a password for the key file provided through the existing key_file2 23077901324dSJerome Forissier argument. 23087901324dSJerome Forissier 23097901324dSJerome Forissier= mbed TLS 2.23.0 branch released 2020-07-01 23107901324dSJerome Forissier 23117901324dSJerome ForissierDefault behavior changes 23127901324dSJerome Forissier * In the experimental PSA secure element interface, change the encoding of 23137901324dSJerome Forissier key lifetimes to encode a persistence level and the location. Although C 23147901324dSJerome Forissier prototypes do not effectively change, code calling 23157901324dSJerome Forissier psa_register_se_driver() must be modified to pass the driver's location 23167901324dSJerome Forissier instead of the keys' lifetime. If the library is upgraded on an existing 23177901324dSJerome Forissier device, keys created with the old lifetime value will not be readable or 23187901324dSJerome Forissier removable through Mbed TLS after the upgrade. 23197901324dSJerome Forissier 23207901324dSJerome ForissierFeatures 23217901324dSJerome Forissier * New functions in the error module return constant strings for 23227901324dSJerome Forissier high- and low-level error codes, complementing mbedtls_strerror() 23237901324dSJerome Forissier which constructs a string for any error code, including compound 23247901324dSJerome Forissier ones, but requires a writable buffer. Contributed by Gaurav Aggarwal 23257901324dSJerome Forissier in #3176. 23267901324dSJerome Forissier * The new utility programs/ssl/ssl_context_info prints a human-readable 23277901324dSJerome Forissier dump of an SSL context saved with mbedtls_ssl_context_save(). 23287901324dSJerome Forissier * Add support for midipix, a POSIX layer for Microsoft Windows. 23297901324dSJerome Forissier * Add new mbedtls_x509_crt_parse_der_with_ext_cb() routine which allows 23307901324dSJerome Forissier parsing unsupported certificate extensions via user provided callback. 23317901324dSJerome Forissier Contributed by Nicola Di Lieto <nicola.dilieto@gmail.com> in #3243 as 23327901324dSJerome Forissier a solution to #3241. 23337901324dSJerome Forissier * Pass the "certificate policies" extension to the callback supplied to 23347901324dSJerome Forissier mbedtls_x509_crt_parse_der_with_ext_cb() if it contains unsupported 23357901324dSJerome Forissier policies (#3419). 23367901324dSJerome Forissier * Added support to entropy_poll for the kern.arandom syscall supported on 23377901324dSJerome Forissier some BSD systems. Contributed by Nia Alarie in #3423. 23387901324dSJerome Forissier * Add support for Windows 2000 in net_sockets. Contributed by opatomic. #3239 23397901324dSJerome Forissier 23407901324dSJerome ForissierSecurity 23417901324dSJerome Forissier * Fix a side channel vulnerability in modular exponentiation that could 23427901324dSJerome Forissier reveal an RSA private key used in a secure enclave. Noticed by Sangho Lee, 23437901324dSJerome Forissier Ming-Wei Shih, Prasun Gera, Taesoo Kim and Hyesoon Kim (Georgia Institute 23447901324dSJerome Forissier of Technology); and Marcus Peinado (Microsoft Research). Reported by Raoul 23457901324dSJerome Forissier Strackx (Fortanix) in #3394. 23467901324dSJerome Forissier * Fix side channel in mbedtls_ecp_check_pub_priv() and 23477901324dSJerome Forissier mbedtls_pk_parse_key() / mbedtls_pk_parse_keyfile() (when loading a 23487901324dSJerome Forissier private key that didn't include the uncompressed public key), as well as 23497901324dSJerome Forissier mbedtls_ecp_mul() / mbedtls_ecp_mul_restartable() when called with a NULL 23507901324dSJerome Forissier f_rng argument. An attacker with access to precise enough timing and 23517901324dSJerome Forissier memory access information (typically an untrusted operating system 23527901324dSJerome Forissier attacking a secure enclave) could fully recover the ECC private key. 23537901324dSJerome Forissier Found and reported by Alejandro Cabrera Aldaya and Billy Brumley. 23547901324dSJerome Forissier * Fix issue in Lucky 13 counter-measure that could make it ineffective when 23557901324dSJerome Forissier hardware accelerators were used (using one of the MBEDTLS_SHAxxx_ALT 23567901324dSJerome Forissier macros). This would cause the original Lucky 13 attack to be possible in 23577901324dSJerome Forissier those configurations, allowing an active network attacker to recover 23587901324dSJerome Forissier plaintext after repeated timing measurements under some conditions. 23597901324dSJerome Forissier Reported and fix suggested by Luc Perneel in #3246. 23607901324dSJerome Forissier 23617901324dSJerome ForissierBugfix 23627901324dSJerome Forissier * Fix the Visual Studio Release x64 build configuration for mbedtls itself. 23637901324dSJerome Forissier Completes a previous fix in Mbed TLS 2.19 that only fixed the build for 23647901324dSJerome Forissier the example programs. Reported in #1430 and fix contributed by irwir. 23657901324dSJerome Forissier * Fix undefined behavior in X.509 certificate parsing if the 23667901324dSJerome Forissier pathLenConstraint basic constraint value is equal to INT_MAX. 23677901324dSJerome Forissier The actual effect with almost every compiler is the intended 23687901324dSJerome Forissier behavior, so this is unlikely to be exploitable anywhere. #3192 23697901324dSJerome Forissier * Fix issue with a detected HW accelerated record error not being exposed 23707901324dSJerome Forissier due to shadowed variable. Contributed by Sander Visser in #3310. 23717901324dSJerome Forissier * Avoid NULL pointer dereferencing if mbedtls_ssl_free() is called with a 23727901324dSJerome Forissier NULL pointer argument. Contributed by Sander Visser in #3312. 23737901324dSJerome Forissier * Fix potential linker errors on dual world platforms by inlining 23747901324dSJerome Forissier mbedtls_gcc_group_to_psa(). This allows the pk.c module to link separately 23757901324dSJerome Forissier from psa_crypto.c. Fixes #3300. 23767901324dSJerome Forissier * Remove dead code in X.509 certificate parsing. Contributed by irwir in 23777901324dSJerome Forissier #2855. 23787901324dSJerome Forissier * Include asn1.h in error.c. Fixes #3328 reported by David Hu. 23797901324dSJerome Forissier * Fix potential memory leaks in ecp_randomize_jac() and ecp_randomize_mxz() 23807901324dSJerome Forissier when PRNG function fails. Contributed by Jonas Lejeune in #3318. 23817901324dSJerome Forissier * Remove unused macros from MSVC projects. Reported in #3297 and fix 23827901324dSJerome Forissier submitted in #3333 by irwir. 23837901324dSJerome Forissier * Add additional bounds checks in ssl_write_client_hello() preventing 23847901324dSJerome Forissier output buffer overflow if the configuration declared a buffer that was 23857901324dSJerome Forissier too small. 23867901324dSJerome Forissier * Set _POSIX_C_SOURCE to at least 200112L in C99 code. Reported in #3420 and 23877901324dSJerome Forissier fix submitted in #3421 by Nia Alarie. 23887901324dSJerome Forissier * Fix building library/net_sockets.c and the ssl_mail_client program on 23897901324dSJerome Forissier NetBSD. Contributed by Nia Alarie in #3422. 23907901324dSJerome Forissier * Fix false positive uninitialised variable reported by cpp-check. 23917901324dSJerome Forissier Contributed by Sander Visser in #3311. 23927901324dSJerome Forissier * Update iv and len context pointers manually when reallocating buffers 23937901324dSJerome Forissier using the MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH feature. This caused issues 23947901324dSJerome Forissier when receiving a connection with CID, when these fields were shifted 23957901324dSJerome Forissier in ssl_parse_record_header(). 23967901324dSJerome Forissier 23977901324dSJerome ForissierChanges 23987901324dSJerome Forissier * Fix warnings about signedness issues in format strings. The build is now 23997901324dSJerome Forissier clean of -Wformat-signedness warnings. Contributed by Kenneth Soerensen 24007901324dSJerome Forissier in #3153. 24017901324dSJerome Forissier * Fix minor performance issue in operations on Curve25519 caused by using a 24027901324dSJerome Forissier suboptimal modular reduction in one place. Found and fix contributed by 24037901324dSJerome Forissier Aurelien Jarno in #3209. 24047901324dSJerome Forissier * Combine identical cases in switch statements in md.c. Contributed 24057901324dSJerome Forissier by irwir in #3208. 24067901324dSJerome Forissier * Simplify a bounds check in ssl_write_certificate_request(). Contributed 24077901324dSJerome Forissier by irwir in #3150. 24087901324dSJerome Forissier * Unify the example programs termination to call mbedtls_exit() instead of 24097901324dSJerome Forissier using a return command. This has been done to enable customization of the 24107901324dSJerome Forissier behavior in bare metal environments. 24117901324dSJerome Forissier * Fix mbedtls_x509_dn_gets to escape non-ASCII characters as "?". 24127901324dSJerome Forissier Contributed by Koh M. Nakagawa in #3326. 24137901324dSJerome Forissier * Use FindPython3 when cmake version >= 3.15.0 24147901324dSJerome Forissier * Abort the ClientHello writing function as soon as some extension doesn't 24157901324dSJerome Forissier fit into the record buffer. Previously, such extensions were silently 24167901324dSJerome Forissier dropped. As a consequence, the TLS handshake now fails when the output 24177901324dSJerome Forissier buffer is not large enough to hold the ClientHello. 24187901324dSJerome Forissier * The unit tests now rely on header files in tests/include/test and source 24197901324dSJerome Forissier files in tests/src. When building with make or cmake, the files in 24207901324dSJerome Forissier tests/src are compiled and the resulting object linked into each test 24217901324dSJerome Forissier executable. 24227901324dSJerome Forissier * The ECP module, enabled by `MBEDTLS_ECP_C`, now depends on 24237901324dSJerome Forissier `MBEDTLS_CTR_DRBG_C` or `MBEDTLS_HMAC_DRBG_C` for some side-channel 24247901324dSJerome Forissier coutermeasures. If side channels are not a concern, this dependency can 24257901324dSJerome Forissier be avoided by enabling the new option `MBEDTLS_ECP_NO_INTERNAL_RNG`. 24267901324dSJerome Forissier * Align MSVC error flag with GCC and Clang. Contributed by Carlos Gomes 24277901324dSJerome Forissier Martinho. #3147 24287901324dSJerome Forissier * Remove superfluous assignment in mbedtls_ssl_parse_certificate(). Reported 24297901324dSJerome Forissier in #3182 and fix submitted by irwir. #3217 24307901324dSJerome Forissier * Fix typo in XTS tests. Reported and fix submitted by Kxuan. #3319 24317901324dSJerome Forissier 243211fa71b9SJerome Forissier= mbed TLS 2.22.0 branch released 2020-04-14 243311fa71b9SJerome Forissier 243411fa71b9SJerome ForissierNew deprecations 243511fa71b9SJerome Forissier * Deprecate MBEDTLS_SSL_HW_RECORD_ACCEL that enables function hooks in the 243611fa71b9SJerome Forissier SSL module for hardware acceleration of individual records. 243711fa71b9SJerome Forissier * Deprecate mbedtls_ssl_get_max_frag_len() in favour of 243811fa71b9SJerome Forissier mbedtls_ssl_get_output_max_frag_len() and 243911fa71b9SJerome Forissier mbedtls_ssl_get_input_max_frag_len() to be more precise about which max 244011fa71b9SJerome Forissier fragment length is desired. 244111fa71b9SJerome Forissier 244211fa71b9SJerome ForissierSecurity 244311fa71b9SJerome Forissier * Fix issue in DTLS handling of new associations with the same parameters 244411fa71b9SJerome Forissier (RFC 6347 section 4.2.8): an attacker able to send forged UDP packets to 244511fa71b9SJerome Forissier the server could cause it to drop established associations with 244611fa71b9SJerome Forissier legitimate clients, resulting in a Denial of Service. This could only 244711fa71b9SJerome Forissier happen when MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE was enabled in config.h 244811fa71b9SJerome Forissier (which it is by default). 244911fa71b9SJerome Forissier * Fix side channel in ECC code that allowed an adversary with access to 245011fa71b9SJerome Forissier precise enough timing and memory access information (typically an 245111fa71b9SJerome Forissier untrusted operating system attacking a secure enclave) to fully recover 245211fa71b9SJerome Forissier an ECDSA private key. Found and reported by Alejandro Cabrera Aldaya, 245311fa71b9SJerome Forissier Billy Brumley and Cesar Pereida Garcia. CVE-2020-10932 245411fa71b9SJerome Forissier * Fix a potentially remotely exploitable buffer overread in a 245511fa71b9SJerome Forissier DTLS client when parsing the Hello Verify Request message. 245611fa71b9SJerome Forissier 245711fa71b9SJerome ForissierFeatures 245811fa71b9SJerome Forissier * The new build option MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH automatically 245911fa71b9SJerome Forissier resizes the I/O buffers before and after handshakes, reducing the memory 246011fa71b9SJerome Forissier consumption during application data transfer. 246111fa71b9SJerome Forissier 246211fa71b9SJerome ForissierBugfix 246311fa71b9SJerome Forissier * Fix compilation failure when both MBEDTLS_SSL_PROTO_DTLS and 246411fa71b9SJerome Forissier MBEDTLS_SSL_HW_RECORD_ACCEL are enabled. 246511fa71b9SJerome Forissier * Remove a spurious check in ssl_parse_client_psk_identity that triggered 246611fa71b9SJerome Forissier a warning with some compilers. Fix contributed by irwir in #2856. 246711fa71b9SJerome Forissier * Fix a function name in a debug message. Contributed by Ercan Ozturk in 246811fa71b9SJerome Forissier #3013. 246911fa71b9SJerome Forissier 247011fa71b9SJerome ForissierChanges 247111fa71b9SJerome Forissier * Mbed Crypto is no longer a Git submodule. The crypto part of the library 247211fa71b9SJerome Forissier is back directly in the present repository. 247311fa71b9SJerome Forissier * Split mbedtls_ssl_get_max_frag_len() into 247411fa71b9SJerome Forissier mbedtls_ssl_get_output_max_frag_len() and 247511fa71b9SJerome Forissier mbedtls_ssl_get_input_max_frag_len() to ensure that a sufficient input 247611fa71b9SJerome Forissier buffer is allocated by the server (if MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH 247711fa71b9SJerome Forissier is defined), regardless of what MFL was configured for it. 247811fa71b9SJerome Forissier 247911fa71b9SJerome Forissier= mbed TLS 2.21.0 branch released 2020-02-20 248011fa71b9SJerome Forissier 248111fa71b9SJerome ForissierNew deprecations 248211fa71b9SJerome Forissier * Deprecate MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO that enables parsing 248311fa71b9SJerome Forissier SSLv2 ClientHello messages. 248411fa71b9SJerome Forissier * Deprecate MBEDTLS_SSL_PROTO_SSL3 that enables support for SSLv3. 248511fa71b9SJerome Forissier * Deprecate for MBEDTLS_PKCS11_C, the wrapper around the pkcs11-helper 248611fa71b9SJerome Forissier library which allows TLS authentication to use keys stored in a 248711fa71b9SJerome Forissier PKCS#11 token such as a smartcard. 24885b25c76aSJerome Forissier 24895b25c76aSJerome ForissierSecurity 24905b25c76aSJerome Forissier * Fix potential memory overread when performing an ECDSA signature 24915b25c76aSJerome Forissier operation. The overread only happens with cryptographically low 24925b25c76aSJerome Forissier probability (of the order of 2^-n where n is the bitsize of the curve) 24935b25c76aSJerome Forissier unless the RNG is broken, and could result in information disclosure or 24945b25c76aSJerome Forissier denial of service (application crash or extra resource consumption). 24955b25c76aSJerome Forissier Found by Auke Zeilstra and Peter Schwabe, using static analysis. 24965b25c76aSJerome Forissier * To avoid a side channel vulnerability when parsing an RSA private key, 24975b25c76aSJerome Forissier read all the CRT parameters from the DER structure rather than 24985b25c76aSJerome Forissier reconstructing them. Found by Alejandro Cabrera Aldaya and Billy Bob 24995b25c76aSJerome Forissier Brumley. Reported and fix contributed by Jack Lloyd. 25005b25c76aSJerome Forissier ARMmbed/mbed-crypto#352 25015b25c76aSJerome Forissier 250211fa71b9SJerome ForissierFeatures 250311fa71b9SJerome Forissier * The new build option MBEDTLS_SHA512_NO_SHA384 allows building SHA-512 250411fa71b9SJerome Forissier support without SHA-384. 250511fa71b9SJerome Forissier 250611fa71b9SJerome ForissierAPI changes 250711fa71b9SJerome Forissier * Change the encoding of key types and curves in the PSA API. The new 250811fa71b9SJerome Forissier values are aligned with the upcoming release of the PSA Crypto API 250911fa71b9SJerome Forissier specification version 1.0.0. The main change which may break some 251011fa71b9SJerome Forissier existing code is that elliptic curve key types no longer encode the 251111fa71b9SJerome Forissier exact curve: a psa_ecc_curve_t or psa_key_type_t value only encodes 251211fa71b9SJerome Forissier a curve family and the key size determines the exact curve (for example, 251311fa71b9SJerome Forissier PSA_ECC_CURVE_SECP_R1 with 256 bits is P256R1). ARMmbed/mbed-crypto#330 251411fa71b9SJerome Forissier 25155b25c76aSJerome ForissierBugfix 25165b25c76aSJerome Forissier * Fix an unchecked call to mbedtls_md() in the x509write module. 251711fa71b9SJerome Forissier * Fix build failure with MBEDTLS_ZLIB_SUPPORT enabled. Reported by 251811fa71b9SJerome Forissier Jack Lloyd in #2859. Fix submitted by jiblime in #2963. 251911fa71b9SJerome Forissier * Fix some false-positive uninitialized variable warnings in X.509. Fix 252011fa71b9SJerome Forissier contributed by apple-ihack-geek in #2663. 252111fa71b9SJerome Forissier * Fix a possible error code mangling in psa_mac_verify_finish() when 252211fa71b9SJerome Forissier a cryptographic accelerator fails. ARMmbed/mbed-crypto#345 25235b25c76aSJerome Forissier * Fix a bug in mbedtls_pk_parse_key() that would cause it to accept some 25245b25c76aSJerome Forissier RSA keys that would later be rejected by functions expecting private 25255b25c76aSJerome Forissier keys. Found by Catena cyber using oss-fuzz (issue 20467). 252611fa71b9SJerome Forissier * Fix a bug in mbedtls_pk_parse_key() that would cause it to 252711fa71b9SJerome Forissier accept some RSA keys with invalid values by silently fixing those values. 25285b25c76aSJerome Forissier 252911fa71b9SJerome Forissier= mbed TLS 2.20.0 branch released 2020-01-15 253011fa71b9SJerome Forissier 253111fa71b9SJerome ForissierDefault behavior changes 253211fa71b9SJerome Forissier * The initial seeding of a CTR_DRBG instance makes a second call to the 253311fa71b9SJerome Forissier entropy function to obtain entropy for a nonce if the entropy size is less 253411fa71b9SJerome Forissier than 3/2 times the key size. In case you want to disable the extra call to 253511fa71b9SJerome Forissier grab entropy, you can call mbedtls_ctr_drbg_set_nonce_len() to force the 253611fa71b9SJerome Forissier nonce length to 0. 25375b25c76aSJerome Forissier 25385b25c76aSJerome ForissierSecurity 253911fa71b9SJerome Forissier * Enforce that mbedtls_entropy_func() gathers a total of 254011fa71b9SJerome Forissier MBEDTLS_ENTROPY_BLOCK_SIZE bytes or more from strong sources. In the 254111fa71b9SJerome Forissier default configuration, on a platform with a single entropy source, the 254211fa71b9SJerome Forissier entropy module formerly only grabbed 32 bytes, which is good enough for 254311fa71b9SJerome Forissier security if the source is genuinely strong, but less than the expected 64 254411fa71b9SJerome Forissier bytes (size of the entropy accumulator). 25455b25c76aSJerome Forissier * Zeroize local variables in mbedtls_internal_aes_encrypt() and 25465b25c76aSJerome Forissier mbedtls_internal_aes_decrypt() before exiting the function. The value of 25475b25c76aSJerome Forissier these variables can be used to recover the last round key. To follow best 25485b25c76aSJerome Forissier practice and to limit the impact of buffer overread vulnerabilities (like 25495b25c76aSJerome Forissier Heartbleed) we need to zeroize them before exiting the function. 25505b25c76aSJerome Forissier Issue reported by Tuba Yavuz, Farhaan Fowze, Ken (Yihang) Bai, 25515b25c76aSJerome Forissier Grant Hernandez, and Kevin Butler (University of Florida) and 25525b25c76aSJerome Forissier Dave Tian (Purdue University). 255311fa71b9SJerome Forissier * Fix side channel vulnerability in ECDSA. Our bignum implementation is not 255411fa71b9SJerome Forissier constant time/constant trace, so side channel attacks can retrieve the 255511fa71b9SJerome Forissier blinded value, factor it (as it is smaller than RSA keys and not guaranteed 255611fa71b9SJerome Forissier to have only large prime factors), and then, by brute force, recover the 255711fa71b9SJerome Forissier key. Reported by Alejandro Cabrera Aldaya and Billy Brumley. 25585b25c76aSJerome Forissier * Fix side channel vulnerability in ECDSA key generation. Obtaining precise 25595b25c76aSJerome Forissier timings on the comparison in the key generation enabled the attacker to 25605b25c76aSJerome Forissier learn leading bits of the ephemeral key used during ECDSA signatures and to 25615b25c76aSJerome Forissier recover the private key. Reported by Jeremy Dubeuf. 25625b25c76aSJerome Forissier * Catch failure of AES functions in mbedtls_ctr_drbg_random(). Uncaught 25635b25c76aSJerome Forissier failures could happen with alternative implementations of AES. Bug 25645b25c76aSJerome Forissier reported and fix proposed by Johan Uppman Bruce and Christoffer Lauri, 25655b25c76aSJerome Forissier Sectra. 25665b25c76aSJerome Forissier 256711fa71b9SJerome ForissierFeatures 256811fa71b9SJerome Forissier * Key derivation inputs in the PSA API can now either come from a key object 256911fa71b9SJerome Forissier or from a buffer regardless of the step type. 257011fa71b9SJerome Forissier * The CTR_DRBG module can grab a nonce from the entropy source during the 257111fa71b9SJerome Forissier initial seeding. The default nonce length is chosen based on the key size 257211fa71b9SJerome Forissier to achieve the security strength defined by NIST SP 800-90A. You can 257311fa71b9SJerome Forissier change it with mbedtls_ctr_drbg_set_nonce_len(). 257411fa71b9SJerome Forissier * Add ENUMERATED tag support to the ASN.1 module. Contributed by 257511fa71b9SJerome Forissier msopiha-linaro in ARMmbed/mbed-crypto#307. 257611fa71b9SJerome Forissier 257711fa71b9SJerome ForissierAPI changes 257811fa71b9SJerome Forissier * In the PSA API, forbid zero-length keys. To pass a zero-length input to a 257911fa71b9SJerome Forissier key derivation function, use a buffer instead (this is now always 258011fa71b9SJerome Forissier possible). 258111fa71b9SJerome Forissier * Rename psa_asymmetric_sign() to psa_sign_hash() and 258211fa71b9SJerome Forissier psa_asymmetric_verify() to psa_verify_hash(). 258311fa71b9SJerome Forissier 25845b25c76aSJerome ForissierBugfix 258511fa71b9SJerome Forissier * Fix an incorrect size in a debugging message. Reported and fix 258611fa71b9SJerome Forissier submitted by irwir. Fixes #2717. 258711fa71b9SJerome Forissier * Fix an unused variable warning when compiling without DTLS. 258811fa71b9SJerome Forissier Reported and fix submitted by irwir. Fixes #2800. 258911fa71b9SJerome Forissier * Remove a useless assignment. Reported and fix submitted by irwir. 259011fa71b9SJerome Forissier Fixes #2801. 259111fa71b9SJerome Forissier * Fix a buffer overflow in the PSA HMAC code when using a long key with an 259211fa71b9SJerome Forissier unsupported algorithm. Fixes ARMmbed/mbed-crypto#254. 259311fa71b9SJerome Forissier * Fix mbedtls_asn1_get_int to support any number of leading zeros. Credit 259411fa71b9SJerome Forissier to OSS-Fuzz for finding a bug in an intermediate version of the fix. 259511fa71b9SJerome Forissier * Fix mbedtls_asn1_get_bitstring_null to correctly parse bitstrings of at 259611fa71b9SJerome Forissier most 2 bytes. 259711fa71b9SJerome Forissier * mbedtls_ctr_drbg_set_entropy_len() and 259811fa71b9SJerome Forissier mbedtls_hmac_drbg_set_entropy_len() now work if you call them before 259911fa71b9SJerome Forissier mbedtls_ctr_drbg_seed() or mbedtls_hmac_drbg_seed(). 26005b25c76aSJerome Forissier 26015b25c76aSJerome ForissierChanges 260211fa71b9SJerome Forissier * Remove the technical possibility to define custom mbedtls_md_info 260311fa71b9SJerome Forissier structures, which was exposed only in an internal header. 260411fa71b9SJerome Forissier * psa_close_key(0) and psa_destroy_key(0) now succeed (doing nothing, as 260511fa71b9SJerome Forissier before). 260611fa71b9SJerome Forissier * Variables containing error codes are now initialized to an error code 260711fa71b9SJerome Forissier rather than success, so that coding mistakes or memory corruption tends to 260811fa71b9SJerome Forissier cause functions to return this error code rather than a success. There are 260911fa71b9SJerome Forissier no known instances where this changes the behavior of the library: this is 261011fa71b9SJerome Forissier merely a robustness improvement. ARMmbed/mbed-crypto#323 261111fa71b9SJerome Forissier * Remove a useless call to mbedtls_ecp_group_free(). Contributed by 261211fa71b9SJerome Forissier Alexander Krizhanovsky in ARMmbed/mbed-crypto#210. 261311fa71b9SJerome Forissier * Speed up PBKDF2 by caching the digest calculation. Contributed by Jack 261411fa71b9SJerome Forissier Lloyd and Fortanix Inc in ARMmbed/mbed-crypto#277. 261511fa71b9SJerome Forissier * Small performance improvement of mbedtls_mpi_div_mpi(). Contributed by 261611fa71b9SJerome Forissier Alexander Krizhanovsky in ARMmbed/mbed-crypto#308. 26175b25c76aSJerome Forissier 261811fa71b9SJerome Forissier= mbed TLS 2.19.1 branch released 2019-09-16 261911fa71b9SJerome Forissier 262011fa71b9SJerome ForissierFeatures 262111fa71b9SJerome Forissier * Declare include headers as PUBLIC to propagate to CMake project consumers 262211fa71b9SJerome Forissier Contributed by Zachary J. Fields in PR #2949. 262311fa71b9SJerome Forissier * Add nss_keylog to ssl_client2 and ssl_server2, enabling easier analysis of 262411fa71b9SJerome Forissier TLS sessions with tools like Wireshark. 262511fa71b9SJerome Forissier 262611fa71b9SJerome ForissierAPI Changes 262711fa71b9SJerome Forissier * Make client_random and server_random const in 262811fa71b9SJerome Forissier mbedtls_ssl_export_keys_ext_t, so that the key exporter is discouraged 262911fa71b9SJerome Forissier from modifying the client/server hello. 263011fa71b9SJerome Forissier 263111fa71b9SJerome ForissierBugfix 263211fa71b9SJerome Forissier * Fix some false-positive uninitialized variable warnings in crypto. Fix 263311fa71b9SJerome Forissier contributed by apple-ihack-geek in #2663. 263411fa71b9SJerome Forissier 263511fa71b9SJerome Forissier= mbed TLS 2.19.0 branch released 2019-09-06 26365b25c76aSJerome Forissier 26375b25c76aSJerome ForissierSecurity 26385b25c76aSJerome Forissier * Fix a missing error detection in ECJPAKE. This could have caused a 26395b25c76aSJerome Forissier predictable shared secret if a hardware accelerator failed and the other 26405b25c76aSJerome Forissier side of the key exchange had a similar bug. 26415b25c76aSJerome Forissier * When writing a private EC key, use a constant size for the private 26425b25c76aSJerome Forissier value, as specified in RFC 5915. Previously, the value was written 26435b25c76aSJerome Forissier as an ASN.1 INTEGER, which caused the size of the key to leak 26445b25c76aSJerome Forissier about 1 bit of information on average and could cause the value to be 26455b25c76aSJerome Forissier 1 byte too large for the output buffer. 264611fa71b9SJerome Forissier * The deterministic ECDSA calculation reused the scheme's HMAC-DRBG to 264711fa71b9SJerome Forissier implement blinding. Because of this for the same key and message the same 264811fa71b9SJerome Forissier blinding value was generated. This reduced the effectiveness of the 264911fa71b9SJerome Forissier countermeasure and leaked information about the private key through side 265011fa71b9SJerome Forissier channels. Reported by Jack Lloyd. 265111fa71b9SJerome Forissier 265211fa71b9SJerome ForissierFeatures 265311fa71b9SJerome Forissier * Add new API functions mbedtls_ssl_session_save() and 265411fa71b9SJerome Forissier mbedtls_ssl_session_load() to allow serializing a session, for example to 265511fa71b9SJerome Forissier store it in non-volatile storage, and later using it for TLS session 265611fa71b9SJerome Forissier resumption. 265711fa71b9SJerome Forissier * Add a new API function mbedtls_ssl_check_record() to allow checking that 265811fa71b9SJerome Forissier an incoming record is valid, authentic and has not been seen before. This 265911fa71b9SJerome Forissier feature can be used alongside Connection ID and SSL context serialisation. 266011fa71b9SJerome Forissier The feature is enabled at compile-time by MBEDTLS_SSL_RECORD_CHECKING 266111fa71b9SJerome Forissier option. 266211fa71b9SJerome Forissier * New implementation of X25519 (ECDH using Curve25519) from Project Everest 266311fa71b9SJerome Forissier (https://project-everest.github.io/). It can be enabled at compile time 266411fa71b9SJerome Forissier with MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED. This implementation is formally 266511fa71b9SJerome Forissier verified and significantly faster, but is only supported on x86 platforms 266611fa71b9SJerome Forissier (32-bit and 64-bit) using GCC, Clang or Visual Studio. Contributed by 266711fa71b9SJerome Forissier Christoph Wintersteiger from Microsoft Research. 266811fa71b9SJerome Forissier * Add mbedtls_net_close(), enabling the building of forking servers where 266911fa71b9SJerome Forissier the parent process closes the client socket and continue accepting, and 267011fa71b9SJerome Forissier the child process closes the listening socket and handles the client 267111fa71b9SJerome Forissier socket. Contributed by Robert Larsen in #2803. 26725b25c76aSJerome Forissier 26735b25c76aSJerome ForissierAPI Changes 267411fa71b9SJerome Forissier * Add DER-encoded test CRTs to library/certs.c, allowing 267511fa71b9SJerome Forissier the example programs ssl_server2 and ssl_client2 to be run 267611fa71b9SJerome Forissier if MBEDTLS_FS_IO and MBEDTLS_PEM_PARSE_C are unset. Fixes #2254. 267711fa71b9SJerome Forissier * The HAVEGE state type now uses uint32_t elements instead of int. 267811fa71b9SJerome Forissier * The functions mbedtls_ecp_curve_list() and mbedtls_ecp_grp_id_list() now 267911fa71b9SJerome Forissier list all curves for which at least one of ECDH or ECDSA is supported, not 268011fa71b9SJerome Forissier just curves for which both are supported. Call mbedtls_ecdsa_can_do() or 268111fa71b9SJerome Forissier mbedtls_ecdh_can_do() on each result to check whether each algorithm is 268211fa71b9SJerome Forissier supported. 26835b25c76aSJerome Forissier * The new function mbedtls_ecdsa_sign_det_ext() is similar to 26845b25c76aSJerome Forissier mbedtls_ecdsa_sign_det() but allows passing an external RNG for the 26855b25c76aSJerome Forissier purpose of blinding. 26865b25c76aSJerome Forissier 268711fa71b9SJerome ForissierNew deprecations 268811fa71b9SJerome Forissier * Deprecate mbedtls_ecdsa_sign_det() in favor of a functions that can take an 268911fa71b9SJerome Forissier RNG function as an input. 269011fa71b9SJerome Forissier * Calling mbedtls_ecdsa_write_signature() with NULL as the f_rng argument 269111fa71b9SJerome Forissier is now deprecated. 269211fa71b9SJerome Forissier 26935b25c76aSJerome ForissierBugfix 269411fa71b9SJerome Forissier * Fix missing bounds checks in X.509 parsing functions that could 269511fa71b9SJerome Forissier lead to successful parsing of ill-formed X.509 CRTs. Fixes #2437. 269611fa71b9SJerome Forissier * Fix multiple X.509 functions previously returning ASN.1 low-level error 269711fa71b9SJerome Forissier codes to always wrap these codes into X.509 high level error codes before 269811fa71b9SJerome Forissier returning. Fixes #2431. 26995b25c76aSJerome Forissier * Fix to allow building test suites with any warning that detects unused 27005b25c76aSJerome Forissier functions. Fixes #1628. 27015b25c76aSJerome Forissier * Fix typo in net_would_block(). Fixes #528 reported by github-monoculture. 27025b25c76aSJerome Forissier * Remove redundant include file in timing.c. Fixes #2640 reported by irwir. 270311fa71b9SJerome Forissier * Fix build failure when building with mingw on Windows by including 270411fa71b9SJerome Forissier stdarg.h where needed. Fixes #2656. 27055b25c76aSJerome Forissier * Fix Visual Studio Release x64 build configuration by inheriting 27065b25c76aSJerome Forissier PlatformToolset from the project configuration. Fixes #1430 reported by 27075b25c76aSJerome Forissier irwir. 27085b25c76aSJerome Forissier * Enable Suite B with subset of ECP curves. Make sure the code compiles even 27095b25c76aSJerome Forissier if some curves are not defined. Fixes #1591 reported by dbedev. 27105b25c76aSJerome Forissier * Fix misuse of signed arithmetic in the HAVEGE module. #2598 271111fa71b9SJerome Forissier * Avoid use of statically sized stack buffers for certificate writing. 271211fa71b9SJerome Forissier This previously limited the maximum size of DER encoded certificates 271311fa71b9SJerome Forissier in mbedtls_x509write_crt_der() to 2Kb. Reported by soccerGB in #2631. 271411fa71b9SJerome Forissier * Fix partial zeroing in x509_get_other_name. Found and fixed by ekse, #2716. 27155b25c76aSJerome Forissier * Update test certificates that were about to expire. Reported by 27165b25c76aSJerome Forissier Bernhard M. Wiedemann in #2357. 27175b25c76aSJerome Forissier * Fix the build on ARMv5TE in ARM mode to not use assembly instructions 27185b25c76aSJerome Forissier that are only available in Thumb mode. Fix contributed by Aurelien Jarno 27195b25c76aSJerome Forissier in #2169. 27205b25c76aSJerome Forissier * Fix propagation of restart contexts in restartable EC operations. 27215b25c76aSJerome Forissier This could previously lead to segmentation faults in builds using an 27225b25c76aSJerome Forissier address-sanitizer and enabling but not using MBEDTLS_ECP_RESTARTABLE. 27235b25c76aSJerome Forissier * Fix memory leak in in mpi_miller_rabin(). Contributed by 27245b25c76aSJerome Forissier Jens Wiklander <jens.wiklander@linaro.org> in #2363 27255b25c76aSJerome Forissier * Improve code clarity in x509_crt module, removing false-positive 27265b25c76aSJerome Forissier uninitialized variable warnings on some recent toolchains (GCC8, etc). 27275b25c76aSJerome Forissier Discovered and fixed by Andy Gross (Linaro), #2392. 27285b25c76aSJerome Forissier * Fix bug in endianness conversion in bignum module. This lead to 27295b25c76aSJerome Forissier functionally incorrect code on bigendian systems which don't have 27305b25c76aSJerome Forissier __BYTE_ORDER__ defined. Reported by Brendan Shanks. Fixes #2622. 27315b25c76aSJerome Forissier 27325b25c76aSJerome ForissierChanges 273311fa71b9SJerome Forissier * Replace multiple uses of MD2 by SHA-256 in X.509 test suite. Fixes #821. 27345b25c76aSJerome Forissier * Make it easier to define MBEDTLS_PARAM_FAILED as assert (which config.h 27355b25c76aSJerome Forissier suggests). #2671 27365b25c76aSJerome Forissier * Make `make clean` clean all programs always. Fixes #1862. 273711fa71b9SJerome Forissier * Add a Dockerfile and helper scripts (all-in-docker.sh, basic-in-docker.sh, 273811fa71b9SJerome Forissier docker-env.sh) to simplify running test suites on a Linux host. Contributed 273911fa71b9SJerome Forissier by Peter Kolbus (Garmin). 274011fa71b9SJerome Forissier * Add `reproducible` option to `ssl_client2` and `ssl_server2` to enable 274111fa71b9SJerome Forissier test runs without variability. Contributed by Philippe Antoine (Catena 274211fa71b9SJerome Forissier cyber) in #2681. 274311fa71b9SJerome Forissier * Extended .gitignore to ignore Visual Studio artifacts. Fixed by ConfusedSushi. 274411fa71b9SJerome Forissier * Adds fuzz targets, especially for continuous fuzzing with OSS-Fuzz. 274511fa71b9SJerome Forissier Contributed by Philippe Antoine (Catena cyber). 274611fa71b9SJerome Forissier * Remove the crypto part of the library from Mbed TLS. The crypto 274711fa71b9SJerome Forissier code and tests are now only available via Mbed Crypto, which 274811fa71b9SJerome Forissier Mbed TLS references as a Git submodule. 27495b25c76aSJerome Forissier 275011fa71b9SJerome Forissier= mbed TLS 2.18.1 branch released 2019-07-12 27515b25c76aSJerome Forissier 27525b25c76aSJerome ForissierBugfix 275311fa71b9SJerome Forissier * Fix build failure when building with mingw on Windows by including 275411fa71b9SJerome Forissier stdarg.h where needed. Fixes #2656. 275511fa71b9SJerome Forissier 275611fa71b9SJerome ForissierChanges 275711fa71b9SJerome Forissier * Enable building of Mbed TLS as a CMake subproject. Suggested and fixed by 275811fa71b9SJerome Forissier Ashley Duncan in #2609. 275911fa71b9SJerome Forissier 276011fa71b9SJerome Forissier= mbed TLS 2.18.0 branch released 2019-06-11 276111fa71b9SJerome Forissier 276211fa71b9SJerome ForissierFeatures 276311fa71b9SJerome Forissier * Add the Any Policy certificate policy oid, as defined in 276411fa71b9SJerome Forissier rfc 5280 section 4.2.1.4. 276511fa71b9SJerome Forissier * It is now possible to use NIST key wrap mode via the mbedtls_cipher API. 276611fa71b9SJerome Forissier Contributed by Jack Lloyd and Fortanix Inc. 276711fa71b9SJerome Forissier * Add the Wi-SUN Field Area Network (FAN) device extended key usage. 276811fa71b9SJerome Forissier * Add the oid certificate policy x509 extension. 276911fa71b9SJerome Forissier * It is now possible to perform RSA PKCS v1.5 signatures with RIPEMD-160 digest. 277011fa71b9SJerome Forissier Contributed by Jack Lloyd and Fortanix Inc. 277111fa71b9SJerome Forissier * Extend the MBEDTLS_SSL_EXPORT_KEYS to export the handshake randbytes, 277211fa71b9SJerome Forissier and the used tls-prf. 277311fa71b9SJerome Forissier * Add public API for tls-prf function, according to requested enum. 277411fa71b9SJerome Forissier * Add support for parsing otherName entries in the Subject Alternative Name 277511fa71b9SJerome Forissier X.509 certificate extension, specifically type hardware module name, 277611fa71b9SJerome Forissier as defined in RFC 4108 section 5. 277711fa71b9SJerome Forissier * Add support for parsing certificate policies extension, as defined in 277811fa71b9SJerome Forissier RFC 5280 section 4.2.1.4. Currently, only the "Any Policy" policy is 277911fa71b9SJerome Forissier supported. 278011fa71b9SJerome Forissier * List all SAN types in the subject_alt_names field of the certificate. 278111fa71b9SJerome Forissier Resolves #459. 278211fa71b9SJerome Forissier * Add support for draft-05 of the Connection ID extension, as specified 278311fa71b9SJerome Forissier in https://tools.ietf.org/html/draft-ietf-tls-dtls-connection-id-05. 278411fa71b9SJerome Forissier The Connection ID extension allows to keep DTLS connections beyond the 278511fa71b9SJerome Forissier lifetime of the underlying transport by adding a connection identifier 278611fa71b9SJerome Forissier to the DTLS record header. This identifier can be used to associated an 278711fa71b9SJerome Forissier incoming record with the correct connection data even after the peer has 278811fa71b9SJerome Forissier changed its IP or port. The feature is enabled at compile-time by setting 278911fa71b9SJerome Forissier MBEDTLS_SSL_DTLS_CONNECTION_ID (disabled by default), and at run-time 279011fa71b9SJerome Forissier through the new APIs mbedtls_ssl_conf_cid() and mbedtls_ssl_set_cid(). 279111fa71b9SJerome Forissier 279211fa71b9SJerome Forissier 279311fa71b9SJerome ForissierAPI Changes 279411fa71b9SJerome Forissier * Extend the MBEDTLS_SSL_EXPORT_KEYS to export the handshake randbytes, 279511fa71b9SJerome Forissier and the used tls-prf. 279611fa71b9SJerome Forissier * Add public API for tls-prf function, according to requested enum. 279711fa71b9SJerome Forissier 279811fa71b9SJerome ForissierBugfix 27995b25c76aSJerome Forissier * Fix private key DER output in the key_app_writer example. File contents 28005b25c76aSJerome Forissier were shifted by one byte, creating an invalid ASN.1 tag. Fixed by 28015b25c76aSJerome Forissier Christian Walther in #2239. 28025b25c76aSJerome Forissier * Fix potential memory leak in X.509 self test. Found and fixed by 28035b25c76aSJerome Forissier Junhwan Park, #2106. 28045b25c76aSJerome Forissier * Reduce stack usage of hkdf tests. Fixes #2195. 28055b25c76aSJerome Forissier * Fix 1-byte buffer overflow in mbedtls_mpi_write_string() when 28065b25c76aSJerome Forissier used with negative inputs. Found by Guido Vranken in #2404. Credit to 28075b25c76aSJerome Forissier OSS-Fuzz. 28085b25c76aSJerome Forissier * Fix bugs in the AEAD test suite which would be exposed by ciphers which 28095b25c76aSJerome Forissier either used both encrypt and decrypt key schedules, or which perform padding. 28105b25c76aSJerome Forissier GCM and CCM were not affected. Fixed by Jack Lloyd. 28115b25c76aSJerome Forissier * Fix incorrect default port number in ssl_mail_client example's usage. 28125b25c76aSJerome Forissier Found and fixed by irwir. #2337 281311fa71b9SJerome Forissier * Add psa_util.h to test/cpp_dummy_build to fix build_default_make_gcc_and_cxx. 281411fa71b9SJerome Forissier Fixed by Peter Kolbus (Garmin). #2579 28155b25c76aSJerome Forissier * Add missing parentheses around parameters in the definition of the 28165b25c76aSJerome Forissier public macro MBEDTLS_X509_ID_FLAG. This could lead to invalid evaluation 28175b25c76aSJerome Forissier in case operators binding less strongly than subtraction were used 28185b25c76aSJerome Forissier for the parameter. 28195b25c76aSJerome Forissier * Add a check for MBEDTLS_X509_CRL_PARSE_C in ssl_server2, guarding the crl 28205b25c76aSJerome Forissier sni entry parameter. Reported by inestlerode in #560. 282111fa71b9SJerome Forissier * Set the next sequence of the subject_alt_name to NULL when deleting 282211fa71b9SJerome Forissier sequence on failure. Found and fix suggested by Philippe Antoine. 282311fa71b9SJerome Forissier Credit to OSS-Fuzz. 28245b25c76aSJerome Forissier 28255b25c76aSJerome ForissierChanges 282611fa71b9SJerome Forissier * Server's RSA certificate in certs.c was SHA-1 signed. In the default 282711fa71b9SJerome Forissier mbedTLS configuration only SHA-2 signed certificates are accepted. 282811fa71b9SJerome Forissier This certificate is used in the demo server programs, which lead the 282911fa71b9SJerome Forissier client programs to fail at the peer's certificate verification 283011fa71b9SJerome Forissier due to an unacceptable hash signature. The certificate has been 283111fa71b9SJerome Forissier updated to one that is SHA-256 signed. Fix contributed by 283211fa71b9SJerome Forissier Illya Gerasymchuk. 28335b25c76aSJerome Forissier * Return from various debugging routines immediately if the 28345b25c76aSJerome Forissier provided SSL context is unset. 28355b25c76aSJerome Forissier * Remove dead code from bignum.c in the default configuration. 28365b25c76aSJerome Forissier Found by Coverity, reported and fixed by Peter Kolbus (Garmin). Fixes #2309. 28375b25c76aSJerome Forissier * Add test for minimal value of MBEDTLS_MPI_WINDOW_SIZE to all.sh. 28385b25c76aSJerome Forissier Contributed by Peter Kolbus (Garmin). 28395b25c76aSJerome Forissier * Change wording in the `mbedtls_ssl_conf_max_frag_len()`'s documentation to 28405b25c76aSJerome Forissier improve clarity. Fixes #2258. 28415b25c76aSJerome Forissier 284211fa71b9SJerome Forissier= mbed TLS 2.17.0 branch released 2019-03-19 28435b25c76aSJerome Forissier 28445b25c76aSJerome ForissierFeatures 284511fa71b9SJerome Forissier * Add a new X.509 API call `mbedtls_x509_parse_der_nocopy()` 284611fa71b9SJerome Forissier which allows copy-less parsing of DER encoded X.509 CRTs, 284711fa71b9SJerome Forissier at the cost of additional lifetime constraints on the input 284811fa71b9SJerome Forissier buffer, but at the benefit of reduced RAM consumption. 284911fa71b9SJerome Forissier * Add a new function mbedtls_asn1_write_named_bitstring() to write ASN.1 285011fa71b9SJerome Forissier named bitstring in DER as required by RFC 5280 Appendix B. 28515b25c76aSJerome Forissier * Add MBEDTLS_REMOVE_3DES_CIPHERSUITES to allow removing 3DES ciphersuites 28525b25c76aSJerome Forissier from the default list (enabled by default). See 28535b25c76aSJerome Forissier https://sweet32.info/SWEET32_CCS16.pdf. 28545b25c76aSJerome Forissier 285511fa71b9SJerome ForissierAPI Changes 285611fa71b9SJerome Forissier * Add a new X.509 API call `mbedtls_x509_parse_der_nocopy()`. 285711fa71b9SJerome Forissier See the Features section for more information. 285811fa71b9SJerome Forissier * Allow to opt in to the removal the API mbedtls_ssl_get_peer_cert() 285911fa71b9SJerome Forissier for the benefit of saving RAM, by disabling the new compile-time 286011fa71b9SJerome Forissier option MBEDTLS_SSL_KEEP_PEER_CERTIFICATE (enabled by default for 286111fa71b9SJerome Forissier API stability). Disabling this option makes mbedtls_ssl_get_peer_cert() 286211fa71b9SJerome Forissier always return NULL, and removes the peer_cert field from the 286311fa71b9SJerome Forissier mbedtls_ssl_session structure which otherwise stores the peer's 286411fa71b9SJerome Forissier certificate. 286511fa71b9SJerome Forissier 286611fa71b9SJerome ForissierSecurity 286711fa71b9SJerome Forissier * Make mbedtls_ecdh_get_params return an error if the second key 286811fa71b9SJerome Forissier belongs to a different group from the first. Before, if an application 286911fa71b9SJerome Forissier passed keys that belonged to different group, the first key's data was 287011fa71b9SJerome Forissier interpreted according to the second group, which could lead to either 287111fa71b9SJerome Forissier an error or a meaningless output from mbedtls_ecdh_get_params. In the 287211fa71b9SJerome Forissier latter case, this could expose at most 5 bits of the private key. 287311fa71b9SJerome Forissier 28745b25c76aSJerome ForissierBugfix 28755b25c76aSJerome Forissier * Fix a compilation issue with mbedtls_ecp_restart_ctx not being defined 28765b25c76aSJerome Forissier when MBEDTLS_ECP_ALT is defined. Reported by jwhui. Fixes #2242. 28775b25c76aSJerome Forissier * Run the AD too long test only if MBEDTLS_CCM_ALT is not defined. 28785b25c76aSJerome Forissier Raised as a comment in #1996. 28795b25c76aSJerome Forissier * Reduce the stack consumption of mbedtls_mpi_fill_random() which could 28805b25c76aSJerome Forissier previously lead to a stack overflow on constrained targets. 28815b25c76aSJerome Forissier * Add `MBEDTLS_SELF_TEST` for the mbedtls_self_test functions 28825b25c76aSJerome Forissier in the header files, which missed the precompilation check. #971 288311fa71b9SJerome Forissier * Fix returning the value 1 when mbedtls_ecdsa_genkey failed. 288411fa71b9SJerome Forissier * Remove a duplicate #include in a sample program. Fixed by Masashi Honma #2326. 288511fa71b9SJerome Forissier * Remove the mbedtls namespacing from the header file, to fix a "file not found" 288611fa71b9SJerome Forissier build error. Fixed by Haijun Gu #2319. 28875b25c76aSJerome Forissier * Fix signed-to-unsigned integer conversion warning 28885b25c76aSJerome Forissier in X.509 module. Fixes #2212. 28895b25c76aSJerome Forissier * Reduce stack usage of `mpi_write_hlp()` by eliminating recursion. 28905b25c76aSJerome Forissier Fixes #2190. 28915b25c76aSJerome Forissier * Fix false failure in all.sh when backup files exist in include/mbedtls 28925b25c76aSJerome Forissier (e.g. config.h.bak). Fixed by Peter Kolbus (Garmin) #2407. 28935b25c76aSJerome Forissier * Ensure that unused bits are zero when writing ASN.1 bitstrings when using 28945b25c76aSJerome Forissier mbedtls_asn1_write_bitstring(). 28955b25c76aSJerome Forissier * Fix issue when writing the named bitstrings in KeyUsage and NsCertType 28965b25c76aSJerome Forissier extensions in CSRs and CRTs that caused these bitstrings to not be encoded 28975b25c76aSJerome Forissier correctly as trailing zeroes were not accounted for as unused bits in the 28985b25c76aSJerome Forissier leading content octet. Fixes #1610. 28995b25c76aSJerome Forissier 29005b25c76aSJerome ForissierChanges 290111fa71b9SJerome Forissier * Reduce RAM consumption during session renegotiation by not storing 290211fa71b9SJerome Forissier the peer CRT chain and session ticket twice. 29035b25c76aSJerome Forissier * Include configuration file in all header files that use configuration, 29045b25c76aSJerome Forissier instead of relying on other header files that they include. 29055b25c76aSJerome Forissier Inserted as an enhancement for #1371 29065b25c76aSJerome Forissier * Add support for alternative CSR headers, as used by Microsoft and defined 29075b25c76aSJerome Forissier in RFC 7468. Found by Michael Ernst. Fixes #767. 290811fa71b9SJerome Forissier * Correct many misspellings. Fixed by MisterDA #2371. 290911fa71b9SJerome Forissier * Provide an abstraction of vsnprintf to allow alternative implementations 291011fa71b9SJerome Forissier for platforms that don't provide it. Based on contributions by Joris Aerts 291111fa71b9SJerome Forissier and Nathaniel Wesley Filardo. 291211fa71b9SJerome Forissier * Fix clobber list in MIPS assembly for large integer multiplication. 291311fa71b9SJerome Forissier Previously, this could lead to functionally incorrect assembly being 291411fa71b9SJerome Forissier produced by some optimizing compilers, showing up as failures in 291511fa71b9SJerome Forissier e.g. RSA or ECC signature operations. Reported in #1722, fix suggested 291611fa71b9SJerome Forissier by Aurelien Jarno and submitted by Jeffrey Martin. 29175b25c76aSJerome Forissier * Reduce the complexity of the timing tests. They were assuming more than the 29185b25c76aSJerome Forissier underlying OS actually guarantees. 291911fa71b9SJerome Forissier * Fix configuration queries in ssl-opt.h. #2030 292011fa71b9SJerome Forissier * Ensure that ssl-opt.h can be run in OS X. #2029 29215b25c76aSJerome Forissier * Re-enable certain interoperability tests in ssl-opt.sh which had previously 29225b25c76aSJerome Forissier been disabled for lack of a sufficiently recent version of GnuTLS on the CI. 29235b25c76aSJerome Forissier * Ciphersuites based on 3DES now have the lowest priority by default when 29245b25c76aSJerome Forissier they are enabled. 29255b25c76aSJerome Forissier 29263d3b0591SJens Wiklander= mbed TLS 2.16.0 branch released 2018-12-21 29273d3b0591SJens Wiklander 29283d3b0591SJens WiklanderFeatures 29293d3b0591SJens Wiklander * Add a new config.h option of MBEDTLS_CHECK_PARAMS that enables validation 29303d3b0591SJens Wiklander of parameters in the API. This allows detection of obvious misuses of the 29313d3b0591SJens Wiklander API, such as passing NULL pointers. The API of existing functions hasn't 29323d3b0591SJens Wiklander changed, but requirements on parameters have been made more explicit in 29333d3b0591SJens Wiklander the documentation. See the corresponding API documentation for each 29343d3b0591SJens Wiklander function to see for which parameter values it is defined. This feature is 29353d3b0591SJens Wiklander disabled by default. See its API documentation in config.h for additional 29363d3b0591SJens Wiklander steps you have to take when enabling it. 29373d3b0591SJens Wiklander 29383d3b0591SJens WiklanderAPI Changes 29393d3b0591SJens Wiklander * The following functions in the random generator modules have been 29403d3b0591SJens Wiklander deprecated and replaced as shown below. The new functions change 29413d3b0591SJens Wiklander the return type from void to int to allow returning error codes when 29423d3b0591SJens Wiklander using MBEDTLS_<MODULE>_ALT for the underlying AES or message digest 29433d3b0591SJens Wiklander primitive. Fixes #1798. 29443d3b0591SJens Wiklander mbedtls_ctr_drbg_update() -> mbedtls_ctr_drbg_update_ret() 29453d3b0591SJens Wiklander mbedtls_hmac_drbg_update() -> mbedtls_hmac_drbg_update_ret() 29463d3b0591SJens Wiklander * Extend ECDH interface to enable alternative implementations. 29473d3b0591SJens Wiklander * Deprecate error codes of the form MBEDTLS_ERR_xxx_INVALID_KEY_LENGTH for 29483d3b0591SJens Wiklander ARIA, CAMELLIA and Blowfish. These error codes will be replaced by 29493d3b0591SJens Wiklander the more generic per-module error codes MBEDTLS_ERR_xxx_BAD_INPUT_DATA. 29503d3b0591SJens Wiklander * Additional parameter validation checks have been added for the following 29513d3b0591SJens Wiklander modules - AES, ARIA, Blowfish, CAMELLIA, CCM, GCM, DHM, ECP, ECDSA, ECDH, 29523d3b0591SJens Wiklander ECJPAKE, SHA, Chacha20 and Poly1305, cipher, pk, RSA, and MPI. 29533d3b0591SJens Wiklander Where modules have had parameter validation added, existing parameter 29543d3b0591SJens Wiklander checks may have changed. Some modules, such as Chacha20 had existing 29553d3b0591SJens Wiklander parameter validation whereas other modules had little. This has now been 29563d3b0591SJens Wiklander changed so that the same level of validation is present in all modules, and 29573d3b0591SJens Wiklander that it is now optional with the MBEDTLS_CHECK_PARAMS flag which by default 29583d3b0591SJens Wiklander is off. That means that checks which were previously present by default 29593d3b0591SJens Wiklander will no longer be. 29603d3b0591SJens Wiklander 29613d3b0591SJens WiklanderNew deprecations 29623d3b0591SJens Wiklander * Deprecate mbedtls_ctr_drbg_update and mbedtls_hmac_drbg_update 29633d3b0591SJens Wiklander in favor of functions that can return an error code. 2964817466cbSJens Wiklander 2965817466cbSJens WiklanderBugfix 29663d3b0591SJens Wiklander * Fix for Clang, which was reporting a warning for the bignum.c inline 29673d3b0591SJens Wiklander assembly for AMD64 targets creating string literals greater than those 29683d3b0591SJens Wiklander permitted by the ISO C99 standard. Found by Aaron Jones. Fixes #482. 29693d3b0591SJens Wiklander * Fix runtime error in `mbedtls_platform_entropy_poll()` when run 29703d3b0591SJens Wiklander through qemu user emulation. Reported and fix suggested by randombit 29713d3b0591SJens Wiklander in #1212. Fixes #1212. 29723d3b0591SJens Wiklander * Fix an unsafe bounds check when restoring an SSL session from a ticket. 29733d3b0591SJens Wiklander This could lead to a buffer overflow, but only in case ticket authentication 29743d3b0591SJens Wiklander was broken. Reported and fix suggested by Guido Vranken in #659. 29753d3b0591SJens Wiklander * Add explicit integer to enumeration type casts to example program 29763d3b0591SJens Wiklander programs/pkey/gen_key which previously led to compilation failure 29773d3b0591SJens Wiklander on some toolchains. Reported by phoenixmcallister. Fixes #2170. 29783d3b0591SJens Wiklander * Fix double initialization of ECC hardware that made some accelerators 29793d3b0591SJens Wiklander hang. 29803d3b0591SJens Wiklander * Clarify documentation of mbedtls_ssl_set_own_cert() regarding the absence 29813d3b0591SJens Wiklander of check for certificate/key matching. Reported by Attila Molnar, #507. 29823d3b0591SJens Wiklander 298311fa71b9SJerome Forissier = mbed TLS 2.15.1 branch released 2018-11-30 298411fa71b9SJerome Forissier 298511fa71b9SJerome Forissier Changes 298611fa71b9SJerome Forissier * Update the Mbed Crypto submodule to version 0.1.0b2. 298711fa71b9SJerome Forissier 298811fa71b9SJerome Forissier = mbed TLS 2.15.0 branch released 2018-11-23 298911fa71b9SJerome Forissier 299011fa71b9SJerome Forissier Features 299111fa71b9SJerome Forissier * Add an experimental build option, USE_CRYPTO_SUBMODULE, to enable use of 299211fa71b9SJerome Forissier Mbed Crypto as the source of the cryptography implementation. 299311fa71b9SJerome Forissier * Add an experimental configuration option, MBEDTLS_PSA_CRYPTO_C, to enable 299411fa71b9SJerome Forissier the PSA Crypto API from Mbed Crypto when additionally used with the 299511fa71b9SJerome Forissier USE_CRYPTO_SUBMODULE build option. 299611fa71b9SJerome Forissier 299711fa71b9SJerome Forissier Changes 299811fa71b9SJerome Forissier * Add unit tests for AES-GCM when called through mbedtls_cipher_auth_xxx() 299911fa71b9SJerome Forissier from the cipher abstraction layer. Fixes #2198. 300011fa71b9SJerome Forissier 30013d3b0591SJens Wiklander= mbed TLS 2.14.1 branch released 2018-11-30 30023d3b0591SJens Wiklander 30033d3b0591SJens WiklanderSecurity 30043d3b0591SJens Wiklander * Fix timing variations and memory access variations in RSA PKCS#1 v1.5 30053d3b0591SJens Wiklander decryption that could lead to a Bleichenbacher-style padding oracle 30063d3b0591SJens Wiklander attack. In TLS, this affects servers that accept ciphersuites based on 30073d3b0591SJens Wiklander RSA decryption (i.e. ciphersuites whose name contains RSA but not 30083d3b0591SJens Wiklander (EC)DH(E)). Discovered by Eyal Ronen (Weizmann Institute), Robert Gillham 30093d3b0591SJens Wiklander (University of Adelaide), Daniel Genkin (University of Michigan), 30103d3b0591SJens Wiklander Adi Shamir (Weizmann Institute), David Wong (NCC Group), and Yuval Yarom 30113d3b0591SJens Wiklander (University of Adelaide, Data61). The attack is described in more detail 30123d3b0591SJens Wiklander in the paper available here: http://cat.eyalro.net/cat.pdf CVE-2018-19608 30133d3b0591SJens Wiklander * In mbedtls_mpi_write_binary(), don't leak the exact size of the number 30143d3b0591SJens Wiklander via branching and memory access patterns. An attacker who could submit 30153d3b0591SJens Wiklander a plaintext for RSA PKCS#1 v1.5 decryption but only observe the timing 30163d3b0591SJens Wiklander of the decryption and not its result could nonetheless decrypt RSA 30173d3b0591SJens Wiklander plaintexts and forge RSA signatures. Other asymmetric algorithms may 30183d3b0591SJens Wiklander have been similarly vulnerable. Reported by Eyal Ronen, Robert Gillham, 30193d3b0591SJens Wiklander Daniel Genkin, Adi Shamir, David Wong and Yuval Yarom. 30203d3b0591SJens Wiklander * Wipe sensitive buffers on the stack in the CTR_DRBG and HMAC_DRBG 30213d3b0591SJens Wiklander modules. 30223d3b0591SJens Wiklander 30233d3b0591SJens WiklanderAPI Changes 30243d3b0591SJens Wiklander * The new functions mbedtls_ctr_drbg_update_ret() and 30253d3b0591SJens Wiklander mbedtls_hmac_drbg_update_ret() are similar to mbedtls_ctr_drbg_update() 30263d3b0591SJens Wiklander and mbedtls_hmac_drbg_update() respectively, but the new functions 30273d3b0591SJens Wiklander report errors whereas the old functions return void. We recommend that 30283d3b0591SJens Wiklander applications use the new functions. 30293d3b0591SJens Wiklander 30303d3b0591SJens Wiklander= mbed TLS 2.14.0 branch released 2018-11-19 30313d3b0591SJens Wiklander 30323d3b0591SJens WiklanderSecurity 30333d3b0591SJens Wiklander * Fix overly strict DN comparison when looking for CRLs belonging to a 30343d3b0591SJens Wiklander particular CA. This previously led to ignoring CRLs when the CRL's issuer 30353d3b0591SJens Wiklander name and the CA's subject name differed in their string encoding (e.g., 30363d3b0591SJens Wiklander one using PrintableString and the other UTF8String) or in the choice of 30373d3b0591SJens Wiklander upper and lower case. Reported by Henrik Andersson of Bosch GmbH in issue 30383d3b0591SJens Wiklander #1784. 30393d3b0591SJens Wiklander * Fix a flawed bounds check in server PSK hint parsing. In case the 30403d3b0591SJens Wiklander incoming message buffer was placed within the first 64KiB of address 30413d3b0591SJens Wiklander space and a PSK-(EC)DHE ciphersuite was used, this allowed an attacker 30423d3b0591SJens Wiklander to trigger a memory access up to 64KiB beyond the incoming message buffer, 30433d3b0591SJens Wiklander potentially leading to an application crash or information disclosure. 30443d3b0591SJens Wiklander * Fix mbedtls_mpi_is_prime() to use more rounds of probabilistic testing. The 30453d3b0591SJens Wiklander previous settings for the number of rounds made it practical for an 30463d3b0591SJens Wiklander adversary to construct non-primes that would be erroneously accepted as 30473d3b0591SJens Wiklander primes with high probability. This does not have an impact on the 30483d3b0591SJens Wiklander security of TLS, but can matter in other contexts with numbers chosen 30493d3b0591SJens Wiklander potentially by an adversary that should be prime and can be validated. 30503d3b0591SJens Wiklander For example, the number of rounds was enough to securely generate RSA key 30513d3b0591SJens Wiklander pairs or Diffie-Hellman parameters, but was insufficient to validate 30523d3b0591SJens Wiklander Diffie-Hellman parameters properly. 30533d3b0591SJens Wiklander See "Prime and Prejudice" by by Martin R. Albrecht and Jake Massimo and 30543d3b0591SJens Wiklander Kenneth G. Paterson and Juraj Somorovsky. 30553d3b0591SJens Wiklander 30563d3b0591SJens WiklanderFeatures 30573d3b0591SJens Wiklander * Add support for temporarily suspending expensive ECC computations after 30583d3b0591SJens Wiklander some configurable amount of operations. This is intended to be used in 30593d3b0591SJens Wiklander constrained, single-threaded systems where ECC is time consuming and can 30603d3b0591SJens Wiklander block other operations until they complete. This is disabled by default, 30613d3b0591SJens Wiklander but can be enabled by MBEDTLS_ECP_RESTARTABLE at compile time and 30623d3b0591SJens Wiklander configured by mbedtls_ecp_set_max_ops() at runtime. It applies to the new 30633d3b0591SJens Wiklander xxx_restartable functions in ECP, ECDSA, PK and X.509 (CRL not supported 30643d3b0591SJens Wiklander yet), and to existing functions in ECDH and SSL (currently only 30653d3b0591SJens Wiklander implemented client-side, for ECDHE-ECDSA ciphersuites in TLS 1.2, 30663d3b0591SJens Wiklander including client authentication). 30673d3b0591SJens Wiklander * Add support for Arm CPU DSP extensions to accelerate asymmetric key 30683d3b0591SJens Wiklander operations. On CPUs where the extensions are available, they can accelerate 30693d3b0591SJens Wiklander MPI multiplications used in ECC and RSA cryptography. Contributed by 30703d3b0591SJens Wiklander Aurelien Jarno. 30713d3b0591SJens Wiklander * Extend RSASSA-PSS signature to allow a smaller salt size. Previously, PSS 30723d3b0591SJens Wiklander signature always used a salt with the same length as the hash, and returned 30733d3b0591SJens Wiklander an error if this was not possible. Now the salt size may be up to two bytes 30743d3b0591SJens Wiklander shorter. This allows the library to support all hash and signature sizes 30753d3b0591SJens Wiklander that comply with FIPS 186-4, including SHA-512 with a 1024-bit key. 30763d3b0591SJens Wiklander * Add support for 128-bit keys in CTR_DRBG. Note that using keys shorter 30773d3b0591SJens Wiklander than 256 bits limits the security of generated material to 128 bits. 30783d3b0591SJens Wiklander 30793d3b0591SJens WiklanderAPI Changes 30803d3b0591SJens Wiklander * Add a common error code of `MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED` for 30813d3b0591SJens Wiklander a feature that is not supported by underlying alternative 30823d3b0591SJens Wiklander implementations implementing cryptographic primitives. This is useful for 30833d3b0591SJens Wiklander hardware accelerators that don't implement all options or features. 30843d3b0591SJens Wiklander 30853d3b0591SJens WiklanderNew deprecations 30863d3b0591SJens Wiklander * All module specific errors following the form 30873d3b0591SJens Wiklander MBEDTLS_ERR_XXX_FEATURE_UNAVAILABLE that indicate a feature is not 30883d3b0591SJens Wiklander supported are deprecated and are now replaced by the new equivalent 30893d3b0591SJens Wiklander platform error. 30903d3b0591SJens Wiklander * All module specific generic hardware acceleration errors following the 30913d3b0591SJens Wiklander form MBEDTLS_ERR_XXX_HW_ACCEL_FAILED that are deprecated and are replaced 30923d3b0591SJens Wiklander by the equivalent plaform error. 30933d3b0591SJens Wiklander * Deprecate the function mbedtls_mpi_is_prime() in favor of 30943d3b0591SJens Wiklander mbedtls_mpi_is_prime_ext() which allows specifying the number of 30953d3b0591SJens Wiklander Miller-Rabin rounds. 30963d3b0591SJens Wiklander 30973d3b0591SJens WiklanderBugfix 30983d3b0591SJens Wiklander * Fix wrong order of freeing in programs/ssl/ssl_server2 example 30993d3b0591SJens Wiklander application leading to a memory leak in case both 31003d3b0591SJens Wiklander MBEDTLS_MEMORY_BUFFER_ALLOC_C and MBEDTLS_MEMORY_BACKTRACE are set. 31013d3b0591SJens Wiklander Fixes #2069. 31023d3b0591SJens Wiklander * Fix a bug in the update function for SSL ticket keys which previously 31033d3b0591SJens Wiklander invalidated keys of a lifetime of less than a 1s. Fixes #1968. 31043d3b0591SJens Wiklander * Fix failure in hmac_drbg in the benchmark sample application, when 31053d3b0591SJens Wiklander MBEDTLS_THREADING_C is defined. Found by TrinityTonic, #1095 31063d3b0591SJens Wiklander * Fix a bug in the record decryption routine ssl_decrypt_buf() 31073d3b0591SJens Wiklander which lead to accepting properly authenticated but improperly 31083d3b0591SJens Wiklander padded records in case of CBC ciphersuites using Encrypt-then-MAC. 31093d3b0591SJens Wiklander * Fix memory leak and freeing without initialization in the example 31103d3b0591SJens Wiklander program programs/x509/cert_write. Fixes #1422. 31113d3b0591SJens Wiklander * Ignore IV in mbedtls_cipher_set_iv() when the cipher mode is 31123d3b0591SJens Wiklander MBEDTLS_MODE_ECB. Found by ezdevelop. Fixes #1091. 31133d3b0591SJens Wiklander * Zeroize memory used for buffering or reassembling handshake messages 31143d3b0591SJens Wiklander after use. 31153d3b0591SJens Wiklander * Use `mbedtls_platform_zeroize()` instead of `memset()` for zeroization 31163d3b0591SJens Wiklander of sensitive data in the example programs aescrypt2 and crypt_and_hash. 31173d3b0591SJens Wiklander * Change the default string format used for various X.509 DN attributes to 31183d3b0591SJens Wiklander UTF8String. Previously, the use of the PrintableString format led to 31193d3b0591SJens Wiklander wildcards and non-ASCII characters being unusable in some DN attributes. 31203d3b0591SJens Wiklander Reported by raprepo in #1860 and by kevinpt in #468. Fix contributed by 31213d3b0591SJens Wiklander Thomas-Dee. 31223d3b0591SJens Wiklander * Fix compilation failure for configurations which use compile time 31233d3b0591SJens Wiklander replacements of standard calloc/free functions through the macros 31243d3b0591SJens Wiklander MBEDTLS_PLATFORM_CALLOC_MACRO and MBEDTLS_PLATFORM_FREE_MACRO. 31253d3b0591SJens Wiklander Reported by ole-de and ddhome2006. Fixes #882, #1642 and #1706. 31263d3b0591SJens Wiklander 31273d3b0591SJens WiklanderChanges 31283d3b0591SJens Wiklander * Removed support for Yotta as a build tool. 31293d3b0591SJens Wiklander * Add tests for session resumption in DTLS. 31303d3b0591SJens Wiklander * Close a test gap in (D)TLS between the client side and the server side: 31313d3b0591SJens Wiklander test the handling of large packets and small packets on the client side 31323d3b0591SJens Wiklander in the same way as on the server side. 31333d3b0591SJens Wiklander * Change the dtls_client and dtls_server samples to work by default over 31343d3b0591SJens Wiklander IPv6 and optionally by a build option over IPv4. 31353d3b0591SJens Wiklander * Change the use of Windows threading to use Microsoft Visual C++ runtime 31363d3b0591SJens Wiklander calls, rather than Win32 API calls directly. This is necessary to avoid 31373d3b0591SJens Wiklander conflict with C runtime usage. Found and fixed by irwir. 31383d3b0591SJens Wiklander * Remember the string format of X.509 DN attributes when replicating 31393d3b0591SJens Wiklander X.509 DNs. Previously, DN attributes were always written in their default 31403d3b0591SJens Wiklander string format (mostly PrintableString), which could lead to CRTs being 31413d3b0591SJens Wiklander created which used PrintableStrings in the issuer field even though the 31423d3b0591SJens Wiklander signing CA used UTF8Strings in its subject field; while X.509 compliant, 31433d3b0591SJens Wiklander such CRTs were rejected in some applications, e.g. some versions of 31443d3b0591SJens Wiklander Firefox, curl and GnuTLS. Reported in #1033 by Moschn. Fix contributed by 31453d3b0591SJens Wiklander Thomas-Dee. 31463d3b0591SJens Wiklander * Improve documentation of mbedtls_ssl_get_verify_result(). 31473d3b0591SJens Wiklander Fixes #517 reported by github-monoculture. 31483d3b0591SJens Wiklander * Add MBEDTLS_MPI_GEN_PRIME_FLAG_LOW_ERR flag to mbedtls_mpi_gen_prime() and 31493d3b0591SJens Wiklander use it to reduce error probability in RSA key generation to levels mandated 31503d3b0591SJens Wiklander by FIPS-186-4. 31513d3b0591SJens Wiklander 31523d3b0591SJens Wiklander= mbed TLS 2.13.1 branch released 2018-09-06 31533d3b0591SJens Wiklander 31543d3b0591SJens WiklanderAPI Changes 31553d3b0591SJens Wiklander * Extend the platform module with an abstraction mbedtls_platform_gmtime_r() 31563d3b0591SJens Wiklander whose implementation should behave as a thread-safe version of gmtime(). 31573d3b0591SJens Wiklander This allows users to configure such an implementation at compile time when 31583d3b0591SJens Wiklander the target system cannot be deduced automatically, by setting the option 31593d3b0591SJens Wiklander MBEDTLS_PLATFORM_GMTIME_R_ALT. At this stage Mbed TLS is only able to 31603d3b0591SJens Wiklander automatically select implementations for Windows and POSIX C libraries. 31613d3b0591SJens Wiklander 31623d3b0591SJens WiklanderBugfix 31633d3b0591SJens Wiklander * Fix build failures on platforms where only gmtime() is available but 31643d3b0591SJens Wiklander neither gmtime_r() nor gmtime_s() are present. Fixes #1907. 31653d3b0591SJens Wiklander 31663d3b0591SJens Wiklander= mbed TLS 2.13.0 branch released 2018-08-31 31673d3b0591SJens Wiklander 31683d3b0591SJens WiklanderSecurity 31693d3b0591SJens Wiklander * Fix an issue in the X.509 module which could lead to a buffer overread 31703d3b0591SJens Wiklander during certificate extensions parsing. In case of receiving malformed 31713d3b0591SJens Wiklander input (extensions length field equal to 0), an illegal read of one byte 31723d3b0591SJens Wiklander beyond the input buffer is made. Found and analyzed by Nathan Crandall. 31733d3b0591SJens Wiklander 31743d3b0591SJens WiklanderFeatures 31753d3b0591SJens Wiklander * Add support for fragmentation of outgoing DTLS handshake messages. This 31763d3b0591SJens Wiklander is controlled by the maximum fragment length as set locally or negotiated 31773d3b0591SJens Wiklander with the peer, as well as by a new per-connection MTU option, set using 31783d3b0591SJens Wiklander mbedtls_ssl_set_mtu(). 31793d3b0591SJens Wiklander * Add support for auto-adjustment of MTU to a safe value during the 31803d3b0591SJens Wiklander handshake when flights do not get through (RFC 6347, section 4.1.1.1, 31813d3b0591SJens Wiklander last paragraph). 31823d3b0591SJens Wiklander * Add support for packing multiple records within a single datagram, 31833d3b0591SJens Wiklander enabled by default. 31843d3b0591SJens Wiklander * Add support for buffering out-of-order handshake messages in DTLS. 31853d3b0591SJens Wiklander The maximum amount of RAM used for this can be controlled by the 31863d3b0591SJens Wiklander compile-time constant MBEDTLS_SSL_DTLS_MAX_BUFFERING defined 31873d3b0591SJens Wiklander in mbedtls/config.h. 31883d3b0591SJens Wiklander 31893d3b0591SJens WiklanderAPI Changes 31903d3b0591SJens Wiklander * Add function mbedtls_ssl_set_datagram_packing() to configure 31913d3b0591SJens Wiklander the use of datagram packing (enabled by default). 31923d3b0591SJens Wiklander 31933d3b0591SJens WiklanderBugfix 31943d3b0591SJens Wiklander * Fix a potential memory leak in mbedtls_ssl_setup() function. An allocation 31953d3b0591SJens Wiklander failure in the function could lead to other buffers being leaked. 31963d3b0591SJens Wiklander * Fixes an issue with MBEDTLS_CHACHAPOLY_C which would not compile if 31973d3b0591SJens Wiklander MBEDTLS_ARC4_C and MBEDTLS_CIPHER_NULL_CIPHER weren't also defined. #1890 31983d3b0591SJens Wiklander * Fix a memory leak in ecp_mul_comb() if ecp_precompute_comb() fails. 31993d3b0591SJens Wiklander Fix contributed by Espressif Systems. 32003d3b0591SJens Wiklander * Add ecc extensions only if an ecc based ciphersuite is used. 32013d3b0591SJens Wiklander This improves compliance to RFC 4492, and as a result, solves 32023d3b0591SJens Wiklander interoperability issues with BouncyCastle. Raised by milenamil in #1157. 32033d3b0591SJens Wiklander * Replace printf with mbedtls_printf in the ARIA module. Found by 32043d3b0591SJens Wiklander TrinityTonic in #1908. 32053d3b0591SJens Wiklander * Fix potential use-after-free in mbedtls_ssl_get_max_frag_len() 32063d3b0591SJens Wiklander and mbedtls_ssl_get_record_expansion() after a session reset. Fixes #1941. 32073d3b0591SJens Wiklander * Fix a bug that caused SSL/TLS clients to incorrectly abort the handshake 32083d3b0591SJens Wiklander with TLS versions 1.1 and earlier when the server requested authentication 32093d3b0591SJens Wiklander without providing a list of CAs. This was due to an overly strict bounds 32103d3b0591SJens Wiklander check in parsing the CertificateRequest message, 32113d3b0591SJens Wiklander introduced in Mbed TLS 2.12.0. Fixes #1954. 32123d3b0591SJens Wiklander * Fix a miscalculation of the maximum record expansion in 32133d3b0591SJens Wiklander mbedtls_ssl_get_record_expansion() in case of ChachaPoly ciphersuites, 32143d3b0591SJens Wiklander or CBC ciphersuites in (D)TLS versions 1.1 or higher. Fixes #1913, #1914. 32153d3b0591SJens Wiklander * Fix undefined shifts with negative values in certificates parsing 32163d3b0591SJens Wiklander (found by Catena cyber using oss-fuzz) 32173d3b0591SJens Wiklander * Fix memory leak and free without initialization in pk_encrypt 32183d3b0591SJens Wiklander and pk_decrypt example programs. Reported by Brace Stout. Fixes #1128. 32193d3b0591SJens Wiklander * Remove redundant else statement. Raised by irwir. Fixes #1776. 32203d3b0591SJens Wiklander 32213d3b0591SJens WiklanderChanges 32223d3b0591SJens Wiklander * Copy headers preserving timestamps when doing a "make install". 32233d3b0591SJens Wiklander Contributed by xueruini. 32243d3b0591SJens Wiklander * Allow the forward declaration of public structs. Contributed by Dawid 32253d3b0591SJens Wiklander Drozd. Fixes #1215 raised by randombit. 32263d3b0591SJens Wiklander * Improve compatibility with some alternative CCM implementations by using 32273d3b0591SJens Wiklander CCM test vectors from RAM. 32283d3b0591SJens Wiklander * Add support for buffering of out-of-order handshake messages. 32293d3b0591SJens Wiklander * Add warnings to the documentation of the HKDF module to reduce the risk 32303d3b0591SJens Wiklander of misusing the mbedtls_hkdf_extract() and mbedtls_hkdf_expand() 32313d3b0591SJens Wiklander functions. Fixes #1775. Reported by Brian J. Murray. 32323d3b0591SJens Wiklander 32333d3b0591SJens Wiklander= mbed TLS 2.12.0 branch released 2018-07-25 32343d3b0591SJens Wiklander 32353d3b0591SJens WiklanderSecurity 32363d3b0591SJens Wiklander * Fix a vulnerability in TLS ciphersuites based on CBC and using SHA-384, 32373d3b0591SJens Wiklander in (D)TLS 1.0 to 1.2, that allowed an active network attacker to 32383d3b0591SJens Wiklander partially recover the plaintext of messages under some conditions by 32393d3b0591SJens Wiklander exploiting timing measurements. With DTLS, the attacker could perform 32403d3b0591SJens Wiklander this recovery by sending many messages in the same connection. With TLS 32413d3b0591SJens Wiklander or if mbedtls_ssl_conf_dtls_badmac_limit() was used, the attack only 32423d3b0591SJens Wiklander worked if the same secret (for example a HTTP Cookie) has been repeatedly 32433d3b0591SJens Wiklander sent over connections manipulated by the attacker. Connections using GCM 32443d3b0591SJens Wiklander or CCM instead of CBC, using hash sizes other than SHA-384, or using 32453d3b0591SJens Wiklander Encrypt-then-Mac (RFC 7366) were not affected. The vulnerability was 32463d3b0591SJens Wiklander caused by a miscalculation (for SHA-384) in a countermeasure to the 32473d3b0591SJens Wiklander original Lucky 13 attack. Found by Kenny Paterson, Eyal Ronen and Adi 32483d3b0591SJens Wiklander Shamir. 32493d3b0591SJens Wiklander * Fix a vulnerability in TLS ciphersuites based on CBC, in (D)TLS 1.0 to 32503d3b0591SJens Wiklander 1.2, that allowed a local attacker, able to execute code on the local 32513d3b0591SJens Wiklander machine as well as manipulate network packets, to partially recover the 32523d3b0591SJens Wiklander plaintext of messages under some conditions by using a cache attack 32535b25c76aSJerome Forissier targeting an internal MD/SHA buffer. With TLS or if 32543d3b0591SJens Wiklander mbedtls_ssl_conf_dtls_badmac_limit() was used, the attack only worked if 32553d3b0591SJens Wiklander the same secret (for example a HTTP Cookie) has been repeatedly sent over 32563d3b0591SJens Wiklander connections manipulated by the attacker. Connections using GCM or CCM 32573d3b0591SJens Wiklander instead of CBC or using Encrypt-then-Mac (RFC 7366) were not affected. 32583d3b0591SJens Wiklander Found by Kenny Paterson, Eyal Ronen and Adi Shamir. 32593d3b0591SJens Wiklander * Add a counter-measure against a vulnerability in TLS ciphersuites based 32603d3b0591SJens Wiklander on CBC, in (D)TLS 1.0 to 1.2, that allowed a local attacker, able to 32613d3b0591SJens Wiklander execute code on the local machine as well as manipulate network packets, 32623d3b0591SJens Wiklander to partially recover the plaintext of messages under some conditions (see 32633d3b0591SJens Wiklander previous entry) by using a cache attack targeting the SSL input record 32643d3b0591SJens Wiklander buffer. Connections using GCM or CCM instead of CBC or using 32653d3b0591SJens Wiklander Encrypt-then-Mac (RFC 7366) were not affected. Found by Kenny Paterson, 32663d3b0591SJens Wiklander Eyal Ronen and Adi Shamir. 32673d3b0591SJens Wiklander 32683d3b0591SJens WiklanderFeatures 32693d3b0591SJens Wiklander * Add new crypto primitives from RFC 7539: stream cipher Chacha20, one-time 32703d3b0591SJens Wiklander authenticator Poly1305 and AEAD construct Chacha20-Poly1305. Contributed 32713d3b0591SJens Wiklander by Daniel King. 32723d3b0591SJens Wiklander * Add support for CHACHA20-POLY1305 ciphersuites from RFC 7905. 32733d3b0591SJens Wiklander * Add platform support for the Haiku OS. (https://www.haiku-os.org). 32743d3b0591SJens Wiklander Contributed by Augustin Cavalier. 32753d3b0591SJens Wiklander * Make the receive and transmit buffers independent sizes, for situations 32763d3b0591SJens Wiklander where the outgoing buffer can be fixed at a smaller size than the incoming 32773d3b0591SJens Wiklander buffer, which can save some RAM. If buffer lengths are kept equal, there 32783d3b0591SJens Wiklander is no functional difference. Contributed by Angus Gratton, and also 32793d3b0591SJens Wiklander independently contributed again by Paul Sokolovsky. 32803d3b0591SJens Wiklander * Add support for key wrapping modes based on AES as defined by 32813d3b0591SJens Wiklander NIST SP 800-38F algorithms KW and KWP and by RFC 3394 and RFC 5649. 32823d3b0591SJens Wiklander 32833d3b0591SJens WiklanderBugfix 32843d3b0591SJens Wiklander * Fix the key_app_writer example which was writing a leading zero byte which 32853d3b0591SJens Wiklander was creating an invalid ASN.1 tag. Found by Aryeh R. Fixes #1257. 32863d3b0591SJens Wiklander * Fix compilation error on C++, because of a variable named new. 32873d3b0591SJens Wiklander Found and fixed by Hirotaka Niisato in #1783. 32883d3b0591SJens Wiklander * Fix "no symbols" warning issued by ranlib when building on Mac OS X. Fix 32893d3b0591SJens Wiklander contributed by tabascoeye. 32903d3b0591SJens Wiklander * Clarify documentation for mbedtls_ssl_write() to include 0 as a valid 32913d3b0591SJens Wiklander return value. Found by @davidwu2000. #839 32923d3b0591SJens Wiklander * Fix a memory leak in mbedtls_x509_csr_parse(), found by catenacyber, 32933d3b0591SJens Wiklander Philippe Antoine. Fixes #1623. 32943d3b0591SJens Wiklander * Remove unused headers included in x509.c. Found by Chris Hanson and fixed 32953d3b0591SJens Wiklander by Brendan Shanks. Part of a fix for #992. 32963d3b0591SJens Wiklander * Fix compilation error when MBEDTLS_ARC4_C is disabled and 32973d3b0591SJens Wiklander MBEDTLS_CIPHER_NULL_CIPHER is enabled. Found by TrinityTonic in #1719. 32983d3b0591SJens Wiklander * Added length checks to some TLS parsing functions. Found and fixed by 32993d3b0591SJens Wiklander Philippe Antoine from Catena cyber. #1663. 33003d3b0591SJens Wiklander * Fix the inline assembly for the MPI multiply helper function for i386 and 33013d3b0591SJens Wiklander i386 with SSE2. Found by László Langó. Fixes #1550 33023d3b0591SJens Wiklander * Fix namespacing in header files. Remove the `mbedtls` namespacing in 33033d3b0591SJens Wiklander the `#include` in the header files. Resolves #857 33043d3b0591SJens Wiklander * Fix compiler warning of 'use before initialisation' in 33053d3b0591SJens Wiklander mbedtls_pk_parse_key(). Found by Martin Boye Petersen and fixed by Dawid 33063d3b0591SJens Wiklander Drozd. #1098 33073d3b0591SJens Wiklander * Fix decryption for zero length messages (which contain all padding) when a 33083d3b0591SJens Wiklander CBC based ciphersuite is used together with Encrypt-then-MAC. Previously, 33093d3b0591SJens Wiklander such a message was wrongly reported as an invalid record and therefore lead 33103d3b0591SJens Wiklander to the connection being terminated. Seen most often with OpenSSL using 33113d3b0591SJens Wiklander TLS 1.0. Reported by @kFYatek and by Conor Murphy on the forum. Fix 33123d3b0591SJens Wiklander contributed by Espressif Systems. Fixes #1632 33133d3b0591SJens Wiklander * Fix ssl_client2 example to send application data with 0-length content 33143d3b0591SJens Wiklander when the request_size argument is set to 0 as stated in the documentation. 33153d3b0591SJens Wiklander Fixes #1833. 33163d3b0591SJens Wiklander * Correct the documentation for `mbedtls_ssl_get_session()`. This API has 33173d3b0591SJens Wiklander deep copy of the session, and the peer certificate is not lost. Fixes #926. 33183d3b0591SJens Wiklander * Fix build using -std=c99. Fixed by Nick Wilson. 33193d3b0591SJens Wiklander 33203d3b0591SJens WiklanderChanges 33213d3b0591SJens Wiklander * Fail when receiving a TLS alert message with an invalid length, or invalid 33223d3b0591SJens Wiklander zero-length messages when using TLS 1.2. Contributed by Espressif Systems. 33233d3b0591SJens Wiklander * Change the default behaviour of mbedtls_hkdf_extract() to return an error 33243d3b0591SJens Wiklander when calling with a NULL salt and non-zero salt_len. Contributed by 33253d3b0591SJens Wiklander Brian J Murray 33263d3b0591SJens Wiklander * Change the shebang line in Perl scripts to look up perl in the PATH. 33273d3b0591SJens Wiklander Contributed by fbrosson. 33283d3b0591SJens Wiklander * Allow overriding the time on Windows via the platform-time abstraction. 33293d3b0591SJens Wiklander Fixed by Nick Wilson. 33303d3b0591SJens Wiklander * Use gmtime_r/gmtime_s for thread-safety. Fixed by Nick Wilson. 33313d3b0591SJens Wiklander 33323d3b0591SJens Wiklander= mbed TLS 2.11.0 branch released 2018-06-18 33333d3b0591SJens Wiklander 33343d3b0591SJens WiklanderFeatures 33353d3b0591SJens Wiklander * Add additional block mode, OFB (Output Feedback), to the AES module and 33363d3b0591SJens Wiklander cipher abstraction module. 33373d3b0591SJens Wiklander * Implement the HMAC-based extract-and-expand key derivation function 33383d3b0591SJens Wiklander (HKDF) per RFC 5869. Contributed by Thomas Fossati. 33393d3b0591SJens Wiklander * Add support for the CCM* block cipher mode as defined in IEEE Std. 802.15.4. 33403d3b0591SJens Wiklander * Add support for the XTS block cipher mode with AES (AES-XTS). 33413d3b0591SJens Wiklander Contributed by Aorimn in pull request #414. 33423d3b0591SJens Wiklander * In TLS servers, support offloading private key operations to an external 33433d3b0591SJens Wiklander cryptoprocessor. Private key operations can be asynchronous to allow 33443d3b0591SJens Wiklander non-blocking operation of the TLS server stack. 33453d3b0591SJens Wiklander 33463d3b0591SJens WiklanderBugfix 33473d3b0591SJens Wiklander * Fix the cert_write example to handle certificates signed with elliptic 33483d3b0591SJens Wiklander curves as well as RSA. Fixes #777 found by dbedev. 33493d3b0591SJens Wiklander * Fix for redefinition of _WIN32_WINNT to avoid overriding a definition 33503d3b0591SJens Wiklander used by user applications. Found and fixed by Fabio Alessandrelli. 33513d3b0591SJens Wiklander * Fix compilation warnings with IAR toolchain, on 32 bit platform. 33523d3b0591SJens Wiklander Reported by rahmanih in #683 33533d3b0591SJens Wiklander * Fix braces in mbedtls_memory_buffer_alloc_status(). Found by sbranden, #552. 33543d3b0591SJens Wiklander 33553d3b0591SJens WiklanderChanges 33563d3b0591SJens Wiklander * Changed CMake defaults for IAR to treat all compiler warnings as errors. 33573d3b0591SJens Wiklander * Changed the Clang parameters used in the CMake build files to work for 33583d3b0591SJens Wiklander versions later than 3.6. Versions of Clang earlier than this may no longer 33593d3b0591SJens Wiklander work. Fixes #1072 33603d3b0591SJens Wiklander 33613d3b0591SJens Wiklander= mbed TLS 2.10.0 branch released 2018-06-06 33623d3b0591SJens Wiklander 33633d3b0591SJens WiklanderFeatures 33643d3b0591SJens Wiklander * Add support for ARIA cipher (RFC 5794) and associated TLS ciphersuites 33653d3b0591SJens Wiklander (RFC 6209). Disabled by default, see MBEDTLS_ARIA_C in config.h 33663d3b0591SJens Wiklander 33673d3b0591SJens WiklanderAPI Changes 33683d3b0591SJens Wiklander * Extend the platform module with a util component that contains 33693d3b0591SJens Wiklander functionality shared by multiple Mbed TLS modules. At this stage 33703d3b0591SJens Wiklander platform_util.h (and its associated platform_util.c) only contain 33713d3b0591SJens Wiklander mbedtls_platform_zeroize(), which is a critical function from a security 33723d3b0591SJens Wiklander point of view. mbedtls_platform_zeroize() needs to be regularly tested 33733d3b0591SJens Wiklander against compilers to ensure that calls to it are not removed from the 33743d3b0591SJens Wiklander output binary as part of redundant code elimination optimizations. 33753d3b0591SJens Wiklander Therefore, mbedtls_platform_zeroize() is moved to the platform module to 33763d3b0591SJens Wiklander facilitate testing and maintenance. 33773d3b0591SJens Wiklander 33783d3b0591SJens WiklanderBugfix 33793d3b0591SJens Wiklander * Fix an issue with MicroBlaze support in bn_mul.h which was causing the 33803d3b0591SJens Wiklander build to fail. Found by zv-io. Fixes #1651. 33813d3b0591SJens Wiklander 33823d3b0591SJens WiklanderChanges 33833d3b0591SJens Wiklander * Support TLS testing in out-of-source builds using cmake. Fixes #1193. 33843d3b0591SJens Wiklander * Fix redundant declaration of mbedtls_ssl_list_ciphersuites. Raised by 33853d3b0591SJens Wiklander TrinityTonic. #1359. 33863d3b0591SJens Wiklander 33873d3b0591SJens Wiklander= mbed TLS 2.9.0 branch released 2018-04-30 33883d3b0591SJens Wiklander 33893d3b0591SJens WiklanderSecurity 33903d3b0591SJens Wiklander * Fix an issue in the X.509 module which could lead to a buffer overread 33913d3b0591SJens Wiklander during certificate validation. Additionally, the issue could also lead to 33923d3b0591SJens Wiklander unnecessary callback checks being made or to some validation checks to be 33933d3b0591SJens Wiklander omitted. The overread could be triggered remotely, while the other issues 33943d3b0591SJens Wiklander would require a non DER-compliant certificate to be correctly signed by a 33953d3b0591SJens Wiklander trusted CA, or a trusted CA with a non DER-compliant certificate. Found by 33963d3b0591SJens Wiklander luocm. Fixes #825. 33973d3b0591SJens Wiklander * Fix the buffer length assertion in the ssl_parse_certificate_request() 33983d3b0591SJens Wiklander function which led to an arbitrary overread of the message buffer. The 33993d3b0591SJens Wiklander overreads could be caused by receiving a malformed message at the point 34003d3b0591SJens Wiklander where an optional signature algorithms list is expected when the signature 34013d3b0591SJens Wiklander algorithms section is too short. In builds with debug output, the overread 34023d3b0591SJens Wiklander data is output with the debug data. 34033d3b0591SJens Wiklander * Fix a client-side bug in the validation of the server's ciphersuite choice 34043d3b0591SJens Wiklander which could potentially lead to the client accepting a ciphersuite it didn't 34053d3b0591SJens Wiklander offer or a ciphersuite that cannot be used with the TLS or DTLS version 34063d3b0591SJens Wiklander chosen by the server. This could lead to corruption of internal data 34073d3b0591SJens Wiklander structures for some configurations. 34083d3b0591SJens Wiklander 34093d3b0591SJens WiklanderFeatures 34103d3b0591SJens Wiklander * Add an option, MBEDTLS_AES_FEWER_TABLES, to dynamically compute smaller AES 34113d3b0591SJens Wiklander tables during runtime, thereby reducing the RAM/ROM footprint by ~6KiB. 34123d3b0591SJens Wiklander Suggested and contributed by jkivilin in pull request #394. 34133d3b0591SJens Wiklander * Add initial support for Curve448 (RFC 7748). Only mbedtls_ecp_mul() and 34143d3b0591SJens Wiklander ECDH primitive functions (mbedtls_ecdh_gen_public(), 34153d3b0591SJens Wiklander mbedtls_ecdh_compute_shared()) are supported for now. Contributed by 34163d3b0591SJens Wiklander Nicholas Wilson in pull request #348. 34173d3b0591SJens Wiklander 34183d3b0591SJens WiklanderAPI Changes 34193d3b0591SJens Wiklander * Extend the public API with the function of mbedtls_net_poll() to allow user 34203d3b0591SJens Wiklander applications to wait for a network context to become ready before reading 34213d3b0591SJens Wiklander or writing. 34223d3b0591SJens Wiklander * Add function mbedtls_ssl_check_pending() to the public API to allow 34233d3b0591SJens Wiklander a check for whether more more data is pending to be processed in the 34243d3b0591SJens Wiklander internal message buffers. 34253d3b0591SJens Wiklander This function is necessary to determine when it is safe to idle on the 34263d3b0591SJens Wiklander underlying transport in case event-driven IO is used. 34273d3b0591SJens Wiklander 34283d3b0591SJens WiklanderBugfix 34293d3b0591SJens Wiklander * Fix a spurious uninitialized variable warning in cmac.c. Fix independently 34303d3b0591SJens Wiklander contributed by Brian J Murray and David Brown. 34313d3b0591SJens Wiklander * Add missing dependencies in test suites that led to build failures 34323d3b0591SJens Wiklander in configurations that omit certain hashes or public-key algorithms. 34333d3b0591SJens Wiklander Fixes #1040. 34343d3b0591SJens Wiklander * Fix C89 incompatibility in benchmark.c. Contributed by Brendan Shanks. 34353d3b0591SJens Wiklander #1353 34363d3b0591SJens Wiklander * Add missing dependencies for MBEDTLS_HAVE_TIME_DATE and 34373d3b0591SJens Wiklander MBEDTLS_VERSION_FEATURES in some test suites. Contributed by 34383d3b0591SJens Wiklander Deomid Ryabkov. Fixes #1299, #1475. 34393d3b0591SJens Wiklander * Fix the Makefile build process for building shared libraries on Mac OS X. 34403d3b0591SJens Wiklander Fixed by mnacamura. 34413d3b0591SJens Wiklander * Fix parsing of PKCS#8 encoded Elliptic Curve keys. Previously Mbed TLS was 34423d3b0591SJens Wiklander unable to parse keys which had only the optional parameters field of the 34433d3b0591SJens Wiklander ECPrivateKey structure. Found by Jethro Beekman, fixed in #1379. 34443d3b0591SJens Wiklander * Return the plaintext data more quickly on unpadded CBC decryption, as 34453d3b0591SJens Wiklander stated in the mbedtls_cipher_update() documentation. Contributed by 34463d3b0591SJens Wiklander Andy Leiserson. 34473d3b0591SJens Wiklander * Fix overriding and ignoring return values when parsing and writing to 34483d3b0591SJens Wiklander a file in pk_sign program. Found by kevlut in #1142. 34493d3b0591SJens Wiklander * Restrict usage of error code MBEDTLS_ERR_SSL_WANT_READ to situations 34503d3b0591SJens Wiklander where data needs to be fetched from the underlying transport in order 34513d3b0591SJens Wiklander to make progress. Previously, this error code was also occasionally 34523d3b0591SJens Wiklander returned when unexpected messages were being discarded, ignoring that 34533d3b0591SJens Wiklander further messages could potentially already be pending to be processed 34543d3b0591SJens Wiklander in the internal buffers; these cases led to deadlocks when event-driven 34553d3b0591SJens Wiklander I/O was used. Found and reported by Hubert Mis in #772. 34563d3b0591SJens Wiklander * Fix buffer length assertions in the ssl_parse_certificate_request() 34573d3b0591SJens Wiklander function which leads to a potential one byte overread of the message 34583d3b0591SJens Wiklander buffer. 34593d3b0591SJens Wiklander * Fix invalid buffer sizes passed to zlib during record compression and 34603d3b0591SJens Wiklander decompression. 34613d3b0591SJens Wiklander * Fix the soversion of libmbedcrypto to match the soversion of the 34623d3b0591SJens Wiklander maintained 2.7 branch. The soversion was increased in Mbed TLS 34633d3b0591SJens Wiklander version 2.7.1 to reflect breaking changes in that release, but the 34643d3b0591SJens Wiklander increment was missed in 2.8.0 and later releases outside of the 2.7 branch. 34653d3b0591SJens Wiklander 34663d3b0591SJens WiklanderChanges 34673d3b0591SJens Wiklander * Remove some redundant code in bignum.c. Contributed by Alexey Skalozub. 34683d3b0591SJens Wiklander * Support cmake builds where Mbed TLS is a subproject. Fix contributed 34693d3b0591SJens Wiklander independently by Matthieu Volat and Arne Schwabe. 34703d3b0591SJens Wiklander * Improve testing in configurations that omit certain hashes or 34713d3b0591SJens Wiklander public-key algorithms. Includes contributions by Gert van Dijk. 34723d3b0591SJens Wiklander * Improve negative testing of X.509 parsing. 34733d3b0591SJens Wiklander * Do not define global mutexes around readdir() and gmtime() in 34743d3b0591SJens Wiklander configurations where the feature is disabled. Found and fixed by Gergely 34753d3b0591SJens Wiklander Budai. 34763d3b0591SJens Wiklander * Harden the function mbedtls_ssl_config_free() against misuse, so that it 34773d3b0591SJens Wiklander doesn't leak memory if the user doesn't use mbedtls_ssl_conf_psk() and 34783d3b0591SJens Wiklander instead incorrectly manipulates the configuration structure directly. 34793d3b0591SJens Wiklander Found and fix submitted by junyeonLEE in #1220. 34803d3b0591SJens Wiklander * Provide an empty implementation of mbedtls_pkcs5_pbes2() when 34813d3b0591SJens Wiklander MBEDTLS_ASN1_PARSE_C is not enabled. This allows the use of PBKDF2 34823d3b0591SJens Wiklander without PBES2. Fixed by Marcos Del Sol Vives. 34833d3b0591SJens Wiklander * Add the order of the base point as N in the mbedtls_ecp_group structure 34843d3b0591SJens Wiklander for Curve25519 (other curves had it already). Contributed by Nicholas 34853d3b0591SJens Wiklander Wilson #481 34863d3b0591SJens Wiklander * Improve the documentation of mbedtls_net_accept(). Contributed by Ivan 34873d3b0591SJens Wiklander Krylov. 34883d3b0591SJens Wiklander * Improve the documentation of mbedtls_ssl_write(). Suggested by 34893d3b0591SJens Wiklander Paul Sokolovsky in #1356. 34903d3b0591SJens Wiklander * Add an option in the Makefile to support ar utilities where the operation 34913d3b0591SJens Wiklander letter must not be prefixed by '-', such as LLVM. Found and fixed by 34923d3b0591SJens Wiklander Alex Hixon. 34933d3b0591SJens Wiklander * Allow configuring the shared library extension by setting the DLEXT 34943d3b0591SJens Wiklander environment variable when using the project makefiles. 34953d3b0591SJens Wiklander * Optimize unnecessary zeroing in mbedtls_mpi_copy. Based on a contribution 34963d3b0591SJens Wiklander by Alexey Skalozub in #405. 34973d3b0591SJens Wiklander * In the SSL module, when f_send, f_recv or f_recv_timeout report 34983d3b0591SJens Wiklander transmitting more than the required length, return an error. Raised by 34993d3b0591SJens Wiklander Sam O'Connor in #1245. 35003d3b0591SJens Wiklander * Improve robustness of mbedtls_ssl_derive_keys against the use of 35013d3b0591SJens Wiklander HMAC functions with non-HMAC ciphersuites. Independently contributed 35023d3b0591SJens Wiklander by Jiayuan Chen in #1377. Fixes #1437. 35033d3b0591SJens Wiklander * Improve security of RSA key generation by including criteria from 35043d3b0591SJens Wiklander FIPS 186-4. Contributed by Jethro Beekman. #1380 35053d3b0591SJens Wiklander * Declare functions in header files even when an alternative implementation 35063d3b0591SJens Wiklander of the corresponding module is activated by defining the corresponding 35073d3b0591SJens Wiklander MBEDTLS_XXX_ALT macro. This means that alternative implementations do 35083d3b0591SJens Wiklander not need to copy the declarations, and ensures that they will have the 35093d3b0591SJens Wiklander same API. 35103d3b0591SJens Wiklander * Add platform setup and teardown calls in test suites. 35113d3b0591SJens Wiklander 35123d3b0591SJens Wiklander= mbed TLS 2.8.0 branch released 2018-03-16 35133d3b0591SJens Wiklander 35143d3b0591SJens WiklanderDefault behavior changes 35153d3b0591SJens Wiklander * The truncated HMAC extension now conforms to RFC 6066. This means 35163d3b0591SJens Wiklander that when both sides of a TLS connection negotiate the truncated 35173d3b0591SJens Wiklander HMAC extension, Mbed TLS can now interoperate with other 35183d3b0591SJens Wiklander compliant implementations, but this breaks interoperability with 35193d3b0591SJens Wiklander prior versions of Mbed TLS. To restore the old behavior, enable 35203d3b0591SJens Wiklander the (deprecated) option MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT in 35213d3b0591SJens Wiklander config.h. Found by Andreas Walz (ivESK, Offenburg University of 35223d3b0591SJens Wiklander Applied Sciences). 35233d3b0591SJens Wiklander 35243d3b0591SJens WiklanderSecurity 35253d3b0591SJens Wiklander * Fix implementation of the truncated HMAC extension. The previous 35263d3b0591SJens Wiklander implementation allowed an offline 2^80 brute force attack on the 35273d3b0591SJens Wiklander HMAC key of a single, uninterrupted connection (with no 35283d3b0591SJens Wiklander resumption of the session). 35293d3b0591SJens Wiklander * Verify results of RSA private key operations to defend 35303d3b0591SJens Wiklander against Bellcore glitch attack. 35313d3b0591SJens Wiklander * Fix a buffer overread in ssl_parse_server_key_exchange() that could cause 35323d3b0591SJens Wiklander a crash on invalid input. 35333d3b0591SJens Wiklander * Fix a buffer overread in ssl_parse_server_psk_hint() that could cause a 35343d3b0591SJens Wiklander crash on invalid input. 35353d3b0591SJens Wiklander * Fix CRL parsing to reject CRLs containing unsupported critical 35363d3b0591SJens Wiklander extensions. Found by Falko Strenzke and Evangelos Karatsiolis. 35373d3b0591SJens Wiklander 35383d3b0591SJens WiklanderFeatures 35393d3b0591SJens Wiklander * Extend PKCS#8 interface by introducing support for the entire SHA 35403d3b0591SJens Wiklander algorithms family when encrypting private keys using PKCS#5 v2.0. 35413d3b0591SJens Wiklander This allows reading encrypted PEM files produced by software that 35423d3b0591SJens Wiklander uses PBKDF2-SHA2, such as OpenSSL 1.1. Submitted by Antonio Quartulli, 35433d3b0591SJens Wiklander OpenVPN Inc. Fixes #1339 35443d3b0591SJens Wiklander * Add support for public keys encoded in PKCS#1 format. #1122 35453d3b0591SJens Wiklander 35463d3b0591SJens WiklanderNew deprecations 35473d3b0591SJens Wiklander * Deprecate support for record compression (configuration option 35483d3b0591SJens Wiklander MBEDTLS_ZLIB_SUPPORT). 35493d3b0591SJens Wiklander 35503d3b0591SJens WiklanderBugfix 35513d3b0591SJens Wiklander * Fix the name of a DHE parameter that was accidentally changed in 2.7.0. 35523d3b0591SJens Wiklander Fixes #1358. 35533d3b0591SJens Wiklander * Fix test_suite_pk to work on 64-bit ILP32 systems. #849 35543d3b0591SJens Wiklander * Fix mbedtls_x509_crt_profile_suiteb, which used to reject all certificates 35553d3b0591SJens Wiklander with flag MBEDTLS_X509_BADCERT_BAD_PK even when the key type was correct. 35563d3b0591SJens Wiklander In the context of SSL, this resulted in handshake failure. Reported by 35573d3b0591SJens Wiklander daniel in the Mbed TLS forum. #1351 35583d3b0591SJens Wiklander * Fix Windows x64 builds with the included mbedTLS.sln file. #1347 35593d3b0591SJens Wiklander * Fix setting version TLSv1 as minimal version, even if TLS 1 35603d3b0591SJens Wiklander is not enabled. Set MBEDTLS_SSL_MIN_MAJOR_VERSION 35613d3b0591SJens Wiklander and MBEDTLS_SSL_MIN_MINOR_VERSION instead of 35623d3b0591SJens Wiklander MBEDTLS_SSL_MAJOR_VERSION_3 and MBEDTLS_SSL_MINOR_VERSION_1. #664 35633d3b0591SJens Wiklander * Fix compilation error on Mingw32 when _TRUNCATE is defined. Use _TRUNCATE 35643d3b0591SJens Wiklander only if __MINGW32__ not defined. Fix suggested by Thomas Glanzmann and 35653d3b0591SJens Wiklander Nick Wilson on issue #355 35663d3b0591SJens Wiklander * In test_suite_pk, pass valid parameters when testing for hash length 35673d3b0591SJens Wiklander overflow. #1179 35683d3b0591SJens Wiklander * Fix memory allocation corner cases in memory_buffer_alloc.c module. Found 35693d3b0591SJens Wiklander by Guido Vranken. #639 35703d3b0591SJens Wiklander * Log correct number of ciphersuites used in Client Hello message. #918 35713d3b0591SJens Wiklander * Fix X509 CRT parsing that would potentially accept an invalid tag when 35723d3b0591SJens Wiklander parsing the subject alternative names. 35733d3b0591SJens Wiklander * Fix a possible arithmetic overflow in ssl_parse_server_key_exchange() 35743d3b0591SJens Wiklander that could cause a key exchange to fail on valid data. 35753d3b0591SJens Wiklander * Fix a possible arithmetic overflow in ssl_parse_server_psk_hint() that 35763d3b0591SJens Wiklander could cause a key exchange to fail on valid data. 35773d3b0591SJens Wiklander * Don't define mbedtls_aes_decrypt and mbedtls_aes_encrypt under 35783d3b0591SJens Wiklander MBEDTLS_DEPRECATED_REMOVED. #1388 35793d3b0591SJens Wiklander * Fix a 1-byte heap buffer overflow (read-only) during private key parsing. 35803d3b0591SJens Wiklander Found through fuzz testing. 35813d3b0591SJens Wiklander 35823d3b0591SJens WiklanderChanges 35833d3b0591SJens Wiklander * Fix tag lengths and value ranges in the documentation of CCM encryption. 35843d3b0591SJens Wiklander Contributed by Mathieu Briand. 35853d3b0591SJens Wiklander * Fix typo in a comment ctr_drbg.c. Contributed by Paul Sokolovsky. 35863d3b0591SJens Wiklander * Remove support for the library reference configuration for picocoin. 35873d3b0591SJens Wiklander * MD functions deprecated in 2.7.0 are no longer inline, to provide 35883d3b0591SJens Wiklander a migration path for those depending on the library's ABI. 35893d3b0591SJens Wiklander * Clarify the documentation of mbedtls_ssl_setup. 35903d3b0591SJens Wiklander * Use (void) when defining functions with no parameters. Contributed by 35913d3b0591SJens Wiklander Joris Aerts. #678 35923d3b0591SJens Wiklander 35933d3b0591SJens Wiklander= mbed TLS 2.7.0 branch released 2018-02-03 35943d3b0591SJens Wiklander 35953d3b0591SJens WiklanderSecurity 35963d3b0591SJens Wiklander * Fix a heap corruption issue in the implementation of the truncated HMAC 35973d3b0591SJens Wiklander extension. When the truncated HMAC extension is enabled and CBC is used, 35983d3b0591SJens Wiklander sending a malicious application packet could be used to selectively corrupt 35993d3b0591SJens Wiklander 6 bytes on the peer's heap, which could potentially lead to crash or remote 36003d3b0591SJens Wiklander code execution. The issue could be triggered remotely from either side in 36013d3b0591SJens Wiklander both TLS and DTLS. CVE-2018-0488 36023d3b0591SJens Wiklander * Fix a buffer overflow in RSA-PSS verification when the hash was too large 36033d3b0591SJens Wiklander for the key size, which could potentially lead to crash or remote code 36043d3b0591SJens Wiklander execution. Found by Seth Terashima, Qualcomm Product Security Initiative, 36053d3b0591SJens Wiklander Qualcomm Technologies Inc. CVE-2018-0487 36063d3b0591SJens Wiklander * Fix buffer overflow in RSA-PSS verification when the unmasked data is all 36073d3b0591SJens Wiklander zeros. 36083d3b0591SJens Wiklander * Fix an unsafe bounds check in ssl_parse_client_psk_identity() when adding 36093d3b0591SJens Wiklander 64 KiB to the address of the SSL buffer and causing a wrap around. 36103d3b0591SJens Wiklander * Fix a potential heap buffer overflow in mbedtls_ssl_write(). When the (by 36113d3b0591SJens Wiklander default enabled) maximum fragment length extension is disabled in the 36123d3b0591SJens Wiklander config and the application data buffer passed to mbedtls_ssl_write 36133d3b0591SJens Wiklander is larger than the internal message buffer (16384 bytes by default), the 36143d3b0591SJens Wiklander latter overflows. The exploitability of this issue depends on whether the 36153d3b0591SJens Wiklander application layer can be forced into sending such large packets. The issue 36163d3b0591SJens Wiklander was independently reported by Tim Nordell via e-mail and by Florin Petriuc 36173d3b0591SJens Wiklander and sjorsdewit on GitHub. Fix proposed by Florin Petriuc in #1022. 36183d3b0591SJens Wiklander Fixes #707. 36193d3b0591SJens Wiklander * Add a provision to prevent compiler optimizations breaking the time 36203d3b0591SJens Wiklander constancy of mbedtls_ssl_safer_memcmp(). 36213d3b0591SJens Wiklander * Ensure that buffers are cleared after use if they contain sensitive data. 36223d3b0591SJens Wiklander Changes were introduced in multiple places in the library. 36233d3b0591SJens Wiklander * Set PEM buffer to zero before freeing it, to avoid decoded private keys 36243d3b0591SJens Wiklander being leaked to memory after release. 36253d3b0591SJens Wiklander * Fix dhm_check_range() failing to detect trivial subgroups and potentially 36263d3b0591SJens Wiklander leaking 1 bit of the private key. Reported by prashantkspatil. 36273d3b0591SJens Wiklander * Make mbedtls_mpi_read_binary() constant-time with respect to the input 36283d3b0591SJens Wiklander data. Previously, trailing zero bytes were detected and omitted for the 36293d3b0591SJens Wiklander sake of saving memory, but potentially leading to slight timing 36303d3b0591SJens Wiklander differences. Reported by Marco Macchetti, Kudelski Group. 36313d3b0591SJens Wiklander * Wipe stack buffer temporarily holding EC private exponent 36323d3b0591SJens Wiklander after keypair generation. 36333d3b0591SJens Wiklander * Fix a potential heap buffer over-read in ALPN extension parsing 36343d3b0591SJens Wiklander (server-side). Could result in application crash, but only if an ALPN 36353d3b0591SJens Wiklander name larger than 16 bytes had been configured on the server. 36363d3b0591SJens Wiklander * Change default choice of DHE parameters from untrustworthy RFC 5114 36373d3b0591SJens Wiklander to RFC 3526 containing parameters generated in a nothing-up-my-sleeve 36383d3b0591SJens Wiklander manner. 36393d3b0591SJens Wiklander 36403d3b0591SJens WiklanderFeatures 36413d3b0591SJens Wiklander * Allow comments in test data files. 36423d3b0591SJens Wiklander * The selftest program can execute a subset of the tests based on command 36433d3b0591SJens Wiklander line arguments. 36443d3b0591SJens Wiklander * New unit tests for timing. Improve the self-test to be more robust 36453d3b0591SJens Wiklander when run on a heavily-loaded machine. 36463d3b0591SJens Wiklander * Add alternative implementation support for CCM and CMAC (MBEDTLS_CCM_ALT, 36473d3b0591SJens Wiklander MBEDTLS_CMAC_ALT). Submitted by Steven Cooreman, Silicon Labs. 36483d3b0591SJens Wiklander * Add support for alternative implementations of GCM, selected by the 36493d3b0591SJens Wiklander configuration flag MBEDTLS_GCM_ALT. 36503d3b0591SJens Wiklander * Add support for alternative implementations for ECDSA, controlled by new 36513d3b0591SJens Wiklander configuration flags MBEDTLS_ECDSA_SIGN_ALT, MBEDTLS_ECDSA_VERIFY_ALT and 36523d3b0591SJens Wiklander MBEDTLS_ECDSDA_GENKEY_AT in config.h. 36533d3b0591SJens Wiklander The following functions from the ECDSA module can be replaced 36543d3b0591SJens Wiklander with alternative implementation: 36553d3b0591SJens Wiklander mbedtls_ecdsa_sign(), mbedtls_ecdsa_verify() and mbedtls_ecdsa_genkey(). 36563d3b0591SJens Wiklander * Add support for alternative implementation of ECDH, controlled by the 36573d3b0591SJens Wiklander new configuration flags MBEDTLS_ECDH_COMPUTE_SHARED_ALT and 36583d3b0591SJens Wiklander MBEDTLS_ECDH_GEN_PUBLIC_ALT in config.h. 36593d3b0591SJens Wiklander The following functions from the ECDH module can be replaced 36603d3b0591SJens Wiklander with an alternative implementation: 36613d3b0591SJens Wiklander mbedtls_ecdh_gen_public() and mbedtls_ecdh_compute_shared(). 36623d3b0591SJens Wiklander * Add support for alternative implementation of ECJPAKE, controlled by 36633d3b0591SJens Wiklander the new configuration flag MBEDTLS_ECJPAKE_ALT. 36643d3b0591SJens Wiklander * Add mechanism to provide alternative implementation of the DHM module. 36653d3b0591SJens Wiklander 36663d3b0591SJens WiklanderAPI Changes 36673d3b0591SJens Wiklander * Extend RSA interface by multiple functions allowing structure- 36683d3b0591SJens Wiklander independent setup and export of RSA contexts. Most notably, 36693d3b0591SJens Wiklander mbedtls_rsa_import() and mbedtls_rsa_complete() are introduced for setting 36703d3b0591SJens Wiklander up RSA contexts from partial key material and having them completed to the 36713d3b0591SJens Wiklander needs of the implementation automatically. This allows to setup private RSA 36723d3b0591SJens Wiklander contexts from keys consisting of N,D,E only, even if P,Q are needed for the 36733d3b0591SJens Wiklander purpose or CRT and/or blinding. 36743d3b0591SJens Wiklander * The configuration option MBEDTLS_RSA_ALT can be used to define alternative 36753d3b0591SJens Wiklander implementations of the RSA interface declared in rsa.h. 36763d3b0591SJens Wiklander * The following functions in the message digest modules (MD2, MD4, MD5, 36773d3b0591SJens Wiklander SHA1, SHA256, SHA512) have been deprecated and replaced as shown below. 36783d3b0591SJens Wiklander The new functions change the return type from void to int to allow 36793d3b0591SJens Wiklander returning error codes when using MBEDTLS_<MODULE>_ALT. 36803d3b0591SJens Wiklander mbedtls_<MODULE>_starts() -> mbedtls_<MODULE>_starts_ret() 36813d3b0591SJens Wiklander mbedtls_<MODULE>_update() -> mbedtls_<MODULE>_update_ret() 36823d3b0591SJens Wiklander mbedtls_<MODULE>_finish() -> mbedtls_<MODULE>_finish_ret() 36833d3b0591SJens Wiklander mbedtls_<MODULE>_process() -> mbedtls_internal_<MODULE>_process() 36843d3b0591SJens Wiklander 36853d3b0591SJens WiklanderNew deprecations 36863d3b0591SJens Wiklander * Deprecate usage of RSA primitives with non-matching key-type 36873d3b0591SJens Wiklander (e.g. signing with a public key). 36883d3b0591SJens Wiklander * Direct manipulation of structure fields of RSA contexts is deprecated. 36893d3b0591SJens Wiklander Users are advised to use the extended RSA API instead. 36903d3b0591SJens Wiklander * Deprecate usage of message digest functions that return void 36913d3b0591SJens Wiklander (mbedtls_<MODULE>_starts, mbedtls_<MODULE>_update, 36923d3b0591SJens Wiklander mbedtls_<MODULE>_finish and mbedtls_<MODULE>_process where <MODULE> is 36933d3b0591SJens Wiklander any of MD2, MD4, MD5, SHA1, SHA256, SHA512) in favor of functions 36943d3b0591SJens Wiklander that can return an error code. 36953d3b0591SJens Wiklander * Deprecate untrustworthy DHE parameters from RFC 5114. Superseded by 36963d3b0591SJens Wiklander parameters from RFC 3526 or the newly added parameters from RFC 7919. 36973d3b0591SJens Wiklander * Deprecate hex string DHE constants MBEDTLS_DHM_RFC3526_MODP_2048_P etc. 36983d3b0591SJens Wiklander Supserseded by binary encoded constants MBEDTLS_DHM_RFC3526_MODP_2048_P_BIN 36993d3b0591SJens Wiklander etc. 37003d3b0591SJens Wiklander * Deprecate mbedtls_ssl_conf_dh_param() for setting default DHE parameters 37013d3b0591SJens Wiklander from hex strings. Superseded by mbedtls_ssl_conf_dh_param_bin() 37023d3b0591SJens Wiklander accepting DHM parameters in binary form, matching the new constants. 37033d3b0591SJens Wiklander 37043d3b0591SJens WiklanderBugfix 37053d3b0591SJens Wiklander * Fix ssl_parse_record_header() to silently discard invalid DTLS records 37063d3b0591SJens Wiklander as recommended in RFC 6347 Section 4.1.2.7. 37073d3b0591SJens Wiklander * Fix memory leak in mbedtls_ssl_set_hostname() when called multiple times. 37083d3b0591SJens Wiklander Found by projectgus and Jethro Beekman, #836. 37093d3b0591SJens Wiklander * Fix usage help in ssl_server2 example. Found and fixed by Bei Lin. 3710817466cbSJens Wiklander * Parse signature algorithm extension when renegotiating. Previously, 3711817466cbSJens Wiklander renegotiated handshakes would only accept signatures using SHA-1 3712817466cbSJens Wiklander regardless of the peer's preferences, or fail if SHA-1 was disabled. 37133d3b0591SJens Wiklander * Fix leap year calculation in x509_date_is_valid() to ensure that invalid 37143d3b0591SJens Wiklander dates on leap years with 100 and 400 intervals are handled correctly. Found 37153d3b0591SJens Wiklander by Nicholas Wilson. #694 37163d3b0591SJens Wiklander * Fix some invalid RSA-PSS signatures with keys of size 8N+1 that were 37173d3b0591SJens Wiklander accepted. Generating these signatures required the private key. 37183d3b0591SJens Wiklander * Fix out-of-memory problem when parsing 4096-bit PKCS8-encrypted RSA keys. 37193d3b0591SJens Wiklander Found independently by Florian in the mbed TLS forum and by Mishamax. 37203d3b0591SJens Wiklander #878, #1019. 37213d3b0591SJens Wiklander * Fix variable used before assignment compilation warnings with IAR 37223d3b0591SJens Wiklander toolchain. Found by gkerrien38. 37233d3b0591SJens Wiklander * Fix unchecked return codes from AES, DES and 3DES functions in 37243d3b0591SJens Wiklander pem_aes_decrypt(), pem_des_decrypt() and pem_des3_decrypt() respectively. 37253d3b0591SJens Wiklander If a call to one of the functions of the cryptographic primitive modules 37263d3b0591SJens Wiklander failed, the error may not be noticed by the function 37273d3b0591SJens Wiklander mbedtls_pem_read_buffer() causing it to return invalid values. Found by 37283d3b0591SJens Wiklander Guido Vranken. #756 37293d3b0591SJens Wiklander * Include configuration file in md.h, to fix compilation warnings. 37303d3b0591SJens Wiklander Reported by aaronmdjones in #1001 37313d3b0591SJens Wiklander * Correct extraction of signature-type from PK instance in X.509 CRT and CSR 37323d3b0591SJens Wiklander writing routines that prevented these functions to work with alternative 37333d3b0591SJens Wiklander RSA implementations. Raised by J.B. in the Mbed TLS forum. Fixes #1011. 37343d3b0591SJens Wiklander * Don't print X.509 version tag for v1 CRT's, and omit extensions for 37353d3b0591SJens Wiklander non-v3 CRT's. 37363d3b0591SJens Wiklander * Fix bugs in RSA test suite under MBEDTLS_NO_PLATFORM_ENTROPY. #1023 #1024 37373d3b0591SJens Wiklander * Fix net_would_block() to avoid modification by errno through fcntl() call. 37383d3b0591SJens Wiklander Found by nkolban. Fixes #845. 37393d3b0591SJens Wiklander * Fix handling of handshake messages in mbedtls_ssl_read() in case 37403d3b0591SJens Wiklander MBEDTLS_SSL_RENEGOTIATION is disabled. Found by erja-gp. 37413d3b0591SJens Wiklander * Add a check for invalid private parameters in mbedtls_ecdsa_sign(). 37423d3b0591SJens Wiklander Reported by Yolan Romailler. 37433d3b0591SJens Wiklander * Fix word size check in in pk.c to not depend on MBEDTLS_HAVE_INT64. 37443d3b0591SJens Wiklander * Fix incorrect unit in benchmark output. #850 37453d3b0591SJens Wiklander * Add size-checks for record and handshake message content, securing 37463d3b0591SJens Wiklander fragile yet non-exploitable code-paths. 37473d3b0591SJens Wiklander * Fix crash when calling mbedtls_ssl_cache_free() twice. Found by 37483d3b0591SJens Wiklander MilenkoMitrovic, #1104 37493d3b0591SJens Wiklander * Fix mbedtls_timing_alarm(0) on Unix and MinGW. 37503d3b0591SJens Wiklander * Fix use of uninitialized memory in mbedtls_timing_get_timer() when reset=1. 37513d3b0591SJens Wiklander * Fix possible memory leaks in mbedtls_gcm_self_test(). 37523d3b0591SJens Wiklander * Added missing return code checks in mbedtls_aes_self_test(). 37533d3b0591SJens Wiklander * Fix issues in RSA key generation program programs/x509/rsa_genkey and the 37543d3b0591SJens Wiklander RSA test suite where the failure of CTR DRBG initialization lead to 37553d3b0591SJens Wiklander freeing an RSA context and several MPI's without proper initialization 37563d3b0591SJens Wiklander beforehand. 37573d3b0591SJens Wiklander * Fix error message in programs/pkey/gen_key.c. Found and fixed by Chris Xue. 37583d3b0591SJens Wiklander * Fix programs/pkey/dh_server.c so that it actually works with dh_client.c. 37593d3b0591SJens Wiklander Found and fixed by Martijn de Milliano. 37603d3b0591SJens Wiklander * Fix an issue in the cipher decryption with the mode 37613d3b0591SJens Wiklander MBEDTLS_PADDING_ONE_AND_ZEROS that sometimes accepted invalid padding. 37623d3b0591SJens Wiklander Note, this padding mode is not used by the TLS protocol. Found and fixed by 37633d3b0591SJens Wiklander Micha Kraus. 37643d3b0591SJens Wiklander * Fix the entropy.c module to not call mbedtls_sha256_starts() or 37653d3b0591SJens Wiklander mbedtls_sha512_starts() in the mbedtls_entropy_init() function. 37663d3b0591SJens Wiklander * Fix the entropy.c module to ensure that mbedtls_sha256_init() or 37673d3b0591SJens Wiklander mbedtls_sha512_init() is called before operating on the relevant context 37683d3b0591SJens Wiklander structure. Do not assume that zeroizing a context is a correct way to 37693d3b0591SJens Wiklander reset it. Found independently by ccli8 on Github. 37703d3b0591SJens Wiklander * In mbedtls_entropy_free(), properly free the message digest context. 37713d3b0591SJens Wiklander * Fix status handshake status message in programs/ssl/dtls_client.c. Found 37723d3b0591SJens Wiklander and fixed by muddog. 37733d3b0591SJens Wiklander 37743d3b0591SJens WiklanderChanges 37753d3b0591SJens Wiklander * Extend cert_write example program by options to set the certificate version 37763d3b0591SJens Wiklander and the message digest. Further, allow enabling/disabling of authority 37773d3b0591SJens Wiklander identifier, subject identifier and basic constraints extensions. 37783d3b0591SJens Wiklander * Only check for necessary RSA structure fields in `mbedtls_rsa_private`. In 37793d3b0591SJens Wiklander particular, don't require P,Q if neither CRT nor blinding are 37803d3b0591SJens Wiklander used. Reported and fix proposed independently by satur9nine and sliai 37813d3b0591SJens Wiklander on GitHub. 37823d3b0591SJens Wiklander * Only run AES-192 self-test if AES-192 is available. Fixes #963. 37833d3b0591SJens Wiklander * Tighten the RSA PKCS#1 v1.5 signature verification code and remove the 37843d3b0591SJens Wiklander undeclared dependency of the RSA module on the ASN.1 module. 37853d3b0591SJens Wiklander * Update all internal usage of deprecated message digest functions to the 37863d3b0591SJens Wiklander new ones with return codes. In particular, this modifies the 37873d3b0591SJens Wiklander mbedtls_md_info_t structure. Propagate errors from these functions 37883d3b0591SJens Wiklander everywhere except some locations in the ssl_tls.c module. 37893d3b0591SJens Wiklander * Improve CTR_DRBG error handling by propagating underlying AES errors. 37903d3b0591SJens Wiklander * Add MBEDTLS_ERR_XXX_HW_ACCEL_FAILED error codes for all cryptography 37913d3b0591SJens Wiklander modules where the software implementation can be replaced by a hardware 37923d3b0591SJens Wiklander implementation. 37933d3b0591SJens Wiklander * Add explicit warnings for the use of MD2, MD4, MD5, SHA-1, DES and ARC4 37943d3b0591SJens Wiklander throughout the library. 3795817466cbSJens Wiklander 3796817466cbSJens Wiklander= mbed TLS 2.6.0 branch released 2017-08-10 3797817466cbSJens Wiklander 3798817466cbSJens WiklanderSecurity 3799817466cbSJens Wiklander * Fix authentication bypass in SSL/TLS: when authmode is set to optional, 3800817466cbSJens Wiklander mbedtls_ssl_get_verify_result() would incorrectly return 0 when the peer's 3801817466cbSJens Wiklander X.509 certificate chain had more than MBEDTLS_X509_MAX_INTERMEDIATE_CA 3802817466cbSJens Wiklander (default: 8) intermediates, even when it was not trusted. This could be 3803817466cbSJens Wiklander triggered remotely from either side. (With authmode set to 'required' 3804817466cbSJens Wiklander (the default), the handshake was correctly aborted). 3805817466cbSJens Wiklander * Reliably wipe sensitive data after use in the AES example applications 3806817466cbSJens Wiklander programs/aes/aescrypt2 and programs/aes/crypt_and_hash. 3807817466cbSJens Wiklander Found by Laurent Simon. 3808817466cbSJens Wiklander 3809817466cbSJens WiklanderFeatures 3810817466cbSJens Wiklander * Add the functions mbedtls_platform_setup() and mbedtls_platform_teardown() 3811817466cbSJens Wiklander and the context struct mbedtls_platform_context to perform 3812817466cbSJens Wiklander platform-specific setup and teardown operations. The macro 3813817466cbSJens Wiklander MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT allows the functions to be overridden 3814817466cbSJens Wiklander by the user in a platform_alt.h file. These new functions are required in 3815817466cbSJens Wiklander some embedded environments to provide a means of initialising underlying 3816817466cbSJens Wiklander cryptographic acceleration hardware. 3817817466cbSJens Wiklander 3818817466cbSJens WiklanderAPI Changes 3819817466cbSJens Wiklander * Reverted API/ABI breaking changes introduced in mbed TLS 2.5.1, to make the 3820817466cbSJens Wiklander API consistent with mbed TLS 2.5.0. Specifically removed the inline 3821817466cbSJens Wiklander qualifier from the functions mbedtls_aes_decrypt, mbedtls_aes_encrypt, 3822817466cbSJens Wiklander mbedtls_ssl_ciphersuite_uses_ec and mbedtls_ssl_ciphersuite_uses_psk. Found 3823817466cbSJens Wiklander by James Cowgill. #978 3824817466cbSJens Wiklander * Certificate verification functions now set flags to -1 in case the full 3825817466cbSJens Wiklander chain was not verified due to an internal error (including in the verify 3826817466cbSJens Wiklander callback) or chain length limitations. 3827817466cbSJens Wiklander * With authmode set to optional, the TLS handshake is now aborted if the 3828817466cbSJens Wiklander verification of the peer's certificate failed due to an overlong chain or 3829817466cbSJens Wiklander a fatal error in the verify callback. 3830817466cbSJens Wiklander 3831817466cbSJens WiklanderBugfix 3832817466cbSJens Wiklander * Add a check if iv_len is zero in GCM, and return an error if it is zero. 3833817466cbSJens Wiklander Reported by roberto. #716 3834817466cbSJens Wiklander * Replace preprocessor condition from #if defined(MBEDTLS_THREADING_PTHREAD) 3835817466cbSJens Wiklander to #if defined(MBEDTLS_THREADING_C) as the library cannot assume they will 3836817466cbSJens Wiklander always be implemented by pthread support. #696 3837817466cbSJens Wiklander * Fix a resource leak on Windows platforms in mbedtls_x509_crt_parse_path(), 3838817466cbSJens Wiklander in the case of an error. Found by redplait. #590 3839817466cbSJens Wiklander * Add MBEDTLS_MPI_CHK to check for error value of mbedtls_mpi_fill_random. 3840817466cbSJens Wiklander Reported and fix suggested by guidovranken. #740 3841817466cbSJens Wiklander * Fix conditional preprocessor directives in bignum.h to enable 64-bit 3842817466cbSJens Wiklander compilation when using ARM Compiler 6. 3843817466cbSJens Wiklander * Fix a potential integer overflow in the version verification for DER 3844817466cbSJens Wiklander encoded X.509 CRLs. The overflow could enable maliciously constructed CRLs 3845817466cbSJens Wiklander to bypass the version verification check. Found by Peng Li/Yueh-Hsun Lin, 3846817466cbSJens Wiklander KNOX Security, Samsung Research America 3847817466cbSJens Wiklander * Fix potential integer overflow in the version verification for DER 3848817466cbSJens Wiklander encoded X.509 CSRs. The overflow could enable maliciously constructed CSRs 3849817466cbSJens Wiklander to bypass the version verification check. Found by Peng Li/Yueh-Hsun Lin, 3850817466cbSJens Wiklander KNOX Security, Samsung Research America 3851817466cbSJens Wiklander * Fix a potential integer overflow in the version verification for DER 3852817466cbSJens Wiklander encoded X.509 certificates. The overflow could enable maliciously 3853817466cbSJens Wiklander constructed certificates to bypass the certificate verification check. 3854817466cbSJens Wiklander * Fix a call to the libc function time() to call the platform abstraction 3855817466cbSJens Wiklander function mbedtls_time() instead. Found by wairua. #666 3856817466cbSJens Wiklander * Avoid shadowing of time and index functions through mbed TLS function 3857817466cbSJens Wiklander arguments. Found by inestlerode. #557. 3858817466cbSJens Wiklander 3859817466cbSJens WiklanderChanges 3860817466cbSJens Wiklander * Added config.h option MBEDTLS_NO_UDBL_DIVISION, to prevent the use of 3861817466cbSJens Wiklander 64-bit division. This is useful on embedded platforms where 64-bit division 3862817466cbSJens Wiklander created a dependency on external libraries. #708 3863817466cbSJens Wiklander * Removed mutexes from ECP hardware accelerator code. Now all hardware 3864817466cbSJens Wiklander accelerator code in the library leaves concurrency handling to the 3865817466cbSJens Wiklander platform. Reported by Steven Cooreman. #863 3866817466cbSJens Wiklander * Define the macro MBEDTLS_AES_ROM_TABLES in the configuration file 3867817466cbSJens Wiklander config-no-entropy.h to reduce the RAM footprint. 3868817466cbSJens Wiklander * Added a test script that can be hooked into git that verifies commits 3869817466cbSJens Wiklander before they are pushed. 3870817466cbSJens Wiklander * Improve documentation of PKCS1 decryption functions. 3871817466cbSJens Wiklander 3872817466cbSJens Wiklander= mbed TLS 2.5.1 released 2017-06-21 3873817466cbSJens Wiklander 3874817466cbSJens WiklanderSecurity 3875817466cbSJens Wiklander * Fixed unlimited overread of heap-based buffer in mbedtls_ssl_read(). 3876817466cbSJens Wiklander The issue could only happen client-side with renegotiation enabled. 3877817466cbSJens Wiklander Could result in DoS (application crash) or information leak 3878817466cbSJens Wiklander (if the application layer sent data read from mbedtls_ssl_read() 3879817466cbSJens Wiklander back to the server or to a third party). Can be triggered remotely. 3880817466cbSJens Wiklander * Removed SHA-1 and RIPEMD-160 from the default hash algorithms for 3881817466cbSJens Wiklander certificate verification. SHA-1 can be turned back on with a compile-time 3882817466cbSJens Wiklander option if needed. 3883817466cbSJens Wiklander * Fixed offset in FALLBACK_SCSV parsing that caused TLS server to fail to 3884817466cbSJens Wiklander detect it sometimes. Reported by Hugo Leisink. #810 3885817466cbSJens Wiklander * Tighten parsing of RSA PKCS#1 v1.5 signatures, to avoid a 3886817466cbSJens Wiklander potential Bleichenbacher/BERserk-style attack. 3887817466cbSJens Wiklander 3888817466cbSJens WiklanderBugfix 3889817466cbSJens Wiklander * Remove size zero arrays from ECJPAKE test suite. Size zero arrays are not 3890817466cbSJens Wiklander valid C and they prevented the test from compiling in Visual Studio 2015 3891817466cbSJens Wiklander and with GCC using the -Wpedantic compilation option. 3892817466cbSJens Wiklander * Fix insufficient support for signature-hash-algorithm extension, 3893817466cbSJens Wiklander resulting in compatibility problems with Chrome. Found by hfloyrd. #823 3894817466cbSJens Wiklander * Fix behaviour that hid the original cause of fatal alerts in some cases 3895817466cbSJens Wiklander when sending the alert failed. The fix makes sure not to hide the error 3896817466cbSJens Wiklander that triggered the alert. 3897817466cbSJens Wiklander * Fix SSLv3 renegotiation behaviour and stop processing data received from 3898817466cbSJens Wiklander peer after sending a fatal alert to refuse a renegotiation attempt. 3899817466cbSJens Wiklander Previous behaviour was to keep processing data even after the alert has 3900817466cbSJens Wiklander been sent. 3901817466cbSJens Wiklander * Accept empty trusted CA chain in authentication mode 39023d3b0591SJens Wiklander MBEDTLS_SSL_VERIFY_OPTIONAL. Found by Jethro Beekman. #864 3903817466cbSJens Wiklander * Fix implementation of mbedtls_ssl_parse_certificate() to not annihilate 3904817466cbSJens Wiklander fatal errors in authentication mode MBEDTLS_SSL_VERIFY_OPTIONAL and to 3905817466cbSJens Wiklander reflect bad EC curves within verification result. 3906817466cbSJens Wiklander * Fix bug that caused the modular inversion function to accept the invalid 3907817466cbSJens Wiklander modulus 1 and therefore to hang. Found by blaufish. #641. 3908817466cbSJens Wiklander * Fix incorrect sign computation in modular exponentiation when the base is 3909817466cbSJens Wiklander a negative MPI. Previously the result was always negative. Found by Guido 3910817466cbSJens Wiklander Vranken. 3911817466cbSJens Wiklander * Fix a numerical underflow leading to stack overflow in mpi_read_file() 3912817466cbSJens Wiklander that was triggered uppon reading an empty line. Found by Guido Vranken. 3913817466cbSJens Wiklander 3914817466cbSJens WiklanderChanges 3915817466cbSJens Wiklander * Send fatal alerts in more cases. The previous behaviour was to skip 3916817466cbSJens Wiklander sending the fatal alert and just drop the connection. 3917817466cbSJens Wiklander * Clarify ECDSA documentation and improve the sample code to avoid 3918817466cbSJens Wiklander misunderstanding and potentially dangerous use of the API. Pointed out 3919817466cbSJens Wiklander by Jean-Philippe Aumasson. 3920817466cbSJens Wiklander 3921817466cbSJens Wiklander= mbed TLS 2.5.0 branch released 2017-05-17 3922817466cbSJens Wiklander 3923817466cbSJens WiklanderSecurity 3924817466cbSJens Wiklander * Wipe stack buffers in RSA private key operations 3925817466cbSJens Wiklander (rsa_rsaes_pkcs1_v15_decrypt(), rsa_rsaes_oaep_decrypt). Found by Laurent 3926817466cbSJens Wiklander Simon. 3927817466cbSJens Wiklander * Add exponent blinding to RSA private operations as a countermeasure 3928817466cbSJens Wiklander against side-channel attacks like the cache attack described in 3929817466cbSJens Wiklander https://arxiv.org/abs/1702.08719v2. 3930817466cbSJens Wiklander Found and fix proposed by Michael Schwarz, Samuel Weiser, Daniel Gruss, 3931817466cbSJens Wiklander Clémentine Maurice and Stefan Mangard. 3932817466cbSJens Wiklander 3933817466cbSJens WiklanderFeatures 3934817466cbSJens Wiklander * Add hardware acceleration support for the Elliptic Curve Point module. 3935817466cbSJens Wiklander This involved exposing parts of the internal interface to enable 3936817466cbSJens Wiklander replacing the core functions and adding and alternative, module level 3937817466cbSJens Wiklander replacement support for enabling the extension of the interface. 3938817466cbSJens Wiklander * Add a new configuration option to 'mbedtls_ssl_config' to enable 3939817466cbSJens Wiklander suppressing the CA list in Certificate Request messages. The default 3940817466cbSJens Wiklander behaviour has not changed, namely every configured CAs name is included. 3941817466cbSJens Wiklander 3942817466cbSJens WiklanderAPI Changes 3943817466cbSJens Wiklander * The following functions in the AES module have been deprecated and replaced 3944817466cbSJens Wiklander by the functions shown below. The new functions change the return type from 3945817466cbSJens Wiklander void to int to allow returning error codes when using MBEDTLS_AES_ALT, 3946817466cbSJens Wiklander MBEDTLS_AES_DECRYPT_ALT or MBEDTLS_AES_ENCRYPT_ALT. 3947817466cbSJens Wiklander mbedtls_aes_decrypt() -> mbedtls_internal_aes_decrypt() 3948817466cbSJens Wiklander mbedtls_aes_encrypt() -> mbedtls_internal_aes_encrypt() 3949817466cbSJens Wiklander 3950817466cbSJens WiklanderBugfix 3951817466cbSJens Wiklander * Remove macros from compat-1.3.h that correspond to deleted items from most 3952817466cbSJens Wiklander recent versions of the library. Found by Kyle Keen. 3953817466cbSJens Wiklander * Fixed issue in the Threading module that prevented mutexes from 3954817466cbSJens Wiklander initialising. Found by sznaider. #667 #843 3955817466cbSJens Wiklander * Add checks in the PK module for the RSA functions on 64-bit systems. 3956817466cbSJens Wiklander The PK and RSA modules use different types for passing hash length and 3957817466cbSJens Wiklander without these checks the type cast could lead to data loss. Found by Guido 3958817466cbSJens Wiklander Vranken. 3959817466cbSJens Wiklander 3960817466cbSJens Wiklander= mbed TLS 2.4.2 branch released 2017-03-08 3961817466cbSJens Wiklander 3962817466cbSJens WiklanderSecurity 3963817466cbSJens Wiklander * Add checks to prevent signature forgeries for very large messages while 3964817466cbSJens Wiklander using RSA through the PK module in 64-bit systems. The issue was caused by 3965817466cbSJens Wiklander some data loss when casting a size_t to an unsigned int value in the 3966817466cbSJens Wiklander functions rsa_verify_wrap(), rsa_sign_wrap(), rsa_alt_sign_wrap() and 3967817466cbSJens Wiklander mbedtls_pk_sign(). Found by Jean-Philippe Aumasson. 3968817466cbSJens Wiklander * Fixed potential livelock during the parsing of a CRL in PEM format in 3969817466cbSJens Wiklander mbedtls_x509_crl_parse(). A string containing a CRL followed by trailing 3970817466cbSJens Wiklander characters after the footer could result in the execution of an infinite 3971817466cbSJens Wiklander loop. The issue can be triggered remotely. Found by Greg Zaverucha, 3972817466cbSJens Wiklander Microsoft. 3973817466cbSJens Wiklander * Removed MD5 from the allowed hash algorithms for CertificateRequest and 3974817466cbSJens Wiklander CertificateVerify messages, to prevent SLOTH attacks against TLS 1.2. 3975817466cbSJens Wiklander Introduced by interoperability fix for #513. 3976817466cbSJens Wiklander * Fixed a bug that caused freeing a buffer that was allocated on the stack, 3977817466cbSJens Wiklander when verifying the validity of a key on secp224k1. This could be 3978817466cbSJens Wiklander triggered remotely for example with a maliciously constructed certificate 3979817466cbSJens Wiklander and potentially could lead to remote code execution on some platforms. 3980817466cbSJens Wiklander Reported independently by rongsaws and Aleksandar Nikolic, Cisco Talos 3981817466cbSJens Wiklander team. #569 CVE-2017-2784 3982817466cbSJens Wiklander 3983817466cbSJens WiklanderBugfix 3984817466cbSJens Wiklander * Fix output certificate verification flags set by x509_crt_verify_top() when 3985817466cbSJens Wiklander traversing a chain of trusted CA. The issue would cause both flags, 3986817466cbSJens Wiklander MBEDTLS_X509_BADCERT_NOT_TRUSTED and MBEDTLS_X509_BADCERT_EXPIRED, to be 3987817466cbSJens Wiklander set when the verification conditions are not met regardless of the cause. 3988817466cbSJens Wiklander Found by Harm Verhagen and inestlerode. #665 #561 3989817466cbSJens Wiklander * Fix the redefinition of macro ssl_set_bio to an undefined symbol 3990817466cbSJens Wiklander mbedtls_ssl_set_bio_timeout in compat-1.3.h, by removing it. 3991817466cbSJens Wiklander Found by omlib-lin. #673 3992817466cbSJens Wiklander * Fix unused variable/function compilation warnings in pem.c, x509_crt.c and 3993817466cbSJens Wiklander x509_csr.c that are reported when building mbed TLS with a config.h that 3994817466cbSJens Wiklander does not define MBEDTLS_PEM_PARSE_C. Found by omnium21. #562 3995817466cbSJens Wiklander * Fix incorrect renegotiation condition in ssl_check_ctr_renegotiate() that 3996817466cbSJens Wiklander would compare 64 bits of the record counter instead of 48 bits as indicated 3997817466cbSJens Wiklander in RFC 6347 Section 4.3.1. This could cause the execution of the 3998817466cbSJens Wiklander renegotiation routines at unexpected times when the protocol is DTLS. Found 3999817466cbSJens Wiklander by wariua. #687 4000817466cbSJens Wiklander * Fixed multiple buffer overreads in mbedtls_pem_read_buffer() when parsing 4001817466cbSJens Wiklander the input string in PEM format to extract the different components. Found 4002817466cbSJens Wiklander by Eyal Itkin. 4003817466cbSJens Wiklander * Fixed potential arithmetic overflow in mbedtls_ctr_drbg_reseed() that could 4004817466cbSJens Wiklander cause buffer bound checks to be bypassed. Found by Eyal Itkin. 4005817466cbSJens Wiklander * Fixed potential arithmetic overflows in mbedtls_cipher_update() that could 4006817466cbSJens Wiklander cause buffer bound checks to be bypassed. Found by Eyal Itkin. 4007817466cbSJens Wiklander * Fixed potential arithmetic overflow in mbedtls_md2_update() that could 4008817466cbSJens Wiklander cause buffer bound checks to be bypassed. Found by Eyal Itkin. 4009817466cbSJens Wiklander * Fixed potential arithmetic overflow in mbedtls_base64_decode() that could 4010817466cbSJens Wiklander cause buffer bound checks to be bypassed. Found by Eyal Itkin. 4011817466cbSJens Wiklander * Fixed heap overreads in mbedtls_x509_get_time(). Found by Peng 4012817466cbSJens Wiklander Li/Yueh-Hsun Lin, KNOX Security, Samsung Research America. 4013817466cbSJens Wiklander * Fix potential memory leak in mbedtls_x509_crl_parse(). The leak was caused 4014817466cbSJens Wiklander by missing calls to mbedtls_pem_free() in cases when a 4015817466cbSJens Wiklander MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT error was encountered. Found and 4016817466cbSJens Wiklander fix proposed by Guido Vranken. #722 4017817466cbSJens Wiklander * Fixed the templates used to generate project and solution files for Visual 4018817466cbSJens Wiklander Studio 2015 as well as the files themselves, to remove a build warning 4019817466cbSJens Wiklander generated in Visual Studio 2015. Reported by Steve Valliere. #742 4020817466cbSJens Wiklander * Fix a resource leak in ssl_cookie, when using MBEDTLS_THREADING_C. 4021817466cbSJens Wiklander Raised and fix suggested by Alan Gillingham in the mbed TLS forum. #771 4022817466cbSJens Wiklander * Fix 1 byte buffer overflow in mbedtls_mpi_write_string() when the MPI 4023817466cbSJens Wiklander number to write in hexadecimal is negative and requires an odd number of 4024817466cbSJens Wiklander digits. Found and fixed by Guido Vranken. 4025817466cbSJens Wiklander * Fix unlisted DES configuration dependency in some pkparse test cases. Found 4026817466cbSJens Wiklander by inestlerode. #555 4027817466cbSJens Wiklander 4028817466cbSJens Wiklander= mbed TLS 2.4.1 branch released 2016-12-13 4029817466cbSJens Wiklander 4030817466cbSJens WiklanderChanges 4031817466cbSJens Wiklander * Update to CMAC test data, taken from - NIST Special Publication 800-38B - 4032817466cbSJens Wiklander Recommendation for Block Cipher Modes of Operation: The CMAC Mode for 4033817466cbSJens Wiklander Authentication – October 2016 4034817466cbSJens Wiklander 4035817466cbSJens Wiklander= mbed TLS 2.4.0 branch released 2016-10-17 4036817466cbSJens Wiklander 4037817466cbSJens WiklanderSecurity 4038817466cbSJens Wiklander * Removed the MBEDTLS_SSL_AEAD_RANDOM_IV option, because it was not compliant 4039817466cbSJens Wiklander with RFC-5116 and could lead to session key recovery in very long TLS 4040817466cbSJens Wiklander sessions. "Nonce-Disrespecting Adversaries Practical Forgery Attacks on GCM in 4041817466cbSJens Wiklander TLS" - H. Bock, A. Zauner, S. Devlin, J. Somorovsky, P. Jovanovic. 4042817466cbSJens Wiklander https://eprint.iacr.org/2016/475.pdf 4043817466cbSJens Wiklander * Fixed potential stack corruption in mbedtls_x509write_crt_der() and 4044817466cbSJens Wiklander mbedtls_x509write_csr_der() when the signature is copied to the buffer 4045817466cbSJens Wiklander without checking whether there is enough space in the destination. The 4046817466cbSJens Wiklander issue cannot be triggered remotely. Found by Jethro Beekman. 4047817466cbSJens Wiklander 4048817466cbSJens WiklanderFeatures 4049817466cbSJens Wiklander * Added support for CMAC for AES and 3DES and AES-CMAC-PRF-128, as defined by 4050817466cbSJens Wiklander NIST SP 800-38B, RFC-4493 and RFC-4615. 4051817466cbSJens Wiklander * Added hardware entropy selftest to verify that the hardware entropy source 4052817466cbSJens Wiklander is functioning correctly. 4053817466cbSJens Wiklander * Added a script to print build environment info for diagnostic use in test 4054817466cbSJens Wiklander scripts, which is also now called by all.sh. 4055817466cbSJens Wiklander * Added the macro MBEDTLS_X509_MAX_FILE_PATH_LEN that enables the user to 4056817466cbSJens Wiklander configure the maximum length of a file path that can be buffered when 4057817466cbSJens Wiklander calling mbedtls_x509_crt_parse_path(). 4058817466cbSJens Wiklander * Added a configuration file config-no-entropy.h that configures the subset of 4059817466cbSJens Wiklander library features that do not require an entropy source. 4060817466cbSJens Wiklander * Added the macro MBEDTLS_ENTROPY_MIN_HARDWARE in config.h. This allows users 4061817466cbSJens Wiklander to configure the minimum number of bytes for entropy sources using the 4062817466cbSJens Wiklander mbedtls_hardware_poll() function. 4063817466cbSJens Wiklander 4064817466cbSJens WiklanderBugfix 4065817466cbSJens Wiklander * Fix for platform time abstraction to avoid dependency issues where a build 4066817466cbSJens Wiklander may need time but not the standard C library abstraction, and added 4067817466cbSJens Wiklander configuration consistency checks to check_config.h 4068817466cbSJens Wiklander * Fix dependency issue in Makefile to allow parallel builds. 4069817466cbSJens Wiklander * Fix incorrect handling of block lengths in crypt_and_hash.c sample program, 4070817466cbSJens Wiklander when GCM is used. Found by udf2457. #441 4071817466cbSJens Wiklander * Fix for key exchanges based on ECDH-RSA or ECDH-ECDSA which weren't 4072817466cbSJens Wiklander enabled unless others were also present. Found by David Fernandez. #428 4073817466cbSJens Wiklander * Fix for out-of-tree builds using CMake. Found by jwurzer, and fix based on 4074817466cbSJens Wiklander a contribution from Tobias Tangemann. #541 4075817466cbSJens Wiklander * Fixed cert_app.c sample program for debug output and for use when no root 4076817466cbSJens Wiklander certificates are provided. 4077817466cbSJens Wiklander * Fix conditional statement that would cause a 1 byte overread in 4078817466cbSJens Wiklander mbedtls_asn1_get_int(). Found and fixed by Guido Vranken. #599 4079817466cbSJens Wiklander * Fixed pthread implementation to avoid unintended double initialisations 4080817466cbSJens Wiklander and double frees. Found by Niklas Amnebratt. 4081817466cbSJens Wiklander * Fixed the sample applications gen_key.c, cert_req.c and cert_write.c for 4082817466cbSJens Wiklander builds where the configuration MBEDTLS_PEM_WRITE_C is not defined. Found 4083817466cbSJens Wiklander by inestlerode. #559. 4084817466cbSJens Wiklander * Fix mbedtls_x509_get_sig() to update the ASN1 type in the mbedtls_x509_buf 4085817466cbSJens Wiklander data structure until after error checks are successful. Found by 4086817466cbSJens Wiklander subramanyam-c. #622 4087817466cbSJens Wiklander * Fix documentation and implementation missmatch for function arguments of 4088817466cbSJens Wiklander mbedtls_gcm_finish(). Found by cmiatpaar. #602 4089817466cbSJens Wiklander * Guarantee that P>Q at RSA key generation. Found by inestlerode. #558 4090817466cbSJens Wiklander * Fix potential byte overread when verifying malformed SERVER_HELLO in 4091817466cbSJens Wiklander ssl_parse_hello_verify_request() for DTLS. Found by Guido Vranken. 4092817466cbSJens Wiklander * Fix check for validity of date when parsing in mbedtls_x509_get_time(). 4093817466cbSJens Wiklander Found by subramanyam-c. #626 4094817466cbSJens Wiklander * Fix compatibility issue with Internet Explorer client authentication, 4095817466cbSJens Wiklander where the limited hash choices prevented the client from sending its 4096817466cbSJens Wiklander certificate. Found by teumas. #513 4097817466cbSJens Wiklander * Fix compilation without MBEDTLS_SELF_TEST enabled. 4098817466cbSJens Wiklander 4099817466cbSJens WiklanderChanges 4100817466cbSJens Wiklander * Extended test coverage of special cases, and added new timing test suite. 4101817466cbSJens Wiklander * Removed self-tests from the basic-built-test.sh script, and added all 4102817466cbSJens Wiklander missing self-tests to the test suites, to ensure self-tests are only 4103817466cbSJens Wiklander executed once. 4104817466cbSJens Wiklander * Added support for 3 and 4 byte lengths to mbedtls_asn1_write_len(). 4105817466cbSJens Wiklander * Added support for a Yotta specific configuration file - 4106817466cbSJens Wiklander through the symbol YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE. 4107817466cbSJens Wiklander * Added optimization for code space for X.509/OID based on configured 4108817466cbSJens Wiklander features. Contributed by Aviv Palivoda. 4109817466cbSJens Wiklander * Renamed source file library/net.c to library/net_sockets.c to avoid 4110817466cbSJens Wiklander naming collision in projects which also have files with the common name 4111817466cbSJens Wiklander net.c. For consistency, the corresponding header file, net.h, is marked as 4112817466cbSJens Wiklander deprecated, and its contents moved to net_sockets.h. 4113817466cbSJens Wiklander * Changed the strategy for X.509 certificate parsing and validation, to no 4114817466cbSJens Wiklander longer disregard certificates with unrecognised fields. 4115817466cbSJens Wiklander 4116817466cbSJens Wiklander= mbed TLS 2.3.0 branch released 2016-06-28 4117817466cbSJens Wiklander 4118817466cbSJens WiklanderSecurity 4119817466cbSJens Wiklander * Fix missing padding length check in mbedtls_rsa_rsaes_pkcs1_v15_decrypt 4120817466cbSJens Wiklander required by PKCS1 v2.2 4121817466cbSJens Wiklander * Fix potential integer overflow to buffer overflow in 4122817466cbSJens Wiklander mbedtls_rsa_rsaes_pkcs1_v15_encrypt and mbedtls_rsa_rsaes_oaep_encrypt 4123817466cbSJens Wiklander (not triggerable remotely in (D)TLS). 4124817466cbSJens Wiklander * Fix a potential integer underflow to buffer overread in 4125817466cbSJens Wiklander mbedtls_rsa_rsaes_oaep_decrypt. It is not triggerable remotely in 4126817466cbSJens Wiklander SSL/TLS. 4127817466cbSJens Wiklander 4128817466cbSJens WiklanderFeatures 4129817466cbSJens Wiklander * Support for platform abstraction of the standard C library time() 4130817466cbSJens Wiklander function. 4131817466cbSJens Wiklander 4132817466cbSJens WiklanderBugfix 4133817466cbSJens Wiklander * Fix bug in mbedtls_mpi_add_mpi() that caused wrong results when the three 4134817466cbSJens Wiklander arguments where the same (in-place doubling). Found and fixed by Janos 4135817466cbSJens Wiklander Follath. #309 4136817466cbSJens Wiklander * Fix potential build failures related to the 'apidoc' target, introduced 4137817466cbSJens Wiklander in the previous patch release. Found by Robert Scheck. #390 #391 4138817466cbSJens Wiklander * Fix issue in Makefile that prevented building using armar. #386 41395b25c76aSJerome Forissier * Fix memory leak that occurred only when ECJPAKE was enabled and ECDHE and 4140817466cbSJens Wiklander ECDSA was disabled in config.h . The leak didn't occur by default. 4141817466cbSJens Wiklander * Fix an issue that caused valid certificates to be rejected whenever an 4142817466cbSJens Wiklander expired or not yet valid certificate was parsed before a valid certificate 4143817466cbSJens Wiklander in the trusted certificate list. 4144817466cbSJens Wiklander * Fix bug in mbedtls_x509_crt_parse that caused trailing extra data in the 4145817466cbSJens Wiklander buffer after DER certificates to be included in the raw representation. 4146817466cbSJens Wiklander * Fix issue that caused a hang when generating RSA keys of odd bitlength 4147817466cbSJens Wiklander * Fix bug in mbedtls_rsa_rsaes_pkcs1_v15_encrypt that made null pointer 4148817466cbSJens Wiklander dereference possible. 4149817466cbSJens Wiklander * Fix issue that caused a crash if invalid curves were passed to 4150817466cbSJens Wiklander mbedtls_ssl_conf_curves. #373 4151817466cbSJens Wiklander * Fix issue in ssl_fork_server which was preventing it from functioning. #429 4152817466cbSJens Wiklander * Fix memory leaks in test framework 4153817466cbSJens Wiklander * Fix test in ssl-opt.sh that does not run properly with valgrind 4154817466cbSJens Wiklander * Fix unchecked calls to mmbedtls_md_setup(). Fix by Brian Murray. #502 4155817466cbSJens Wiklander 4156817466cbSJens WiklanderChanges 4157817466cbSJens Wiklander * On ARM platforms, when compiling with -O0 with GCC, Clang or armcc5, 4158817466cbSJens Wiklander don't use the optimized assembly for bignum multiplication. This removes 4159817466cbSJens Wiklander the need to pass -fomit-frame-pointer to avoid a build error with -O0. 4160817466cbSJens Wiklander * Disabled SSLv3 in the default configuration. 4161817466cbSJens Wiklander * Optimized mbedtls_mpi_zeroize() for MPI integer size. (Fix by Alexey 4162817466cbSJens Wiklander Skalozub). 4163817466cbSJens Wiklander * Fix non-compliance server extension handling. Extensions for SSLv3 are now 4164817466cbSJens Wiklander ignored, as required by RFC6101. 4165817466cbSJens Wiklander 4166817466cbSJens Wiklander= mbed TLS 2.2.1 released 2016-01-05 4167817466cbSJens Wiklander 4168817466cbSJens WiklanderSecurity 4169817466cbSJens Wiklander * Fix potential double free when mbedtls_asn1_store_named_data() fails to 4170817466cbSJens Wiklander allocate memory. Only used for certificate generation, not triggerable 4171817466cbSJens Wiklander remotely in SSL/TLS. Found by Rafał Przywara. #367 4172817466cbSJens Wiklander * Disable MD5 handshake signatures in TLS 1.2 by default to prevent the 4173817466cbSJens Wiklander SLOTH attack on TLS 1.2 server authentication (other attacks from the 4174817466cbSJens Wiklander SLOTH paper do not apply to any version of mbed TLS or PolarSSL). 4175817466cbSJens Wiklander https://www.mitls.org/pages/attacks/SLOTH 4176817466cbSJens Wiklander 4177817466cbSJens WiklanderBugfix 4178817466cbSJens Wiklander * Fix over-restrictive length limit in GCM. Found by Andreas-N. #362 4179817466cbSJens Wiklander * Fix bug in certificate validation that caused valid chains to be rejected 4180817466cbSJens Wiklander when the first intermediate certificate has pathLenConstraint=0. Found by 4181817466cbSJens Wiklander Nicholas Wilson. Introduced in mbed TLS 2.2.0. #280 4182817466cbSJens Wiklander * Removed potential leak in mbedtls_rsa_rsassa_pkcs1_v15_sign(), found by 4183817466cbSJens Wiklander JayaraghavendranK. #372 4184817466cbSJens Wiklander * Fix suboptimal handling of unexpected records that caused interop issues 4185817466cbSJens Wiklander with some peers over unreliable links. Avoid dropping an entire DTLS 4186817466cbSJens Wiklander datagram if a single record in a datagram is unexpected, instead only 4187817466cbSJens Wiklander drop the record and look at subsequent records (if any are present) in 4188817466cbSJens Wiklander the same datagram. Found by jeannotlapin. #345 4189817466cbSJens Wiklander 4190817466cbSJens Wiklander= mbed TLS 2.2.0 released 2015-11-04 4191817466cbSJens Wiklander 4192817466cbSJens WiklanderSecurity 4193817466cbSJens Wiklander * Fix potential double free if mbedtls_ssl_conf_psk() is called more than 4194817466cbSJens Wiklander once and some allocation fails. Cannot be forced remotely. Found by Guido 4195817466cbSJens Wiklander Vranken, Intelworks. 4196817466cbSJens Wiklander * Fix potential heap corruption on Windows when 4197817466cbSJens Wiklander mbedtls_x509_crt_parse_path() is passed a path longer than 2GB. Cannot be 4198817466cbSJens Wiklander triggered remotely. Found by Guido Vranken, Intelworks. 4199817466cbSJens Wiklander * Fix potential buffer overflow in some asn1_write_xxx() functions. 4200817466cbSJens Wiklander Cannot be triggered remotely unless you create X.509 certificates based 4201817466cbSJens Wiklander on untrusted input or write keys of untrusted origin. Found by Guido 4202817466cbSJens Wiklander Vranken, Intelworks. 4203817466cbSJens Wiklander * The X509 max_pathlen constraint was not enforced on intermediate 4204817466cbSJens Wiklander certificates. Found by Nicholas Wilson, fix and tests provided by 4205817466cbSJens Wiklander Janos Follath. #280 and #319 4206817466cbSJens Wiklander 4207817466cbSJens WiklanderFeatures 4208817466cbSJens Wiklander * Experimental support for EC J-PAKE as defined in Thread 1.0.0. 4209817466cbSJens Wiklander Disabled by default as the specification might still change. 4210817466cbSJens Wiklander * Added a key extraction callback to accees the master secret and key 4211817466cbSJens Wiklander block. (Potential uses include EAP-TLS and Thread.) 4212817466cbSJens Wiklander 4213817466cbSJens WiklanderBugfix 4214817466cbSJens Wiklander * Self-signed certificates were not excluded from pathlen counting, 4215817466cbSJens Wiklander resulting in some valid X.509 being incorrectly rejected. Found and fix 4216817466cbSJens Wiklander provided by Janos Follath. #319 4217817466cbSJens Wiklander * Fix build error with configurations where ECDHE-PSK is the only key 4218817466cbSJens Wiklander exchange. Found and fix provided by Chris Hammond. #270 4219817466cbSJens Wiklander * Fix build error with configurations where RSA, RSA-PSK, ECDH-RSA or 4220817466cbSJens Wiklander ECHD-ECDSA if the only key exchange. Multiple reports. #310 4221817466cbSJens Wiklander * Fixed a bug causing some handshakes to fail due to some non-fatal alerts 4222817466cbSJens Wiklander not being properly ignored. Found by mancha and Kasom Koht-arsa, #308 4223817466cbSJens Wiklander * mbedtls_x509_crt_verify(_with_profile)() now also checks the key type and 4224817466cbSJens Wiklander size/curve against the profile. Before that, there was no way to set a 4225817466cbSJens Wiklander minimum key size for end-entity certificates with RSA keys. Found by 4226817466cbSJens Wiklander Matthew Page of Scannex Electronics Ltd. 4227817466cbSJens Wiklander * Fix failures in MPI on Sparc(64) due to use of bad assembly code. 4228817466cbSJens Wiklander Found by Kurt Danielson. #292 4229817466cbSJens Wiklander * Fix typo in name of the extKeyUsage OID. Found by inestlerode, #314 4230817466cbSJens Wiklander * Fix bug in ASN.1 encoding of booleans that caused generated CA 4231817466cbSJens Wiklander certificates to be rejected by some applications, including OS X 4232817466cbSJens Wiklander Keychain. Found and fixed by Jonathan Leroy, Inikup. 4233817466cbSJens Wiklander 4234817466cbSJens WiklanderChanges 4235817466cbSJens Wiklander * Improved performance of mbedtls_ecp_muladd() when one of the scalars is 1 4236817466cbSJens Wiklander or -1. 4237817466cbSJens Wiklander 4238817466cbSJens Wiklander= mbed TLS 2.1.2 released 2015-10-06 4239817466cbSJens Wiklander 4240817466cbSJens WiklanderSecurity 4241817466cbSJens Wiklander * Added fix for CVE-2015-5291 to prevent heap corruption due to buffer 4242817466cbSJens Wiklander overflow of the hostname or session ticket. Found by Guido Vranken, 4243817466cbSJens Wiklander Intelworks. 4244817466cbSJens Wiklander * Fix potential double-free if mbedtls_ssl_set_hs_psk() is called more than 4245817466cbSJens Wiklander once in the same handhake and mbedtls_ssl_conf_psk() was used. 4246817466cbSJens Wiklander Found and patch provided by Guido Vranken, Intelworks. Cannot be forced 4247817466cbSJens Wiklander remotely. 4248817466cbSJens Wiklander * Fix stack buffer overflow in pkcs12 decryption (used by 4249817466cbSJens Wiklander mbedtls_pk_parse_key(file)() when the password is > 129 bytes. 4250817466cbSJens Wiklander Found by Guido Vranken, Intelworks. Not triggerable remotely. 4251817466cbSJens Wiklander * Fix potential buffer overflow in mbedtls_mpi_read_string(). 4252817466cbSJens Wiklander Found by Guido Vranken, Intelworks. Not exploitable remotely in the context 4253817466cbSJens Wiklander of TLS, but might be in other uses. On 32 bit machines, requires reading a 4254817466cbSJens Wiklander string of close to or larger than 1GB to exploit; on 64 bit machines, would 4255817466cbSJens Wiklander require reading a string of close to or larger than 2^62 bytes. 4256817466cbSJens Wiklander * Fix potential random memory allocation in mbedtls_pem_read_buffer() 4257817466cbSJens Wiklander on crafted PEM input data. Found and fix provided by Guido Vranken, 4258817466cbSJens Wiklander Intelworks. Not triggerable remotely in TLS. Triggerable remotely if you 4259817466cbSJens Wiklander accept PEM data from an untrusted source. 4260817466cbSJens Wiklander * Fix possible heap buffer overflow in base64_encoded() when the input 4261817466cbSJens Wiklander buffer is 512MB or larger on 32-bit platforms. Found by Guido Vranken, 4262817466cbSJens Wiklander Intelworks. Not trigerrable remotely in TLS. 4263817466cbSJens Wiklander * Fix potential double-free if mbedtls_conf_psk() is called repeatedly on 4264817466cbSJens Wiklander the same mbedtls_ssl_config object and memory allocation fails. Found by 4265817466cbSJens Wiklander Guido Vranken, Intelworks. Cannot be forced remotely. 4266817466cbSJens Wiklander * Fix potential heap buffer overflow in servers that perform client 4267817466cbSJens Wiklander authentication against a crafted CA cert. Cannot be triggered remotely 4268817466cbSJens Wiklander unless you allow third parties to pick trust CAs for client auth. 4269817466cbSJens Wiklander Found by Guido Vranken, Intelworks. 4270817466cbSJens Wiklander 4271817466cbSJens WiklanderBugfix 4272817466cbSJens Wiklander * Fix compile error in net.c with musl libc. Found and patch provided by 4273817466cbSJens Wiklander zhasha (#278). 4274817466cbSJens Wiklander * Fix macroization of 'inline' keyword when building as C++. (#279) 4275817466cbSJens Wiklander 4276817466cbSJens WiklanderChanges 4277817466cbSJens Wiklander * Added checking of hostname length in mbedtls_ssl_set_hostname() to ensure 4278817466cbSJens Wiklander domain names are compliant with RFC 1035. 4279817466cbSJens Wiklander * Fixed paths for check_config.h in example config files. (Found by bachp) 4280817466cbSJens Wiklander (#291) 4281817466cbSJens Wiklander 4282817466cbSJens Wiklander= mbed TLS 2.1.1 released 2015-09-17 4283817466cbSJens Wiklander 4284817466cbSJens WiklanderSecurity 4285817466cbSJens Wiklander * Add countermeasure against Lenstra's RSA-CRT attack for PKCS#1 v1.5 4286817466cbSJens Wiklander signatures. (Found by Florian Weimer, Red Hat.) 4287817466cbSJens Wiklander https://securityblog.redhat.com/2015/09/02/factoring-rsa-keys-with-tls-perfect-forward-secrecy/ 4288817466cbSJens Wiklander * Fix possible client-side NULL pointer dereference (read) when the client 4289817466cbSJens Wiklander tries to continue the handshake after it failed (a misuse of the API). 4290817466cbSJens Wiklander (Found and patch provided by Fabian Foerg, Gotham Digital Science using 4291817466cbSJens Wiklander afl-fuzz.) 4292817466cbSJens Wiklander 4293817466cbSJens WiklanderBugfix 4294817466cbSJens Wiklander * Fix warning when using a 64bit platform. (found by embedthis) (#275) 4295817466cbSJens Wiklander * Fix off-by-one error in parsing Supported Point Format extension that 4296817466cbSJens Wiklander caused some handshakes to fail. 4297817466cbSJens Wiklander 4298817466cbSJens WiklanderChanges 4299817466cbSJens Wiklander * Made X509 profile pointer const in mbedtls_ssl_conf_cert_profile() to allow 4300817466cbSJens Wiklander use of mbedtls_x509_crt_profile_next. (found by NWilson) 4301817466cbSJens Wiklander * When a client initiates a reconnect from the same port as a live 4302817466cbSJens Wiklander connection, if cookie verification is available 4303817466cbSJens Wiklander (MBEDTLS_SSL_DTLS_HELLO_VERIFY defined in config.h, and usable cookie 4304817466cbSJens Wiklander callbacks set with mbedtls_ssl_conf_dtls_cookies()), this will be 4305817466cbSJens Wiklander detected and mbedtls_ssl_read() will return 4306817466cbSJens Wiklander MBEDTLS_ERR_SSL_CLIENT_RECONNECT - it is then possible to start a new 4307817466cbSJens Wiklander handshake with the same context. (See RFC 6347 section 4.2.8.) 4308817466cbSJens Wiklander 4309817466cbSJens Wiklander= mbed TLS 2.1.0 released 2015-09-04 4310817466cbSJens Wiklander 4311817466cbSJens WiklanderFeatures 4312817466cbSJens Wiklander * Added support for yotta as a build system. 4313817466cbSJens Wiklander * Primary open source license changed to Apache 2.0 license. 4314817466cbSJens Wiklander 4315817466cbSJens WiklanderBugfix 4316817466cbSJens Wiklander * Fix segfault in the benchmark program when benchmarking DHM. 4317817466cbSJens Wiklander * Fix build error with CMake and pre-4.5 versions of GCC (found by Hugo 4318817466cbSJens Wiklander Leisink). 4319817466cbSJens Wiklander * Fix bug when parsing a ServerHello without extensions (found by David 4320817466cbSJens Wiklander Sears). 4321817466cbSJens Wiklander * Fix bug in CMake lists that caused libmbedcrypto.a not to be installed 4322817466cbSJens Wiklander (found by Benoit Lecocq). 4323817466cbSJens Wiklander * Fix bug in Makefile that caused libmbedcrypto and libmbedx509 not to be 4324817466cbSJens Wiklander installed (found by Rawi666). 4325817466cbSJens Wiklander * Fix compile error with armcc 5 with --gnu option. 4326817466cbSJens Wiklander * Fix bug in Makefile that caused programs not to be installed correctly 4327817466cbSJens Wiklander (found by robotanarchy) (#232). 4328817466cbSJens Wiklander * Fix bug in Makefile that prevented from installing without building the 4329817466cbSJens Wiklander tests (found by robotanarchy) (#232). 4330817466cbSJens Wiklander * Fix missing -static-libgcc when building shared libraries for Windows 4331817466cbSJens Wiklander with make. 4332817466cbSJens Wiklander * Fix link error when building shared libraries for Windows with make. 4333817466cbSJens Wiklander * Fix error when loading libmbedtls.so. 4334817466cbSJens Wiklander * Fix bug in mbedtls_ssl_conf_default() that caused the default preset to 4335817466cbSJens Wiklander be always used (found by dcb314) (#235) 4336817466cbSJens Wiklander * Fix bug in mbedtls_rsa_public() and mbedtls_rsa_private() that could 4337817466cbSJens Wiklander result trying to unlock an unlocked mutex on invalid input (found by 4338817466cbSJens Wiklander Fredrik Axelsson) (#257) 4339817466cbSJens Wiklander * Fix -Wshadow warnings (found by hnrkp) (#240) 4340817466cbSJens Wiklander * Fix memory corruption on client with overlong PSK identity, around 4341817466cbSJens Wiklander SSL_MAX_CONTENT_LEN or higher - not triggerrable remotely (found by 4342817466cbSJens Wiklander Aleksandrs Saveljevs) (#238) 4343817466cbSJens Wiklander * Fix unused function warning when using MBEDTLS_MDx_ALT or 4344817466cbSJens Wiklander MBEDTLS_SHAxxx_ALT (found by Henrik) (#239) 4345817466cbSJens Wiklander * Fix memory corruption in pkey programs (found by yankuncheng) (#210) 4346817466cbSJens Wiklander 4347817466cbSJens WiklanderChanges 4348817466cbSJens Wiklander * The PEM parser now accepts a trailing space at end of lines (#226). 4349817466cbSJens Wiklander * It is now possible to #include a user-provided configuration file at the 4350817466cbSJens Wiklander end of the default config.h by defining MBEDTLS_USER_CONFIG_FILE on the 4351817466cbSJens Wiklander compiler's command line. 4352817466cbSJens Wiklander * When verifying a certificate chain, if an intermediate certificate is 4353817466cbSJens Wiklander trusted, no later cert is checked. (suggested by hannes-landeholm) 4354817466cbSJens Wiklander (#220). 4355817466cbSJens Wiklander * Prepend a "thread identifier" to debug messages (issue pointed out by 4356817466cbSJens Wiklander Hugo Leisink) (#210). 4357817466cbSJens Wiklander * Add mbedtls_ssl_get_max_frag_len() to query the current maximum fragment 4358817466cbSJens Wiklander length. 4359817466cbSJens Wiklander 4360817466cbSJens Wiklander= mbed TLS 2.0.0 released 2015-07-13 4361817466cbSJens Wiklander 4362817466cbSJens WiklanderFeatures 4363817466cbSJens Wiklander * Support for DTLS 1.0 and 1.2 (RFC 6347). 4364817466cbSJens Wiklander * Ability to override core functions from MDx, SHAx, AES and DES modules 4365817466cbSJens Wiklander with custom implementation (eg hardware accelerated), complementing the 4366817466cbSJens Wiklander ability to override the whole module. 4367817466cbSJens Wiklander * New server-side implementation of session tickets that rotate keys to 4368817466cbSJens Wiklander preserve forward secrecy, and allows sharing across multiple contexts. 4369817466cbSJens Wiklander * Added a concept of X.509 cerificate verification profile that controls 4370817466cbSJens Wiklander which algorithms and key sizes (curves for ECDSA) are acceptable. 4371817466cbSJens Wiklander * Expanded configurability of security parameters in the SSL module with 4372817466cbSJens Wiklander mbedtls_ssl_conf_dhm_min_bitlen() and mbedtls_ssl_conf_sig_hashes(). 4373817466cbSJens Wiklander * Introduced a concept of presets for SSL security-relevant configuration 4374817466cbSJens Wiklander parameters. 4375817466cbSJens Wiklander 4376817466cbSJens WiklanderAPI Changes 4377817466cbSJens Wiklander * The library has been split into libmbedcrypto, libmbedx509, libmbedtls. 4378817466cbSJens Wiklander You now need to link to all of them if you use TLS for example. 4379817466cbSJens Wiklander * All public identifiers moved to the mbedtls_* or MBEDTLS_* namespace. 4380817466cbSJens Wiklander Some names have been further changed to make them more consistent. 43815b25c76aSJerome Forissier Migration helpers scripts/rename.pl and include/mbedtls/compat-1.3.h are 4382817466cbSJens Wiklander provided. Full list of renamings in scripts/data_files/rename-1.3-2.0.txt 4383817466cbSJens Wiklander * Renamings of fields inside structures, not covered by the previous list: 4384817466cbSJens Wiklander mbedtls_cipher_info_t.key_length -> key_bitlen 4385817466cbSJens Wiklander mbedtls_cipher_context_t.key_length -> key_bitlen 4386817466cbSJens Wiklander mbedtls_ecp_curve_info.size -> bit_size 4387817466cbSJens Wiklander * Headers are now found in the 'mbedtls' directory (previously 'polarssl'). 4388817466cbSJens Wiklander * The following _init() functions that could return errors have 4389817466cbSJens Wiklander been split into an _init() that returns void and another function that 4390817466cbSJens Wiklander should generally be the first function called on this context after init: 4391817466cbSJens Wiklander mbedtls_ssl_init() -> mbedtls_ssl_setup() 4392817466cbSJens Wiklander mbedtls_ccm_init() -> mbedtls_ccm_setkey() 4393817466cbSJens Wiklander mbedtls_gcm_init() -> mbedtls_gcm_setkey() 4394817466cbSJens Wiklander mbedtls_hmac_drbg_init() -> mbedtls_hmac_drbg_seed(_buf)() 4395817466cbSJens Wiklander mbedtls_ctr_drbg_init() -> mbedtls_ctr_drbg_seed() 4396817466cbSJens Wiklander Note that for mbedtls_ssl_setup(), you need to be done setting up the 4397817466cbSJens Wiklander ssl_config structure before calling it. 4398817466cbSJens Wiklander * Most ssl_set_xxx() functions (all except ssl_set_bio(), ssl_set_hostname(), 4399817466cbSJens Wiklander ssl_set_session() and ssl_set_client_transport_id(), plus 4400817466cbSJens Wiklander ssl_legacy_renegotiation()) have been renamed to mbedtls_ssl_conf_xxx() 4401817466cbSJens Wiklander (see rename.pl and compat-1.3.h above) and their first argument's type 4402817466cbSJens Wiklander changed from ssl_context to ssl_config. 4403817466cbSJens Wiklander * ssl_set_bio() changed signature (contexts merged, order switched, one 4404817466cbSJens Wiklander additional callback for read-with-timeout). 4405817466cbSJens Wiklander * The following functions have been introduced and must be used in callback 4406817466cbSJens Wiklander implementations (SNI, PSK) instead of their *conf counterparts: 4407817466cbSJens Wiklander mbedtls_ssl_set_hs_own_cert() 4408817466cbSJens Wiklander mbedtls_ssl_set_hs_ca_chain() 4409817466cbSJens Wiklander mbedtls_ssl_set_hs_psk() 4410817466cbSJens Wiklander * mbedtls_ssl_conf_ca_chain() lost its last argument (peer_cn), now set 4411817466cbSJens Wiklander using mbedtls_ssl_set_hostname(). 4412817466cbSJens Wiklander * mbedtls_ssl_conf_session_cache() changed prototype (only one context 4413817466cbSJens Wiklander pointer, parameters reordered). 4414817466cbSJens Wiklander * On server, mbedtls_ssl_conf_session_tickets_cb() must now be used in 4415817466cbSJens Wiklander place of mbedtls_ssl_conf_session_tickets() to enable session tickets. 4416817466cbSJens Wiklander * The SSL debug callback gained two new arguments (file name, line number). 4417817466cbSJens Wiklander * Debug modes were removed. 4418817466cbSJens Wiklander * mbedtls_ssl_conf_truncated_hmac() now returns void. 4419817466cbSJens Wiklander * mbedtls_memory_buffer_alloc_init() now returns void. 4420817466cbSJens Wiklander * X.509 verification flags are now an uint32_t. Affect the signature of: 4421817466cbSJens Wiklander mbedtls_ssl_get_verify_result() 4422817466cbSJens Wiklander mbedtls_x509_ctr_verify_info() 4423817466cbSJens Wiklander mbedtls_x509_crt_verify() (flags, f_vrfy -> needs to be updated) 4424817466cbSJens Wiklander mbedtls_ssl_conf_verify() (f_vrfy -> needs to be updated) 4425817466cbSJens Wiklander * The following functions changed prototype to avoid an in-out length 4426817466cbSJens Wiklander parameter: 4427817466cbSJens Wiklander mbedtls_base64_encode() 4428817466cbSJens Wiklander mbedtls_base64_decode() 4429817466cbSJens Wiklander mbedtls_mpi_write_string() 4430817466cbSJens Wiklander mbedtls_dhm_calc_secret() 4431817466cbSJens Wiklander * In the NET module, all "int" and "int *" arguments for file descriptors 4432817466cbSJens Wiklander changed type to "mbedtls_net_context *". 4433817466cbSJens Wiklander * net_accept() gained new arguments for the size of the client_ip buffer. 4434817466cbSJens Wiklander * In the threading layer, mbedtls_mutex_init() and mbedtls_mutex_free() now 4435817466cbSJens Wiklander return void. 44365b25c76aSJerome Forissier * ecdsa_write_signature() gained an additional md_alg argument and 4437817466cbSJens Wiklander ecdsa_write_signature_det() was deprecated. 4438817466cbSJens Wiklander * pk_sign() no longer accepts md_alg == POLARSSL_MD_NONE with ECDSA. 4439817466cbSJens Wiklander * Last argument of x509_crt_check_key_usage() and 4440817466cbSJens Wiklander mbedtls_x509write_crt_set_key_usage() changed from int to unsigned. 4441817466cbSJens Wiklander * test_ca_list (from certs.h) is renamed to test_cas_pem and is only 4442817466cbSJens Wiklander available if POLARSSL_PEM_PARSE_C is defined (it never worked without). 4443817466cbSJens Wiklander * Test certificates in certs.c are no longer guaranteed to be nul-terminated 4444817466cbSJens Wiklander strings; use the new *_len variables instead of strlen(). 4445817466cbSJens Wiklander * Functions mbedtls_x509_xxx_parse(), mbedtls_pk_parse_key(), 4446817466cbSJens Wiklander mbedtls_pk_parse_public_key() and mbedtls_dhm_parse_dhm() now expect the 4447817466cbSJens Wiklander length parameter to include the terminating null byte for PEM input. 4448817466cbSJens Wiklander * Signature of mpi_mul_mpi() changed to make the last argument unsigned 4449817466cbSJens Wiklander * calloc() is now used instead of malloc() everywhere. API of platform 4450817466cbSJens Wiklander layer and the memory_buffer_alloc module changed accordingly. 4451817466cbSJens Wiklander (Thanks to Mansour Moufid for helping with the replacement.) 4452817466cbSJens Wiklander * Change SSL_DISABLE_RENEGOTIATION config.h flag to SSL_RENEGOTIATION 4453817466cbSJens Wiklander (support for renegotiation now needs explicit enabling in config.h). 4454817466cbSJens Wiklander * Split MBEDTLS_HAVE_TIME into MBEDTLS_HAVE_TIME and MBEDTLS_HAVE_TIME_DATE 4455817466cbSJens Wiklander in config.h 4456817466cbSJens Wiklander * net_connect() and net_bind() have a new 'proto' argument to choose 4457817466cbSJens Wiklander between TCP and UDP, using the macros NET_PROTO_TCP or NET_PROTO_UDP. 4458817466cbSJens Wiklander Their 'port' argument type is changed to a string. 4459817466cbSJens Wiklander * Some constness fixes 4460817466cbSJens Wiklander 4461817466cbSJens WiklanderRemovals 4462817466cbSJens Wiklander * Removed mbedtls_ecp_group_read_string(). Only named groups are supported. 4463817466cbSJens Wiklander * Removed mbedtls_ecp_sub() and mbedtls_ecp_add(), use 4464817466cbSJens Wiklander mbedtls_ecp_muladd(). 4465817466cbSJens Wiklander * Removed individual mdX_hmac, shaX_hmac, mdX_file and shaX_file functions 4466817466cbSJens Wiklander (use generic functions from md.h) 4467817466cbSJens Wiklander * Removed mbedtls_timing_msleep(). Use mbedtls_net_usleep() or a custom 4468817466cbSJens Wiklander waiting function. 4469817466cbSJens Wiklander * Removed test DHM parameters from the test certs module. 4470817466cbSJens Wiklander * Removed the PBKDF2 module (use PKCS5). 4471817466cbSJens Wiklander * Removed POLARSSL_ERROR_STRERROR_BC (use mbedtls_strerror()). 4472817466cbSJens Wiklander * Removed compat-1.2.h (helper for migrating from 1.2 to 1.3). 4473817466cbSJens Wiklander * Removed openssl.h (very partial OpenSSL compatibility layer). 4474817466cbSJens Wiklander * Configuration options POLARSSL_HAVE_LONGLONG was removed (now always on). 4475817466cbSJens Wiklander * Configuration options POLARSSL_HAVE_INT8 and POLARSSL_HAVE_INT16 have 4476817466cbSJens Wiklander been removed (compiler is required to support 32-bit operations). 4477817466cbSJens Wiklander * Configuration option POLARSSL_HAVE_IPV6 was removed (always enabled). 4478817466cbSJens Wiklander * Removed test program o_p_test, the script compat.sh does more. 4479817466cbSJens Wiklander * Removed test program ssl_test, superseded by ssl-opt.sh. 4480817466cbSJens Wiklander * Removed helper script active-config.pl 4481817466cbSJens Wiklander 4482817466cbSJens WiklanderNew deprecations 4483817466cbSJens Wiklander * md_init_ctx() is deprecated in favour of md_setup(), that adds a third 4484817466cbSJens Wiklander argument (allowing memory savings if HMAC is not used) 4485817466cbSJens Wiklander 4486817466cbSJens WiklanderSemi-API changes (technically public, morally private) 4487817466cbSJens Wiklander * Renamed a few headers to include _internal in the name. Those headers are 4488817466cbSJens Wiklander not supposed to be included by users. 4489817466cbSJens Wiklander * Changed md_info_t into an opaque structure (use md_get_xxx() accessors). 4490817466cbSJens Wiklander * Changed pk_info_t into an opaque structure. 4491817466cbSJens Wiklander * Changed cipher_base_t into an opaque structure. 4492817466cbSJens Wiklander * Removed sig_oid2 and rename sig_oid1 to sig_oid in x509_crt and x509_crl. 4493817466cbSJens Wiklander * x509_crt.key_usage changed from unsigned char to unsigned int. 4494817466cbSJens Wiklander * Removed r and s from ecdsa_context 4495817466cbSJens Wiklander * Removed mode from des_context and des3_context 4496817466cbSJens Wiklander 4497817466cbSJens WiklanderDefault behavior changes 4498817466cbSJens Wiklander * The default minimum TLS version is now TLS 1.0. 4499817466cbSJens Wiklander * RC4 is now blacklisted by default in the SSL/TLS layer, and excluded from the 4500817466cbSJens Wiklander default ciphersuite list returned by ssl_list_ciphersuites() 4501817466cbSJens Wiklander * Support for receiving SSLv2 ClientHello is now disabled by default at 4502817466cbSJens Wiklander compile time. 4503817466cbSJens Wiklander * The default authmode for SSL/TLS clients is now REQUIRED. 4504817466cbSJens Wiklander * Support for RSA_ALT contexts in the PK layer is now optional. Since is is 4505817466cbSJens Wiklander enabled in the default configuration, this is only noticeable if using a 4506817466cbSJens Wiklander custom config.h 4507817466cbSJens Wiklander * Default DHM parameters server-side upgraded from 1024 to 2048 bits. 4508817466cbSJens Wiklander * A minimum RSA key size of 2048 bits is now enforced during ceritificate 4509817466cbSJens Wiklander chain verification. 4510817466cbSJens Wiklander * Negotiation of truncated HMAC is now disabled by default on server too. 4511817466cbSJens Wiklander * The following functions are now case-sensitive: 4512817466cbSJens Wiklander mbedtls_cipher_info_from_string() 4513817466cbSJens Wiklander mbedtls_ecp_curve_info_from_name() 4514817466cbSJens Wiklander mbedtls_md_info_from_string() 4515817466cbSJens Wiklander mbedtls_ssl_ciphersuite_from_string() 4516817466cbSJens Wiklander mbedtls_version_check_feature() 4517817466cbSJens Wiklander 4518817466cbSJens WiklanderRequirement changes 4519817466cbSJens Wiklander * The minimum MSVC version required is now 2010 (better C99 support). 4520817466cbSJens Wiklander * The NET layer now unconditionnaly relies on getaddrinfo() and select(). 4521817466cbSJens Wiklander * Compiler is required to support C99 types such as long long and uint32_t. 4522817466cbSJens Wiklander 4523817466cbSJens WiklanderAPI changes from the 1.4 preview branch 4524817466cbSJens Wiklander * ssl_set_bio_timeout() was removed, split into mbedtls_ssl_set_bio() with 4525817466cbSJens Wiklander new prototype, and mbedtls_ssl_set_read_timeout(). 4526817466cbSJens Wiklander * The following functions now return void: 4527817466cbSJens Wiklander mbedtls_ssl_conf_transport() 4528817466cbSJens Wiklander mbedtls_ssl_conf_max_version() 4529817466cbSJens Wiklander mbedtls_ssl_conf_min_version() 4530817466cbSJens Wiklander * DTLS no longer hard-depends on TIMING_C, but uses a callback interface 4531817466cbSJens Wiklander instead, see mbedtls_ssl_set_timer_cb(), with the Timing module providing 4532817466cbSJens Wiklander an example implementation, see mbedtls_timing_delay_context and 4533817466cbSJens Wiklander mbedtls_timing_set/get_delay(). 4534817466cbSJens Wiklander * With UDP sockets, it is no longer necessary to call net_bind() again 4535817466cbSJens Wiklander after a successful net_accept(). 4536817466cbSJens Wiklander 4537817466cbSJens WiklanderChanges 4538817466cbSJens Wiklander * mbedtls_ctr_drbg_random() and mbedtls_hmac_drbg_random() are now 4539817466cbSJens Wiklander thread-safe if MBEDTLS_THREADING_C is enabled. 4540817466cbSJens Wiklander * Reduced ROM fooprint of SHA-256 and added an option to reduce it even 4541817466cbSJens Wiklander more (at the expense of performance) MBEDTLS_SHA256_SMALLER. 4542817466cbSJens Wiklander 4543817466cbSJens Wiklander= mbed TLS 1.3 branch 4544817466cbSJens Wiklander 4545817466cbSJens WiklanderSecurity 4546817466cbSJens Wiklander * With authmode set to SSL_VERIFY_OPTIONAL, verification of keyUsage and 4547817466cbSJens Wiklander extendedKeyUsage on the leaf certificate was lost (results not accessible 4548817466cbSJens Wiklander via ssl_get_verify_results()). 4549817466cbSJens Wiklander * Add countermeasure against "Lucky 13 strikes back" cache-based attack, 4550817466cbSJens Wiklander https://dl.acm.org/citation.cfm?id=2714625 4551817466cbSJens Wiklander 4552817466cbSJens WiklanderFeatures 4553817466cbSJens Wiklander * Improve ECC performance by using more efficient doubling formulas 4554817466cbSJens Wiklander (contributed by Peter Dettman). 4555817466cbSJens Wiklander * Add x509_crt_verify_info() to display certificate verification results. 4556817466cbSJens Wiklander * Add support for reading DH parameters with privateValueLength included 4557817466cbSJens Wiklander (contributed by Daniel Kahn Gillmor). 4558817466cbSJens Wiklander * Add support for bit strings in X.509 names (request by Fredrik Axelsson). 4559817466cbSJens Wiklander * Add support for id-at-uniqueIdentifier in X.509 names. 4560817466cbSJens Wiklander * Add support for overriding snprintf() (except on Windows) and exit() in 4561817466cbSJens Wiklander the platform layer. 4562817466cbSJens Wiklander * Add an option to use macros instead of function pointers in the platform 4563817466cbSJens Wiklander layer (helps get rid of unwanted references). 4564817466cbSJens Wiklander * Improved Makefiles for Windows targets by fixing library targets and making 4565817466cbSJens Wiklander cross-compilation easier (thanks to Alon Bar-Lev). 4566817466cbSJens Wiklander * The benchmark program also prints heap usage for public-key primitives 4567817466cbSJens Wiklander if POLARSSL_MEMORY_BUFFER_ALLOC_C and POLARSSL_MEMORY_DEBUG are defined. 4568817466cbSJens Wiklander * New script ecc-heap.sh helps measuring the impact of ECC parameters on 4569817466cbSJens Wiklander speed and RAM (heap only for now) usage. 4570817466cbSJens Wiklander * New script memory.sh helps measuring the ROM and RAM requirements of two 4571817466cbSJens Wiklander reduced configurations (PSK-CCM and NSA suite B). 4572817466cbSJens Wiklander * Add config flag POLARSSL_DEPRECATED_WARNING (off by default) to produce 4573817466cbSJens Wiklander warnings on use of deprecated functions (with GCC and Clang only). 4574817466cbSJens Wiklander * Add config flag POLARSSL_DEPRECATED_REMOVED (off by default) to produce 4575817466cbSJens Wiklander errors on use of deprecated functions. 4576817466cbSJens Wiklander 4577817466cbSJens WiklanderBugfix 4578817466cbSJens Wiklander * Fix compile errors with PLATFORM_NO_STD_FUNCTIONS. 4579817466cbSJens Wiklander * Fix compile error with PLATFORM_EXIT_ALT (thanks to Rafał Przywara). 4580817466cbSJens Wiklander * Fix bug in entropy.c when THREADING_C is also enabled that caused 4581817466cbSJens Wiklander entropy_free() to crash (thanks to Rafał Przywara). 4582817466cbSJens Wiklander * Fix memory leak when gcm_setkey() and ccm_setkey() are used more than 4583817466cbSJens Wiklander once on the same context. 4584817466cbSJens Wiklander * Fix bug in ssl_mail_client when password is longer that username (found 4585817466cbSJens Wiklander by Bruno Pape). 4586817466cbSJens Wiklander * Fix undefined behaviour (memcmp( NULL, NULL, 0 );) in X.509 modules 4587817466cbSJens Wiklander (detected by Clang's 3.6 UBSan). 4588817466cbSJens Wiklander * mpi_size() and mpi_msb() would segfault when called on an mpi that is 4589817466cbSJens Wiklander initialized but not set (found by pravic). 4590817466cbSJens Wiklander * Fix detection of support for getrandom() on Linux (reported by syzzer) by 4591817466cbSJens Wiklander doing it at runtime (using uname) rather that compile time. 4592817466cbSJens Wiklander * Fix handling of symlinks by "make install" (found by Gaël PORTAY). 4593817466cbSJens Wiklander * Fix potential NULL pointer dereference (not trigerrable remotely) when 4594817466cbSJens Wiklander ssl_write() is called before the handshake is finished (introduced in 4595817466cbSJens Wiklander 1.3.10) (first reported by Martin Blumenstingl). 4596817466cbSJens Wiklander * Fix bug in pk_parse_key() that caused some valid private EC keys to be 4597817466cbSJens Wiklander rejected. 4598817466cbSJens Wiklander * Fix bug in Via Padlock support (found by Nikos Mavrogiannopoulos). 4599817466cbSJens Wiklander * Fix thread safety bug in RSA operations (found by Fredrik Axelsson). 4600817466cbSJens Wiklander * Fix hardclock() (only used in the benchmarking program) with some 4601817466cbSJens Wiklander versions of mingw64 (found by kxjhlele). 4602817466cbSJens Wiklander * Fix warnings from mingw64 in timing.c (found by kxjklele). 4603817466cbSJens Wiklander * Fix potential unintended sign extension in asn1_get_len() on 64-bit 4604817466cbSJens Wiklander platforms. 4605817466cbSJens Wiklander * Fix potential memory leak in ssl_set_psk() (found by Mansour Moufid). 4606817466cbSJens Wiklander * Fix compile error when POLARSSL_SSL_DISABLE_RENEGOTATION and 4607817466cbSJens Wiklander POLARSSL_SSL_SSESSION_TICKETS where both enabled in config.h (introduced 4608817466cbSJens Wiklander in 1.3.10). 4609817466cbSJens Wiklander * Add missing extern "C" guard in aesni.h (reported by amir zamani). 4610817466cbSJens Wiklander * Add missing dependency on SHA-256 in some x509 programs (reported by 4611817466cbSJens Wiklander Gergely Budai). 4612817466cbSJens Wiklander * Fix bug related to ssl_set_curves(): the client didn't check that the 4613817466cbSJens Wiklander curve picked by the server was actually allowed. 4614817466cbSJens Wiklander 4615817466cbSJens WiklanderChanges 4616817466cbSJens Wiklander * Remove bias in mpi_gen_prime (contributed by Pascal Junod). 4617817466cbSJens Wiklander * Remove potential sources of timing variations (some contributed by Pascal 4618817466cbSJens Wiklander Junod). 4619817466cbSJens Wiklander * Options POLARSSL_HAVE_INT8 and POLARSSL_HAVE_INT16 are deprecated. 4620817466cbSJens Wiklander * Enabling POLARSSL_NET_C without POLARSSL_HAVE_IPV6 is deprecated. 4621817466cbSJens Wiklander * compat-1.2.h and openssl.h are deprecated. 4622817466cbSJens Wiklander * Adjusting/overriding CFLAGS and LDFLAGS with the make build system is now 4623817466cbSJens Wiklander more flexible (warning: OFLAGS is not used any more) (see the README) 4624817466cbSJens Wiklander (contributed by Alon Bar-Lev). 4625817466cbSJens Wiklander * ssl_set_own_cert() no longer calls pk_check_pair() since the 4626817466cbSJens Wiklander performance impact was bad for some users (this was introduced in 1.3.10). 4627817466cbSJens Wiklander * Move from SHA-1 to SHA-256 in example programs using signatures 4628817466cbSJens Wiklander (suggested by Thorsten Mühlfelder). 4629817466cbSJens Wiklander * Remove some unneeded inclusions of header files from the standard library 4630817466cbSJens Wiklander "minimize" others (eg use stddef.h if only size_t is needed). 4631817466cbSJens Wiklander * Change #include lines in test files to use double quotes instead of angle 4632817466cbSJens Wiklander brackets for uniformity with the rest of the code. 4633817466cbSJens Wiklander * Remove dependency on sscanf() in X.509 parsing modules. 4634817466cbSJens Wiklander 4635817466cbSJens Wiklander= mbed TLS 1.3.10 released 2015-02-09 4636817466cbSJens WiklanderSecurity 4637817466cbSJens Wiklander * NULL pointer dereference in the buffer-based allocator when the buffer is 4638817466cbSJens Wiklander full and polarssl_free() is called (found by Mark Hasemeyer) 4639817466cbSJens Wiklander (only possible if POLARSSL_MEMORY_BUFFER_ALLOC_C is enabled, which it is 4640817466cbSJens Wiklander not by default). 4641817466cbSJens Wiklander * Fix remotely-triggerable uninitialised pointer dereference caused by 4642817466cbSJens Wiklander crafted X.509 certificate (TLS server is not affected if it doesn't ask for a 4643817466cbSJens Wiklander client certificate) (found using Codenomicon Defensics). 4644817466cbSJens Wiklander * Fix remotely-triggerable memory leak caused by crafted X.509 certificates 4645817466cbSJens Wiklander (TLS server is not affected if it doesn't ask for a client certificate) 4646817466cbSJens Wiklander (found using Codenomicon Defensics). 4647817466cbSJens Wiklander * Fix potential stack overflow while parsing crafted X.509 certificates 4648817466cbSJens Wiklander (TLS server is not affected if it doesn't ask for a client certificate) 4649817466cbSJens Wiklander (found using Codenomicon Defensics). 4650817466cbSJens Wiklander * Fix timing difference that could theoretically lead to a 4651817466cbSJens Wiklander Bleichenbacher-style attack in the RSA and RSA-PSK key exchanges 4652817466cbSJens Wiklander (reported by Sebastian Schinzel). 4653817466cbSJens Wiklander 4654817466cbSJens WiklanderFeatures 4655817466cbSJens Wiklander * Add support for FALLBACK_SCSV (draft-ietf-tls-downgrade-scsv). 4656817466cbSJens Wiklander * Add support for Extended Master Secret (draft-ietf-tls-session-hash). 4657817466cbSJens Wiklander * Add support for Encrypt-then-MAC (RFC 7366). 4658817466cbSJens Wiklander * Add function pk_check_pair() to test if public and private keys match. 4659817466cbSJens Wiklander * Add x509_crl_parse_der(). 4660817466cbSJens Wiklander * Add compile-time option POLARSSL_X509_MAX_INTERMEDIATE_CA to limit the 4661817466cbSJens Wiklander length of an X.509 verification chain. 4662817466cbSJens Wiklander * Support for renegotiation can now be disabled at compile-time 4663817466cbSJens Wiklander * Support for 1/n-1 record splitting, a countermeasure against BEAST. 4664817466cbSJens Wiklander * Certificate selection based on signature hash, preferring SHA-1 over SHA-2 4665817466cbSJens Wiklander for pre-1.2 clients when multiple certificates are available. 4666817466cbSJens Wiklander * Add support for getrandom() syscall on recent Linux kernels with Glibc or 4667817466cbSJens Wiklander a compatible enough libc (eg uClibc). 4668817466cbSJens Wiklander * Add ssl_set_arc4_support() to make it easier to disable RC4 at runtime 4669817466cbSJens Wiklander while using the default ciphersuite list. 4670817466cbSJens Wiklander * Added new error codes and debug messages about selection of 4671817466cbSJens Wiklander ciphersuite/certificate. 4672817466cbSJens Wiklander 4673817466cbSJens WiklanderBugfix 4674817466cbSJens Wiklander * Stack buffer overflow if ctr_drbg_update() is called with too large 4675817466cbSJens Wiklander add_len (found by Jean-Philippe Aumasson) (not triggerable remotely). 4676817466cbSJens Wiklander * Possible buffer overflow of length at most POLARSSL_MEMORY_ALIGN_MULTIPLE 4677817466cbSJens Wiklander if memory_buffer_alloc_init() was called with buf not aligned and len not 4678817466cbSJens Wiklander a multiple of POLARSSL_MEMORY_ALIGN_MULTIPLE (not triggerable remotely). 4679817466cbSJens Wiklander * User set CFLAGS were ignored by Cmake with gcc (introduced in 1.3.9, found 4680817466cbSJens Wiklander by Julian Ospald). 4681817466cbSJens Wiklander * Fix potential undefined behaviour in Camellia. 4682817466cbSJens Wiklander * Fix potential failure in ECDSA signatures when POLARSSL_ECP_MAX_BITS is a 4683817466cbSJens Wiklander multiple of 8 (found by Gergely Budai). 4684817466cbSJens Wiklander * Fix unchecked return code in x509_crt_parse_path() on Windows (found by 4685817466cbSJens Wiklander Peter Vaskovic). 4686817466cbSJens Wiklander * Fix assembly selection for MIPS64 (thanks to James Cowgill). 4687817466cbSJens Wiklander * ssl_get_verify_result() now works even if the handshake was aborted due 4688817466cbSJens Wiklander to a failed verification (found by Fredrik Axelsson). 4689817466cbSJens Wiklander * Skip writing and parsing signature_algorithm extension if none of the 4690817466cbSJens Wiklander key exchanges enabled needs certificates. This fixes a possible interop 4691817466cbSJens Wiklander issue with some servers when a zero-length extension was sent. (Reported 4692817466cbSJens Wiklander by Peter Dettman.) 4693817466cbSJens Wiklander * On a 0-length input, base64_encode() did not correctly set output length 4694817466cbSJens Wiklander (found by Hendrik van den Boogaard). 4695817466cbSJens Wiklander 4696817466cbSJens WiklanderChanges 4697817466cbSJens Wiklander * Use deterministic nonces for AEAD ciphers in TLS by default (possible to 4698817466cbSJens Wiklander switch back to random with POLARSSL_SSL_AEAD_RANDOM_IV in config.h). 4699817466cbSJens Wiklander * Blind RSA private operations even when POLARSSL_RSA_NO_CRT is defined. 4700817466cbSJens Wiklander * ssl_set_own_cert() now returns an error on key-certificate mismatch. 4701817466cbSJens Wiklander * Forbid repeated extensions in X.509 certificates. 4702817466cbSJens Wiklander * debug_print_buf() now prints a text view in addition to hexadecimal. 4703817466cbSJens Wiklander * A specific error is now returned when there are ciphersuites in common 4704817466cbSJens Wiklander but none of them is usable due to external factors such as no certificate 4705817466cbSJens Wiklander with a suitable (extended)KeyUsage or curve or no PSK set. 4706817466cbSJens Wiklander * It is now possible to disable negotiation of truncated HMAC server-side 4707817466cbSJens Wiklander at runtime with ssl_set_truncated_hmac(). 4708817466cbSJens Wiklander * Example programs for SSL client and server now disable SSLv3 by default. 4709817466cbSJens Wiklander * Example programs for SSL client and server now disable RC4 by default. 4710817466cbSJens Wiklander * Use platform.h in all test suites and programs. 4711817466cbSJens Wiklander 4712817466cbSJens Wiklander= PolarSSL 1.3.9 released 2014-10-20 4713817466cbSJens WiklanderSecurity 4714817466cbSJens Wiklander * Lowest common hash was selected from signature_algorithms extension in 4715817466cbSJens Wiklander TLS 1.2 (found by Darren Bane) (introduced in 1.3.8). 4716817466cbSJens Wiklander * Remotely-triggerable memory leak when parsing some X.509 certificates 4717817466cbSJens Wiklander (server is not affected if it doesn't ask for a client certificate) 4718817466cbSJens Wiklander (found using Codenomicon Defensics). 4719817466cbSJens Wiklander * Remotely-triggerable memory leak when parsing crafted ClientHello 4720817466cbSJens Wiklander (not affected if ECC support was compiled out) (found using Codenomicon 4721817466cbSJens Wiklander Defensics). 4722817466cbSJens Wiklander 4723817466cbSJens WiklanderBugfix 4724817466cbSJens Wiklander * Support escaping of commas in x509_string_to_names() 4725817466cbSJens Wiklander * Fix compile error in ssl_pthread_server (found by Julian Ospald). 4726817466cbSJens Wiklander * Fix net_accept() regarding non-blocking sockets (found by Luca Pesce). 4727817466cbSJens Wiklander * Don't print uninitialised buffer in ssl_mail_client (found by Marc Abel). 4728817466cbSJens Wiklander * Fix warnings from Clang's scan-build (contributed by Alfred Klomp). 4729817466cbSJens Wiklander * Fix compile error in timing.c when POLARSSL_NET_C and POLARSSL_SELFTEST 4730817466cbSJens Wiklander are defined but not POLARSSL_HAVE_TIME (found by Stephane Di Vito). 4731817466cbSJens Wiklander * Remove non-existent file from VS projects (found by Peter Vaskovic). 4732817466cbSJens Wiklander * ssl_read() could return non-application data records on server while 4733817466cbSJens Wiklander renegotation was pending, and on client when a HelloRequest was received. 4734817466cbSJens Wiklander * Server-initiated renegotiation would fail with non-blocking I/O if the 4735817466cbSJens Wiklander write callback returned WANT_WRITE when requesting renegotiation. 4736817466cbSJens Wiklander * ssl_close_notify() could send more than one message in some circumstances 4737817466cbSJens Wiklander with non-blocking I/O. 4738817466cbSJens Wiklander * Fix compiler warnings on iOS (found by Sander Niemeijer). 4739817466cbSJens Wiklander * x509_crt_parse() did not increase total_failed on PEM error 4740817466cbSJens Wiklander * Fix compile error with armcc in mpi_is_prime() 4741817466cbSJens Wiklander * Fix potential bad read in parsing ServerHello (found by Adrien 4742817466cbSJens Wiklander Vialletelle). 4743817466cbSJens Wiklander 4744817466cbSJens WiklanderChanges 4745817466cbSJens Wiklander * Ciphersuites using SHA-256 or SHA-384 now require TLS 1.x (there is no 4746817466cbSJens Wiklander standard defining how to use SHA-2 with SSL 3.0). 4747817466cbSJens Wiklander * Ciphersuites using RSA-PSK key exchange new require TLS 1.x (the spec is 4748817466cbSJens Wiklander ambiguous on how to encode some packets with SSL 3.0). 4749817466cbSJens Wiklander * Made buffer size in pk_write_(pub)key_pem() more dynamic, eg smaller if 4750817466cbSJens Wiklander RSA is disabled, larger if POLARSSL_MPI_MAX_SIZE is larger. 4751817466cbSJens Wiklander * ssl_read() now returns POLARSSL_ERR_NET_WANT_READ rather than 4752817466cbSJens Wiklander POLARSSL_ERR_SSL_UNEXPECTED_MESSAGE on harmless alerts. 4753817466cbSJens Wiklander * POLARSSL_MPI_MAX_SIZE now defaults to 1024 in order to allow 8192 bits 4754817466cbSJens Wiklander RSA keys. 4755817466cbSJens Wiklander * Accept spaces at end of line or end of buffer in base64_decode(). 4756817466cbSJens Wiklander * X.509 certificates with more than one AttributeTypeAndValue per 4757817466cbSJens Wiklander RelativeDistinguishedName are not accepted any more. 4758817466cbSJens Wiklander 4759817466cbSJens Wiklander= PolarSSL 1.3.8 released 2014-07-11 4760817466cbSJens WiklanderSecurity 4761817466cbSJens Wiklander * Fix length checking for AEAD ciphersuites (found by Codenomicon). 4762817466cbSJens Wiklander It was possible to crash the server (and client) using crafted messages 4763817466cbSJens Wiklander when a GCM suite was chosen. 4764817466cbSJens Wiklander 4765817466cbSJens WiklanderFeatures 4766817466cbSJens Wiklander * Add CCM module and cipher mode to Cipher Layer 4767817466cbSJens Wiklander * Support for CCM and CCM_8 ciphersuites 4768817466cbSJens Wiklander * Support for parsing and verifying RSASSA-PSS signatures in the X.509 4769817466cbSJens Wiklander modules (certificates, CRLs and CSRs). 4770817466cbSJens Wiklander * Blowfish in the cipher layer now supports variable length keys. 4771817466cbSJens Wiklander * Add example config.h for PSK with CCM, optimized for low RAM usage. 4772817466cbSJens Wiklander * Optimize for RAM usage in example config.h for NSA Suite B profile. 4773817466cbSJens Wiklander * Add POLARSSL_REMOVE_ARC4_CIPHERSUITES to allow removing RC4 ciphersuites 4774817466cbSJens Wiklander from the default list (inactive by default). 4775817466cbSJens Wiklander * Add server-side enforcement of sent renegotiation requests 4776817466cbSJens Wiklander (ssl_set_renegotiation_enforced()) 4777817466cbSJens Wiklander * Add SSL_CIPHERSUITES config.h flag to allow specifying a list of 4778817466cbSJens Wiklander ciphersuites to use and save some memory if the list is small. 4779817466cbSJens Wiklander 4780817466cbSJens WiklanderChanges 4781817466cbSJens Wiklander * Add LINK_WITH_PTHREAD option in CMake for explicit linking that is 4782817466cbSJens Wiklander required on some platforms (e.g. OpenBSD) 4783817466cbSJens Wiklander * Migrate zeroizing of data to polarssl_zeroize() instead of memset() 4784817466cbSJens Wiklander against unwanted compiler optimizations 4785817466cbSJens Wiklander * md_list() now returns hashes strongest first 4786817466cbSJens Wiklander * Selection of hash for signing ServerKeyExchange in TLS 1.2 now picks 4787817466cbSJens Wiklander strongest offered by client. 4788817466cbSJens Wiklander * All public contexts have _init() and _free() functions now for simpler 4789817466cbSJens Wiklander usage pattern 4790817466cbSJens Wiklander 4791817466cbSJens WiklanderBugfix 4792817466cbSJens Wiklander * Fix in debug_print_msg() 4793817466cbSJens Wiklander * Enforce alignment in the buffer allocator even if buffer is not aligned 4794817466cbSJens Wiklander * Remove less-than-zero checks on unsigned numbers 4795817466cbSJens Wiklander * Stricter check on SSL ClientHello internal sizes compared to actual packet 4796817466cbSJens Wiklander size (found by TrustInSoft) 4797817466cbSJens Wiklander * Fix WSAStartup() return value check (found by Peter Vaskovic) 4798817466cbSJens Wiklander * Other minor issues (found by Peter Vaskovic) 4799817466cbSJens Wiklander * Fix symlink command for cross compiling with CMake (found by Andre 4800817466cbSJens Wiklander Heinecke) 4801817466cbSJens Wiklander * Fix DER output of gen_key app (found by Gergely Budai) 4802817466cbSJens Wiklander * Very small records were incorrectly rejected when truncated HMAC was in 4803817466cbSJens Wiklander use with some ciphersuites and versions (RC4 in all versions, CBC with 4804817466cbSJens Wiklander versions < TLS 1.1). 4805817466cbSJens Wiklander * Very large records using more than 224 bytes of padding were incorrectly 4806817466cbSJens Wiklander rejected with CBC-based ciphersuites and TLS >= 1.1 4807817466cbSJens Wiklander * Very large records using less padding could cause a buffer overread of up 4808817466cbSJens Wiklander to 32 bytes with CBC-based ciphersuites and TLS >= 1.1 4809817466cbSJens Wiklander * Restore ability to use a v1 cert as a CA if trusted locally. (This had 4810817466cbSJens Wiklander been removed in 1.3.6.) 4811817466cbSJens Wiklander * Restore ability to locally trust a self-signed cert that is not a proper 4812817466cbSJens Wiklander CA for use as an end entity certificate. (This had been removed in 4813817466cbSJens Wiklander 1.3.6.) 4814817466cbSJens Wiklander * Fix preprocessor checks for bn_mul PPC asm (found by Barry K. Nathan). 4815817466cbSJens Wiklander * Use \n\t rather than semicolons for bn_mul asm, since some assemblers 4816817466cbSJens Wiklander interpret semicolons as comment delimiters (found by Barry K. Nathan). 4817817466cbSJens Wiklander * Fix off-by-one error in parsing Supported Point Format extension that 4818817466cbSJens Wiklander caused some handshakes to fail. 4819817466cbSJens Wiklander * Fix possible miscomputation of the premaster secret with DHE-PSK key 4820817466cbSJens Wiklander exchange that caused some handshakes to fail with other implementations. 4821817466cbSJens Wiklander (Failure rate <= 1/255 with common DHM moduli.) 4822817466cbSJens Wiklander * Disable broken Sparc64 bn_mul assembly (found by Florian Obser). 4823817466cbSJens Wiklander * Fix base64_decode() to return and check length correctly (in case of 4824817466cbSJens Wiklander tight buffers) 4825817466cbSJens Wiklander * Fix mpi_write_string() to write "00" as hex output for empty MPI (found 4826817466cbSJens Wiklander by Hui Dong) 4827817466cbSJens Wiklander 4828817466cbSJens Wiklander= PolarSSL 1.3.7 released on 2014-05-02 4829817466cbSJens WiklanderFeatures 4830817466cbSJens Wiklander * debug_set_log_mode() added to determine raw or full logging 4831817466cbSJens Wiklander * debug_set_threshold() added to ignore messages over threshold level 4832817466cbSJens Wiklander * version_check_feature() added to check for compile-time options at 4833817466cbSJens Wiklander run-time 4834817466cbSJens Wiklander 4835817466cbSJens WiklanderChanges 4836817466cbSJens Wiklander * POLARSSL_CONFIG_OPTIONS has been removed. All values are individually 4837817466cbSJens Wiklander checked and filled in the relevant module headers 4838817466cbSJens Wiklander * Debug module only outputs full lines instead of parts 4839817466cbSJens Wiklander * Better support for the different Attribute Types from IETF PKIX (RFC 5280) 4840817466cbSJens Wiklander * AES-NI now compiles with "old" assemblers too 4841817466cbSJens Wiklander * Ciphersuites based on RC4 now have the lowest priority by default 4842817466cbSJens Wiklander 4843817466cbSJens WiklanderBugfix 4844817466cbSJens Wiklander * Only iterate over actual certificates in ssl_write_certificate_request() 4845817466cbSJens Wiklander (found by Matthew Page) 4846817466cbSJens Wiklander * Typos in platform.c and pkcs11.c (found by Daniel Phillips and Steffan 4847817466cbSJens Wiklander Karger) 4848817466cbSJens Wiklander * cert_write app should use subject of issuer certificate as issuer of cert 4849817466cbSJens Wiklander * Fix false reject in padding check in ssl_decrypt_buf() for CBC 4850817466cbSJens Wiklander ciphersuites, for full SSL frames of data. 4851817466cbSJens Wiklander * Improve interoperability by not writing extension length in ClientHello / 4852817466cbSJens Wiklander ServerHello when no extensions are present (found by Matthew Page) 4853817466cbSJens Wiklander * rsa_check_pubkey() now allows an E up to N 4854817466cbSJens Wiklander * On OpenBSD, use arc4random_buf() instead of rand() to prevent warnings 4855817466cbSJens Wiklander * mpi_fill_random() was creating numbers larger than requested on 4856817466cbSJens Wiklander big-endian platform when size was not an integer number of limbs 4857817466cbSJens Wiklander * Fix dependencies issues in X.509 test suite. 4858817466cbSJens Wiklander * Some parts of ssl_tls.c were compiled even when the module was disabled. 4859817466cbSJens Wiklander * Fix detection of DragonflyBSD in net.c (found by Markus Pfeiffer) 4860817466cbSJens Wiklander * Fix detection of Clang on some Apple platforms with CMake 4861817466cbSJens Wiklander (found by Barry K. Nathan) 4862817466cbSJens Wiklander 4863817466cbSJens Wiklander= PolarSSL 1.3.6 released on 2014-04-11 4864817466cbSJens Wiklander 4865817466cbSJens WiklanderFeatures 4866817466cbSJens Wiklander * Support for the ALPN SSL extension 4867817466cbSJens Wiklander * Add option 'use_dev_random' to gen_key application 4868817466cbSJens Wiklander * Enable verification of the keyUsage extension for CA and leaf 4869817466cbSJens Wiklander certificates (POLARSSL_X509_CHECK_KEY_USAGE) 4870817466cbSJens Wiklander * Enable verification of the extendedKeyUsage extension 4871817466cbSJens Wiklander (POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE) 4872817466cbSJens Wiklander 4873817466cbSJens WiklanderChanges 4874817466cbSJens Wiklander * x509_crt_info() now prints information about parsed extensions as well 4875817466cbSJens Wiklander * pk_verify() now returns a specific error code when the signature is valid 4876817466cbSJens Wiklander but shorter than the supplied length. 4877817466cbSJens Wiklander * Use UTC time to check certificate validity. 4878817466cbSJens Wiklander * Reject certificates with times not in UTC, per RFC 5280. 4879817466cbSJens Wiklander 4880817466cbSJens WiklanderSecurity 4881817466cbSJens Wiklander * Avoid potential timing leak in ecdsa_sign() by blinding modular division. 4882817466cbSJens Wiklander (Found by Watson Ladd.) 4883817466cbSJens Wiklander * The notAfter date of some certificates was no longer checked since 1.3.5. 4884817466cbSJens Wiklander This affects certificates in the user-supplied chain except the top 4885817466cbSJens Wiklander certificate. If the user-supplied chain contains only one certificates, 4886817466cbSJens Wiklander it is not affected (ie, its notAfter date is properly checked). 4887817466cbSJens Wiklander * Prevent potential NULL pointer dereference in ssl_read_record() (found by 4888817466cbSJens Wiklander TrustInSoft) 4889817466cbSJens Wiklander 4890817466cbSJens WiklanderBugfix 4891817466cbSJens Wiklander * The length of various ClientKeyExchange messages was not properly checked. 4892817466cbSJens Wiklander * Some example server programs were not sending the close_notify alert. 4893817466cbSJens Wiklander * Potential memory leak in mpi_exp_mod() when error occurs during 4894817466cbSJens Wiklander calculation of RR. 4895817466cbSJens Wiklander * Fixed malloc/free default #define in platform.c (found by Gergely Budai). 4896817466cbSJens Wiklander * Fixed type which made POLARSSL_ENTROPY_FORCE_SHA256 uneffective (found by 4897817466cbSJens Wiklander Gergely Budai). 4898817466cbSJens Wiklander * Fix #include path in ecdsa.h which wasn't accepted by some compilers. 4899817466cbSJens Wiklander (found by Gergely Budai) 4900817466cbSJens Wiklander * Fix compile errors when POLARSSL_ERROR_STRERROR_BC is undefined (found by 4901817466cbSJens Wiklander Shuo Chen). 4902817466cbSJens Wiklander * oid_get_numeric_string() used to truncate the output without returning an 4903817466cbSJens Wiklander error if the output buffer was just 1 byte too small. 4904817466cbSJens Wiklander * dhm_parse_dhm() (hence dhm_parse_dhmfile()) did not set dhm->len. 4905817466cbSJens Wiklander * Calling pk_debug() on an RSA-alt key would segfault. 4906817466cbSJens Wiklander * pk_get_size() and pk_get_len() were off by a factor 8 for RSA-alt keys. 4907817466cbSJens Wiklander * Potential buffer overwrite in pem_write_buffer() because of low length 4908817466cbSJens Wiklander indication (found by Thijs Alkemade) 4909817466cbSJens Wiklander * EC curves constants, which should be only in ROM since 1.3.3, were also 4910817466cbSJens Wiklander stored in RAM due to missing 'const's (found by Gergely Budai). 4911817466cbSJens Wiklander 4912817466cbSJens Wiklander= PolarSSL 1.3.5 released on 2014-03-26 4913817466cbSJens WiklanderFeatures 4914817466cbSJens Wiklander * HMAC-DRBG as a separate module 4915817466cbSJens Wiklander * Option to set the Curve preference order (disabled by default) 4916817466cbSJens Wiklander * Single Platform compatilibity layer (for memory / printf / fprintf) 4917817466cbSJens Wiklander * Ability to provide alternate timing implementation 4918817466cbSJens Wiklander * Ability to force the entropy module to use SHA-256 as its basis 4919817466cbSJens Wiklander (POLARSSL_ENTROPY_FORCE_SHA256) 4920817466cbSJens Wiklander * Testing script ssl-opt.sh added for testing 'live' ssl option 4921817466cbSJens Wiklander interoperability against OpenSSL and PolarSSL 4922817466cbSJens Wiklander * Support for reading EC keys that use SpecifiedECDomain in some cases. 4923817466cbSJens Wiklander * Entropy module now supports seed writing and reading 4924817466cbSJens Wiklander 4925817466cbSJens WiklanderChanges 4926817466cbSJens Wiklander * Deprecated the Memory layer 4927817466cbSJens Wiklander * entropy_add_source(), entropy_update_manual() and entropy_gather() 4928817466cbSJens Wiklander now thread-safe if POLARSSL_THREADING_C defined 4929817466cbSJens Wiklander * Improvements to the CMake build system, contributed by Julian Ospald. 4930817466cbSJens Wiklander * Work around a bug of the version of Clang shipped by Apple with Mavericks 4931817466cbSJens Wiklander that prevented bignum.c from compiling. (Reported by Rafael Baptista.) 4932817466cbSJens Wiklander * Revamped the compat.sh interoperatibility script to include support for 4933817466cbSJens Wiklander testing against GnuTLS 4934817466cbSJens Wiklander * Deprecated ssl_set_own_cert_rsa() and ssl_set_own_cert_rsa_alt() 4935817466cbSJens Wiklander * Improvements to tests/Makefile, contributed by Oden Eriksson. 4936817466cbSJens Wiklander 4937817466cbSJens WiklanderSecurity 4938817466cbSJens Wiklander * Forbid change of server certificate during renegotiation to prevent 4939817466cbSJens Wiklander "triple handshake" attack when authentication mode is 'optional' (the 4940817466cbSJens Wiklander attack was already impossible when authentication is required). 4941817466cbSJens Wiklander * Check notBefore timestamp of certificates and CRLs from the future. 4942817466cbSJens Wiklander * Forbid sequence number wrapping 4943817466cbSJens Wiklander * Fixed possible buffer overflow with overlong PSK 4944817466cbSJens Wiklander * Possible remotely-triggered out-of-bounds memory access fixed (found by 4945817466cbSJens Wiklander TrustInSoft) 4946817466cbSJens Wiklander 4947817466cbSJens WiklanderBugfix 4948817466cbSJens Wiklander * ecp_gen_keypair() does more tries to prevent failure because of 4949817466cbSJens Wiklander statistics 4950817466cbSJens Wiklander * Fixed bug in RSA PKCS#1 v1.5 "reversed" operations 4951817466cbSJens Wiklander * Fixed testing with out-of-source builds using cmake 4952817466cbSJens Wiklander * Fixed version-major intolerance in server 4953817466cbSJens Wiklander * Fixed CMake symlinking on out-of-source builds 4954817466cbSJens Wiklander * Fixed dependency issues in test suite 4955817466cbSJens Wiklander * Programs rsa_sign_pss and rsa_verify_pss were not using PSS since 1.3.0 4956817466cbSJens Wiklander * Bignum's MIPS-32 assembly was used on MIPS-64, causing chaos. (Found by 4957817466cbSJens Wiklander Alex Wilson.) 4958817466cbSJens Wiklander * ssl_cache was creating entries when max_entries=0 if TIMING_C was enabled. 4959817466cbSJens Wiklander * m_sleep() was sleeping twice too long on most Unix platforms. 4960817466cbSJens Wiklander * Fixed bug with session tickets and non-blocking I/O in the unlikely case 4961817466cbSJens Wiklander send() would return an EAGAIN error when sending the ticket. 4962817466cbSJens Wiklander * ssl_cache was leaking memory when reusing a timed out entry containing a 4963817466cbSJens Wiklander client certificate. 4964817466cbSJens Wiklander * ssl_srv was leaking memory when client presented a timed out ticket 4965817466cbSJens Wiklander containing a client certificate 4966817466cbSJens Wiklander * ssl_init() was leaving a dirty pointer in ssl_context if malloc of 4967817466cbSJens Wiklander out_ctr failed 4968817466cbSJens Wiklander * ssl_handshake_init() was leaving dirty pointers in subcontexts if malloc 4969817466cbSJens Wiklander of one of them failed 4970817466cbSJens Wiklander * Fix typo in rsa_copy() that impacted PKCS#1 v2 contexts 4971817466cbSJens Wiklander * x509_get_current_time() uses localtime_r() to prevent thread issues 4972817466cbSJens Wiklander 4973817466cbSJens Wiklander= PolarSSL 1.3.4 released on 2014-01-27 4974817466cbSJens WiklanderFeatures 4975817466cbSJens Wiklander * Support for the Koblitz curves: secp192k1, secp224k1, secp256k1 4976817466cbSJens Wiklander * Support for RIPEMD-160 4977817466cbSJens Wiklander * Support for AES CFB8 mode 4978817466cbSJens Wiklander * Support for deterministic ECDSA (RFC 6979) 4979817466cbSJens Wiklander 4980817466cbSJens WiklanderBugfix 4981817466cbSJens Wiklander * Potential memory leak in bignum_selftest() 4982817466cbSJens Wiklander * Replaced expired test certificate 4983817466cbSJens Wiklander * ssl_mail_client now terminates lines with CRLF, instead of LF 4984817466cbSJens Wiklander * net module handles timeouts on blocking sockets better (found by Tilman 4985817466cbSJens Wiklander Sauerbeck) 4986817466cbSJens Wiklander * Assembly format fixes in bn_mul.h 4987817466cbSJens Wiklander 4988817466cbSJens WiklanderSecurity 4989817466cbSJens Wiklander * Missing MPI_CHK calls added around unguarded mpi calls (found by 4990817466cbSJens Wiklander TrustInSoft) 4991817466cbSJens Wiklander 4992817466cbSJens Wiklander= PolarSSL 1.3.3 released on 2013-12-31 4993817466cbSJens WiklanderFeatures 4994817466cbSJens Wiklander * EC key generation support in gen_key app 4995817466cbSJens Wiklander * Support for adhering to client ciphersuite order preference 4996817466cbSJens Wiklander (POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE) 4997817466cbSJens Wiklander * Support for Curve25519 4998817466cbSJens Wiklander * Support for ECDH-RSA and ECDH-ECDSA key exchanges and ciphersuites 4999817466cbSJens Wiklander * Support for IPv6 in the NET module 5000817466cbSJens Wiklander * AES-NI support for AES, AES-GCM and AES key scheduling 5001817466cbSJens Wiklander * SSL Pthread-based server example added (ssl_pthread_server) 5002817466cbSJens Wiklander 5003817466cbSJens WiklanderChanges 5004817466cbSJens Wiklander * gen_prime() speedup 5005817466cbSJens Wiklander * Speedup of ECP multiplication operation 5006817466cbSJens Wiklander * Relaxed some SHA2 ciphersuite's version requirements 5007817466cbSJens Wiklander * Dropped use of readdir_r() instead of readdir() with threading support 5008817466cbSJens Wiklander * More constant-time checks in the RSA module 5009817466cbSJens Wiklander * Split off curves from ecp.c into ecp_curves.c 5010817466cbSJens Wiklander * Curves are now stored fully in ROM 5011817466cbSJens Wiklander * Memory usage optimizations in ECP module 5012817466cbSJens Wiklander * Removed POLARSSL_THREADING_DUMMY 5013817466cbSJens Wiklander 5014817466cbSJens WiklanderBugfix 5015817466cbSJens Wiklander * Fixed bug in mpi_set_bit() on platforms where t_uint is wider than int 5016817466cbSJens Wiklander * Fixed X.509 hostname comparison (with non-regular characters) 5017817466cbSJens Wiklander * SSL now gracefully handles missing RNG 5018817466cbSJens Wiklander * Missing defines / cases for RSA_PSK key exchange 5019817466cbSJens Wiklander * crypt_and_hash app checks MAC before final decryption 5020817466cbSJens Wiklander * Potential memory leak in ssl_ticket_keys_init() 5021817466cbSJens Wiklander * Memory leak in benchmark application 5022817466cbSJens Wiklander * Fixed x509_crt_parse_path() bug on Windows platforms 5023817466cbSJens Wiklander * Added missing MPI_CHK() around some statements in mpi_div_mpi() (found by 5024817466cbSJens Wiklander TrustInSoft) 5025817466cbSJens Wiklander * Fixed potential overflow in certificate size verification in 5026817466cbSJens Wiklander ssl_write_certificate() (found by TrustInSoft) 5027817466cbSJens Wiklander 5028817466cbSJens WiklanderSecurity 5029817466cbSJens Wiklander * Possible remotely-triggered out-of-bounds memory access fixed (found by 5030817466cbSJens Wiklander TrustInSoft) 5031817466cbSJens Wiklander 5032817466cbSJens Wiklander= PolarSSL 1.3.2 released on 2013-11-04 5033817466cbSJens WiklanderFeatures 5034817466cbSJens Wiklander * PK tests added to test framework 5035817466cbSJens Wiklander * Added optional optimization for NIST MODP curves (POLARSSL_ECP_NIST_OPTIM) 5036817466cbSJens Wiklander * Support for Camellia-GCM mode and ciphersuites 5037817466cbSJens Wiklander 5038817466cbSJens WiklanderChanges 5039817466cbSJens Wiklander * Padding checks in cipher layer are now constant-time 5040817466cbSJens Wiklander * Value comparisons in SSL layer are now constant-time 5041817466cbSJens Wiklander * Support for serialNumber, postalAddress and postalCode in X509 names 5042817466cbSJens Wiklander * SSL Renegotiation was refactored 5043817466cbSJens Wiklander 5044817466cbSJens WiklanderBugfix 5045817466cbSJens Wiklander * More stringent checks in cipher layer 5046817466cbSJens Wiklander * Server does not send out extensions not advertised by client 5047817466cbSJens Wiklander * Prevent possible alignment warnings on casting from char * to 'aligned *' 5048817466cbSJens Wiklander * Misc fixes and additions to dependency checks 5049817466cbSJens Wiklander * Const correctness 5050817466cbSJens Wiklander * cert_write with selfsign should use issuer_name as subject_name 5051817466cbSJens Wiklander * Fix ECDSA corner case: missing reduction mod N (found by DualTachyon) 5052817466cbSJens Wiklander * Defines to handle UEFI environment under MSVC 5053817466cbSJens Wiklander * Server-side initiated renegotiations send HelloRequest 5054817466cbSJens Wiklander 5055817466cbSJens Wiklander= PolarSSL 1.3.1 released on 2013-10-15 5056817466cbSJens WiklanderFeatures 5057817466cbSJens Wiklander * Support for Brainpool curves and TLS ciphersuites (RFC 7027) 5058817466cbSJens Wiklander * Support for ECDHE-PSK key-exchange and ciphersuites 5059817466cbSJens Wiklander * Support for RSA-PSK key-exchange and ciphersuites 5060817466cbSJens Wiklander 5061817466cbSJens WiklanderChanges 5062817466cbSJens Wiklander * RSA blinding locks for a smaller amount of time 5063817466cbSJens Wiklander * TLS compression only allocates working buffer once 5064817466cbSJens Wiklander * Introduced POLARSSL_HAVE_READDIR_R for systems without it 5065817466cbSJens Wiklander * config.h is more script-friendly 5066817466cbSJens Wiklander 5067817466cbSJens WiklanderBugfix 5068817466cbSJens Wiklander * Missing MSVC defines added 5069817466cbSJens Wiklander * Compile errors with POLARSSL_RSA_NO_CRT 5070817466cbSJens Wiklander * Header files with 'polarssl/' 5071817466cbSJens Wiklander * Const correctness 5072817466cbSJens Wiklander * Possible naming collision in dhm_context 5073817466cbSJens Wiklander * Better support for MSVC 5074817466cbSJens Wiklander * threading_set_alt() name 5075817466cbSJens Wiklander * Added missing x509write_crt_set_version() 5076817466cbSJens Wiklander 5077817466cbSJens Wiklander= PolarSSL 1.3.0 released on 2013-10-01 5078817466cbSJens WiklanderFeatures 5079817466cbSJens Wiklander * Elliptic Curve Cryptography module added 5080817466cbSJens Wiklander * Elliptic Curve Diffie Hellman module added 5081817466cbSJens Wiklander * Ephemeral Elliptic Curve Diffie Hellman support for SSL/TLS 5082817466cbSJens Wiklander (ECDHE-based ciphersuites) 5083817466cbSJens Wiklander * Ephemeral Elliptic Curve Digital Signature Algorithm support for SSL/TLS 5084817466cbSJens Wiklander (ECDSA-based ciphersuites) 5085817466cbSJens Wiklander * Ability to specify allowed ciphersuites based on the protocol version. 5086817466cbSJens Wiklander * PSK and DHE-PSK based ciphersuites added 5087817466cbSJens Wiklander * Memory allocation abstraction layer added 5088817466cbSJens Wiklander * Buffer-based memory allocator added (no malloc() / free() / HEAP usage) 5089817466cbSJens Wiklander * Threading abstraction layer added (dummy / pthread / alternate) 5090817466cbSJens Wiklander * Public Key abstraction layer added 5091817466cbSJens Wiklander * Parsing Elliptic Curve keys 5092817466cbSJens Wiklander * Parsing Elliptic Curve certificates 5093817466cbSJens Wiklander * Support for max_fragment_length extension (RFC 6066) 5094817466cbSJens Wiklander * Support for truncated_hmac extension (RFC 6066) 5095817466cbSJens Wiklander * Support for zeros-and-length (ANSI X.923) padding, one-and-zeros 5096817466cbSJens Wiklander (ISO/IEC 7816-4) padding and zero padding in the cipher layer 5097817466cbSJens Wiklander * Support for session tickets (RFC 5077) 5098817466cbSJens Wiklander * Certificate Request (CSR) generation with extensions (key_usage, 5099817466cbSJens Wiklander ns_cert_type) 5100817466cbSJens Wiklander * X509 Certificate writing with extensions (basic_constraints, 5101817466cbSJens Wiklander issuer_key_identifier, etc) 5102817466cbSJens Wiklander * Optional blinding for RSA, DHM and EC 5103817466cbSJens Wiklander * Support for multiple active certificate / key pairs in SSL servers for 5104817466cbSJens Wiklander the same host (Not to be confused with SNI!) 5105817466cbSJens Wiklander 5106817466cbSJens WiklanderChanges 5107817466cbSJens Wiklander * Ability to enable / disable SSL v3 / TLS 1.0 / TLS 1.1 / TLS 1.2 5108817466cbSJens Wiklander individually 5109817466cbSJens Wiklander * Introduced separate SSL Ciphersuites module that is based on 5110817466cbSJens Wiklander Cipher and MD information 5111817466cbSJens Wiklander * Internals for SSL module adapted to have separate IV pointer that is 5112817466cbSJens Wiklander dynamically set (Better support for hardware acceleration) 5113817466cbSJens Wiklander * Moved all OID functionality to a separate module. RSA function 5114817466cbSJens Wiklander prototypes for the RSA sign and verify functions changed as a result 5115817466cbSJens Wiklander * Split up the GCM module into a starts/update/finish cycle 5116817466cbSJens Wiklander * Client and server now filter sent and accepted ciphersuites on minimum 5117817466cbSJens Wiklander and maximum protocol version 5118817466cbSJens Wiklander * Ability to disable server_name extension (RFC 6066) 5119817466cbSJens Wiklander * Renamed error_strerror() to the less conflicting polarssl_strerror() 5120817466cbSJens Wiklander (Ability to keep old as well with POLARSSL_ERROR_STRERROR_BC) 5121817466cbSJens Wiklander * SHA2 renamed to SHA256, SHA4 renamed to SHA512 and functions accordingly 5122817466cbSJens Wiklander * All RSA operations require a random generator for blinding purposes 5123817466cbSJens Wiklander * X509 core refactored 5124817466cbSJens Wiklander * x509_crt_verify() now case insensitive for cn (RFC 6125 6.4) 5125817466cbSJens Wiklander * Also compiles / runs without time-based functions (!POLARSSL_HAVE_TIME) 5126817466cbSJens Wiklander * Support faulty X509 v1 certificates with extensions 5127817466cbSJens Wiklander (POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3) 5128817466cbSJens Wiklander 5129817466cbSJens WiklanderBugfix 5130817466cbSJens Wiklander * Fixed parse error in ssl_parse_certificate_request() 5131817466cbSJens Wiklander * zlib compression/decompression skipped on empty blocks 5132817466cbSJens Wiklander * Support for AIX header locations in net.c module 5133817466cbSJens Wiklander * Fixed file descriptor leaks 5134817466cbSJens Wiklander 5135817466cbSJens WiklanderSecurity 5136817466cbSJens Wiklander * RSA blinding on CRT operations to counter timing attacks 5137817466cbSJens Wiklander (found by Cyril Arnaud and Pierre-Alain Fouque) 5138817466cbSJens Wiklander 5139817466cbSJens Wiklander 5140817466cbSJens Wiklander= Version 1.2.14 released 2015-05-?? 5141817466cbSJens Wiklander 5142817466cbSJens WiklanderSecurity 5143817466cbSJens Wiklander * Fix potential invalid memory read in the server, that allows a client to 5144817466cbSJens Wiklander crash it remotely (found by Caj Larsson). 5145817466cbSJens Wiklander * Fix potential invalid memory read in certificate parsing, that allows a 5146817466cbSJens Wiklander client to crash the server remotely if client authentication is enabled 5147817466cbSJens Wiklander (found using Codenomicon Defensics). 5148817466cbSJens Wiklander * Add countermeasure against "Lucky 13 strikes back" cache-based attack, 5149817466cbSJens Wiklander https://dl.acm.org/citation.cfm?id=2714625 5150817466cbSJens Wiklander 5151817466cbSJens WiklanderBugfix 5152817466cbSJens Wiklander * Fix bug in Via Padlock support (found by Nikos Mavrogiannopoulos). 5153817466cbSJens Wiklander * Fix hardclock() (only used in the benchmarking program) with some 5154817466cbSJens Wiklander versions of mingw64 (found by kxjhlele). 5155817466cbSJens Wiklander * Fix warnings from mingw64 in timing.c (found by kxjklele). 5156817466cbSJens Wiklander * Fix potential unintended sign extension in asn1_get_len() on 64-bit 5157817466cbSJens Wiklander platforms (found with Coverity Scan). 5158817466cbSJens Wiklander 5159817466cbSJens Wiklander= Version 1.2.13 released 2015-02-16 5160817466cbSJens WiklanderNote: Although PolarSSL has been renamed to mbed TLS, no changes reflecting 5161817466cbSJens Wiklander this will be made in the 1.2 branch at this point. 5162817466cbSJens Wiklander 5163817466cbSJens WiklanderSecurity 5164817466cbSJens Wiklander * Fix remotely-triggerable uninitialised pointer dereference caused by 5165817466cbSJens Wiklander crafted X.509 certificate (TLS server is not affected if it doesn't ask 5166817466cbSJens Wiklander for a client certificate) (found using Codenomicon Defensics). 5167817466cbSJens Wiklander * Fix remotely-triggerable memory leak caused by crafted X.509 certificates 5168817466cbSJens Wiklander (TLS server is not affected if it doesn't ask for a client certificate) 5169817466cbSJens Wiklander (found using Codenomicon Defensics). 5170817466cbSJens Wiklander * Fix potential stack overflow while parsing crafted X.509 certificates 5171817466cbSJens Wiklander (TLS server is not affected if it doesn't ask for a client certificate) 5172817466cbSJens Wiklander found using Codenomicon Defensics). 5173817466cbSJens Wiklander * Fix buffer overread of size 1 when parsing crafted X.509 certificates 5174817466cbSJens Wiklander (TLS server is not affected if it doesn't ask for a client certificate). 5175817466cbSJens Wiklander 5176817466cbSJens WiklanderBugfix 5177817466cbSJens Wiklander * Fix potential undefined behaviour in Camellia. 5178817466cbSJens Wiklander * Fix memory leaks in PKCS#5 and PKCS#12. 5179817466cbSJens Wiklander * Stack buffer overflow if ctr_drbg_update() is called with too large 5180817466cbSJens Wiklander add_len (found by Jean-Philippe Aumasson) (not triggerable remotely). 5181817466cbSJens Wiklander * Fix bug in MPI/bignum on s390/s390x (reported by Dan Horák) (introduced 5182817466cbSJens Wiklander in 1.2.12). 5183817466cbSJens Wiklander * Fix unchecked return code in x509_crt_parse_path() on Windows (found by 5184817466cbSJens Wiklander Peter Vaskovic). 5185817466cbSJens Wiklander * Fix assembly selection for MIPS64 (thanks to James Cowgill). 5186817466cbSJens Wiklander * ssl_get_verify_result() now works even if the handshake was aborted due 5187817466cbSJens Wiklander to a failed verification (found by Fredrik Axelsson). 5188817466cbSJens Wiklander * Skip writing and parsing signature_algorithm extension if none of the 5189817466cbSJens Wiklander key exchanges enabled needs certificates. This fixes a possible interop 5190817466cbSJens Wiklander issue with some servers when a zero-length extension was sent. (Reported 5191817466cbSJens Wiklander by Peter Dettman.) 5192817466cbSJens Wiklander * On a 0-length input, base64_encode() did not correctly set output length 5193817466cbSJens Wiklander (found by Hendrik van den Boogaard). 5194817466cbSJens Wiklander 5195817466cbSJens WiklanderChanges 5196817466cbSJens Wiklander * Blind RSA private operations even when POLARSSL_RSA_NO_CRT is defined. 5197817466cbSJens Wiklander * Forbid repeated extensions in X.509 certificates. 5198817466cbSJens Wiklander * Add compile-time option POLARSSL_X509_MAX_INTERMEDIATE_CA to limit the 5199817466cbSJens Wiklander length of an X.509 verification chain (default = 8). 5200817466cbSJens Wiklander= Version 1.2.12 released 2014-10-24 5201817466cbSJens Wiklander 5202817466cbSJens WiklanderSecurity 5203817466cbSJens Wiklander * Remotely-triggerable memory leak when parsing some X.509 certificates 5204817466cbSJens Wiklander (server is not affected if it doesn't ask for a client certificate). 5205817466cbSJens Wiklander (Found using Codenomicon Defensics.) 5206817466cbSJens Wiklander 5207817466cbSJens WiklanderBugfix 5208817466cbSJens Wiklander * Fix potential bad read in parsing ServerHello (found by Adrien 5209817466cbSJens Wiklander Vialletelle). 5210817466cbSJens Wiklander * ssl_close_notify() could send more than one message in some circumstances 5211817466cbSJens Wiklander with non-blocking I/O. 5212817466cbSJens Wiklander * x509_crt_parse() did not increase total_failed on PEM error 5213817466cbSJens Wiklander * Fix compiler warnings on iOS (found by Sander Niemeijer). 5214817466cbSJens Wiklander * Don't print uninitialised buffer in ssl_mail_client (found by Marc Abel). 5215817466cbSJens Wiklander * Fix net_accept() regarding non-blocking sockets (found by Luca Pesce). 5216817466cbSJens Wiklander * ssl_read() could return non-application data records on server while 5217817466cbSJens Wiklander renegotation was pending, and on client when a HelloRequest was received. 5218817466cbSJens Wiklander * Fix warnings from Clang's scan-build (contributed by Alfred Klomp). 5219817466cbSJens Wiklander 5220817466cbSJens WiklanderChanges 5221817466cbSJens Wiklander * X.509 certificates with more than one AttributeTypeAndValue per 5222817466cbSJens Wiklander RelativeDistinguishedName are not accepted any more. 5223817466cbSJens Wiklander * ssl_read() now returns POLARSSL_ERR_NET_WANT_READ rather than 5224817466cbSJens Wiklander POLARSSL_ERR_SSL_UNEXPECTED_MESSAGE on harmless alerts. 5225817466cbSJens Wiklander * Accept spaces at end of line or end of buffer in base64_decode(). 5226817466cbSJens Wiklander 5227817466cbSJens Wiklander= Version 1.2.11 released 2014-07-11 5228817466cbSJens WiklanderFeatures 5229817466cbSJens Wiklander * Entropy module now supports seed writing and reading 5230817466cbSJens Wiklander 5231817466cbSJens WiklanderChanges 5232817466cbSJens Wiklander * Introduced POLARSSL_HAVE_READDIR_R for systems without it 5233817466cbSJens Wiklander * Improvements to the CMake build system, contributed by Julian Ospald. 5234817466cbSJens Wiklander * Work around a bug of the version of Clang shipped by Apple with Mavericks 5235817466cbSJens Wiklander that prevented bignum.c from compiling. (Reported by Rafael Baptista.) 5236817466cbSJens Wiklander * Improvements to tests/Makefile, contributed by Oden Eriksson. 5237817466cbSJens Wiklander * Use UTC time to check certificate validity. 5238817466cbSJens Wiklander * Reject certificates with times not in UTC, per RFC 5280. 5239817466cbSJens Wiklander * Migrate zeroizing of data to polarssl_zeroize() instead of memset() 5240817466cbSJens Wiklander against unwanted compiler optimizations 5241817466cbSJens Wiklander 5242817466cbSJens WiklanderSecurity 5243817466cbSJens Wiklander * Forbid change of server certificate during renegotiation to prevent 5244817466cbSJens Wiklander "triple handshake" attack when authentication mode is optional (the 5245817466cbSJens Wiklander attack was already impossible when authentication is required). 5246817466cbSJens Wiklander * Check notBefore timestamp of certificates and CRLs from the future. 5247817466cbSJens Wiklander * Forbid sequence number wrapping 5248817466cbSJens Wiklander * Prevent potential NULL pointer dereference in ssl_read_record() (found by 5249817466cbSJens Wiklander TrustInSoft) 5250817466cbSJens Wiklander * Fix length checking for AEAD ciphersuites (found by Codenomicon). 5251817466cbSJens Wiklander It was possible to crash the server (and client) using crafted messages 5252817466cbSJens Wiklander when a GCM suite was chosen. 5253817466cbSJens Wiklander 5254817466cbSJens WiklanderBugfix 5255817466cbSJens Wiklander * Fixed X.509 hostname comparison (with non-regular characters) 5256817466cbSJens Wiklander * SSL now gracefully handles missing RNG 5257817466cbSJens Wiklander * crypt_and_hash app checks MAC before final decryption 5258817466cbSJens Wiklander * Fixed x509_crt_parse_path() bug on Windows platforms 5259817466cbSJens Wiklander * Added missing MPI_CHK() around some statements in mpi_div_mpi() (found by 5260817466cbSJens Wiklander TrustInSoft) 5261817466cbSJens Wiklander * Fixed potential overflow in certificate size verification in 5262817466cbSJens Wiklander ssl_write_certificate() (found by TrustInSoft) 5263817466cbSJens Wiklander * Fix ASM format in bn_mul.h 5264817466cbSJens Wiklander * Potential memory leak in bignum_selftest() 5265817466cbSJens Wiklander * Replaced expired test certificate 5266817466cbSJens Wiklander * ssl_mail_client now terminates lines with CRLF, instead of LF 5267817466cbSJens Wiklander * Fix bug in RSA PKCS#1 v1.5 "reversed" operations 5268817466cbSJens Wiklander * Fixed testing with out-of-source builds using cmake 5269817466cbSJens Wiklander * Fixed version-major intolerance in server 5270817466cbSJens Wiklander * Fixed CMake symlinking on out-of-source builds 5271817466cbSJens Wiklander * Bignum's MIPS-32 assembly was used on MIPS-64, causing chaos. (Found by 5272817466cbSJens Wiklander Alex Wilson.) 5273817466cbSJens Wiklander * ssl_init() was leaving a dirty pointer in ssl_context if malloc of 5274817466cbSJens Wiklander out_ctr failed 5275817466cbSJens Wiklander * ssl_handshake_init() was leaving dirty pointers in subcontexts if malloc 5276817466cbSJens Wiklander of one of them failed 5277817466cbSJens Wiklander * x509_get_current_time() uses localtime_r() to prevent thread issues 5278817466cbSJens Wiklander * Some example server programs were not sending the close_notify alert. 5279817466cbSJens Wiklander * Potential memory leak in mpi_exp_mod() when error occurs during 5280817466cbSJens Wiklander calculation of RR. 5281817466cbSJens Wiklander * Improve interoperability by not writing extension length in ClientHello 5282817466cbSJens Wiklander when no extensions are present (found by Matthew Page) 5283817466cbSJens Wiklander * rsa_check_pubkey() now allows an E up to N 5284817466cbSJens Wiklander * On OpenBSD, use arc4random_buf() instead of rand() to prevent warnings 5285817466cbSJens Wiklander * mpi_fill_random() was creating numbers larger than requested on 5286817466cbSJens Wiklander big-endian platform when size was not an integer number of limbs 5287817466cbSJens Wiklander * Fix detection of DragonflyBSD in net.c (found by Markus Pfeiffer) 5288817466cbSJens Wiklander * Stricter check on SSL ClientHello internal sizes compared to actual packet 5289817466cbSJens Wiklander size (found by TrustInSoft) 5290817466cbSJens Wiklander * Fix preprocessor checks for bn_mul PPC asm (found by Barry K. Nathan). 5291817466cbSJens Wiklander * Use \n\t rather than semicolons for bn_mul asm, since some assemblers 5292817466cbSJens Wiklander interpret semicolons as comment delimiters (found by Barry K. Nathan). 5293817466cbSJens Wiklander * Disable broken Sparc64 bn_mul assembly (found by Florian Obser). 5294817466cbSJens Wiklander * Fix base64_decode() to return and check length correctly (in case of 5295817466cbSJens Wiklander tight buffers) 5296817466cbSJens Wiklander 5297817466cbSJens Wiklander= Version 1.2.10 released 2013-10-07 5298817466cbSJens WiklanderChanges 5299817466cbSJens Wiklander * Changed RSA blinding to a slower but thread-safe version 5300817466cbSJens Wiklander 5301817466cbSJens WiklanderBugfix 5302817466cbSJens Wiklander * Fixed memory leak in RSA as a result of introduction of blinding 5303817466cbSJens Wiklander * Fixed ssl_pkcs11_decrypt() prototype 5304817466cbSJens Wiklander * Fixed MSVC project files 5305817466cbSJens Wiklander 5306817466cbSJens Wiklander= Version 1.2.9 released 2013-10-01 5307817466cbSJens WiklanderChanges 5308817466cbSJens Wiklander * x509_verify() now case insensitive for cn (RFC 6125 6.4) 5309817466cbSJens Wiklander 5310817466cbSJens WiklanderBugfix 5311817466cbSJens Wiklander * Fixed potential memory leak when failing to resume a session 5312817466cbSJens Wiklander * Fixed potential file descriptor leaks (found by Remi Gacogne) 5313817466cbSJens Wiklander * Minor fixes 5314817466cbSJens Wiklander 5315817466cbSJens WiklanderSecurity 5316817466cbSJens Wiklander * Fixed potential heap buffer overflow on large hostname setting 5317817466cbSJens Wiklander * Fixed potential negative value misinterpretation in load_file() 5318817466cbSJens Wiklander * RSA blinding on CRT operations to counter timing attacks 5319817466cbSJens Wiklander (found by Cyril Arnaud and Pierre-Alain Fouque) 5320817466cbSJens Wiklander 5321817466cbSJens Wiklander= Version 1.2.8 released 2013-06-19 5322817466cbSJens WiklanderFeatures 5323817466cbSJens Wiklander * Parsing of PKCS#8 encrypted private key files 5324817466cbSJens Wiklander * PKCS#12 PBE and derivation functions 5325817466cbSJens Wiklander * Centralized module option values in config.h to allow user-defined 5326817466cbSJens Wiklander settings without editing header files by using POLARSSL_CONFIG_OPTIONS 5327817466cbSJens Wiklander 5328817466cbSJens WiklanderChanges 5329817466cbSJens Wiklander * HAVEGE random generator disabled by default 5330817466cbSJens Wiklander * Internally split up x509parse_key() into a (PEM) handler function 5331817466cbSJens Wiklander and specific DER parser functions for the PKCS#1 and unencrypted 5332817466cbSJens Wiklander PKCS#8 private key formats 5333817466cbSJens Wiklander * Added mechanism to provide alternative implementations for all 5334817466cbSJens Wiklander symmetric cipher and hash algorithms (e.g. POLARSSL_AES_ALT in 5335817466cbSJens Wiklander config.h) 5336817466cbSJens Wiklander * PKCS#5 module added. Moved PBKDF2 functionality inside and deprecated 5337817466cbSJens Wiklander old PBKDF2 module 5338817466cbSJens Wiklander 5339817466cbSJens WiklanderBugfix 5340817466cbSJens Wiklander * Secure renegotiation extension should only be sent in case client 5341817466cbSJens Wiklander supports secure renegotiation 5342817466cbSJens Wiklander * Fixed offset for cert_type list in ssl_parse_certificate_request() 5343817466cbSJens Wiklander * Fixed const correctness issues that have no impact on the ABI 5344817466cbSJens Wiklander * x509parse_crt() now better handles PEM error situations 5345817466cbSJens Wiklander * ssl_parse_certificate() now calls x509parse_crt_der() directly 5346817466cbSJens Wiklander instead of the x509parse_crt() wrapper that can also parse PEM 5347817466cbSJens Wiklander certificates 5348817466cbSJens Wiklander * x509parse_crtpath() is now reentrant and uses more portable stat() 5349817466cbSJens Wiklander * Fixed bignum.c and bn_mul.h to support Thumb2 and LLVM compiler 5350817466cbSJens Wiklander * Fixed values for 2-key Triple DES in cipher layer 5351817466cbSJens Wiklander * ssl_write_certificate_request() can handle empty ca_chain 5352817466cbSJens Wiklander 5353817466cbSJens WiklanderSecurity 5354817466cbSJens Wiklander * A possible DoS during the SSL Handshake, due to faulty parsing of 5355817466cbSJens Wiklander PEM-encoded certificates has been fixed (found by Jack Lloyd) 5356817466cbSJens Wiklander 5357817466cbSJens Wiklander= Version 1.2.7 released 2013-04-13 5358817466cbSJens WiklanderFeatures 5359817466cbSJens Wiklander * Ability to specify allowed ciphersuites based on the protocol version. 5360817466cbSJens Wiklander 5361817466cbSJens WiklanderChanges 5362817466cbSJens Wiklander * Default Blowfish keysize is now 128-bits 5363817466cbSJens Wiklander * Test suites made smaller to accommodate Raspberry Pi 5364817466cbSJens Wiklander 5365817466cbSJens WiklanderBugfix 5366817466cbSJens Wiklander * Fix for MPI assembly for ARM 5367817466cbSJens Wiklander * GCM adapted to support sizes > 2^29 5368817466cbSJens Wiklander 5369817466cbSJens Wiklander= Version 1.2.6 released 2013-03-11 5370817466cbSJens WiklanderBugfix 5371817466cbSJens Wiklander * Fixed memory leak in ssl_free() and ssl_reset() for active session 5372817466cbSJens Wiklander * Corrected GCM counter incrementation to use only 32-bits instead of 5373817466cbSJens Wiklander 128-bits (found by Yawning Angel) 5374817466cbSJens Wiklander * Fixes for 64-bit compilation with MS Visual Studio 5375817466cbSJens Wiklander * Fixed net_bind() for specified IP addresses on little endian systems 5376817466cbSJens Wiklander * Fixed assembly code for ARM (Thumb and regular) for some compilers 5377817466cbSJens Wiklander 5378817466cbSJens WiklanderChanges 5379817466cbSJens Wiklander * Internally split up rsa_pkcs1_encrypt(), rsa_pkcs1_decrypt(), 5380817466cbSJens Wiklander rsa_pkcs1_sign() and rsa_pkcs1_verify() to separate PKCS#1 v1.5 and 5381817466cbSJens Wiklander PKCS#1 v2.1 functions 5382817466cbSJens Wiklander * Added support for custom labels when using rsa_rsaes_oaep_encrypt() 5383817466cbSJens Wiklander or rsa_rsaes_oaep_decrypt() 5384817466cbSJens Wiklander * Re-added handling for SSLv2 Client Hello when the define 5385817466cbSJens Wiklander POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO is set 5386817466cbSJens Wiklander * The SSL session cache module (ssl_cache) now also retains peer_cert 5387817466cbSJens Wiklander information (not the entire chain) 5388817466cbSJens Wiklander 5389817466cbSJens WiklanderSecurity 5390817466cbSJens Wiklander * Removed further timing differences during SSL message decryption in 5391817466cbSJens Wiklander ssl_decrypt_buf() 5392817466cbSJens Wiklander * Removed timing differences due to bad padding from 5393817466cbSJens Wiklander rsa_rsaes_pkcs1_v15_decrypt() and rsa_pkcs1_decrypt() for PKCS#1 v1.5 5394817466cbSJens Wiklander operations 5395817466cbSJens Wiklander 5396817466cbSJens Wiklander= Version 1.2.5 released 2013-02-02 5397817466cbSJens WiklanderChanges 5398817466cbSJens Wiklander * Allow enabling of dummy error_strerror() to support some use-cases 5399817466cbSJens Wiklander * Debug messages about padding errors during SSL message decryption are 5400817466cbSJens Wiklander disabled by default and can be enabled with POLARSSL_SSL_DEBUG_ALL 5401817466cbSJens Wiklander * Sending of security-relevant alert messages that do not break 5402817466cbSJens Wiklander interoperability can be switched on/off with the flag 5403817466cbSJens Wiklander POLARSSL_SSL_ALL_ALERT_MESSAGES 5404817466cbSJens Wiklander 5405817466cbSJens WiklanderSecurity 5406817466cbSJens Wiklander * Removed timing differences during SSL message decryption in 5407817466cbSJens Wiklander ssl_decrypt_buf() due to badly formatted padding 5408817466cbSJens Wiklander 5409817466cbSJens Wiklander= Version 1.2.4 released 2013-01-25 5410817466cbSJens WiklanderChanges 5411817466cbSJens Wiklander * More advanced SSL ciphersuite representation and moved to more dynamic 5412817466cbSJens Wiklander SSL core 5413817466cbSJens Wiklander * Added ssl_handshake_step() to allow single stepping the handshake process 5414817466cbSJens Wiklander 5415817466cbSJens WiklanderBugfix 5416817466cbSJens Wiklander * Memory leak when using RSA_PKCS_V21 operations fixed 5417817466cbSJens Wiklander * Handle future version properly in ssl_write_certificate_request() 5418817466cbSJens Wiklander * Correctly handle CertificateRequest message in client for <= TLS 1.1 5419817466cbSJens Wiklander without DN list 5420817466cbSJens Wiklander 5421817466cbSJens Wiklander= Version 1.2.3 released 2012-11-26 5422817466cbSJens WiklanderBugfix 5423817466cbSJens Wiklander * Server not always sending correct CertificateRequest message 5424817466cbSJens Wiklander 5425817466cbSJens Wiklander= Version 1.2.2 released 2012-11-24 5426817466cbSJens WiklanderChanges 5427817466cbSJens Wiklander * Added p_hw_data to ssl_context for context specific hardware acceleration 5428817466cbSJens Wiklander data 5429817466cbSJens Wiklander * During verify trust-CA is only checked for expiration and CRL presence 5430817466cbSJens Wiklander 5431817466cbSJens WiklanderBugfixes 5432817466cbSJens Wiklander * Fixed client authentication compatibility 5433817466cbSJens Wiklander * Fixed dependency on POLARSSL_SHA4_C in SSL modules 5434817466cbSJens Wiklander 5435817466cbSJens Wiklander= Version 1.2.1 released 2012-11-20 5436817466cbSJens WiklanderChanges 5437817466cbSJens Wiklander * Depth that the certificate verify callback receives is now numbered 5438817466cbSJens Wiklander bottom-up (Peer cert depth is 0) 5439817466cbSJens Wiklander 5440817466cbSJens WiklanderBugfixes 5441817466cbSJens Wiklander * Fixes for MSVC6 5442817466cbSJens Wiklander * Moved mpi_inv_mod() outside POLARSSL_GENPRIME 5443817466cbSJens Wiklander * Allow R and A to point to same mpi in mpi_div_mpi (found by Manuel 5444817466cbSJens Wiklander Pégourié-Gonnard) 5445817466cbSJens Wiklander * Fixed possible segfault in mpi_shift_r() (found by Manuel 5446817466cbSJens Wiklander Pégourié-Gonnard) 5447817466cbSJens Wiklander * Added max length check for rsa_pkcs1_sign with PKCS#1 v2.1 5448817466cbSJens Wiklander 5449817466cbSJens Wiklander= Version 1.2.0 released 2012-10-31 5450817466cbSJens WiklanderFeatures 5451817466cbSJens Wiklander * Added support for NULL cipher (POLARSSL_CIPHER_NULL_CIPHER) and weak 5452817466cbSJens Wiklander ciphersuites (POLARSSL_ENABLE_WEAK_CIPHERSUITES). They are disabled by 5453817466cbSJens Wiklander default! 5454817466cbSJens Wiklander * Added support for wildcard certificates 5455817466cbSJens Wiklander * Added support for multi-domain certificates through the X509 Subject 5456817466cbSJens Wiklander Alternative Name extension 5457817466cbSJens Wiklander * Added preliminary ASN.1 buffer writing support 5458817466cbSJens Wiklander * Added preliminary X509 Certificate Request writing support 5459817466cbSJens Wiklander * Added key_app_writer example application 5460817466cbSJens Wiklander * Added cert_req example application 5461817466cbSJens Wiklander * Added base Galois Counter Mode (GCM) for AES 5462817466cbSJens Wiklander * Added TLS 1.2 support (RFC 5246) 5463817466cbSJens Wiklander * Added GCM suites to TLS 1.2 (RFC 5288) 5464817466cbSJens Wiklander * Added commandline error code convertor (util/strerror) 5465817466cbSJens Wiklander * Added support for Hardware Acceleration hooking in SSL/TLS 5466817466cbSJens Wiklander * Added OpenSSL / PolarSSL compatibility script (tests/compat.sh) and 5467817466cbSJens Wiklander example application (programs/ssl/o_p_test) (requires OpenSSL) 5468817466cbSJens Wiklander * Added X509 CA Path support 5469817466cbSJens Wiklander * Added Thumb assembly optimizations 5470817466cbSJens Wiklander * Added DEFLATE compression support as per RFC3749 (requires zlib) 5471817466cbSJens Wiklander * Added blowfish algorithm (Generic and cipher layer) 5472817466cbSJens Wiklander * Added PKCS#5 PBKDF2 key derivation function 5473817466cbSJens Wiklander * Added Secure Renegotiation (RFC 5746) 5474817466cbSJens Wiklander * Added predefined DHM groups from RFC 5114 5475817466cbSJens Wiklander * Added simple SSL session cache implementation 5476817466cbSJens Wiklander * Added ServerName extension parsing (SNI) at server side 5477817466cbSJens Wiklander * Added option to add minimum accepted SSL/TLS protocol version 5478817466cbSJens Wiklander 5479817466cbSJens WiklanderChanges 5480817466cbSJens Wiklander * Removed redundant POLARSSL_DEBUG_MSG define 5481817466cbSJens Wiklander * AES code only check for Padlock once 5482817466cbSJens Wiklander * Fixed const-correctness mpi_get_bit() 5483817466cbSJens Wiklander * Documentation for mpi_lsb() and mpi_msb() 5484817466cbSJens Wiklander * Moved out_msg to out_hdr + 32 to support hardware acceleration 5485817466cbSJens Wiklander * Changed certificate verify behaviour to comply with RFC 6125 section 6.3 5486817466cbSJens Wiklander to not match CN if subjectAltName extension is present (Closes ticket #56) 5487817466cbSJens Wiklander * Cipher layer cipher_mode_t POLARSSL_MODE_CFB128 is renamed to 5488817466cbSJens Wiklander POLARSSL_MODE_CFB, to also handle different block size CFB modes. 5489817466cbSJens Wiklander * Removed handling for SSLv2 Client Hello (as per RFC 5246 recommendation) 5490817466cbSJens Wiklander * Revamped session resumption handling 5491817466cbSJens Wiklander * Generalized external private key implementation handling (like PKCS#11) 5492817466cbSJens Wiklander in SSL/TLS 5493817466cbSJens Wiklander * Revamped x509_verify() and the SSL f_vrfy callback implementations 5494817466cbSJens Wiklander * Moved from unsigned long to fixed width uint32_t types throughout code 5495817466cbSJens Wiklander * Renamed ciphersuites naming scheme to IANA reserved names 5496817466cbSJens Wiklander 5497817466cbSJens WiklanderBugfix 5498817466cbSJens Wiklander * Fixed handling error in mpi_cmp_mpi() on longer B values (found by 5499817466cbSJens Wiklander Hui Dong) 5500817466cbSJens Wiklander * Fixed potential heap corruption in x509_name allocation 5501817466cbSJens Wiklander * Fixed single RSA test that failed on Big Endian systems (Closes ticket #54) 5502817466cbSJens Wiklander * mpi_exp_mod() now correctly handles negative base numbers (Closes ticket 5503817466cbSJens Wiklander #52) 5504817466cbSJens Wiklander * Handle encryption with private key and decryption with public key as per 5505817466cbSJens Wiklander RFC 2313 5506817466cbSJens Wiklander * Handle empty certificate subject names 5507817466cbSJens Wiklander * Prevent reading over buffer boundaries on X509 certificate parsing 5508817466cbSJens Wiklander * mpi_add_abs() now correctly handles adding short numbers to long numbers 5509817466cbSJens Wiklander with carry rollover (found by Ruslan Yushchenko) 5510817466cbSJens Wiklander * Handle existence of OpenSSL Trust Extensions at end of X.509 DER blob 5511817466cbSJens Wiklander * Fixed MPI assembly for SPARC64 platform 5512817466cbSJens Wiklander 5513817466cbSJens WiklanderSecurity 5514817466cbSJens Wiklander * Fixed potential memory zeroization on miscrafted RSA key (found by Eloi 5515817466cbSJens Wiklander Vanderbeken) 5516817466cbSJens Wiklander 5517817466cbSJens Wiklander= Version 1.1.8 released on 2013-10-01 5518817466cbSJens WiklanderBugfix 5519817466cbSJens Wiklander * Fixed potential memory leak when failing to resume a session 5520817466cbSJens Wiklander * Fixed potential file descriptor leaks 5521817466cbSJens Wiklander 5522817466cbSJens WiklanderSecurity 5523817466cbSJens Wiklander * Potential buffer-overflow for ssl_read_record() (independently found by 5524817466cbSJens Wiklander both TrustInSoft and Paul Brodeur of Leviathan Security Group) 5525817466cbSJens Wiklander * Potential negative value misinterpretation in load_file() 5526817466cbSJens Wiklander * Potential heap buffer overflow on large hostname setting 5527817466cbSJens Wiklander 5528817466cbSJens Wiklander= Version 1.1.7 released on 2013-06-19 5529817466cbSJens WiklanderChanges 5530817466cbSJens Wiklander * HAVEGE random generator disabled by default 5531817466cbSJens Wiklander 5532817466cbSJens WiklanderBugfix 5533817466cbSJens Wiklander * x509parse_crt() now better handles PEM error situations 5534817466cbSJens Wiklander * ssl_parse_certificate() now calls x509parse_crt_der() directly 5535817466cbSJens Wiklander instead of the x509parse_crt() wrapper that can also parse PEM 5536817466cbSJens Wiklander certificates 5537817466cbSJens Wiklander * Fixed values for 2-key Triple DES in cipher layer 5538817466cbSJens Wiklander * ssl_write_certificate_request() can handle empty ca_chain 5539817466cbSJens Wiklander 5540817466cbSJens WiklanderSecurity 5541817466cbSJens Wiklander * A possible DoS during the SSL Handshake, due to faulty parsing of 5542817466cbSJens Wiklander PEM-encoded certificates has been fixed (found by Jack Lloyd) 5543817466cbSJens Wiklander 5544817466cbSJens Wiklander= Version 1.1.6 released on 2013-03-11 5545817466cbSJens WiklanderBugfix 5546817466cbSJens Wiklander * Fixed net_bind() for specified IP addresses on little endian systems 5547817466cbSJens Wiklander 5548817466cbSJens WiklanderChanges 5549817466cbSJens Wiklander * Allow enabling of dummy error_strerror() to support some use-cases 5550817466cbSJens Wiklander * Debug messages about padding errors during SSL message decryption are 5551817466cbSJens Wiklander disabled by default and can be enabled with POLARSSL_SSL_DEBUG_ALL 5552817466cbSJens Wiklander 5553817466cbSJens WiklanderSecurity 5554817466cbSJens Wiklander * Removed timing differences during SSL message decryption in 5555817466cbSJens Wiklander ssl_decrypt_buf() 5556817466cbSJens Wiklander * Removed timing differences due to bad padding from 5557817466cbSJens Wiklander rsa_rsaes_pkcs1_v15_decrypt() and rsa_pkcs1_decrypt() for PKCS#1 v1.5 5558817466cbSJens Wiklander operations 5559817466cbSJens Wiklander 5560817466cbSJens Wiklander= Version 1.1.5 released on 2013-01-16 5561817466cbSJens WiklanderBugfix 5562817466cbSJens Wiklander * Fixed MPI assembly for SPARC64 platform 5563817466cbSJens Wiklander * Handle existence of OpenSSL Trust Extensions at end of X.509 DER blob 5564817466cbSJens Wiklander * mpi_add_abs() now correctly handles adding short numbers to long numbers 5565817466cbSJens Wiklander with carry rollover 5566817466cbSJens Wiklander * Moved mpi_inv_mod() outside POLARSSL_GENPRIME 5567817466cbSJens Wiklander * Prevent reading over buffer boundaries on X509 certificate parsing 5568817466cbSJens Wiklander * mpi_exp_mod() now correctly handles negative base numbers (Closes ticket 5569817466cbSJens Wiklander #52) 5570817466cbSJens Wiklander * Fixed possible segfault in mpi_shift_r() (found by Manuel 5571817466cbSJens Wiklander Pégourié-Gonnard) 5572817466cbSJens Wiklander * Allow R and A to point to same mpi in mpi_div_mpi (found by Manuel 5573817466cbSJens Wiklander Pégourié-Gonnard) 5574817466cbSJens Wiklander * Added max length check for rsa_pkcs1_sign with PKCS#1 v2.1 5575817466cbSJens Wiklander * Memory leak when using RSA_PKCS_V21 operations fixed 5576817466cbSJens Wiklander * Handle encryption with private key and decryption with public key as per 5577817466cbSJens Wiklander RFC 2313 5578817466cbSJens Wiklander * Fixes for MSVC6 5579817466cbSJens Wiklander 5580817466cbSJens WiklanderSecurity 5581817466cbSJens Wiklander * Fixed potential memory zeroization on miscrafted RSA key (found by Eloi 5582817466cbSJens Wiklander Vanderbeken) 5583817466cbSJens Wiklander 5584817466cbSJens Wiklander= Version 1.1.4 released on 2012-05-31 5585817466cbSJens WiklanderBugfix 5586817466cbSJens Wiklander * Correctly handle empty SSL/TLS packets (Found by James Yonan) 5587817466cbSJens Wiklander * Fixed potential heap corruption in x509_name allocation 5588817466cbSJens Wiklander * Fixed single RSA test that failed on Big Endian systems (Closes ticket #54) 5589817466cbSJens Wiklander 5590817466cbSJens Wiklander= Version 1.1.3 released on 2012-04-29 5591817466cbSJens WiklanderBugfix 5592817466cbSJens Wiklander * Fixed random MPI generation to not generate more size than requested. 5593817466cbSJens Wiklander 5594817466cbSJens Wiklander= Version 1.1.2 released on 2012-04-26 5595817466cbSJens WiklanderBugfix 5596817466cbSJens Wiklander * Fixed handling error in mpi_cmp_mpi() on longer B values (found by 5597817466cbSJens Wiklander Hui Dong) 5598817466cbSJens Wiklander 5599817466cbSJens WiklanderSecurity 5600817466cbSJens Wiklander * Fixed potential memory corruption on miscrafted client messages (found by 5601817466cbSJens Wiklander Frama-C team at CEA LIST) 5602817466cbSJens Wiklander * Fixed generation of DHM parameters to correct length (found by Ruslan 5603817466cbSJens Wiklander Yushchenko) 5604817466cbSJens Wiklander 5605817466cbSJens Wiklander= Version 1.1.1 released on 2012-01-23 5606817466cbSJens WiklanderBugfix 5607817466cbSJens Wiklander * Check for failed malloc() in ssl_set_hostname() and x509_get_entries() 5608817466cbSJens Wiklander (Closes ticket #47, found by Hugo Leisink) 5609817466cbSJens Wiklander * Fixed issues with Intel compiler on 64-bit systems (Closes ticket #50) 5610817466cbSJens Wiklander * Fixed multiple compiler warnings for VS6 and armcc 5611817466cbSJens Wiklander * Fixed bug in CTR_CRBG selftest 5612817466cbSJens Wiklander 5613817466cbSJens Wiklander= Version 1.1.0 released on 2011-12-22 5614817466cbSJens WiklanderFeatures 5615817466cbSJens Wiklander * Added ssl_session_reset() to allow better multi-connection pools of 5616817466cbSJens Wiklander SSL contexts without needing to set all non-connection-specific 5617817466cbSJens Wiklander data and pointers again. Adapted ssl_server to use this functionality. 5618817466cbSJens Wiklander * Added ssl_set_max_version() to allow clients to offer a lower maximum 5619817466cbSJens Wiklander supported version to a server to help buggy server implementations. 5620817466cbSJens Wiklander (Closes ticket #36) 5621817466cbSJens Wiklander * Added cipher_get_cipher_mode() and cipher_get_cipher_operation() 5622817466cbSJens Wiklander introspection functions (Closes ticket #40) 5623817466cbSJens Wiklander * Added CTR_DRBG based on AES-256-CTR (NIST SP 800-90) random generator 5624817466cbSJens Wiklander * Added a generic entropy accumulator that provides support for adding 5625817466cbSJens Wiklander custom entropy sources and added some generic and platform dependent 5626817466cbSJens Wiklander entropy sources 5627817466cbSJens Wiklander 5628817466cbSJens WiklanderChanges 5629817466cbSJens Wiklander * Documentation for AES and Camellia in modes CTR and CFB128 clarified. 5630817466cbSJens Wiklander * Fixed rsa_encrypt and rsa_decrypt examples to use public key for 5631817466cbSJens Wiklander encryption and private key for decryption. (Closes ticket #34) 5632817466cbSJens Wiklander * Inceased maximum size of ASN1 length reads to 32-bits. 5633817466cbSJens Wiklander * Added an EXPLICIT tag number parameter to x509_get_ext() 5634817466cbSJens Wiklander * Added a separate CRL entry extension parsing function 5635817466cbSJens Wiklander * Separated the ASN.1 parsing code from the X.509 specific parsing code. 5636817466cbSJens Wiklander So now there is a module that is controlled with POLARSSL_ASN1_PARSE_C. 5637817466cbSJens Wiklander * Changed the defined key-length of DES ciphers in cipher.h to include the 5638817466cbSJens Wiklander parity bits, to prevent mistakes in copying data. (Closes ticket #33) 5639817466cbSJens Wiklander * Loads of minimal changes to better support WINCE as a build target 5640817466cbSJens Wiklander (Credits go to Marco Lizza) 5641817466cbSJens Wiklander * Added POLARSSL_MPI_WINDOW_SIZE definition to allow easier time to memory 5642817466cbSJens Wiklander trade-off 5643817466cbSJens Wiklander * Introduced POLARSSL_MPI_MAX_SIZE and POLARSSL_MPI_MAX_BITS for MPI size 5644817466cbSJens Wiklander management (Closes ticket #44) 5645817466cbSJens Wiklander * Changed the used random function pointer to more flexible format. Renamed 5646817466cbSJens Wiklander havege_rand() to havege_random() to prevent mistakes. Lots of changes as 5647817466cbSJens Wiklander a consequence in library code and programs 5648817466cbSJens Wiklander * Moved all examples programs to use the new entropy and CTR_DRBG 5649817466cbSJens Wiklander * Added permissive certificate parsing to x509parse_crt() and 5650817466cbSJens Wiklander x509parse_crtfile(). With permissive parsing the parsing does not stop on 5651817466cbSJens Wiklander encountering a parse-error. Beware that the meaning of return values has 5652817466cbSJens Wiklander changed! 5653817466cbSJens Wiklander * All error codes are now negative. Even on mermory failures and IO errors. 5654817466cbSJens Wiklander 5655817466cbSJens WiklanderBugfix 5656817466cbSJens Wiklander * Fixed faulty HMAC-MD2 implementation. Found by dibac. (Closes 5657817466cbSJens Wiklander ticket #37) 5658817466cbSJens Wiklander * Fixed a bug where the CRL parser expected an EXPLICIT ASN.1 tag 5659817466cbSJens Wiklander before version numbers 5660817466cbSJens Wiklander * Allowed X509 key usage parsing to accept 4 byte values instead of the 5661817466cbSJens Wiklander standard 1 byte version sometimes used by Microsoft. (Closes ticket #38) 5662817466cbSJens Wiklander * Fixed incorrect behaviour in case of RSASSA-PSS with a salt length 5663817466cbSJens Wiklander smaller than the hash length. (Closes ticket #41) 5664817466cbSJens Wiklander * If certificate serial is longer than 32 octets, serial number is now 5665817466cbSJens Wiklander appended with '....' after first 28 octets 5666817466cbSJens Wiklander * Improved build support for s390x and sparc64 in bignum.h 5667817466cbSJens Wiklander * Fixed MS Visual C++ name clash with int64 in sha4.h 5668817466cbSJens Wiklander * Corrected removal of leading "00:" in printing serial numbers in 5669817466cbSJens Wiklander certificates and CRLs 5670817466cbSJens Wiklander 5671817466cbSJens Wiklander= Version 1.0.0 released on 2011-07-27 5672817466cbSJens WiklanderFeatures 5673817466cbSJens Wiklander * Expanded cipher layer with support for CFB128 and CTR mode 5674817466cbSJens Wiklander * Added rsa_encrypt and rsa_decrypt simple example programs. 5675817466cbSJens Wiklander 5676817466cbSJens WiklanderChanges 5677817466cbSJens Wiklander * The generic cipher and message digest layer now have normal error 5678817466cbSJens Wiklander codes instead of integers 5679817466cbSJens Wiklander 5680817466cbSJens WiklanderBugfix 5681817466cbSJens Wiklander * Undid faulty bug fix in ssl_write() when flushing old data (Ticket 5682817466cbSJens Wiklander #18) 5683817466cbSJens Wiklander 5684817466cbSJens Wiklander= Version 0.99-pre5 released on 2011-05-26 5685817466cbSJens WiklanderFeatures 5686817466cbSJens Wiklander * Added additional Cipher Block Modes to symmetric ciphers 5687817466cbSJens Wiklander (AES CTR, Camellia CTR, XTEA CBC) including the option to 5688817466cbSJens Wiklander enable and disable individual modes when needed 5689817466cbSJens Wiklander * Functions requiring File System functions can now be disabled 5690817466cbSJens Wiklander by undefining POLARSSL_FS_IO 5691817466cbSJens Wiklander * A error_strerror function() has been added to translate between 5692817466cbSJens Wiklander error codes and their description. 5693817466cbSJens Wiklander * Added mpi_get_bit() and mpi_set_bit() individual bit setter/getter 5694817466cbSJens Wiklander functions. 5695817466cbSJens Wiklander * Added ssl_mail_client and ssl_fork_server as example programs. 5696817466cbSJens Wiklander 5697817466cbSJens WiklanderChanges 5698817466cbSJens Wiklander * Major argument / variable rewrite. Introduced use of size_t 5699817466cbSJens Wiklander instead of int for buffer lengths and loop variables for 5700817466cbSJens Wiklander better unsigned / signed use. Renamed internal bigint types 5701817466cbSJens Wiklander t_int and t_dbl to t_uint and t_udbl in the process 5702817466cbSJens Wiklander * mpi_init() and mpi_free() now only accept a single MPI 5703817466cbSJens Wiklander argument and do not accept variable argument lists anymore. 5704817466cbSJens Wiklander * The error codes have been remapped and combining error codes 5705817466cbSJens Wiklander is now done with a PLUS instead of an OR as error codes 5706817466cbSJens Wiklander used are negative. 5707817466cbSJens Wiklander * Changed behaviour of net_read(), ssl_fetch_input() and ssl_recv(). 5708817466cbSJens Wiklander net_recv() now returns 0 on EOF instead of 5709817466cbSJens Wiklander POLARSSL_ERR_NET_CONN_RESET. ssl_fetch_input() returns 5710817466cbSJens Wiklander POLARSSL_ERR_SSL_CONN_EOF on an EOF from its f_recv() function. 5711817466cbSJens Wiklander ssl_read() returns 0 if a POLARSSL_ERR_SSL_CONN_EOF is received 5712817466cbSJens Wiklander after the handshake. 5713817466cbSJens Wiklander * Network functions now return POLARSSL_ERR_NET_WANT_READ or 5714817466cbSJens Wiklander POLARSSL_ERR_NET_WANT_WRITE instead of the ambiguous 5715817466cbSJens Wiklander POLARSSL_ERR_NET_TRY_AGAIN 5716817466cbSJens Wiklander 5717817466cbSJens Wiklander= Version 0.99-pre4 released on 2011-04-01 5718817466cbSJens WiklanderFeatures 5719817466cbSJens Wiklander * Added support for PKCS#1 v2.1 encoding and thus support 5720817466cbSJens Wiklander for the RSAES-OAEP and RSASSA-PSS operations. 5721817466cbSJens Wiklander * Reading of Public Key files incorporated into default x509 5722817466cbSJens Wiklander functionality as well. 5723817466cbSJens Wiklander * Added mpi_fill_random() for centralized filling of big numbers 5724817466cbSJens Wiklander with random data (Fixed ticket #10) 5725817466cbSJens Wiklander 5726817466cbSJens WiklanderChanges 5727817466cbSJens Wiklander * Debug print of MPI now removes leading zero octets and 5728817466cbSJens Wiklander displays actual bit size of the value. 5729817466cbSJens Wiklander * x509parse_key() (and as a consequence x509parse_keyfile()) 5730817466cbSJens Wiklander does not zeroize memory in advance anymore. Use rsa_init() 5731817466cbSJens Wiklander before parsing a key or keyfile! 5732817466cbSJens Wiklander 5733817466cbSJens WiklanderBugfix 5734817466cbSJens Wiklander * Debug output of MPI's now the same independent of underlying 5735817466cbSJens Wiklander platform (32-bit / 64-bit) (Fixes ticket #19, found by Mads 5736817466cbSJens Wiklander Kiilerich and Mihai Militaru) 5737817466cbSJens Wiklander * Fixed bug in ssl_write() when flushing old data (Fixed ticket 5738817466cbSJens Wiklander #18, found by Nikolay Epifanov) 5739817466cbSJens Wiklander * Fixed proper handling of RSASSA-PSS verification with variable 5740817466cbSJens Wiklander length salt lengths 5741817466cbSJens Wiklander 5742817466cbSJens Wiklander= Version 0.99-pre3 released on 2011-02-28 5743817466cbSJens WiklanderThis release replaces version 0.99-pre2 which had possible copyright issues. 5744817466cbSJens WiklanderFeatures 5745817466cbSJens Wiklander * Parsing PEM private keys encrypted with DES and AES 5746817466cbSJens Wiklander are now supported as well (Fixes ticket #5) 5747817466cbSJens Wiklander * Added crl_app program to allow easy reading and 5748817466cbSJens Wiklander printing of X509 CRLs from file 5749817466cbSJens Wiklander 5750817466cbSJens WiklanderChanges 5751817466cbSJens Wiklander * Parsing of PEM files moved to separate module (Fixes 5752817466cbSJens Wiklander ticket #13). Also possible to remove PEM support for 5753817466cbSJens Wiklander systems only using DER encoding 5754817466cbSJens Wiklander 5755817466cbSJens WiklanderBugfixes 5756817466cbSJens Wiklander * Corrected parsing of UTCTime dates before 1990 and 5757817466cbSJens Wiklander after 1950 5758817466cbSJens Wiklander * Support more exotic OID's when parsing certificates 5759817466cbSJens Wiklander (found by Mads Kiilerich) 5760817466cbSJens Wiklander * Support more exotic name representations when parsing 5761817466cbSJens Wiklander certificates (found by Mads Kiilerich) 5762817466cbSJens Wiklander * Replaced the expired test certificates 5763817466cbSJens Wiklander * Do not bail out if no client certificate specified. Try 5764817466cbSJens Wiklander to negotiate anonymous connection (Fixes ticket #12, 5765817466cbSJens Wiklander found by Boris Krasnovskiy) 5766817466cbSJens Wiklander 5767817466cbSJens WiklanderSecurity fixes 5768817466cbSJens Wiklander * Fixed a possible Man-in-the-Middle attack on the 5769817466cbSJens Wiklander Diffie Hellman key exchange (thanks to Larry Highsmith, 5770817466cbSJens Wiklander Subreption LLC) 5771817466cbSJens Wiklander 5772817466cbSJens Wiklander= Version 0.99-pre1 released on 2011-01-30 5773817466cbSJens WiklanderFeatures 5774817466cbSJens WiklanderNote: Most of these features have been donated by Fox-IT 5775817466cbSJens Wiklander * Added Doxygen source code documentation parts 5776817466cbSJens Wiklander * Added reading of DHM context from memory and file 5777817466cbSJens Wiklander * Improved X509 certificate parsing to include extended 5778817466cbSJens Wiklander certificate fields, including Key Usage 5779817466cbSJens Wiklander * Improved certificate verification and verification 5780817466cbSJens Wiklander against the available CRLs 5781817466cbSJens Wiklander * Detection for DES weak keys and parity bits added 5782817466cbSJens Wiklander * Improvements to support integration in other 5783817466cbSJens Wiklander applications: 5784817466cbSJens Wiklander + Added generic message digest and cipher wrapper 5785817466cbSJens Wiklander + Improved information about current capabilities, 5786817466cbSJens Wiklander status, objects and configuration 5787817466cbSJens Wiklander + Added verification callback on certificate chain 5788817466cbSJens Wiklander verification to allow external blacklisting 5789817466cbSJens Wiklander + Additional example programs to show usage 5790817466cbSJens Wiklander * Added support for PKCS#11 through the use of the 5791817466cbSJens Wiklander libpkcs11-helper library 5792817466cbSJens Wiklander 5793817466cbSJens WiklanderChanges 5794817466cbSJens Wiklander * x509parse_time_expired() checks time in addition to 5795817466cbSJens Wiklander the existing date check 5796817466cbSJens Wiklander * The ciphers member of ssl_context and the cipher member 5797817466cbSJens Wiklander of ssl_session have been renamed to ciphersuites and 5798817466cbSJens Wiklander ciphersuite respectively. This clarifies the difference 5799817466cbSJens Wiklander with the generic cipher layer and is better naming 5800817466cbSJens Wiklander altogether 5801817466cbSJens Wiklander 5802817466cbSJens Wiklander= Version 0.14.0 released on 2010-08-16 5803817466cbSJens WiklanderFeatures 5804817466cbSJens Wiklander * Added support for SSL_EDH_RSA_AES_128_SHA and 5805817466cbSJens Wiklander SSL_EDH_RSA_CAMELLIA_128_SHA ciphersuites 5806817466cbSJens Wiklander * Added compile-time and run-time version information 5807817466cbSJens Wiklander * Expanded ssl_client2 arguments for more flexibility 5808817466cbSJens Wiklander * Added support for TLS v1.1 5809817466cbSJens Wiklander 5810817466cbSJens WiklanderChanges 5811817466cbSJens Wiklander * Made Makefile cleaner 5812817466cbSJens Wiklander * Removed dependency on rand() in rsa_pkcs1_encrypt(). 5813817466cbSJens Wiklander Now using random fuction provided to function and 5814817466cbSJens Wiklander changed the prototype of rsa_pkcs1_encrypt(), 5815817466cbSJens Wiklander rsa_init() and rsa_gen_key(). 5816817466cbSJens Wiklander * Some SSL defines were renamed in order to avoid 5817817466cbSJens Wiklander future confusion 5818817466cbSJens Wiklander 5819817466cbSJens WiklanderBug fixes 5820817466cbSJens Wiklander * Fixed CMake out of source build for tests (found by 5821817466cbSJens Wiklander kkert) 5822817466cbSJens Wiklander * rsa_check_private() now supports PKCS1v2 keys as well 5823817466cbSJens Wiklander * Fixed deadlock in rsa_pkcs1_encrypt() on failing random 5824817466cbSJens Wiklander generator 5825817466cbSJens Wiklander 5826817466cbSJens Wiklander= Version 0.13.1 released on 2010-03-24 5827817466cbSJens WiklanderBug fixes 5828817466cbSJens Wiklander * Fixed Makefile in library that was mistakenly merged 5829817466cbSJens Wiklander * Added missing const string fixes 5830817466cbSJens Wiklander 5831817466cbSJens Wiklander= Version 0.13.0 released on 2010-03-21 5832817466cbSJens WiklanderFeatures 5833817466cbSJens Wiklander * Added option parsing for host and port selection to 5834817466cbSJens Wiklander ssl_client2 5835817466cbSJens Wiklander * Added support for GeneralizedTime in X509 parsing 5836817466cbSJens Wiklander * Added cert_app program to allow easy reading and 5837817466cbSJens Wiklander printing of X509 certificates from file or SSL 5838817466cbSJens Wiklander connection. 5839817466cbSJens Wiklander 5840817466cbSJens WiklanderChanges 5841817466cbSJens Wiklander * Added const correctness for main code base 5842817466cbSJens Wiklander * X509 signature algorithm determination is now 5843817466cbSJens Wiklander in a function to allow easy future expansion 5844817466cbSJens Wiklander * Changed symmetric cipher functions to 5845817466cbSJens Wiklander identical interface (returning int result values) 5846817466cbSJens Wiklander * Changed ARC4 to use separate input/output buffer 5847817466cbSJens Wiklander * Added reset function for HMAC context as speed-up 5848817466cbSJens Wiklander for specific use-cases 5849817466cbSJens Wiklander 5850817466cbSJens WiklanderBug fixes 5851817466cbSJens Wiklander * Fixed bug resulting in failure to send the last 5852817466cbSJens Wiklander certificate in the chain in ssl_write_certificate() and 5853817466cbSJens Wiklander ssl_write_certificate_request() (found by fatbob) 5854817466cbSJens Wiklander * Added small fixes for compiler warnings on a Mac 5855817466cbSJens Wiklander (found by Frank de Brabander) 5856817466cbSJens Wiklander * Fixed algorithmic bug in mpi_is_prime() (found by 5857817466cbSJens Wiklander Smbat Tonoyan) 5858817466cbSJens Wiklander 5859817466cbSJens Wiklander= Version 0.12.1 released on 2009-10-04 5860817466cbSJens WiklanderChanges 5861817466cbSJens Wiklander * Coverage test definitions now support 'depends_on' 5862817466cbSJens Wiklander tagging system. 5863817466cbSJens Wiklander * Tests requiring specific hashing algorithms now honor 5864817466cbSJens Wiklander the defines. 5865817466cbSJens Wiklander 5866817466cbSJens WiklanderBug fixes 5867817466cbSJens Wiklander * Changed typo in #ifdef in x509parse.c (found 5868817466cbSJens Wiklander by Eduardo) 5869817466cbSJens Wiklander 5870817466cbSJens Wiklander= Version 0.12.0 released on 2009-07-28 5871817466cbSJens WiklanderFeatures 5872817466cbSJens Wiklander * Added CMake makefiles as alternative to regular Makefiles. 5873817466cbSJens Wiklander * Added preliminary Code Coverage tests for AES, ARC4, 5874817466cbSJens Wiklander Base64, MPI, SHA-family, MD-family, HMAC-SHA-family, 5875817466cbSJens Wiklander Camellia, DES, 3-DES, RSA PKCS#1, XTEA, Diffie-Hellman 5876817466cbSJens Wiklander and X509parse. 5877817466cbSJens Wiklander 5878817466cbSJens WiklanderChanges 5879817466cbSJens Wiklander * Error codes are not (necessarily) negative. Keep 5880817466cbSJens Wiklander this is mind when checking for errors. 5881817466cbSJens Wiklander * RSA_RAW renamed to SIG_RSA_RAW for consistency. 5882817466cbSJens Wiklander * Fixed typo in name of POLARSSL_ERR_RSA_OUTPUT_TOO_LARGE. 5883817466cbSJens Wiklander * Changed interface for AES and Camellia setkey functions 5884817466cbSJens Wiklander to indicate invalid key lengths. 5885817466cbSJens Wiklander 5886817466cbSJens WiklanderBug fixes 5887817466cbSJens Wiklander * Fixed include location of endian.h on FreeBSD (found by 5888817466cbSJens Wiklander Gabriel) 5889817466cbSJens Wiklander * Fixed include location of endian.h and name clash on 5890817466cbSJens Wiklander Apples (found by Martin van Hensbergen) 5891817466cbSJens Wiklander * Fixed HMAC-MD2 by modifying md2_starts(), so that the 5892817466cbSJens Wiklander required HMAC ipad and opad variables are not cleared. 5893817466cbSJens Wiklander (found by code coverage tests) 5894817466cbSJens Wiklander * Prevented use of long long in bignum if 5895817466cbSJens Wiklander POLARSSL_HAVE_LONGLONG not defined (found by Giles 5896817466cbSJens Wiklander Bathgate). 5897817466cbSJens Wiklander * Fixed incorrect handling of negative strings in 5898817466cbSJens Wiklander mpi_read_string() (found by code coverage tests). 5899817466cbSJens Wiklander * Fixed segfault on handling empty rsa_context in 5900817466cbSJens Wiklander rsa_check_pubkey() and rsa_check_privkey() (found by 5901817466cbSJens Wiklander code coverage tests). 5902817466cbSJens Wiklander * Fixed incorrect handling of one single negative input 5903817466cbSJens Wiklander value in mpi_add_abs() (found by code coverage tests). 5904817466cbSJens Wiklander * Fixed incorrect handling of negative first input 5905817466cbSJens Wiklander value in mpi_sub_abs() (found by code coverage tests). 5906817466cbSJens Wiklander * Fixed incorrect handling of negative first input 5907817466cbSJens Wiklander value in mpi_mod_mpi() and mpi_mod_int(). Resulting 5908817466cbSJens Wiklander change also affects mpi_write_string() (found by code 5909817466cbSJens Wiklander coverage tests). 5910817466cbSJens Wiklander * Corrected is_prime() results for 0, 1 and 2 (found by 5911817466cbSJens Wiklander code coverage tests). 5912817466cbSJens Wiklander * Fixed Camellia and XTEA for 64-bit Windows systems. 5913817466cbSJens Wiklander 5914817466cbSJens Wiklander= Version 0.11.1 released on 2009-05-17 5915817466cbSJens Wiklander * Fixed missing functionality for SHA-224, SHA-256, SHA384, 5916817466cbSJens Wiklander SHA-512 in rsa_pkcs1_sign() 5917817466cbSJens Wiklander 5918817466cbSJens Wiklander= Version 0.11.0 released on 2009-05-03 5919817466cbSJens Wiklander * Fixed a bug in mpi_gcd() so that it also works when both 5920817466cbSJens Wiklander input numbers are even and added testcases to check 5921817466cbSJens Wiklander (found by Pierre Habouzit). 5922817466cbSJens Wiklander * Added support for SHA-224, SHA-256, SHA-384 and SHA-512 5923817466cbSJens Wiklander one way hash functions with the PKCS#1 v1.5 signing and 5924817466cbSJens Wiklander verification. 5925817466cbSJens Wiklander * Fixed minor bug regarding mpi_gcd located within the 5926817466cbSJens Wiklander POLARSSL_GENPRIME block. 5927817466cbSJens Wiklander * Fixed minor memory leak in x509parse_crt() and added better 5928817466cbSJens Wiklander handling of 'full' certificate chains (found by Mathias 5929817466cbSJens Wiklander Olsson). 5930817466cbSJens Wiklander * Centralized file opening and reading for x509 files into 5931817466cbSJens Wiklander load_file() 5932817466cbSJens Wiklander * Made definition of net_htons() endian-clean for big endian 5933817466cbSJens Wiklander systems (Found by Gernot). 5934817466cbSJens Wiklander * Undefining POLARSSL_HAVE_ASM now also handles prevents asm in 5935817466cbSJens Wiklander padlock and timing code. 5936817466cbSJens Wiklander * Fixed an off-by-one buffer allocation in ssl_set_hostname() 5937817466cbSJens Wiklander responsible for crashes and unwanted behaviour. 5938817466cbSJens Wiklander * Added support for Certificate Revocation List (CRL) parsing. 5939817466cbSJens Wiklander * Added support for CRL revocation to x509parse_verify() and 5940817466cbSJens Wiklander SSL/TLS code. 5941817466cbSJens Wiklander * Fixed compatibility of XTEA and Camellia on a 64-bit system 5942817466cbSJens Wiklander (found by Felix von Leitner). 5943817466cbSJens Wiklander 5944817466cbSJens Wiklander= Version 0.10.0 released on 2009-01-12 5945817466cbSJens Wiklander * Migrated XySSL to PolarSSL 5946817466cbSJens Wiklander * Added XTEA symmetric cipher 5947817466cbSJens Wiklander * Added Camellia symmetric cipher 5948817466cbSJens Wiklander * Added support for ciphersuites: SSL_RSA_CAMELLIA_128_SHA, 5949817466cbSJens Wiklander SSL_RSA_CAMELLIA_256_SHA and SSL_EDH_RSA_CAMELLIA_256_SHA 5950817466cbSJens Wiklander * Fixed dangerous bug that can cause a heap overflow in 5951817466cbSJens Wiklander rsa_pkcs1_decrypt (found by Christophe Devine) 5952817466cbSJens Wiklander 5953817466cbSJens Wiklander================================================================ 5954817466cbSJens WiklanderXySSL ChangeLog 5955817466cbSJens Wiklander 5956817466cbSJens Wiklander= Version 0.9 released on 2008-03-16 5957817466cbSJens Wiklander 5958817466cbSJens Wiklander * Added support for ciphersuite: SSL_RSA_AES_128_SHA 5959817466cbSJens Wiklander * Enabled support for large files by default in aescrypt2.c 5960817466cbSJens Wiklander * Preliminary openssl wrapper contributed by David Barrett 5961817466cbSJens Wiklander * Fixed a bug in ssl_write() that caused the same payload to 5962817466cbSJens Wiklander be sent twice in non-blocking mode when send returns EAGAIN 5963817466cbSJens Wiklander * Fixed ssl_parse_client_hello(): session id and challenge must 5964817466cbSJens Wiklander not be swapped in the SSLv2 ClientHello (found by Greg Robson) 5965817466cbSJens Wiklander * Added user-defined callback debug function (Krystian Kolodziej) 5966817466cbSJens Wiklander * Before freeing a certificate, properly zero out all cert. data 5967817466cbSJens Wiklander * Fixed the "mode" parameter so that encryption/decryption are 5968817466cbSJens Wiklander not swapped on PadLock; also fixed compilation on older versions 5969817466cbSJens Wiklander of gcc (bug reported by David Barrett) 5970817466cbSJens Wiklander * Correctly handle the case in padlock_xcryptcbc() when input or 59715b25c76aSJerome Forissier output data is non-aligned by falling back to the software 5972817466cbSJens Wiklander implementation, as VIA Nehemiah cannot handle non-aligned buffers 5973817466cbSJens Wiklander * Fixed a memory leak in x509parse_crt() which was reported by Greg 5974817466cbSJens Wiklander Robson-Garth; some x509write.c fixes by Pascal Vizeli, thanks to 5975817466cbSJens Wiklander Matthew Page who reported several bugs 5976817466cbSJens Wiklander * Fixed x509_get_ext() to accept some rare certificates which have 5977817466cbSJens Wiklander an INTEGER instead of a BOOLEAN for BasicConstraints::cA. 5978817466cbSJens Wiklander * Added support on the client side for the TLS "hostname" extension 5979817466cbSJens Wiklander (patch contributed by David Patino) 5980817466cbSJens Wiklander * Make x509parse_verify() return BADCERT_CN_MISMATCH when an empty 5981817466cbSJens Wiklander string is passed as the CN (bug reported by spoofy) 5982817466cbSJens Wiklander * Added an option to enable/disable the BN assembly code 5983817466cbSJens Wiklander * Updated rsa_check_privkey() to verify that (D*E) = 1 % (P-1)*(Q-1) 5984817466cbSJens Wiklander * Disabled obsolete hash functions by default (MD2, MD4); updated 5985817466cbSJens Wiklander selftest and benchmark to not test ciphers that have been disabled 5986817466cbSJens Wiklander * Updated x509parse_cert_info() to correctly display byte 0 of the 5987817466cbSJens Wiklander serial number, setup correct server port in the ssl client example 5988817466cbSJens Wiklander * Fixed a critical denial-of-service with X.509 cert. verification: 5989817466cbSJens Wiklander peer may cause xyssl to loop indefinitely by sending a certificate 5990817466cbSJens Wiklander for which the RSA signature check fails (bug reported by Benoit) 5991817466cbSJens Wiklander * Added test vectors for: AES-CBC, AES-CFB, DES-CBC and 3DES-CBC, 5992817466cbSJens Wiklander HMAC-MD5, HMAC-SHA1, HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 5993817466cbSJens Wiklander * Fixed HMAC-SHA-384 and HMAC-SHA-512 (thanks to Josh Sinykin) 5994817466cbSJens Wiklander * Modified ssl_parse_client_key_exchange() to protect against 5995817466cbSJens Wiklander Daniel Bleichenbacher attack on PKCS#1 v1.5 padding, as well 5996817466cbSJens Wiklander as the Klima-Pokorny-Rosa extension of Bleichenbacher's attack 5997817466cbSJens Wiklander * Updated rsa_gen_key() so that ctx->N is always nbits in size 5998817466cbSJens Wiklander * Fixed assembly PPC compilation errors on Mac OS X, thanks to 5999817466cbSJens Wiklander David Barrett and Dusan Semen 6000817466cbSJens Wiklander 6001817466cbSJens Wiklander= Version 0.8 released on 2007-10-20 6002817466cbSJens Wiklander 6003817466cbSJens Wiklander * Modified the HMAC functions to handle keys larger 6004817466cbSJens Wiklander than 64 bytes, thanks to Stephane Desneux and gary ng 6005817466cbSJens Wiklander * Fixed ssl_read_record() to properly update the handshake 6006817466cbSJens Wiklander message digests, which fixes IE6/IE7 client authentication 6007817466cbSJens Wiklander * Cleaned up the XYSSL* #defines, suggested by Azriel Fasten 6008817466cbSJens Wiklander * Fixed net_recv(), thanks to Lorenz Schori and Egon Kocjan 6009817466cbSJens Wiklander * Added user-defined callbacks for handling I/O and sessions 6010817466cbSJens Wiklander * Added lots of debugging output in the SSL/TLS functions 6011817466cbSJens Wiklander * Added preliminary X.509 cert. writing by Pascal Vizeli 6012817466cbSJens Wiklander * Added preliminary support for the VIA PadLock routines 6013817466cbSJens Wiklander * Added AES-CFB mode of operation, contributed by chmike 6014817466cbSJens Wiklander * Added an SSL/TLS stress testing program (ssl_test.c) 6015817466cbSJens Wiklander * Updated the RSA PKCS#1 code to allow choosing between 6016817466cbSJens Wiklander RSA_PUBLIC and RSA_PRIVATE, as suggested by David Barrett 6017817466cbSJens Wiklander * Updated ssl_read() to skip 0-length records from OpenSSL 6018817466cbSJens Wiklander * Fixed the make install target to comply with *BSD make 6019817466cbSJens Wiklander * Fixed a bug in mpi_read_binary() on 64-bit platforms 6020817466cbSJens Wiklander * mpi_is_prime() speedups, thanks to Kevin McLaughlin 6021817466cbSJens Wiklander * Fixed a long standing memory leak in mpi_is_prime() 6022817466cbSJens Wiklander * Replaced realloc with malloc in mpi_grow(), and set 6023817466cbSJens Wiklander the sign of zero as positive in mpi_init() (reported 6024817466cbSJens Wiklander by Jonathan M. McCune) 6025817466cbSJens Wiklander 6026817466cbSJens Wiklander= Version 0.7 released on 2007-07-07 6027817466cbSJens Wiklander 6028817466cbSJens Wiklander * Added support for the MicroBlaze soft-core processor 6029817466cbSJens Wiklander * Fixed a bug in ssl_tls.c which sometimes prevented SSL 6030817466cbSJens Wiklander connections from being established with non-blocking I/O 6031817466cbSJens Wiklander * Fixed a couple bugs in the VS6 and UNIX Makefiles 6032817466cbSJens Wiklander * Fixed the "PIC register ebx clobbered in asm" bug 6033817466cbSJens Wiklander * Added HMAC starts/update/finish support functions 6034817466cbSJens Wiklander * Added the SHA-224, SHA-384 and SHA-512 hash functions 6035817466cbSJens Wiklander * Fixed the net_set_*block routines, thanks to Andreas 6036817466cbSJens Wiklander * Added a few demonstration programs: md5sum, sha1sum, 6037817466cbSJens Wiklander dh_client, dh_server, rsa_genkey, rsa_sign, rsa_verify 6038817466cbSJens Wiklander * Added new bignum import and export helper functions 6039817466cbSJens Wiklander * Rewrote README.txt in program/ssl/ca to better explain 6040817466cbSJens Wiklander how to create a test PKI 6041817466cbSJens Wiklander 6042817466cbSJens Wiklander= Version 0.6 released on 2007-04-01 6043817466cbSJens Wiklander 6044817466cbSJens Wiklander * Ciphers used in SSL/TLS can now be disabled at compile 6045817466cbSJens Wiklander time, to reduce the memory footprint on embedded systems 6046817466cbSJens Wiklander * Added multiply assembly code for the TriCore and modified 6047817466cbSJens Wiklander havege_struct for this processor, thanks to David Patiño 6048817466cbSJens Wiklander * Added multiply assembly code for 64-bit PowerPCs, 6049817466cbSJens Wiklander thanks to Peking University and the OSU Open Source Lab 6050817466cbSJens Wiklander * Added experimental support of Quantum Cryptography 6051817466cbSJens Wiklander * Added support for autoconf, contributed by Arnaud Cornet 6052817466cbSJens Wiklander * Fixed "long long" compilation issues on IA-64 and PPC64 6053817466cbSJens Wiklander * Fixed a bug introduced in xyssl-0.5/timing.c: hardclock 6054817466cbSJens Wiklander was not being correctly defined on ARM and MIPS 6055817466cbSJens Wiklander 6056817466cbSJens Wiklander= Version 0.5 released on 2007-03-01 6057817466cbSJens Wiklander 6058817466cbSJens Wiklander * Added multiply assembly code for SPARC and Alpha 6059817466cbSJens Wiklander * Added (beta) support for non-blocking I/O operations 6060817466cbSJens Wiklander * Implemented session resuming and client authentication 6061817466cbSJens Wiklander * Fixed some portability issues on WinCE, MINIX 3, Plan9 6062817466cbSJens Wiklander (thanks to Benjamin Newman), HP-UX, FreeBSD and Solaris 6063817466cbSJens Wiklander * Improved the performance of the EDH key exchange 6064817466cbSJens Wiklander * Fixed a bug that caused valid packets with a payload 6065817466cbSJens Wiklander size of 16384 bytes to be rejected 6066817466cbSJens Wiklander 6067817466cbSJens Wiklander= Version 0.4 released on 2007-02-01 6068817466cbSJens Wiklander 6069817466cbSJens Wiklander * Added support for Ephemeral Diffie-Hellman key exchange 6070817466cbSJens Wiklander * Added multiply asm code for SSE2, ARM, PPC, MIPS and M68K 6071817466cbSJens Wiklander * Various improvement to the modular exponentiation code 6072817466cbSJens Wiklander * Rewrote the headers to generate the API docs with doxygen 6073817466cbSJens Wiklander * Fixed a bug in ssl_encrypt_buf (incorrect padding was 6074817466cbSJens Wiklander generated) and in ssl_parse_client_hello (max. client 6075817466cbSJens Wiklander version was not properly set), thanks to Didier Rebeix 6076817466cbSJens Wiklander * Fixed another bug in ssl_parse_client_hello: clients with 6077817466cbSJens Wiklander cipherlists larger than 96 bytes were incorrectly rejected 6078817466cbSJens Wiklander * Fixed a couple memory leak in x509_read.c 6079817466cbSJens Wiklander 6080817466cbSJens Wiklander= Version 0.3 released on 2007-01-01 6081817466cbSJens Wiklander 6082817466cbSJens Wiklander * Added server-side SSLv3 and TLSv1.0 support 6083817466cbSJens Wiklander * Multiple fixes to enhance the compatibility with g++, 6084817466cbSJens Wiklander thanks to Xosé Antón Otero Ferreira 6085817466cbSJens Wiklander * Fixed a bug in the CBC code, thanks to dowst; also, 6086817466cbSJens Wiklander the bignum code is no longer dependent on long long 6087817466cbSJens Wiklander * Updated rsa_pkcs1_sign to handle arbitrary large inputs 6088817466cbSJens Wiklander * Updated timing.c for improved compatibility with i386 6089817466cbSJens Wiklander and 486 processors, thanks to Arnaud Cornet 6090817466cbSJens Wiklander 6091817466cbSJens Wiklander= Version 0.2 released on 2006-12-01 6092817466cbSJens Wiklander 6093817466cbSJens Wiklander * Updated timing.c to support ARM and MIPS arch 6094817466cbSJens Wiklander * Updated the MPI code to support 8086 on MSVC 1.5 6095817466cbSJens Wiklander * Added the copyright notice at the top of havege.h 6096817466cbSJens Wiklander * Fixed a bug in sha2_hmac, thanks to newsoft/Wenfang Zhang 6097817466cbSJens Wiklander * Fixed a bug reported by Adrian Rüegsegger in x509_read_key 6098817466cbSJens Wiklander * Fixed a bug reported by Torsten Lauter in ssl_read_record 6099817466cbSJens Wiklander * Fixed a bug in rsa_check_privkey that would wrongly cause 6100817466cbSJens Wiklander valid RSA keys to be dismissed (thanks to oldwolf) 6101817466cbSJens Wiklander * Fixed a bug in mpi_is_prime that caused some primes to fail 6102817466cbSJens Wiklander the Miller-Rabin primality test 6103817466cbSJens Wiklander 6104817466cbSJens Wiklander I'd also like to thank Younès Hafri for the CRUX linux port, 6105817466cbSJens Wiklander Khalil Petit who added XySSL into pkgsrc and Arnaud Cornet 6106817466cbSJens Wiklander who maintains the Debian package :-) 6107817466cbSJens Wiklander 6108817466cbSJens Wiklander= Version 0.1 released on 2006-11-01 6109