Add note clarifying that output integrity for the chachpoly update is currently provided, though not gauranteed in the future

Signed-off-by: Ben Taylor <[email protected]>
(cherry picked from commit b70d73e6a7591f99a05e8b1c03f0b3915ae7cdff)
This commit is contained in:
Ben Taylor
2026-06-11 14:11:30 +01:00
parent 4ee90fe0e6
commit 757e75732d
@@ -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);