1mbed TLS ChangeLog (Sorted per branch, date) 2 3= mbed TLS 3.1.0 branch released 2021-12-17 4 5API changes 6 * New error code for GCM: MBEDTLS_ERR_GCM_BUFFER_TOO_SMALL. 7 Alternative GCM implementations are expected to verify 8 the length of the provided output buffers and to return the 9 MBEDTLS_ERR_GCM_BUFFER_TOO_SMALL in case the buffer length is too small. 10 * You can configure groups for a TLS key exchange with the new function 11 mbedtls_ssl_conf_groups(). It extends mbedtls_ssl_conf_curves(). 12 * Declare a number of structure fields as public: the fields of 13 mbedtls_ecp_curve_info, the fields describing the result of ASN.1 and 14 X.509 parsing, and finally the field fd of mbedtls_net_context on 15 POSIX/Unix-like platforms. 16 17Requirement changes 18 * Sign-magnitude and one's complement representations for signed integers are 19 not supported. Two's complement is the only supported representation. 20 21New deprecations 22 * Deprecate mbedtls_ssl_conf_curves() in favor of the more generic 23 mbedtls_ssl_conf_groups(). 24 25Removals 26 * Remove the partial support for running unit tests via Greentea on Mbed OS, 27 which had been unmaintained since 2018. 28 29Features 30 * Enable support for Curve448 via the PSA API. Contributed by 31 Archana Madhavan in #4626. Fixes #3399 and #4249. 32 * The identifier of the CID TLS extension can be configured by defining 33 MBEDTLS_TLS_EXT_CID at compile time. 34 * Implement the PSA multipart AEAD interface, currently supporting 35 ChaChaPoly and GCM. 36 * Warn if errors from certain functions are ignored. This is currently 37 supported on GCC-like compilers and on MSVC and can be configured through 38 the macro MBEDTLS_CHECK_RETURN. The warnings are always enabled 39 (where supported) for critical functions where ignoring the return 40 value is almost always a bug. Enable the new configuration option 41 MBEDTLS_CHECK_RETURN_WARNING to get warnings for other functions. This 42 is currently implemented in the AES, DES and md modules, and will be 43 extended to other modules in the future. 44 * Add missing PSA macros declared by PSA Crypto API 1.0.0: 45 PSA_ALG_IS_SIGN_HASH, PSA_ALG_NONE, PSA_HASH_BLOCK_LENGTH, PSA_KEY_ID_NULL. 46 * Add support for CCM*-no-tag cipher to the PSA. 47 Currently only 13-byte long IV's are supported. 48 For decryption a minimum of 16-byte long input is expected. 49 These restrictions may be subject to change. 50 * Add new API mbedtls_ct_memcmp for constant time buffer comparison. 51 * Add functions to get the IV and block size from cipher_info structs. 52 * Add functions to check if a cipher supports variable IV or key size. 53 * Add the internal implementation of and support for CCM to the PSA multipart 54 AEAD interface. 55 * Mbed TLS provides a minimum viable implementation of the TLS 1.3 56 protocol. See docs/architecture/tls13-support.md for the definition of 57 the TLS 1.3 Minimum Viable Product (MVP). The MBEDTLS_SSL_PROTO_TLS1_3 58 configuration option controls the enablement of the support. The APIs 59 mbedtls_ssl_conf_min_version() and mbedtls_ssl_conf_max_version() allow 60 to select the 1.3 version of the protocol to establish a TLS connection. 61 * Add PSA API definition for ARIA. 62 63Security 64 * Zeroize several intermediate variables used to calculate the expected 65 value when verifying a MAC or AEAD tag. This hardens the library in 66 case the value leaks through a memory disclosure vulnerability. For 67 example, a memory disclosure vulnerability could have allowed a 68 man-in-the-middle to inject fake ciphertext into a DTLS connection. 69 * In psa_aead_generate_nonce(), do not read back from the output buffer. 70 This fixes a potential policy bypass or decryption oracle vulnerability 71 if the output buffer is in memory that is shared with an untrusted 72 application. 73 * In psa_cipher_generate_iv() and psa_cipher_encrypt(), do not read back 74 from the output buffer. This fixes a potential policy bypass or decryption 75 oracle vulnerability if the output buffer is in memory that is shared with 76 an untrusted application. 77 * Fix a double-free that happened after mbedtls_ssl_set_session() or 78 mbedtls_ssl_get_session() failed with MBEDTLS_ERR_SSL_ALLOC_FAILED 79 (out of memory). After that, calling mbedtls_ssl_session_free() 80 and mbedtls_ssl_free() would cause an internal session buffer to 81 be free()'d twice. 82 83Bugfix 84 * Stop using reserved identifiers as local variables. Fixes #4630. 85 * The GNU makefiles invoke python3 in preference to python except on Windows. 86 The check was accidentally not performed when cross-compiling for Windows 87 on Linux. Fix this. Fixes #4774. 88 * Prevent divide by zero if either of PSA_CIPHER_ENCRYPT_OUTPUT_SIZE() or 89 PSA_CIPHER_UPDATE_OUTPUT_SIZE() were called using an asymmetric key type. 90 * Fix a parameter set but unused in psa_crypto_cipher.c. Fixes #4935. 91 * Don't use the obsolete header path sys/fcntl.h in unit tests. 92 These header files cause compilation errors in musl. 93 Fixes #4969. 94 * Fix missing constraints on x86_64 and aarch64 assembly code 95 for bignum multiplication that broke some bignum operations with 96 (at least) Clang 12. 97 Fixes #4116, #4786, #4917, #4962. 98 * Fix mbedtls_cipher_crypt: AES-ECB when MBEDTLS_USE_PSA_CRYPTO is enabled. 99 * Failures of alternative implementations of AES or DES single-block 100 functions enabled with MBEDTLS_AES_ENCRYPT_ALT, MBEDTLS_AES_DECRYPT_ALT, 101 MBEDTLS_DES_CRYPT_ECB_ALT or MBEDTLS_DES3_CRYPT_ECB_ALT were ignored. 102 This does not concern the implementation provided with Mbed TLS, 103 where this function cannot fail, or full-module replacements with 104 MBEDTLS_AES_ALT or MBEDTLS_DES_ALT. Reported by Armelle Duboc in #1092. 105 * Some failures of HMAC operations were ignored. These failures could only 106 happen with an alternative implementation of the underlying hash module. 107 * Fix the error returned by psa_generate_key() for a public key. Fixes #4551. 108 * Fix compile-time or run-time errors in PSA 109 AEAD functions when ChachaPoly is disabled. Fixes #5065. 110 * Remove PSA'a AEAD finish/verify output buffer limitation for GCM. 111 The requirement of minimum 15 bytes for output buffer in 112 psa_aead_finish() and psa_aead_verify() does not apply to the built-in 113 implementation of GCM. 114 * Move GCM's update output buffer length verification from PSA AEAD to 115 the built-in implementation of the GCM. 116 The requirement for output buffer size to be equal or greater then 117 input buffer size is valid only for the built-in implementation of GCM. 118 Alternative GCM implementations can process whole blocks only. 119 * Fix the build of sample programs when neither MBEDTLS_ERROR_C nor 120 MBEDTLS_ERROR_STRERROR_DUMMY is enabled. 121 * Fix PSA_ALG_RSA_PSS verification accepting an arbitrary salt length. 122 This algorithm now accepts only the same salt length for verification 123 that it produces when signing, as documented. Use the new algorithm 124 PSA_ALG_RSA_PSS_ANY_SALT to accept any salt length. Fixes #4946. 125 * The existing predicate macro name PSA_ALG_IS_HASH_AND_SIGN is now reserved 126 for algorithm values that fully encode the hashing step, as per the PSA 127 Crypto API specification. This excludes PSA_ALG_RSA_PKCS1V15_SIGN_RAW and 128 PSA_ALG_ECDSA_ANY. The new predicate macro PSA_ALG_IS_SIGN_HASH covers 129 all algorithms that can be used with psa_{sign,verify}_hash(), including 130 these two. 131 * Fix issue in Makefile on Linux with SHARED=1, that caused shared libraries 132 not to list other shared libraries they need. 133 * Fix a bug in mbedtls_gcm_starts() when the bit length of the iv 134 exceeds 2^32. Fixes #4884. 135 * Fix an uninitialized variable warning in test_suite_ssl.function with GCC 136 version 11. 137 * Fix the build when no SHA2 module is included. Fixes #4930. 138 * Fix the build when only the bignum module is included. Fixes #4929. 139 * Fix a potential invalid pointer dereference and infinite loop bugs in 140 pkcs12 functions when the password is empty. Fix the documentation to 141 better describe the inputs to these functions and their possible values. 142 Fixes #5136. 143 * The key usage flags PSA_KEY_USAGE_SIGN_MESSAGE now allows the MAC 144 operations psa_mac_compute() and psa_mac_sign_setup(). 145 * The key usage flags PSA_KEY_USAGE_VERIFY_MESSAGE now allows the MAC 146 operations psa_mac_verify() and psa_mac_verify_setup(). 147 148Changes 149 * Explicitly mark the fields mbedtls_ssl_session.exported and 150 mbedtls_ssl_config.respect_cli_pref as private. This was an 151 oversight during the run-up to the release of Mbed TLS 3.0. 152 The fields were never intended to be public. 153 * Implement multi-part CCM API. 154 The multi-part functions: mbedtls_ccm_starts(), mbedtls_ccm_set_lengths(), 155 mbedtls_ccm_update_ad(), mbedtls_ccm_update(), mbedtls_ccm_finish() 156 were introduced in mbedTLS 3.0 release, however their implementation was 157 postponed until now. 158 Implemented functions support chunked data input for both CCM and CCM* 159 algorithms. 160 * Remove MBEDTLS_SSL_EXPORT_KEYS, making it always on and increasing the 161 code size by about 80B on an M0 build. This option only gated an ability 162 to set a callback, but was deemed unnecessary as it was yet another define 163 to remember when writing tests, or test configurations. Fixes #4653. 164 * Improve the performance of base64 constant-flow code. The result is still 165 slower than the original non-constant-flow implementation, but much faster 166 than the previous constant-flow implementation. Fixes #4814. 167 * Ignore plaintext/ciphertext lengths for CCM*-no-tag operations. 168 For CCM* encryption/decryption without authentication, input 169 length will be ignored. 170 * Indicate in the error returned if the nonce length used with 171 ChaCha20-Poly1305 is invalid, and not just unsupported. 172 * The mbedcrypto library includes a new source code module constant_time.c, 173 containing various functions meant to resist timing side channel attacks. 174 This module does not have a separate configuration option, and functions 175 from this module will be included in the build as required. Currently 176 most of the interface of this module is private and may change at any 177 time. 178 * The generated configuration-independent files are now automatically 179 generated by the CMake build system on Unix-like systems. This is not 180 yet supported when cross-compiling. 181 182= Mbed TLS 3.0.0 branch released 2021-07-07 183 184API changes 185 * Remove HAVEGE module. 186 The design of HAVEGE makes it unsuitable for microcontrollers. Platforms 187 with a more complex CPU usually have an operating system interface that 188 provides better randomness. Instead of HAVEGE, declare OS or hardware RNG 189 interfaces with mbedtls_entropy_add_source() and/or use an entropy seed 190 file created securely during device provisioning. See 191 https://tls.mbed.org/kb/how-to/add-entropy-sources-to-entropy-pool for 192 more information. 193 * Add missing const attributes to API functions. 194 * Remove helpers for the transition from Mbed TLS 1.3 to Mbed TLS 2.0: the 195 header compat-1.3.h and the script rename.pl. 196 * Remove certs module from the API. 197 Transfer keys and certificates embedded in the library to the test 198 component. This contributes to minimizing library API and discourages 199 users from using unsafe keys in production. 200 * Move alt helpers and definitions. 201 Various helpers and definitions available for use in alt implementations 202 have been moved out of the include/ directory and into the library/ 203 directory. The files concerned are ecp_internal.h and rsa_internal.h 204 which have also been renamed to ecp_internal_alt.h and rsa_alt_helpers.h 205 respectively. 206 * Move internal headers. 207 Header files that were only meant for the library's internal use and 208 were not meant to be used in application code have been moved out of 209 the include/ directory. The headers concerned are bn_mul.h, aesni.h, 210 padlock.h, entropy_poll.h and *_internal.h. 211 * Drop support for parsing SSLv2 ClientHello 212 (MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO). 213 * Drop support for SSLv3 (MBEDTLS_SSL_PROTO_SSL3). 214 * Drop support for TLS record-level compression (MBEDTLS_ZLIB_SUPPORT). 215 * Drop support for RC4 TLS ciphersuites. 216 * Drop support for single-DES ciphersuites. 217 * Drop support for MBEDTLS_SSL_HW_RECORD_ACCEL. 218 * Update AEAD output size macros to bring them in line with the PSA Crypto 219 API version 1.0 spec. This version of the spec parameterizes them on the 220 key type used, as well as the key bit-size in the case of 221 PSA_AEAD_TAG_LENGTH. 222 * Add configuration option MBEDTLS_X509_REMOVE_INFO which 223 removes the mbedtls_x509_*_info(), mbedtls_debug_print_crt() 224 as well as other functions and constants only used by 225 those functions. This reduces the code footprint by 226 several kB. 227 * Remove SSL error codes `MBEDTLS_ERR_SSL_CERTIFICATE_REQUIRED` 228 and `MBEDTLS_ERR_SSL_INVALID_VERIFY_HASH` which are never 229 returned from the public SSL API. 230 * Remove `MBEDTLS_ERR_SSL_CERTIFICATE_TOO_LARGE` and return 231 `MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL` instead. 232 * The output parameter of mbedtls_sha512_finish, mbedtls_sha512, 233 mbedtls_sha256_finish and mbedtls_sha256 now has a pointer type 234 rather than array type. This removes spurious warnings in some compilers 235 when outputting a SHA-384 or SHA-224 hash into a buffer of exactly 236 the hash size. 237 * Remove the MBEDTLS_TEST_NULL_ENTROPY config option. Fixes #4388. 238 * The interface of the GCM module has changed to remove restrictions on 239 how the input to multipart operations is broken down. mbedtls_gcm_finish() 240 now takes extra output parameters for the last partial output block. 241 mbedtls_gcm_update() now takes extra parameters for the output length. 242 The software implementation always produces the full output at each 243 call to mbedtls_gcm_update(), but alternative implementations activated 244 by MBEDTLS_GCM_ALT may delay partial blocks to the next call to 245 mbedtls_gcm_update() or mbedtls_gcm_finish(). Furthermore, applications 246 no longer pass the associated data to mbedtls_gcm_starts(), but to the 247 new function mbedtls_gcm_update_ad(). 248 These changes are backward compatible for users of the cipher API. 249 * Replace MBEDTLS_SHA512_NO_SHA384 config option with MBEDTLS_SHA384_C. 250 This separates config option enabling the SHA384 algorithm from option 251 enabling the SHA512 algorithm. Fixes #4034. 252 * Introduce MBEDTLS_SHA224_C. 253 This separates config option enabling the SHA224 algorithm from option 254 enabling SHA256. 255 * The getter and setter API of the SSL session cache (used for 256 session-ID based session resumption) has changed to that of 257 a key-value store with keys being session IDs and values 258 being opaque instances of `mbedtls_ssl_session`. 259 * Remove the mode parameter from RSA operation functions. Signature and 260 decryption functions now always use the private key and verification and 261 encryption use the public key. Verification functions also no longer have 262 RNG parameters. 263 * Modify semantics of `mbedtls_ssl_conf_[opaque_]psk()`: 264 In Mbed TLS 2.X, the API prescribes that later calls overwrite 265 the effect of earlier calls. In Mbed TLS 3.0, calling 266 `mbedtls_ssl_conf_[opaque_]psk()` more than once will fail, 267 leaving the PSK that was configured first intact. 268 Support for more than one PSK may be added in 3.X. 269 * The function mbedtls_x509write_csr_set_extension() has an extra parameter 270 which allows to mark an extension as critical. Fixes #4055. 271 * For multi-part AEAD operations with the cipher module, calling 272 mbedtls_cipher_finish() is now mandatory. Previously the documentation 273 was unclear on this point, and this function happened to never do 274 anything with the currently implemented AEADs, so in practice it was 275 possible to skip calling it, which is no longer supported. 276 * The option MBEDTLS_ECP_FIXED_POINT_OPTIM use pre-computed comb tables 277 instead of computing tables in runtime. Thus, this option now increase 278 code size, and it does not increase RAM usage in runtime anymore. 279 * Remove the SSL APIs mbedtls_ssl_get_input_max_frag_len() and 280 mbedtls_ssl_get_output_max_frag_len(), and add a new API 281 mbedtls_ssl_get_max_in_record_payload(), complementing the existing 282 mbedtls_ssl_get_max_out_record_payload(). 283 Uses of mbedtls_ssl_get_input_max_frag_len() and 284 mbedtls_ssl_get_input_max_frag_len() should be replaced by 285 mbedtls_ssl_get_max_in_record_payload() and 286 mbedtls_ssl_get_max_out_record_payload(), respectively. 287 * mbedtls_rsa_init() now always selects the PKCS#1v1.5 encoding for an RSA 288 key. To use an RSA key with PSS or OAEP, call mbedtls_rsa_set_padding() 289 after initializing the context. mbedtls_rsa_set_padding() now returns an 290 error if its parameters are invalid. 291 * Replace MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE by a runtime 292 configuration function mbedtls_ssl_conf_preference_order(). Fixes #4398. 293 * Instead of accessing the len field of a DHM context, which is no longer 294 supported, use the new function mbedtls_dhm_get_len() . 295 * In modules that implement cryptographic hash functions, many functions 296 mbedtls_xxx() now return int instead of void, and the corresponding 297 function mbedtls_xxx_ret() which was identical except for returning int 298 has been removed. This also concerns mbedtls_xxx_drbg_update(). See the 299 migration guide for more information. Fixes #4212. 300 * For all functions that take a random number generator (RNG) as a 301 parameter, this parameter is now mandatory (that is, NULL is not an 302 acceptable value). Functions which previously accepted NULL and now 303 reject it are: the X.509 CRT and CSR writing functions; the PK and RSA 304 sign and decrypt function; mbedtls_rsa_private(); the functions 305 in DHM and ECDH that compute the shared secret; the scalar multiplication 306 functions in ECP. 307 * The following functions now require an RNG parameter: 308 mbedtls_ecp_check_pub_priv(), mbedtls_pk_check_pair(), 309 mbedtls_pk_parse_key(), mbedtls_pk_parse_keyfile(). 310 * mbedtls_ssl_conf_export_keys_ext_cb() and 311 mbedtls_ssl_conf_export_keys_cb() have been removed and 312 replaced by a new API mbedtls_ssl_set_export_keys_cb(). 313 Raw keys and IVs are no longer passed to the callback. 314 Further, callbacks now receive an additional parameter 315 indicating the type of secret that's being exported, 316 paving the way for the larger number of secrets 317 in TLS 1.3. Finally, the key export callback and 318 context are now connection-specific. 319 * Signature functions in the RSA and PK modules now require the hash 320 length parameter to be the size of the hash input. For RSA signatures 321 other than raw PKCS#1 v1.5, this must match the output size of the 322 specified hash algorithm. 323 * The functions mbedtls_pk_sign(), mbedtls_pk_sign_restartable(), 324 mbedtls_ecdsa_write_signature() and 325 mbedtls_ecdsa_write_signature_restartable() now take an extra parameter 326 indicating the size of the output buffer for the signature. 327 * Implement one-shot cipher functions, psa_cipher_encrypt and 328 psa_cipher_decrypt, according to the PSA Crypto API 1.0.0 329 specification. 330 * Direct access to fields of structures declared in public headers is no 331 longer supported except for fields that are documented public. Use accessor 332 functions instead. For more information, see the migration guide entry 333 "Most structure fields are now private". 334 * mbedtls_ssl_get_session_pointer() has been removed, and 335 mbedtls_ssl_{set,get}_session() may now only be called once for any given 336 SSL context. 337 338Default behavior changes 339 * Enable by default the functionalities which have no reason to be disabled. 340 They are: ARIA block cipher, CMAC mode, elliptic curve J-PAKE library and 341 Key Wrapping mode as defined in NIST SP 800-38F. Fixes #4036. 342 * Some default policies for X.509 certificate verification and TLS have 343 changed: curves and hashes weaker than 255 bits are no longer accepted 344 by default. The default order in TLS now favors faster curves over larger 345 curves. 346 347Requirement changes 348 * The library now uses the %zu format specifier with the printf() family of 349 functions, so requires a toolchain that supports it. This change does not 350 affect the maintained LTS branches, so when contributing changes please 351 bear this in mind and do not add them to backported code. 352 * If you build the development version of Mbed TLS, rather than an official 353 release, some configuration-independent files are now generated at build 354 time rather than checked into source control. This includes some library 355 source files as well as the Visual Studio solution. Perl, Python 3 and a 356 C compiler for the host platform are required. See “Generated source files 357 in the development branch” in README.md for more information. 358 * Refresh the minimum supported versions of tools to build the 359 library. CMake versions older than 3.10.2 and Python older 360 than 3.6 are no longer supported. 361 362Removals 363 * Remove the MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_CERTIFICATES 364 compile-time option, which was off by default. Users should not trust 365 certificates signed with SHA-1 due to the known attacks against SHA-1. 366 If needed, SHA-1 certificates can still be verified by using a custom 367 verification profile. 368 * Removed deprecated things in psa/crypto_compat.h. Fixes #4284 369 * Removed deprecated functions from hashing modules. Fixes #4280. 370 * Remove PKCS#11 library wrapper. PKCS#11 has limited functionality, 371 lacks automated tests and has scarce documentation. Also, PSA Crypto 372 provides a more flexible private key management. 373 More details on PCKS#11 wrapper removal can be found in the mailing list 374 https://lists.trustedfirmware.org/pipermail/mbed-tls/2020-April/000024.html 375 * Remove deprecated error codes. Fix #4283 376 * Remove MBEDTLS_ENABLE_WEAK_CIPHERSUITES configuration option. Fixes #4416. 377 * Remove the MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_CERTIFICATES 378 compile-time option. This option has been inactive for a long time. 379 Please use the `lifetime` parameter of `mbedtls_ssl_ticket_setup()` 380 instead. 381 * Remove the following deprecated functions and constants of hex-encoded 382 primes based on RFC 5114 and RFC 3526 from library code and tests: 383 mbedtls_aes_encrypt(), mbedtls_aes_decrypt(), mbedtls_mpi_is_prime(), 384 mbedtls_cipher_auth_encrypt(), mbedtls_cipher_auth_decrypt(), 385 mbedtls_ctr_drbg_update(), mbedtls_hmac_drbg_update(), 386 mbedtls_ecdsa_write_signature_det(), mbedtls_ecdsa_sign_det(), 387 mbedtls_ssl_conf_dh_param(), mbedtls_ssl_get_max_frag_len(), 388 MBEDTLS_DHM_RFC5114_MODP_2048_P, MBEDTLS_DHM_RFC5114_MODP_2048_G, 389 MBEDTLS_DHM_RFC3526_MODP_2048_P, MBEDTLS_DHM_RFC3526_MODP_2048_G, 390 MBEDTLS_DHM_RFC3526_MODP_3072_P, MBEDTLS_DHM_RFC3526_MODP_3072_G, 391 MBEDTLS_DHM_RFC3526_MODP_4096_P, MBEDTLS_DHM_RFC3526_MODP_4096_G. 392 Remove the deprecated file: include/mbedtls/net.h. Fixes #4282. 393 * Remove MBEDTLS_SSL_MAX_CONTENT_LEN configuration option, since 394 MBEDTLS_SSL_IN_CONTENT_LEN and MBEDTLS_SSL_OUT_CONTENT_LEN replace 395 it. Fixes #4362. 396 * Remove the MBEDTLS_SSL_RECORD_CHECKING option and enable by default its 397 previous action. Fixes #4361. 398 * Remove support for TLS 1.0, TLS 1.1 and DTLS 1.0, as well as support for 399 CBC record splitting, fallback SCSV, and the ability to configure 400 ciphersuites per version, which are no longer relevant. This removes the 401 configuration options MBEDTLS_SSL_PROTO_TLS1, 402 MBEDTLS_SSL_PROTO_TLS1_1, MBEDTLS_SSL_CBC_RECORD_SPLITTING and 403 MBEDTLS_SSL_FALLBACK_SCSV as well as the functions 404 mbedtls_ssl_conf_cbc_record_splitting(), 405 mbedtls_ssl_get_key_exchange_md_ssl_tls(), mbedtls_ssl_conf_fallback(), 406 and mbedtls_ssl_conf_ciphersuites_for_version(). Fixes #4286. 407 * The RSA module no longer supports private-key operations with the public 408 key and vice versa. 409 * Remove the MBEDTLS_SSL_DTLS_BADMAC_LIMIT config.h option. Fixes #4403. 410 * Remove all the 3DES ciphersuites: 411 MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA, 412 MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, 413 MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, 414 MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA, 415 MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, 416 MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, 417 MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA, 418 MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA, 419 MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA. Remove the 420 MBEDTLS_REMOVE_3DES_CIPHERSUITES option which is no longer relevant. 421 Fixes #4367. 422 * Remove the MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 option and let the code 423 behave as if it was always disabled. Fixes #4386. 424 * Remove MBEDTLS_ECDH_LEGACY_CONTEXT config option since this was purely for 425 backward compatibility which is no longer supported. Addresses #4404. 426 * Remove the following macros: MBEDTLS_CHECK_PARAMS, 427 MBEDTLS_CHECK_PARAMS_ASSERT, MBEDTLS_PARAM_FAILED, 428 MBEDTLS_PARAM_FAILED_ALT. Fixes #4313. 429 * Remove the MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION config.h 430 option. The mbedtls_x509_crt_parse_der_with_ext_cb() is the way to go for 431 migration path. Fixes #4378. 432 * Remove the MBEDTLS_X509_CHECK_KEY_USAGE and 433 MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE config.h options and let the code 434 behave as if they were always enabled. Fixes #4405. 435 * MBEDTLS_ECP_MAX_BITS is no longer a configuration option because it is 436 now determined automatically based on supported curves. 437 * Remove the following functions: mbedtls_timing_self_test(), 438 mbedtls_hardclock_poll(), mbedtls_timing_hardclock() and 439 mbedtls_set_alarm(). Fixes #4083. 440 * The configuration option MBEDTLS_ECP_NO_INTERNAL_RNG has been removed as 441 it no longer had any effect. 442 * Remove all support for MD2, MD4, RC4, Blowfish and XTEA. This removes the 443 corresponding modules and all their APIs and related configuration 444 options. Fixes #4084. 445 * Remove MBEDTLS_SSL_TRUNCATED_HMAC and also remove 446 MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT config option. Users are better served by 447 using a CCM-8 ciphersuite than a CBC ciphersuite with truncated HMAC. 448 See issue #4341 for more details. 449 * Remove the compile-time option 450 MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_KEY_EXCHANGE. 451 452Features 453 * Add mbedtls_rsa_rsassa_pss_sign_ext() function allowing to generate a 454 signature with a specific salt length. This function allows to validate 455 test cases provided in the NIST's CAVP test suite. Contributed by Cédric 456 Meuter in PR #3183. 457 * Added support for built-in driver keys through the PSA opaque crypto 458 driver interface. Refer to the documentation of 459 MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS for more information. 460 * Implement psa_sign_message() and psa_verify_message(). 461 * The multi-part GCM interface (mbedtls_gcm_update() or 462 mbedtls_cipher_update()) no longer requires the size of partial inputs to 463 be a multiple of 16. 464 * The multi-part GCM interface now supports chunked associated data through 465 multiple calls to mbedtls_gcm_update_ad(). 466 * The new function mbedtls_mpi_random() generates a random value in a 467 given range uniformly. 468 * Alternative implementations of the AES, DHM, ECJPAKE, ECP, RSA and timing 469 modules had undocumented constraints on their context types. These 470 constraints have been relaxed. 471 See docs/architecture/alternative-implementations.md for the remaining 472 constraints. 473 * The new functions mbedtls_dhm_get_len() and mbedtls_dhm_get_bitlen() 474 query the size of the modulus in a Diffie-Hellman context. 475 * The new function mbedtls_dhm_get_value() copy a field out of a 476 Diffie-Hellman context. 477 * Use the new function mbedtls_ecjpake_set_point_format() to select the 478 point format for ECJPAKE instead of accessing the point_format field 479 directly, which is no longer supported. 480 * Implement psa_mac_compute() and psa_mac_verify() as defined in the 481 PSA Cryptograpy API 1.0.0 specification. 482 483Security 484 * Fix a bias in the generation of finite-field Diffie-Hellman-Merkle (DHM) 485 private keys and of blinding values for DHM and elliptic curves (ECP) 486 computations. Reported by FlorianF89 in #4245. 487 * Fix a potential side channel vulnerability in ECDSA ephemeral key generation. 488 An adversary who is capable of very precise timing measurements could 489 learn partial information about the leading bits of the nonce used for the 490 signature, allowing the recovery of the private key after observing a 491 large number of signature operations. This completes a partial fix in 492 Mbed TLS 2.20.0. 493 * An adversary with access to precise enough information about memory 494 accesses (typically, an untrusted operating system attacking a secure 495 enclave) could recover an RSA private key after observing the victim 496 performing a single private-key operation. Found and reported by 497 Zili KOU, Wenjian HE, Sharad Sinha, and Wei ZHANG. 498 * An adversary with access to precise enough timing information (typically, a 499 co-located process) could recover a Curve25519 or Curve448 static ECDH key 500 after inputting a chosen public key and observing the victim performing the 501 corresponding private-key operation. Found and reported by Leila Batina, 502 Lukas Chmielewski, Björn Haase, Niels Samwel and Peter Schwabe. 503 504Bugfix 505 * Fix premature fopen() call in mbedtls_entropy_write_seed_file which may 506 lead to the seed file corruption in case if the path to the seed file is 507 equal to MBEDTLS_PLATFORM_STD_NV_SEED_FILE. Contributed by Victor 508 Krasnoshchok in #3616. 509 * PSA functions creating a key now return PSA_ERROR_INVALID_ARGUMENT rather 510 than PSA_ERROR_INVALID_HANDLE when the identifier specified for the key 511 to create is not valid, bringing them in line with version 1.0.0 of the 512 specification. Fix #4271. 513 * Add printf function attributes to mbedtls_debug_print_msg to ensure we 514 get printf format specifier warnings. 515 * PSA functions other than psa_open_key now return PSA_ERROR_INVALID_HANDLE 516 rather than PSA_ERROR_DOES_NOT_EXIST for an invalid handle, bringing them 517 in line with version 1.0.0 of the specification. Fix #4162. 518 * Fix a bug in ECDSA that would cause it to fail when the hash is all-bits 519 zero. Fixes #1792 520 * Fix some cases in the bignum module where the library constructed an 521 unintended representation of the value 0 which was not processed 522 correctly by some bignum operations. This could happen when 523 mbedtls_mpi_read_string() was called on "-0", or when 524 mbedtls_mpi_mul_mpi() and mbedtls_mpi_mul_int() was called with one of 525 the arguments being negative and the other being 0. Fixes #4643. 526 * Fix a compilation error when MBEDTLS_ECP_RANDOMIZE_MXZ_ALT is 527 defined. Fixes #4217. 528 * Fix an incorrect error code when parsing a PKCS#8 private key. 529 * In a TLS client, enforce the Diffie-Hellman minimum parameter size 530 set with mbedtls_ssl_conf_dhm_min_bitlen() precisely. Before, the 531 minimum size was rounded down to the nearest multiple of 8. 532 * In library/net_sockets.c, _POSIX_C_SOURCE and _XOPEN_SOURCE are 533 defined to specific values. If the code is used in a context 534 where these are already defined, this can result in a compilation 535 error. Instead, assume that if they are defined, the values will 536 be adequate to build Mbed TLS. 537 * With MBEDTLS_PSA_CRYPTO_C disabled, some functions were getting built 538 nonetheless, resulting in undefined reference errors when building a 539 shared library. Reported by Guillermo Garcia M. in #4411. 540 * The cipher suite TLS-RSA-WITH-CAMELLIA-256-GCM-SHA384 was not available 541 when SHA-1 was disabled and was offered when SHA-1 was enabled but SHA-384 542 was disabled. Fix the dependency. Fixes #4472. 543 * Do not offer SHA384 cipher suites when SHA-384 is disabled. Fixes #4499. 544 * Fix test suite code on platforms where int32_t is not int, such as 545 Arm Cortex-M. Fixes #4530. 546 * Fix some issues affecting MBEDTLS_ARIA_ALT implementations: a misplaced 547 directive in a header and a missing initialization in the self-test. 548 * Fix a missing initialization in the Camellia self-test, affecting 549 MBEDTLS_CAMELLIA_ALT implementations. 550 * Restore the ability to configure PSA via Mbed TLS options to support RSA 551 key pair operations but exclude RSA key generation. When MBEDTLS_GENPRIME 552 is not defined PSA will no longer attempt to use mbedtls_rsa_gen_key(). 553 Fixes #4512. 554 * Fix a regression introduced in 2.24.0 which broke (D)TLS CBC ciphersuites 555 (when the encrypt-then-MAC extension is not in use) with some ALT 556 implementations of the underlying hash (SHA-1, SHA-256, SHA-384), causing 557 the affected side to wrongly reject valid messages. Fixes #4118. 558 * Remove outdated check-config.h check that prevented implementing the 559 timing module on Mbed OS. Fixes #4633. 560 * Fix PSA_ALG_TLS12_PRF and PSA_ALG_TLS12_PSK_TO_MS being too permissive 561 about missing inputs. 562 * Fix mbedtls_net_poll() and mbedtls_net_recv_timeout() often failing with 563 MBEDTLS_ERR_NET_POLL_FAILED on Windows. Fixes #4465. 564 * Fix a resource leak in a test suite with an alternative AES 565 implementation. Fixes #4176. 566 * Fix a crash in mbedtls_mpi_debug_mpi on a bignum having 0 limbs. This 567 could notably be triggered by setting the TLS debug level to 3 or above 568 and using a Montgomery curve for the key exchange. Reported by lhuang04 569 in #4578. Fixes #4608. 570 * psa_verify_hash() was relying on implementation-specific behavior of 571 mbedtls_rsa_rsassa_pss_verify() and was causing failures in some _ALT 572 implementations. This reliance is now removed. Fixes #3990. 573 * Disallow inputs of length different from the corresponding hash when 574 signing or verifying with PSA_ALG_RSA_PSS (The PSA Crypto API mandates 575 that PSA_ALG_RSA_PSS uses the same hash throughout the algorithm.) 576 * Fix a null pointer dereference when mbedtls_mpi_exp_mod() was called with 577 A=0 represented with 0 limbs. Up to and including Mbed TLS 2.26, this bug 578 could not be triggered by code that constructed A with one of the 579 mbedtls_mpi_read_xxx functions (including in particular TLS code) since 580 those always built an mpi object with at least one limb. 581 Credit to OSS-Fuzz. Fixes #4641. 582 * Fix mbedtls_mpi_gcd(G,A,B) when the value of B is zero. This had no 583 effect on Mbed TLS's internal use of mbedtls_mpi_gcd(), but may affect 584 applications that call mbedtls_mpi_gcd() directly. Fixes #4642. 585 * The PSA API no longer allows the creation or destruction of keys with a 586 read-only lifetime. The persistence level PSA_KEY_PERSISTENCE_READ_ONLY 587 can now only be used as intended, for keys that cannot be modified through 588 normal use of the API. 589 * When MBEDTLS_PSA_CRYPTO_SPM is enabled, crypto_spe.h was not included 590 in all the right places. Include it from crypto_platform.h, which is 591 the natural place. Fixes #4649. 592 * Fix which alert is sent in some cases to conform to the 593 applicable RFC: on an invalid Finished message value, an 594 invalid max_fragment_length extension, or an 595 unsupported extension used by the server. 596 * Correct (change from 12 to 13 bytes) the value of the macro describing the 597 maximum nonce length returned by psa_aead_generate_nonce(). 598 599Changes 600 * Fix the setting of the read timeout in the DTLS sample programs. 601 * Add extra printf compiler warning flags to builds. 602 * Fix memsan build false positive in x509_crt.c with clang 11 603 * Alternative implementations of CMAC may now opt to not support 3DES as a 604 CMAC block cipher, and still pass the CMAC self test. 605 * Remove the AES sample application programs/aes/aescrypt2 which shows 606 bad cryptographic practice. Fix #1906. 607 * Remove configs/config-psa-crypto.h, which no longer had any intended 608 differences from the default configuration, but had accidentally diverged. 609 * When building the test suites with GNU make, invoke python3 or python, not 610 python2, which is no longer supported upstream. 611 * fix build failure on MinGW toolchain when __USE_MING_ANSI_STDIO is on. 612 When that flag is on, standard GNU C printf format specifiers 613 should be used. 614 * Replace MBEDTLS_SSL_CID_PADDING_GRANULARITY and 615 MBEDTLS_SSL_TLS1_3_PADDING_GRANULARITY with a new single unified option 616 MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY. Fixes #4335. 617 * Reduce the default value of MBEDTLS_ECP_WINDOW_SIZE. This reduces RAM usage 618 during ECC operations at a negligible performance cost. 619 * mbedtls_mpi_read_binary(), mbedtls_mpi_read_binary_le() and 620 mbedtls_mpi_read_string() now construct an mbedtls_mpi object with 0 limbs 621 when their input has length 0. Note that this is an implementation detail 622 and can change at any time, so this change should be transparent, but it 623 may result in mbedtls_mpi_write_binary() or mbedtls_mpi_write_string() 624 now writing an empty string where it previously wrote one or more 625 zero digits when operating from values constructed with an mpi_read 626 function and some mpi operations. 627 * Add CMake package config generation for CMake projects consuming Mbed TLS. 628 * config.h has been split into build_info.h and mbedtls_config.h 629 build_info.h is intended to be included from C code directly, while 630 mbedtls_config.h is intended to be edited by end users wishing to 631 change the build configuration, and should generally only be included from 632 build_info.h. 633 * The handling of MBEDTLS_CONFIG_FILE has been moved into build_info.h. 634 * A config file version symbol, MBEDTLS_CONFIG_VERSION was introduced. 635 Defining it to a particular value will ensure that Mbed TLS interprets 636 the config file in a way that's compatible with the config file format 637 used by the Mbed TLS release whose MBEDTLS_VERSION_NUMBER has the same 638 value. 639 The only value supported by Mbed TLS 3.0.0 is 0x03000000. 640 * Various changes to which alert and/or error code may be returned 641 * during the TLS handshake. 642 * Implicitly add PSA_KEY_USAGE_SIGN_MESSAGE key usage policy flag when 643 PSA_KEY_USAGE_SIGN_HASH flag is set and PSA_KEY_USAGE_VERIFY_MESSAGE flag 644 when PSA_KEY_USAGE_VERIFY_HASH flag is set. This usage flag extension 645 is also applied when loading a key from storage. 646 647= mbed TLS 2.26.0 branch released 2021-03-08 648 649API changes 650 * Renamed the PSA Crypto API output buffer size macros to bring them in line 651 with version 1.0.0 of the specification. 652 * The API glue function mbedtls_ecc_group_of_psa() now takes the curve size 653 in bits rather than bytes, with an additional flag to indicate if the 654 size may have been rounded up to a whole number of bytes. 655 * Renamed the PSA Crypto API AEAD tag length macros to bring them in line 656 with version 1.0.0 of the specification. 657 658Default behavior changes 659 * In mbedtls_rsa_context objects, the ver field was formerly documented 660 as always 0. It is now reserved for internal purposes and may take 661 different values. 662 663New deprecations 664 * PSA_KEY_EXPORT_MAX_SIZE, PSA_HASH_SIZE, PSA_MAC_FINAL_SIZE, 665 PSA_BLOCK_CIPHER_BLOCK_SIZE, PSA_MAX_BLOCK_CIPHER_BLOCK_SIZE and 666 PSA_ALG_TLS12_PSK_TO_MS_MAX_PSK_LEN have been renamed, and the old names 667 deprecated. 668 * PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH and PSA_ALG_AEAD_WITH_TAG_LENGTH 669 have been renamed, and the old names deprecated. 670 671Features 672 * The PSA crypto subsystem can now use HMAC_DRBG instead of CTR_DRBG. 673 CTR_DRBG is used by default if it is available, but you can override 674 this choice by setting MBEDTLS_PSA_HMAC_DRBG_MD_TYPE at compile time. 675 Fix #3354. 676 * Automatic fallback to a software implementation of ECP when 677 MBEDTLS_ECP_xxx_ALT accelerator hooks are in use can now be turned off 678 through setting the new configuration flag MBEDTLS_ECP_NO_FALLBACK. 679 * The PSA crypto subsystem can now be configured to use less static RAM by 680 tweaking the setting for the maximum amount of keys simultaneously in RAM. 681 MBEDTLS_PSA_KEY_SLOT_COUNT sets the maximum number of volatile keys that 682 can exist simultaneously. It has a sensible default if not overridden. 683 * Partial implementation of the PSA crypto driver interface: Mbed TLS can 684 now use an external random generator instead of the library's own 685 entropy collection and DRBG code. Enable MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG 686 and see the documentation of mbedtls_psa_external_get_random() for details. 687 * Applications using both mbedtls_xxx and psa_xxx functions (for example, 688 applications using TLS and MBEDTLS_USE_PSA_CRYPTO) can now use the PSA 689 random generator with mbedtls_xxx functions. See the documentation of 690 mbedtls_psa_get_random() for details. 691 * In the PSA API, the policy for a MAC or AEAD algorithm can specify a 692 minimum MAC or tag length thanks to the new wildcards 693 PSA_ALG_AT_LEAST_THIS_LENGTH_MAC and 694 PSA_ALG_AEAD_WITH_AT_LEAST_THIS_LENGTH_TAG. 695 696Security 697 * Fix a security reduction in CTR_DRBG when the initial seeding obtained a 698 nonce from entropy. Applications were affected if they called 699 mbedtls_ctr_drbg_set_nonce_len(), if they called 700 mbedtls_ctr_drbg_set_entropy_len() with a size that was 3/2 times the key 701 length, or when the entropy module uses SHA-256 and CTR_DRBG uses AES-256. 702 In such cases, a random nonce was necessary to achieve the advertised 703 security strength, but the code incorrectly used a constant instead of 704 entropy from the nonce. 705 Found by John Stroebel in #3819 and fixed in #3973. 706 * Fix a buffer overflow in mbedtls_mpi_sub_abs() when calculating 707 |A| - |B| where |B| is larger than |A| and has more limbs (so the 708 function should return MBEDTLS_ERR_MPI_NEGATIVE_VALUE). Only 709 applications calling mbedtls_mpi_sub_abs() directly are affected: 710 all calls inside the library were safe since this function is 711 only called with |A| >= |B|. Reported by Guido Vranken in #4042. 712 * Fix an errorneous estimation for an internal buffer in 713 mbedtls_pk_write_key_pem(). If MBEDTLS_MPI_MAX_SIZE is set to an odd 714 value the function might fail to write a private RSA keys of the largest 715 supported size. 716 Found by Daniel Otte, reported in #4093 and fixed in #4094. 717 * Fix a stack buffer overflow with mbedtls_net_poll() and 718 mbedtls_net_recv_timeout() when given a file descriptor that is 719 beyond FD_SETSIZE. Reported by FigBug in #4169. 720 * Guard against strong local side channel attack against base64 tables by 721 making access aceess to them use constant flow code. 722 723Bugfix 724 * Fix use-after-scope error in programs/ssl/ssl_client2.c and ssl_server2.c 725 * Fix memory leak that occured when calling psa_close_key() on a 726 wrapped key with MBEDTLS_PSA_CRYPTO_SE_C defined. 727 * Fix an incorrect error code if an RSA private operation glitched. 728 * Fix a memory leak in an error case in psa_generate_derived_key_internal(). 729 * Fix a resource leak in CTR_DRBG and HMAC_DRBG when MBEDTLS_THREADING_C 730 is enabled, on platforms where initializing a mutex allocates resources. 731 This was a regression introduced in the previous release. Reported in 732 #4017, #4045 and #4071. 733 * Ensure that calling mbedtls_rsa_free() or mbedtls_entropy_free() 734 twice is safe. This happens for RSA when some Mbed TLS library functions 735 fail. Such a double-free was not safe when MBEDTLS_THREADING_C was 736 enabled on platforms where freeing a mutex twice is not safe. 737 * Fix a resource leak in a bad-arguments case of mbedtls_rsa_gen_key() 738 when MBEDTLS_THREADING_C is enabled on platforms where initializing 739 a mutex allocates resources. 740 * Fixes a bug where, if the library was configured to include support for 741 both the old SE interface and the new PSA driver interface, external keys were 742 not loaded from storage. This was fixed by #3996. 743 * This change makes 'mbedtls_x509write_crt_set_basic_constraints' 744 consistent with RFC 5280 4.2.1.9 which says: "Conforming CAs MUST 745 include this extension in all CA certificates that contain public keys 746 used to validate digital signatures on certificates and MUST mark the 747 extension as critical in such certificates." Previous to this change, 748 the extension was always marked as non-critical. This was fixed by 749 #3698. 750 751Changes 752 * A new library C file psa_crypto_client.c has been created to contain 753 the PSA code needed by a PSA crypto client when the PSA crypto 754 implementation is not included into the library. 755 * On recent enough versions of FreeBSD and DragonFlyBSD, the entropy module 756 now uses the getrandom syscall instead of reading from /dev/urandom. 757 758= mbed TLS 2.25.0 branch released 2020-12-11 759 760API changes 761 * The numerical values of the PSA Crypto API macros have been updated to 762 conform to version 1.0.0 of the specification. 763 * PSA_ALG_STREAM_CIPHER replaces PSA_ALG_CHACHA20 and PSA_ALG_ARC4. 764 The underlying stream cipher is determined by the key type 765 (PSA_KEY_TYPE_CHACHA20 or PSA_KEY_TYPE_ARC4). 766 * The functions mbedtls_cipher_auth_encrypt() and 767 mbedtls_cipher_auth_decrypt() no longer accept NIST_KW contexts, 768 as they have no way to check if the output buffer is large enough. 769 Please use mbedtls_cipher_auth_encrypt_ext() and 770 mbedtls_cipher_auth_decrypt_ext() instead. Credit to OSS-Fuzz and 771 Cryptofuzz. Fixes #3665. 772 773Requirement changes 774 * Update the minimum required CMake version to 2.8.12. This silences a 775 warning on CMake 3.19.0. #3801 776 777New deprecations 778 * PSA_ALG_CHACHA20 and PSA_ALG_ARC4 have been deprecated. 779 Use PSA_ALG_STREAM_CIPHER instead. 780 * The functions mbedtls_cipher_auth_encrypt() and 781 mbedtls_cipher_auth_decrypt() are deprecated in favour of the new 782 functions mbedtls_cipher_auth_encrypt_ext() and 783 mbedtls_cipher_auth_decrypt_ext(). Please note that with AEAD ciphers, 784 these new functions always append the tag to the ciphertext, and include 785 the tag in the ciphertext length. 786 787Features 788 * Partial implementation of the new PSA Crypto accelerator APIs. (Symmetric 789 ciphers, asymmetric signing/verification and key generation, validate_key 790 entry point, and export_public_key interface.) 791 * Add support for ECB to the PSA cipher API. 792 * In PSA, allow using a key declared with a base key agreement algorithm 793 in combined key agreement and derivation operations, as long as the key 794 agreement algorithm in use matches the algorithm the key was declared with. 795 This is currently non-standard behaviour, but expected to make it into a 796 future revision of the PSA Crypto standard. 797 * Add MBEDTLS_TARGET_PREFIX CMake variable, which is prefixed to the mbedtls, 798 mbedcrypto, mbedx509 and apidoc CMake target names. This can be used by 799 external CMake projects that include this one to avoid CMake target name 800 clashes. The default value of this variable is "", so default target names 801 are unchanged. 802 * Add support for DTLS-SRTP as defined in RFC 5764. Contributed by Johan 803 Pascal, improved by Ron Eldor. 804 * In the PSA API, it is no longer necessary to open persistent keys: 805 operations now accept the key identifier. The type psa_key_handle_t is now 806 identical to psa_key_id_t instead of being platform-defined. This bridges 807 the last major gap to compliance with the PSA Cryptography specification 808 version 1.0.0. Opening persistent keys is still supported for backward 809 compatibility, but will be deprecated and later removed in future 810 releases. 811 * PSA_AEAD_NONCE_LENGTH, PSA_AEAD_NONCE_MAX_SIZE, PSA_CIPHER_IV_LENGTH and 812 PSA_CIPHER_IV_MAX_SIZE macros have been added as defined in version 813 1.0.0 of the PSA Crypto API specification. 814 815Security 816 * The functions mbedtls_cipher_auth_encrypt() and 817 mbedtls_cipher_auth_decrypt() would write past the minimum documented 818 size of the output buffer when used with NIST_KW. As a result, code using 819 those functions as documented with NIST_KW could have a buffer overwrite 820 of up to 15 bytes, with consequences ranging up to arbitrary code 821 execution depending on the location of the output buffer. 822 * Limit the size of calculations performed by mbedtls_mpi_exp_mod to 823 MBEDTLS_MPI_MAX_SIZE to prevent a potential denial of service when 824 generating Diffie-Hellman key pairs. Credit to OSS-Fuzz. 825 * A failure of the random generator was ignored in mbedtls_mpi_fill_random(), 826 which is how most uses of randomization in asymmetric cryptography 827 (including key generation, intermediate value randomization and blinding) 828 are implemented. This could cause failures or the silent use of non-random 829 values. A random generator can fail if it needs reseeding and cannot not 830 obtain entropy, or due to an internal failure (which, for Mbed TLS's own 831 CTR_DRBG or HMAC_DRBG, can only happen due to a misconfiguration). 832 * Fix a compliance issue whereby we were not checking the tag on the 833 algorithm parameters (only the size) when comparing the signature in the 834 description part of the cert to the real signature. This meant that a 835 NULL algorithm parameters entry would look identical to an array of REAL 836 (size zero) to the library and thus the certificate would be considered 837 valid. However, if the parameters do not match in *any* way then the 838 certificate should be considered invalid, and indeed OpenSSL marks these 839 certs as invalid when mbedtls did not. 840 Many thanks to guidovranken who found this issue via differential fuzzing 841 and reported it in #3629. 842 * Zeroising of local buffers and variables which are used for calculations 843 in mbedtls_pkcs5_pbkdf2_hmac(), mbedtls_internal_sha*_process(), 844 mbedtls_internal_md*_process() and mbedtls_internal_ripemd160_process() 845 functions to erase sensitive data from memory. Reported by 846 Johan Malmgren and Johan Uppman Bruce from Sectra. 847 848Bugfix 849 * Fix an invalid (but nonzero) return code from mbedtls_pk_parse_subpubkey() 850 when the input has trailing garbage. Fixes #2512. 851 * Fix build failure in configurations where MBEDTLS_USE_PSA_CRYPTO is 852 enabled but ECDSA is disabled. Contributed by jdurkop. Fixes #3294. 853 * Include the psa_constant_names generated source code in the source tree 854 instead of generating it at build time. Fixes #3524. 855 * Fix rsa_prepare_blinding() to retry when the blinding value is not 856 invertible (mod N), instead of returning MBEDTLS_ERR_RSA_RNG_FAILED. This 857 addresses a regression but is rare in practice (approx. 1 in 2/sqrt(N)). 858 Found by Synopsys Coverity, fix contributed by Peter Kolbus (Garmin). 859 Fixes #3647. 860 * Use socklen_t on Android and other POSIX-compliant system 861 * Fix the build when the macro _GNU_SOURCE is defined to a non-empty value. 862 Fix #3432. 863 * Consistently return PSA_ERROR_INVALID_ARGUMENT on invalid cipher input 864 sizes (instead of PSA_ERROR_BAD_STATE in some cases) to make the 865 psa_cipher_* functions compliant with the PSA Crypto API specification. 866 * mbedtls_ecp_curve_list() now lists Curve25519 and Curve448 under the names 867 "x25519" and "x448". These curves support ECDH but not ECDSA. If you need 868 only the curves that support ECDSA, filter the list with 869 mbedtls_ecdsa_can_do(). 870 * Fix psa_generate_key() returning an error when asked to generate 871 an ECC key pair on Curve25519 or secp244k1. 872 * Fix psa_key_derivation_output_key() to allow the output of a combined key 873 agreement and subsequent key derivation operation to be used as a key 874 inside of the PSA Crypto core. 875 * Fix handling of EOF against 0xff bytes and on platforms with unsigned 876 chars. Fixes a build failure on platforms where char is unsigned. Fixes 877 #3794. 878 * Fix an off-by-one error in the additional data length check for 879 CCM, which allowed encryption with a non-standard length field. 880 Fixes #3719. 881 * Correct the default IV size for mbedtls_cipher_info_t structures using 882 MBEDTLS_MODE_ECB to 0, since ECB mode ciphers don't use IVs. 883 * Make arc4random_buf available on NetBSD and OpenBSD when _POSIX_C_SOURCE is 884 defined. Fix contributed in #3571. 885 * Fix conditions for including string.h in error.c. Fixes #3866. 886 * psa_set_key_id() now also sets the lifetime to persistent for keys located 887 in a secure element. 888 * Attempting to create a volatile key with a non-zero key identifier now 889 fails. Previously the key identifier was just ignored when creating a 890 volatile key. 891 * Attempting to create or register a key with a key identifier in the vendor 892 range now fails. 893 * Fix build failures on GCC 11. Fixes #3782. 894 * Add missing arguments of debug message in mbedtls_ssl_decrypt_buf. 895 * Fix a memory leak in mbedtls_mpi_sub_abs() when the result was negative 896 (an error condition) and the second operand was aliased to the result. 897 * Fix a case in elliptic curve arithmetic where an out-of-memory condition 898 could go undetected, resulting in an incorrect result. 899 * In CTR_DRBG and HMAC_DRBG, don't reset the reseed interval in seed(). 900 Fixes #2927. 901 * In PEM writing functions, fill the trailing part of the buffer with null 902 bytes. This guarantees that the corresponding parsing function can read 903 the buffer back, which was the case for mbedtls_x509write_{crt,csr}_pem 904 until this property was inadvertently broken in Mbed TLS 2.19.0. 905 Fixes #3682. 906 * Fix a build failure that occurred with the MBEDTLS_AES_SETKEY_DEC_ALT 907 option on. In this configuration key management methods that are required 908 for MBEDTLS_CIPHER_MODE_XTS were excluded from the build and made it fail. 909 Fixes #3818. Reported by John Stroebel. 910 911Changes 912 * Reduce stack usage significantly during sliding window exponentiation. 913 Reported in #3591 and fix contributed in #3592 by Daniel Otte. 914 * The PSA persistent storage format is updated to always store the key bits 915 attribute. No automatic upgrade path is provided. Previously stored keys 916 must be erased, or manually upgraded based on the key storage format 917 specification (docs/architecture/mbed-crypto-storage-specification.md). 918 Fixes #3740. 919 * Remove the zeroization of a pointer variable in AES rounds. It was valid 920 but spurious and misleading since it looked like a mistaken attempt to 921 zeroize the pointed-to buffer. Reported by Antonio de la Piedra, CEA 922 Leti, France. 923 924= mbed TLS 2.24.0 branch released 2020-09-01 925 926API changes 927 * In the PSA API, rename the types of elliptic curve and Diffie-Hellman 928 group families to psa_ecc_family_t and psa_dh_family_t, in line with the 929 PSA Crypto API specification version 1.0.0. 930 Rename associated macros as well: 931 PSA_ECC_CURVE_xxx renamed to PSA_ECC_FAMILY_xxx 932 PSA_DH_GROUP_xxx renamed to PSA_DH_FAMILY_xxx 933 PSA_KEY_TYPE_GET_CURVE renamed to to PSA_KEY_TYPE_ECC_GET_FAMILY 934 PSA_KEY_TYPE_GET_GROUP renamed to PSA_KEY_TYPE_DH_GET_FAMILY 935 936Default behavior changes 937 * Stop storing persistent information about externally stored keys created 938 through PSA Crypto with a volatile lifetime. Reported in #3288 and 939 contributed by Steven Cooreman in #3382. 940 941Features 942 * The new function mbedtls_ecp_write_key() exports private ECC keys back to 943 a byte buffer. It is the inverse of the existing mbedtls_ecp_read_key(). 944 * Support building on e2k (Elbrus) architecture: correctly enable 945 -Wformat-signedness, and fix the code that causes signed-one-bit-field 946 and sign-compare warnings. Contributed by makise-homura (Igor Molchanov) 947 <akemi_homura@kurisa.ch>. 948 949Security 950 * Fix a vulnerability in the verification of X.509 certificates when 951 matching the expected common name (the cn argument of 952 mbedtls_x509_crt_verify()) with the actual certificate name: when the 953 subjecAltName extension is present, the expected name was compared to any 954 name in that extension regardless of its type. This means that an 955 attacker could for example impersonate a 4-bytes or 16-byte domain by 956 getting a certificate for the corresponding IPv4 or IPv6 (this would 957 require the attacker to control that IP address, though). Similar attacks 958 using other subjectAltName name types might be possible. Found and 959 reported by kFYatek in #3498. 960 * When checking X.509 CRLs, a certificate was only considered as revoked if 961 its revocationDate was in the past according to the local clock if 962 available. In particular, on builds without MBEDTLS_HAVE_TIME_DATE, 963 certificates were never considered as revoked. On builds with 964 MBEDTLS_HAVE_TIME_DATE, an attacker able to control the local clock (for 965 example, an untrusted OS attacking a secure enclave) could prevent 966 revocation of certificates via CRLs. Fixed by no longer checking the 967 revocationDate field, in accordance with RFC 5280. Reported by 968 yuemonangong in #3340. Reported independently and fixed by 969 Raoul Strackx and Jethro Beekman in #3433. 970 * In (D)TLS record decryption, when using a CBC ciphersuites without the 971 Encrypt-then-Mac extension, use constant code flow memory access patterns 972 to extract and check the MAC. This is an improvement to the existing 973 countermeasure against Lucky 13 attacks. The previous countermeasure was 974 effective against network-based attackers, but less so against local 975 attackers. The new countermeasure defends against local attackers, even 976 if they have access to fine-grained measurements. In particular, this 977 fixes a local Lucky 13 cache attack found and reported by Tuba Yavuz, 978 Farhaan Fowze, Ken (Yihan) Bai, Grant Hernandez, and Kevin Butler 979 (University of Florida) and Dave Tian (Purdue University). 980 * Fix side channel in RSA private key operations and static (finite-field) 981 Diffie-Hellman. An adversary with precise enough timing and memory access 982 information (typically an untrusted operating system attacking a secure 983 enclave) could bypass an existing counter-measure (base blinding) and 984 potentially fully recover the private key. 985 * Fix a 1-byte buffer overread in mbedtls_x509_crl_parse_der(). 986 Credit to OSS-Fuzz for detecting the problem and to Philippe Antoine 987 for pinpointing the problematic code. 988 * Zeroising of plaintext buffers in mbedtls_ssl_read() to erase unused 989 application data from memory. Reported in #689 by 990 Johan Uppman Bruce of Sectra. 991 992Bugfix 993 * Library files installed after a CMake build no longer have execute 994 permission. 995 * Use local labels in mbedtls_padlock_has_support() to fix an invalid symbol 996 redefinition if the function is inlined. 997 Reported in #3451 and fix contributed in #3452 by okhowang. 998 * Fix the endianness of Curve25519 keys imported/exported through the PSA 999 APIs. psa_import_key and psa_export_key will now correctly expect/output 1000 Montgomery keys in little-endian as defined by RFC7748. Contributed by 1001 Steven Cooreman in #3425. 1002 * Fix build errors when the only enabled elliptic curves are Montgomery 1003 curves. Raised by signpainter in #941 and by Taiki-San in #1412. This 1004 also fixes missing declarations reported by Steven Cooreman in #1147. 1005 * Fix self-test failure when the only enabled short Weierstrass elliptic 1006 curve is secp192k1. Fixes #2017. 1007 * PSA key import will now correctly import a Curve25519/Curve448 public key 1008 instead of erroring out. Contributed by Steven Cooreman in #3492. 1009 * Use arc4random_buf on NetBSD instead of rand implementation with cyclical 1010 lower bits. Fix contributed in #3540. 1011 * Fix a memory leak in mbedtls_md_setup() when using HMAC under low memory 1012 conditions. Reported and fix suggested by Guido Vranken in #3486. 1013 * Fix bug in redirection of unit test outputs on platforms where stdout is 1014 defined as a macro. First reported in #2311 and fix contributed in #3528. 1015 1016Changes 1017 * Only pass -Wformat-signedness to versions of GCC that support it. Reported 1018 in #3478 and fix contributed in #3479 by okhowang. 1019 * Reduce the stack consumption of mbedtls_x509write_csr_der() which 1020 previously could lead to stack overflow on constrained devices. 1021 Contributed by Doru Gucea and Simon Leet in #3464. 1022 * Undefine the ASSERT macro before defining it locally, in case it is defined 1023 in a platform header. Contributed by Abdelatif Guettouche in #3557. 1024 * Update copyright notices to use Linux Foundation guidance. As a result, 1025 the copyright of contributors other than Arm is now acknowledged, and the 1026 years of publishing are no longer tracked in the source files. This also 1027 eliminates the need for the lines declaring the files to be part of 1028 MbedTLS. Fixes #3457. 1029 * Add the command line parameter key_pwd to the ssl_client2 and ssl_server2 1030 example applications which allows to provide a password for the key file 1031 specified through the existing key_file argument. This allows the use of 1032 these applications with password-protected key files. Analogously but for 1033 ssl_server2 only, add the command line parameter key_pwd2 which allows to 1034 set a password for the key file provided through the existing key_file2 1035 argument. 1036 1037= mbed TLS 2.23.0 branch released 2020-07-01 1038 1039Default behavior changes 1040 * In the experimental PSA secure element interface, change the encoding of 1041 key lifetimes to encode a persistence level and the location. Although C 1042 prototypes do not effectively change, code calling 1043 psa_register_se_driver() must be modified to pass the driver's location 1044 instead of the keys' lifetime. If the library is upgraded on an existing 1045 device, keys created with the old lifetime value will not be readable or 1046 removable through Mbed TLS after the upgrade. 1047 1048Features 1049 * New functions in the error module return constant strings for 1050 high- and low-level error codes, complementing mbedtls_strerror() 1051 which constructs a string for any error code, including compound 1052 ones, but requires a writable buffer. Contributed by Gaurav Aggarwal 1053 in #3176. 1054 * The new utility programs/ssl/ssl_context_info prints a human-readable 1055 dump of an SSL context saved with mbedtls_ssl_context_save(). 1056 * Add support for midipix, a POSIX layer for Microsoft Windows. 1057 * Add new mbedtls_x509_crt_parse_der_with_ext_cb() routine which allows 1058 parsing unsupported certificate extensions via user provided callback. 1059 Contributed by Nicola Di Lieto <nicola.dilieto@gmail.com> in #3243 as 1060 a solution to #3241. 1061 * Pass the "certificate policies" extension to the callback supplied to 1062 mbedtls_x509_crt_parse_der_with_ext_cb() if it contains unsupported 1063 policies (#3419). 1064 * Added support to entropy_poll for the kern.arandom syscall supported on 1065 some BSD systems. Contributed by Nia Alarie in #3423. 1066 * Add support for Windows 2000 in net_sockets. Contributed by opatomic. #3239 1067 1068Security 1069 * Fix a side channel vulnerability in modular exponentiation that could 1070 reveal an RSA private key used in a secure enclave. Noticed by Sangho Lee, 1071 Ming-Wei Shih, Prasun Gera, Taesoo Kim and Hyesoon Kim (Georgia Institute 1072 of Technology); and Marcus Peinado (Microsoft Research). Reported by Raoul 1073 Strackx (Fortanix) in #3394. 1074 * Fix side channel in mbedtls_ecp_check_pub_priv() and 1075 mbedtls_pk_parse_key() / mbedtls_pk_parse_keyfile() (when loading a 1076 private key that didn't include the uncompressed public key), as well as 1077 mbedtls_ecp_mul() / mbedtls_ecp_mul_restartable() when called with a NULL 1078 f_rng argument. An attacker with access to precise enough timing and 1079 memory access information (typically an untrusted operating system 1080 attacking a secure enclave) could fully recover the ECC private key. 1081 Found and reported by Alejandro Cabrera Aldaya and Billy Brumley. 1082 * Fix issue in Lucky 13 counter-measure that could make it ineffective when 1083 hardware accelerators were used (using one of the MBEDTLS_SHAxxx_ALT 1084 macros). This would cause the original Lucky 13 attack to be possible in 1085 those configurations, allowing an active network attacker to recover 1086 plaintext after repeated timing measurements under some conditions. 1087 Reported and fix suggested by Luc Perneel in #3246. 1088 1089Bugfix 1090 * Fix the Visual Studio Release x64 build configuration for mbedtls itself. 1091 Completes a previous fix in Mbed TLS 2.19 that only fixed the build for 1092 the example programs. Reported in #1430 and fix contributed by irwir. 1093 * Fix undefined behavior in X.509 certificate parsing if the 1094 pathLenConstraint basic constraint value is equal to INT_MAX. 1095 The actual effect with almost every compiler is the intended 1096 behavior, so this is unlikely to be exploitable anywhere. #3192 1097 * Fix issue with a detected HW accelerated record error not being exposed 1098 due to shadowed variable. Contributed by Sander Visser in #3310. 1099 * Avoid NULL pointer dereferencing if mbedtls_ssl_free() is called with a 1100 NULL pointer argument. Contributed by Sander Visser in #3312. 1101 * Fix potential linker errors on dual world platforms by inlining 1102 mbedtls_gcc_group_to_psa(). This allows the pk.c module to link separately 1103 from psa_crypto.c. Fixes #3300. 1104 * Remove dead code in X.509 certificate parsing. Contributed by irwir in 1105 #2855. 1106 * Include asn1.h in error.c. Fixes #3328 reported by David Hu. 1107 * Fix potential memory leaks in ecp_randomize_jac() and ecp_randomize_mxz() 1108 when PRNG function fails. Contributed by Jonas Lejeune in #3318. 1109 * Remove unused macros from MSVC projects. Reported in #3297 and fix 1110 submitted in #3333 by irwir. 1111 * Add additional bounds checks in ssl_write_client_hello() preventing 1112 output buffer overflow if the configuration declared a buffer that was 1113 too small. 1114 * Set _POSIX_C_SOURCE to at least 200112L in C99 code. Reported in #3420 and 1115 fix submitted in #3421 by Nia Alarie. 1116 * Fix building library/net_sockets.c and the ssl_mail_client program on 1117 NetBSD. Contributed by Nia Alarie in #3422. 1118 * Fix false positive uninitialised variable reported by cpp-check. 1119 Contributed by Sander Visser in #3311. 1120 * Update iv and len context pointers manually when reallocating buffers 1121 using the MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH feature. This caused issues 1122 when receiving a connection with CID, when these fields were shifted 1123 in ssl_parse_record_header(). 1124 1125Changes 1126 * Fix warnings about signedness issues in format strings. The build is now 1127 clean of -Wformat-signedness warnings. Contributed by Kenneth Soerensen 1128 in #3153. 1129 * Fix minor performance issue in operations on Curve25519 caused by using a 1130 suboptimal modular reduction in one place. Found and fix contributed by 1131 Aurelien Jarno in #3209. 1132 * Combine identical cases in switch statements in md.c. Contributed 1133 by irwir in #3208. 1134 * Simplify a bounds check in ssl_write_certificate_request(). Contributed 1135 by irwir in #3150. 1136 * Unify the example programs termination to call mbedtls_exit() instead of 1137 using a return command. This has been done to enable customization of the 1138 behavior in bare metal environments. 1139 * Fix mbedtls_x509_dn_gets to escape non-ASCII characters as "?". 1140 Contributed by Koh M. Nakagawa in #3326. 1141 * Use FindPython3 when cmake version >= 3.15.0 1142 * Abort the ClientHello writing function as soon as some extension doesn't 1143 fit into the record buffer. Previously, such extensions were silently 1144 dropped. As a consequence, the TLS handshake now fails when the output 1145 buffer is not large enough to hold the ClientHello. 1146 * The unit tests now rely on header files in tests/include/test and source 1147 files in tests/src. When building with make or cmake, the files in 1148 tests/src are compiled and the resulting object linked into each test 1149 executable. 1150 * The ECP module, enabled by `MBEDTLS_ECP_C`, now depends on 1151 `MBEDTLS_CTR_DRBG_C` or `MBEDTLS_HMAC_DRBG_C` for some side-channel 1152 coutermeasures. If side channels are not a concern, this dependency can 1153 be avoided by enabling the new option `MBEDTLS_ECP_NO_INTERNAL_RNG`. 1154 * Align MSVC error flag with GCC and Clang. Contributed by Carlos Gomes 1155 Martinho. #3147 1156 * Remove superfluous assignment in mbedtls_ssl_parse_certificate(). Reported 1157 in #3182 and fix submitted by irwir. #3217 1158 * Fix typo in XTS tests. Reported and fix submitted by Kxuan. #3319 1159 1160= mbed TLS 2.22.0 branch released 2020-04-14 1161 1162New deprecations 1163 * Deprecate MBEDTLS_SSL_HW_RECORD_ACCEL that enables function hooks in the 1164 SSL module for hardware acceleration of individual records. 1165 * Deprecate mbedtls_ssl_get_max_frag_len() in favour of 1166 mbedtls_ssl_get_output_max_frag_len() and 1167 mbedtls_ssl_get_input_max_frag_len() to be more precise about which max 1168 fragment length is desired. 1169 1170Security 1171 * Fix issue in DTLS handling of new associations with the same parameters 1172 (RFC 6347 section 4.2.8): an attacker able to send forged UDP packets to 1173 the server could cause it to drop established associations with 1174 legitimate clients, resulting in a Denial of Service. This could only 1175 happen when MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE was enabled in config.h 1176 (which it is by default). 1177 * Fix side channel in ECC code that allowed an adversary with access to 1178 precise enough timing and memory access information (typically an 1179 untrusted operating system attacking a secure enclave) to fully recover 1180 an ECDSA private key. Found and reported by Alejandro Cabrera Aldaya, 1181 Billy Brumley and Cesar Pereida Garcia. CVE-2020-10932 1182 * Fix a potentially remotely exploitable buffer overread in a 1183 DTLS client when parsing the Hello Verify Request message. 1184 1185Features 1186 * The new build option MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH automatically 1187 resizes the I/O buffers before and after handshakes, reducing the memory 1188 consumption during application data transfer. 1189 1190Bugfix 1191 * Fix compilation failure when both MBEDTLS_SSL_PROTO_DTLS and 1192 MBEDTLS_SSL_HW_RECORD_ACCEL are enabled. 1193 * Remove a spurious check in ssl_parse_client_psk_identity that triggered 1194 a warning with some compilers. Fix contributed by irwir in #2856. 1195 * Fix a function name in a debug message. Contributed by Ercan Ozturk in 1196 #3013. 1197 1198Changes 1199 * Mbed Crypto is no longer a Git submodule. The crypto part of the library 1200 is back directly in the present repository. 1201 * Split mbedtls_ssl_get_max_frag_len() into 1202 mbedtls_ssl_get_output_max_frag_len() and 1203 mbedtls_ssl_get_input_max_frag_len() to ensure that a sufficient input 1204 buffer is allocated by the server (if MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH 1205 is defined), regardless of what MFL was configured for it. 1206 1207= mbed TLS 2.21.0 branch released 2020-02-20 1208 1209New deprecations 1210 * Deprecate MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO that enables parsing 1211 SSLv2 ClientHello messages. 1212 * Deprecate MBEDTLS_SSL_PROTO_SSL3 that enables support for SSLv3. 1213 * Deprecate for MBEDTLS_PKCS11_C, the wrapper around the pkcs11-helper 1214 library which allows TLS authentication to use keys stored in a 1215 PKCS#11 token such as a smartcard. 1216 1217Security 1218 * Fix potential memory overread when performing an ECDSA signature 1219 operation. The overread only happens with cryptographically low 1220 probability (of the order of 2^-n where n is the bitsize of the curve) 1221 unless the RNG is broken, and could result in information disclosure or 1222 denial of service (application crash or extra resource consumption). 1223 Found by Auke Zeilstra and Peter Schwabe, using static analysis. 1224 * To avoid a side channel vulnerability when parsing an RSA private key, 1225 read all the CRT parameters from the DER structure rather than 1226 reconstructing them. Found by Alejandro Cabrera Aldaya and Billy Bob 1227 Brumley. Reported and fix contributed by Jack Lloyd. 1228 ARMmbed/mbed-crypto#352 1229 1230Features 1231 * The new build option MBEDTLS_SHA512_NO_SHA384 allows building SHA-512 1232 support without SHA-384. 1233 1234API changes 1235 * Change the encoding of key types and curves in the PSA API. The new 1236 values are aligned with the upcoming release of the PSA Crypto API 1237 specification version 1.0.0. The main change which may break some 1238 existing code is that elliptic curve key types no longer encode the 1239 exact curve: a psa_ecc_curve_t or psa_key_type_t value only encodes 1240 a curve family and the key size determines the exact curve (for example, 1241 PSA_ECC_CURVE_SECP_R1 with 256 bits is P256R1). ARMmbed/mbed-crypto#330 1242 1243Bugfix 1244 * Fix an unchecked call to mbedtls_md() in the x509write module. 1245 * Fix build failure with MBEDTLS_ZLIB_SUPPORT enabled. Reported by 1246 Jack Lloyd in #2859. Fix submitted by jiblime in #2963. 1247 * Fix some false-positive uninitialized variable warnings in X.509. Fix 1248 contributed by apple-ihack-geek in #2663. 1249 * Fix a possible error code mangling in psa_mac_verify_finish() when 1250 a cryptographic accelerator fails. ARMmbed/mbed-crypto#345 1251 * Fix a bug in mbedtls_pk_parse_key() that would cause it to accept some 1252 RSA keys that would later be rejected by functions expecting private 1253 keys. Found by Catena cyber using oss-fuzz (issue 20467). 1254 * Fix a bug in mbedtls_pk_parse_key() that would cause it to 1255 accept some RSA keys with invalid values by silently fixing those values. 1256 1257= mbed TLS 2.20.0 branch released 2020-01-15 1258 1259Default behavior changes 1260 * The initial seeding of a CTR_DRBG instance makes a second call to the 1261 entropy function to obtain entropy for a nonce if the entropy size is less 1262 than 3/2 times the key size. In case you want to disable the extra call to 1263 grab entropy, you can call mbedtls_ctr_drbg_set_nonce_len() to force the 1264 nonce length to 0. 1265 1266Security 1267 * Enforce that mbedtls_entropy_func() gathers a total of 1268 MBEDTLS_ENTROPY_BLOCK_SIZE bytes or more from strong sources. In the 1269 default configuration, on a platform with a single entropy source, the 1270 entropy module formerly only grabbed 32 bytes, which is good enough for 1271 security if the source is genuinely strong, but less than the expected 64 1272 bytes (size of the entropy accumulator). 1273 * Zeroize local variables in mbedtls_internal_aes_encrypt() and 1274 mbedtls_internal_aes_decrypt() before exiting the function. The value of 1275 these variables can be used to recover the last round key. To follow best 1276 practice and to limit the impact of buffer overread vulnerabilities (like 1277 Heartbleed) we need to zeroize them before exiting the function. 1278 Issue reported by Tuba Yavuz, Farhaan Fowze, Ken (Yihang) Bai, 1279 Grant Hernandez, and Kevin Butler (University of Florida) and 1280 Dave Tian (Purdue University). 1281 * Fix side channel vulnerability in ECDSA. Our bignum implementation is not 1282 constant time/constant trace, so side channel attacks can retrieve the 1283 blinded value, factor it (as it is smaller than RSA keys and not guaranteed 1284 to have only large prime factors), and then, by brute force, recover the 1285 key. Reported by Alejandro Cabrera Aldaya and Billy Brumley. 1286 * Fix side channel vulnerability in ECDSA key generation. Obtaining precise 1287 timings on the comparison in the key generation enabled the attacker to 1288 learn leading bits of the ephemeral key used during ECDSA signatures and to 1289 recover the private key. Reported by Jeremy Dubeuf. 1290 * Catch failure of AES functions in mbedtls_ctr_drbg_random(). Uncaught 1291 failures could happen with alternative implementations of AES. Bug 1292 reported and fix proposed by Johan Uppman Bruce and Christoffer Lauri, 1293 Sectra. 1294 1295Features 1296 * Key derivation inputs in the PSA API can now either come from a key object 1297 or from a buffer regardless of the step type. 1298 * The CTR_DRBG module can grab a nonce from the entropy source during the 1299 initial seeding. The default nonce length is chosen based on the key size 1300 to achieve the security strength defined by NIST SP 800-90A. You can 1301 change it with mbedtls_ctr_drbg_set_nonce_len(). 1302 * Add ENUMERATED tag support to the ASN.1 module. Contributed by 1303 msopiha-linaro in ARMmbed/mbed-crypto#307. 1304 1305API changes 1306 * In the PSA API, forbid zero-length keys. To pass a zero-length input to a 1307 key derivation function, use a buffer instead (this is now always 1308 possible). 1309 * Rename psa_asymmetric_sign() to psa_sign_hash() and 1310 psa_asymmetric_verify() to psa_verify_hash(). 1311 1312Bugfix 1313 * Fix an incorrect size in a debugging message. Reported and fix 1314 submitted by irwir. Fixes #2717. 1315 * Fix an unused variable warning when compiling without DTLS. 1316 Reported and fix submitted by irwir. Fixes #2800. 1317 * Remove a useless assignment. Reported and fix submitted by irwir. 1318 Fixes #2801. 1319 * Fix a buffer overflow in the PSA HMAC code when using a long key with an 1320 unsupported algorithm. Fixes ARMmbed/mbed-crypto#254. 1321 * Fix mbedtls_asn1_get_int to support any number of leading zeros. Credit 1322 to OSS-Fuzz for finding a bug in an intermediate version of the fix. 1323 * Fix mbedtls_asn1_get_bitstring_null to correctly parse bitstrings of at 1324 most 2 bytes. 1325 * mbedtls_ctr_drbg_set_entropy_len() and 1326 mbedtls_hmac_drbg_set_entropy_len() now work if you call them before 1327 mbedtls_ctr_drbg_seed() or mbedtls_hmac_drbg_seed(). 1328 1329Changes 1330 * Remove the technical possibility to define custom mbedtls_md_info 1331 structures, which was exposed only in an internal header. 1332 * psa_close_key(0) and psa_destroy_key(0) now succeed (doing nothing, as 1333 before). 1334 * Variables containing error codes are now initialized to an error code 1335 rather than success, so that coding mistakes or memory corruption tends to 1336 cause functions to return this error code rather than a success. There are 1337 no known instances where this changes the behavior of the library: this is 1338 merely a robustness improvement. ARMmbed/mbed-crypto#323 1339 * Remove a useless call to mbedtls_ecp_group_free(). Contributed by 1340 Alexander Krizhanovsky in ARMmbed/mbed-crypto#210. 1341 * Speed up PBKDF2 by caching the digest calculation. Contributed by Jack 1342 Lloyd and Fortanix Inc in ARMmbed/mbed-crypto#277. 1343 * Small performance improvement of mbedtls_mpi_div_mpi(). Contributed by 1344 Alexander Krizhanovsky in ARMmbed/mbed-crypto#308. 1345 1346= mbed TLS 2.19.1 branch released 2019-09-16 1347 1348Features 1349 * Declare include headers as PUBLIC to propagate to CMake project consumers 1350 Contributed by Zachary J. Fields in PR #2949. 1351 * Add nss_keylog to ssl_client2 and ssl_server2, enabling easier analysis of 1352 TLS sessions with tools like Wireshark. 1353 1354API Changes 1355 * Make client_random and server_random const in 1356 mbedtls_ssl_export_keys_ext_t, so that the key exporter is discouraged 1357 from modifying the client/server hello. 1358 1359Bugfix 1360 * Fix some false-positive uninitialized variable warnings in crypto. Fix 1361 contributed by apple-ihack-geek in #2663. 1362 1363= mbed TLS 2.19.0 branch released 2019-09-06 1364 1365Security 1366 * Fix a missing error detection in ECJPAKE. This could have caused a 1367 predictable shared secret if a hardware accelerator failed and the other 1368 side of the key exchange had a similar bug. 1369 * When writing a private EC key, use a constant size for the private 1370 value, as specified in RFC 5915. Previously, the value was written 1371 as an ASN.1 INTEGER, which caused the size of the key to leak 1372 about 1 bit of information on average and could cause the value to be 1373 1 byte too large for the output buffer. 1374 * The deterministic ECDSA calculation reused the scheme's HMAC-DRBG to 1375 implement blinding. Because of this for the same key and message the same 1376 blinding value was generated. This reduced the effectiveness of the 1377 countermeasure and leaked information about the private key through side 1378 channels. Reported by Jack Lloyd. 1379 1380Features 1381 * Add new API functions mbedtls_ssl_session_save() and 1382 mbedtls_ssl_session_load() to allow serializing a session, for example to 1383 store it in non-volatile storage, and later using it for TLS session 1384 resumption. 1385 * Add a new API function mbedtls_ssl_check_record() to allow checking that 1386 an incoming record is valid, authentic and has not been seen before. This 1387 feature can be used alongside Connection ID and SSL context serialisation. 1388 The feature is enabled at compile-time by MBEDTLS_SSL_RECORD_CHECKING 1389 option. 1390 * New implementation of X25519 (ECDH using Curve25519) from Project Everest 1391 (https://project-everest.github.io/). It can be enabled at compile time 1392 with MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED. This implementation is formally 1393 verified and significantly faster, but is only supported on x86 platforms 1394 (32-bit and 64-bit) using GCC, Clang or Visual Studio. Contributed by 1395 Christoph Wintersteiger from Microsoft Research. 1396 * Add mbedtls_net_close(), enabling the building of forking servers where 1397 the parent process closes the client socket and continue accepting, and 1398 the child process closes the listening socket and handles the client 1399 socket. Contributed by Robert Larsen in #2803. 1400 1401API Changes 1402 * Add DER-encoded test CRTs to library/certs.c, allowing 1403 the example programs ssl_server2 and ssl_client2 to be run 1404 if MBEDTLS_FS_IO and MBEDTLS_PEM_PARSE_C are unset. Fixes #2254. 1405 * The HAVEGE state type now uses uint32_t elements instead of int. 1406 * The functions mbedtls_ecp_curve_list() and mbedtls_ecp_grp_id_list() now 1407 list all curves for which at least one of ECDH or ECDSA is supported, not 1408 just curves for which both are supported. Call mbedtls_ecdsa_can_do() or 1409 mbedtls_ecdh_can_do() on each result to check whether each algorithm is 1410 supported. 1411 * The new function mbedtls_ecdsa_sign_det_ext() is similar to 1412 mbedtls_ecdsa_sign_det() but allows passing an external RNG for the 1413 purpose of blinding. 1414 1415New deprecations 1416 * Deprecate mbedtls_ecdsa_sign_det() in favor of a functions that can take an 1417 RNG function as an input. 1418 * Calling mbedtls_ecdsa_write_signature() with NULL as the f_rng argument 1419 is now deprecated. 1420 1421Bugfix 1422 * Fix missing bounds checks in X.509 parsing functions that could 1423 lead to successful parsing of ill-formed X.509 CRTs. Fixes #2437. 1424 * Fix multiple X.509 functions previously returning ASN.1 low-level error 1425 codes to always wrap these codes into X.509 high level error codes before 1426 returning. Fixes #2431. 1427 * Fix to allow building test suites with any warning that detects unused 1428 functions. Fixes #1628. 1429 * Fix typo in net_would_block(). Fixes #528 reported by github-monoculture. 1430 * Remove redundant include file in timing.c. Fixes #2640 reported by irwir. 1431 * Fix build failure when building with mingw on Windows by including 1432 stdarg.h where needed. Fixes #2656. 1433 * Fix Visual Studio Release x64 build configuration by inheriting 1434 PlatformToolset from the project configuration. Fixes #1430 reported by 1435 irwir. 1436 * Enable Suite B with subset of ECP curves. Make sure the code compiles even 1437 if some curves are not defined. Fixes #1591 reported by dbedev. 1438 * Fix misuse of signed arithmetic in the HAVEGE module. #2598 1439 * Avoid use of statically sized stack buffers for certificate writing. 1440 This previously limited the maximum size of DER encoded certificates 1441 in mbedtls_x509write_crt_der() to 2Kb. Reported by soccerGB in #2631. 1442 * Fix partial zeroing in x509_get_other_name. Found and fixed by ekse, #2716. 1443 * Update test certificates that were about to expire. Reported by 1444 Bernhard M. Wiedemann in #2357. 1445 * Fix the build on ARMv5TE in ARM mode to not use assembly instructions 1446 that are only available in Thumb mode. Fix contributed by Aurelien Jarno 1447 in #2169. 1448 * Fix propagation of restart contexts in restartable EC operations. 1449 This could previously lead to segmentation faults in builds using an 1450 address-sanitizer and enabling but not using MBEDTLS_ECP_RESTARTABLE. 1451 * Fix memory leak in in mpi_miller_rabin(). Contributed by 1452 Jens Wiklander <jens.wiklander@linaro.org> in #2363 1453 * Improve code clarity in x509_crt module, removing false-positive 1454 uninitialized variable warnings on some recent toolchains (GCC8, etc). 1455 Discovered and fixed by Andy Gross (Linaro), #2392. 1456 * Fix bug in endianness conversion in bignum module. This lead to 1457 functionally incorrect code on bigendian systems which don't have 1458 __BYTE_ORDER__ defined. Reported by Brendan Shanks. Fixes #2622. 1459 1460Changes 1461 * Replace multiple uses of MD2 by SHA-256 in X.509 test suite. Fixes #821. 1462 * Make it easier to define MBEDTLS_PARAM_FAILED as assert (which config.h 1463 suggests). #2671 1464 * Make `make clean` clean all programs always. Fixes #1862. 1465 * Add a Dockerfile and helper scripts (all-in-docker.sh, basic-in-docker.sh, 1466 docker-env.sh) to simplify running test suites on a Linux host. Contributed 1467 by Peter Kolbus (Garmin). 1468 * Add `reproducible` option to `ssl_client2` and `ssl_server2` to enable 1469 test runs without variability. Contributed by Philippe Antoine (Catena 1470 cyber) in #2681. 1471 * Extended .gitignore to ignore Visual Studio artifacts. Fixed by ConfusedSushi. 1472 * Adds fuzz targets, especially for continuous fuzzing with OSS-Fuzz. 1473 Contributed by Philippe Antoine (Catena cyber). 1474 * Remove the crypto part of the library from Mbed TLS. The crypto 1475 code and tests are now only available via Mbed Crypto, which 1476 Mbed TLS references as a Git submodule. 1477 1478= mbed TLS 2.18.1 branch released 2019-07-12 1479 1480Bugfix 1481 * Fix build failure when building with mingw on Windows by including 1482 stdarg.h where needed. Fixes #2656. 1483 1484Changes 1485 * Enable building of Mbed TLS as a CMake subproject. Suggested and fixed by 1486 Ashley Duncan in #2609. 1487 1488= mbed TLS 2.18.0 branch released 2019-06-11 1489 1490Features 1491 * Add the Any Policy certificate policy oid, as defined in 1492 rfc 5280 section 4.2.1.4. 1493 * It is now possible to use NIST key wrap mode via the mbedtls_cipher API. 1494 Contributed by Jack Lloyd and Fortanix Inc. 1495 * Add the Wi-SUN Field Area Network (FAN) device extended key usage. 1496 * Add the oid certificate policy x509 extension. 1497 * It is now possible to perform RSA PKCS v1.5 signatures with RIPEMD-160 digest. 1498 Contributed by Jack Lloyd and Fortanix Inc. 1499 * Extend the MBEDTLS_SSL_EXPORT_KEYS to export the handshake randbytes, 1500 and the used tls-prf. 1501 * Add public API for tls-prf function, according to requested enum. 1502 * Add support for parsing otherName entries in the Subject Alternative Name 1503 X.509 certificate extension, specifically type hardware module name, 1504 as defined in RFC 4108 section 5. 1505 * Add support for parsing certificate policies extension, as defined in 1506 RFC 5280 section 4.2.1.4. Currently, only the "Any Policy" policy is 1507 supported. 1508 * List all SAN types in the subject_alt_names field of the certificate. 1509 Resolves #459. 1510 * Add support for draft-05 of the Connection ID extension, as specified 1511 in https://tools.ietf.org/html/draft-ietf-tls-dtls-connection-id-05. 1512 The Connection ID extension allows to keep DTLS connections beyond the 1513 lifetime of the underlying transport by adding a connection identifier 1514 to the DTLS record header. This identifier can be used to associated an 1515 incoming record with the correct connection data even after the peer has 1516 changed its IP or port. The feature is enabled at compile-time by setting 1517 MBEDTLS_SSL_DTLS_CONNECTION_ID (disabled by default), and at run-time 1518 through the new APIs mbedtls_ssl_conf_cid() and mbedtls_ssl_set_cid(). 1519 1520 1521API Changes 1522 * Extend the MBEDTLS_SSL_EXPORT_KEYS to export the handshake randbytes, 1523 and the used tls-prf. 1524 * Add public API for tls-prf function, according to requested enum. 1525 1526Bugfix 1527 * Fix private key DER output in the key_app_writer example. File contents 1528 were shifted by one byte, creating an invalid ASN.1 tag. Fixed by 1529 Christian Walther in #2239. 1530 * Fix potential memory leak in X.509 self test. Found and fixed by 1531 Junhwan Park, #2106. 1532 * Reduce stack usage of hkdf tests. Fixes #2195. 1533 * Fix 1-byte buffer overflow in mbedtls_mpi_write_string() when 1534 used with negative inputs. Found by Guido Vranken in #2404. Credit to 1535 OSS-Fuzz. 1536 * Fix bugs in the AEAD test suite which would be exposed by ciphers which 1537 either used both encrypt and decrypt key schedules, or which perform padding. 1538 GCM and CCM were not affected. Fixed by Jack Lloyd. 1539 * Fix incorrect default port number in ssl_mail_client example's usage. 1540 Found and fixed by irwir. #2337 1541 * Add psa_util.h to test/cpp_dummy_build to fix build_default_make_gcc_and_cxx. 1542 Fixed by Peter Kolbus (Garmin). #2579 1543 * Add missing parentheses around parameters in the definition of the 1544 public macro MBEDTLS_X509_ID_FLAG. This could lead to invalid evaluation 1545 in case operators binding less strongly than subtraction were used 1546 for the parameter. 1547 * Add a check for MBEDTLS_X509_CRL_PARSE_C in ssl_server2, guarding the crl 1548 sni entry parameter. Reported by inestlerode in #560. 1549 * Set the next sequence of the subject_alt_name to NULL when deleting 1550 sequence on failure. Found and fix suggested by Philippe Antoine. 1551 Credit to OSS-Fuzz. 1552 1553Changes 1554 * Server's RSA certificate in certs.c was SHA-1 signed. In the default 1555 mbedTLS configuration only SHA-2 signed certificates are accepted. 1556 This certificate is used in the demo server programs, which lead the 1557 client programs to fail at the peer's certificate verification 1558 due to an unacceptable hash signature. The certificate has been 1559 updated to one that is SHA-256 signed. Fix contributed by 1560 Illya Gerasymchuk. 1561 * Return from various debugging routines immediately if the 1562 provided SSL context is unset. 1563 * Remove dead code from bignum.c in the default configuration. 1564 Found by Coverity, reported and fixed by Peter Kolbus (Garmin). Fixes #2309. 1565 * Add test for minimal value of MBEDTLS_MPI_WINDOW_SIZE to all.sh. 1566 Contributed by Peter Kolbus (Garmin). 1567 * Change wording in the `mbedtls_ssl_conf_max_frag_len()`'s documentation to 1568 improve clarity. Fixes #2258. 1569 1570= mbed TLS 2.17.0 branch released 2019-03-19 1571 1572Features 1573 * Add a new X.509 API call `mbedtls_x509_parse_der_nocopy()` 1574 which allows copy-less parsing of DER encoded X.509 CRTs, 1575 at the cost of additional lifetime constraints on the input 1576 buffer, but at the benefit of reduced RAM consumption. 1577 * Add a new function mbedtls_asn1_write_named_bitstring() to write ASN.1 1578 named bitstring in DER as required by RFC 5280 Appendix B. 1579 * Add MBEDTLS_REMOVE_3DES_CIPHERSUITES to allow removing 3DES ciphersuites 1580 from the default list (enabled by default). See 1581 https://sweet32.info/SWEET32_CCS16.pdf. 1582 1583API Changes 1584 * Add a new X.509 API call `mbedtls_x509_parse_der_nocopy()`. 1585 See the Features section for more information. 1586 * Allow to opt in to the removal the API mbedtls_ssl_get_peer_cert() 1587 for the benefit of saving RAM, by disabling the new compile-time 1588 option MBEDTLS_SSL_KEEP_PEER_CERTIFICATE (enabled by default for 1589 API stability). Disabling this option makes mbedtls_ssl_get_peer_cert() 1590 always return NULL, and removes the peer_cert field from the 1591 mbedtls_ssl_session structure which otherwise stores the peer's 1592 certificate. 1593 1594Security 1595 * Make mbedtls_ecdh_get_params return an error if the second key 1596 belongs to a different group from the first. Before, if an application 1597 passed keys that belonged to different group, the first key's data was 1598 interpreted according to the second group, which could lead to either 1599 an error or a meaningless output from mbedtls_ecdh_get_params. In the 1600 latter case, this could expose at most 5 bits of the private key. 1601 1602Bugfix 1603 * Fix a compilation issue with mbedtls_ecp_restart_ctx not being defined 1604 when MBEDTLS_ECP_ALT is defined. Reported by jwhui. Fixes #2242. 1605 * Run the AD too long test only if MBEDTLS_CCM_ALT is not defined. 1606 Raised as a comment in #1996. 1607 * Reduce the stack consumption of mbedtls_mpi_fill_random() which could 1608 previously lead to a stack overflow on constrained targets. 1609 * Add `MBEDTLS_SELF_TEST` for the mbedtls_self_test functions 1610 in the header files, which missed the precompilation check. #971 1611 * Fix returning the value 1 when mbedtls_ecdsa_genkey failed. 1612 * Remove a duplicate #include in a sample program. Fixed by Masashi Honma #2326. 1613 * Remove the mbedtls namespacing from the header file, to fix a "file not found" 1614 build error. Fixed by Haijun Gu #2319. 1615 * Fix signed-to-unsigned integer conversion warning 1616 in X.509 module. Fixes #2212. 1617 * Reduce stack usage of `mpi_write_hlp()` by eliminating recursion. 1618 Fixes #2190. 1619 * Fix false failure in all.sh when backup files exist in include/mbedtls 1620 (e.g. config.h.bak). Fixed by Peter Kolbus (Garmin) #2407. 1621 * Ensure that unused bits are zero when writing ASN.1 bitstrings when using 1622 mbedtls_asn1_write_bitstring(). 1623 * Fix issue when writing the named bitstrings in KeyUsage and NsCertType 1624 extensions in CSRs and CRTs that caused these bitstrings to not be encoded 1625 correctly as trailing zeroes were not accounted for as unused bits in the 1626 leading content octet. Fixes #1610. 1627 1628Changes 1629 * Reduce RAM consumption during session renegotiation by not storing 1630 the peer CRT chain and session ticket twice. 1631 * Include configuration file in all header files that use configuration, 1632 instead of relying on other header files that they include. 1633 Inserted as an enhancement for #1371 1634 * Add support for alternative CSR headers, as used by Microsoft and defined 1635 in RFC 7468. Found by Michael Ernst. Fixes #767. 1636 * Correct many misspellings. Fixed by MisterDA #2371. 1637 * Provide an abstraction of vsnprintf to allow alternative implementations 1638 for platforms that don't provide it. Based on contributions by Joris Aerts 1639 and Nathaniel Wesley Filardo. 1640 * Fix clobber list in MIPS assembly for large integer multiplication. 1641 Previously, this could lead to functionally incorrect assembly being 1642 produced by some optimizing compilers, showing up as failures in 1643 e.g. RSA or ECC signature operations. Reported in #1722, fix suggested 1644 by Aurelien Jarno and submitted by Jeffrey Martin. 1645 * Reduce the complexity of the timing tests. They were assuming more than the 1646 underlying OS actually guarantees. 1647 * Fix configuration queries in ssl-opt.h. #2030 1648 * Ensure that ssl-opt.h can be run in OS X. #2029 1649 * Re-enable certain interoperability tests in ssl-opt.sh which had previously 1650 been disabled for lack of a sufficiently recent version of GnuTLS on the CI. 1651 * Ciphersuites based on 3DES now have the lowest priority by default when 1652 they are enabled. 1653 1654= mbed TLS 2.16.0 branch released 2018-12-21 1655 1656Features 1657 * Add a new config.h option of MBEDTLS_CHECK_PARAMS that enables validation 1658 of parameters in the API. This allows detection of obvious misuses of the 1659 API, such as passing NULL pointers. The API of existing functions hasn't 1660 changed, but requirements on parameters have been made more explicit in 1661 the documentation. See the corresponding API documentation for each 1662 function to see for which parameter values it is defined. This feature is 1663 disabled by default. See its API documentation in config.h for additional 1664 steps you have to take when enabling it. 1665 1666API Changes 1667 * The following functions in the random generator modules have been 1668 deprecated and replaced as shown below. The new functions change 1669 the return type from void to int to allow returning error codes when 1670 using MBEDTLS_<MODULE>_ALT for the underlying AES or message digest 1671 primitive. Fixes #1798. 1672 mbedtls_ctr_drbg_update() -> mbedtls_ctr_drbg_update_ret() 1673 mbedtls_hmac_drbg_update() -> mbedtls_hmac_drbg_update_ret() 1674 * Extend ECDH interface to enable alternative implementations. 1675 * Deprecate error codes of the form MBEDTLS_ERR_xxx_INVALID_KEY_LENGTH for 1676 ARIA, CAMELLIA and Blowfish. These error codes will be replaced by 1677 the more generic per-module error codes MBEDTLS_ERR_xxx_BAD_INPUT_DATA. 1678 * Additional parameter validation checks have been added for the following 1679 modules - AES, ARIA, Blowfish, CAMELLIA, CCM, GCM, DHM, ECP, ECDSA, ECDH, 1680 ECJPAKE, SHA, Chacha20 and Poly1305, cipher, pk, RSA, and MPI. 1681 Where modules have had parameter validation added, existing parameter 1682 checks may have changed. Some modules, such as Chacha20 had existing 1683 parameter validation whereas other modules had little. This has now been 1684 changed so that the same level of validation is present in all modules, and 1685 that it is now optional with the MBEDTLS_CHECK_PARAMS flag which by default 1686 is off. That means that checks which were previously present by default 1687 will no longer be. 1688 1689New deprecations 1690 * Deprecate mbedtls_ctr_drbg_update and mbedtls_hmac_drbg_update 1691 in favor of functions that can return an error code. 1692 1693Bugfix 1694 * Fix for Clang, which was reporting a warning for the bignum.c inline 1695 assembly for AMD64 targets creating string literals greater than those 1696 permitted by the ISO C99 standard. Found by Aaron Jones. Fixes #482. 1697 * Fix runtime error in `mbedtls_platform_entropy_poll()` when run 1698 through qemu user emulation. Reported and fix suggested by randombit 1699 in #1212. Fixes #1212. 1700 * Fix an unsafe bounds check when restoring an SSL session from a ticket. 1701 This could lead to a buffer overflow, but only in case ticket authentication 1702 was broken. Reported and fix suggested by Guido Vranken in #659. 1703 * Add explicit integer to enumeration type casts to example program 1704 programs/pkey/gen_key which previously led to compilation failure 1705 on some toolchains. Reported by phoenixmcallister. Fixes #2170. 1706 * Fix double initialization of ECC hardware that made some accelerators 1707 hang. 1708 * Clarify documentation of mbedtls_ssl_set_own_cert() regarding the absence 1709 of check for certificate/key matching. Reported by Attila Molnar, #507. 1710 1711 = mbed TLS 2.15.1 branch released 2018-11-30 1712 1713 Changes 1714 * Update the Mbed Crypto submodule to version 0.1.0b2. 1715 1716 = mbed TLS 2.15.0 branch released 2018-11-23 1717 1718 Features 1719 * Add an experimental build option, USE_CRYPTO_SUBMODULE, to enable use of 1720 Mbed Crypto as the source of the cryptography implementation. 1721 * Add an experimental configuration option, MBEDTLS_PSA_CRYPTO_C, to enable 1722 the PSA Crypto API from Mbed Crypto when additionally used with the 1723 USE_CRYPTO_SUBMODULE build option. 1724 1725 Changes 1726 * Add unit tests for AES-GCM when called through mbedtls_cipher_auth_xxx() 1727 from the cipher abstraction layer. Fixes #2198. 1728 1729= mbed TLS 2.14.1 branch released 2018-11-30 1730 1731Security 1732 * Fix timing variations and memory access variations in RSA PKCS#1 v1.5 1733 decryption that could lead to a Bleichenbacher-style padding oracle 1734 attack. In TLS, this affects servers that accept ciphersuites based on 1735 RSA decryption (i.e. ciphersuites whose name contains RSA but not 1736 (EC)DH(E)). Discovered by Eyal Ronen (Weizmann Institute), Robert Gillham 1737 (University of Adelaide), Daniel Genkin (University of Michigan), 1738 Adi Shamir (Weizmann Institute), David Wong (NCC Group), and Yuval Yarom 1739 (University of Adelaide, Data61). The attack is described in more detail 1740 in the paper available here: http://cat.eyalro.net/cat.pdf CVE-2018-19608 1741 * In mbedtls_mpi_write_binary(), don't leak the exact size of the number 1742 via branching and memory access patterns. An attacker who could submit 1743 a plaintext for RSA PKCS#1 v1.5 decryption but only observe the timing 1744 of the decryption and not its result could nonetheless decrypt RSA 1745 plaintexts and forge RSA signatures. Other asymmetric algorithms may 1746 have been similarly vulnerable. Reported by Eyal Ronen, Robert Gillham, 1747 Daniel Genkin, Adi Shamir, David Wong and Yuval Yarom. 1748 * Wipe sensitive buffers on the stack in the CTR_DRBG and HMAC_DRBG 1749 modules. 1750 1751API Changes 1752 * The new functions mbedtls_ctr_drbg_update_ret() and 1753 mbedtls_hmac_drbg_update_ret() are similar to mbedtls_ctr_drbg_update() 1754 and mbedtls_hmac_drbg_update() respectively, but the new functions 1755 report errors whereas the old functions return void. We recommend that 1756 applications use the new functions. 1757 1758= mbed TLS 2.14.0 branch released 2018-11-19 1759 1760Security 1761 * Fix overly strict DN comparison when looking for CRLs belonging to a 1762 particular CA. This previously led to ignoring CRLs when the CRL's issuer 1763 name and the CA's subject name differed in their string encoding (e.g., 1764 one using PrintableString and the other UTF8String) or in the choice of 1765 upper and lower case. Reported by Henrik Andersson of Bosch GmbH in issue 1766 #1784. 1767 * Fix a flawed bounds check in server PSK hint parsing. In case the 1768 incoming message buffer was placed within the first 64KiB of address 1769 space and a PSK-(EC)DHE ciphersuite was used, this allowed an attacker 1770 to trigger a memory access up to 64KiB beyond the incoming message buffer, 1771 potentially leading to an application crash or information disclosure. 1772 * Fix mbedtls_mpi_is_prime() to use more rounds of probabilistic testing. The 1773 previous settings for the number of rounds made it practical for an 1774 adversary to construct non-primes that would be erroneously accepted as 1775 primes with high probability. This does not have an impact on the 1776 security of TLS, but can matter in other contexts with numbers chosen 1777 potentially by an adversary that should be prime and can be validated. 1778 For example, the number of rounds was enough to securely generate RSA key 1779 pairs or Diffie-Hellman parameters, but was insufficient to validate 1780 Diffie-Hellman parameters properly. 1781 See "Prime and Prejudice" by by Martin R. Albrecht and Jake Massimo and 1782 Kenneth G. Paterson and Juraj Somorovsky. 1783 1784Features 1785 * Add support for temporarily suspending expensive ECC computations after 1786 some configurable amount of operations. This is intended to be used in 1787 constrained, single-threaded systems where ECC is time consuming and can 1788 block other operations until they complete. This is disabled by default, 1789 but can be enabled by MBEDTLS_ECP_RESTARTABLE at compile time and 1790 configured by mbedtls_ecp_set_max_ops() at runtime. It applies to the new 1791 xxx_restartable functions in ECP, ECDSA, PK and X.509 (CRL not supported 1792 yet), and to existing functions in ECDH and SSL (currently only 1793 implemented client-side, for ECDHE-ECDSA ciphersuites in TLS 1.2, 1794 including client authentication). 1795 * Add support for Arm CPU DSP extensions to accelerate asymmetric key 1796 operations. On CPUs where the extensions are available, they can accelerate 1797 MPI multiplications used in ECC and RSA cryptography. Contributed by 1798 Aurelien Jarno. 1799 * Extend RSASSA-PSS signature to allow a smaller salt size. Previously, PSS 1800 signature always used a salt with the same length as the hash, and returned 1801 an error if this was not possible. Now the salt size may be up to two bytes 1802 shorter. This allows the library to support all hash and signature sizes 1803 that comply with FIPS 186-4, including SHA-512 with a 1024-bit key. 1804 * Add support for 128-bit keys in CTR_DRBG. Note that using keys shorter 1805 than 256 bits limits the security of generated material to 128 bits. 1806 1807API Changes 1808 * Add a common error code of `MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED` for 1809 a feature that is not supported by underlying alternative 1810 implementations implementing cryptographic primitives. This is useful for 1811 hardware accelerators that don't implement all options or features. 1812 1813New deprecations 1814 * All module specific errors following the form 1815 MBEDTLS_ERR_XXX_FEATURE_UNAVAILABLE that indicate a feature is not 1816 supported are deprecated and are now replaced by the new equivalent 1817 platform error. 1818 * All module specific generic hardware acceleration errors following the 1819 form MBEDTLS_ERR_XXX_HW_ACCEL_FAILED that are deprecated and are replaced 1820 by the equivalent plaform error. 1821 * Deprecate the function mbedtls_mpi_is_prime() in favor of 1822 mbedtls_mpi_is_prime_ext() which allows specifying the number of 1823 Miller-Rabin rounds. 1824 1825Bugfix 1826 * Fix wrong order of freeing in programs/ssl/ssl_server2 example 1827 application leading to a memory leak in case both 1828 MBEDTLS_MEMORY_BUFFER_ALLOC_C and MBEDTLS_MEMORY_BACKTRACE are set. 1829 Fixes #2069. 1830 * Fix a bug in the update function for SSL ticket keys which previously 1831 invalidated keys of a lifetime of less than a 1s. Fixes #1968. 1832 * Fix failure in hmac_drbg in the benchmark sample application, when 1833 MBEDTLS_THREADING_C is defined. Found by TrinityTonic, #1095 1834 * Fix a bug in the record decryption routine ssl_decrypt_buf() 1835 which lead to accepting properly authenticated but improperly 1836 padded records in case of CBC ciphersuites using Encrypt-then-MAC. 1837 * Fix memory leak and freeing without initialization in the example 1838 program programs/x509/cert_write. Fixes #1422. 1839 * Ignore IV in mbedtls_cipher_set_iv() when the cipher mode is 1840 MBEDTLS_MODE_ECB. Found by ezdevelop. Fixes #1091. 1841 * Zeroize memory used for buffering or reassembling handshake messages 1842 after use. 1843 * Use `mbedtls_platform_zeroize()` instead of `memset()` for zeroization 1844 of sensitive data in the example programs aescrypt2 and crypt_and_hash. 1845 * Change the default string format used for various X.509 DN attributes to 1846 UTF8String. Previously, the use of the PrintableString format led to 1847 wildcards and non-ASCII characters being unusable in some DN attributes. 1848 Reported by raprepo in #1860 and by kevinpt in #468. Fix contributed by 1849 Thomas-Dee. 1850 * Fix compilation failure for configurations which use compile time 1851 replacements of standard calloc/free functions through the macros 1852 MBEDTLS_PLATFORM_CALLOC_MACRO and MBEDTLS_PLATFORM_FREE_MACRO. 1853 Reported by ole-de and ddhome2006. Fixes #882, #1642 and #1706. 1854 1855Changes 1856 * Removed support for Yotta as a build tool. 1857 * Add tests for session resumption in DTLS. 1858 * Close a test gap in (D)TLS between the client side and the server side: 1859 test the handling of large packets and small packets on the client side 1860 in the same way as on the server side. 1861 * Change the dtls_client and dtls_server samples to work by default over 1862 IPv6 and optionally by a build option over IPv4. 1863 * Change the use of Windows threading to use Microsoft Visual C++ runtime 1864 calls, rather than Win32 API calls directly. This is necessary to avoid 1865 conflict with C runtime usage. Found and fixed by irwir. 1866 * Remember the string format of X.509 DN attributes when replicating 1867 X.509 DNs. Previously, DN attributes were always written in their default 1868 string format (mostly PrintableString), which could lead to CRTs being 1869 created which used PrintableStrings in the issuer field even though the 1870 signing CA used UTF8Strings in its subject field; while X.509 compliant, 1871 such CRTs were rejected in some applications, e.g. some versions of 1872 Firefox, curl and GnuTLS. Reported in #1033 by Moschn. Fix contributed by 1873 Thomas-Dee. 1874 * Improve documentation of mbedtls_ssl_get_verify_result(). 1875 Fixes #517 reported by github-monoculture. 1876 * Add MBEDTLS_MPI_GEN_PRIME_FLAG_LOW_ERR flag to mbedtls_mpi_gen_prime() and 1877 use it to reduce error probability in RSA key generation to levels mandated 1878 by FIPS-186-4. 1879 1880= mbed TLS 2.13.1 branch released 2018-09-06 1881 1882API Changes 1883 * Extend the platform module with an abstraction mbedtls_platform_gmtime_r() 1884 whose implementation should behave as a thread-safe version of gmtime(). 1885 This allows users to configure such an implementation at compile time when 1886 the target system cannot be deduced automatically, by setting the option 1887 MBEDTLS_PLATFORM_GMTIME_R_ALT. At this stage Mbed TLS is only able to 1888 automatically select implementations for Windows and POSIX C libraries. 1889 1890Bugfix 1891 * Fix build failures on platforms where only gmtime() is available but 1892 neither gmtime_r() nor gmtime_s() are present. Fixes #1907. 1893 1894= mbed TLS 2.13.0 branch released 2018-08-31 1895 1896Security 1897 * Fix an issue in the X.509 module which could lead to a buffer overread 1898 during certificate extensions parsing. In case of receiving malformed 1899 input (extensions length field equal to 0), an illegal read of one byte 1900 beyond the input buffer is made. Found and analyzed by Nathan Crandall. 1901 1902Features 1903 * Add support for fragmentation of outgoing DTLS handshake messages. This 1904 is controlled by the maximum fragment length as set locally or negotiated 1905 with the peer, as well as by a new per-connection MTU option, set using 1906 mbedtls_ssl_set_mtu(). 1907 * Add support for auto-adjustment of MTU to a safe value during the 1908 handshake when flights do not get through (RFC 6347, section 4.1.1.1, 1909 last paragraph). 1910 * Add support for packing multiple records within a single datagram, 1911 enabled by default. 1912 * Add support for buffering out-of-order handshake messages in DTLS. 1913 The maximum amount of RAM used for this can be controlled by the 1914 compile-time constant MBEDTLS_SSL_DTLS_MAX_BUFFERING defined 1915 in mbedtls/config.h. 1916 1917API Changes 1918 * Add function mbedtls_ssl_set_datagram_packing() to configure 1919 the use of datagram packing (enabled by default). 1920 1921Bugfix 1922 * Fix a potential memory leak in mbedtls_ssl_setup() function. An allocation 1923 failure in the function could lead to other buffers being leaked. 1924 * Fixes an issue with MBEDTLS_CHACHAPOLY_C which would not compile if 1925 MBEDTLS_ARC4_C and MBEDTLS_CIPHER_NULL_CIPHER weren't also defined. #1890 1926 * Fix a memory leak in ecp_mul_comb() if ecp_precompute_comb() fails. 1927 Fix contributed by Espressif Systems. 1928 * Add ecc extensions only if an ecc based ciphersuite is used. 1929 This improves compliance to RFC 4492, and as a result, solves 1930 interoperability issues with BouncyCastle. Raised by milenamil in #1157. 1931 * Replace printf with mbedtls_printf in the ARIA module. Found by 1932 TrinityTonic in #1908. 1933 * Fix potential use-after-free in mbedtls_ssl_get_max_frag_len() 1934 and mbedtls_ssl_get_record_expansion() after a session reset. Fixes #1941. 1935 * Fix a bug that caused SSL/TLS clients to incorrectly abort the handshake 1936 with TLS versions 1.1 and earlier when the server requested authentication 1937 without providing a list of CAs. This was due to an overly strict bounds 1938 check in parsing the CertificateRequest message, 1939 introduced in Mbed TLS 2.12.0. Fixes #1954. 1940 * Fix a miscalculation of the maximum record expansion in 1941 mbedtls_ssl_get_record_expansion() in case of ChachaPoly ciphersuites, 1942 or CBC ciphersuites in (D)TLS versions 1.1 or higher. Fixes #1913, #1914. 1943 * Fix undefined shifts with negative values in certificates parsing 1944 (found by Catena cyber using oss-fuzz) 1945 * Fix memory leak and free without initialization in pk_encrypt 1946 and pk_decrypt example programs. Reported by Brace Stout. Fixes #1128. 1947 * Remove redundant else statement. Raised by irwir. Fixes #1776. 1948 1949Changes 1950 * Copy headers preserving timestamps when doing a "make install". 1951 Contributed by xueruini. 1952 * Allow the forward declaration of public structs. Contributed by Dawid 1953 Drozd. Fixes #1215 raised by randombit. 1954 * Improve compatibility with some alternative CCM implementations by using 1955 CCM test vectors from RAM. 1956 * Add support for buffering of out-of-order handshake messages. 1957 * Add warnings to the documentation of the HKDF module to reduce the risk 1958 of misusing the mbedtls_hkdf_extract() and mbedtls_hkdf_expand() 1959 functions. Fixes #1775. Reported by Brian J. Murray. 1960 1961= mbed TLS 2.12.0 branch released 2018-07-25 1962 1963Security 1964 * Fix a vulnerability in TLS ciphersuites based on CBC and using SHA-384, 1965 in (D)TLS 1.0 to 1.2, that allowed an active network attacker to 1966 partially recover the plaintext of messages under some conditions by 1967 exploiting timing measurements. With DTLS, the attacker could perform 1968 this recovery by sending many messages in the same connection. With TLS 1969 or if mbedtls_ssl_conf_dtls_badmac_limit() was used, the attack only 1970 worked if the same secret (for example a HTTP Cookie) has been repeatedly 1971 sent over connections manipulated by the attacker. Connections using GCM 1972 or CCM instead of CBC, using hash sizes other than SHA-384, or using 1973 Encrypt-then-Mac (RFC 7366) were not affected. The vulnerability was 1974 caused by a miscalculation (for SHA-384) in a countermeasure to the 1975 original Lucky 13 attack. Found by Kenny Paterson, Eyal Ronen and Adi 1976 Shamir. 1977 * Fix a vulnerability in TLS ciphersuites based on CBC, in (D)TLS 1.0 to 1978 1.2, that allowed a local attacker, able to execute code on the local 1979 machine as well as manipulate network packets, to partially recover the 1980 plaintext of messages under some conditions by using a cache attack 1981 targeting an internal MD/SHA buffer. With TLS or if 1982 mbedtls_ssl_conf_dtls_badmac_limit() was used, the attack only worked if 1983 the same secret (for example a HTTP Cookie) has been repeatedly sent over 1984 connections manipulated by the attacker. Connections using GCM or CCM 1985 instead of CBC or using Encrypt-then-Mac (RFC 7366) were not affected. 1986 Found by Kenny Paterson, Eyal Ronen and Adi Shamir. 1987 * Add a counter-measure against a vulnerability in TLS ciphersuites based 1988 on CBC, in (D)TLS 1.0 to 1.2, that allowed a local attacker, able to 1989 execute code on the local machine as well as manipulate network packets, 1990 to partially recover the plaintext of messages under some conditions (see 1991 previous entry) by using a cache attack targeting the SSL input record 1992 buffer. Connections using GCM or CCM instead of CBC or using 1993 Encrypt-then-Mac (RFC 7366) were not affected. Found by Kenny Paterson, 1994 Eyal Ronen and Adi Shamir. 1995 1996Features 1997 * Add new crypto primitives from RFC 7539: stream cipher Chacha20, one-time 1998 authenticator Poly1305 and AEAD construct Chacha20-Poly1305. Contributed 1999 by Daniel King. 2000 * Add support for CHACHA20-POLY1305 ciphersuites from RFC 7905. 2001 * Add platform support for the Haiku OS. (https://www.haiku-os.org). 2002 Contributed by Augustin Cavalier. 2003 * Make the receive and transmit buffers independent sizes, for situations 2004 where the outgoing buffer can be fixed at a smaller size than the incoming 2005 buffer, which can save some RAM. If buffer lengths are kept equal, there 2006 is no functional difference. Contributed by Angus Gratton, and also 2007 independently contributed again by Paul Sokolovsky. 2008 * Add support for key wrapping modes based on AES as defined by 2009 NIST SP 800-38F algorithms KW and KWP and by RFC 3394 and RFC 5649. 2010 2011Bugfix 2012 * Fix the key_app_writer example which was writing a leading zero byte which 2013 was creating an invalid ASN.1 tag. Found by Aryeh R. Fixes #1257. 2014 * Fix compilation error on C++, because of a variable named new. 2015 Found and fixed by Hirotaka Niisato in #1783. 2016 * Fix "no symbols" warning issued by ranlib when building on Mac OS X. Fix 2017 contributed by tabascoeye. 2018 * Clarify documentation for mbedtls_ssl_write() to include 0 as a valid 2019 return value. Found by @davidwu2000. #839 2020 * Fix a memory leak in mbedtls_x509_csr_parse(), found by catenacyber, 2021 Philippe Antoine. Fixes #1623. 2022 * Remove unused headers included in x509.c. Found by Chris Hanson and fixed 2023 by Brendan Shanks. Part of a fix for #992. 2024 * Fix compilation error when MBEDTLS_ARC4_C is disabled and 2025 MBEDTLS_CIPHER_NULL_CIPHER is enabled. Found by TrinityTonic in #1719. 2026 * Added length checks to some TLS parsing functions. Found and fixed by 2027 Philippe Antoine from Catena cyber. #1663. 2028 * Fix the inline assembly for the MPI multiply helper function for i386 and 2029 i386 with SSE2. Found by László Langó. Fixes #1550 2030 * Fix namespacing in header files. Remove the `mbedtls` namespacing in 2031 the `#include` in the header files. Resolves #857 2032 * Fix compiler warning of 'use before initialisation' in 2033 mbedtls_pk_parse_key(). Found by Martin Boye Petersen and fixed by Dawid 2034 Drozd. #1098 2035 * Fix decryption for zero length messages (which contain all padding) when a 2036 CBC based ciphersuite is used together with Encrypt-then-MAC. Previously, 2037 such a message was wrongly reported as an invalid record and therefore lead 2038 to the connection being terminated. Seen most often with OpenSSL using 2039 TLS 1.0. Reported by @kFYatek and by Conor Murphy on the forum. Fix 2040 contributed by Espressif Systems. Fixes #1632 2041 * Fix ssl_client2 example to send application data with 0-length content 2042 when the request_size argument is set to 0 as stated in the documentation. 2043 Fixes #1833. 2044 * Correct the documentation for `mbedtls_ssl_get_session()`. This API has 2045 deep copy of the session, and the peer certificate is not lost. Fixes #926. 2046 * Fix build using -std=c99. Fixed by Nick Wilson. 2047 2048Changes 2049 * Fail when receiving a TLS alert message with an invalid length, or invalid 2050 zero-length messages when using TLS 1.2. Contributed by Espressif Systems. 2051 * Change the default behaviour of mbedtls_hkdf_extract() to return an error 2052 when calling with a NULL salt and non-zero salt_len. Contributed by 2053 Brian J Murray 2054 * Change the shebang line in Perl scripts to look up perl in the PATH. 2055 Contributed by fbrosson. 2056 * Allow overriding the time on Windows via the platform-time abstraction. 2057 Fixed by Nick Wilson. 2058 * Use gmtime_r/gmtime_s for thread-safety. Fixed by Nick Wilson. 2059 2060= mbed TLS 2.11.0 branch released 2018-06-18 2061 2062Features 2063 * Add additional block mode, OFB (Output Feedback), to the AES module and 2064 cipher abstraction module. 2065 * Implement the HMAC-based extract-and-expand key derivation function 2066 (HKDF) per RFC 5869. Contributed by Thomas Fossati. 2067 * Add support for the CCM* block cipher mode as defined in IEEE Std. 802.15.4. 2068 * Add support for the XTS block cipher mode with AES (AES-XTS). 2069 Contributed by Aorimn in pull request #414. 2070 * In TLS servers, support offloading private key operations to an external 2071 cryptoprocessor. Private key operations can be asynchronous to allow 2072 non-blocking operation of the TLS server stack. 2073 2074Bugfix 2075 * Fix the cert_write example to handle certificates signed with elliptic 2076 curves as well as RSA. Fixes #777 found by dbedev. 2077 * Fix for redefinition of _WIN32_WINNT to avoid overriding a definition 2078 used by user applications. Found and fixed by Fabio Alessandrelli. 2079 * Fix compilation warnings with IAR toolchain, on 32 bit platform. 2080 Reported by rahmanih in #683 2081 * Fix braces in mbedtls_memory_buffer_alloc_status(). Found by sbranden, #552. 2082 2083Changes 2084 * Changed CMake defaults for IAR to treat all compiler warnings as errors. 2085 * Changed the Clang parameters used in the CMake build files to work for 2086 versions later than 3.6. Versions of Clang earlier than this may no longer 2087 work. Fixes #1072 2088 2089= mbed TLS 2.10.0 branch released 2018-06-06 2090 2091Features 2092 * Add support for ARIA cipher (RFC 5794) and associated TLS ciphersuites 2093 (RFC 6209). Disabled by default, see MBEDTLS_ARIA_C in config.h 2094 2095API Changes 2096 * Extend the platform module with a util component that contains 2097 functionality shared by multiple Mbed TLS modules. At this stage 2098 platform_util.h (and its associated platform_util.c) only contain 2099 mbedtls_platform_zeroize(), which is a critical function from a security 2100 point of view. mbedtls_platform_zeroize() needs to be regularly tested 2101 against compilers to ensure that calls to it are not removed from the 2102 output binary as part of redundant code elimination optimizations. 2103 Therefore, mbedtls_platform_zeroize() is moved to the platform module to 2104 facilitate testing and maintenance. 2105 2106Bugfix 2107 * Fix an issue with MicroBlaze support in bn_mul.h which was causing the 2108 build to fail. Found by zv-io. Fixes #1651. 2109 2110Changes 2111 * Support TLS testing in out-of-source builds using cmake. Fixes #1193. 2112 * Fix redundant declaration of mbedtls_ssl_list_ciphersuites. Raised by 2113 TrinityTonic. #1359. 2114 2115= mbed TLS 2.9.0 branch released 2018-04-30 2116 2117Security 2118 * Fix an issue in the X.509 module which could lead to a buffer overread 2119 during certificate validation. Additionally, the issue could also lead to 2120 unnecessary callback checks being made or to some validation checks to be 2121 omitted. The overread could be triggered remotely, while the other issues 2122 would require a non DER-compliant certificate to be correctly signed by a 2123 trusted CA, or a trusted CA with a non DER-compliant certificate. Found by 2124 luocm. Fixes #825. 2125 * Fix the buffer length assertion in the ssl_parse_certificate_request() 2126 function which led to an arbitrary overread of the message buffer. The 2127 overreads could be caused by receiving a malformed message at the point 2128 where an optional signature algorithms list is expected when the signature 2129 algorithms section is too short. In builds with debug output, the overread 2130 data is output with the debug data. 2131 * Fix a client-side bug in the validation of the server's ciphersuite choice 2132 which could potentially lead to the client accepting a ciphersuite it didn't 2133 offer or a ciphersuite that cannot be used with the TLS or DTLS version 2134 chosen by the server. This could lead to corruption of internal data 2135 structures for some configurations. 2136 2137Features 2138 * Add an option, MBEDTLS_AES_FEWER_TABLES, to dynamically compute smaller AES 2139 tables during runtime, thereby reducing the RAM/ROM footprint by ~6KiB. 2140 Suggested and contributed by jkivilin in pull request #394. 2141 * Add initial support for Curve448 (RFC 7748). Only mbedtls_ecp_mul() and 2142 ECDH primitive functions (mbedtls_ecdh_gen_public(), 2143 mbedtls_ecdh_compute_shared()) are supported for now. Contributed by 2144 Nicholas Wilson in pull request #348. 2145 2146API Changes 2147 * Extend the public API with the function of mbedtls_net_poll() to allow user 2148 applications to wait for a network context to become ready before reading 2149 or writing. 2150 * Add function mbedtls_ssl_check_pending() to the public API to allow 2151 a check for whether more more data is pending to be processed in the 2152 internal message buffers. 2153 This function is necessary to determine when it is safe to idle on the 2154 underlying transport in case event-driven IO is used. 2155 2156Bugfix 2157 * Fix a spurious uninitialized variable warning in cmac.c. Fix independently 2158 contributed by Brian J Murray and David Brown. 2159 * Add missing dependencies in test suites that led to build failures 2160 in configurations that omit certain hashes or public-key algorithms. 2161 Fixes #1040. 2162 * Fix C89 incompatibility in benchmark.c. Contributed by Brendan Shanks. 2163 #1353 2164 * Add missing dependencies for MBEDTLS_HAVE_TIME_DATE and 2165 MBEDTLS_VERSION_FEATURES in some test suites. Contributed by 2166 Deomid Ryabkov. Fixes #1299, #1475. 2167 * Fix the Makefile build process for building shared libraries on Mac OS X. 2168 Fixed by mnacamura. 2169 * Fix parsing of PKCS#8 encoded Elliptic Curve keys. Previously Mbed TLS was 2170 unable to parse keys which had only the optional parameters field of the 2171 ECPrivateKey structure. Found by Jethro Beekman, fixed in #1379. 2172 * Return the plaintext data more quickly on unpadded CBC decryption, as 2173 stated in the mbedtls_cipher_update() documentation. Contributed by 2174 Andy Leiserson. 2175 * Fix overriding and ignoring return values when parsing and writing to 2176 a file in pk_sign program. Found by kevlut in #1142. 2177 * Restrict usage of error code MBEDTLS_ERR_SSL_WANT_READ to situations 2178 where data needs to be fetched from the underlying transport in order 2179 to make progress. Previously, this error code was also occasionally 2180 returned when unexpected messages were being discarded, ignoring that 2181 further messages could potentially already be pending to be processed 2182 in the internal buffers; these cases led to deadlocks when event-driven 2183 I/O was used. Found and reported by Hubert Mis in #772. 2184 * Fix buffer length assertions in the ssl_parse_certificate_request() 2185 function which leads to a potential one byte overread of the message 2186 buffer. 2187 * Fix invalid buffer sizes passed to zlib during record compression and 2188 decompression. 2189 * Fix the soversion of libmbedcrypto to match the soversion of the 2190 maintained 2.7 branch. The soversion was increased in Mbed TLS 2191 version 2.7.1 to reflect breaking changes in that release, but the 2192 increment was missed in 2.8.0 and later releases outside of the 2.7 branch. 2193 2194Changes 2195 * Remove some redundant code in bignum.c. Contributed by Alexey Skalozub. 2196 * Support cmake builds where Mbed TLS is a subproject. Fix contributed 2197 independently by Matthieu Volat and Arne Schwabe. 2198 * Improve testing in configurations that omit certain hashes or 2199 public-key algorithms. Includes contributions by Gert van Dijk. 2200 * Improve negative testing of X.509 parsing. 2201 * Do not define global mutexes around readdir() and gmtime() in 2202 configurations where the feature is disabled. Found and fixed by Gergely 2203 Budai. 2204 * Harden the function mbedtls_ssl_config_free() against misuse, so that it 2205 doesn't leak memory if the user doesn't use mbedtls_ssl_conf_psk() and 2206 instead incorrectly manipulates the configuration structure directly. 2207 Found and fix submitted by junyeonLEE in #1220. 2208 * Provide an empty implementation of mbedtls_pkcs5_pbes2() when 2209 MBEDTLS_ASN1_PARSE_C is not enabled. This allows the use of PBKDF2 2210 without PBES2. Fixed by Marcos Del Sol Vives. 2211 * Add the order of the base point as N in the mbedtls_ecp_group structure 2212 for Curve25519 (other curves had it already). Contributed by Nicholas 2213 Wilson #481 2214 * Improve the documentation of mbedtls_net_accept(). Contributed by Ivan 2215 Krylov. 2216 * Improve the documentation of mbedtls_ssl_write(). Suggested by 2217 Paul Sokolovsky in #1356. 2218 * Add an option in the Makefile to support ar utilities where the operation 2219 letter must not be prefixed by '-', such as LLVM. Found and fixed by 2220 Alex Hixon. 2221 * Allow configuring the shared library extension by setting the DLEXT 2222 environment variable when using the project makefiles. 2223 * Optimize unnecessary zeroing in mbedtls_mpi_copy. Based on a contribution 2224 by Alexey Skalozub in #405. 2225 * In the SSL module, when f_send, f_recv or f_recv_timeout report 2226 transmitting more than the required length, return an error. Raised by 2227 Sam O'Connor in #1245. 2228 * Improve robustness of mbedtls_ssl_derive_keys against the use of 2229 HMAC functions with non-HMAC ciphersuites. Independently contributed 2230 by Jiayuan Chen in #1377. Fixes #1437. 2231 * Improve security of RSA key generation by including criteria from 2232 FIPS 186-4. Contributed by Jethro Beekman. #1380 2233 * Declare functions in header files even when an alternative implementation 2234 of the corresponding module is activated by defining the corresponding 2235 MBEDTLS_XXX_ALT macro. This means that alternative implementations do 2236 not need to copy the declarations, and ensures that they will have the 2237 same API. 2238 * Add platform setup and teardown calls in test suites. 2239 2240= mbed TLS 2.8.0 branch released 2018-03-16 2241 2242Default behavior changes 2243 * The truncated HMAC extension now conforms to RFC 6066. This means 2244 that when both sides of a TLS connection negotiate the truncated 2245 HMAC extension, Mbed TLS can now interoperate with other 2246 compliant implementations, but this breaks interoperability with 2247 prior versions of Mbed TLS. To restore the old behavior, enable 2248 the (deprecated) option MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT in 2249 config.h. Found by Andreas Walz (ivESK, Offenburg University of 2250 Applied Sciences). 2251 2252Security 2253 * Fix implementation of the truncated HMAC extension. The previous 2254 implementation allowed an offline 2^80 brute force attack on the 2255 HMAC key of a single, uninterrupted connection (with no 2256 resumption of the session). 2257 * Verify results of RSA private key operations to defend 2258 against Bellcore glitch attack. 2259 * Fix a buffer overread in ssl_parse_server_key_exchange() that could cause 2260 a crash on invalid input. 2261 * Fix a buffer overread in ssl_parse_server_psk_hint() that could cause a 2262 crash on invalid input. 2263 * Fix CRL parsing to reject CRLs containing unsupported critical 2264 extensions. Found by Falko Strenzke and Evangelos Karatsiolis. 2265 2266Features 2267 * Extend PKCS#8 interface by introducing support for the entire SHA 2268 algorithms family when encrypting private keys using PKCS#5 v2.0. 2269 This allows reading encrypted PEM files produced by software that 2270 uses PBKDF2-SHA2, such as OpenSSL 1.1. Submitted by Antonio Quartulli, 2271 OpenVPN Inc. Fixes #1339 2272 * Add support for public keys encoded in PKCS#1 format. #1122 2273 2274New deprecations 2275 * Deprecate support for record compression (configuration option 2276 MBEDTLS_ZLIB_SUPPORT). 2277 2278Bugfix 2279 * Fix the name of a DHE parameter that was accidentally changed in 2.7.0. 2280 Fixes #1358. 2281 * Fix test_suite_pk to work on 64-bit ILP32 systems. #849 2282 * Fix mbedtls_x509_crt_profile_suiteb, which used to reject all certificates 2283 with flag MBEDTLS_X509_BADCERT_BAD_PK even when the key type was correct. 2284 In the context of SSL, this resulted in handshake failure. Reported by 2285 daniel in the Mbed TLS forum. #1351 2286 * Fix Windows x64 builds with the included mbedTLS.sln file. #1347 2287 * Fix setting version TLSv1 as minimal version, even if TLS 1 2288 is not enabled. Set MBEDTLS_SSL_MIN_MAJOR_VERSION 2289 and MBEDTLS_SSL_MIN_MINOR_VERSION instead of 2290 MBEDTLS_SSL_MAJOR_VERSION_3 and MBEDTLS_SSL_MINOR_VERSION_1. #664 2291 * Fix compilation error on Mingw32 when _TRUNCATE is defined. Use _TRUNCATE 2292 only if __MINGW32__ not defined. Fix suggested by Thomas Glanzmann and 2293 Nick Wilson on issue #355 2294 * In test_suite_pk, pass valid parameters when testing for hash length 2295 overflow. #1179 2296 * Fix memory allocation corner cases in memory_buffer_alloc.c module. Found 2297 by Guido Vranken. #639 2298 * Log correct number of ciphersuites used in Client Hello message. #918 2299 * Fix X509 CRT parsing that would potentially accept an invalid tag when 2300 parsing the subject alternative names. 2301 * Fix a possible arithmetic overflow in ssl_parse_server_key_exchange() 2302 that could cause a key exchange to fail on valid data. 2303 * Fix a possible arithmetic overflow in ssl_parse_server_psk_hint() that 2304 could cause a key exchange to fail on valid data. 2305 * Don't define mbedtls_aes_decrypt and mbedtls_aes_encrypt under 2306 MBEDTLS_DEPRECATED_REMOVED. #1388 2307 * Fix a 1-byte heap buffer overflow (read-only) during private key parsing. 2308 Found through fuzz testing. 2309 2310Changes 2311 * Fix tag lengths and value ranges in the documentation of CCM encryption. 2312 Contributed by Mathieu Briand. 2313 * Fix typo in a comment ctr_drbg.c. Contributed by Paul Sokolovsky. 2314 * Remove support for the library reference configuration for picocoin. 2315 * MD functions deprecated in 2.7.0 are no longer inline, to provide 2316 a migration path for those depending on the library's ABI. 2317 * Clarify the documentation of mbedtls_ssl_setup. 2318 * Use (void) when defining functions with no parameters. Contributed by 2319 Joris Aerts. #678 2320 2321= mbed TLS 2.7.0 branch released 2018-02-03 2322 2323Security 2324 * Fix a heap corruption issue in the implementation of the truncated HMAC 2325 extension. When the truncated HMAC extension is enabled and CBC is used, 2326 sending a malicious application packet could be used to selectively corrupt 2327 6 bytes on the peer's heap, which could potentially lead to crash or remote 2328 code execution. The issue could be triggered remotely from either side in 2329 both TLS and DTLS. CVE-2018-0488 2330 * Fix a buffer overflow in RSA-PSS verification when the hash was too large 2331 for the key size, which could potentially lead to crash or remote code 2332 execution. Found by Seth Terashima, Qualcomm Product Security Initiative, 2333 Qualcomm Technologies Inc. CVE-2018-0487 2334 * Fix buffer overflow in RSA-PSS verification when the unmasked data is all 2335 zeros. 2336 * Fix an unsafe bounds check in ssl_parse_client_psk_identity() when adding 2337 64 KiB to the address of the SSL buffer and causing a wrap around. 2338 * Fix a potential heap buffer overflow in mbedtls_ssl_write(). When the (by 2339 default enabled) maximum fragment length extension is disabled in the 2340 config and the application data buffer passed to mbedtls_ssl_write 2341 is larger than the internal message buffer (16384 bytes by default), the 2342 latter overflows. The exploitability of this issue depends on whether the 2343 application layer can be forced into sending such large packets. The issue 2344 was independently reported by Tim Nordell via e-mail and by Florin Petriuc 2345 and sjorsdewit on GitHub. Fix proposed by Florin Petriuc in #1022. 2346 Fixes #707. 2347 * Add a provision to prevent compiler optimizations breaking the time 2348 constancy of mbedtls_ssl_safer_memcmp(). 2349 * Ensure that buffers are cleared after use if they contain sensitive data. 2350 Changes were introduced in multiple places in the library. 2351 * Set PEM buffer to zero before freeing it, to avoid decoded private keys 2352 being leaked to memory after release. 2353 * Fix dhm_check_range() failing to detect trivial subgroups and potentially 2354 leaking 1 bit of the private key. Reported by prashantkspatil. 2355 * Make mbedtls_mpi_read_binary() constant-time with respect to the input 2356 data. Previously, trailing zero bytes were detected and omitted for the 2357 sake of saving memory, but potentially leading to slight timing 2358 differences. Reported by Marco Macchetti, Kudelski Group. 2359 * Wipe stack buffer temporarily holding EC private exponent 2360 after keypair generation. 2361 * Fix a potential heap buffer over-read in ALPN extension parsing 2362 (server-side). Could result in application crash, but only if an ALPN 2363 name larger than 16 bytes had been configured on the server. 2364 * Change default choice of DHE parameters from untrustworthy RFC 5114 2365 to RFC 3526 containing parameters generated in a nothing-up-my-sleeve 2366 manner. 2367 2368Features 2369 * Allow comments in test data files. 2370 * The selftest program can execute a subset of the tests based on command 2371 line arguments. 2372 * New unit tests for timing. Improve the self-test to be more robust 2373 when run on a heavily-loaded machine. 2374 * Add alternative implementation support for CCM and CMAC (MBEDTLS_CCM_ALT, 2375 MBEDTLS_CMAC_ALT). Submitted by Steven Cooreman, Silicon Labs. 2376 * Add support for alternative implementations of GCM, selected by the 2377 configuration flag MBEDTLS_GCM_ALT. 2378 * Add support for alternative implementations for ECDSA, controlled by new 2379 configuration flags MBEDTLS_ECDSA_SIGN_ALT, MBEDTLS_ECDSA_VERIFY_ALT and 2380 MBEDTLS_ECDSDA_GENKEY_AT in config.h. 2381 The following functions from the ECDSA module can be replaced 2382 with alternative implementation: 2383 mbedtls_ecdsa_sign(), mbedtls_ecdsa_verify() and mbedtls_ecdsa_genkey(). 2384 * Add support for alternative implementation of ECDH, controlled by the 2385 new configuration flags MBEDTLS_ECDH_COMPUTE_SHARED_ALT and 2386 MBEDTLS_ECDH_GEN_PUBLIC_ALT in config.h. 2387 The following functions from the ECDH module can be replaced 2388 with an alternative implementation: 2389 mbedtls_ecdh_gen_public() and mbedtls_ecdh_compute_shared(). 2390 * Add support for alternative implementation of ECJPAKE, controlled by 2391 the new configuration flag MBEDTLS_ECJPAKE_ALT. 2392 * Add mechanism to provide alternative implementation of the DHM module. 2393 2394API Changes 2395 * Extend RSA interface by multiple functions allowing structure- 2396 independent setup and export of RSA contexts. Most notably, 2397 mbedtls_rsa_import() and mbedtls_rsa_complete() are introduced for setting 2398 up RSA contexts from partial key material and having them completed to the 2399 needs of the implementation automatically. This allows to setup private RSA 2400 contexts from keys consisting of N,D,E only, even if P,Q are needed for the 2401 purpose or CRT and/or blinding. 2402 * The configuration option MBEDTLS_RSA_ALT can be used to define alternative 2403 implementations of the RSA interface declared in rsa.h. 2404 * The following functions in the message digest modules (MD2, MD4, MD5, 2405 SHA1, SHA256, SHA512) have been deprecated and replaced as shown below. 2406 The new functions change the return type from void to int to allow 2407 returning error codes when using MBEDTLS_<MODULE>_ALT. 2408 mbedtls_<MODULE>_starts() -> mbedtls_<MODULE>_starts_ret() 2409 mbedtls_<MODULE>_update() -> mbedtls_<MODULE>_update_ret() 2410 mbedtls_<MODULE>_finish() -> mbedtls_<MODULE>_finish_ret() 2411 mbedtls_<MODULE>_process() -> mbedtls_internal_<MODULE>_process() 2412 2413New deprecations 2414 * Deprecate usage of RSA primitives with non-matching key-type 2415 (e.g. signing with a public key). 2416 * Direct manipulation of structure fields of RSA contexts is deprecated. 2417 Users are advised to use the extended RSA API instead. 2418 * Deprecate usage of message digest functions that return void 2419 (mbedtls_<MODULE>_starts, mbedtls_<MODULE>_update, 2420 mbedtls_<MODULE>_finish and mbedtls_<MODULE>_process where <MODULE> is 2421 any of MD2, MD4, MD5, SHA1, SHA256, SHA512) in favor of functions 2422 that can return an error code. 2423 * Deprecate untrustworthy DHE parameters from RFC 5114. Superseded by 2424 parameters from RFC 3526 or the newly added parameters from RFC 7919. 2425 * Deprecate hex string DHE constants MBEDTLS_DHM_RFC3526_MODP_2048_P etc. 2426 Supserseded by binary encoded constants MBEDTLS_DHM_RFC3526_MODP_2048_P_BIN 2427 etc. 2428 * Deprecate mbedtls_ssl_conf_dh_param() for setting default DHE parameters 2429 from hex strings. Superseded by mbedtls_ssl_conf_dh_param_bin() 2430 accepting DHM parameters in binary form, matching the new constants. 2431 2432Bugfix 2433 * Fix ssl_parse_record_header() to silently discard invalid DTLS records 2434 as recommended in RFC 6347 Section 4.1.2.7. 2435 * Fix memory leak in mbedtls_ssl_set_hostname() when called multiple times. 2436 Found by projectgus and Jethro Beekman, #836. 2437 * Fix usage help in ssl_server2 example. Found and fixed by Bei Lin. 2438 * Parse signature algorithm extension when renegotiating. Previously, 2439 renegotiated handshakes would only accept signatures using SHA-1 2440 regardless of the peer's preferences, or fail if SHA-1 was disabled. 2441 * Fix leap year calculation in x509_date_is_valid() to ensure that invalid 2442 dates on leap years with 100 and 400 intervals are handled correctly. Found 2443 by Nicholas Wilson. #694 2444 * Fix some invalid RSA-PSS signatures with keys of size 8N+1 that were 2445 accepted. Generating these signatures required the private key. 2446 * Fix out-of-memory problem when parsing 4096-bit PKCS8-encrypted RSA keys. 2447 Found independently by Florian in the mbed TLS forum and by Mishamax. 2448 #878, #1019. 2449 * Fix variable used before assignment compilation warnings with IAR 2450 toolchain. Found by gkerrien38. 2451 * Fix unchecked return codes from AES, DES and 3DES functions in 2452 pem_aes_decrypt(), pem_des_decrypt() and pem_des3_decrypt() respectively. 2453 If a call to one of the functions of the cryptographic primitive modules 2454 failed, the error may not be noticed by the function 2455 mbedtls_pem_read_buffer() causing it to return invalid values. Found by 2456 Guido Vranken. #756 2457 * Include configuration file in md.h, to fix compilation warnings. 2458 Reported by aaronmdjones in #1001 2459 * Correct extraction of signature-type from PK instance in X.509 CRT and CSR 2460 writing routines that prevented these functions to work with alternative 2461 RSA implementations. Raised by J.B. in the Mbed TLS forum. Fixes #1011. 2462 * Don't print X.509 version tag for v1 CRT's, and omit extensions for 2463 non-v3 CRT's. 2464 * Fix bugs in RSA test suite under MBEDTLS_NO_PLATFORM_ENTROPY. #1023 #1024 2465 * Fix net_would_block() to avoid modification by errno through fcntl() call. 2466 Found by nkolban. Fixes #845. 2467 * Fix handling of handshake messages in mbedtls_ssl_read() in case 2468 MBEDTLS_SSL_RENEGOTIATION is disabled. Found by erja-gp. 2469 * Add a check for invalid private parameters in mbedtls_ecdsa_sign(). 2470 Reported by Yolan Romailler. 2471 * Fix word size check in in pk.c to not depend on MBEDTLS_HAVE_INT64. 2472 * Fix incorrect unit in benchmark output. #850 2473 * Add size-checks for record and handshake message content, securing 2474 fragile yet non-exploitable code-paths. 2475 * Fix crash when calling mbedtls_ssl_cache_free() twice. Found by 2476 MilenkoMitrovic, #1104 2477 * Fix mbedtls_timing_alarm(0) on Unix and MinGW. 2478 * Fix use of uninitialized memory in mbedtls_timing_get_timer() when reset=1. 2479 * Fix possible memory leaks in mbedtls_gcm_self_test(). 2480 * Added missing return code checks in mbedtls_aes_self_test(). 2481 * Fix issues in RSA key generation program programs/x509/rsa_genkey and the 2482 RSA test suite where the failure of CTR DRBG initialization lead to 2483 freeing an RSA context and several MPI's without proper initialization 2484 beforehand. 2485 * Fix error message in programs/pkey/gen_key.c. Found and fixed by Chris Xue. 2486 * Fix programs/pkey/dh_server.c so that it actually works with dh_client.c. 2487 Found and fixed by Martijn de Milliano. 2488 * Fix an issue in the cipher decryption with the mode 2489 MBEDTLS_PADDING_ONE_AND_ZEROS that sometimes accepted invalid padding. 2490 Note, this padding mode is not used by the TLS protocol. Found and fixed by 2491 Micha Kraus. 2492 * Fix the entropy.c module to not call mbedtls_sha256_starts() or 2493 mbedtls_sha512_starts() in the mbedtls_entropy_init() function. 2494 * Fix the entropy.c module to ensure that mbedtls_sha256_init() or 2495 mbedtls_sha512_init() is called before operating on the relevant context 2496 structure. Do not assume that zeroizing a context is a correct way to 2497 reset it. Found independently by ccli8 on Github. 2498 * In mbedtls_entropy_free(), properly free the message digest context. 2499 * Fix status handshake status message in programs/ssl/dtls_client.c. Found 2500 and fixed by muddog. 2501 2502Changes 2503 * Extend cert_write example program by options to set the certificate version 2504 and the message digest. Further, allow enabling/disabling of authority 2505 identifier, subject identifier and basic constraints extensions. 2506 * Only check for necessary RSA structure fields in `mbedtls_rsa_private`. In 2507 particular, don't require P,Q if neither CRT nor blinding are 2508 used. Reported and fix proposed independently by satur9nine and sliai 2509 on GitHub. 2510 * Only run AES-192 self-test if AES-192 is available. Fixes #963. 2511 * Tighten the RSA PKCS#1 v1.5 signature verification code and remove the 2512 undeclared dependency of the RSA module on the ASN.1 module. 2513 * Update all internal usage of deprecated message digest functions to the 2514 new ones with return codes. In particular, this modifies the 2515 mbedtls_md_info_t structure. Propagate errors from these functions 2516 everywhere except some locations in the ssl_tls.c module. 2517 * Improve CTR_DRBG error handling by propagating underlying AES errors. 2518 * Add MBEDTLS_ERR_XXX_HW_ACCEL_FAILED error codes for all cryptography 2519 modules where the software implementation can be replaced by a hardware 2520 implementation. 2521 * Add explicit warnings for the use of MD2, MD4, MD5, SHA-1, DES and ARC4 2522 throughout the library. 2523 2524= mbed TLS 2.6.0 branch released 2017-08-10 2525 2526Security 2527 * Fix authentication bypass in SSL/TLS: when authmode is set to optional, 2528 mbedtls_ssl_get_verify_result() would incorrectly return 0 when the peer's 2529 X.509 certificate chain had more than MBEDTLS_X509_MAX_INTERMEDIATE_CA 2530 (default: 8) intermediates, even when it was not trusted. This could be 2531 triggered remotely from either side. (With authmode set to 'required' 2532 (the default), the handshake was correctly aborted). 2533 * Reliably wipe sensitive data after use in the AES example applications 2534 programs/aes/aescrypt2 and programs/aes/crypt_and_hash. 2535 Found by Laurent Simon. 2536 2537Features 2538 * Add the functions mbedtls_platform_setup() and mbedtls_platform_teardown() 2539 and the context struct mbedtls_platform_context to perform 2540 platform-specific setup and teardown operations. The macro 2541 MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT allows the functions to be overridden 2542 by the user in a platform_alt.h file. These new functions are required in 2543 some embedded environments to provide a means of initialising underlying 2544 cryptographic acceleration hardware. 2545 2546API Changes 2547 * Reverted API/ABI breaking changes introduced in mbed TLS 2.5.1, to make the 2548 API consistent with mbed TLS 2.5.0. Specifically removed the inline 2549 qualifier from the functions mbedtls_aes_decrypt, mbedtls_aes_encrypt, 2550 mbedtls_ssl_ciphersuite_uses_ec and mbedtls_ssl_ciphersuite_uses_psk. Found 2551 by James Cowgill. #978 2552 * Certificate verification functions now set flags to -1 in case the full 2553 chain was not verified due to an internal error (including in the verify 2554 callback) or chain length limitations. 2555 * With authmode set to optional, the TLS handshake is now aborted if the 2556 verification of the peer's certificate failed due to an overlong chain or 2557 a fatal error in the verify callback. 2558 2559Bugfix 2560 * Add a check if iv_len is zero in GCM, and return an error if it is zero. 2561 Reported by roberto. #716 2562 * Replace preprocessor condition from #if defined(MBEDTLS_THREADING_PTHREAD) 2563 to #if defined(MBEDTLS_THREADING_C) as the library cannot assume they will 2564 always be implemented by pthread support. #696 2565 * Fix a resource leak on Windows platforms in mbedtls_x509_crt_parse_path(), 2566 in the case of an error. Found by redplait. #590 2567 * Add MBEDTLS_MPI_CHK to check for error value of mbedtls_mpi_fill_random. 2568 Reported and fix suggested by guidovranken. #740 2569 * Fix conditional preprocessor directives in bignum.h to enable 64-bit 2570 compilation when using ARM Compiler 6. 2571 * Fix a potential integer overflow in the version verification for DER 2572 encoded X.509 CRLs. The overflow could enable maliciously constructed CRLs 2573 to bypass the version verification check. Found by Peng Li/Yueh-Hsun Lin, 2574 KNOX Security, Samsung Research America 2575 * Fix potential integer overflow in the version verification for DER 2576 encoded X.509 CSRs. The overflow could enable maliciously constructed CSRs 2577 to bypass the version verification check. Found by Peng Li/Yueh-Hsun Lin, 2578 KNOX Security, Samsung Research America 2579 * Fix a potential integer overflow in the version verification for DER 2580 encoded X.509 certificates. The overflow could enable maliciously 2581 constructed certificates to bypass the certificate verification check. 2582 * Fix a call to the libc function time() to call the platform abstraction 2583 function mbedtls_time() instead. Found by wairua. #666 2584 * Avoid shadowing of time and index functions through mbed TLS function 2585 arguments. Found by inestlerode. #557. 2586 2587Changes 2588 * Added config.h option MBEDTLS_NO_UDBL_DIVISION, to prevent the use of 2589 64-bit division. This is useful on embedded platforms where 64-bit division 2590 created a dependency on external libraries. #708 2591 * Removed mutexes from ECP hardware accelerator code. Now all hardware 2592 accelerator code in the library leaves concurrency handling to the 2593 platform. Reported by Steven Cooreman. #863 2594 * Define the macro MBEDTLS_AES_ROM_TABLES in the configuration file 2595 config-no-entropy.h to reduce the RAM footprint. 2596 * Added a test script that can be hooked into git that verifies commits 2597 before they are pushed. 2598 * Improve documentation of PKCS1 decryption functions. 2599 2600= mbed TLS 2.5.1 released 2017-06-21 2601 2602Security 2603 * Fixed unlimited overread of heap-based buffer in mbedtls_ssl_read(). 2604 The issue could only happen client-side with renegotiation enabled. 2605 Could result in DoS (application crash) or information leak 2606 (if the application layer sent data read from mbedtls_ssl_read() 2607 back to the server or to a third party). Can be triggered remotely. 2608 * Removed SHA-1 and RIPEMD-160 from the default hash algorithms for 2609 certificate verification. SHA-1 can be turned back on with a compile-time 2610 option if needed. 2611 * Fixed offset in FALLBACK_SCSV parsing that caused TLS server to fail to 2612 detect it sometimes. Reported by Hugo Leisink. #810 2613 * Tighten parsing of RSA PKCS#1 v1.5 signatures, to avoid a 2614 potential Bleichenbacher/BERserk-style attack. 2615 2616Bugfix 2617 * Remove size zero arrays from ECJPAKE test suite. Size zero arrays are not 2618 valid C and they prevented the test from compiling in Visual Studio 2015 2619 and with GCC using the -Wpedantic compilation option. 2620 * Fix insufficient support for signature-hash-algorithm extension, 2621 resulting in compatibility problems with Chrome. Found by hfloyrd. #823 2622 * Fix behaviour that hid the original cause of fatal alerts in some cases 2623 when sending the alert failed. The fix makes sure not to hide the error 2624 that triggered the alert. 2625 * Fix SSLv3 renegotiation behaviour and stop processing data received from 2626 peer after sending a fatal alert to refuse a renegotiation attempt. 2627 Previous behaviour was to keep processing data even after the alert has 2628 been sent. 2629 * Accept empty trusted CA chain in authentication mode 2630 MBEDTLS_SSL_VERIFY_OPTIONAL. Found by Jethro Beekman. #864 2631 * Fix implementation of mbedtls_ssl_parse_certificate() to not annihilate 2632 fatal errors in authentication mode MBEDTLS_SSL_VERIFY_OPTIONAL and to 2633 reflect bad EC curves within verification result. 2634 * Fix bug that caused the modular inversion function to accept the invalid 2635 modulus 1 and therefore to hang. Found by blaufish. #641. 2636 * Fix incorrect sign computation in modular exponentiation when the base is 2637 a negative MPI. Previously the result was always negative. Found by Guido 2638 Vranken. 2639 * Fix a numerical underflow leading to stack overflow in mpi_read_file() 2640 that was triggered uppon reading an empty line. Found by Guido Vranken. 2641 2642Changes 2643 * Send fatal alerts in more cases. The previous behaviour was to skip 2644 sending the fatal alert and just drop the connection. 2645 * Clarify ECDSA documentation and improve the sample code to avoid 2646 misunderstanding and potentially dangerous use of the API. Pointed out 2647 by Jean-Philippe Aumasson. 2648 2649= mbed TLS 2.5.0 branch released 2017-05-17 2650 2651Security 2652 * Wipe stack buffers in RSA private key operations 2653 (rsa_rsaes_pkcs1_v15_decrypt(), rsa_rsaes_oaep_decrypt). Found by Laurent 2654 Simon. 2655 * Add exponent blinding to RSA private operations as a countermeasure 2656 against side-channel attacks like the cache attack described in 2657 https://arxiv.org/abs/1702.08719v2. 2658 Found and fix proposed by Michael Schwarz, Samuel Weiser, Daniel Gruss, 2659 Clémentine Maurice and Stefan Mangard. 2660 2661Features 2662 * Add hardware acceleration support for the Elliptic Curve Point module. 2663 This involved exposing parts of the internal interface to enable 2664 replacing the core functions and adding and alternative, module level 2665 replacement support for enabling the extension of the interface. 2666 * Add a new configuration option to 'mbedtls_ssl_config' to enable 2667 suppressing the CA list in Certificate Request messages. The default 2668 behaviour has not changed, namely every configured CAs name is included. 2669 2670API Changes 2671 * The following functions in the AES module have been deprecated and replaced 2672 by the functions shown below. The new functions change the return type from 2673 void to int to allow returning error codes when using MBEDTLS_AES_ALT, 2674 MBEDTLS_AES_DECRYPT_ALT or MBEDTLS_AES_ENCRYPT_ALT. 2675 mbedtls_aes_decrypt() -> mbedtls_internal_aes_decrypt() 2676 mbedtls_aes_encrypt() -> mbedtls_internal_aes_encrypt() 2677 2678Bugfix 2679 * Remove macros from compat-1.3.h that correspond to deleted items from most 2680 recent versions of the library. Found by Kyle Keen. 2681 * Fixed issue in the Threading module that prevented mutexes from 2682 initialising. Found by sznaider. #667 #843 2683 * Add checks in the PK module for the RSA functions on 64-bit systems. 2684 The PK and RSA modules use different types for passing hash length and 2685 without these checks the type cast could lead to data loss. Found by Guido 2686 Vranken. 2687 2688= mbed TLS 2.4.2 branch released 2017-03-08 2689 2690Security 2691 * Add checks to prevent signature forgeries for very large messages while 2692 using RSA through the PK module in 64-bit systems. The issue was caused by 2693 some data loss when casting a size_t to an unsigned int value in the 2694 functions rsa_verify_wrap(), rsa_sign_wrap(), rsa_alt_sign_wrap() and 2695 mbedtls_pk_sign(). Found by Jean-Philippe Aumasson. 2696 * Fixed potential livelock during the parsing of a CRL in PEM format in 2697 mbedtls_x509_crl_parse(). A string containing a CRL followed by trailing 2698 characters after the footer could result in the execution of an infinite 2699 loop. The issue can be triggered remotely. Found by Greg Zaverucha, 2700 Microsoft. 2701 * Removed MD5 from the allowed hash algorithms for CertificateRequest and 2702 CertificateVerify messages, to prevent SLOTH attacks against TLS 1.2. 2703 Introduced by interoperability fix for #513. 2704 * Fixed a bug that caused freeing a buffer that was allocated on the stack, 2705 when verifying the validity of a key on secp224k1. This could be 2706 triggered remotely for example with a maliciously constructed certificate 2707 and potentially could lead to remote code execution on some platforms. 2708 Reported independently by rongsaws and Aleksandar Nikolic, Cisco Talos 2709 team. #569 CVE-2017-2784 2710 2711Bugfix 2712 * Fix output certificate verification flags set by x509_crt_verify_top() when 2713 traversing a chain of trusted CA. The issue would cause both flags, 2714 MBEDTLS_X509_BADCERT_NOT_TRUSTED and MBEDTLS_X509_BADCERT_EXPIRED, to be 2715 set when the verification conditions are not met regardless of the cause. 2716 Found by Harm Verhagen and inestlerode. #665 #561 2717 * Fix the redefinition of macro ssl_set_bio to an undefined symbol 2718 mbedtls_ssl_set_bio_timeout in compat-1.3.h, by removing it. 2719 Found by omlib-lin. #673 2720 * Fix unused variable/function compilation warnings in pem.c, x509_crt.c and 2721 x509_csr.c that are reported when building mbed TLS with a config.h that 2722 does not define MBEDTLS_PEM_PARSE_C. Found by omnium21. #562 2723 * Fix incorrect renegotiation condition in ssl_check_ctr_renegotiate() that 2724 would compare 64 bits of the record counter instead of 48 bits as indicated 2725 in RFC 6347 Section 4.3.1. This could cause the execution of the 2726 renegotiation routines at unexpected times when the protocol is DTLS. Found 2727 by wariua. #687 2728 * Fixed multiple buffer overreads in mbedtls_pem_read_buffer() when parsing 2729 the input string in PEM format to extract the different components. Found 2730 by Eyal Itkin. 2731 * Fixed potential arithmetic overflow in mbedtls_ctr_drbg_reseed() that could 2732 cause buffer bound checks to be bypassed. Found by Eyal Itkin. 2733 * Fixed potential arithmetic overflows in mbedtls_cipher_update() that could 2734 cause buffer bound checks to be bypassed. Found by Eyal Itkin. 2735 * Fixed potential arithmetic overflow in mbedtls_md2_update() that could 2736 cause buffer bound checks to be bypassed. Found by Eyal Itkin. 2737 * Fixed potential arithmetic overflow in mbedtls_base64_decode() that could 2738 cause buffer bound checks to be bypassed. Found by Eyal Itkin. 2739 * Fixed heap overreads in mbedtls_x509_get_time(). Found by Peng 2740 Li/Yueh-Hsun Lin, KNOX Security, Samsung Research America. 2741 * Fix potential memory leak in mbedtls_x509_crl_parse(). The leak was caused 2742 by missing calls to mbedtls_pem_free() in cases when a 2743 MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT error was encountered. Found and 2744 fix proposed by Guido Vranken. #722 2745 * Fixed the templates used to generate project and solution files for Visual 2746 Studio 2015 as well as the files themselves, to remove a build warning 2747 generated in Visual Studio 2015. Reported by Steve Valliere. #742 2748 * Fix a resource leak in ssl_cookie, when using MBEDTLS_THREADING_C. 2749 Raised and fix suggested by Alan Gillingham in the mbed TLS forum. #771 2750 * Fix 1 byte buffer overflow in mbedtls_mpi_write_string() when the MPI 2751 number to write in hexadecimal is negative and requires an odd number of 2752 digits. Found and fixed by Guido Vranken. 2753 * Fix unlisted DES configuration dependency in some pkparse test cases. Found 2754 by inestlerode. #555 2755 2756= mbed TLS 2.4.1 branch released 2016-12-13 2757 2758Changes 2759 * Update to CMAC test data, taken from - NIST Special Publication 800-38B - 2760 Recommendation for Block Cipher Modes of Operation: The CMAC Mode for 2761 Authentication – October 2016 2762 2763= mbed TLS 2.4.0 branch released 2016-10-17 2764 2765Security 2766 * Removed the MBEDTLS_SSL_AEAD_RANDOM_IV option, because it was not compliant 2767 with RFC-5116 and could lead to session key recovery in very long TLS 2768 sessions. "Nonce-Disrespecting Adversaries Practical Forgery Attacks on GCM in 2769 TLS" - H. Bock, A. Zauner, S. Devlin, J. Somorovsky, P. Jovanovic. 2770 https://eprint.iacr.org/2016/475.pdf 2771 * Fixed potential stack corruption in mbedtls_x509write_crt_der() and 2772 mbedtls_x509write_csr_der() when the signature is copied to the buffer 2773 without checking whether there is enough space in the destination. The 2774 issue cannot be triggered remotely. Found by Jethro Beekman. 2775 2776Features 2777 * Added support for CMAC for AES and 3DES and AES-CMAC-PRF-128, as defined by 2778 NIST SP 800-38B, RFC-4493 and RFC-4615. 2779 * Added hardware entropy selftest to verify that the hardware entropy source 2780 is functioning correctly. 2781 * Added a script to print build environment info for diagnostic use in test 2782 scripts, which is also now called by all.sh. 2783 * Added the macro MBEDTLS_X509_MAX_FILE_PATH_LEN that enables the user to 2784 configure the maximum length of a file path that can be buffered when 2785 calling mbedtls_x509_crt_parse_path(). 2786 * Added a configuration file config-no-entropy.h that configures the subset of 2787 library features that do not require an entropy source. 2788 * Added the macro MBEDTLS_ENTROPY_MIN_HARDWARE in config.h. This allows users 2789 to configure the minimum number of bytes for entropy sources using the 2790 mbedtls_hardware_poll() function. 2791 2792Bugfix 2793 * Fix for platform time abstraction to avoid dependency issues where a build 2794 may need time but not the standard C library abstraction, and added 2795 configuration consistency checks to check_config.h 2796 * Fix dependency issue in Makefile to allow parallel builds. 2797 * Fix incorrect handling of block lengths in crypt_and_hash.c sample program, 2798 when GCM is used. Found by udf2457. #441 2799 * Fix for key exchanges based on ECDH-RSA or ECDH-ECDSA which weren't 2800 enabled unless others were also present. Found by David Fernandez. #428 2801 * Fix for out-of-tree builds using CMake. Found by jwurzer, and fix based on 2802 a contribution from Tobias Tangemann. #541 2803 * Fixed cert_app.c sample program for debug output and for use when no root 2804 certificates are provided. 2805 * Fix conditional statement that would cause a 1 byte overread in 2806 mbedtls_asn1_get_int(). Found and fixed by Guido Vranken. #599 2807 * Fixed pthread implementation to avoid unintended double initialisations 2808 and double frees. Found by Niklas Amnebratt. 2809 * Fixed the sample applications gen_key.c, cert_req.c and cert_write.c for 2810 builds where the configuration MBEDTLS_PEM_WRITE_C is not defined. Found 2811 by inestlerode. #559. 2812 * Fix mbedtls_x509_get_sig() to update the ASN1 type in the mbedtls_x509_buf 2813 data structure until after error checks are successful. Found by 2814 subramanyam-c. #622 2815 * Fix documentation and implementation missmatch for function arguments of 2816 mbedtls_gcm_finish(). Found by cmiatpaar. #602 2817 * Guarantee that P>Q at RSA key generation. Found by inestlerode. #558 2818 * Fix potential byte overread when verifying malformed SERVER_HELLO in 2819 ssl_parse_hello_verify_request() for DTLS. Found by Guido Vranken. 2820 * Fix check for validity of date when parsing in mbedtls_x509_get_time(). 2821 Found by subramanyam-c. #626 2822 * Fix compatibility issue with Internet Explorer client authentication, 2823 where the limited hash choices prevented the client from sending its 2824 certificate. Found by teumas. #513 2825 * Fix compilation without MBEDTLS_SELF_TEST enabled. 2826 2827Changes 2828 * Extended test coverage of special cases, and added new timing test suite. 2829 * Removed self-tests from the basic-built-test.sh script, and added all 2830 missing self-tests to the test suites, to ensure self-tests are only 2831 executed once. 2832 * Added support for 3 and 4 byte lengths to mbedtls_asn1_write_len(). 2833 * Added support for a Yotta specific configuration file - 2834 through the symbol YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE. 2835 * Added optimization for code space for X.509/OID based on configured 2836 features. Contributed by Aviv Palivoda. 2837 * Renamed source file library/net.c to library/net_sockets.c to avoid 2838 naming collision in projects which also have files with the common name 2839 net.c. For consistency, the corresponding header file, net.h, is marked as 2840 deprecated, and its contents moved to net_sockets.h. 2841 * Changed the strategy for X.509 certificate parsing and validation, to no 2842 longer disregard certificates with unrecognised fields. 2843 2844= mbed TLS 2.3.0 branch released 2016-06-28 2845 2846Security 2847 * Fix missing padding length check in mbedtls_rsa_rsaes_pkcs1_v15_decrypt 2848 required by PKCS1 v2.2 2849 * Fix potential integer overflow to buffer overflow in 2850 mbedtls_rsa_rsaes_pkcs1_v15_encrypt and mbedtls_rsa_rsaes_oaep_encrypt 2851 (not triggerable remotely in (D)TLS). 2852 * Fix a potential integer underflow to buffer overread in 2853 mbedtls_rsa_rsaes_oaep_decrypt. It is not triggerable remotely in 2854 SSL/TLS. 2855 2856Features 2857 * Support for platform abstraction of the standard C library time() 2858 function. 2859 2860Bugfix 2861 * Fix bug in mbedtls_mpi_add_mpi() that caused wrong results when the three 2862 arguments where the same (in-place doubling). Found and fixed by Janos 2863 Follath. #309 2864 * Fix potential build failures related to the 'apidoc' target, introduced 2865 in the previous patch release. Found by Robert Scheck. #390 #391 2866 * Fix issue in Makefile that prevented building using armar. #386 2867 * Fix memory leak that occurred only when ECJPAKE was enabled and ECDHE and 2868 ECDSA was disabled in config.h . The leak didn't occur by default. 2869 * Fix an issue that caused valid certificates to be rejected whenever an 2870 expired or not yet valid certificate was parsed before a valid certificate 2871 in the trusted certificate list. 2872 * Fix bug in mbedtls_x509_crt_parse that caused trailing extra data in the 2873 buffer after DER certificates to be included in the raw representation. 2874 * Fix issue that caused a hang when generating RSA keys of odd bitlength 2875 * Fix bug in mbedtls_rsa_rsaes_pkcs1_v15_encrypt that made null pointer 2876 dereference possible. 2877 * Fix issue that caused a crash if invalid curves were passed to 2878 mbedtls_ssl_conf_curves. #373 2879 * Fix issue in ssl_fork_server which was preventing it from functioning. #429 2880 * Fix memory leaks in test framework 2881 * Fix test in ssl-opt.sh that does not run properly with valgrind 2882 * Fix unchecked calls to mmbedtls_md_setup(). Fix by Brian Murray. #502 2883 2884Changes 2885 * On ARM platforms, when compiling with -O0 with GCC, Clang or armcc5, 2886 don't use the optimized assembly for bignum multiplication. This removes 2887 the need to pass -fomit-frame-pointer to avoid a build error with -O0. 2888 * Disabled SSLv3 in the default configuration. 2889 * Optimized mbedtls_mpi_zeroize() for MPI integer size. (Fix by Alexey 2890 Skalozub). 2891 * Fix non-compliance server extension handling. Extensions for SSLv3 are now 2892 ignored, as required by RFC6101. 2893 2894= mbed TLS 2.2.1 released 2016-01-05 2895 2896Security 2897 * Fix potential double free when mbedtls_asn1_store_named_data() fails to 2898 allocate memory. Only used for certificate generation, not triggerable 2899 remotely in SSL/TLS. Found by Rafał Przywara. #367 2900 * Disable MD5 handshake signatures in TLS 1.2 by default to prevent the 2901 SLOTH attack on TLS 1.2 server authentication (other attacks from the 2902 SLOTH paper do not apply to any version of mbed TLS or PolarSSL). 2903 https://www.mitls.org/pages/attacks/SLOTH 2904 2905Bugfix 2906 * Fix over-restrictive length limit in GCM. Found by Andreas-N. #362 2907 * Fix bug in certificate validation that caused valid chains to be rejected 2908 when the first intermediate certificate has pathLenConstraint=0. Found by 2909 Nicholas Wilson. Introduced in mbed TLS 2.2.0. #280 2910 * Removed potential leak in mbedtls_rsa_rsassa_pkcs1_v15_sign(), found by 2911 JayaraghavendranK. #372 2912 * Fix suboptimal handling of unexpected records that caused interop issues 2913 with some peers over unreliable links. Avoid dropping an entire DTLS 2914 datagram if a single record in a datagram is unexpected, instead only 2915 drop the record and look at subsequent records (if any are present) in 2916 the same datagram. Found by jeannotlapin. #345 2917 2918= mbed TLS 2.2.0 released 2015-11-04 2919 2920Security 2921 * Fix potential double free if mbedtls_ssl_conf_psk() is called more than 2922 once and some allocation fails. Cannot be forced remotely. Found by Guido 2923 Vranken, Intelworks. 2924 * Fix potential heap corruption on Windows when 2925 mbedtls_x509_crt_parse_path() is passed a path longer than 2GB. Cannot be 2926 triggered remotely. Found by Guido Vranken, Intelworks. 2927 * Fix potential buffer overflow in some asn1_write_xxx() functions. 2928 Cannot be triggered remotely unless you create X.509 certificates based 2929 on untrusted input or write keys of untrusted origin. Found by Guido 2930 Vranken, Intelworks. 2931 * The X509 max_pathlen constraint was not enforced on intermediate 2932 certificates. Found by Nicholas Wilson, fix and tests provided by 2933 Janos Follath. #280 and #319 2934 2935Features 2936 * Experimental support for EC J-PAKE as defined in Thread 1.0.0. 2937 Disabled by default as the specification might still change. 2938 * Added a key extraction callback to accees the master secret and key 2939 block. (Potential uses include EAP-TLS and Thread.) 2940 2941Bugfix 2942 * Self-signed certificates were not excluded from pathlen counting, 2943 resulting in some valid X.509 being incorrectly rejected. Found and fix 2944 provided by Janos Follath. #319 2945 * Fix build error with configurations where ECDHE-PSK is the only key 2946 exchange. Found and fix provided by Chris Hammond. #270 2947 * Fix build error with configurations where RSA, RSA-PSK, ECDH-RSA or 2948 ECHD-ECDSA if the only key exchange. Multiple reports. #310 2949 * Fixed a bug causing some handshakes to fail due to some non-fatal alerts 2950 not being properly ignored. Found by mancha and Kasom Koht-arsa, #308 2951 * mbedtls_x509_crt_verify(_with_profile)() now also checks the key type and 2952 size/curve against the profile. Before that, there was no way to set a 2953 minimum key size for end-entity certificates with RSA keys. Found by 2954 Matthew Page of Scannex Electronics Ltd. 2955 * Fix failures in MPI on Sparc(64) due to use of bad assembly code. 2956 Found by Kurt Danielson. #292 2957 * Fix typo in name of the extKeyUsage OID. Found by inestlerode, #314 2958 * Fix bug in ASN.1 encoding of booleans that caused generated CA 2959 certificates to be rejected by some applications, including OS X 2960 Keychain. Found and fixed by Jonathan Leroy, Inikup. 2961 2962Changes 2963 * Improved performance of mbedtls_ecp_muladd() when one of the scalars is 1 2964 or -1. 2965 2966= mbed TLS 2.1.2 released 2015-10-06 2967 2968Security 2969 * Added fix for CVE-2015-5291 to prevent heap corruption due to buffer 2970 overflow of the hostname or session ticket. Found by Guido Vranken, 2971 Intelworks. 2972 * Fix potential double-free if mbedtls_ssl_set_hs_psk() is called more than 2973 once in the same handhake and mbedtls_ssl_conf_psk() was used. 2974 Found and patch provided by Guido Vranken, Intelworks. Cannot be forced 2975 remotely. 2976 * Fix stack buffer overflow in pkcs12 decryption (used by 2977 mbedtls_pk_parse_key(file)() when the password is > 129 bytes. 2978 Found by Guido Vranken, Intelworks. Not triggerable remotely. 2979 * Fix potential buffer overflow in mbedtls_mpi_read_string(). 2980 Found by Guido Vranken, Intelworks. Not exploitable remotely in the context 2981 of TLS, but might be in other uses. On 32 bit machines, requires reading a 2982 string of close to or larger than 1GB to exploit; on 64 bit machines, would 2983 require reading a string of close to or larger than 2^62 bytes. 2984 * Fix potential random memory allocation in mbedtls_pem_read_buffer() 2985 on crafted PEM input data. Found and fix provided by Guido Vranken, 2986 Intelworks. Not triggerable remotely in TLS. Triggerable remotely if you 2987 accept PEM data from an untrusted source. 2988 * Fix possible heap buffer overflow in base64_encoded() when the input 2989 buffer is 512MB or larger on 32-bit platforms. Found by Guido Vranken, 2990 Intelworks. Not trigerrable remotely in TLS. 2991 * Fix potential double-free if mbedtls_conf_psk() is called repeatedly on 2992 the same mbedtls_ssl_config object and memory allocation fails. Found by 2993 Guido Vranken, Intelworks. Cannot be forced remotely. 2994 * Fix potential heap buffer overflow in servers that perform client 2995 authentication against a crafted CA cert. Cannot be triggered remotely 2996 unless you allow third parties to pick trust CAs for client auth. 2997 Found by Guido Vranken, Intelworks. 2998 2999Bugfix 3000 * Fix compile error in net.c with musl libc. Found and patch provided by 3001 zhasha (#278). 3002 * Fix macroization of 'inline' keyword when building as C++. (#279) 3003 3004Changes 3005 * Added checking of hostname length in mbedtls_ssl_set_hostname() to ensure 3006 domain names are compliant with RFC 1035. 3007 * Fixed paths for check_config.h in example config files. (Found by bachp) 3008 (#291) 3009 3010= mbed TLS 2.1.1 released 2015-09-17 3011 3012Security 3013 * Add countermeasure against Lenstra's RSA-CRT attack for PKCS#1 v1.5 3014 signatures. (Found by Florian Weimer, Red Hat.) 3015 https://securityblog.redhat.com/2015/09/02/factoring-rsa-keys-with-tls-perfect-forward-secrecy/ 3016 * Fix possible client-side NULL pointer dereference (read) when the client 3017 tries to continue the handshake after it failed (a misuse of the API). 3018 (Found and patch provided by Fabian Foerg, Gotham Digital Science using 3019 afl-fuzz.) 3020 3021Bugfix 3022 * Fix warning when using a 64bit platform. (found by embedthis) (#275) 3023 * Fix off-by-one error in parsing Supported Point Format extension that 3024 caused some handshakes to fail. 3025 3026Changes 3027 * Made X509 profile pointer const in mbedtls_ssl_conf_cert_profile() to allow 3028 use of mbedtls_x509_crt_profile_next. (found by NWilson) 3029 * When a client initiates a reconnect from the same port as a live 3030 connection, if cookie verification is available 3031 (MBEDTLS_SSL_DTLS_HELLO_VERIFY defined in config.h, and usable cookie 3032 callbacks set with mbedtls_ssl_conf_dtls_cookies()), this will be 3033 detected and mbedtls_ssl_read() will return 3034 MBEDTLS_ERR_SSL_CLIENT_RECONNECT - it is then possible to start a new 3035 handshake with the same context. (See RFC 6347 section 4.2.8.) 3036 3037= mbed TLS 2.1.0 released 2015-09-04 3038 3039Features 3040 * Added support for yotta as a build system. 3041 * Primary open source license changed to Apache 2.0 license. 3042 3043Bugfix 3044 * Fix segfault in the benchmark program when benchmarking DHM. 3045 * Fix build error with CMake and pre-4.5 versions of GCC (found by Hugo 3046 Leisink). 3047 * Fix bug when parsing a ServerHello without extensions (found by David 3048 Sears). 3049 * Fix bug in CMake lists that caused libmbedcrypto.a not to be installed 3050 (found by Benoit Lecocq). 3051 * Fix bug in Makefile that caused libmbedcrypto and libmbedx509 not to be 3052 installed (found by Rawi666). 3053 * Fix compile error with armcc 5 with --gnu option. 3054 * Fix bug in Makefile that caused programs not to be installed correctly 3055 (found by robotanarchy) (#232). 3056 * Fix bug in Makefile that prevented from installing without building the 3057 tests (found by robotanarchy) (#232). 3058 * Fix missing -static-libgcc when building shared libraries for Windows 3059 with make. 3060 * Fix link error when building shared libraries for Windows with make. 3061 * Fix error when loading libmbedtls.so. 3062 * Fix bug in mbedtls_ssl_conf_default() that caused the default preset to 3063 be always used (found by dcb314) (#235) 3064 * Fix bug in mbedtls_rsa_public() and mbedtls_rsa_private() that could 3065 result trying to unlock an unlocked mutex on invalid input (found by 3066 Fredrik Axelsson) (#257) 3067 * Fix -Wshadow warnings (found by hnrkp) (#240) 3068 * Fix memory corruption on client with overlong PSK identity, around 3069 SSL_MAX_CONTENT_LEN or higher - not triggerrable remotely (found by 3070 Aleksandrs Saveljevs) (#238) 3071 * Fix unused function warning when using MBEDTLS_MDx_ALT or 3072 MBEDTLS_SHAxxx_ALT (found by Henrik) (#239) 3073 * Fix memory corruption in pkey programs (found by yankuncheng) (#210) 3074 3075Changes 3076 * The PEM parser now accepts a trailing space at end of lines (#226). 3077 * It is now possible to #include a user-provided configuration file at the 3078 end of the default config.h by defining MBEDTLS_USER_CONFIG_FILE on the 3079 compiler's command line. 3080 * When verifying a certificate chain, if an intermediate certificate is 3081 trusted, no later cert is checked. (suggested by hannes-landeholm) 3082 (#220). 3083 * Prepend a "thread identifier" to debug messages (issue pointed out by 3084 Hugo Leisink) (#210). 3085 * Add mbedtls_ssl_get_max_frag_len() to query the current maximum fragment 3086 length. 3087 3088= mbed TLS 2.0.0 released 2015-07-13 3089 3090Features 3091 * Support for DTLS 1.0 and 1.2 (RFC 6347). 3092 * Ability to override core functions from MDx, SHAx, AES and DES modules 3093 with custom implementation (eg hardware accelerated), complementing the 3094 ability to override the whole module. 3095 * New server-side implementation of session tickets that rotate keys to 3096 preserve forward secrecy, and allows sharing across multiple contexts. 3097 * Added a concept of X.509 cerificate verification profile that controls 3098 which algorithms and key sizes (curves for ECDSA) are acceptable. 3099 * Expanded configurability of security parameters in the SSL module with 3100 mbedtls_ssl_conf_dhm_min_bitlen() and mbedtls_ssl_conf_sig_hashes(). 3101 * Introduced a concept of presets for SSL security-relevant configuration 3102 parameters. 3103 3104API Changes 3105 * The library has been split into libmbedcrypto, libmbedx509, libmbedtls. 3106 You now need to link to all of them if you use TLS for example. 3107 * All public identifiers moved to the mbedtls_* or MBEDTLS_* namespace. 3108 Some names have been further changed to make them more consistent. 3109 Migration helpers scripts/rename.pl and include/mbedtls/compat-1.3.h are 3110 provided. Full list of renamings in scripts/data_files/rename-1.3-2.0.txt 3111 * Renamings of fields inside structures, not covered by the previous list: 3112 mbedtls_cipher_info_t.key_length -> key_bitlen 3113 mbedtls_cipher_context_t.key_length -> key_bitlen 3114 mbedtls_ecp_curve_info.size -> bit_size 3115 * Headers are now found in the 'mbedtls' directory (previously 'polarssl'). 3116 * The following _init() functions that could return errors have 3117 been split into an _init() that returns void and another function that 3118 should generally be the first function called on this context after init: 3119 mbedtls_ssl_init() -> mbedtls_ssl_setup() 3120 mbedtls_ccm_init() -> mbedtls_ccm_setkey() 3121 mbedtls_gcm_init() -> mbedtls_gcm_setkey() 3122 mbedtls_hmac_drbg_init() -> mbedtls_hmac_drbg_seed(_buf)() 3123 mbedtls_ctr_drbg_init() -> mbedtls_ctr_drbg_seed() 3124 Note that for mbedtls_ssl_setup(), you need to be done setting up the 3125 ssl_config structure before calling it. 3126 * Most ssl_set_xxx() functions (all except ssl_set_bio(), ssl_set_hostname(), 3127 ssl_set_session() and ssl_set_client_transport_id(), plus 3128 ssl_legacy_renegotiation()) have been renamed to mbedtls_ssl_conf_xxx() 3129 (see rename.pl and compat-1.3.h above) and their first argument's type 3130 changed from ssl_context to ssl_config. 3131 * ssl_set_bio() changed signature (contexts merged, order switched, one 3132 additional callback for read-with-timeout). 3133 * The following functions have been introduced and must be used in callback 3134 implementations (SNI, PSK) instead of their *conf counterparts: 3135 mbedtls_ssl_set_hs_own_cert() 3136 mbedtls_ssl_set_hs_ca_chain() 3137 mbedtls_ssl_set_hs_psk() 3138 * mbedtls_ssl_conf_ca_chain() lost its last argument (peer_cn), now set 3139 using mbedtls_ssl_set_hostname(). 3140 * mbedtls_ssl_conf_session_cache() changed prototype (only one context 3141 pointer, parameters reordered). 3142 * On server, mbedtls_ssl_conf_session_tickets_cb() must now be used in 3143 place of mbedtls_ssl_conf_session_tickets() to enable session tickets. 3144 * The SSL debug callback gained two new arguments (file name, line number). 3145 * Debug modes were removed. 3146 * mbedtls_ssl_conf_truncated_hmac() now returns void. 3147 * mbedtls_memory_buffer_alloc_init() now returns void. 3148 * X.509 verification flags are now an uint32_t. Affect the signature of: 3149 mbedtls_ssl_get_verify_result() 3150 mbedtls_x509_ctr_verify_info() 3151 mbedtls_x509_crt_verify() (flags, f_vrfy -> needs to be updated) 3152 mbedtls_ssl_conf_verify() (f_vrfy -> needs to be updated) 3153 * The following functions changed prototype to avoid an in-out length 3154 parameter: 3155 mbedtls_base64_encode() 3156 mbedtls_base64_decode() 3157 mbedtls_mpi_write_string() 3158 mbedtls_dhm_calc_secret() 3159 * In the NET module, all "int" and "int *" arguments for file descriptors 3160 changed type to "mbedtls_net_context *". 3161 * net_accept() gained new arguments for the size of the client_ip buffer. 3162 * In the threading layer, mbedtls_mutex_init() and mbedtls_mutex_free() now 3163 return void. 3164 * ecdsa_write_signature() gained an additional md_alg argument and 3165 ecdsa_write_signature_det() was deprecated. 3166 * pk_sign() no longer accepts md_alg == POLARSSL_MD_NONE with ECDSA. 3167 * Last argument of x509_crt_check_key_usage() and 3168 mbedtls_x509write_crt_set_key_usage() changed from int to unsigned. 3169 * test_ca_list (from certs.h) is renamed to test_cas_pem and is only 3170 available if POLARSSL_PEM_PARSE_C is defined (it never worked without). 3171 * Test certificates in certs.c are no longer guaranteed to be nul-terminated 3172 strings; use the new *_len variables instead of strlen(). 3173 * Functions mbedtls_x509_xxx_parse(), mbedtls_pk_parse_key(), 3174 mbedtls_pk_parse_public_key() and mbedtls_dhm_parse_dhm() now expect the 3175 length parameter to include the terminating null byte for PEM input. 3176 * Signature of mpi_mul_mpi() changed to make the last argument unsigned 3177 * calloc() is now used instead of malloc() everywhere. API of platform 3178 layer and the memory_buffer_alloc module changed accordingly. 3179 (Thanks to Mansour Moufid for helping with the replacement.) 3180 * Change SSL_DISABLE_RENEGOTIATION config.h flag to SSL_RENEGOTIATION 3181 (support for renegotiation now needs explicit enabling in config.h). 3182 * Split MBEDTLS_HAVE_TIME into MBEDTLS_HAVE_TIME and MBEDTLS_HAVE_TIME_DATE 3183 in config.h 3184 * net_connect() and net_bind() have a new 'proto' argument to choose 3185 between TCP and UDP, using the macros NET_PROTO_TCP or NET_PROTO_UDP. 3186 Their 'port' argument type is changed to a string. 3187 * Some constness fixes 3188 3189Removals 3190 * Removed mbedtls_ecp_group_read_string(). Only named groups are supported. 3191 * Removed mbedtls_ecp_sub() and mbedtls_ecp_add(), use 3192 mbedtls_ecp_muladd(). 3193 * Removed individual mdX_hmac, shaX_hmac, mdX_file and shaX_file functions 3194 (use generic functions from md.h) 3195 * Removed mbedtls_timing_msleep(). Use mbedtls_net_usleep() or a custom 3196 waiting function. 3197 * Removed test DHM parameters from the test certs module. 3198 * Removed the PBKDF2 module (use PKCS5). 3199 * Removed POLARSSL_ERROR_STRERROR_BC (use mbedtls_strerror()). 3200 * Removed compat-1.2.h (helper for migrating from 1.2 to 1.3). 3201 * Removed openssl.h (very partial OpenSSL compatibility layer). 3202 * Configuration options POLARSSL_HAVE_LONGLONG was removed (now always on). 3203 * Configuration options POLARSSL_HAVE_INT8 and POLARSSL_HAVE_INT16 have 3204 been removed (compiler is required to support 32-bit operations). 3205 * Configuration option POLARSSL_HAVE_IPV6 was removed (always enabled). 3206 * Removed test program o_p_test, the script compat.sh does more. 3207 * Removed test program ssl_test, superseded by ssl-opt.sh. 3208 * Removed helper script active-config.pl 3209 3210New deprecations 3211 * md_init_ctx() is deprecated in favour of md_setup(), that adds a third 3212 argument (allowing memory savings if HMAC is not used) 3213 3214Semi-API changes (technically public, morally private) 3215 * Renamed a few headers to include _internal in the name. Those headers are 3216 not supposed to be included by users. 3217 * Changed md_info_t into an opaque structure (use md_get_xxx() accessors). 3218 * Changed pk_info_t into an opaque structure. 3219 * Changed cipher_base_t into an opaque structure. 3220 * Removed sig_oid2 and rename sig_oid1 to sig_oid in x509_crt and x509_crl. 3221 * x509_crt.key_usage changed from unsigned char to unsigned int. 3222 * Removed r and s from ecdsa_context 3223 * Removed mode from des_context and des3_context 3224 3225Default behavior changes 3226 * The default minimum TLS version is now TLS 1.0. 3227 * RC4 is now blacklisted by default in the SSL/TLS layer, and excluded from the 3228 default ciphersuite list returned by ssl_list_ciphersuites() 3229 * Support for receiving SSLv2 ClientHello is now disabled by default at 3230 compile time. 3231 * The default authmode for SSL/TLS clients is now REQUIRED. 3232 * Support for RSA_ALT contexts in the PK layer is now optional. Since is is 3233 enabled in the default configuration, this is only noticeable if using a 3234 custom config.h 3235 * Default DHM parameters server-side upgraded from 1024 to 2048 bits. 3236 * A minimum RSA key size of 2048 bits is now enforced during ceritificate 3237 chain verification. 3238 * Negotiation of truncated HMAC is now disabled by default on server too. 3239 * The following functions are now case-sensitive: 3240 mbedtls_cipher_info_from_string() 3241 mbedtls_ecp_curve_info_from_name() 3242 mbedtls_md_info_from_string() 3243 mbedtls_ssl_ciphersuite_from_string() 3244 mbedtls_version_check_feature() 3245 3246Requirement changes 3247 * The minimum MSVC version required is now 2010 (better C99 support). 3248 * The NET layer now unconditionnaly relies on getaddrinfo() and select(). 3249 * Compiler is required to support C99 types such as long long and uint32_t. 3250 3251API changes from the 1.4 preview branch 3252 * ssl_set_bio_timeout() was removed, split into mbedtls_ssl_set_bio() with 3253 new prototype, and mbedtls_ssl_set_read_timeout(). 3254 * The following functions now return void: 3255 mbedtls_ssl_conf_transport() 3256 mbedtls_ssl_conf_max_version() 3257 mbedtls_ssl_conf_min_version() 3258 * DTLS no longer hard-depends on TIMING_C, but uses a callback interface 3259 instead, see mbedtls_ssl_set_timer_cb(), with the Timing module providing 3260 an example implementation, see mbedtls_timing_delay_context and 3261 mbedtls_timing_set/get_delay(). 3262 * With UDP sockets, it is no longer necessary to call net_bind() again 3263 after a successful net_accept(). 3264 3265Changes 3266 * mbedtls_ctr_drbg_random() and mbedtls_hmac_drbg_random() are now 3267 thread-safe if MBEDTLS_THREADING_C is enabled. 3268 * Reduced ROM fooprint of SHA-256 and added an option to reduce it even 3269 more (at the expense of performance) MBEDTLS_SHA256_SMALLER. 3270 3271= mbed TLS 1.3 branch 3272 3273Security 3274 * With authmode set to SSL_VERIFY_OPTIONAL, verification of keyUsage and 3275 extendedKeyUsage on the leaf certificate was lost (results not accessible 3276 via ssl_get_verify_results()). 3277 * Add countermeasure against "Lucky 13 strikes back" cache-based attack, 3278 https://dl.acm.org/citation.cfm?id=2714625 3279 3280Features 3281 * Improve ECC performance by using more efficient doubling formulas 3282 (contributed by Peter Dettman). 3283 * Add x509_crt_verify_info() to display certificate verification results. 3284 * Add support for reading DH parameters with privateValueLength included 3285 (contributed by Daniel Kahn Gillmor). 3286 * Add support for bit strings in X.509 names (request by Fredrik Axelsson). 3287 * Add support for id-at-uniqueIdentifier in X.509 names. 3288 * Add support for overriding snprintf() (except on Windows) and exit() in 3289 the platform layer. 3290 * Add an option to use macros instead of function pointers in the platform 3291 layer (helps get rid of unwanted references). 3292 * Improved Makefiles for Windows targets by fixing library targets and making 3293 cross-compilation easier (thanks to Alon Bar-Lev). 3294 * The benchmark program also prints heap usage for public-key primitives 3295 if POLARSSL_MEMORY_BUFFER_ALLOC_C and POLARSSL_MEMORY_DEBUG are defined. 3296 * New script ecc-heap.sh helps measuring the impact of ECC parameters on 3297 speed and RAM (heap only for now) usage. 3298 * New script memory.sh helps measuring the ROM and RAM requirements of two 3299 reduced configurations (PSK-CCM and NSA suite B). 3300 * Add config flag POLARSSL_DEPRECATED_WARNING (off by default) to produce 3301 warnings on use of deprecated functions (with GCC and Clang only). 3302 * Add config flag POLARSSL_DEPRECATED_REMOVED (off by default) to produce 3303 errors on use of deprecated functions. 3304 3305Bugfix 3306 * Fix compile errors with PLATFORM_NO_STD_FUNCTIONS. 3307 * Fix compile error with PLATFORM_EXIT_ALT (thanks to Rafał Przywara). 3308 * Fix bug in entropy.c when THREADING_C is also enabled that caused 3309 entropy_free() to crash (thanks to Rafał Przywara). 3310 * Fix memory leak when gcm_setkey() and ccm_setkey() are used more than 3311 once on the same context. 3312 * Fix bug in ssl_mail_client when password is longer that username (found 3313 by Bruno Pape). 3314 * Fix undefined behaviour (memcmp( NULL, NULL, 0 );) in X.509 modules 3315 (detected by Clang's 3.6 UBSan). 3316 * mpi_size() and mpi_msb() would segfault when called on an mpi that is 3317 initialized but not set (found by pravic). 3318 * Fix detection of support for getrandom() on Linux (reported by syzzer) by 3319 doing it at runtime (using uname) rather that compile time. 3320 * Fix handling of symlinks by "make install" (found by Gaël PORTAY). 3321 * Fix potential NULL pointer dereference (not trigerrable remotely) when 3322 ssl_write() is called before the handshake is finished (introduced in 3323 1.3.10) (first reported by Martin Blumenstingl). 3324 * Fix bug in pk_parse_key() that caused some valid private EC keys to be 3325 rejected. 3326 * Fix bug in Via Padlock support (found by Nikos Mavrogiannopoulos). 3327 * Fix thread safety bug in RSA operations (found by Fredrik Axelsson). 3328 * Fix hardclock() (only used in the benchmarking program) with some 3329 versions of mingw64 (found by kxjhlele). 3330 * Fix warnings from mingw64 in timing.c (found by kxjklele). 3331 * Fix potential unintended sign extension in asn1_get_len() on 64-bit 3332 platforms. 3333 * Fix potential memory leak in ssl_set_psk() (found by Mansour Moufid). 3334 * Fix compile error when POLARSSL_SSL_DISABLE_RENEGOTATION and 3335 POLARSSL_SSL_SSESSION_TICKETS where both enabled in config.h (introduced 3336 in 1.3.10). 3337 * Add missing extern "C" guard in aesni.h (reported by amir zamani). 3338 * Add missing dependency on SHA-256 in some x509 programs (reported by 3339 Gergely Budai). 3340 * Fix bug related to ssl_set_curves(): the client didn't check that the 3341 curve picked by the server was actually allowed. 3342 3343Changes 3344 * Remove bias in mpi_gen_prime (contributed by Pascal Junod). 3345 * Remove potential sources of timing variations (some contributed by Pascal 3346 Junod). 3347 * Options POLARSSL_HAVE_INT8 and POLARSSL_HAVE_INT16 are deprecated. 3348 * Enabling POLARSSL_NET_C without POLARSSL_HAVE_IPV6 is deprecated. 3349 * compat-1.2.h and openssl.h are deprecated. 3350 * Adjusting/overriding CFLAGS and LDFLAGS with the make build system is now 3351 more flexible (warning: OFLAGS is not used any more) (see the README) 3352 (contributed by Alon Bar-Lev). 3353 * ssl_set_own_cert() no longer calls pk_check_pair() since the 3354 performance impact was bad for some users (this was introduced in 1.3.10). 3355 * Move from SHA-1 to SHA-256 in example programs using signatures 3356 (suggested by Thorsten Mühlfelder). 3357 * Remove some unneeded inclusions of header files from the standard library 3358 "minimize" others (eg use stddef.h if only size_t is needed). 3359 * Change #include lines in test files to use double quotes instead of angle 3360 brackets for uniformity with the rest of the code. 3361 * Remove dependency on sscanf() in X.509 parsing modules. 3362 3363= mbed TLS 1.3.10 released 2015-02-09 3364Security 3365 * NULL pointer dereference in the buffer-based allocator when the buffer is 3366 full and polarssl_free() is called (found by Mark Hasemeyer) 3367 (only possible if POLARSSL_MEMORY_BUFFER_ALLOC_C is enabled, which it is 3368 not by default). 3369 * Fix remotely-triggerable uninitialised pointer dereference caused by 3370 crafted X.509 certificate (TLS server is not affected if it doesn't ask for a 3371 client certificate) (found using Codenomicon Defensics). 3372 * Fix remotely-triggerable memory leak caused by crafted X.509 certificates 3373 (TLS server is not affected if it doesn't ask for a client certificate) 3374 (found using Codenomicon Defensics). 3375 * Fix potential stack overflow while parsing crafted X.509 certificates 3376 (TLS server is not affected if it doesn't ask for a client certificate) 3377 (found using Codenomicon Defensics). 3378 * Fix timing difference that could theoretically lead to a 3379 Bleichenbacher-style attack in the RSA and RSA-PSK key exchanges 3380 (reported by Sebastian Schinzel). 3381 3382Features 3383 * Add support for FALLBACK_SCSV (draft-ietf-tls-downgrade-scsv). 3384 * Add support for Extended Master Secret (draft-ietf-tls-session-hash). 3385 * Add support for Encrypt-then-MAC (RFC 7366). 3386 * Add function pk_check_pair() to test if public and private keys match. 3387 * Add x509_crl_parse_der(). 3388 * Add compile-time option POLARSSL_X509_MAX_INTERMEDIATE_CA to limit the 3389 length of an X.509 verification chain. 3390 * Support for renegotiation can now be disabled at compile-time 3391 * Support for 1/n-1 record splitting, a countermeasure against BEAST. 3392 * Certificate selection based on signature hash, preferring SHA-1 over SHA-2 3393 for pre-1.2 clients when multiple certificates are available. 3394 * Add support for getrandom() syscall on recent Linux kernels with Glibc or 3395 a compatible enough libc (eg uClibc). 3396 * Add ssl_set_arc4_support() to make it easier to disable RC4 at runtime 3397 while using the default ciphersuite list. 3398 * Added new error codes and debug messages about selection of 3399 ciphersuite/certificate. 3400 3401Bugfix 3402 * Stack buffer overflow if ctr_drbg_update() is called with too large 3403 add_len (found by Jean-Philippe Aumasson) (not triggerable remotely). 3404 * Possible buffer overflow of length at most POLARSSL_MEMORY_ALIGN_MULTIPLE 3405 if memory_buffer_alloc_init() was called with buf not aligned and len not 3406 a multiple of POLARSSL_MEMORY_ALIGN_MULTIPLE (not triggerable remotely). 3407 * User set CFLAGS were ignored by Cmake with gcc (introduced in 1.3.9, found 3408 by Julian Ospald). 3409 * Fix potential undefined behaviour in Camellia. 3410 * Fix potential failure in ECDSA signatures when POLARSSL_ECP_MAX_BITS is a 3411 multiple of 8 (found by Gergely Budai). 3412 * Fix unchecked return code in x509_crt_parse_path() on Windows (found by 3413 Peter Vaskovic). 3414 * Fix assembly selection for MIPS64 (thanks to James Cowgill). 3415 * ssl_get_verify_result() now works even if the handshake was aborted due 3416 to a failed verification (found by Fredrik Axelsson). 3417 * Skip writing and parsing signature_algorithm extension if none of the 3418 key exchanges enabled needs certificates. This fixes a possible interop 3419 issue with some servers when a zero-length extension was sent. (Reported 3420 by Peter Dettman.) 3421 * On a 0-length input, base64_encode() did not correctly set output length 3422 (found by Hendrik van den Boogaard). 3423 3424Changes 3425 * Use deterministic nonces for AEAD ciphers in TLS by default (possible to 3426 switch back to random with POLARSSL_SSL_AEAD_RANDOM_IV in config.h). 3427 * Blind RSA private operations even when POLARSSL_RSA_NO_CRT is defined. 3428 * ssl_set_own_cert() now returns an error on key-certificate mismatch. 3429 * Forbid repeated extensions in X.509 certificates. 3430 * debug_print_buf() now prints a text view in addition to hexadecimal. 3431 * A specific error is now returned when there are ciphersuites in common 3432 but none of them is usable due to external factors such as no certificate 3433 with a suitable (extended)KeyUsage or curve or no PSK set. 3434 * It is now possible to disable negotiation of truncated HMAC server-side 3435 at runtime with ssl_set_truncated_hmac(). 3436 * Example programs for SSL client and server now disable SSLv3 by default. 3437 * Example programs for SSL client and server now disable RC4 by default. 3438 * Use platform.h in all test suites and programs. 3439 3440= PolarSSL 1.3.9 released 2014-10-20 3441Security 3442 * Lowest common hash was selected from signature_algorithms extension in 3443 TLS 1.2 (found by Darren Bane) (introduced in 1.3.8). 3444 * Remotely-triggerable memory leak when parsing some X.509 certificates 3445 (server is not affected if it doesn't ask for a client certificate) 3446 (found using Codenomicon Defensics). 3447 * Remotely-triggerable memory leak when parsing crafted ClientHello 3448 (not affected if ECC support was compiled out) (found using Codenomicon 3449 Defensics). 3450 3451Bugfix 3452 * Support escaping of commas in x509_string_to_names() 3453 * Fix compile error in ssl_pthread_server (found by Julian Ospald). 3454 * Fix net_accept() regarding non-blocking sockets (found by Luca Pesce). 3455 * Don't print uninitialised buffer in ssl_mail_client (found by Marc Abel). 3456 * Fix warnings from Clang's scan-build (contributed by Alfred Klomp). 3457 * Fix compile error in timing.c when POLARSSL_NET_C and POLARSSL_SELFTEST 3458 are defined but not POLARSSL_HAVE_TIME (found by Stephane Di Vito). 3459 * Remove non-existent file from VS projects (found by Peter Vaskovic). 3460 * ssl_read() could return non-application data records on server while 3461 renegotation was pending, and on client when a HelloRequest was received. 3462 * Server-initiated renegotiation would fail with non-blocking I/O if the 3463 write callback returned WANT_WRITE when requesting renegotiation. 3464 * ssl_close_notify() could send more than one message in some circumstances 3465 with non-blocking I/O. 3466 * Fix compiler warnings on iOS (found by Sander Niemeijer). 3467 * x509_crt_parse() did not increase total_failed on PEM error 3468 * Fix compile error with armcc in mpi_is_prime() 3469 * Fix potential bad read in parsing ServerHello (found by Adrien 3470 Vialletelle). 3471 3472Changes 3473 * Ciphersuites using SHA-256 or SHA-384 now require TLS 1.x (there is no 3474 standard defining how to use SHA-2 with SSL 3.0). 3475 * Ciphersuites using RSA-PSK key exchange new require TLS 1.x (the spec is 3476 ambiguous on how to encode some packets with SSL 3.0). 3477 * Made buffer size in pk_write_(pub)key_pem() more dynamic, eg smaller if 3478 RSA is disabled, larger if POLARSSL_MPI_MAX_SIZE is larger. 3479 * ssl_read() now returns POLARSSL_ERR_NET_WANT_READ rather than 3480 POLARSSL_ERR_SSL_UNEXPECTED_MESSAGE on harmless alerts. 3481 * POLARSSL_MPI_MAX_SIZE now defaults to 1024 in order to allow 8192 bits 3482 RSA keys. 3483 * Accept spaces at end of line or end of buffer in base64_decode(). 3484 * X.509 certificates with more than one AttributeTypeAndValue per 3485 RelativeDistinguishedName are not accepted any more. 3486 3487= PolarSSL 1.3.8 released 2014-07-11 3488Security 3489 * Fix length checking for AEAD ciphersuites (found by Codenomicon). 3490 It was possible to crash the server (and client) using crafted messages 3491 when a GCM suite was chosen. 3492 3493Features 3494 * Add CCM module and cipher mode to Cipher Layer 3495 * Support for CCM and CCM_8 ciphersuites 3496 * Support for parsing and verifying RSASSA-PSS signatures in the X.509 3497 modules (certificates, CRLs and CSRs). 3498 * Blowfish in the cipher layer now supports variable length keys. 3499 * Add example config.h for PSK with CCM, optimized for low RAM usage. 3500 * Optimize for RAM usage in example config.h for NSA Suite B profile. 3501 * Add POLARSSL_REMOVE_ARC4_CIPHERSUITES to allow removing RC4 ciphersuites 3502 from the default list (inactive by default). 3503 * Add server-side enforcement of sent renegotiation requests 3504 (ssl_set_renegotiation_enforced()) 3505 * Add SSL_CIPHERSUITES config.h flag to allow specifying a list of 3506 ciphersuites to use and save some memory if the list is small. 3507 3508Changes 3509 * Add LINK_WITH_PTHREAD option in CMake for explicit linking that is 3510 required on some platforms (e.g. OpenBSD) 3511 * Migrate zeroizing of data to polarssl_zeroize() instead of memset() 3512 against unwanted compiler optimizations 3513 * md_list() now returns hashes strongest first 3514 * Selection of hash for signing ServerKeyExchange in TLS 1.2 now picks 3515 strongest offered by client. 3516 * All public contexts have _init() and _free() functions now for simpler 3517 usage pattern 3518 3519Bugfix 3520 * Fix in debug_print_msg() 3521 * Enforce alignment in the buffer allocator even if buffer is not aligned 3522 * Remove less-than-zero checks on unsigned numbers 3523 * Stricter check on SSL ClientHello internal sizes compared to actual packet 3524 size (found by TrustInSoft) 3525 * Fix WSAStartup() return value check (found by Peter Vaskovic) 3526 * Other minor issues (found by Peter Vaskovic) 3527 * Fix symlink command for cross compiling with CMake (found by Andre 3528 Heinecke) 3529 * Fix DER output of gen_key app (found by Gergely Budai) 3530 * Very small records were incorrectly rejected when truncated HMAC was in 3531 use with some ciphersuites and versions (RC4 in all versions, CBC with 3532 versions < TLS 1.1). 3533 * Very large records using more than 224 bytes of padding were incorrectly 3534 rejected with CBC-based ciphersuites and TLS >= 1.1 3535 * Very large records using less padding could cause a buffer overread of up 3536 to 32 bytes with CBC-based ciphersuites and TLS >= 1.1 3537 * Restore ability to use a v1 cert as a CA if trusted locally. (This had 3538 been removed in 1.3.6.) 3539 * Restore ability to locally trust a self-signed cert that is not a proper 3540 CA for use as an end entity certificate. (This had been removed in 3541 1.3.6.) 3542 * Fix preprocessor checks for bn_mul PPC asm (found by Barry K. Nathan). 3543 * Use \n\t rather than semicolons for bn_mul asm, since some assemblers 3544 interpret semicolons as comment delimiters (found by Barry K. Nathan). 3545 * Fix off-by-one error in parsing Supported Point Format extension that 3546 caused some handshakes to fail. 3547 * Fix possible miscomputation of the premaster secret with DHE-PSK key 3548 exchange that caused some handshakes to fail with other implementations. 3549 (Failure rate <= 1/255 with common DHM moduli.) 3550 * Disable broken Sparc64 bn_mul assembly (found by Florian Obser). 3551 * Fix base64_decode() to return and check length correctly (in case of 3552 tight buffers) 3553 * Fix mpi_write_string() to write "00" as hex output for empty MPI (found 3554 by Hui Dong) 3555 3556= PolarSSL 1.3.7 released on 2014-05-02 3557Features 3558 * debug_set_log_mode() added to determine raw or full logging 3559 * debug_set_threshold() added to ignore messages over threshold level 3560 * version_check_feature() added to check for compile-time options at 3561 run-time 3562 3563Changes 3564 * POLARSSL_CONFIG_OPTIONS has been removed. All values are individually 3565 checked and filled in the relevant module headers 3566 * Debug module only outputs full lines instead of parts 3567 * Better support for the different Attribute Types from IETF PKIX (RFC 5280) 3568 * AES-NI now compiles with "old" assemblers too 3569 * Ciphersuites based on RC4 now have the lowest priority by default 3570 3571Bugfix 3572 * Only iterate over actual certificates in ssl_write_certificate_request() 3573 (found by Matthew Page) 3574 * Typos in platform.c and pkcs11.c (found by Daniel Phillips and Steffan 3575 Karger) 3576 * cert_write app should use subject of issuer certificate as issuer of cert 3577 * Fix false reject in padding check in ssl_decrypt_buf() for CBC 3578 ciphersuites, for full SSL frames of data. 3579 * Improve interoperability by not writing extension length in ClientHello / 3580 ServerHello when no extensions are present (found by Matthew Page) 3581 * rsa_check_pubkey() now allows an E up to N 3582 * On OpenBSD, use arc4random_buf() instead of rand() to prevent warnings 3583 * mpi_fill_random() was creating numbers larger than requested on 3584 big-endian platform when size was not an integer number of limbs 3585 * Fix dependencies issues in X.509 test suite. 3586 * Some parts of ssl_tls.c were compiled even when the module was disabled. 3587 * Fix detection of DragonflyBSD in net.c (found by Markus Pfeiffer) 3588 * Fix detection of Clang on some Apple platforms with CMake 3589 (found by Barry K. Nathan) 3590 3591= PolarSSL 1.3.6 released on 2014-04-11 3592 3593Features 3594 * Support for the ALPN SSL extension 3595 * Add option 'use_dev_random' to gen_key application 3596 * Enable verification of the keyUsage extension for CA and leaf 3597 certificates (POLARSSL_X509_CHECK_KEY_USAGE) 3598 * Enable verification of the extendedKeyUsage extension 3599 (POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE) 3600 3601Changes 3602 * x509_crt_info() now prints information about parsed extensions as well 3603 * pk_verify() now returns a specific error code when the signature is valid 3604 but shorter than the supplied length. 3605 * Use UTC time to check certificate validity. 3606 * Reject certificates with times not in UTC, per RFC 5280. 3607 3608Security 3609 * Avoid potential timing leak in ecdsa_sign() by blinding modular division. 3610 (Found by Watson Ladd.) 3611 * The notAfter date of some certificates was no longer checked since 1.3.5. 3612 This affects certificates in the user-supplied chain except the top 3613 certificate. If the user-supplied chain contains only one certificates, 3614 it is not affected (ie, its notAfter date is properly checked). 3615 * Prevent potential NULL pointer dereference in ssl_read_record() (found by 3616 TrustInSoft) 3617 3618Bugfix 3619 * The length of various ClientKeyExchange messages was not properly checked. 3620 * Some example server programs were not sending the close_notify alert. 3621 * Potential memory leak in mpi_exp_mod() when error occurs during 3622 calculation of RR. 3623 * Fixed malloc/free default #define in platform.c (found by Gergely Budai). 3624 * Fixed type which made POLARSSL_ENTROPY_FORCE_SHA256 uneffective (found by 3625 Gergely Budai). 3626 * Fix #include path in ecdsa.h which wasn't accepted by some compilers. 3627 (found by Gergely Budai) 3628 * Fix compile errors when POLARSSL_ERROR_STRERROR_BC is undefined (found by 3629 Shuo Chen). 3630 * oid_get_numeric_string() used to truncate the output without returning an 3631 error if the output buffer was just 1 byte too small. 3632 * dhm_parse_dhm() (hence dhm_parse_dhmfile()) did not set dhm->len. 3633 * Calling pk_debug() on an RSA-alt key would segfault. 3634 * pk_get_size() and pk_get_len() were off by a factor 8 for RSA-alt keys. 3635 * Potential buffer overwrite in pem_write_buffer() because of low length 3636 indication (found by Thijs Alkemade) 3637 * EC curves constants, which should be only in ROM since 1.3.3, were also 3638 stored in RAM due to missing 'const's (found by Gergely Budai). 3639 3640= PolarSSL 1.3.5 released on 2014-03-26 3641Features 3642 * HMAC-DRBG as a separate module 3643 * Option to set the Curve preference order (disabled by default) 3644 * Single Platform compatilibity layer (for memory / printf / fprintf) 3645 * Ability to provide alternate timing implementation 3646 * Ability to force the entropy module to use SHA-256 as its basis 3647 (POLARSSL_ENTROPY_FORCE_SHA256) 3648 * Testing script ssl-opt.sh added for testing 'live' ssl option 3649 interoperability against OpenSSL and PolarSSL 3650 * Support for reading EC keys that use SpecifiedECDomain in some cases. 3651 * Entropy module now supports seed writing and reading 3652 3653Changes 3654 * Deprecated the Memory layer 3655 * entropy_add_source(), entropy_update_manual() and entropy_gather() 3656 now thread-safe if POLARSSL_THREADING_C defined 3657 * Improvements to the CMake build system, contributed by Julian Ospald. 3658 * Work around a bug of the version of Clang shipped by Apple with Mavericks 3659 that prevented bignum.c from compiling. (Reported by Rafael Baptista.) 3660 * Revamped the compat.sh interoperatibility script to include support for 3661 testing against GnuTLS 3662 * Deprecated ssl_set_own_cert_rsa() and ssl_set_own_cert_rsa_alt() 3663 * Improvements to tests/Makefile, contributed by Oden Eriksson. 3664 3665Security 3666 * Forbid change of server certificate during renegotiation to prevent 3667 "triple handshake" attack when authentication mode is 'optional' (the 3668 attack was already impossible when authentication is required). 3669 * Check notBefore timestamp of certificates and CRLs from the future. 3670 * Forbid sequence number wrapping 3671 * Fixed possible buffer overflow with overlong PSK 3672 * Possible remotely-triggered out-of-bounds memory access fixed (found by 3673 TrustInSoft) 3674 3675Bugfix 3676 * ecp_gen_keypair() does more tries to prevent failure because of 3677 statistics 3678 * Fixed bug in RSA PKCS#1 v1.5 "reversed" operations 3679 * Fixed testing with out-of-source builds using cmake 3680 * Fixed version-major intolerance in server 3681 * Fixed CMake symlinking on out-of-source builds 3682 * Fixed dependency issues in test suite 3683 * Programs rsa_sign_pss and rsa_verify_pss were not using PSS since 1.3.0 3684 * Bignum's MIPS-32 assembly was used on MIPS-64, causing chaos. (Found by 3685 Alex Wilson.) 3686 * ssl_cache was creating entries when max_entries=0 if TIMING_C was enabled. 3687 * m_sleep() was sleeping twice too long on most Unix platforms. 3688 * Fixed bug with session tickets and non-blocking I/O in the unlikely case 3689 send() would return an EAGAIN error when sending the ticket. 3690 * ssl_cache was leaking memory when reusing a timed out entry containing a 3691 client certificate. 3692 * ssl_srv was leaking memory when client presented a timed out ticket 3693 containing a client certificate 3694 * ssl_init() was leaving a dirty pointer in ssl_context if malloc of 3695 out_ctr failed 3696 * ssl_handshake_init() was leaving dirty pointers in subcontexts if malloc 3697 of one of them failed 3698 * Fix typo in rsa_copy() that impacted PKCS#1 v2 contexts 3699 * x509_get_current_time() uses localtime_r() to prevent thread issues 3700 3701= PolarSSL 1.3.4 released on 2014-01-27 3702Features 3703 * Support for the Koblitz curves: secp192k1, secp224k1, secp256k1 3704 * Support for RIPEMD-160 3705 * Support for AES CFB8 mode 3706 * Support for deterministic ECDSA (RFC 6979) 3707 3708Bugfix 3709 * Potential memory leak in bignum_selftest() 3710 * Replaced expired test certificate 3711 * ssl_mail_client now terminates lines with CRLF, instead of LF 3712 * net module handles timeouts on blocking sockets better (found by Tilman 3713 Sauerbeck) 3714 * Assembly format fixes in bn_mul.h 3715 3716Security 3717 * Missing MPI_CHK calls added around unguarded mpi calls (found by 3718 TrustInSoft) 3719 3720= PolarSSL 1.3.3 released on 2013-12-31 3721Features 3722 * EC key generation support in gen_key app 3723 * Support for adhering to client ciphersuite order preference 3724 (POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE) 3725 * Support for Curve25519 3726 * Support for ECDH-RSA and ECDH-ECDSA key exchanges and ciphersuites 3727 * Support for IPv6 in the NET module 3728 * AES-NI support for AES, AES-GCM and AES key scheduling 3729 * SSL Pthread-based server example added (ssl_pthread_server) 3730 3731Changes 3732 * gen_prime() speedup 3733 * Speedup of ECP multiplication operation 3734 * Relaxed some SHA2 ciphersuite's version requirements 3735 * Dropped use of readdir_r() instead of readdir() with threading support 3736 * More constant-time checks in the RSA module 3737 * Split off curves from ecp.c into ecp_curves.c 3738 * Curves are now stored fully in ROM 3739 * Memory usage optimizations in ECP module 3740 * Removed POLARSSL_THREADING_DUMMY 3741 3742Bugfix 3743 * Fixed bug in mpi_set_bit() on platforms where t_uint is wider than int 3744 * Fixed X.509 hostname comparison (with non-regular characters) 3745 * SSL now gracefully handles missing RNG 3746 * Missing defines / cases for RSA_PSK key exchange 3747 * crypt_and_hash app checks MAC before final decryption 3748 * Potential memory leak in ssl_ticket_keys_init() 3749 * Memory leak in benchmark application 3750 * Fixed x509_crt_parse_path() bug on Windows platforms 3751 * Added missing MPI_CHK() around some statements in mpi_div_mpi() (found by 3752 TrustInSoft) 3753 * Fixed potential overflow in certificate size verification in 3754 ssl_write_certificate() (found by TrustInSoft) 3755 3756Security 3757 * Possible remotely-triggered out-of-bounds memory access fixed (found by 3758 TrustInSoft) 3759 3760= PolarSSL 1.3.2 released on 2013-11-04 3761Features 3762 * PK tests added to test framework 3763 * Added optional optimization for NIST MODP curves (POLARSSL_ECP_NIST_OPTIM) 3764 * Support for Camellia-GCM mode and ciphersuites 3765 3766Changes 3767 * Padding checks in cipher layer are now constant-time 3768 * Value comparisons in SSL layer are now constant-time 3769 * Support for serialNumber, postalAddress and postalCode in X509 names 3770 * SSL Renegotiation was refactored 3771 3772Bugfix 3773 * More stringent checks in cipher layer 3774 * Server does not send out extensions not advertised by client 3775 * Prevent possible alignment warnings on casting from char * to 'aligned *' 3776 * Misc fixes and additions to dependency checks 3777 * Const correctness 3778 * cert_write with selfsign should use issuer_name as subject_name 3779 * Fix ECDSA corner case: missing reduction mod N (found by DualTachyon) 3780 * Defines to handle UEFI environment under MSVC 3781 * Server-side initiated renegotiations send HelloRequest 3782 3783= PolarSSL 1.3.1 released on 2013-10-15 3784Features 3785 * Support for Brainpool curves and TLS ciphersuites (RFC 7027) 3786 * Support for ECDHE-PSK key-exchange and ciphersuites 3787 * Support for RSA-PSK key-exchange and ciphersuites 3788 3789Changes 3790 * RSA blinding locks for a smaller amount of time 3791 * TLS compression only allocates working buffer once 3792 * Introduced POLARSSL_HAVE_READDIR_R for systems without it 3793 * config.h is more script-friendly 3794 3795Bugfix 3796 * Missing MSVC defines added 3797 * Compile errors with POLARSSL_RSA_NO_CRT 3798 * Header files with 'polarssl/' 3799 * Const correctness 3800 * Possible naming collision in dhm_context 3801 * Better support for MSVC 3802 * threading_set_alt() name 3803 * Added missing x509write_crt_set_version() 3804 3805= PolarSSL 1.3.0 released on 2013-10-01 3806Features 3807 * Elliptic Curve Cryptography module added 3808 * Elliptic Curve Diffie Hellman module added 3809 * Ephemeral Elliptic Curve Diffie Hellman support for SSL/TLS 3810 (ECDHE-based ciphersuites) 3811 * Ephemeral Elliptic Curve Digital Signature Algorithm support for SSL/TLS 3812 (ECDSA-based ciphersuites) 3813 * Ability to specify allowed ciphersuites based on the protocol version. 3814 * PSK and DHE-PSK based ciphersuites added 3815 * Memory allocation abstraction layer added 3816 * Buffer-based memory allocator added (no malloc() / free() / HEAP usage) 3817 * Threading abstraction layer added (dummy / pthread / alternate) 3818 * Public Key abstraction layer added 3819 * Parsing Elliptic Curve keys 3820 * Parsing Elliptic Curve certificates 3821 * Support for max_fragment_length extension (RFC 6066) 3822 * Support for truncated_hmac extension (RFC 6066) 3823 * Support for zeros-and-length (ANSI X.923) padding, one-and-zeros 3824 (ISO/IEC 7816-4) padding and zero padding in the cipher layer 3825 * Support for session tickets (RFC 5077) 3826 * Certificate Request (CSR) generation with extensions (key_usage, 3827 ns_cert_type) 3828 * X509 Certificate writing with extensions (basic_constraints, 3829 issuer_key_identifier, etc) 3830 * Optional blinding for RSA, DHM and EC 3831 * Support for multiple active certificate / key pairs in SSL servers for 3832 the same host (Not to be confused with SNI!) 3833 3834Changes 3835 * Ability to enable / disable SSL v3 / TLS 1.0 / TLS 1.1 / TLS 1.2 3836 individually 3837 * Introduced separate SSL Ciphersuites module that is based on 3838 Cipher and MD information 3839 * Internals for SSL module adapted to have separate IV pointer that is 3840 dynamically set (Better support for hardware acceleration) 3841 * Moved all OID functionality to a separate module. RSA function 3842 prototypes for the RSA sign and verify functions changed as a result 3843 * Split up the GCM module into a starts/update/finish cycle 3844 * Client and server now filter sent and accepted ciphersuites on minimum 3845 and maximum protocol version 3846 * Ability to disable server_name extension (RFC 6066) 3847 * Renamed error_strerror() to the less conflicting polarssl_strerror() 3848 (Ability to keep old as well with POLARSSL_ERROR_STRERROR_BC) 3849 * SHA2 renamed to SHA256, SHA4 renamed to SHA512 and functions accordingly 3850 * All RSA operations require a random generator for blinding purposes 3851 * X509 core refactored 3852 * x509_crt_verify() now case insensitive for cn (RFC 6125 6.4) 3853 * Also compiles / runs without time-based functions (!POLARSSL_HAVE_TIME) 3854 * Support faulty X509 v1 certificates with extensions 3855 (POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3) 3856 3857Bugfix 3858 * Fixed parse error in ssl_parse_certificate_request() 3859 * zlib compression/decompression skipped on empty blocks 3860 * Support for AIX header locations in net.c module 3861 * Fixed file descriptor leaks 3862 3863Security 3864 * RSA blinding on CRT operations to counter timing attacks 3865 (found by Cyril Arnaud and Pierre-Alain Fouque) 3866 3867 3868= Version 1.2.14 released 2015-05-?? 3869 3870Security 3871 * Fix potential invalid memory read in the server, that allows a client to 3872 crash it remotely (found by Caj Larsson). 3873 * Fix potential invalid memory read in certificate parsing, that allows a 3874 client to crash the server remotely if client authentication is enabled 3875 (found using Codenomicon Defensics). 3876 * Add countermeasure against "Lucky 13 strikes back" cache-based attack, 3877 https://dl.acm.org/citation.cfm?id=2714625 3878 3879Bugfix 3880 * Fix bug in Via Padlock support (found by Nikos Mavrogiannopoulos). 3881 * Fix hardclock() (only used in the benchmarking program) with some 3882 versions of mingw64 (found by kxjhlele). 3883 * Fix warnings from mingw64 in timing.c (found by kxjklele). 3884 * Fix potential unintended sign extension in asn1_get_len() on 64-bit 3885 platforms (found with Coverity Scan). 3886 3887= Version 1.2.13 released 2015-02-16 3888Note: Although PolarSSL has been renamed to mbed TLS, no changes reflecting 3889 this will be made in the 1.2 branch at this point. 3890 3891Security 3892 * Fix remotely-triggerable uninitialised pointer dereference caused by 3893 crafted X.509 certificate (TLS server is not affected if it doesn't ask 3894 for a client certificate) (found using Codenomicon Defensics). 3895 * Fix remotely-triggerable memory leak caused by crafted X.509 certificates 3896 (TLS server is not affected if it doesn't ask for a client certificate) 3897 (found using Codenomicon Defensics). 3898 * Fix potential stack overflow while parsing crafted X.509 certificates 3899 (TLS server is not affected if it doesn't ask for a client certificate) 3900 found using Codenomicon Defensics). 3901 * Fix buffer overread of size 1 when parsing crafted X.509 certificates 3902 (TLS server is not affected if it doesn't ask for a client certificate). 3903 3904Bugfix 3905 * Fix potential undefined behaviour in Camellia. 3906 * Fix memory leaks in PKCS#5 and PKCS#12. 3907 * Stack buffer overflow if ctr_drbg_update() is called with too large 3908 add_len (found by Jean-Philippe Aumasson) (not triggerable remotely). 3909 * Fix bug in MPI/bignum on s390/s390x (reported by Dan Horák) (introduced 3910 in 1.2.12). 3911 * Fix unchecked return code in x509_crt_parse_path() on Windows (found by 3912 Peter Vaskovic). 3913 * Fix assembly selection for MIPS64 (thanks to James Cowgill). 3914 * ssl_get_verify_result() now works even if the handshake was aborted due 3915 to a failed verification (found by Fredrik Axelsson). 3916 * Skip writing and parsing signature_algorithm extension if none of the 3917 key exchanges enabled needs certificates. This fixes a possible interop 3918 issue with some servers when a zero-length extension was sent. (Reported 3919 by Peter Dettman.) 3920 * On a 0-length input, base64_encode() did not correctly set output length 3921 (found by Hendrik van den Boogaard). 3922 3923Changes 3924 * Blind RSA private operations even when POLARSSL_RSA_NO_CRT is defined. 3925 * Forbid repeated extensions in X.509 certificates. 3926 * Add compile-time option POLARSSL_X509_MAX_INTERMEDIATE_CA to limit the 3927 length of an X.509 verification chain (default = 8). 3928= Version 1.2.12 released 2014-10-24 3929 3930Security 3931 * Remotely-triggerable memory leak when parsing some X.509 certificates 3932 (server is not affected if it doesn't ask for a client certificate). 3933 (Found using Codenomicon Defensics.) 3934 3935Bugfix 3936 * Fix potential bad read in parsing ServerHello (found by Adrien 3937 Vialletelle). 3938 * ssl_close_notify() could send more than one message in some circumstances 3939 with non-blocking I/O. 3940 * x509_crt_parse() did not increase total_failed on PEM error 3941 * Fix compiler warnings on iOS (found by Sander Niemeijer). 3942 * Don't print uninitialised buffer in ssl_mail_client (found by Marc Abel). 3943 * Fix net_accept() regarding non-blocking sockets (found by Luca Pesce). 3944 * ssl_read() could return non-application data records on server while 3945 renegotation was pending, and on client when a HelloRequest was received. 3946 * Fix warnings from Clang's scan-build (contributed by Alfred Klomp). 3947 3948Changes 3949 * X.509 certificates with more than one AttributeTypeAndValue per 3950 RelativeDistinguishedName are not accepted any more. 3951 * ssl_read() now returns POLARSSL_ERR_NET_WANT_READ rather than 3952 POLARSSL_ERR_SSL_UNEXPECTED_MESSAGE on harmless alerts. 3953 * Accept spaces at end of line or end of buffer in base64_decode(). 3954 3955= Version 1.2.11 released 2014-07-11 3956Features 3957 * Entropy module now supports seed writing and reading 3958 3959Changes 3960 * Introduced POLARSSL_HAVE_READDIR_R for systems without it 3961 * Improvements to the CMake build system, contributed by Julian Ospald. 3962 * Work around a bug of the version of Clang shipped by Apple with Mavericks 3963 that prevented bignum.c from compiling. (Reported by Rafael Baptista.) 3964 * Improvements to tests/Makefile, contributed by Oden Eriksson. 3965 * Use UTC time to check certificate validity. 3966 * Reject certificates with times not in UTC, per RFC 5280. 3967 * Migrate zeroizing of data to polarssl_zeroize() instead of memset() 3968 against unwanted compiler optimizations 3969 3970Security 3971 * Forbid change of server certificate during renegotiation to prevent 3972 "triple handshake" attack when authentication mode is optional (the 3973 attack was already impossible when authentication is required). 3974 * Check notBefore timestamp of certificates and CRLs from the future. 3975 * Forbid sequence number wrapping 3976 * Prevent potential NULL pointer dereference in ssl_read_record() (found by 3977 TrustInSoft) 3978 * Fix length checking for AEAD ciphersuites (found by Codenomicon). 3979 It was possible to crash the server (and client) using crafted messages 3980 when a GCM suite was chosen. 3981 3982Bugfix 3983 * Fixed X.509 hostname comparison (with non-regular characters) 3984 * SSL now gracefully handles missing RNG 3985 * crypt_and_hash app checks MAC before final decryption 3986 * Fixed x509_crt_parse_path() bug on Windows platforms 3987 * Added missing MPI_CHK() around some statements in mpi_div_mpi() (found by 3988 TrustInSoft) 3989 * Fixed potential overflow in certificate size verification in 3990 ssl_write_certificate() (found by TrustInSoft) 3991 * Fix ASM format in bn_mul.h 3992 * Potential memory leak in bignum_selftest() 3993 * Replaced expired test certificate 3994 * ssl_mail_client now terminates lines with CRLF, instead of LF 3995 * Fix bug in RSA PKCS#1 v1.5 "reversed" operations 3996 * Fixed testing with out-of-source builds using cmake 3997 * Fixed version-major intolerance in server 3998 * Fixed CMake symlinking on out-of-source builds 3999 * Bignum's MIPS-32 assembly was used on MIPS-64, causing chaos. (Found by 4000 Alex Wilson.) 4001 * ssl_init() was leaving a dirty pointer in ssl_context if malloc of 4002 out_ctr failed 4003 * ssl_handshake_init() was leaving dirty pointers in subcontexts if malloc 4004 of one of them failed 4005 * x509_get_current_time() uses localtime_r() to prevent thread issues 4006 * Some example server programs were not sending the close_notify alert. 4007 * Potential memory leak in mpi_exp_mod() when error occurs during 4008 calculation of RR. 4009 * Improve interoperability by not writing extension length in ClientHello 4010 when no extensions are present (found by Matthew Page) 4011 * rsa_check_pubkey() now allows an E up to N 4012 * On OpenBSD, use arc4random_buf() instead of rand() to prevent warnings 4013 * mpi_fill_random() was creating numbers larger than requested on 4014 big-endian platform when size was not an integer number of limbs 4015 * Fix detection of DragonflyBSD in net.c (found by Markus Pfeiffer) 4016 * Stricter check on SSL ClientHello internal sizes compared to actual packet 4017 size (found by TrustInSoft) 4018 * Fix preprocessor checks for bn_mul PPC asm (found by Barry K. Nathan). 4019 * Use \n\t rather than semicolons for bn_mul asm, since some assemblers 4020 interpret semicolons as comment delimiters (found by Barry K. Nathan). 4021 * Disable broken Sparc64 bn_mul assembly (found by Florian Obser). 4022 * Fix base64_decode() to return and check length correctly (in case of 4023 tight buffers) 4024 4025= Version 1.2.10 released 2013-10-07 4026Changes 4027 * Changed RSA blinding to a slower but thread-safe version 4028 4029Bugfix 4030 * Fixed memory leak in RSA as a result of introduction of blinding 4031 * Fixed ssl_pkcs11_decrypt() prototype 4032 * Fixed MSVC project files 4033 4034= Version 1.2.9 released 2013-10-01 4035Changes 4036 * x509_verify() now case insensitive for cn (RFC 6125 6.4) 4037 4038Bugfix 4039 * Fixed potential memory leak when failing to resume a session 4040 * Fixed potential file descriptor leaks (found by Remi Gacogne) 4041 * Minor fixes 4042 4043Security 4044 * Fixed potential heap buffer overflow on large hostname setting 4045 * Fixed potential negative value misinterpretation in load_file() 4046 * RSA blinding on CRT operations to counter timing attacks 4047 (found by Cyril Arnaud and Pierre-Alain Fouque) 4048 4049= Version 1.2.8 released 2013-06-19 4050Features 4051 * Parsing of PKCS#8 encrypted private key files 4052 * PKCS#12 PBE and derivation functions 4053 * Centralized module option values in config.h to allow user-defined 4054 settings without editing header files by using POLARSSL_CONFIG_OPTIONS 4055 4056Changes 4057 * HAVEGE random generator disabled by default 4058 * Internally split up x509parse_key() into a (PEM) handler function 4059 and specific DER parser functions for the PKCS#1 and unencrypted 4060 PKCS#8 private key formats 4061 * Added mechanism to provide alternative implementations for all 4062 symmetric cipher and hash algorithms (e.g. POLARSSL_AES_ALT in 4063 config.h) 4064 * PKCS#5 module added. Moved PBKDF2 functionality inside and deprecated 4065 old PBKDF2 module 4066 4067Bugfix 4068 * Secure renegotiation extension should only be sent in case client 4069 supports secure renegotiation 4070 * Fixed offset for cert_type list in ssl_parse_certificate_request() 4071 * Fixed const correctness issues that have no impact on the ABI 4072 * x509parse_crt() now better handles PEM error situations 4073 * ssl_parse_certificate() now calls x509parse_crt_der() directly 4074 instead of the x509parse_crt() wrapper that can also parse PEM 4075 certificates 4076 * x509parse_crtpath() is now reentrant and uses more portable stat() 4077 * Fixed bignum.c and bn_mul.h to support Thumb2 and LLVM compiler 4078 * Fixed values for 2-key Triple DES in cipher layer 4079 * ssl_write_certificate_request() can handle empty ca_chain 4080 4081Security 4082 * A possible DoS during the SSL Handshake, due to faulty parsing of 4083 PEM-encoded certificates has been fixed (found by Jack Lloyd) 4084 4085= Version 1.2.7 released 2013-04-13 4086Features 4087 * Ability to specify allowed ciphersuites based on the protocol version. 4088 4089Changes 4090 * Default Blowfish keysize is now 128-bits 4091 * Test suites made smaller to accommodate Raspberry Pi 4092 4093Bugfix 4094 * Fix for MPI assembly for ARM 4095 * GCM adapted to support sizes > 2^29 4096 4097= Version 1.2.6 released 2013-03-11 4098Bugfix 4099 * Fixed memory leak in ssl_free() and ssl_reset() for active session 4100 * Corrected GCM counter incrementation to use only 32-bits instead of 4101 128-bits (found by Yawning Angel) 4102 * Fixes for 64-bit compilation with MS Visual Studio 4103 * Fixed net_bind() for specified IP addresses on little endian systems 4104 * Fixed assembly code for ARM (Thumb and regular) for some compilers 4105 4106Changes 4107 * Internally split up rsa_pkcs1_encrypt(), rsa_pkcs1_decrypt(), 4108 rsa_pkcs1_sign() and rsa_pkcs1_verify() to separate PKCS#1 v1.5 and 4109 PKCS#1 v2.1 functions 4110 * Added support for custom labels when using rsa_rsaes_oaep_encrypt() 4111 or rsa_rsaes_oaep_decrypt() 4112 * Re-added handling for SSLv2 Client Hello when the define 4113 POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO is set 4114 * The SSL session cache module (ssl_cache) now also retains peer_cert 4115 information (not the entire chain) 4116 4117Security 4118 * Removed further timing differences during SSL message decryption in 4119 ssl_decrypt_buf() 4120 * Removed timing differences due to bad padding from 4121 rsa_rsaes_pkcs1_v15_decrypt() and rsa_pkcs1_decrypt() for PKCS#1 v1.5 4122 operations 4123 4124= Version 1.2.5 released 2013-02-02 4125Changes 4126 * Allow enabling of dummy error_strerror() to support some use-cases 4127 * Debug messages about padding errors during SSL message decryption are 4128 disabled by default and can be enabled with POLARSSL_SSL_DEBUG_ALL 4129 * Sending of security-relevant alert messages that do not break 4130 interoperability can be switched on/off with the flag 4131 POLARSSL_SSL_ALL_ALERT_MESSAGES 4132 4133Security 4134 * Removed timing differences during SSL message decryption in 4135 ssl_decrypt_buf() due to badly formatted padding 4136 4137= Version 1.2.4 released 2013-01-25 4138Changes 4139 * More advanced SSL ciphersuite representation and moved to more dynamic 4140 SSL core 4141 * Added ssl_handshake_step() to allow single stepping the handshake process 4142 4143Bugfix 4144 * Memory leak when using RSA_PKCS_V21 operations fixed 4145 * Handle future version properly in ssl_write_certificate_request() 4146 * Correctly handle CertificateRequest message in client for <= TLS 1.1 4147 without DN list 4148 4149= Version 1.2.3 released 2012-11-26 4150Bugfix 4151 * Server not always sending correct CertificateRequest message 4152 4153= Version 1.2.2 released 2012-11-24 4154Changes 4155 * Added p_hw_data to ssl_context for context specific hardware acceleration 4156 data 4157 * During verify trust-CA is only checked for expiration and CRL presence 4158 4159Bugfixes 4160 * Fixed client authentication compatibility 4161 * Fixed dependency on POLARSSL_SHA4_C in SSL modules 4162 4163= Version 1.2.1 released 2012-11-20 4164Changes 4165 * Depth that the certificate verify callback receives is now numbered 4166 bottom-up (Peer cert depth is 0) 4167 4168Bugfixes 4169 * Fixes for MSVC6 4170 * Moved mpi_inv_mod() outside POLARSSL_GENPRIME 4171 * Allow R and A to point to same mpi in mpi_div_mpi (found by Manuel 4172 Pégourié-Gonnard) 4173 * Fixed possible segfault in mpi_shift_r() (found by Manuel 4174 Pégourié-Gonnard) 4175 * Added max length check for rsa_pkcs1_sign with PKCS#1 v2.1 4176 4177= Version 1.2.0 released 2012-10-31 4178Features 4179 * Added support for NULL cipher (POLARSSL_CIPHER_NULL_CIPHER) and weak 4180 ciphersuites (POLARSSL_ENABLE_WEAK_CIPHERSUITES). They are disabled by 4181 default! 4182 * Added support for wildcard certificates 4183 * Added support for multi-domain certificates through the X509 Subject 4184 Alternative Name extension 4185 * Added preliminary ASN.1 buffer writing support 4186 * Added preliminary X509 Certificate Request writing support 4187 * Added key_app_writer example application 4188 * Added cert_req example application 4189 * Added base Galois Counter Mode (GCM) for AES 4190 * Added TLS 1.2 support (RFC 5246) 4191 * Added GCM suites to TLS 1.2 (RFC 5288) 4192 * Added commandline error code convertor (util/strerror) 4193 * Added support for Hardware Acceleration hooking in SSL/TLS 4194 * Added OpenSSL / PolarSSL compatibility script (tests/compat.sh) and 4195 example application (programs/ssl/o_p_test) (requires OpenSSL) 4196 * Added X509 CA Path support 4197 * Added Thumb assembly optimizations 4198 * Added DEFLATE compression support as per RFC3749 (requires zlib) 4199 * Added blowfish algorithm (Generic and cipher layer) 4200 * Added PKCS#5 PBKDF2 key derivation function 4201 * Added Secure Renegotiation (RFC 5746) 4202 * Added predefined DHM groups from RFC 5114 4203 * Added simple SSL session cache implementation 4204 * Added ServerName extension parsing (SNI) at server side 4205 * Added option to add minimum accepted SSL/TLS protocol version 4206 4207Changes 4208 * Removed redundant POLARSSL_DEBUG_MSG define 4209 * AES code only check for Padlock once 4210 * Fixed const-correctness mpi_get_bit() 4211 * Documentation for mpi_lsb() and mpi_msb() 4212 * Moved out_msg to out_hdr + 32 to support hardware acceleration 4213 * Changed certificate verify behaviour to comply with RFC 6125 section 6.3 4214 to not match CN if subjectAltName extension is present (Closes ticket #56) 4215 * Cipher layer cipher_mode_t POLARSSL_MODE_CFB128 is renamed to 4216 POLARSSL_MODE_CFB, to also handle different block size CFB modes. 4217 * Removed handling for SSLv2 Client Hello (as per RFC 5246 recommendation) 4218 * Revamped session resumption handling 4219 * Generalized external private key implementation handling (like PKCS#11) 4220 in SSL/TLS 4221 * Revamped x509_verify() and the SSL f_vrfy callback implementations 4222 * Moved from unsigned long to fixed width uint32_t types throughout code 4223 * Renamed ciphersuites naming scheme to IANA reserved names 4224 4225Bugfix 4226 * Fixed handling error in mpi_cmp_mpi() on longer B values (found by 4227 Hui Dong) 4228 * Fixed potential heap corruption in x509_name allocation 4229 * Fixed single RSA test that failed on Big Endian systems (Closes ticket #54) 4230 * mpi_exp_mod() now correctly handles negative base numbers (Closes ticket 4231 #52) 4232 * Handle encryption with private key and decryption with public key as per 4233 RFC 2313 4234 * Handle empty certificate subject names 4235 * Prevent reading over buffer boundaries on X509 certificate parsing 4236 * mpi_add_abs() now correctly handles adding short numbers to long numbers 4237 with carry rollover (found by Ruslan Yushchenko) 4238 * Handle existence of OpenSSL Trust Extensions at end of X.509 DER blob 4239 * Fixed MPI assembly for SPARC64 platform 4240 4241Security 4242 * Fixed potential memory zeroization on miscrafted RSA key (found by Eloi 4243 Vanderbeken) 4244 4245= Version 1.1.8 released on 2013-10-01 4246Bugfix 4247 * Fixed potential memory leak when failing to resume a session 4248 * Fixed potential file descriptor leaks 4249 4250Security 4251 * Potential buffer-overflow for ssl_read_record() (independently found by 4252 both TrustInSoft and Paul Brodeur of Leviathan Security Group) 4253 * Potential negative value misinterpretation in load_file() 4254 * Potential heap buffer overflow on large hostname setting 4255 4256= Version 1.1.7 released on 2013-06-19 4257Changes 4258 * HAVEGE random generator disabled by default 4259 4260Bugfix 4261 * x509parse_crt() now better handles PEM error situations 4262 * ssl_parse_certificate() now calls x509parse_crt_der() directly 4263 instead of the x509parse_crt() wrapper that can also parse PEM 4264 certificates 4265 * Fixed values for 2-key Triple DES in cipher layer 4266 * ssl_write_certificate_request() can handle empty ca_chain 4267 4268Security 4269 * A possible DoS during the SSL Handshake, due to faulty parsing of 4270 PEM-encoded certificates has been fixed (found by Jack Lloyd) 4271 4272= Version 1.1.6 released on 2013-03-11 4273Bugfix 4274 * Fixed net_bind() for specified IP addresses on little endian systems 4275 4276Changes 4277 * Allow enabling of dummy error_strerror() to support some use-cases 4278 * Debug messages about padding errors during SSL message decryption are 4279 disabled by default and can be enabled with POLARSSL_SSL_DEBUG_ALL 4280 4281Security 4282 * Removed timing differences during SSL message decryption in 4283 ssl_decrypt_buf() 4284 * Removed timing differences due to bad padding from 4285 rsa_rsaes_pkcs1_v15_decrypt() and rsa_pkcs1_decrypt() for PKCS#1 v1.5 4286 operations 4287 4288= Version 1.1.5 released on 2013-01-16 4289Bugfix 4290 * Fixed MPI assembly for SPARC64 platform 4291 * Handle existence of OpenSSL Trust Extensions at end of X.509 DER blob 4292 * mpi_add_abs() now correctly handles adding short numbers to long numbers 4293 with carry rollover 4294 * Moved mpi_inv_mod() outside POLARSSL_GENPRIME 4295 * Prevent reading over buffer boundaries on X509 certificate parsing 4296 * mpi_exp_mod() now correctly handles negative base numbers (Closes ticket 4297 #52) 4298 * Fixed possible segfault in mpi_shift_r() (found by Manuel 4299 Pégourié-Gonnard) 4300 * Allow R and A to point to same mpi in mpi_div_mpi (found by Manuel 4301 Pégourié-Gonnard) 4302 * Added max length check for rsa_pkcs1_sign with PKCS#1 v2.1 4303 * Memory leak when using RSA_PKCS_V21 operations fixed 4304 * Handle encryption with private key and decryption with public key as per 4305 RFC 2313 4306 * Fixes for MSVC6 4307 4308Security 4309 * Fixed potential memory zeroization on miscrafted RSA key (found by Eloi 4310 Vanderbeken) 4311 4312= Version 1.1.4 released on 2012-05-31 4313Bugfix 4314 * Correctly handle empty SSL/TLS packets (Found by James Yonan) 4315 * Fixed potential heap corruption in x509_name allocation 4316 * Fixed single RSA test that failed on Big Endian systems (Closes ticket #54) 4317 4318= Version 1.1.3 released on 2012-04-29 4319Bugfix 4320 * Fixed random MPI generation to not generate more size than requested. 4321 4322= Version 1.1.2 released on 2012-04-26 4323Bugfix 4324 * Fixed handling error in mpi_cmp_mpi() on longer B values (found by 4325 Hui Dong) 4326 4327Security 4328 * Fixed potential memory corruption on miscrafted client messages (found by 4329 Frama-C team at CEA LIST) 4330 * Fixed generation of DHM parameters to correct length (found by Ruslan 4331 Yushchenko) 4332 4333= Version 1.1.1 released on 2012-01-23 4334Bugfix 4335 * Check for failed malloc() in ssl_set_hostname() and x509_get_entries() 4336 (Closes ticket #47, found by Hugo Leisink) 4337 * Fixed issues with Intel compiler on 64-bit systems (Closes ticket #50) 4338 * Fixed multiple compiler warnings for VS6 and armcc 4339 * Fixed bug in CTR_CRBG selftest 4340 4341= Version 1.1.0 released on 2011-12-22 4342Features 4343 * Added ssl_session_reset() to allow better multi-connection pools of 4344 SSL contexts without needing to set all non-connection-specific 4345 data and pointers again. Adapted ssl_server to use this functionality. 4346 * Added ssl_set_max_version() to allow clients to offer a lower maximum 4347 supported version to a server to help buggy server implementations. 4348 (Closes ticket #36) 4349 * Added cipher_get_cipher_mode() and cipher_get_cipher_operation() 4350 introspection functions (Closes ticket #40) 4351 * Added CTR_DRBG based on AES-256-CTR (NIST SP 800-90) random generator 4352 * Added a generic entropy accumulator that provides support for adding 4353 custom entropy sources and added some generic and platform dependent 4354 entropy sources 4355 4356Changes 4357 * Documentation for AES and Camellia in modes CTR and CFB128 clarified. 4358 * Fixed rsa_encrypt and rsa_decrypt examples to use public key for 4359 encryption and private key for decryption. (Closes ticket #34) 4360 * Inceased maximum size of ASN1 length reads to 32-bits. 4361 * Added an EXPLICIT tag number parameter to x509_get_ext() 4362 * Added a separate CRL entry extension parsing function 4363 * Separated the ASN.1 parsing code from the X.509 specific parsing code. 4364 So now there is a module that is controlled with POLARSSL_ASN1_PARSE_C. 4365 * Changed the defined key-length of DES ciphers in cipher.h to include the 4366 parity bits, to prevent mistakes in copying data. (Closes ticket #33) 4367 * Loads of minimal changes to better support WINCE as a build target 4368 (Credits go to Marco Lizza) 4369 * Added POLARSSL_MPI_WINDOW_SIZE definition to allow easier time to memory 4370 trade-off 4371 * Introduced POLARSSL_MPI_MAX_SIZE and POLARSSL_MPI_MAX_BITS for MPI size 4372 management (Closes ticket #44) 4373 * Changed the used random function pointer to more flexible format. Renamed 4374 havege_rand() to havege_random() to prevent mistakes. Lots of changes as 4375 a consequence in library code and programs 4376 * Moved all examples programs to use the new entropy and CTR_DRBG 4377 * Added permissive certificate parsing to x509parse_crt() and 4378 x509parse_crtfile(). With permissive parsing the parsing does not stop on 4379 encountering a parse-error. Beware that the meaning of return values has 4380 changed! 4381 * All error codes are now negative. Even on mermory failures and IO errors. 4382 4383Bugfix 4384 * Fixed faulty HMAC-MD2 implementation. Found by dibac. (Closes 4385 ticket #37) 4386 * Fixed a bug where the CRL parser expected an EXPLICIT ASN.1 tag 4387 before version numbers 4388 * Allowed X509 key usage parsing to accept 4 byte values instead of the 4389 standard 1 byte version sometimes used by Microsoft. (Closes ticket #38) 4390 * Fixed incorrect behaviour in case of RSASSA-PSS with a salt length 4391 smaller than the hash length. (Closes ticket #41) 4392 * If certificate serial is longer than 32 octets, serial number is now 4393 appended with '....' after first 28 octets 4394 * Improved build support for s390x and sparc64 in bignum.h 4395 * Fixed MS Visual C++ name clash with int64 in sha4.h 4396 * Corrected removal of leading "00:" in printing serial numbers in 4397 certificates and CRLs 4398 4399= Version 1.0.0 released on 2011-07-27 4400Features 4401 * Expanded cipher layer with support for CFB128 and CTR mode 4402 * Added rsa_encrypt and rsa_decrypt simple example programs. 4403 4404Changes 4405 * The generic cipher and message digest layer now have normal error 4406 codes instead of integers 4407 4408Bugfix 4409 * Undid faulty bug fix in ssl_write() when flushing old data (Ticket 4410 #18) 4411 4412= Version 0.99-pre5 released on 2011-05-26 4413Features 4414 * Added additional Cipher Block Modes to symmetric ciphers 4415 (AES CTR, Camellia CTR, XTEA CBC) including the option to 4416 enable and disable individual modes when needed 4417 * Functions requiring File System functions can now be disabled 4418 by undefining POLARSSL_FS_IO 4419 * A error_strerror function() has been added to translate between 4420 error codes and their description. 4421 * Added mpi_get_bit() and mpi_set_bit() individual bit setter/getter 4422 functions. 4423 * Added ssl_mail_client and ssl_fork_server as example programs. 4424 4425Changes 4426 * Major argument / variable rewrite. Introduced use of size_t 4427 instead of int for buffer lengths and loop variables for 4428 better unsigned / signed use. Renamed internal bigint types 4429 t_int and t_dbl to t_uint and t_udbl in the process 4430 * mpi_init() and mpi_free() now only accept a single MPI 4431 argument and do not accept variable argument lists anymore. 4432 * The error codes have been remapped and combining error codes 4433 is now done with a PLUS instead of an OR as error codes 4434 used are negative. 4435 * Changed behaviour of net_read(), ssl_fetch_input() and ssl_recv(). 4436 net_recv() now returns 0 on EOF instead of 4437 POLARSSL_ERR_NET_CONN_RESET. ssl_fetch_input() returns 4438 POLARSSL_ERR_SSL_CONN_EOF on an EOF from its f_recv() function. 4439 ssl_read() returns 0 if a POLARSSL_ERR_SSL_CONN_EOF is received 4440 after the handshake. 4441 * Network functions now return POLARSSL_ERR_NET_WANT_READ or 4442 POLARSSL_ERR_NET_WANT_WRITE instead of the ambiguous 4443 POLARSSL_ERR_NET_TRY_AGAIN 4444 4445= Version 0.99-pre4 released on 2011-04-01 4446Features 4447 * Added support for PKCS#1 v2.1 encoding and thus support 4448 for the RSAES-OAEP and RSASSA-PSS operations. 4449 * Reading of Public Key files incorporated into default x509 4450 functionality as well. 4451 * Added mpi_fill_random() for centralized filling of big numbers 4452 with random data (Fixed ticket #10) 4453 4454Changes 4455 * Debug print of MPI now removes leading zero octets and 4456 displays actual bit size of the value. 4457 * x509parse_key() (and as a consequence x509parse_keyfile()) 4458 does not zeroize memory in advance anymore. Use rsa_init() 4459 before parsing a key or keyfile! 4460 4461Bugfix 4462 * Debug output of MPI's now the same independent of underlying 4463 platform (32-bit / 64-bit) (Fixes ticket #19, found by Mads 4464 Kiilerich and Mihai Militaru) 4465 * Fixed bug in ssl_write() when flushing old data (Fixed ticket 4466 #18, found by Nikolay Epifanov) 4467 * Fixed proper handling of RSASSA-PSS verification with variable 4468 length salt lengths 4469 4470= Version 0.99-pre3 released on 2011-02-28 4471This release replaces version 0.99-pre2 which had possible copyright issues. 4472Features 4473 * Parsing PEM private keys encrypted with DES and AES 4474 are now supported as well (Fixes ticket #5) 4475 * Added crl_app program to allow easy reading and 4476 printing of X509 CRLs from file 4477 4478Changes 4479 * Parsing of PEM files moved to separate module (Fixes 4480 ticket #13). Also possible to remove PEM support for 4481 systems only using DER encoding 4482 4483Bugfixes 4484 * Corrected parsing of UTCTime dates before 1990 and 4485 after 1950 4486 * Support more exotic OID's when parsing certificates 4487 (found by Mads Kiilerich) 4488 * Support more exotic name representations when parsing 4489 certificates (found by Mads Kiilerich) 4490 * Replaced the expired test certificates 4491 * Do not bail out if no client certificate specified. Try 4492 to negotiate anonymous connection (Fixes ticket #12, 4493 found by Boris Krasnovskiy) 4494 4495Security fixes 4496 * Fixed a possible Man-in-the-Middle attack on the 4497 Diffie Hellman key exchange (thanks to Larry Highsmith, 4498 Subreption LLC) 4499 4500= Version 0.99-pre1 released on 2011-01-30 4501Features 4502Note: Most of these features have been donated by Fox-IT 4503 * Added Doxygen source code documentation parts 4504 * Added reading of DHM context from memory and file 4505 * Improved X509 certificate parsing to include extended 4506 certificate fields, including Key Usage 4507 * Improved certificate verification and verification 4508 against the available CRLs 4509 * Detection for DES weak keys and parity bits added 4510 * Improvements to support integration in other 4511 applications: 4512 + Added generic message digest and cipher wrapper 4513 + Improved information about current capabilities, 4514 status, objects and configuration 4515 + Added verification callback on certificate chain 4516 verification to allow external blacklisting 4517 + Additional example programs to show usage 4518 * Added support for PKCS#11 through the use of the 4519 libpkcs11-helper library 4520 4521Changes 4522 * x509parse_time_expired() checks time in addition to 4523 the existing date check 4524 * The ciphers member of ssl_context and the cipher member 4525 of ssl_session have been renamed to ciphersuites and 4526 ciphersuite respectively. This clarifies the difference 4527 with the generic cipher layer and is better naming 4528 altogether 4529 4530= Version 0.14.0 released on 2010-08-16 4531Features 4532 * Added support for SSL_EDH_RSA_AES_128_SHA and 4533 SSL_EDH_RSA_CAMELLIA_128_SHA ciphersuites 4534 * Added compile-time and run-time version information 4535 * Expanded ssl_client2 arguments for more flexibility 4536 * Added support for TLS v1.1 4537 4538Changes 4539 * Made Makefile cleaner 4540 * Removed dependency on rand() in rsa_pkcs1_encrypt(). 4541 Now using random fuction provided to function and 4542 changed the prototype of rsa_pkcs1_encrypt(), 4543 rsa_init() and rsa_gen_key(). 4544 * Some SSL defines were renamed in order to avoid 4545 future confusion 4546 4547Bug fixes 4548 * Fixed CMake out of source build for tests (found by 4549 kkert) 4550 * rsa_check_private() now supports PKCS1v2 keys as well 4551 * Fixed deadlock in rsa_pkcs1_encrypt() on failing random 4552 generator 4553 4554= Version 0.13.1 released on 2010-03-24 4555Bug fixes 4556 * Fixed Makefile in library that was mistakenly merged 4557 * Added missing const string fixes 4558 4559= Version 0.13.0 released on 2010-03-21 4560Features 4561 * Added option parsing for host and port selection to 4562 ssl_client2 4563 * Added support for GeneralizedTime in X509 parsing 4564 * Added cert_app program to allow easy reading and 4565 printing of X509 certificates from file or SSL 4566 connection. 4567 4568Changes 4569 * Added const correctness for main code base 4570 * X509 signature algorithm determination is now 4571 in a function to allow easy future expansion 4572 * Changed symmetric cipher functions to 4573 identical interface (returning int result values) 4574 * Changed ARC4 to use separate input/output buffer 4575 * Added reset function for HMAC context as speed-up 4576 for specific use-cases 4577 4578Bug fixes 4579 * Fixed bug resulting in failure to send the last 4580 certificate in the chain in ssl_write_certificate() and 4581 ssl_write_certificate_request() (found by fatbob) 4582 * Added small fixes for compiler warnings on a Mac 4583 (found by Frank de Brabander) 4584 * Fixed algorithmic bug in mpi_is_prime() (found by 4585 Smbat Tonoyan) 4586 4587= Version 0.12.1 released on 2009-10-04 4588Changes 4589 * Coverage test definitions now support 'depends_on' 4590 tagging system. 4591 * Tests requiring specific hashing algorithms now honor 4592 the defines. 4593 4594Bug fixes 4595 * Changed typo in #ifdef in x509parse.c (found 4596 by Eduardo) 4597 4598= Version 0.12.0 released on 2009-07-28 4599Features 4600 * Added CMake makefiles as alternative to regular Makefiles. 4601 * Added preliminary Code Coverage tests for AES, ARC4, 4602 Base64, MPI, SHA-family, MD-family, HMAC-SHA-family, 4603 Camellia, DES, 3-DES, RSA PKCS#1, XTEA, Diffie-Hellman 4604 and X509parse. 4605 4606Changes 4607 * Error codes are not (necessarily) negative. Keep 4608 this is mind when checking for errors. 4609 * RSA_RAW renamed to SIG_RSA_RAW for consistency. 4610 * Fixed typo in name of POLARSSL_ERR_RSA_OUTPUT_TOO_LARGE. 4611 * Changed interface for AES and Camellia setkey functions 4612 to indicate invalid key lengths. 4613 4614Bug fixes 4615 * Fixed include location of endian.h on FreeBSD (found by 4616 Gabriel) 4617 * Fixed include location of endian.h and name clash on 4618 Apples (found by Martin van Hensbergen) 4619 * Fixed HMAC-MD2 by modifying md2_starts(), so that the 4620 required HMAC ipad and opad variables are not cleared. 4621 (found by code coverage tests) 4622 * Prevented use of long long in bignum if 4623 POLARSSL_HAVE_LONGLONG not defined (found by Giles 4624 Bathgate). 4625 * Fixed incorrect handling of negative strings in 4626 mpi_read_string() (found by code coverage tests). 4627 * Fixed segfault on handling empty rsa_context in 4628 rsa_check_pubkey() and rsa_check_privkey() (found by 4629 code coverage tests). 4630 * Fixed incorrect handling of one single negative input 4631 value in mpi_add_abs() (found by code coverage tests). 4632 * Fixed incorrect handling of negative first input 4633 value in mpi_sub_abs() (found by code coverage tests). 4634 * Fixed incorrect handling of negative first input 4635 value in mpi_mod_mpi() and mpi_mod_int(). Resulting 4636 change also affects mpi_write_string() (found by code 4637 coverage tests). 4638 * Corrected is_prime() results for 0, 1 and 2 (found by 4639 code coverage tests). 4640 * Fixed Camellia and XTEA for 64-bit Windows systems. 4641 4642= Version 0.11.1 released on 2009-05-17 4643 * Fixed missing functionality for SHA-224, SHA-256, SHA384, 4644 SHA-512 in rsa_pkcs1_sign() 4645 4646= Version 0.11.0 released on 2009-05-03 4647 * Fixed a bug in mpi_gcd() so that it also works when both 4648 input numbers are even and added testcases to check 4649 (found by Pierre Habouzit). 4650 * Added support for SHA-224, SHA-256, SHA-384 and SHA-512 4651 one way hash functions with the PKCS#1 v1.5 signing and 4652 verification. 4653 * Fixed minor bug regarding mpi_gcd located within the 4654 POLARSSL_GENPRIME block. 4655 * Fixed minor memory leak in x509parse_crt() and added better 4656 handling of 'full' certificate chains (found by Mathias 4657 Olsson). 4658 * Centralized file opening and reading for x509 files into 4659 load_file() 4660 * Made definition of net_htons() endian-clean for big endian 4661 systems (Found by Gernot). 4662 * Undefining POLARSSL_HAVE_ASM now also handles prevents asm in 4663 padlock and timing code. 4664 * Fixed an off-by-one buffer allocation in ssl_set_hostname() 4665 responsible for crashes and unwanted behaviour. 4666 * Added support for Certificate Revocation List (CRL) parsing. 4667 * Added support for CRL revocation to x509parse_verify() and 4668 SSL/TLS code. 4669 * Fixed compatibility of XTEA and Camellia on a 64-bit system 4670 (found by Felix von Leitner). 4671 4672= Version 0.10.0 released on 2009-01-12 4673 * Migrated XySSL to PolarSSL 4674 * Added XTEA symmetric cipher 4675 * Added Camellia symmetric cipher 4676 * Added support for ciphersuites: SSL_RSA_CAMELLIA_128_SHA, 4677 SSL_RSA_CAMELLIA_256_SHA and SSL_EDH_RSA_CAMELLIA_256_SHA 4678 * Fixed dangerous bug that can cause a heap overflow in 4679 rsa_pkcs1_decrypt (found by Christophe Devine) 4680 4681================================================================ 4682XySSL ChangeLog 4683 4684= Version 0.9 released on 2008-03-16 4685 4686 * Added support for ciphersuite: SSL_RSA_AES_128_SHA 4687 * Enabled support for large files by default in aescrypt2.c 4688 * Preliminary openssl wrapper contributed by David Barrett 4689 * Fixed a bug in ssl_write() that caused the same payload to 4690 be sent twice in non-blocking mode when send returns EAGAIN 4691 * Fixed ssl_parse_client_hello(): session id and challenge must 4692 not be swapped in the SSLv2 ClientHello (found by Greg Robson) 4693 * Added user-defined callback debug function (Krystian Kolodziej) 4694 * Before freeing a certificate, properly zero out all cert. data 4695 * Fixed the "mode" parameter so that encryption/decryption are 4696 not swapped on PadLock; also fixed compilation on older versions 4697 of gcc (bug reported by David Barrett) 4698 * Correctly handle the case in padlock_xcryptcbc() when input or 4699 output data is non-aligned by falling back to the software 4700 implementation, as VIA Nehemiah cannot handle non-aligned buffers 4701 * Fixed a memory leak in x509parse_crt() which was reported by Greg 4702 Robson-Garth; some x509write.c fixes by Pascal Vizeli, thanks to 4703 Matthew Page who reported several bugs 4704 * Fixed x509_get_ext() to accept some rare certificates which have 4705 an INTEGER instead of a BOOLEAN for BasicConstraints::cA. 4706 * Added support on the client side for the TLS "hostname" extension 4707 (patch contributed by David Patino) 4708 * Make x509parse_verify() return BADCERT_CN_MISMATCH when an empty 4709 string is passed as the CN (bug reported by spoofy) 4710 * Added an option to enable/disable the BN assembly code 4711 * Updated rsa_check_privkey() to verify that (D*E) = 1 % (P-1)*(Q-1) 4712 * Disabled obsolete hash functions by default (MD2, MD4); updated 4713 selftest and benchmark to not test ciphers that have been disabled 4714 * Updated x509parse_cert_info() to correctly display byte 0 of the 4715 serial number, setup correct server port in the ssl client example 4716 * Fixed a critical denial-of-service with X.509 cert. verification: 4717 peer may cause xyssl to loop indefinitely by sending a certificate 4718 for which the RSA signature check fails (bug reported by Benoit) 4719 * Added test vectors for: AES-CBC, AES-CFB, DES-CBC and 3DES-CBC, 4720 HMAC-MD5, HMAC-SHA1, HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 4721 * Fixed HMAC-SHA-384 and HMAC-SHA-512 (thanks to Josh Sinykin) 4722 * Modified ssl_parse_client_key_exchange() to protect against 4723 Daniel Bleichenbacher attack on PKCS#1 v1.5 padding, as well 4724 as the Klima-Pokorny-Rosa extension of Bleichenbacher's attack 4725 * Updated rsa_gen_key() so that ctx->N is always nbits in size 4726 * Fixed assembly PPC compilation errors on Mac OS X, thanks to 4727 David Barrett and Dusan Semen 4728 4729= Version 0.8 released on 2007-10-20 4730 4731 * Modified the HMAC functions to handle keys larger 4732 than 64 bytes, thanks to Stephane Desneux and gary ng 4733 * Fixed ssl_read_record() to properly update the handshake 4734 message digests, which fixes IE6/IE7 client authentication 4735 * Cleaned up the XYSSL* #defines, suggested by Azriel Fasten 4736 * Fixed net_recv(), thanks to Lorenz Schori and Egon Kocjan 4737 * Added user-defined callbacks for handling I/O and sessions 4738 * Added lots of debugging output in the SSL/TLS functions 4739 * Added preliminary X.509 cert. writing by Pascal Vizeli 4740 * Added preliminary support for the VIA PadLock routines 4741 * Added AES-CFB mode of operation, contributed by chmike 4742 * Added an SSL/TLS stress testing program (ssl_test.c) 4743 * Updated the RSA PKCS#1 code to allow choosing between 4744 RSA_PUBLIC and RSA_PRIVATE, as suggested by David Barrett 4745 * Updated ssl_read() to skip 0-length records from OpenSSL 4746 * Fixed the make install target to comply with *BSD make 4747 * Fixed a bug in mpi_read_binary() on 64-bit platforms 4748 * mpi_is_prime() speedups, thanks to Kevin McLaughlin 4749 * Fixed a long standing memory leak in mpi_is_prime() 4750 * Replaced realloc with malloc in mpi_grow(), and set 4751 the sign of zero as positive in mpi_init() (reported 4752 by Jonathan M. McCune) 4753 4754= Version 0.7 released on 2007-07-07 4755 4756 * Added support for the MicroBlaze soft-core processor 4757 * Fixed a bug in ssl_tls.c which sometimes prevented SSL 4758 connections from being established with non-blocking I/O 4759 * Fixed a couple bugs in the VS6 and UNIX Makefiles 4760 * Fixed the "PIC register ebx clobbered in asm" bug 4761 * Added HMAC starts/update/finish support functions 4762 * Added the SHA-224, SHA-384 and SHA-512 hash functions 4763 * Fixed the net_set_*block routines, thanks to Andreas 4764 * Added a few demonstration programs: md5sum, sha1sum, 4765 dh_client, dh_server, rsa_genkey, rsa_sign, rsa_verify 4766 * Added new bignum import and export helper functions 4767 * Rewrote README.txt in program/ssl/ca to better explain 4768 how to create a test PKI 4769 4770= Version 0.6 released on 2007-04-01 4771 4772 * Ciphers used in SSL/TLS can now be disabled at compile 4773 time, to reduce the memory footprint on embedded systems 4774 * Added multiply assembly code for the TriCore and modified 4775 havege_struct for this processor, thanks to David Patiño 4776 * Added multiply assembly code for 64-bit PowerPCs, 4777 thanks to Peking University and the OSU Open Source Lab 4778 * Added experimental support of Quantum Cryptography 4779 * Added support for autoconf, contributed by Arnaud Cornet 4780 * Fixed "long long" compilation issues on IA-64 and PPC64 4781 * Fixed a bug introduced in xyssl-0.5/timing.c: hardclock 4782 was not being correctly defined on ARM and MIPS 4783 4784= Version 0.5 released on 2007-03-01 4785 4786 * Added multiply assembly code for SPARC and Alpha 4787 * Added (beta) support for non-blocking I/O operations 4788 * Implemented session resuming and client authentication 4789 * Fixed some portability issues on WinCE, MINIX 3, Plan9 4790 (thanks to Benjamin Newman), HP-UX, FreeBSD and Solaris 4791 * Improved the performance of the EDH key exchange 4792 * Fixed a bug that caused valid packets with a payload 4793 size of 16384 bytes to be rejected 4794 4795= Version 0.4 released on 2007-02-01 4796 4797 * Added support for Ephemeral Diffie-Hellman key exchange 4798 * Added multiply asm code for SSE2, ARM, PPC, MIPS and M68K 4799 * Various improvement to the modular exponentiation code 4800 * Rewrote the headers to generate the API docs with doxygen 4801 * Fixed a bug in ssl_encrypt_buf (incorrect padding was 4802 generated) and in ssl_parse_client_hello (max. client 4803 version was not properly set), thanks to Didier Rebeix 4804 * Fixed another bug in ssl_parse_client_hello: clients with 4805 cipherlists larger than 96 bytes were incorrectly rejected 4806 * Fixed a couple memory leak in x509_read.c 4807 4808= Version 0.3 released on 2007-01-01 4809 4810 * Added server-side SSLv3 and TLSv1.0 support 4811 * Multiple fixes to enhance the compatibility with g++, 4812 thanks to Xosé Antón Otero Ferreira 4813 * Fixed a bug in the CBC code, thanks to dowst; also, 4814 the bignum code is no longer dependent on long long 4815 * Updated rsa_pkcs1_sign to handle arbitrary large inputs 4816 * Updated timing.c for improved compatibility with i386 4817 and 486 processors, thanks to Arnaud Cornet 4818 4819= Version 0.2 released on 2006-12-01 4820 4821 * Updated timing.c to support ARM and MIPS arch 4822 * Updated the MPI code to support 8086 on MSVC 1.5 4823 * Added the copyright notice at the top of havege.h 4824 * Fixed a bug in sha2_hmac, thanks to newsoft/Wenfang Zhang 4825 * Fixed a bug reported by Adrian Rüegsegger in x509_read_key 4826 * Fixed a bug reported by Torsten Lauter in ssl_read_record 4827 * Fixed a bug in rsa_check_privkey that would wrongly cause 4828 valid RSA keys to be dismissed (thanks to oldwolf) 4829 * Fixed a bug in mpi_is_prime that caused some primes to fail 4830 the Miller-Rabin primality test 4831 4832 I'd also like to thank Younès Hafri for the CRUX linux port, 4833 Khalil Petit who added XySSL into pkgsrc and Arnaud Cornet 4834 who maintains the Debian package :-) 4835 4836= Version 0.1 released on 2006-11-01 4837