From 51009d72970de6fe1a97a6a655031a24ba1f3532 Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Mon, 5 Sep 2022 17:59:54 +0200 Subject: [PATCH] Add comment in ecjpake_do_round() explaining input errors can be detected any time in the input sequence Signed-off-by: Neil Armstrong --- tests/suites/test_suite_psa_crypto.function | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function index c5a8cde6f..12d7a89fb 100644 --- a/tests/suites/test_suite_psa_crypto.function +++ b/tests/suites/test_suite_psa_crypto.function @@ -780,6 +780,14 @@ static int ecjpake_do_round( psa_algorithm_t alg, unsigned int primitive, expected_status = PSA_ERROR_DATA_INVALID; } + /* + * When injecting errors in inputs, the implementation is + * free to detect it right away of with a delay. + * This permits delaying the error until the end of the input + * sequence, if no error appears then, this will be treated + * as an error. + */ + if( client_input_first == 1 ) { /* Client first round Input */