diff options
author | Jack Lloyd <[email protected]> | 2016-11-26 20:44:29 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-11-26 20:44:29 -0500 |
commit | 0760582e79851bedffd19f4c53f06c419f71af40 (patch) | |
tree | d895219c602a29f9891aa7a6add88d4b080929dc /src/lib/modes/aead | |
parent | d39ab970c380154a33e5adec6f76e66c182b3d4f (diff) |
Correct output_length bug in SIV and ChaCha20Poly1305 also
Diffstat (limited to 'src/lib/modes/aead')
-rw-r--r-- | src/lib/modes/aead/chacha20poly1305/chacha20poly1305.h | 2 | ||||
-rw-r--r-- | src/lib/modes/aead/siv/siv.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/modes/aead/chacha20poly1305/chacha20poly1305.h b/src/lib/modes/aead/chacha20poly1305/chacha20poly1305.h index f58bd48ac..58328ac5b 100644 --- a/src/lib/modes/aead/chacha20poly1305/chacha20poly1305.h +++ b/src/lib/modes/aead/chacha20poly1305/chacha20poly1305.h @@ -83,7 +83,7 @@ class BOTAN_DLL ChaCha20Poly1305_Decryption final : public ChaCha20Poly1305_Mode public: size_t output_length(size_t input_length) const override { - BOTAN_ASSERT(input_length > tag_size(), "Sufficient input"); + BOTAN_ASSERT(input_length >= tag_size(), "Sufficient input"); return input_length - tag_size(); } diff --git a/src/lib/modes/aead/siv/siv.h b/src/lib/modes/aead/siv/siv.h index 71990ef96..711d9e30c 100644 --- a/src/lib/modes/aead/siv/siv.h +++ b/src/lib/modes/aead/siv/siv.h @@ -107,7 +107,7 @@ class BOTAN_DLL SIV_Decryption final : public SIV_Mode size_t output_length(size_t input_length) const override { - BOTAN_ASSERT(input_length > tag_size(), "Sufficient input"); + BOTAN_ASSERT(input_length >= tag_size(), "Sufficient input"); return input_length - tag_size(); } |