20#ifndef PSA_CRYPTO_PSA_CRYPTO_STRUCT_H
21#define PSA_CRYPTO_PSA_CRYPTO_STRUCT_H
31#if IS_USED(MODULE_PSA_KEY_MANAGEMENT) || defined(DOXYGEN)
60#define PSA_KEY_ATTRIBUTES_INIT { 0 }
75#if IS_USED(MODULE_PSA_AEAD) || defined(DOXYGEN)
89#define PSA_AEAD_OPERATION_INIT { 0 }
104#if IS_USED(MODULE_PSA_CIPHER) || defined(DOXYGEN)
116#if IS_USED(MODULE_PSA_SECURE_ELEMENT_ATECCX08A) || defined(DOXYGEN)
126#define PSA_CIPHER_OPERATION_INIT { 0 }
141#if IS_USED(MODULE_PSA_KEY_DERIVATION) || defined(DOXYGEN)
146#define PSA_KEY_DERIVATION_OPERATION_INIT { 0 }
170#if IS_USED(MODULE_PSA_HASH) || defined(DOXYGEN)
176#if IS_USED(MODULE_PSA_HASH)
177 psa_hash_context_t ctx;
185#define PSA_HASH_OPERATION_INIT { 0 }
200#if IS_USED(MODULE_PSA_MAC) || defined(DOXYGEN)
205#define PSA_MAC_OPERATION_INIT { 0 }
Context definitions for PSA Crypto.
Size definitions for PSA Crypto.
#define PSA_CIPHER_OPERATION_INIT
This macro returns a suitable initializer for a cipher operation object of type psa_cipher_operation_...
#define PSA_MAC_OPERATION_INIT
This macro returns a suitable initializer for a MAC operation object of type psa_mac_operation_t.
static struct psa_aead_operation_s psa_aead_operation_init(void)
Return an initial value for an AEAD operation object.
#define PSA_KEY_DERIVATION_OPERATION_INIT
This macro returns a suitable initializer for a key derivation operation object of type psa_key_deriv...
static struct psa_key_attributes_s psa_key_attributes_init(void)
Return an initial value for a key attribute object.
#define PSA_HASH_OPERATION_INIT
This macro returns a suitable initializer for a hash operation object of type psa_hash_operation_t.
static struct psa_cipher_operation_s psa_cipher_operation_init(void)
Return an initial value for a cipher operation object.
static struct psa_mac_operation_s psa_mac_operation_init(void)
Return an initial value for a MAC operation object.
#define PSA_KEY_ATTRIBUTES_INIT
This macro returns a suitable initializer for a key attribute object of type psa_key_attributes_t.
static struct psa_hash_operation_s psa_hash_operation_init(void)
Return an initial value for a hash operation object.
static struct psa_key_derivation_operation_s psa_key_derivation_operation_init(void)
Return an initial value for a key derivation operation object.
#define PSA_AEAD_OPERATION_INIT
This macro returns a suitable initializer for an AEAD operation object of type psa_aead_operation_t.
Type definitions for PSA Crypto.
uint32_t psa_key_id_t
Key identifier.
uint16_t psa_key_bits_t
Public interfaces use size_t, but internally we use a smaller type.
uint16_t psa_key_type_t
Encoding of a key type.
uint32_t psa_key_lifetime_t
Encoding of key lifetimes.
uint32_t psa_key_usage_t
Encoding of permitted usage on a key.
uint32_t psa_algorithm_t
Encoding of a cryptographic algorithm.
Structure storing an AEAD operation context.
int dummy
Not implemented, yet.
Structure storing a cipher operation context.
uint8_t iv_required
True if algorithm requires IV.
psa_algorithm_t alg
Operation algorithm.
uint8_t default_iv_length
Default IV length for algorithm.
union psa_cipher_operation_s::cipher_context backend_ctx
Backend specific cipher context.
uint8_t iv_set
True if IV was already set.
Structure containing a hash context and algorithm.
psa_algorithm_t alg
Operation algorithm.
Structure storing key attributes.
psa_key_id_t id
Key identifier.
psa_key_bits_t bits
Size of key in bits.
psa_key_policy_t policy
Key usage policy.
psa_key_type_t type
Type of key.
psa_key_lifetime_t lifetime
Lifetime of key.
Structure storing a key derivation context.
int dummy
Not implemented yet.
Structure storing the key usage policies.
psa_key_usage_t usage
Key usage policy.
psa_algorithm_t alg
Algorithm for key usage.
Structure storing a MAC operation context.
int dummy
Not yet implemented.
Union containing cipher contexts for the executing backend.
psa_cipher_context_t cipher_ctx
Cipher context.
psa_se_cipher_context_t se_ctx
SE Cipher context.