blob: 0ce47e89f919b540af32a7fe905b71044af098bc [file] [log] [blame] [view]
Manuel Pégourié-Gonnarde6997392021-02-25 11:40:08 +01001# Maintained branches
2
Dave Rodgman9b4d9ae2022-01-05 18:46:17 +00003At any point in time, we have a number of maintained branches, currently consisting of:
Manuel Pégourié-Gonnarde6997392021-02-25 11:40:08 +01004
Dave Rodgman017a1992022-03-31 14:07:01 +01005- The [`master`](https://github.com/Mbed-TLS/mbedtls/tree/master) branch:
Gilles Peskine991bbe72021-03-16 12:05:16 +01006 this always contains the latest release, including all publicly available
7 security fixes.
Dave Rodgman017a1992022-03-31 14:07:01 +01008- The [`development`](https://github.com/Mbed-TLS/mbedtls/tree/development) branch:
Dave Rodgman1bc9e932021-07-01 09:20:13 +01009 this is where the current major version of Mbed TLS (version 3.x) is being
Dave Rodgmana00e8502021-04-23 16:43:13 +010010 prepared. It has API changes that make it incompatible with Mbed TLS 2.x,
11 as well as all the new features and bug fixes and security fixes.
Dave Rodgman9b4d9ae2022-01-05 18:46:17 +000012- One or more long-time support (LTS) branches: these only get bug fixes and
13 security fixes. Currently, the only supported LTS branch is:
Dave Rodgman017a1992022-03-31 14:07:01 +010014 [`mbedtls-2.28`](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-2.28).
Dave Rodgman9b4d9ae2022-01-05 18:46:17 +000015
16We retain a number of historical branches, whose names are prefixed by `archive/`,
Dave Rodgman017a1992022-03-31 14:07:01 +010017such as [`archive/mbedtls-2.7`](https://github.com/Mbed-TLS/mbedtls/tree/archive/mbedtls-2.7).
Dave Rodgman9b4d9ae2022-01-05 18:46:17 +000018These branches will not receive any changes or updates.
Manuel Pégourié-Gonnarde6997392021-02-25 11:40:08 +010019
20We use [Semantic Versioning](https://semver.org/). In particular, we maintain
Gilles Peskine73876cf2021-06-08 15:33:53 +020021API compatibility in the `master` branch across minor version changes (e.g.
22the API of 3.(x+1) is backward compatible with 3.x). We only break API
23compatibility on major version changes (e.g. from 3.x to 4.0). We also maintain
24ABI compatibility within LTS branches; see the next section for details.
Manuel Pégourié-Gonnarde6997392021-02-25 11:40:08 +010025
Janos Follathe6c0fd02023-03-30 14:59:31 +010026New LTS branches are usually created around the time of a new major version.
27After a new LTS branch is created, it remains supported for at least 3 years.
28
Gilles Peskine9956efa2022-06-20 18:48:52 +020029## Backwards Compatibility for application code
Manuel Pégourié-Gonnarde6997392021-02-25 11:40:08 +010030
Gilles Peskinea23df132021-03-16 12:04:44 +010031We maintain API compatibility in released versions of Mbed TLS. If you have
32code that's working and secure with Mbed TLS x.y.z and does not rely on
33undocumented features, then you should be able to re-compile it without
34modification with any later release x.y'.z' with the same major version
35number, and your code will still build, be secure, and work.
36
Gilles Peskine43e51fa2022-06-20 18:48:06 +020037Note that this guarantee only applies if you either use the default
38compile-time configuration (`mbedtls/mbedtls_config.h`) or the same modified
39compile-time configuration. Changing compile-time configuration options can
Gilles Peskine3dc9ac92022-06-27 23:02:58 +020040result in an incompatible API or ABI, although features will generally not
Gilles Peskine4fd898e2022-06-29 14:29:52 +020041affect unrelated features (for example, enabling or disabling a
Gilles Peskine43e51fa2022-06-20 18:48:06 +020042cryptographic algorithm does not break code that does not use that
43algorithm).
44
Gilles Peskine6dd92c32021-06-07 20:44:47 +020045Note that new releases of Mbed TLS may extend the API. Here are some
46examples of changes that are common in minor releases of Mbed TLS, and are
47not considered API compatibility breaks:
Gilles Peskine1483fe42021-06-01 22:29:06 +020048
49* Adding or reordering fields in a structure or union.
50* Removing a field from a structure, unless the field is documented as public.
51* Adding items to an enum.
Gilles Peskine6dd92c32021-06-07 20:44:47 +020052* Returning an error code that was not previously documented for a function
53 when a new error condition arises.
54* Changing which error code is returned in a case where multiple error
55 conditions apply.
56* Changing the behavior of a function from failing to succeeding, when the
57 change is a reasonable extension of the current behavior, i.e. the
58 addition of a new feature.
Gilles Peskine1483fe42021-06-01 22:29:06 +020059
Gilles Peskined1a8cd52021-06-07 20:42:40 +020060There are rare exceptions where we break API compatibility: code that was
61relying on something that became insecure in the meantime (for example,
62crypto that was found to be weak) may need to be changed. In case security
63comes in conflict with backwards compatibility, we will put security first,
64but always attempt to provide a compatibility option.
Manuel Pégourié-Gonnarde6997392021-02-25 11:40:08 +010065
Gilles Peskine9956efa2022-06-20 18:48:52 +020066## Backward compatibility for the key store
67
Gilles Peskine4fd898e2022-06-29 14:29:52 +020068We maintain backward compatibility with previous versions of the
Gilles Peskine9956efa2022-06-20 18:48:52 +020069PSA Crypto persistent storage since Mbed TLS 2.25.0, provided that the
70storage backend (PSA ITS implementation) is configured in a compatible way.
Gilles Peskine3dc9ac92022-06-27 23:02:58 +020071We intend to maintain this backward compatibility throughout a major version
Gilles Peskine9956efa2022-06-20 18:48:52 +020072of Mbed TLS (for example, all Mbed TLS 3.y versions will be able to read
Gilles Peskine4fd898e2022-06-29 14:29:52 +020073keys written under any Mbed TLS 3.x with x <= y).
Gilles Peskine9956efa2022-06-20 18:48:52 +020074
75Mbed TLS 3.x can also read keys written by Mbed TLS 2.25.0 through 2.28.x
76LTS, but future major version upgrades (for example from 2.28.x/3.x to 4.y)
77may require the use of an upgrade tool.
78
Gilles Peskine4b873872022-06-20 18:50:09 +020079Note that this guarantee does not currently fully extend to drivers, which
80are an experimental feature. We intend to maintain compatibility with the
81basic use of drivers from Mbed TLS 2.28.0 onwards, even if driver APIs
82change. However, for more experimental parts of the driver interface, such
83as the use of driver state, we do not yet guarantee backward compatibility.
84
Gilles Peskine87d36e32021-06-07 20:42:50 +020085## Long-time support branches
86
Manuel Pégourié-Gonnarde6997392021-02-25 11:40:08 +010087For the LTS branches, additionally we try very hard to also maintain ABI
88compatibility (same definition as API except with re-linking instead of
89re-compiling) and to avoid any increase in code size or RAM usage, or in the
90minimum version of tools needed to build the code. The only exception, as
91before, is in case those goals would conflict with fixing a security issue, we
92will put security first but provide a compatibility option. (So far we never
93had to break ABI compatibility in an LTS branch, but we occasionally had to
94increase code size for a security fix.)
95
Manuel Pégourié-Gonnard80c02af2021-02-25 12:34:58 +010096For contributors, see the [Backwards Compatibility section of
Tom Cosgrovefff613a2021-11-15 13:54:59 +000097CONTRIBUTING](CONTRIBUTING.md#backwards-compatibility).
Manuel Pégourié-Gonnard80c02af2021-02-25 12:34:58 +010098
99## Current Branches
Manuel Pégourié-Gonnarde6997392021-02-25 11:40:08 +0100100
101The following branches are currently maintained:
102
Dave Rodgman017a1992022-03-31 14:07:01 +0100103- [master](https://github.com/Mbed-TLS/mbedtls/tree/master)
104- [`development`](https://github.com/Mbed-TLS/mbedtls/)
105- [`mbedtls-2.28`](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-2.28)
Dave Rodgman9b4d9ae2022-01-05 18:46:17 +0000106 maintained until at least the end of 2024, see
Paul Elliottb6264f32023-03-21 18:07:19 +0000107 <https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.3>.
Manuel Pégourié-Gonnarde6997392021-02-25 11:40:08 +0100108
109Users are urged to always use the latest version of a maintained branch.