20#ifndef PSA_CRYPTO_PSA_CRYPTO_CONTEXTS_H
21#define PSA_CRYPTO_PSA_CRYPTO_CONTEXTS_H
29#include "psa/crypto_includes.h"
32#if IS_USED(MODULE_PSA_HASH)
37#if IS_USED(MODULE_PSA_HASH_MD5) || defined(DOXYGEN)
38 psa_hashes_md5_ctx_t
md5;
40#if IS_USED(MODULE_PSA_HASH_SHA_1) || defined(DOXYGEN)
43#if IS_USED(MODULE_PSA_HASH_SHA_224) || defined(DOXYGEN)
46#if IS_USED(MODULE_PSA_HASH_SHA_256) || defined(DOXYGEN)
49#if IS_USED(MODULE_PSA_HASH_SHA_384) || defined(DOXYGEN)
50 psa_hashes_sha384_ctx_t
sha384;
52#if IS_USED(MODULE_PSA_HASH_SHA_512) || defined(DOXYGEN)
55#if IS_USED(MODULE_PSA_HASH_SHA3_256) || IS_USED(MODULE_PSA_HASH_SHA3_384) \
56|| IS_USED(MODULE_PSA_HASH_SHA3_512) || defined(DOXYGEN)
57 psa_hashes_sha3_ctx_t sha3;
59#if IS_USED(MODULE_PSA_HASH_SHA_512_224) || defined(DOXYGEN)
62#if IS_USED(MODULE_PSA_HASH_SHA_512_256) || defined(DOXYGEN)
68#if IS_USED(MODULE_PSA_CIPHER)
73#if IS_USED(MODULE_PSA_CIPHER_AES_128_ECB) ||\
74 IS_USED(MODULE_PSA_CIPHER_AES_128_CBC) ||\
78#if IS_USED(MODULE_PSA_CIPHER_AES_192_CBC) || defined(DOXYGEN)
79 psa_cipher_aes_192_ctx_t aes_192;
81#if IS_USED(MODULE_PSA_CIPHER_AES_256_CBC) || defined(DOXYGEN)
82 psa_cipher_aes_256_ctx_t aes_256;
84} psa_cipher_context_t;
87#if IS_USED(MODULE_PSA_SECURE_ELEMENT)
95 union driver_context {
97 #if IS_USED(MODULE_PSA_SECURE_ELEMENT_ATECCX08A) || defined(DOXYGEN)
98 atca_aes_cbc_ctx_t atca_aes_cbc;
101} psa_se_cipher_context_t;
psa_encrypt_or_decrypt_t
For encrypt-decrypt functions, whether the operation is an encryption or a decryption.
void md5(void *digest, const void *data, size_t len)
Calculate a MD5 hash from the given data.
void sha1(void *digest, const void *data, size_t len)
Calculate a SHA1 hash from the given data.
void sha224(const void *data, size_t len, void *digest)
A wrapper function to simplify the generation of a hash, this is useful for generating sha224 for one...
void sha256(const void *data, size_t len, void *digest)
A wrapper function to simplify the generation of a hash, this is useful for generating sha256 for one...
void sha384(const void *data, size_t len, void *digest)
A wrapper function to simplify the generation of a hash.
void sha512_224(const void *data, size_t len, void *digest)
A wrapper function to simplify the generation of a hash.
void sha512_256(const void *data, size_t len, void *digest)
A wrapper function to simplify the generation of a hash.
void sha512(const void *data, size_t len, void *digest)
A wrapper function to simplify the generation of a hash.
Common macros and compiler attributes/pragmas configuration.
SaSiAesUserContext_t psa_cipher_aes_128_ctx_t
Map driver specific AES context to PSA context.
CRYS_HASHUserContext_t psa_hashes_sha224_ctx_t
Map driver specific SHA224 context to PSA context.
CRYS_HASHUserContext_t psa_hashes_sha256_ctx_t
Map driver specific SHA256 context to PSA context.
CRYS_HASHUserContext_t psa_hashes_sha512_ctx_t
Map driver specific SHA512 context to PSA context.
CRYS_HASHUserContext_t psa_hashes_sha1_ctx_t
Map driver specific SHA1 context to PSA context.