From 0faba4e8c5ba5b7dea33889861e6d3f761aa19aa Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 27 May 2021 11:55:02 +0200 Subject: [PATCH] More explicit names for some bad-workflow key derivation tests Signed-off-by: Gilles Peskine --- tests/suites/test_suite_psa_crypto.data | 12 ++++++------ tests/suites/test_suite_psa_crypto.function | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/suites/test_suite_psa_crypto.data b/tests/suites/test_suite_psa_crypto.data index 4d9c7b69bf..6b23e2fabd 100644 --- a/tests/suites/test_suite_psa_crypto.data +++ b/tests/suites/test_suite_psa_crypto.data @@ -2897,16 +2897,16 @@ PSA key derivation: ECDH on P256 with HKDF-SHA256, key output depends_on:PSA_WANT_ALG_ECDH:PSA_WANT_ALG_HKDF:PSA_WANT_ALG_SHA_256:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:MBEDTLS_PK_PARSE_C:PSA_WANT_ECC_SECP_R1_256 derive_input:PSA_ALG_KEY_AGREEMENT(PSA_ALG_ECDH, PSA_ALG_HKDF(PSA_ALG_SHA_256)):PSA_KEY_DERIVATION_INPUT_SALT:PSA_KEY_TYPE_NONE:"":PSA_SUCCESS:PSA_KEY_DERIVATION_INPUT_SECRET:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1):"c88f01f510d9ac3f70a292daa2316de544e9aab8afe84049c62a9c57862d1433":PSA_SUCCESS:PSA_KEY_DERIVATION_INPUT_INFO:PSA_KEY_TYPE_NONE:"":PSA_SUCCESS:PSA_KEY_TYPE_RAW_DATA:PSA_SUCCESS -PSA key derivation: HKDF invalid state (double generate + read past capacity) +PSA key derivation over capacity: HKDF depends_on:PSA_WANT_ALG_HKDF:PSA_WANT_ALG_SHA_256 -test_derive_invalid_key_derivation_state:PSA_ALG_HKDF(PSA_ALG_SHA_256) +derive_over_capacity:PSA_ALG_HKDF(PSA_ALG_SHA_256) -PSA key derivation: TLS 1.2 PRF invalid state (double generate + read past capacity) +PSA key derivation over capacity: TLS 1.2 PRF depends_on:PSA_WANT_ALG_SHA_256:PSA_WANT_ALG_TLS12_PRF -test_derive_invalid_key_derivation_state:PSA_ALG_TLS12_PRF(PSA_ALG_SHA_256) +derive_over_capacity:PSA_ALG_TLS12_PRF(PSA_ALG_SHA_256) -PSA key derivation: invalid state (call read/get_capacity after init and abort) -test_derive_invalid_key_derivation_tests: +PSA key derivation: actions without setup +derive_actions_without_setup: PSA key derivation: HKDF SHA-256, RFC5869 #1, output 42+0 depends_on:PSA_WANT_ALG_HKDF:PSA_WANT_ALG_SHA_256 diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function index 6689956580..663a8ea17e 100644 --- a/tests/suites/test_suite_psa_crypto.function +++ b/tests/suites/test_suite_psa_crypto.function @@ -4187,7 +4187,7 @@ exit: /* END_CASE */ /* BEGIN_CASE */ -void test_derive_invalid_key_derivation_state( int alg_arg ) +void derive_over_capacity( int alg_arg ) { psa_algorithm_t alg = alg_arg; mbedtls_svc_key_id_t key = MBEDTLS_SVC_KEY_ID_INIT; @@ -4238,7 +4238,7 @@ exit: /* END_CASE */ /* BEGIN_CASE */ -void test_derive_invalid_key_derivation_tests( ) +void derive_actions_without_setup( ) { uint8_t output_buffer[16]; size_t buffer_size = 16;