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
9#pragma once
10
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#include "psa/crypto.h"
29
33#ifndef CONFIG_PSA_MAX_SE_COUNT
34#define CONFIG_PSA_MAX_SE_COUNT (1)
35#endif /* CONFIG_PSA_MAX_SE_COUNT */
36
40#define PSA_MAX_SE_COUNT (CONFIG_PSA_MAX_SE_COUNT)
41
55
67
72
91 const psa_drv_se_t *methods,
92 void *psa_se_configuration,
93 const void *drv_transient_data);
94
104
116 const psa_drv_se_t **p_methods,
117 psa_drv_se_context_t **p_drv_context);
118
127
136
151 psa_se_drv_data_t *driver,
152 psa_key_slot_number_t *slot_number);
153
166 psa_key_slot_number_t slot_number);
167
178
189
200
201#ifdef __cplusplus
202}
203#endif
204
struct psa_key_attributes_s psa_key_attributes_t
The type of an object containing key attributes.
Definition attributes.h:160
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:142
uint32_t psa_key_lifetime_t
Encoding of key lifetimes.
Definition lifetime.h:66
int32_t psa_status_t
Status code type used for all PSA Certified APIs.
Definition error.h:40
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.