1*cfb92d14SAndroid Build Coastguard Worker# Maintained branches 2*cfb92d14SAndroid Build Coastguard Worker 3*cfb92d14SAndroid Build Coastguard WorkerAt any point in time, we have a number of maintained branches, currently consisting of: 4*cfb92d14SAndroid Build Coastguard Worker 5*cfb92d14SAndroid Build Coastguard Worker- The [`main`](https://github.com/Mbed-TLS/mbedtls/tree/main) branch: 6*cfb92d14SAndroid Build Coastguard Worker this always contains the latest release, including all publicly available 7*cfb92d14SAndroid Build Coastguard Worker security fixes. 8*cfb92d14SAndroid Build Coastguard Worker- The [`development`](https://github.com/Mbed-TLS/mbedtls/tree/development) branch: 9*cfb92d14SAndroid Build Coastguard Worker this is where the next major version of Mbed TLS (version 4.0) is being 10*cfb92d14SAndroid Build Coastguard Worker prepared. It has API changes that make it incompatible with Mbed TLS 3.x, 11*cfb92d14SAndroid Build Coastguard Worker as well as all the new features and bug fixes and security fixes. 12*cfb92d14SAndroid Build Coastguard Worker- One or more long-time support (LTS) branches: these only get bug fixes and 13*cfb92d14SAndroid Build Coastguard Worker security fixes. Currently, the supported LTS branches are: 14*cfb92d14SAndroid Build Coastguard Worker- [`mbedtls-2.28`](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-2.28). 15*cfb92d14SAndroid Build Coastguard Worker- [`mbedtls-3.6`](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-3.6). 16*cfb92d14SAndroid Build Coastguard Worker 17*cfb92d14SAndroid Build Coastguard WorkerWe retain a number of historical branches, whose names are prefixed by `archive/`, 18*cfb92d14SAndroid Build Coastguard Workersuch as [`archive/mbedtls-2.7`](https://github.com/Mbed-TLS/mbedtls/tree/archive/mbedtls-2.7). 19*cfb92d14SAndroid Build Coastguard WorkerThese branches will not receive any changes or updates. 20*cfb92d14SAndroid Build Coastguard Worker 21*cfb92d14SAndroid Build Coastguard WorkerWe use [Semantic Versioning](https://semver.org/). In particular, we maintain 22*cfb92d14SAndroid Build Coastguard WorkerAPI compatibility in the `main` branch across minor version changes (e.g. 23*cfb92d14SAndroid Build Coastguard Workerthe API of 3.(x+1) is backward compatible with 3.x). We only break API 24*cfb92d14SAndroid Build Coastguard Workercompatibility on major version changes (e.g. from 3.x to 4.0). We also maintain 25*cfb92d14SAndroid Build Coastguard WorkerABI compatibility within LTS branches; see the next section for details. 26*cfb92d14SAndroid Build Coastguard Worker 27*cfb92d14SAndroid Build Coastguard WorkerWe will make regular LTS releases on an 18-month cycle, each of which will have 28*cfb92d14SAndroid Build Coastguard Workera 3 year support lifetime. On this basis, 3.6 LTS (released March 2024) will be 29*cfb92d14SAndroid Build Coastguard Workersupported until March 2027. The next LTS release will be a 4.x release, which is 30*cfb92d14SAndroid Build Coastguard Workerplanned for September 2025. 31*cfb92d14SAndroid Build Coastguard Worker 32*cfb92d14SAndroid Build Coastguard Worker## Backwards Compatibility for application code 33*cfb92d14SAndroid Build Coastguard Worker 34*cfb92d14SAndroid Build Coastguard WorkerWe maintain API compatibility in released versions of Mbed TLS. If you have 35*cfb92d14SAndroid Build Coastguard Workercode that's working and secure with Mbed TLS x.y.z and does not rely on 36*cfb92d14SAndroid Build Coastguard Workerundocumented features, then you should be able to re-compile it without 37*cfb92d14SAndroid Build Coastguard Workermodification with any later release x.y'.z' with the same major version 38*cfb92d14SAndroid Build Coastguard Workernumber, and your code will still build, be secure, and work. 39*cfb92d14SAndroid Build Coastguard Worker 40*cfb92d14SAndroid Build Coastguard WorkerNote that this guarantee only applies if you either use the default 41*cfb92d14SAndroid Build Coastguard Workercompile-time configuration (`mbedtls/mbedtls_config.h`) or the same modified 42*cfb92d14SAndroid Build Coastguard Workercompile-time configuration. Changing compile-time configuration options can 43*cfb92d14SAndroid Build Coastguard Workerresult in an incompatible API or ABI, although features will generally not 44*cfb92d14SAndroid Build Coastguard Workeraffect unrelated features (for example, enabling or disabling a 45*cfb92d14SAndroid Build Coastguard Workercryptographic algorithm does not break code that does not use that 46*cfb92d14SAndroid Build Coastguard Workeralgorithm). 47*cfb92d14SAndroid Build Coastguard Worker 48*cfb92d14SAndroid Build Coastguard WorkerNote that new releases of Mbed TLS may extend the API. Here are some 49*cfb92d14SAndroid Build Coastguard Workerexamples of changes that are common in minor releases of Mbed TLS, and are 50*cfb92d14SAndroid Build Coastguard Workernot considered API compatibility breaks: 51*cfb92d14SAndroid Build Coastguard Worker 52*cfb92d14SAndroid Build Coastguard Worker* Adding or reordering fields in a structure or union. 53*cfb92d14SAndroid Build Coastguard Worker* Removing a field from a structure, unless the field is documented as public. 54*cfb92d14SAndroid Build Coastguard Worker* Adding items to an enum. 55*cfb92d14SAndroid Build Coastguard Worker* Returning an error code that was not previously documented for a function 56*cfb92d14SAndroid Build Coastguard Worker when a new error condition arises. 57*cfb92d14SAndroid Build Coastguard Worker* Changing which error code is returned in a case where multiple error 58*cfb92d14SAndroid Build Coastguard Worker conditions apply. 59*cfb92d14SAndroid Build Coastguard Worker* Changing the behavior of a function from failing to succeeding, when the 60*cfb92d14SAndroid Build Coastguard Worker change is a reasonable extension of the current behavior, i.e. the 61*cfb92d14SAndroid Build Coastguard Worker addition of a new feature. 62*cfb92d14SAndroid Build Coastguard Worker 63*cfb92d14SAndroid Build Coastguard WorkerThere are rare exceptions where we break API compatibility: code that was 64*cfb92d14SAndroid Build Coastguard Workerrelying on something that became insecure in the meantime (for example, 65*cfb92d14SAndroid Build Coastguard Workercrypto that was found to be weak) may need to be changed. In case security 66*cfb92d14SAndroid Build Coastguard Workercomes in conflict with backwards compatibility, we will put security first, 67*cfb92d14SAndroid Build Coastguard Workerbut always attempt to provide a compatibility option. 68*cfb92d14SAndroid Build Coastguard Worker 69*cfb92d14SAndroid Build Coastguard Worker## Backward compatibility for the key store 70*cfb92d14SAndroid Build Coastguard Worker 71*cfb92d14SAndroid Build Coastguard WorkerWe maintain backward compatibility with previous versions of the 72*cfb92d14SAndroid Build Coastguard WorkerPSA Crypto persistent storage since Mbed TLS 2.25.0, provided that the 73*cfb92d14SAndroid Build Coastguard Workerstorage backend (PSA ITS implementation) is configured in a compatible way. 74*cfb92d14SAndroid Build Coastguard WorkerWe intend to maintain this backward compatibility throughout a major version 75*cfb92d14SAndroid Build Coastguard Workerof Mbed TLS (for example, all Mbed TLS 3.y versions will be able to read 76*cfb92d14SAndroid Build Coastguard Workerkeys written under any Mbed TLS 3.x with x <= y). 77*cfb92d14SAndroid Build Coastguard Worker 78*cfb92d14SAndroid Build Coastguard WorkerMbed TLS 3.x can also read keys written by Mbed TLS 2.25.0 through 2.28.x 79*cfb92d14SAndroid Build Coastguard WorkerLTS, but future major version upgrades (for example from 2.28.x/3.x to 4.y) 80*cfb92d14SAndroid Build Coastguard Workermay require the use of an upgrade tool. 81*cfb92d14SAndroid Build Coastguard Worker 82*cfb92d14SAndroid Build Coastguard WorkerNote that this guarantee does not currently fully extend to drivers, which 83*cfb92d14SAndroid Build Coastguard Workerare an experimental feature. We intend to maintain compatibility with the 84*cfb92d14SAndroid Build Coastguard Workerbasic use of drivers from Mbed TLS 2.28.0 onwards, even if driver APIs 85*cfb92d14SAndroid Build Coastguard Workerchange. However, for more experimental parts of the driver interface, such 86*cfb92d14SAndroid Build Coastguard Workeras the use of driver state, we do not yet guarantee backward compatibility. 87*cfb92d14SAndroid Build Coastguard Worker 88*cfb92d14SAndroid Build Coastguard Worker## Long-time support branches 89*cfb92d14SAndroid Build Coastguard Worker 90*cfb92d14SAndroid Build Coastguard WorkerFor the LTS branches, additionally we try very hard to also maintain ABI 91*cfb92d14SAndroid Build Coastguard Workercompatibility (same definition as API except with re-linking instead of 92*cfb92d14SAndroid Build Coastguard Workerre-compiling) and to avoid any increase in code size or RAM usage, or in the 93*cfb92d14SAndroid Build Coastguard Workerminimum version of tools needed to build the code. The only exception, as 94*cfb92d14SAndroid Build Coastguard Workerbefore, is in case those goals would conflict with fixing a security issue, we 95*cfb92d14SAndroid Build Coastguard Workerwill put security first but provide a compatibility option. (So far we never 96*cfb92d14SAndroid Build Coastguard Workerhad to break ABI compatibility in an LTS branch, but we occasionally had to 97*cfb92d14SAndroid Build Coastguard Workerincrease code size for a security fix.) 98*cfb92d14SAndroid Build Coastguard Worker 99*cfb92d14SAndroid Build Coastguard WorkerFor contributors, see the [Backwards Compatibility section of 100*cfb92d14SAndroid Build Coastguard WorkerCONTRIBUTING](CONTRIBUTING.md#backwards-compatibility). 101*cfb92d14SAndroid Build Coastguard Worker 102*cfb92d14SAndroid Build Coastguard Worker## Current Branches 103*cfb92d14SAndroid Build Coastguard Worker 104*cfb92d14SAndroid Build Coastguard WorkerThe following branches are currently maintained: 105*cfb92d14SAndroid Build Coastguard Worker 106*cfb92d14SAndroid Build Coastguard Worker- [main](https://github.com/Mbed-TLS/mbedtls/tree/main) 107*cfb92d14SAndroid Build Coastguard Worker- [`development`](https://github.com/Mbed-TLS/mbedtls/) 108*cfb92d14SAndroid Build Coastguard Worker- [`mbedtls-3.6`](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-3.6) 109*cfb92d14SAndroid Build Coastguard Worker maintained until March 2027, see 110*cfb92d14SAndroid Build Coastguard Worker <https://github.com/Mbed-TLS/mbedtls/releases/tag/v3.6.0>. 111*cfb92d14SAndroid Build Coastguard Worker- [`mbedtls-2.28`](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-2.28) 112*cfb92d14SAndroid Build Coastguard Worker maintained until the end of 2024, see 113*cfb92d14SAndroid Build Coastguard Worker <https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.8>. 114*cfb92d14SAndroid Build Coastguard Worker 115*cfb92d14SAndroid Build Coastguard WorkerUsers are urged to always use the latest version of a maintained branch. 116