Skip to content

Commit fd9b5d5

Browse files
authored
Merge pull request #10422 from gilles-peskine-arm/migration-guide-20250926
Migration guide: header file comparison
2 parents 6ac3693 + e27c35c commit fd9b5d5

File tree

2 files changed

+85
-0
lines changed

2 files changed

+85
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
## Compile-time configuration
2+
3+
### Configuration file split
4+
5+
All configuration options that are relevant to TF-PSA-Crypto must now be configured in one of its configuration files, namely:
6+
7+
* `TF_PSA_CRYPTO_CONFIG_FILE`, if set on the preprocessor command line;
8+
* otherwise `<psa/crypto_config.h>`;
9+
* additionally `TF_PSA_CRYPTO_USER_CONFIG_FILE`, if set.
10+
11+
Configuration options that are relevant to X.509 or TLS should still be set in the Mbed TLS configuration file (`MBEDTLS_CONFIG_FILE` or `<mbedtls/mbedtls_config.h>`, plus `MBEDTLS_USER_CONFIG_FILE` if it is set). However, you can define all options in the crypto configuration, and Mbed TLS will pick them up.
12+
13+
Generally speaking, the options that must be configured in TF-PSA-Crypto are:
14+
15+
* options related to platform settings;
16+
* options related to the choice of cryptographic mechanisms included in the build;
17+
* options related to the inner workings of cryptographic mechanisms, such as size/memory/performance compromises;
18+
* options related to crypto-adjacent features, such as ASN.1 and Base64.
19+
20+
See `include/psa/crypto_config.h` in TF-PSA-Crypto and `include/mbedtls/mbedtls_config.h` in Mbed TLS for details.
21+
22+
Notably, `<psa/crypto_config.h>` is no longer limited to `PSA_WANT_xxx` options.
23+
24+
Note that many options related to cryptography have changed; see the TF-PSA-Crypto migration guide for details.
25+
26+
### Split of `build_info.h` and `version.h`
27+
28+
The header file `<mbedtls/build_info.h>`, which includes the configuration file and provides the adjusted configuration macros, now has an similar file `<tf-psa-crypto/build_info.h>` in TF-PSA-Crypto. The Mbed TLS header includes the TF-PSA-Crypto header, so including `<mbedtls/build_info.h>` remains sufficient to obtain information about the crypto configuration.
29+
30+
TF-PSA-Crypto exposes its version through `<tf-psa-crypto/version.h>`, similar to `<mbedtls/version.h>` in Mbed TLS.
31+
32+
### Removal of `check_config.h`
33+
34+
The header `mbedtls/check_config.h` is no longer present. Including it from user configuration files was already obsolete in Mbed TLS 3.x, since it enforces properties the configuration as adjusted by `mbedtls/build_info.h`, not properties that the user configuration is expected to meet.
35+
36+
### Changes to TLS options
37+
38+
#### Enabling null cipher suites
39+
40+
The option to enable null cipher suites in TLS 1.2 has been renamed from `MBEDTLS_CIPHER_NULL_CIPHER` to `MBEDTLS_SSL_NULL_CIPHERSUITES`. It remains disabled in the default configuration.
41+
42+
#### Removal of backward compatibility options
43+
44+
The option `MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT` has been removed. Only the version standardized in RFC 9146 is supported now.

docs/4.0-migration-guide/feature-removals.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ That is, the following key exchange types are no longer supported:
1212
* RSA (i.e. cipher suites using only RSA decryption: cipher suites using RSA signatures remain supported);
1313
* DHE-PSK (except in TLS 1.3);
1414
* DHE-RSA (except in TLS 1.3).
15+
* static ECDH (ECDH-RSA and ECDH-ECDSA, as opposed to ephemeral ECDH (ECDHE) which remains supported).
1516

1617
The full list of removed cipher suites is:
1718

