28 #include "psa/crypto_includes.h"
30 #if IS_USED(MODULE_PSA_HASH)
35 #if IS_USED(MODULE_PSA_HASH_MD5) || defined(DOXYGEN)
36 psa_hashes_md5_ctx_t
md5;
38 #if IS_USED(MODULE_PSA_HASH_SHA_1) || defined(DOXYGEN)
41 #if IS_USED(MODULE_PSA_HASH_SHA_224) || defined(DOXYGEN)
44 #if IS_USED(MODULE_PSA_HASH_SHA_256) || defined(DOXYGEN)
47 #if IS_USED(MODULE_PSA_HASH_SHA_384) || defined(DOXYGEN)
48 psa_hashes_sha384_ctx_t
sha384;
50 #if IS_USED(MODULE_PSA_HASH_SHA_512) || defined(DOXYGEN)
53 #if IS_USED(MODULE_PSA_HASH_SHA3_256) || IS_USED(MODULE_PSA_HASH_SHA3_384) \
54 || IS_USED(MODULE_PSA_HASH_SHA3_512) || defined(DOXYGEN)
55 psa_hashes_sha3_ctx_t sha3;
57 #if IS_USED(MODULE_PSA_HASH_SHA_512_224) || defined(DOXYGEN)
60 #if IS_USED(MODULE_PSA_HASH_SHA_512_256) || defined(DOXYGEN)
66 #if IS_USED(MODULE_PSA_CIPHER)
71 #if IS_USED(MODULE_PSA_CIPHER_AES_128_ECB) ||\
72 IS_USED(MODULE_PSA_CIPHER_AES_128_CBC) ||\
76 #if IS_USED(MODULE_PSA_CIPHER_AES_192_CBC) || defined(DOXYGEN)
77 psa_cipher_aes_192_ctx_t aes_192;
79 #if IS_USED(MODULE_PSA_CIPHER_AES_256_CBC) || defined(DOXYGEN)
80 psa_cipher_aes_256_ctx_t aes_256;
82 } psa_cipher_context_t;
85 #if IS_USED(MODULE_PSA_SECURE_ELEMENT)
93 union driver_context {
95 #if IS_USED(MODULE_PSA_SECURE_ELEMENT_ATECCX08A) || defined(DOXYGEN)
96 atca_aes_cbc_ctx_t atca_aes_cbc;
99 } 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.