Manuel Pégourié-Gonnard | e699739 | 2021-02-25 11:40:08 +0100 | [diff] [blame] | 1 | # Maintained branches |
| 2 | |
Dave Rodgman | 9b4d9ae | 2022-01-05 18:46:17 +0000 | [diff] [blame] | 3 | At any point in time, we have a number of maintained branches, currently consisting of: |
Manuel Pégourié-Gonnard | e699739 | 2021-02-25 11:40:08 +0100 | [diff] [blame] | 4 | |
Dave Rodgman | 0da8c51 | 2024-03-18 15:25:53 +0000 | [diff] [blame] | 5 | - The [`main`](https://github.com/Mbed-TLS/mbedtls/tree/main) branch: |
Gilles Peskine | 991bbe7 | 2021-03-16 12:05:16 +0100 | [diff] [blame] | 6 | this always contains the latest release, including all publicly available |
| 7 | security fixes. |
Dave Rodgman | 017a199 | 2022-03-31 14:07:01 +0100 | [diff] [blame] | 8 | - The [`development`](https://github.com/Mbed-TLS/mbedtls/tree/development) branch: |
Dave Rodgman | 1fdf9d0 | 2024-03-18 14:37:16 +0000 | [diff] [blame] | 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, |
Dave Rodgman | a00e850 | 2021-04-23 16:43:13 +0100 | [diff] [blame] | 11 | as well as all the new features and bug fixes and security fixes. |
Dave Rodgman | 9b4d9ae | 2022-01-05 18:46:17 +0000 | [diff] [blame] | 12 | - One or more long-time support (LTS) branches: these only get bug fixes and |
Dave Rodgman | 1fdf9d0 | 2024-03-18 14:37:16 +0000 | [diff] [blame] | 13 | security fixes. Currently, the supported LTS branches are: |
Dave Rodgman | 1fdf9d0 | 2024-03-18 14:37:16 +0000 | [diff] [blame] | 14 | - [`mbedtls-3.6`](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-3.6). |
Dave Rodgman | 9b4d9ae | 2022-01-05 18:46:17 +0000 | [diff] [blame] | 15 | |
| 16 | We retain a number of historical branches, whose names are prefixed by `archive/`, |
Dave Rodgman | 017a199 | 2022-03-31 14:07:01 +0100 | [diff] [blame] | 17 | such as [`archive/mbedtls-2.7`](https://github.com/Mbed-TLS/mbedtls/tree/archive/mbedtls-2.7). |
Dave Rodgman | 9b4d9ae | 2022-01-05 18:46:17 +0000 | [diff] [blame] | 18 | These branches will not receive any changes or updates. |
Manuel Pégourié-Gonnard | e699739 | 2021-02-25 11:40:08 +0100 | [diff] [blame] | 19 | |
| 20 | We use [Semantic Versioning](https://semver.org/). In particular, we maintain |
Dave Rodgman | 0da8c51 | 2024-03-18 15:25:53 +0000 | [diff] [blame] | 21 | API compatibility in the `main` branch across minor version changes (e.g. |
Gilles Peskine | 73876cf | 2021-06-08 15:33:53 +0200 | [diff] [blame] | 22 | the API of 3.(x+1) is backward compatible with 3.x). We only break API |
| 23 | compatibility on major version changes (e.g. from 3.x to 4.0). We also maintain |
| 24 | ABI compatibility within LTS branches; see the next section for details. |
Manuel Pégourié-Gonnard | e699739 | 2021-02-25 11:40:08 +0100 | [diff] [blame] | 25 | |
Dave Rodgman | 1fdf9d0 | 2024-03-18 14:37:16 +0000 | [diff] [blame] | 26 | We will make regular LTS releases on an 18-month cycle, each of which will have |
| 27 | a 3 year support lifetime. On this basis, 3.6 LTS (released March 2024) will be |
| 28 | supported until March 2027. The next LTS release will be a 4.x release, which is |
| 29 | planned for September 2025. |
Janos Follath | e6c0fd0 | 2023-03-30 14:59:31 +0100 | [diff] [blame] | 30 | |
Gilles Peskine | 9956efa | 2022-06-20 18:48:52 +0200 | [diff] [blame] | 31 | ## Backwards Compatibility for application code |
Manuel Pégourié-Gonnard | e699739 | 2021-02-25 11:40:08 +0100 | [diff] [blame] | 32 | |
Gilles Peskine | a23df13 | 2021-03-16 12:04:44 +0100 | [diff] [blame] | 33 | We maintain API compatibility in released versions of Mbed TLS. If you have |
| 34 | code that's working and secure with Mbed TLS x.y.z and does not rely on |
| 35 | undocumented features, then you should be able to re-compile it without |
| 36 | modification with any later release x.y'.z' with the same major version |
| 37 | number, and your code will still build, be secure, and work. |
| 38 | |
Gilles Peskine | 43e51fa | 2022-06-20 18:48:06 +0200 | [diff] [blame] | 39 | Note that this guarantee only applies if you either use the default |
| 40 | compile-time configuration (`mbedtls/mbedtls_config.h`) or the same modified |
| 41 | compile-time configuration. Changing compile-time configuration options can |
Gilles Peskine | 3dc9ac9 | 2022-06-27 23:02:58 +0200 | [diff] [blame] | 42 | result in an incompatible API or ABI, although features will generally not |
Gilles Peskine | 4fd898e | 2022-06-29 14:29:52 +0200 | [diff] [blame] | 43 | affect unrelated features (for example, enabling or disabling a |
Gilles Peskine | 43e51fa | 2022-06-20 18:48:06 +0200 | [diff] [blame] | 44 | cryptographic algorithm does not break code that does not use that |
| 45 | algorithm). |
| 46 | |
Gilles Peskine | 6dd92c3 | 2021-06-07 20:44:47 +0200 | [diff] [blame] | 47 | Note that new releases of Mbed TLS may extend the API. Here are some |
| 48 | examples of changes that are common in minor releases of Mbed TLS, and are |
| 49 | not considered API compatibility breaks: |
Gilles Peskine | 1483fe4 | 2021-06-01 22:29:06 +0200 | [diff] [blame] | 50 | |
| 51 | * Adding or reordering fields in a structure or union. |
| 52 | * Removing a field from a structure, unless the field is documented as public. |
| 53 | * Adding items to an enum. |
Gilles Peskine | 6dd92c3 | 2021-06-07 20:44:47 +0200 | [diff] [blame] | 54 | * Returning an error code that was not previously documented for a function |
| 55 | when a new error condition arises. |
| 56 | * Changing which error code is returned in a case where multiple error |
| 57 | conditions apply. |
| 58 | * Changing the behavior of a function from failing to succeeding, when the |
| 59 | change is a reasonable extension of the current behavior, i.e. the |
| 60 | addition of a new feature. |
Gilles Peskine | 1483fe4 | 2021-06-01 22:29:06 +0200 | [diff] [blame] | 61 | |
Gilles Peskine | d1a8cd5 | 2021-06-07 20:42:40 +0200 | [diff] [blame] | 62 | There are rare exceptions where we break API compatibility: code that was |
| 63 | relying on something that became insecure in the meantime (for example, |
| 64 | crypto that was found to be weak) may need to be changed. In case security |
| 65 | comes in conflict with backwards compatibility, we will put security first, |
| 66 | but always attempt to provide a compatibility option. |
Manuel Pégourié-Gonnard | e699739 | 2021-02-25 11:40:08 +0100 | [diff] [blame] | 67 | |
Gilles Peskine | 9956efa | 2022-06-20 18:48:52 +0200 | [diff] [blame] | 68 | ## Backward compatibility for the key store |
| 69 | |
Gilles Peskine | 4fd898e | 2022-06-29 14:29:52 +0200 | [diff] [blame] | 70 | We maintain backward compatibility with previous versions of the |
Gilles Peskine | 9956efa | 2022-06-20 18:48:52 +0200 | [diff] [blame] | 71 | PSA Crypto persistent storage since Mbed TLS 2.25.0, provided that the |
| 72 | storage backend (PSA ITS implementation) is configured in a compatible way. |
Gilles Peskine | 3dc9ac9 | 2022-06-27 23:02:58 +0200 | [diff] [blame] | 73 | We intend to maintain this backward compatibility throughout a major version |
Gilles Peskine | 9956efa | 2022-06-20 18:48:52 +0200 | [diff] [blame] | 74 | of Mbed TLS (for example, all Mbed TLS 3.y versions will be able to read |
Gilles Peskine | 4fd898e | 2022-06-29 14:29:52 +0200 | [diff] [blame] | 75 | keys written under any Mbed TLS 3.x with x <= y). |
Gilles Peskine | 9956efa | 2022-06-20 18:48:52 +0200 | [diff] [blame] | 76 | |
| 77 | Mbed TLS 3.x can also read keys written by Mbed TLS 2.25.0 through 2.28.x |
| 78 | LTS, but future major version upgrades (for example from 2.28.x/3.x to 4.y) |
| 79 | may require the use of an upgrade tool. |
| 80 | |
Gilles Peskine | 4b87387 | 2022-06-20 18:50:09 +0200 | [diff] [blame] | 81 | Note that this guarantee does not currently fully extend to drivers, which |
| 82 | are an experimental feature. We intend to maintain compatibility with the |
| 83 | basic use of drivers from Mbed TLS 2.28.0 onwards, even if driver APIs |
| 84 | change. However, for more experimental parts of the driver interface, such |
| 85 | as the use of driver state, we do not yet guarantee backward compatibility. |
| 86 | |
Gilles Peskine | 87d36e3 | 2021-06-07 20:42:50 +0200 | [diff] [blame] | 87 | ## Long-time support branches |
| 88 | |
Manuel Pégourié-Gonnard | e699739 | 2021-02-25 11:40:08 +0100 | [diff] [blame] | 89 | For the LTS branches, additionally we try very hard to also maintain ABI |
| 90 | compatibility (same definition as API except with re-linking instead of |
| 91 | re-compiling) and to avoid any increase in code size or RAM usage, or in the |
| 92 | minimum version of tools needed to build the code. The only exception, as |
| 93 | before, is in case those goals would conflict with fixing a security issue, we |
| 94 | will put security first but provide a compatibility option. (So far we never |
| 95 | had to break ABI compatibility in an LTS branch, but we occasionally had to |
| 96 | increase code size for a security fix.) |
| 97 | |
Manuel Pégourié-Gonnard | 80c02af | 2021-02-25 12:34:58 +0100 | [diff] [blame] | 98 | For contributors, see the [Backwards Compatibility section of |
Tom Cosgrove | fff613a | 2021-11-15 13:54:59 +0000 | [diff] [blame] | 99 | CONTRIBUTING](CONTRIBUTING.md#backwards-compatibility). |
Manuel Pégourié-Gonnard | 80c02af | 2021-02-25 12:34:58 +0100 | [diff] [blame] | 100 | |
| 101 | ## Current Branches |
Manuel Pégourié-Gonnard | e699739 | 2021-02-25 11:40:08 +0100 | [diff] [blame] | 102 | |
| 103 | The following branches are currently maintained: |
| 104 | |
Dave Rodgman | 0da8c51 | 2024-03-18 15:25:53 +0000 | [diff] [blame] | 105 | - [main](https://github.com/Mbed-TLS/mbedtls/tree/main) |
Dave Rodgman | 017a199 | 2022-03-31 14:07:01 +0100 | [diff] [blame] | 106 | - [`development`](https://github.com/Mbed-TLS/mbedtls/) |
Dave Rodgman | 1fdf9d0 | 2024-03-18 14:37:16 +0000 | [diff] [blame] | 107 | - [`mbedtls-3.6`](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-3.6) |
| 108 | maintained until March 2027, see |
Minos Galanakis | 71157fd | 2025-06-26 15:24:47 +0100 | [diff] [blame^] | 109 | <https://github.com/Mbed-TLS/mbedtls/releases/tag/v3.6.4>. |
Manuel Pégourié-Gonnard | e699739 | 2021-02-25 11:40:08 +0100 | [diff] [blame] | 110 | |
| 111 | Users are urged to always use the latest version of a maintained branch. |