1*62c56f98SSadaf Ebrahimi# Maintained branches 2*62c56f98SSadaf Ebrahimi 3*62c56f98SSadaf EbrahimiAt any point in time, we have a number of maintained branches, currently consisting of: 4*62c56f98SSadaf Ebrahimi 5*62c56f98SSadaf Ebrahimi- The [`master`](https://github.com/Mbed-TLS/mbedtls/tree/master) branch: 6*62c56f98SSadaf Ebrahimi this always contains the latest release, including all publicly available 7*62c56f98SSadaf Ebrahimi security fixes. 8*62c56f98SSadaf Ebrahimi- The [`development`](https://github.com/Mbed-TLS/mbedtls/tree/development) branch: 9*62c56f98SSadaf Ebrahimi this is where the current major version of Mbed TLS (version 3.x) is being 10*62c56f98SSadaf Ebrahimi prepared. It has API changes that make it incompatible with Mbed TLS 2.x, 11*62c56f98SSadaf Ebrahimi as well as all the new features and bug fixes and security fixes. 12*62c56f98SSadaf Ebrahimi- One or more long-time support (LTS) branches: these only get bug fixes and 13*62c56f98SSadaf Ebrahimi security fixes. Currently, the only supported LTS branch is: 14*62c56f98SSadaf Ebrahimi [`mbedtls-2.28`](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-2.28). 15*62c56f98SSadaf Ebrahimi 16*62c56f98SSadaf EbrahimiWe retain a number of historical branches, whose names are prefixed by `archive/`, 17*62c56f98SSadaf Ebrahimisuch as [`archive/mbedtls-2.7`](https://github.com/Mbed-TLS/mbedtls/tree/archive/mbedtls-2.7). 18*62c56f98SSadaf EbrahimiThese branches will not receive any changes or updates. 19*62c56f98SSadaf Ebrahimi 20*62c56f98SSadaf EbrahimiWe use [Semantic Versioning](https://semver.org/). In particular, we maintain 21*62c56f98SSadaf EbrahimiAPI compatibility in the `master` branch across minor version changes (e.g. 22*62c56f98SSadaf Ebrahimithe API of 3.(x+1) is backward compatible with 3.x). We only break API 23*62c56f98SSadaf Ebrahimicompatibility on major version changes (e.g. from 3.x to 4.0). We also maintain 24*62c56f98SSadaf EbrahimiABI compatibility within LTS branches; see the next section for details. 25*62c56f98SSadaf Ebrahimi 26*62c56f98SSadaf EbrahimiEvery major version will become an LTS branch when the next major version is 27*62c56f98SSadaf Ebrahimireleased. We may occasionally create LTS branches from other releases at our 28*62c56f98SSadaf Ebrahimidiscretion. 29*62c56f98SSadaf EbrahimiWhen a new LTS branch is created, it usually remains supported for three years. 30*62c56f98SSadaf Ebrahimi 31*62c56f98SSadaf Ebrahimi## Backwards Compatibility for application code 32*62c56f98SSadaf Ebrahimi 33*62c56f98SSadaf EbrahimiWe maintain API compatibility in released versions of Mbed TLS. If you have 34*62c56f98SSadaf Ebrahimicode that's working and secure with Mbed TLS x.y.z and does not rely on 35*62c56f98SSadaf Ebrahimiundocumented features, then you should be able to re-compile it without 36*62c56f98SSadaf Ebrahimimodification with any later release x.y'.z' with the same major version 37*62c56f98SSadaf Ebrahiminumber, and your code will still build, be secure, and work. 38*62c56f98SSadaf Ebrahimi 39*62c56f98SSadaf EbrahimiNote that this guarantee only applies if you either use the default 40*62c56f98SSadaf Ebrahimicompile-time configuration (`mbedtls/mbedtls_config.h`) or the same modified 41*62c56f98SSadaf Ebrahimicompile-time configuration. Changing compile-time configuration options can 42*62c56f98SSadaf Ebrahimiresult in an incompatible API or ABI, although features will generally not 43*62c56f98SSadaf Ebrahimiaffect unrelated features (for example, enabling or disabling a 44*62c56f98SSadaf Ebrahimicryptographic algorithm does not break code that does not use that 45*62c56f98SSadaf Ebrahimialgorithm). 46*62c56f98SSadaf Ebrahimi 47*62c56f98SSadaf EbrahimiNote that new releases of Mbed TLS may extend the API. Here are some 48*62c56f98SSadaf Ebrahimiexamples of changes that are common in minor releases of Mbed TLS, and are 49*62c56f98SSadaf Ebrahiminot considered API compatibility breaks: 50*62c56f98SSadaf Ebrahimi 51*62c56f98SSadaf Ebrahimi* Adding or reordering fields in a structure or union. 52*62c56f98SSadaf Ebrahimi* Removing a field from a structure, unless the field is documented as public. 53*62c56f98SSadaf Ebrahimi* Adding items to an enum. 54*62c56f98SSadaf Ebrahimi* Returning an error code that was not previously documented for a function 55*62c56f98SSadaf Ebrahimi when a new error condition arises. 56*62c56f98SSadaf Ebrahimi* Changing which error code is returned in a case where multiple error 57*62c56f98SSadaf Ebrahimi conditions apply. 58*62c56f98SSadaf Ebrahimi* Changing the behavior of a function from failing to succeeding, when the 59*62c56f98SSadaf Ebrahimi change is a reasonable extension of the current behavior, i.e. the 60*62c56f98SSadaf Ebrahimi addition of a new feature. 61*62c56f98SSadaf Ebrahimi 62*62c56f98SSadaf EbrahimiThere are rare exceptions where we break API compatibility: code that was 63*62c56f98SSadaf Ebrahimirelying on something that became insecure in the meantime (for example, 64*62c56f98SSadaf Ebrahimicrypto that was found to be weak) may need to be changed. In case security 65*62c56f98SSadaf Ebrahimicomes in conflict with backwards compatibility, we will put security first, 66*62c56f98SSadaf Ebrahimibut always attempt to provide a compatibility option. 67*62c56f98SSadaf Ebrahimi 68*62c56f98SSadaf Ebrahimi## Backward compatibility for the key store 69*62c56f98SSadaf Ebrahimi 70*62c56f98SSadaf EbrahimiWe maintain backward compatibility with previous versions of the 71*62c56f98SSadaf EbrahimiPSA Crypto persistent storage since Mbed TLS 2.25.0, provided that the 72*62c56f98SSadaf Ebrahimistorage backend (PSA ITS implementation) is configured in a compatible way. 73*62c56f98SSadaf EbrahimiWe intend to maintain this backward compatibility throughout a major version 74*62c56f98SSadaf Ebrahimiof Mbed TLS (for example, all Mbed TLS 3.y versions will be able to read 75*62c56f98SSadaf Ebrahimikeys written under any Mbed TLS 3.x with x <= y). 76*62c56f98SSadaf Ebrahimi 77*62c56f98SSadaf EbrahimiMbed TLS 3.x can also read keys written by Mbed TLS 2.25.0 through 2.28.x 78*62c56f98SSadaf EbrahimiLTS, but future major version upgrades (for example from 2.28.x/3.x to 4.y) 79*62c56f98SSadaf Ebrahimimay require the use of an upgrade tool. 80*62c56f98SSadaf Ebrahimi 81*62c56f98SSadaf EbrahimiNote that this guarantee does not currently fully extend to drivers, which 82*62c56f98SSadaf Ebrahimiare an experimental feature. We intend to maintain compatibility with the 83*62c56f98SSadaf Ebrahimibasic use of drivers from Mbed TLS 2.28.0 onwards, even if driver APIs 84*62c56f98SSadaf Ebrahimichange. However, for more experimental parts of the driver interface, such 85*62c56f98SSadaf Ebrahimias the use of driver state, we do not yet guarantee backward compatibility. 86*62c56f98SSadaf Ebrahimi 87*62c56f98SSadaf Ebrahimi## Long-time support branches 88*62c56f98SSadaf Ebrahimi 89*62c56f98SSadaf EbrahimiFor the LTS branches, additionally we try very hard to also maintain ABI 90*62c56f98SSadaf Ebrahimicompatibility (same definition as API except with re-linking instead of 91*62c56f98SSadaf Ebrahimire-compiling) and to avoid any increase in code size or RAM usage, or in the 92*62c56f98SSadaf Ebrahimiminimum version of tools needed to build the code. The only exception, as 93*62c56f98SSadaf Ebrahimibefore, is in case those goals would conflict with fixing a security issue, we 94*62c56f98SSadaf Ebrahimiwill put security first but provide a compatibility option. (So far we never 95*62c56f98SSadaf Ebrahimihad to break ABI compatibility in an LTS branch, but we occasionally had to 96*62c56f98SSadaf Ebrahimiincrease code size for a security fix.) 97*62c56f98SSadaf Ebrahimi 98*62c56f98SSadaf EbrahimiFor contributors, see the [Backwards Compatibility section of 99*62c56f98SSadaf EbrahimiCONTRIBUTING](CONTRIBUTING.md#backwards-compatibility). 100*62c56f98SSadaf Ebrahimi 101*62c56f98SSadaf Ebrahimi## Current Branches 102*62c56f98SSadaf Ebrahimi 103*62c56f98SSadaf EbrahimiThe following branches are currently maintained: 104*62c56f98SSadaf Ebrahimi 105*62c56f98SSadaf Ebrahimi- [master](https://github.com/Mbed-TLS/mbedtls/tree/master) 106*62c56f98SSadaf Ebrahimi- [`development`](https://github.com/Mbed-TLS/mbedtls/) 107*62c56f98SSadaf Ebrahimi- [`mbedtls-2.28`](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-2.28) 108*62c56f98SSadaf Ebrahimi maintained until at least the end of 2024, see 109*62c56f98SSadaf Ebrahimi <https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.7>. 110*62c56f98SSadaf Ebrahimi 111*62c56f98SSadaf EbrahimiUsers are urged to always use the latest version of a maintained branch. 112