1 /* 2 * Copyright (c) 2021-2024, The TrustedFirmware-M Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 * 6 */ 7 8 #ifndef __CC3XX_H__ 9 #define __CC3XX_H__ 10 11 /** @file cc3xx.h 12 * 13 * This file includes each module of the cc3xx driver that complies with the 14 * PSA Cryptoprocessor Driver interface specification. the list of the 15 * available modules is: 16 * 17 * - Symmetric ciphers: cc3xx_psa_cipher.h 18 * - Access to TRNG for entropy extraction: cc3xx_psa_entropy.h 19 * - Hashing: cc3xx_psa_hash.h 20 * - MAC signing/verification: cc3xx_psa_mac.h 21 * - Authenticated Encryption w Assoc. Data: cc3xx_psa_aead.h 22 * - Raw key agreement: cc3xx_psa_key_agreement.h 23 * - Random key generation and key handling: cc3xx_psa_key_generation.h 24 * - Asymmetric signature schemes: cc3xx_psa_asymmetric_signature.h 25 * - Asymmetric encryption schemes: cc3xx_psa_asymmetric_encryption.h 26 * - Random generation: cc3xx_psa_random.h 27 * 28 * @note This file must be included by psa_crypto_driver_wrappers.c. The 29 * definition of the context types used in the implementation is provided 30 * through @ref cc3xx_crypto_primitives_private.h which is included, when 31 * @ref PSA_CRYPTO_DRIVER_CC3XX is defined, in turn by @ref psa/crypto.h, then 32 * psa/crypto_struct.h and finally by psa/crypto_driver_context_primitives.h 33 * and by psa/crypto_driver_context_composites.h from the mbedTLS sources. 34 */ 35 36 #ifdef __DOXYGEN_ONLY__ 37 /*! 38 * Enables the cc3xx driver in the PSA Driver Core layer. When this is 39 * defined, the \ref cc3xx_crypto_primitives_private.h type definitions are 40 * also visible through including \ref psa/crypto.h 41 */ 42 #define PSA_CRYPTO_DRIVER_CC3XX 43 44 /*! 45 * Enables the Random module to use the HASH_DRBG PRNG construction as 46 * described in SP800-90ar1. Note that the Random module can't support 47 * more than one DRBG construction at build time 48 */ 49 #define CC3XX_CONFIG_ENABLE_RANDOM_HASH_DRBG 50 51 /*! 52 * Enables the Random module to use the HMAC_DRBG PRNG construction as 53 * described in SP800-90ar1. Note that the Random module can't support 54 * more than one DRBG construction at build time 55 */ 56 #define CC3XX_CONFIG_ENABLE_RANDOM_HMAC_DRBG 57 58 /*! 59 * Enables the Random module to use the CTR_DRBG PRNG construction as 60 * described in SP800-90ar1. Note that the Random module can't support 61 * more than one DRBG construction at build time 62 */ 63 #define CC3XX_CONFIG_ENABLE_RANDOM_CTR_DRBG 64 65 /*! 66 * Enables the MAC module to perform the single-part API using a dedicated 67 * function that directly calls into the low layer API, instead of resorting 68 * to implementing it through the other PSA multipart APIs 69 */ 70 #define CC3XX_CONFIG_ENABLE_MAC_INTEGRATED_API 71 #endif /* __DOXYGEN_ONLY__ */ 72 73 #include "cc3xx_psa_init.h" 74 #include "cc3xx_psa_entropy.h" 75 #include "cc3xx_psa_hash.h" 76 #include "cc3xx_psa_random.h" 77 #include "cc3xx_psa_mac.h" 78 #include "cc3xx_psa_cipher.h" 79 #include "cc3xx_psa_asymmetric_encryption.h" 80 #include "cc3xx_psa_asymmetric_signature.h" 81 #include "cc3xx_psa_key_agreement.h" 82 #include "cc3xx_psa_key_generation.h" 83 #include "cc3xx_psa_aead.h" 84 85 #endif /* __CC3XX_H__ */ 86