From 7095d47749cc043a9ac11966449fd72a2ae465e0 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Sat, 19 Mar 2022 10:49:43 +0100 Subject: [PATCH] Reject block cipher modes that are not implemented in Mbed TLS Mbed TLS doesn't support certain block cipher mode combinations. This limitation should probably be lifted, but for now, test them as unsupported. Signed-off-by: Gilles Peskine --- scripts/mbedtls_dev/crypto_knowledge.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/mbedtls_dev/crypto_knowledge.py b/scripts/mbedtls_dev/crypto_knowledge.py index 7d2e755f63..55eb54d596 100644 --- a/scripts/mbedtls_dev/crypto_knowledge.py +++ b/scripts/mbedtls_dev/crypto_knowledge.py @@ -230,6 +230,9 @@ class KeyType: alg.head in frozenset.union(BLOCK_MAC_MODES, BLOCK_CIPHER_MODES, BLOCK_AEAD_MODES): + if alg.head in ['CMAC', 'OFB'] and \ + self.head in ['ARIA', 'CAMELLIA']: + return False # not implemented in Mbed TLS return True if self.head == 'CHACHA20' and alg.head == 'CHACHA20_POLY1305': return True