From 11cf965026bff5763f5a425719daa82053cdd8e6 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Wed, 12 Mar 2025 01:09:42 +0100 Subject: Allow 256-bit nonces even if is not useful --- internal/cryptocore/cryptocore.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cryptocore/cryptocore.go b/internal/cryptocore/cryptocore.go index 93fbe91..60a0ce3 100644 --- a/internal/cryptocore/cryptocore.go +++ b/internal/cryptocore/cryptocore.go @@ -92,7 +92,7 @@ func New(key []byte, aeadType AEADTypeEnum, IVBitLen int, useHKDF bool) *CryptoC if len(key) != KeyLen { log.Panicf("Unsupported key length of %d bytes", len(key)) } - if IVBitLen != 96 && IVBitLen != 128 && IVBitLen != chacha20poly1305.NonceSizeX*8 { + if IVBitLen != 96 && IVBitLen != 128 && IVBitLen != chacha20poly1305.NonceSizeX*8 && IVBitLen != aegis256x2.NonceSize*8 { log.Panicf("Unsupported IV length of %d bits", IVBitLen) } -- cgit v1.2.3