Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:50

0001 /**
0002  * \file mbedtls/config_adjust_test_accelerators.h
0003  * \brief Declare the transparent test drivers as accelerators
0004  *
0005  * This is an internal header for test purposes only. Do not include it directly.
0006  *
0007  * The purpose of this header is to keep executing as long as necessary some
0008  * driver-only related unit test cases when running the test_psa_crypto_drivers
0009  * all.sh component (namely test cases in test_suite_block_cipher and
0010  * test_suite_md.psa). It is expected that as the 4.x work progress these test
0011  * cases will not be necessary anymore and:
0012  * . test_psa_crypto_drivers scope is restricted to running the
0013  *   test_suite_psa_crypto_driver_wrappers test suite: test of the dispatch to
0014  *   drivers and fallbacks.
0015  * . this file can be removed.
0016  *
0017  * This header is used as part of a build containing all the built-in drivers
0018  * and all the transparent test drivers as wrappers around the built-in
0019  * drivers. All the built-in drivers and the transparent test drivers are
0020  * included in the build by starting from a full configuration (config.py full)
0021  * and defining PSA_CRYPTO_DRIVER_TEST when building
0022  * (make CFLAGS="-DPSA_CRYPTO_DRIVER_TEST ...").
0023  *
0024  * The purpose of this header is to declare the transparent test drivers as
0025  * accelerators just after infering the built-in drivers
0026  * (config_adjust_legacy_from_psa.h). Not before the inclusion
0027  * of config_adjust_legacy_from_psa.h in the build_info.h sequence of header
0028  * inclusions as this would remove the built-in drivers. Just after to set up
0029  * properly the internal macros introduced as part of the driver only work
0030  * (mainly if not only in config_adjust_legacy_crypto.h).
0031  */
0032 /*
0033  *  Copyright The Mbed TLS Contributors
0034  *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
0035  */
0036 
0037 #ifndef MBEDTLS_CONFIG_ADJUST_TEST_ACCELERATORS_H
0038 #define MBEDTLS_CONFIG_ADJUST_TEST_ACCELERATORS_H
0039 
0040 #if !defined(TF_PSA_CRYPTO_CONFIG_FILES_READ)
0041 #error "Do not include mbedtls/config_adjust_*.h manually! This can lead to problems, " \
0042     "up to and including runtime errors such as buffer overflows. " \
0043     "If you're trying to fix a complaint from check_config.h, just remove " \
0044     "it from your configuration file: since Mbed TLS 3.0, it is included " \
0045     "automatically at the right point."
0046 #endif
0047 
0048 /* Declare the accelerator driver for all cryptographic mechanisms for which
0049  * the test driver is implemented. This is copied from psa/crypto_config.h
0050  * with the parts not implemented by the test driver commented out. */
0051 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_DERIVE //no-check-names
0052 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_PASSWORD //no-check-names
0053 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_PASSWORD_HASH //no-check-names
0054 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_HMAC //no-check-names
0055 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_AES
0056 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ARIA
0057 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_CAMELLIA
0058 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_CHACHA20
0059 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_PUBLIC_KEY
0060 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_BASIC
0061 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_IMPORT
0062 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_EXPORT
0063 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_GENERATE
0064 //#define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_DERIVE
0065 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_DH_PUBLIC_KEY
0066 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_DH_KEY_PAIR_BASIC
0067 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_DH_KEY_PAIR_IMPORT
0068 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_DH_KEY_PAIR_EXPORT
0069 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_DH_KEY_PAIR_GENERATE
0070 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_RAW_DATA //no-check-names
0071 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_BASIC
0072 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_IMPORT
0073 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_EXPORT
0074 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_GENERATE
0075 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_PUBLIC_KEY
0076 
0077 #define MBEDTLS_PSA_ACCEL_ALG_CBC_NO_PADDING
0078 #define MBEDTLS_PSA_ACCEL_ALG_CBC_PKCS7
0079 #define MBEDTLS_PSA_ACCEL_ALG_CCM
0080 #define MBEDTLS_PSA_ACCEL_ALG_CCM_STAR_NO_TAG
0081 #define MBEDTLS_PSA_ACCEL_ALG_CMAC
0082 #define MBEDTLS_PSA_ACCEL_ALG_CFB
0083 #define MBEDTLS_PSA_ACCEL_ALG_CHACHA20_POLY1305
0084 #define MBEDTLS_PSA_ACCEL_ALG_CTR
0085 #define MBEDTLS_PSA_ACCEL_ALG_DETERMINISTIC_ECDSA
0086 #define MBEDTLS_PSA_ACCEL_ALG_ECB_NO_PADDING
0087 #define MBEDTLS_PSA_ACCEL_ALG_ECDH
0088 #define MBEDTLS_PSA_ACCEL_ALG_FFDH
0089 #define MBEDTLS_PSA_ACCEL_ALG_ECDSA
0090 #define MBEDTLS_PSA_ACCEL_ALG_JPAKE
0091 #define MBEDTLS_PSA_ACCEL_ALG_GCM
0092 //#define MBEDTLS_PSA_ACCEL_ALG_HKDF
0093 //#define MBEDTLS_PSA_ACCEL_ALG_HKDF_EXTRACT
0094 //#define MBEDTLS_PSA_ACCEL_ALG_HKDF_EXPAND
0095 #define MBEDTLS_PSA_ACCEL_ALG_HMAC
0096 #define MBEDTLS_PSA_ACCEL_ALG_MD5
0097 #define MBEDTLS_PSA_ACCEL_ALG_OFB
0098 //#define MBEDTLS_PSA_ACCEL_ALG_PBKDF2_HMAC
0099 //#define MBEDTLS_PSA_ACCEL_ALG_PBKDF2_AES_CMAC_PRF_128
0100 #define MBEDTLS_PSA_ACCEL_ALG_RIPEMD160
0101 #define MBEDTLS_PSA_ACCEL_ALG_RSA_OAEP
0102 #define MBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_CRYPT
0103 #define MBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_SIGN
0104 #define MBEDTLS_PSA_ACCEL_ALG_RSA_PSS
0105 #define MBEDTLS_PSA_ACCEL_ALG_SHA_1
0106 #define MBEDTLS_PSA_ACCEL_ALG_SHA_224
0107 #define MBEDTLS_PSA_ACCEL_ALG_SHA_256
0108 #define MBEDTLS_PSA_ACCEL_ALG_SHA_384
0109 #define MBEDTLS_PSA_ACCEL_ALG_SHA_512
0110 #define MBEDTLS_PSA_ACCEL_ALG_SHA3_224
0111 #define MBEDTLS_PSA_ACCEL_ALG_SHA3_256
0112 #define MBEDTLS_PSA_ACCEL_ALG_SHA3_384
0113 #define MBEDTLS_PSA_ACCEL_ALG_SHA3_512
0114 #define MBEDTLS_PSA_ACCEL_ALG_STREAM_CIPHER
0115 //#define MBEDTLS_PSA_ACCEL_ALG_TLS12_PRF
0116 //#define MBEDTLS_PSA_ACCEL_ALG_TLS12_PSK_TO_MS
0117 //#define MBEDTLS_PSA_ACCEL_ALG_TLS12_ECJPAKE_TO_PMS
0118 
0119 #endif /* MBEDTLS_CONFIG_ADJUST_TEST_ACCELERATORS_H */