mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
crypto: Don't assert on valid IV length for Chacha20-Poly1305.
The assertion checking for valid IV lengths added in1833d6042cwas not properly updated to permit an IV length of 8 in commit42dcd39528. Reported by: syzbot+f0c0559b8be1d6eb28c7@syzkaller.appspotmail.com Reviewed by: markj Fixes:42dcd39528crypto: Support Chacha20-Poly1305 with a nonce size of 8 bytes. MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32860
This commit is contained in:
parent
e3ba94d4f3
commit
442ad83e38
1 changed files with 1 additions and 1 deletions
|
|
@ -55,7 +55,7 @@ chacha20_poly1305_reinit(void *vctx, const uint8_t *iv, size_t ivlen)
|
|||
{
|
||||
struct chacha20_poly1305_cipher_ctx *ctx = vctx;
|
||||
|
||||
KASSERT(ivlen == sizeof(ctx->nonce),
|
||||
KASSERT(ivlen == 8 || ivlen == sizeof(ctx->nonce),
|
||||
("%s: invalid nonce length", __func__));
|
||||
|
||||
/* Block 0 is used for the poly1305 key. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue