33 #ifndef PSA_CRYPTO_DRIVER_CONTEXTS_PRIMITIVES_H
34 #define PSA_CRYPTO_DRIVER_CONTEXTS_PRIMITIVES_H
44 #if defined(MBEDTLS_TEST_LIBTESTDRIVER1)
45 #include <libtestdriver1/include/psa/crypto.h>
48 #if defined(PSA_CRYPTO_DRIVER_TEST)
50 #if defined(MBEDTLS_TEST_LIBTESTDRIVER1) && \
51 defined(LIBTESTDRIVER1_MBEDTLS_PSA_BUILTIN_CIPHER)
52 typedef libtestdriver1_mbedtls_psa_cipher_operation_t
53 mbedtls_transparent_test_driver_cipher_operation_t;
55 #define MBEDTLS_TRANSPARENT_TEST_DRIVER_CIPHER_OPERATION_INIT \
56 LIBTESTDRIVER1_MBEDTLS_PSA_CIPHER_OPERATION_INIT
59 mbedtls_transparent_test_driver_cipher_operation_t;
61 #define MBEDTLS_TRANSPARENT_TEST_DRIVER_CIPHER_OPERATION_INIT \
62 MBEDTLS_PSA_CIPHER_OPERATION_INIT
66 #if defined(MBEDTLS_TEST_LIBTESTDRIVER1) && \
67 defined(LIBTESTDRIVER1_MBEDTLS_PSA_BUILTIN_HASH)
68 typedef libtestdriver1_mbedtls_psa_hash_operation_t
69 mbedtls_transparent_test_driver_hash_operation_t;
71 #define MBEDTLS_TRANSPARENT_TEST_DRIVER_HASH_OPERATION_INIT \
72 LIBTESTDRIVER1_MBEDTLS_PSA_HASH_OPERATION_INIT
75 mbedtls_transparent_test_driver_hash_operation_t;
77 #define MBEDTLS_TRANSPARENT_TEST_DRIVER_HASH_OPERATION_INIT \
78 MBEDTLS_PSA_HASH_OPERATION_INIT
83 unsigned int initialised : 1;
84 mbedtls_transparent_test_driver_cipher_operation_t ctx;
85 } mbedtls_opaque_test_driver_cipher_operation_t;
87 #define MBEDTLS_OPAQUE_TEST_DRIVER_CIPHER_OPERATION_INIT \
88 { 0, MBEDTLS_TRANSPARENT_TEST_DRIVER_CIPHER_OPERATION_INIT }
102 #if defined(PSA_CRYPTO_DRIVER_TEST)
103 mbedtls_transparent_test_driver_hash_operation_t test_driver_ctx;
110 #if defined(PSA_CRYPTO_DRIVER_TEST)
111 mbedtls_transparent_test_driver_cipher_operation_t transparent_test_driver_ctx;
112 mbedtls_opaque_test_driver_cipher_operation_t opaque_test_driver_ctx;
mbedtls_psa_cipher_operation_t mbedtls_ctx
mbedtls_psa_hash_operation_t mbedtls_ctx
Definitions for all PSA crypto drivers.