Loading...
Searching...
No Matches
psa_crypto_se_management.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021 HAW Hamburg
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
21#ifndef PSA_CRYPTO_SE_MANAGEMENT_H
22#define PSA_CRYPTO_SE_MANAGEMENT_H
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#include "psa/crypto.h"
30
34#ifndef CONFIG_PSA_MAX_SE_COUNT
35#define CONFIG_PSA_MAX_SE_COUNT (1)
36#endif /* CONFIG_PSA_MAX_SE_COUNT */
37
41#define PSA_MAX_SE_COUNT (CONFIG_PSA_MAX_SE_COUNT)
42
56
68
73
92 const psa_drv_se_t *methods,
93 void *psa_se_configuration,
94 const void *drv_transient_data);
95
105
117 const psa_drv_se_t **p_methods,
118 psa_drv_se_context_t **p_drv_context);
119
128
137
152 psa_se_drv_data_t *driver,
153 psa_key_slot_number_t *slot_number);
154
167 psa_key_slot_number_t slot_number);
168
179
190
201
202#ifdef __cplusplus
203}
204#endif
205
206#endif /* PSA_CRYPTO_SE_MANAGEMENT_H */
Function declarations for PSA Crypto.
int32_t psa_status_t
Function return status.
uint32_t psa_key_location_t
Encoding of key location indicators.
uint32_t psa_key_lifetime_t
Encoding of key lifetimes.
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.
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.
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 storing key attributes.
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.
psa_drv_se_internal_context_t internal
Internally writable SE driver context.
union psa_se_drv_data_s::@401 ctx
SE driver context.