| 1 | # Maintained branches |
| 2 | |
| 3 | At any point in time, we have a number of maintained branches, currently consisting of: |
| 4 | |
| 5 | - The [`main`](https://github.com/Mbed-TLS/TF-PSA-Crypto/tree/main) branch: |
| 6 | this always contains the latest release, including all publicly available |
| 7 | security fixes. |
| 8 | - The [`development`](https://github.com/Mbed-TLS/TF-PSA-Crypto/tree/development) branch: |
| 9 | This branch was used to prepare version 1.0.0 of TF-PSA-Crypto and continues to host |
| 10 | development for future versions. |
| 11 | - [`tf-psa-crypto-1.1`](https://github.com/Mbed-TLS/TF-PSA-Crypto/tree/tf-psa-crypto-1.1) |
| 12 | maintained until March 2029, see |
| 13 | <https://github.com/Mbed-TLS/TF-PSA-Crypto/releases/tag/v1.1.0>. |
| 14 | |
| 15 | We use [Semantic Versioning](https://semver.org/). In particular, we maintain |
| 16 | API compatibility in the `main` branch across minor version changes (e.g. |
| 17 | the API of 1.(x+1) is backward compatible with 1.x). We only break API |
| 18 | compatibility on major version changes (e.g. from 1.x to 2.0). We also maintain |
| 19 | ABI compatibility within LTS branches; see the next section for details. |
| 20 | |
| 21 | We will make regular LTS releases on an 18-month cycle, each of which will have |
| 22 | a 3 year support lifetime. The release date of the first 1.x LTS is yet to be |
| 23 | determined. |
| 24 | |
| 25 | Mbed TLS currently maintains the LTS branch [`mbedtls-3.6`](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-3.6). |
| 26 | This branch contains the implementation of the PSA Cryptography API prior to the |
| 27 | Mbed TLS repository split. Any relevant bug fixes made in the TF-PSA-Crypto |
| 28 | development branch should be backported to this branch to ensure proper |
| 29 | maintenance. This does not apply to Mbed TLS LTS branches created after |
| 30 | the repository split, such as mbedtls-4.1. |
| 31 | |
| 32 | ## Backwards Compatibility for application code |
| 33 | |
| 34 | We maintain API compatibility in released versions of TF-PSA-Crypto. If you |
| 35 | have code that's working and secure with TF-PSA-Crypto x.y.z and does not rely |
| 36 | on undocumented features, then you should be able to re-compile it without |
| 37 | modification with any later release x.y'.z' with the same major version |
| 38 | number, and your code will still build, be secure, and work. |
| 39 | |
| 40 | Note that this guarantee only applies if you either use the default |
| 41 | compile-time configuration (`psa/crypto_config.h`) or the same modified |
| 42 | compile-time configuration. Changing compile-time configuration options can |
| 43 | result in an incompatible API or ABI, although features will generally not |
| 44 | affect unrelated features (for example, enabling or disabling a |
| 45 | cryptographic algorithm does not break code that does not use that |
| 46 | algorithm). |
| 47 | |
| 48 | Note that new releases of TF-PSA-Crypto may extend the API. Here are some |
| 49 | examples of changes that are common in minor releases of TF-PSA-Crypto, and are |
| 50 | not considered API compatibility breaks: |
| 51 | |
| 52 | * Adding or reordering fields in a structure or union. |
| 53 | * Removing a field from a structure, unless the field is documented as public. |
| 54 | * Adding items to an enum. |
| 55 | * Returning an error code that was not previously documented for a function |
| 56 | when a new error condition arises. |
| 57 | * Changing which error code is returned in a case where multiple error |
| 58 | conditions apply. |
| 59 | * Changing the behavior of a function from failing to succeeding, when the |
| 60 | change is a reasonable extension of the current behavior, i.e. the |
| 61 | addition of a new feature. |
| 62 | |
| 63 | There are rare exceptions where we break API compatibility: code that was |
| 64 | relying on something that became insecure in the meantime (for example, |
| 65 | crypto that was found to be weak) may need to be changed. In case security |
| 66 | comes in conflict with backwards compatibility, we will put security first, |
| 67 | but always attempt to provide a compatibility option. |
| 68 | |
| 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 TF-PSA-Crypto (for example, all TF-PSA-Crypto 1.y versions will be able to |
| 76 | read keys written under any TF-PSA-Crypto 1.x with x <= y). |
| 77 | |
| 78 | Future major version upgrades (for example from 1.x to 2.y) may require the use |
| 79 | of an upgrade tool. |
| 80 | |
| 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 | |
| 87 | ## Long-time support branches |
| 88 | |
| 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 | |
| 98 | For contributors, see the [Backwards Compatibility section of |
| 99 | CONTRIBUTING](CONTRIBUTING.md#backwards-compatibility). |
| 100 | |
| 101 | ## Current Branches |
| 102 | |
| 103 | The following branches are currently maintained: |
| 104 | |
| 105 | - [main](https://github.com/Mbed-TLS/TF-PSA-Crypto/tree/main) |
| 106 | - [`development`](https://github.com/Mbed-TLS/TF-PSA-Crypto/) |
| 107 | - [`tf-psa-crypto-1.1`](https://github.com/Mbed-TLS/TF-PSA-Crypto/tree/tf-psa-crypto-1.1) |
| 108 | maintained until March 2029, see |
| 109 | <https://github.com/Mbed-TLS/TF-PSA-Crypto/releases/tag/v1.1.0>. |