aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhilippe Lieser <[email protected]>2019-11-21 17:41:39 +0100
committerPhilippe Lieser <[email protected]>2019-11-21 17:41:39 +0100
commit46238d5ab5e1cb2d16f8d4da6adfdf04c372c156 (patch)
tree29d395ee7ca11d8f113c36f53edd080fc3ca07d6 /src
parentb36dea33cb5c0552642a3ce0218b9bafd6f3e43b (diff)
Add ccm mode to BSI policy
Diffstat (limited to 'src')
-rw-r--r--src/build-data/policy/bsi.txt2
-rw-r--r--src/lib/modes/aead/ccm/ccm.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/build-data/policy/bsi.txt b/src/build-data/policy/bsi.txt
index a06e3cbfc..6fa3ee9a9 100644
--- a/src/build-data/policy/bsi.txt
+++ b/src/build-data/policy/bsi.txt
@@ -3,6 +3,7 @@
aes
# modes
+ccm
gcm
cbc
mode_pad
@@ -114,7 +115,6 @@ twofish
xtea
# modes
-ccm
chacha20poly1305
eax
ocb
diff --git a/src/lib/modes/aead/ccm/ccm.cpp b/src/lib/modes/aead/ccm/ccm.cpp
index 7a82f1a47..ab2cfcb95 100644
--- a/src/lib/modes/aead/ccm/ccm.cpp
+++ b/src/lib/modes/aead/ccm/ccm.cpp
@@ -118,7 +118,7 @@ void CCM_Mode::encode_length(uint64_t len, uint8_t out[])
{
const size_t len_bytes = L();
- BOTAN_ASSERT_NOMSG(len_bytes >= 1 && len_bytes <= 8);
+ BOTAN_ASSERT_NOMSG(len_bytes >= 2 && len_bytes <= 8);
for(size_t i = 0; i != len_bytes; ++i)
out[len_bytes-1-i] = get_byte(sizeof(uint64_t)-1-i, len);