mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-08-12 14:17:50 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user