mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 07:45:43 +01:00
Rename and clarify the default persistent location and persistence
Call persistence "default" because that is genuinely the default that applications should use if they don't know better. It's slightly misleading in that the default persistence when you create a key is volatile, not this: "default" is the default persistence for persistent keys, not the default persistence for keys in general. But we haven't found a better name. Introduce the term "primary local storage" to designate the default storage location. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
5dcb74f02f
commit
ee04e69956
@ -154,7 +154,7 @@ typedef uint32_t psa_key_lifetime_t;
|
|||||||
* A volatile key is automatically destroyed by the implementation when
|
* A volatile key is automatically destroyed by the implementation when
|
||||||
* the application instance terminates. In particular, a volatile key
|
* the application instance terminates. In particular, a volatile key
|
||||||
* is automatically destroyed on a power reset of the device.
|
* is automatically destroyed on a power reset of the device.
|
||||||
* - \c 1 = #PSA_KEY_PERSISTENCE_PRIMARY:
|
* - \c 1 = #PSA_KEY_PERSISTENCE_DEFAULT:
|
||||||
* persistent key with a default lifetime.
|
* persistent key with a default lifetime.
|
||||||
* Implementations should support this value if they support persistent
|
* Implementations should support this value if they support persistent
|
||||||
* keys at all.
|
* keys at all.
|
||||||
@ -195,15 +195,15 @@ typedef uint8_t psa_key_persistence_t;
|
|||||||
* the key is stored.
|
* the key is stored.
|
||||||
*
|
*
|
||||||
* This specification defines the following values of location indicators:
|
* This specification defines the following values of location indicators:
|
||||||
* - \c 0: default location.
|
* - \c 0: primary local storage.
|
||||||
* All implementations should support this value.
|
* All implementations should support this value.
|
||||||
* The default location typically indicates that the key material is
|
* The primary local storage is typically the same storage area that
|
||||||
* used and stored within the same security boundary as the key metadata.
|
* contains the key metadata.
|
||||||
* - \c 1: primary secure element.
|
* - \c 1: primary secure element.
|
||||||
* Implementations should support this value if there is a secure element
|
* Implementations should support this value if there is a secure element
|
||||||
* attached to the operating environment.
|
* attached to the operating environment.
|
||||||
* As a guideline, secure elements may provide higher resistance against
|
* As a guideline, secure elements may provide higher resistance against
|
||||||
* side channel and physical attacks than the default location, but may
|
* side channel and physical attacks than the primary local storage, but may
|
||||||
* have restrictions on supported key types, sizes, policies and operations
|
* have restrictions on supported key types, sizes, policies and operations
|
||||||
* and may have different performance characteristics.
|
* and may have different performance characteristics.
|
||||||
* - \c 2-0x7fffff: other locations defined by a PSA specification.
|
* - \c 2-0x7fffff: other locations defined by a PSA specification.
|
||||||
|
@ -1568,7 +1568,7 @@
|
|||||||
#define PSA_KEY_LIFETIME_PERSISTENT ((psa_key_lifetime_t)0x00000001)
|
#define PSA_KEY_LIFETIME_PERSISTENT ((psa_key_lifetime_t)0x00000001)
|
||||||
|
|
||||||
#define PSA_KEY_PERSISTENCE_VOLATILE ((psa_key_persistence_t)0x00)
|
#define PSA_KEY_PERSISTENCE_VOLATILE ((psa_key_persistence_t)0x00)
|
||||||
#define PSA_KEY_PERSISTENCE_PRIMARY ((psa_key_persistence_t)0x01)
|
#define PSA_KEY_PERSISTENCE_DEFAULT ((psa_key_persistence_t)0x01)
|
||||||
#define PSA_KEY_PERSISTENCE_READ_ONLY ((psa_key_persistence_t)0xff)
|
#define PSA_KEY_PERSISTENCE_READ_ONLY ((psa_key_persistence_t)0xff)
|
||||||
|
|
||||||
#define PSA_KEY_LIFETIME_GET_PERSISTENCE(lifetime) \
|
#define PSA_KEY_LIFETIME_GET_PERSISTENCE(lifetime) \
|
||||||
@ -1597,7 +1597,7 @@
|
|||||||
(PSA_KEY_LIFETIME_GET_PERSISTENCE(lifetime) == \
|
(PSA_KEY_LIFETIME_GET_PERSISTENCE(lifetime) == \
|
||||||
PSA_KEY_LIFETIME_PERSISTENCE_VOLATILE)
|
PSA_KEY_LIFETIME_PERSISTENCE_VOLATILE)
|
||||||
|
|
||||||
#define PSA_KEY_LOCATION_BUILT_IN ((psa_key_location_t)0x000000)
|
#define PSA_KEY_LOCATION_LOCAL_STORAGE ((psa_key_location_t)0x000000)
|
||||||
#define PSA_KEY_LOCATION_VENDOR_FLAG ((psa_key_location_t)0x800000)
|
#define PSA_KEY_LOCATION_VENDOR_FLAG ((psa_key_location_t)0x800000)
|
||||||
|
|
||||||
/** The minimum value for a key identifier chosen by the application.
|
/** The minimum value for a key identifier chosen by the application.
|
||||||
|
Loading…
Reference in New Issue
Block a user