Mbed TLS v4.1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
crypto_types.h
Go to the documentation of this file.
1
16
/*
17
* Copyright The Mbed TLS Contributors
18
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
19
*/
20
21
#ifndef PSA_CRYPTO_TYPES_H
22
#define PSA_CRYPTO_TYPES_H
23
24
#include "
tf-psa-crypto/build_info.h
"
25
26
/* Define the MBEDTLS_PRIVATE macro. */
27
#include "mbedtls/private_access.h"
28
29
#if defined(MBEDTLS_PSA_CRYPTO_PLATFORM_FILE)
30
#include MBEDTLS_PSA_CRYPTO_PLATFORM_FILE
31
#else
32
#include "
crypto_platform.h
"
33
#endif
34
35
#include <stdint.h>
36
40
47
/* If #PSA_SUCCESS is already defined, it means that #psa_status_t
48
* is also defined in an external header, so prevent its multiple
49
* definition.
50
*/
51
#ifndef PSA_SUCCESS
52
typedef
int32_t
psa_status_t
;
53
#endif
54
56
60
71
typedef
uint16_t
psa_key_type_t
;
72
90
typedef
uint8_t
psa_ecc_family_t
;
91
109
typedef
uint8_t
psa_dh_family_t
;
110
127
typedef
uint32_t
psa_algorithm_t
;
128
130
134
176
typedef
uint32_t
psa_key_lifetime_t
;
177
212
typedef
uint8_t
psa_key_persistence_t
;
213
253
typedef
uint32_t
psa_key_location_t
;
254
268
typedef
uint32_t
psa_key_id_t
;
269
284
#if !defined(MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER)
285
typedef
psa_key_id_t
mbedtls_svc_key_id_t
;
286
287
#else
/* MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER */
288
/* Implementation-specific: The Mbed TLS library can be built as
289
* part of a multi-client service that exposes the PSA Cryptography API in each
290
* client and encodes the client identity in the key identifier argument of
291
* functions such as psa_open_key().
292
*/
293
typedef
struct
{
294
psa_key_id_t
MBEDTLS_PRIVATE(key_id);
295
mbedtls_key_owner_id_t MBEDTLS_PRIVATE(owner);
296
}
mbedtls_svc_key_id_t
;
297
298
#endif
/* !MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER */
299
301
305
316
typedef
uint32_t
psa_key_usage_t
;
317
319
323
425
typedef
struct
psa_key_attributes_s
psa_key_attributes_t
;
426
428
432
438
typedef
uint16_t
psa_key_derivation_step_t
;
439
462
typedef
struct
psa_custom_key_parameters_s
psa_custom_key_parameters_t
;
463
465
466
#endif
/* PSA_CRYPTO_TYPES_H */
crypto_platform.h
PSA cryptography module: Mbed TLS platform definitions.
psa_key_attributes_t
struct psa_key_attributes_s psa_key_attributes_t
Definition
crypto_types.h:425
psa_key_type_t
uint16_t psa_key_type_t
Encoding of a key type.
Definition
crypto_types.h:71
psa_algorithm_t
uint32_t psa_algorithm_t
Encoding of a cryptographic algorithm.
Definition
crypto_types.h:127
psa_ecc_family_t
uint8_t psa_ecc_family_t
Definition
crypto_types.h:90
psa_dh_family_t
uint8_t psa_dh_family_t
Definition
crypto_types.h:109
psa_custom_key_parameters_t
struct psa_custom_key_parameters_s psa_custom_key_parameters_t
Custom parameters for key generation or key derivation.
Definition
crypto_types.h:462
psa_key_derivation_step_t
uint16_t psa_key_derivation_step_t
Encoding of the step of a key derivation.
Definition
crypto_types.h:438
psa_status_t
int32_t psa_status_t
Function return status.
Definition
crypto_types.h:52
psa_key_id_t
uint32_t psa_key_id_t
Definition
crypto_types.h:268
psa_key_persistence_t
uint8_t psa_key_persistence_t
Definition
crypto_types.h:212
psa_key_location_t
uint32_t psa_key_location_t
Definition
crypto_types.h:253
psa_key_lifetime_t
uint32_t psa_key_lifetime_t
Definition
crypto_types.h:176
mbedtls_svc_key_id_t
psa_key_id_t mbedtls_svc_key_id_t
Definition
crypto_types.h:285
psa_key_usage_t
uint32_t psa_key_usage_t
Encoding of permitted usage on a key.
Definition
crypto_types.h:316
psa_custom_key_parameters_s
Definition
crypto_struct.h:263
psa_key_attributes_s
Definition
crypto_struct.h:304
build_info.h
Build-time configuration info.
tf-psa-crypto
include
psa
crypto_types.h
Generated on
for Mbed TLS v4.1.1 by
1.17.0