mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-08 17:42:09 +03:00
Merge pull request #5962 from gilles-peskine-arm/storage-format-doc-202206
Documentation about storage format compatibility
This commit is contained in:
@@ -12,6 +12,11 @@
|
||||
* designations of cryptographic algorithms, and error codes returned by
|
||||
* the library.
|
||||
*
|
||||
* Note that many of the constants defined in this file are embedded in
|
||||
* the persistent key store, as part of key metadata (including usage
|
||||
* policies). As a consequence, they must not be changed (unless the storage
|
||||
* format version changes).
|
||||
*
|
||||
* This header file only defines preprocessor macros.
|
||||
*/
|
||||
/*
|
||||
@@ -41,6 +46,18 @@
|
||||
|
||||
/* PSA error codes */
|
||||
|
||||
/* Error codes are standardized across PSA domains (framework, crypto, storage,
|
||||
* etc.). Do not change the values in this section or even the expansions
|
||||
* of each macro: it must be possible to `#include` both this header
|
||||
* and some other PSA component's headers in the same C source,
|
||||
* which will lead to duplicate definitions of the `PSA_SUCCESS` and
|
||||
* `PSA_ERROR_xxx` macros, which is ok if and only if the macros expand
|
||||
* to the same sequence of tokens.
|
||||
*
|
||||
* If you must add a new
|
||||
* value, check with the Arm PSA framework group to pick one that other
|
||||
* domains aren't already using. */
|
||||
|
||||
/** The action was completed successfully. */
|
||||
#define PSA_SUCCESS ((psa_status_t)0)
|
||||
|
||||
@@ -317,6 +334,12 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
/* Note that key type values, including ECC family and DH group values, are
|
||||
* embedded in the persistent key store, as part of key metadata. As a
|
||||
* consequence, they must not be changed (unless the storage format version
|
||||
* changes).
|
||||
*/
|
||||
|
||||
/** An invalid key type value.
|
||||
*
|
||||
* Zero is not the encoding of any key type.
|
||||
@@ -719,6 +742,11 @@
|
||||
1u << PSA_GET_KEY_TYPE_BLOCK_SIZE_EXPONENT(type) : \
|
||||
0u)
|
||||
|
||||
/* Note that algorithm values are embedded in the persistent key store,
|
||||
* as part of key metadata. As a consequence, they must not be changed
|
||||
* (unless the storage format version changes).
|
||||
*/
|
||||
|
||||
/** Vendor-defined algorithm flag.
|
||||
*
|
||||
* Algorithms defined by this standard will never have the #PSA_ALG_VENDOR_FLAG
|
||||
@@ -2207,6 +2235,11 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
/* Note that location and persistence level values are embedded in the
|
||||
* persistent key store, as part of key metadata. As a consequence, they
|
||||
* must not be changed (unless the storage format version changes).
|
||||
*/
|
||||
|
||||
/** The default lifetime for volatile keys.
|
||||
*
|
||||
* A volatile key only exists as long as the identifier to it is not destroyed.
|
||||
@@ -2322,6 +2355,11 @@
|
||||
|
||||
#define PSA_KEY_LOCATION_VENDOR_FLAG ((psa_key_location_t)0x800000)
|
||||
|
||||
/* Note that key identifier values are embedded in the
|
||||
* persistent key store, as part of key metadata. As a consequence, they
|
||||
* must not be changed (unless the storage format version changes).
|
||||
*/
|
||||
|
||||
/** The null key identifier.
|
||||
*/
|
||||
#define PSA_KEY_ID_NULL ((psa_key_id_t)0)
|
||||
@@ -2433,6 +2471,11 @@ static inline int mbedtls_svc_key_id_is_null( mbedtls_svc_key_id_t key )
|
||||
* @{
|
||||
*/
|
||||
|
||||
/* Note that key usage flags are embedded in the
|
||||
* persistent key store, as part of key metadata. As a consequence, they
|
||||
* must not be changed (unless the storage format version changes).
|
||||
*/
|
||||
|
||||
/** Whether the key may be exported.
|
||||
*
|
||||
* A public key or the public part of a key pair may always be exported
|
||||
@@ -2559,6 +2602,9 @@ static inline int mbedtls_svc_key_id_is_null( mbedtls_svc_key_id_t key )
|
||||
* @{
|
||||
*/
|
||||
|
||||
/* Key input steps are not embedded in the persistent storage, so you can
|
||||
* change them if needed: it's only an ABI change. */
|
||||
|
||||
/** A secret input for key derivation.
|
||||
*
|
||||
* This should be a key of type #PSA_KEY_TYPE_DERIVE
|
||||
|
Reference in New Issue
Block a user