From 757e75732d7e6285d0b8f360e3897c6b9a63e5ef Mon Sep 17 00:00:00 2001 From: Ben Taylor Date: Thu, 11 Jun 2026 07:51:42 +0100 Subject: [PATCH] Add note clarifying that output integrity for the chachpoly update is currently provided, though not gauranteed in the future Signed-off-by: Ben Taylor (cherry picked from commit b70d73e6a7591f99a05e8b1c03f0b3915ae7cdff) --- tests/suites/test_suite_chachapoly.function | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/suites/test_suite_chachapoly.function b/tests/suites/test_suite_chachapoly.function index 670160b2fd..294faa1fcf 100644 --- a/tests/suites/test_suite_chachapoly.function +++ b/tests/suites/test_suite_chachapoly.function @@ -94,6 +94,9 @@ void chachapoly_update_too_long() /* Force the next update to be too long without processing a huge buffer. */ ctx.chacha20_ctx.state[12] = UINT32_MAX; + /* Test that the failed update does not modify the output. This is a + * defense in depth assertion, however is not currently gauranteed by + * the API */ memset(output, 0x2a, sizeof(output)); TEST_EQUAL(mbedtls_chachapoly_update(&ctx, sizeof(input), input, output), MBEDTLS_ERR_CHACHA20_BAD_INPUT_DATA);