commit | 97e34bf2f2fc29963b9d9b867f63fa5555a61db6 | [log] [tgz] |
---|---|---|
author | Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com> | Wed May 09 12:51:54 2018 +0200 |
committer | Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com> | Thu May 10 13:23:02 2018 +0200 |
tree | 607f44c1632268c9d5b5bca28d2f7bf8c56efa78 | |
parent | b60045aacb1b365cd1d6d4e3e0c022bd36ff0642 [diff] [blame] |
poly1305: fix bug in starts() and add test for it
diff --git a/library/poly1305.c b/library/poly1305.c index 14c362d..542a850 100644 --- a/library/poly1305.c +++ b/library/poly1305.c
@@ -280,6 +280,11 @@ 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 ); }