|
Mbed TLS v4.0.0
|
PSA cryptography module: Mbed TLS structured type implementations. More...
#include "mbedtls/private_access.h"#include "tf-psa-crypto/build_info.h"#include "psa/crypto_driver_contexts_primitives.h"#include "psa/crypto_driver_contexts_composites.h"#include "psa/crypto_driver_contexts_key_derivation.h"
Go to the source code of this file.
Data Structures | |
| struct | psa_hash_operation_s |
| struct | psa_cipher_operation_s |
| struct | psa_mac_operation_s |
| struct | psa_aead_operation_s |
| struct | psa_key_derivation_s |
| struct | psa_custom_key_parameters_s |
| struct | psa_key_policy_s |
| struct | psa_key_attributes_s |
| struct | psa_sign_hash_interruptible_operation_s |
| The context for PSA interruptible hash signing. More... | |
| struct | psa_verify_hash_interruptible_operation_s |
| The context for PSA interruptible hash verification. More... | |
| struct | psa_key_agreement_iop_s |
| The context for PSA interruptible key agreement. More... | |
| struct | psa_generate_key_iop_s |
| The context for PSA interruptible key generation. More... | |
| struct | psa_export_public_key_iop_s |
| The context for PSA interruptible export public-key. More... | |
Macros | |
| #define | PSA_HASH_OPERATION_INIT { 0, { 0 } } |
| #define | PSA_CIPHER_OPERATION_INIT { 0, 0, 0, 0, { 0 } } |
| #define | PSA_MAC_OPERATION_INIT { 0, 0, 0, { 0 } } |
| #define | PSA_AEAD_OPERATION_INIT { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, { 0 } } |
| #define | PSA_KEY_DERIVATION_OPERATION_INIT { 0, 0, 0, { 0 } } |
| #define | PSA_CUSTOM_KEY_PARAMETERS_INIT { 0 } |
| #define | PSA_KEY_POLICY_INIT { 0, 0, 0 } |
| #define | PSA_KEY_BITS_TOO_LARGE ((psa_key_bits_t) -1) |
| #define | PSA_MAX_KEY_BITS 0xfff8 |
| #define | PSA_KEY_ATTRIBUTES_INIT |
| #define | PSA_SIGN_HASH_INTERRUPTIBLE_OPERATION_INIT { 0, { 0 }, 0, 0 } |
| #define | PSA_VERIFY_HASH_INTERRUPTIBLE_OPERATION_INIT { 0, { 0 }, 0, 0 } |
| #define | PSA_KEY_AGREEMENT_IOP_INIT |
| #define | PSA_GENERATE_KEY_IOP_INIT |
| #define | PSA_EXPORT_PUBLIC_KEY_IOP_INIT { 0, MBEDTLS_PSA_EXPORT_PUBLIC_KEY_IOP_INIT, 0, 0 } |
Typedefs | |
| typedef struct psa_key_policy_s | psa_key_policy_t |
| typedef uint16_t | psa_key_bits_t |
PSA cryptography module: Mbed TLS structured type implementations.
This file contains the definitions of some data structures with implementation-specific definitions.
In implementations with isolation between the application and the cryptography module, it is expected that the front-end and the back-end would have different versions of this file.
For multipart operations without driver delegation support, each multipart operation structure contains a psa_algorithm_t alg field which indicates which specific algorithm the structure is for. When the structure is not in use, alg is 0. Most of the structure consists of a union which is discriminated by alg.
For multipart operations with driver delegation support, each multipart operation structure contains an unsigned int id field indicating which driver got assigned to do the operation. When the structure is not in use, 'id' is 0. The structure contains also a driver context which is the union of the contexts of all drivers able to handle the type of multipart operation.
Note that when alg or id is 0, the content of other fields is undefined. In particular, it is not guaranteed that a freshly-initialized structure is all-zero: we initialize structures to something like {0, 0}, which is only guaranteed to initializes the first member of the union; GCC and Clang initialize the whole structure to 0 (at the time of writing), but MSVC and CompCert don't.
In Mbed TLS, multipart operation structures live independently from the key. This allows Mbed TLS to free the key objects when destroying a key slot. If a multipart operation needs to remember the key after the setup function returns, the operation structure needs to contain a copy of the key.
Definition in file crypto_struct.h.
| #define PSA_CUSTOM_KEY_PARAMETERS_INIT { 0 } |
The default production parameters for key generation or key derivation.
Calling psa_generate_key_custom() or psa_key_derivation_output_key_custom() with custom=PSA_CUSTOM_KEY_PARAMETERS_INIT and custom_data_length=0 is equivalent to calling psa_generate_key() or psa_key_derivation_output_key() respectively.
Definition at line 231 of file crypto_struct.h.
| #define PSA_EXPORT_PUBLIC_KEY_IOP_INIT { 0, MBEDTLS_PSA_EXPORT_PUBLIC_KEY_IOP_INIT, 0, 0 } |
Definition at line 579 of file crypto_struct.h.
Referenced by psa_export_public_key_iop_init().
| #define PSA_GENERATE_KEY_IOP_INIT |
Definition at line 542 of file crypto_struct.h.
Referenced by psa_generate_key_iop_init().
| #define PSA_KEY_AGREEMENT_IOP_INIT |
Definition at line 504 of file crypto_struct.h.
Referenced by psa_key_agreement_iop_init().
| #define PSA_KEY_BITS_TOO_LARGE ((psa_key_bits_t) -1) |
Definition at line 252 of file crypto_struct.h.
Referenced by psa_set_key_bits().
| #define PSA_KEY_POLICY_INIT { 0, 0, 0 } |
Definition at line 240 of file crypto_struct.h.
Referenced by psa_key_policy_init().
| #define PSA_MAX_KEY_BITS 0xfff8 |
Definition at line 258 of file crypto_struct.h.
Referenced by psa_set_key_bits().
| #define PSA_SIGN_HASH_INTERRUPTIBLE_OPERATION_INIT { 0, { 0 }, 0, 0 } |
Definition at line 428 of file crypto_struct.h.
Referenced by psa_sign_hash_interruptible_operation_init().
| #define PSA_VERIFY_HASH_INTERRUPTIBLE_OPERATION_INIT { 0, { 0 }, 0, 0 } |
Definition at line 466 of file crypto_struct.h.
Referenced by psa_verify_hash_interruptible_operation_init().
| typedef uint16_t psa_key_bits_t |
Definition at line 249 of file crypto_struct.h.
| typedef struct psa_key_policy_s psa_key_policy_t |
Definition at line 238 of file crypto_struct.h.
|
inlinestatic |
Definition at line 312 of file crypto_struct.h.
|
static |
Definition at line 185 of file crypto_struct.h.
References PSA_AEAD_OPERATION_INIT.
|
static |
Definition at line 114 of file crypto_struct.h.
References PSA_CIPHER_OPERATION_INIT.
|
static |
Definition at line 583 of file crypto_struct.h.
References PSA_EXPORT_PUBLIC_KEY_IOP_INIT.
|
inlinestatic |
Definition at line 338 of file crypto_struct.h.
References PSA_KEY_USAGE_SIGN_HASH, PSA_KEY_USAGE_SIGN_MESSAGE, PSA_KEY_USAGE_VERIFY_HASH, and PSA_KEY_USAGE_VERIFY_MESSAGE.
Referenced by psa_set_key_usage_flags().
|
static |
Definition at line 547 of file crypto_struct.h.
References PSA_GENERATE_KEY_IOP_INIT.
|
inlinestatic |
Definition at line 368 of file crypto_struct.h.
|
inlinestatic |
Definition at line 396 of file crypto_struct.h.
|
inlinestatic |
Definition at line 305 of file crypto_struct.h.
|
inlinestatic |
Definition at line 332 of file crypto_struct.h.
|
inlinestatic |
Definition at line 380 of file crypto_struct.h.
|
inlinestatic |
Definition at line 356 of file crypto_struct.h.
|
static |
Definition at line 82 of file crypto_struct.h.
References PSA_HASH_OPERATION_INIT.
|
static |
Definition at line 509 of file crypto_struct.h.
References PSA_KEY_AGREEMENT_IOP_INIT.
|
static |
Definition at line 284 of file crypto_struct.h.
References PSA_KEY_ATTRIBUTES_INIT.
|
static |
Definition at line 212 of file crypto_struct.h.
References PSA_KEY_DERIVATION_OPERATION_INIT.
|
static |
Definition at line 241 of file crypto_struct.h.
References PSA_KEY_POLICY_INIT.
|
static |
Definition at line 146 of file crypto_struct.h.
References PSA_MAC_OPERATION_INIT.
|
inlinestatic |
Definition at line 362 of file crypto_struct.h.
|
inlinestatic |
Definition at line 386 of file crypto_struct.h.
References PSA_KEY_BITS_TOO_LARGE, and PSA_MAX_KEY_BITS.
|
inlinestatic |
Definition at line 290 of file crypto_struct.h.
References PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION, PSA_KEY_LIFETIME_GET_LOCATION, PSA_KEY_LIFETIME_IS_VOLATILE, and PSA_KEY_LIFETIME_PERSISTENT.
|
inlinestatic |
Definition at line 319 of file crypto_struct.h.
References PSA_KEY_LIFETIME_IS_VOLATILE.
|
inlinestatic |
Definition at line 374 of file crypto_struct.h.
|
inlinestatic |
Definition at line 349 of file crypto_struct.h.
References psa_extend_key_usage_flags().
|
static |
Definition at line 432 of file crypto_struct.h.
References PSA_SIGN_HASH_INTERRUPTIBLE_OPERATION_INIT.
|
static |
Definition at line 470 of file crypto_struct.h.
References PSA_VERIFY_HASH_INTERRUPTIBLE_OPERATION_INIT.
1.8.6