8 #ifndef __CRYPTO_TESTS_COMMON_H__
9 #define __CRYPTO_TESTS_COMMON_H__
22 #define BIT_SIZE_TEST_KEY (128)
28 #define BIT_SIZE_TEST_LONG_KEY (256)
34 #define BYTE_SIZE_TEST_KEY (BIT_SIZE_TEST_KEY/8)
40 #define BYTE_SIZE_CHUNK (16)
46 #define ENC_DEC_BUFFER_SIZE (32)
53 #define ASSOCIATED_DATA_SIZE (24)
59 #define TEST_MAX_KEY_LENGTH (64)
64 #define TRUNCATED_AUTH_TAG_LEN (8)
97 const size_t key_size,
137 uint8_t use_long_key,
void psa_unsupported_hash_test(const psa_algorithm_t alg, struct test_result_t *ret)
Tests setup of an unsupported hash algorithm.
Platform Security Architecture cryptography module.
void psa_invalid_cipher_test(const psa_key_type_t key_type, const psa_algorithm_t alg, const size_t key_size, struct test_result_t *ret)
Tests invalid key type and algorithm combinations for block ciphers.
void psa_aead_test(const psa_key_type_t key_type, const psa_algorithm_t alg, struct test_result_t *ret)
Run AEAD tests with different algorithms and key types.
void psa_mac_test(const psa_algorithm_t alg, uint8_t use_long_key, struct test_result_t *ret)
Tests different MAC algorithms.
void psa_invalid_key_length_test(struct test_result_t *ret)
Tests invalid key length.
uint32_t psa_algorithm_t
Encoding of a cryptographic algorithm.
void psa_cipher_test(const psa_key_type_t key_type, const psa_algorithm_t alg, struct test_result_t *ret)
Run block ciphering tests with different algorithms and key types.
void psa_hash_test(const psa_algorithm_t alg, struct test_result_t *ret)
Tests different hashing algorithms.
uint16_t psa_key_type_t
Encoding of a key type.
void psa_key_derivation_test(psa_algorithm_t deriv_alg, struct test_result_t *ret)
Key derivation test.
void psa_key_interface_test(const psa_key_type_t key_type, struct test_result_t *ret)
Tests the key interfaces with different key types.
void psa_policy_invalid_policy_usage_test(struct test_result_t *ret)
Tests invalid policy usage.
void psa_policy_key_interface_test(struct test_result_t *ret)
Tests the policy key interface.
void psa_unsupported_mac_test(const psa_key_type_t key_type, const psa_algorithm_t alg, struct test_result_t *ret)
Tests setup of an unsupported MAC algorithm.
void psa_persistent_key_test(psa_key_id_t key_id, struct test_result_t *ret)
Tests persistent keys.