Skip to content

Commit ca4a1a1

Browse files
Merge remote-tracking branch 'mbedtls4.0.0-documentation' into mbedtls-4.0.0.rc
Signed-off-by: Minos Galanakis <[email protected]>
2 parents 0283fa0 + ccd9e29 commit ca4a1a1

File tree

14 files changed

+699
-1603
lines changed

14 files changed

+699
-1603
lines changed

BRANCHES.md

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ At any point in time, we have a number of maintained branches, currently consist
66
this always contains the latest release, including all publicly available
77
security fixes.
88
- The [`development`](https://github.com/Mbed-TLS/mbedtls/tree/development) branch:
9-
this is where the next major version of Mbed TLS (version 4.0) is being
10-
prepared. It has API changes that make it incompatible with Mbed TLS 3.x,
11-
as well as all the new features and bug fixes and security fixes.
9+
this is where the next minor version of Mbed TLS 4.x is prepared. It contains
10+
new features, bug fixes, and security fixes.
1211
- One or more long-time support (LTS) branches: these only get bug fixes and
1312
security fixes. Currently, the supported LTS branches are:
1413
- [`mbedtls-3.6`](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-3.6).
@@ -19,7 +18,7 @@ These branches will not receive any changes or updates.
1918

2019
We use [Semantic Versioning](https://semver.org/). In particular, we maintain
2120
API compatibility in the `main` branch across minor version changes (e.g.
22-
the API of 3.(x+1) is backward compatible with 3.x). We only break API
21+
the API of 4.(x+1) is backward compatible with 4.x). We only break API
2322
compatibility on major version changes (e.g. from 3.x to 4.0). We also maintain
2423
ABI compatibility within LTS branches; see the next section for details.
2524

@@ -66,25 +65,6 @@ crypto that was found to be weak) may need to be changed. In case security
6665
comes in conflict with backwards compatibility, we will put security first,
6766
but always attempt to provide a compatibility option.
6867

69-
## Backward compatibility for the key store
70-
71-
We maintain backward compatibility with previous versions of the
72-
PSA Crypto persistent storage since Mbed TLS 2.25.0, provided that the
73-
storage backend (PSA ITS implementation) is configured in a compatible way.
74-
We intend to maintain this backward compatibility throughout a major version
75-
of Mbed TLS (for example, all Mbed TLS 3.y versions will be able to read
76-
keys written under any Mbed TLS 3.x with x <= y).
77-
78-
Mbed TLS 3.x can also read keys written by Mbed TLS 2.25.0 through 2.28.x
79-
LTS, but future major version upgrades (for example from 2.28.x/3.x to 4.y)
80-
may require the use of an upgrade tool.
81-
82-
Note that this guarantee does not currently fully extend to drivers, which
83-
are an experimental feature. We intend to maintain compatibility with the
84-
basic use of drivers from Mbed TLS 2.28.0 onwards, even if driver APIs
85-
change. However, for more experimental parts of the driver interface, such
86-
as the use of driver state, we do not yet guarantee backward compatibility.
87-
8868
## Long-time support branches
8969

9070
For the LTS branches, additionally we try very hard to also maintain ABI

README.md

Lines changed: 54 additions & 89 deletions
Large diffs are not rendered by default.

SECURITY.md

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ being implemented. (For example Mbed TLS alone won't guarantee that the
3737
messages will arrive without delay, as the TLS protocol doesn't guarantee that
3838
either.)
3939

