22#ifndef PSA_CRYPTO_PSA_KEY_LIFETIME_H
23#define PSA_CRYPTO_PSA_KEY_LIFETIME_H
156#define PSA_KEY_LIFETIME_VOLATILE ((psa_key_lifetime_t)0x00000000)
171#define PSA_KEY_LIFETIME_PERSISTENT ((psa_key_lifetime_t)0x00000001)
178#define PSA_KEY_PERSISTENCE_VOLATILE ((psa_key_persistence_t)0x00)
185#define PSA_KEY_PERSISTENCE_DEFAULT ((psa_key_persistence_t)0x01)
192#define PSA_KEY_PERSISTENCE_READ_ONLY ((psa_key_persistence_t)0xff)
202#define PSA_KEY_LOCATION_LOCAL_STORAGE ((psa_key_location_t)0x000000)
215#define PSA_KEY_LOCATION_PRIMARY_SECURE_ELEMENT ((psa_key_location_t)0x000001)
220#define PSA_KEY_LOCATION_VENDOR_FLAG ((psa_key_location_t)0x800000)
225#define PSA_KEY_LOCATION_SE_MIN (PSA_KEY_LOCATION_VENDOR_FLAG)
230#define PSA_KEY_LOCATION_SE_MAX ((psa_key_location_t)0x8000ff)
237#define PSA_KEY_LIFETIME_GET_PERSISTENCE(lifetime) \
238 ((psa_key_persistence_t)((lifetime) & 0x000000ff))
245#define PSA_KEY_LIFETIME_GET_LOCATION(lifetime) \
246 ((psa_key_location_t)((lifetime) >> 8))
263#define PSA_KEY_LIFETIME_IS_VOLATILE(lifetime) \
264 (PSA_KEY_LIFETIME_GET_PERSISTENCE(lifetime) == PSA_KEY_PERSISTENCE_VOLATILE)
274#define PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(persistence, location) \
275 ((location) << 8 | (persistence))
uint8_t psa_key_persistence_t
Encoding of key persistence levels.
uint32_t psa_key_location_t
Encoding of key location indicators.
uint32_t psa_key_lifetime_t
Encoding of key lifetimes.