Files | |
| file | psa_crypto_se_management.h |
| PSA Secure Element management function declarations. | |
Data Structures | |
| struct | psa_drv_se_internal_context_t |
| Internal secure element driver context. More... | |
| struct | psa_se_drv_data_s |
| Structure containing secure element driver data and contexts. More... | |
Macros | |
| #define | CONFIG_PSA_MAX_SE_COUNT (1) |
| Maximum number of available secure elements. | |
| #define | PSA_MAX_SE_COUNT (CONFIG_PSA_MAX_SE_COUNT) |
| Maximum supported number of secure elements. | |
Typedefs | |
| typedef struct psa_se_drv_data_s | psa_se_drv_data_t |
| Encodes the secure element driver data. | |
Functions | |
| psa_status_t | psa_register_secure_element (psa_key_location_t location, const psa_drv_se_t *methods, void *psa_se_configuration, const void *drv_transient_data) |
| Register a secure element driver with the SE management. More... | |
| psa_se_drv_data_t * | psa_get_se_driver_data (psa_key_lifetime_t lifetime) |
| Get the driver data of a specified driver. More... | |
| int | psa_get_se_driver (psa_key_lifetime_t lifetime, const psa_drv_se_t **p_methods, psa_drv_se_context_t **p_drv_context) |
| Get the driver entry points and context of a specified driver. More... | |
| const psa_drv_se_t * | psa_get_se_driver_methods (const psa_se_drv_data_t *driver) |
| Get the driver entry points of a specified driver. More... | |
| psa_drv_se_context_t * | psa_get_se_drv_context (psa_se_drv_data_t *driver) |
| Get the driver context of a specified driver. More... | |
| psa_status_t | psa_find_free_se_slot (const psa_key_attributes_t *attributes, psa_key_creation_method_t method, psa_se_drv_data_t *driver, psa_key_slot_number_t *slot_number) |
| Find an empty key slot on a secure element appropriate to the key attributes. More... | |
| psa_status_t | psa_destroy_se_key (psa_se_drv_data_t *driver, psa_key_slot_number_t slot_number) |
| Destroy the key on a secure element. More... | |
| psa_status_t | psa_load_se_persistent_data (const psa_se_drv_data_t *driver) |
| Load SE data from persistent memory. More... | |
| psa_status_t | psa_save_se_persistent_data (const psa_se_drv_data_t *driver) |
| Save SE data to persistent memory. More... | |
| psa_status_t | psa_destroy_se_persistent_data (psa_key_location_t location) |
| Destroy SE data in persistent memory. More... | |
| psa_status_t psa_destroy_se_key | ( | psa_se_drv_data_t * | driver, |
| psa_key_slot_number_t | slot_number | ||
| ) |
Destroy the key on a secure element.
| driver | Driver of the SE containing the key to be destroyed |
| slot_number | Slot number of the key that is to be destroyed |
| psa_status_t psa_destroy_se_persistent_data | ( | psa_key_location_t | location | ) |
Destroy SE data in persistent memory.
| location | Location of the data that should be destroyed |
| psa_status_t psa_find_free_se_slot | ( | const psa_key_attributes_t * | attributes, |
| psa_key_creation_method_t | method, | ||
| psa_se_drv_data_t * | driver, | ||
| psa_key_slot_number_t * | slot_number | ||
| ) |
Find an empty key slot on a secure element appropriate to the key attributes.
| attributes | psa_key_attributes_t containing the attributes of the key to be created |
| method | The method used to create the key (see psa_key_creation_method_t) |
| driver | Pointer to the driver for the SE the key should be created on |
| slot_number | Pointer that will contain the slot number of the free SE slot |
| int psa_get_se_driver | ( | psa_key_lifetime_t | lifetime, |
| const psa_drv_se_t ** | p_methods, | ||
| psa_drv_se_context_t ** | p_drv_context | ||
| ) |
Get the driver entry points and context of a specified driver.
| lifetime | Lifetime value of type psa_key_lifetime_t of the key to be used |
| p_methods | Pointer that will reference the driver methods |
| p_drv_context | Pointer that will reference the driver context |
| psa_se_drv_data_t* psa_get_se_driver_data | ( | psa_key_lifetime_t | lifetime | ) |
Get the driver data of a specified driver.
| lifetime | Lifetime value of type psa_key_lifetime_t of the key to be used |
NULL if no driver exists with this location | const psa_drv_se_t* psa_get_se_driver_methods | ( | const psa_se_drv_data_t * | driver | ) |
Get the driver entry points of a specified driver.
| driver | Driver data of type psa_se_drv_data_t containing the entry points |
| psa_drv_se_context_t* psa_get_se_drv_context | ( | psa_se_drv_data_t * | driver | ) |
Get the driver context of a specified driver.
| driver | Driver data of type psa_se_drv_data_t containing the context |
| psa_status_t psa_load_se_persistent_data | ( | const psa_se_drv_data_t * | driver | ) |
Load SE data from persistent memory.
| driver | Pointer to the driver data the loaded data should be stored in |
| psa_status_t psa_register_secure_element | ( | psa_key_location_t | location, |
| const psa_drv_se_t * | methods, | ||
| void * | psa_se_configuration, | ||
| const void * | drv_transient_data | ||
| ) |
Register a secure element driver with the SE management.
This function is called by the auto_init module during boot.
| location | Location the driver should be registered with, of type psa_key_location_t |
| methods | Structure of available driver entry points of the driver |
| psa_se_configuration | Pointer to a secure element configuration structure |
| drv_transient_data | Transient driver data to be used by the driver |
| psa_status_t psa_save_se_persistent_data | ( | const psa_se_drv_data_t * | driver | ) |
Save SE data to persistent memory.
| driver | Pointer to the driver data containing the data to be saved |