@@ -59,6 +60,36 @@ TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA
5960
TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA256
6061
TLS-DHE-RSA-WITH-CAMELLIA-256-GCM-SHA384
6162
TLS-DHE-RSA-WITH-CHACHA20-POLY1305-SHA256
63+
TLS-ECDH-ECDSA-WITH-AES-128-CBC-SHA
64+
TLS-ECDH-ECDSA-WITH-AES-128-CBC-SHA256
65+
TLS-ECDH-ECDSA-WITH-AES-128-GCM-SHA256
66+
TLS-ECDH-ECDSA-WITH-AES-256-CBC-SHA
67+
TLS-ECDH-ECDSA-WITH-AES-256-CBC-SHA384
68+
TLS-ECDH-ECDSA-WITH-AES-256-GCM-SHA384
69+
TLS-ECDH-ECDSA-WITH-ARIA-128-CBC-SHA256
70+
TLS-ECDH-ECDSA-WITH-ARIA-128-GCM-SHA256
71+
TLS-ECDH-ECDSA-WITH-ARIA-256-CBC-SHA384
72+
TLS-ECDH-ECDSA-WITH-ARIA-256-GCM-SHA384
73+
TLS-ECDH-ECDSA-WITH-CAMELLIA-128-CBC-SHA256
74+
TLS-ECDH-ECDSA-WITH-CAMELLIA-128-GCM-SHA256
75+
TLS-ECDH-ECDSA-WITH-CAMELLIA-256-CBC-SHA384
76+
TLS-ECDH-ECDSA-WITH-CAMELLIA-256-GCM-SHA384
77+
TLS-ECDH-ECDSA-WITH-NULL-SHA
78+
TLS-ECDH-RSA-WITH-AES-128-CBC-SHA
79+
TLS-ECDH-RSA-WITH-AES-128-CBC-SHA256
80+
TLS-ECDH-RSA-WITH-AES-128-GCM-SHA256
81+
TLS-ECDH-RSA-WITH-AES-256-CBC-SHA
82+
TLS-ECDH-RSA-WITH-AES-256-CBC-SHA384
83+
TLS-ECDH-RSA-WITH-AES-256-GCM-SHA384
84+
TLS-ECDH-RSA-WITH-ARIA-128-CBC-SHA256
85+
TLS-ECDH-RSA-WITH-ARIA-128-GCM-SHA256
86+
TLS-ECDH-RSA-WITH-ARIA-256-CBC-SHA384
87+
TLS-ECDH-RSA-WITH-ARIA-256-GCM-SHA384
88+
TLS-ECDH-RSA-WITH-CAMELLIA-128-CBC-SHA256
89+
TLS-ECDH-RSA-WITH-CAMELLIA-128-GCM-SHA256
90+
TLS-ECDH-RSA-WITH-CAMELLIA-256-CBC-SHA384
91+
TLS-ECDH-RSA-WITH-CAMELLIA-256-GCM-SHA384
92+
TLS-ECDH-RSA-WITH-NULL-SHA
6293
TLS-RSA-PSK-WITH-AES-128-CBC-SHA
6394
TLS-RSA-PSK-WITH-AES-128-CBC-SHA256
6495
TLS-RSA-PSK-WITH-AES-128-GCM-SHA256
@@ -109,3 +140,13 @@ mbedtls_ssl_conf_dh_param_bin()
109140
mbedtls_ssl_conf_dh_param_ctx()
110141
mbedtls_ssl_conf_dhm_min_bitlen()
111142
```
143+
144+
### Removal of elliptic curves
145+
146+
Following their removal from the crypto library, elliptic curves of less than 250 bits (secp192r1, secp192k1, secp224r1, secp224k1) are no longer supported in certificates and in TLS.
147+
148+
### Removal of deprecated functions
149+
150+
The deprecated functions `mbedtls_ssl_conf_min_version()` and `mbedtls_ssl_conf_max_version()`, and the associated constants `MBEDTLS_SSL_MAJOR_VERSION_3`, `MBEDTLS_SSL_MINOR_VERSION_3` and `MBEDTLS_SSL_MINOR_VERSION_4` have been removed. Use `mbedtls_ssl_conf_min_tls_version()` and `mbedtls_ssl_conf_max_tls_version()` with `MBEDTLS_SSL_VERSION_TLS1_2` or `MBEDTLS_SSL_VERSION_TLS1_3` instead.
151+
152+
The deprecated function `mbedtls_ssl_conf_sig_hashes()` has been removed. Use `mbedtls_ssl_conf_sig_algs()` instead.

0 commit comments

Comments
 (0)