40-
**Warning!** Block ciphers do not yet achieve full protection against attackers
41-
who can measure the timing of packets with sufficient precision. For details
42-
and workarounds see the [Block Ciphers](#block-ciphers) section.
43-
4440
### Local attacks
4541

4642
In this section, we consider an attacker who can run software on the same
@@ -69,9 +65,6 @@ physical side channels as well. Remote and physical timing attacks are covered
6965
in the [Remote attacks](remote-attacks) and [Physical
7066
attacks](physical-attacks) sections respectively.
7167

72-
**Warning!** Block ciphers do not yet achieve full protection. For
73-
details and workarounds see the [Block Ciphers](#block-ciphers) section.
74-
7568
#### Local non-timing side channels
7669

7770
The attacker code running on the platform has access to some sensor capable of
@@ -115,36 +108,6 @@ protection against a class of attacks outside of the above described threat
115108
model. Neither does it mean that the failure of such a countermeasure is
116109
considered a vulnerability.
117110

118-
#### Block ciphers
119-
120-
Currently there are four block ciphers in Mbed TLS: AES, CAMELLIA, ARIA and
121-
DES. The pure software implementation in Mbed TLS implementation uses lookup
122-
tables, which are vulnerable to timing attacks.
123-
124-
These timing attacks can be physical, local or depending on network latency
125-
even a remote. The attacks can result in key recovery.
126-
127-
**Workarounds:**
128-
129-
- Turn on hardware acceleration for AES. This is supported only on selected
130-
architectures and currently only available for AES. See configuration options
131-
`MBEDTLS_AESCE_C`, `MBEDTLS_AESNI_C` for details.
132-
- Add a secure alternative implementation (typically hardware acceleration) for
133-
the vulnerable cipher. See the [Alternative Implementations
134-
Guide](docs/architecture/alternative-implementations.md) for more information.
135-
- Use cryptographic mechanisms that are not based on block ciphers. In
136-
particular, for authenticated encryption, use ChaCha20/Poly1305 instead of
137-
block cipher modes. For random generation, use HMAC\_DRBG instead of CTR\_DRBG.
138-
139-
#### Everest
140-
141-
The HACL* implementation of X25519 taken from the Everest project only protects
142-
against remote timing attacks. (See their [Security
143-
Policy](https://github.com/hacl-star/hacl-star/blob/main/SECURITY.md).)
144-
145-
The Everest variant is only used when `MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED`
146-
configuration option is defined. This option is off by default.
147-
148111
#### Formatting of X.509 certificates and certificate signing requests
149112

150113
When parsing X.509 certificates and certificate signing requests (CSRs),

configs/README.txt

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
11
This directory contains example configuration files.
22

3-
The examples are generally focused on a particular usage case (eg, support for
4-
a restricted number of ciphersuites) and aim at minimizing resource usage for
5-
this target. They can be used as a basis for custom configurations.
3+
The examples are generally focused on a particular use case (eg, support for
4+
a restricted set of ciphersuites) and aim to minimize resource usage for
5+
the target. They can be used as a basis for custom configurations.
66

7-
These files are complete replacements for the default mbedtls_config.h. To use one of
8-
them, you can pick one of the following methods:
7+
These files come in pairs and are complete replacements for the default
8+
mbedtls_config.h and crypto_config.h. The two files of a pair share the same or
9+
very similar name, with the crypto file prefixed by "crypto-". Note
10+
that some of the cryptography configuration files may be located in
11+
tf-psa-crypto/configs.
912

10-
1. Replace the default file include/mbedtls/mbedtls_config.h with the chosen one.
13+
To use one of these pairs, you can pick one of the following methods:
1114

12-
2. Define MBEDTLS_CONFIG_FILE and adjust the include path accordingly.
13-
For example, using make:
15+
1. Replace the default files include/mbedtls/mbedtls_config.h and
16+
tf-psa-crypto/include/psa/crypto_config.h with the chosen ones.
1417

15-
CFLAGS="-I$PWD/configs -DMBEDTLS_CONFIG_FILE='<foo.h>'" make
18+
2. Use the MBEDTLS_CONFIG_FILE and TF_PSA_CRYPTO_CONFIG_FILE CMake options. For
19+
example, to build out-of-tree with the config-ccm-psk-tls1_2.h and
20+
crypto-config-ccm-psk-tls1_2.h configuration pair:
1621

17-
Or, using cmake:
22+
cmake -DMBEDTLS_CONFIG_FILE="configs/config-ccm-psk-tls1_2.h" \
23+
-DTF_PSA_CRYPTO_CONFIG_FILE="configs/crypto-config-ccm-psk-tls1_2.h"
24+
-B build-psktls12 .
25+
cmake --build build-psktls12
1826

19-
find . -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} +
20-
CFLAGS="-I$PWD/configs -DMBEDTLS_CONFIG_FILE='<foo.h>'" cmake .
21-
make
22-
23-
Note that the second method also works if you want to keep your custom
24-
configuration file outside the Mbed TLS tree.
27+
The second method also works if you want to keep your custom configuration
28+
files outside the Mbed TLS tree.

0 commit comments

Comments
 (0)