Loading...
Searching...
No Matches
psa_crypto_se_management.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021 HAW Hamburg
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#include "psa/crypto.h"
26
30#ifndef CONFIG_PSA_MAX_SE_COUNT
31#define CONFIG_PSA_MAX_SE_COUNT (1)
32#endif /* CONFIG_PSA_MAX_SE_COUNT */
33
37#define PSA_MAX_SE_COUNT (CONFIG_PSA_MAX_SE_COUNT)
38
52
64
69
88 const psa_drv_se_t *methods,
89 void *psa_se_configuration,
90 const void *drv_transient_data);
91
101
113 const psa_drv_se_t **p_methods,
114 psa_drv_se_context_t **p_drv_context);
115
124
133
148 psa_se_drv_data_t *driver,
149 psa_key_slot_number_t *slot_number);
150
163 psa_key_slot_number_t slot_number);
164
175
186
197
198#ifdef __cplusplus
199}
200#endif
201
struct psa_key_attributes_s psa_key_attributes_t
The type of an object containing key attributes.
Definition attributes.h:157
Function declarations for PSA Crypto.
psa_status_t psa_load_se_persistent_data(const psa_se_drv_data_t *driver)
Load SE data from persistent memory.
psa_drv_se_context_t * psa_get_se_drv_context(psa_se_drv_data_t *driver)
Get the driver context of a specified driver.
struct psa_se_drv_data_s psa_se_drv_data_t
Encodes the secure element driver data.
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.
psa_status_t psa_destroy_se_persistent_data(psa_key_location_t location)
Destroy SE data in persistent memory.
psa_status_t psa_save_se_persistent_data(const psa_se_drv_data_t *driver)
Save SE data to persistent memory.
psa_se_drv_data_t * psa_get_se_driver_data(psa_key_lifetime_t lifetime)
Get the driver data of a specified driver.
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.
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.
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.
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.
uint64_t psa_key_slot_number_t
Encoding of a key slot number on a secure element.
psa_key_creation_method_t
An enumeration indicating how a key is created.
uint32_t psa_key_location_t
Encoding of key location indicators.
Definition lifetime.h:139
uint32_t psa_key_lifetime_t
Encoding of key lifetimes.
Definition lifetime.h:63
int32_t psa_status_t
Status code type used for all PSA Certified APIs.
Definition error.h:37
PSA external cryptoprocessor driver module.
Driver context structure.
Internal secure element driver context.
uintptr_t transient_data
Driver specific transient data.
void * persistent_data
Driver specific persistent data.
size_t persistent_data_size
Size of persistent data in bytes.
A structure containing pointers to all the entry points of a secure element driver.
Structure containing secure element driver data and contexts.
psa_drv_se_context_t context
SE driver context, read only.
const psa_drv_se_t * methods
Methods implemented by driver.
psa_key_location_t location
Location value assigned to driver.
union psa_se_drv_data_s::@125242210310051001276260221254050111235353014377 ctx
SE driver context.
psa_drv_se_internal_context_t internal
Internally writable SE driver context.