1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-01 10:06:53 +03:00

poly1305: fix bug in starts() and add test for it

This commit is contained in:
Manuel Pégourié-Gonnard
2018-05-09 12:51:54 +02:00
parent 55c0d096b7
commit 1465602ee1
3 changed files with 44 additions and 3 deletions

View File

@ -280,6 +280,11 @@ int mbedtls_poly1305_starts( mbedtls_poly1305_context *ctx,
ctx->acc[1] = 0U;
ctx->acc[2] = 0U;
ctx->acc[3] = 0U;
ctx->acc[4] = 0U;
/* Queue initially empty */
mbedtls_zeroize( ctx->queue, sizeof( ctx->queue ) );
ctx->queue_len = 0U;
return( 0 );
}