commit | 1465602ee14779f4a21b87ec81aebcabf47fbcac | [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 24 13:37:31 2018 +0200 |
tree | f3bfad452325731fdf9c8f99184551cf270e3443 | |
parent | 55c0d096b7747b89394be4063d2d35275aa0ced7 [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 ); }