/* * Context structure declaration of the Mbed TLS software-based PSA drivers * called through the PSA Crypto driver dispatch layer. * This file contains the context structures of those algorithms which need to * rely on other algorithms, i.e. are 'composite' algorithms. * * \note This file may not be included directly. Applications must * include psa/crypto.h. * * \note This header and its content is not part of the Mbed TLS API and * applications must not depend on it. Its main purpose is to define the * multi-part state objects of the Mbed TLS software-based PSA drivers. The * definition of these objects are then used by crypto_struct.h to define the * implementation-defined types of PSA multi-part state objects. *//* ... *//* * Copyright The Mbed TLS Contributors * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later *//* ... */#ifndefPSA_CRYPTO_BUILTIN_COMPOSITES_H#definePSA_CRYPTO_BUILTIN_COMPOSITES_H#include<psa/crypto_driver_common.h>/* * MAC multi-part operation definitions. *//* ... */#ifdefined(MBEDTLS_PSA_BUILTIN_ALG_CMAC)||\defined(MBEDTLS_PSA_BUILTIN_ALG_HMAC)#defineMBEDTLS_PSA_BUILTIN_MAC#endif#ifdefined(MBEDTLS_PSA_BUILTIN_ALG_GCM)||\defined(MBEDTLS_PSA_BUILTIN_ALG_CCM)||\defined(MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305)#defineMBEDTLS_PSA_BUILTIN_AEAD1#endif#ifdefined(MBEDTLS_PSA_BUILTIN_ALG_HMAC)||defined(PSA_CRYPTO_DRIVER_TEST)typedefstruct{/** The HMAC algorithm in use */psa_algorithm_talg;/** The hash context. */structpsa_hash_operation_shash_ctx;/** The HMAC part of the context. */uint8_topad[PSA_HMAC_MAX_HASH_BLOCK_SIZE];...}mbedtls_psa_hmac_operation_t;#defineMBEDTLS_PSA_HMAC_OPERATION_INIT{0,PSA_HASH_OPERATION_INIT,{0}}/* ... */#endif/* MBEDTLS_PSA_BUILTIN_ALG_HMAC */#include"mbedtls/cmac.h"typedefstruct{psa_algorithm_talg;union{unsigneddummy;/* Make the union non-empty even with no supported algorithms. */#ifdefined(MBEDTLS_PSA_BUILTIN_ALG_HMAC)||defined(PSA_CRYPTO_DRIVER_TEST)mbedtls_psa_hmac_operation_thmac;#endif/* MBEDTLS_PSA_BUILTIN_ALG_HMAC */#ifdefined(MBEDTLS_PSA_BUILTIN_ALG_CMAC)||defined(PSA_CRYPTO_DRIVER_TEST)mbedtls_cipher_context_tcmac;#endif/* MBEDTLS_PSA_BUILTIN_ALG_CMAC */...}ctx;...}mbedtls_psa_mac_operation_t;#defineMBEDTLS_PSA_MAC_OPERATION_INIT{0,{0}}/* ... */#endif/* PSA_CRYPTO_BUILTIN_COMPOSITES_H */
Details
Show: from
Types: Columns:
All items filtered out
All items filtered out
This file uses the notable symbols shown below. Click anywhere in the file to view more details.