aboutsummaryrefslogtreecommitdiffstats
path: root/tests/primitives/test_openssl_vectors.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/primitives/test_openssl_vectors.py')
-rw-r--r--tests/primitives/test_openssl_vectors.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/primitives/test_openssl_vectors.py b/tests/primitives/test_openssl_vectors.py
index 6e32eca6..5b2be784 100644
--- a/tests/primitives/test_openssl_vectors.py
+++ b/tests/primitives/test_openssl_vectors.py
@@ -59,3 +59,15 @@ class TestCamelliaCFB(object):
only_if=lambda api: api.supports_cipher("camellia-128-cfb"),
skip_message="Does not support Camellia CFB",
)
+
+
+class TestAESCTR(object):
+ test_OpenSSL = generate_encrypt_test(
+ load_openssl_vectors_from_file,
+ "AES",
+ ["aes-128-ctr.txt", "aes-192-ctr.txt", "aes-256-ctr.txt"],
+ lambda key, iv: ciphers.AES(binascii.unhexlify(key)),
+ lambda key, iv: modes.CTR(binascii.unhexlify(iv)),
+ only_if=lambda api: api.supports_cipher("aes-128-ctr"),
+ skip_message="Does not support AES CTR",
+ )