XenevaOS
Loading...
Searching...
No Matches
psa_crypto_se.h
Go to the documentation of this file.
1/*
2 * PSA crypto support for secure element drivers
3 */
4/*
5 * Copyright The Mbed TLS Contributors
6 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
7 */
8
9#ifndef PSA_CRYPTO_SE_H
10#define PSA_CRYPTO_SE_H
11
12/*
13 * Include the build-time configuration information header. Here, we do not
14 * include `"mbedtls/build_info.h"` directly but `"psa/build_info.h"`, which
15 * is basically just an alias to it. This is to ease the maintenance of the
16 * TF-PSA-Crypto repository which has a different build system and
17 * configuration.
18 */
19#include "psa/build_info.h"
20
21#include "psa/crypto.h"
23
34#define PSA_MAX_SE_LOCATION 255
35
45#define PSA_CRYPTO_SE_DRIVER_ITS_UID_BASE ((psa_key_id_t) 0xfffffe00)
46
48#define PSA_MAX_SE_DRIVERS 4
49
57
63
69typedef struct psa_se_drv_table_entry_s psa_se_drv_table_entry_t;
70
88 const psa_drv_se_t **p_methods,
89 psa_drv_se_context_t **p_drv_context);
90
99 psa_key_lifetime_t lifetime);
100
109 const psa_se_drv_table_entry_t *driver);
110
120
132 const psa_key_attributes_t *attributes,
135 psa_key_slot_number_t *slot_number);
136
143 psa_key_slot_number_t slot_number);
144
158 const psa_se_drv_table_entry_t *driver);
159
174 const psa_se_drv_table_entry_t *driver);
175
184
185
188typedef struct {
189 uint8_t slot_number[sizeof(psa_key_slot_number_t)];
191
192#endif /* PSA_CRYPTO_SE_H */
Platform Security Architecture cryptography module.
unsigned char uint8_t
Definition acefiex.h:161
PSA external cryptoprocessor driver module.
int32_t psa_status_t
Function return status.
Definition crypto_types.h:59
uint32_t psa_key_location_t
Definition crypto_types.h:260
uint32_t psa_key_lifetime_t
Definition crypto_types.h:183
uint64_t psa_key_slot_number_t
Definition crypto_se_driver.h:137
psa_key_creation_method_t
Definition crypto_se_driver.h:806
Build-time PSA configuration info.
psa_status_t psa_init_all_se_drivers(void)
psa_status_t psa_destroy_se_persistent_data(psa_key_location_t location)
psa_status_t psa_destroy_se_key(psa_se_drv_table_entry_t *driver, psa_key_slot_number_t slot_number)
psa_se_drv_table_entry_t * psa_get_se_driver_entry(psa_key_lifetime_t lifetime)
psa_status_t psa_find_se_slot_for_key(const psa_key_attributes_t *attributes, psa_key_creation_method_t method, psa_se_drv_table_entry_t *driver, psa_key_slot_number_t *slot_number)
psa_status_t psa_load_se_persistent_data(const psa_se_drv_table_entry_t *driver)
const psa_drv_se_t * psa_get_se_driver_methods(const psa_se_drv_table_entry_t *driver)
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)
psa_drv_se_context_t * psa_get_se_driver_context(psa_se_drv_table_entry_t *driver)
void psa_unregister_all_se_drivers(void)
struct psa_se_drv_table_entry_s psa_se_drv_table_entry_t
Definition psa_crypto_se.h:69
psa_status_t psa_save_se_persistent_data(const psa_se_drv_table_entry_t *driver)
Driver context structure.
Definition crypto_se_driver.h:44
Definition crypto_se_driver.h:1278
Definition crypto_struct.h:295
Definition psa_crypto_se.h:188