aboutsummaryrefslogtreecommitdiffstats
path: root/tests/primitives/test_nist.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-10-16 14:16:04 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2013-10-16 14:16:04 -0700
commit016eed1cc1cc26ff404ac31ed3858de362ca37f2 (patch)
treedc7f2ceaa1f2ba58b3313c9f59f2ec1ae08d9b68 /tests/primitives/test_nist.py
parentbd458ae1e3bdd48f74437216ac467ab2e4d68b13 (diff)
downloadcryptography-016eed1cc1cc26ff404ac31ed3858de362ca37f2.tar.gz
cryptography-016eed1cc1cc26ff404ac31ed3858de362ca37f2.tar.bz2
cryptography-016eed1cc1cc26ff404ac31ed3858de362ca37f2.zip
Ported openssl vector tests
Diffstat (limited to 'tests/primitives/test_nist.py')
-rw-r--r--tests/primitives/test_nist.py25
1 files changed, 9 insertions, 16 deletions
diff --git a/tests/primitives/test_nist.py b/tests/primitives/test_nist.py
index 0c9569f1..e7778f1f 100644
--- a/tests/primitives/test_nist.py
+++ b/tests/primitives/test_nist.py
@@ -18,6 +18,7 @@ Test using the NIST Test Vectors
from __future__ import absolute_import, division, print_function
import binascii
+import os
from cryptography.primitives.block import ciphers, modes
@@ -28,8 +29,7 @@ from ..utils import load_nist_vectors_from_file
class TestAES_CBC(object):
test_KAT = generate_encrypt_test(
lambda path: load_nist_vectors_from_file(path, "ENCRYPT"),
- "AES",
- "KAT",
+ os.path.join("AES", "KAT"),
[
"CBCGFSbox128.rsp",
"CBCGFSbox192.rsp",
@@ -50,8 +50,7 @@ class TestAES_CBC(object):
test_MMT = generate_encrypt_test(
lambda path: load_nist_vectors_from_file(path, "ENCRYPT"),
- "AES",
- "MMT",
+ os.path.join("AES", "MMT"),
[
"CBCMMT128.rsp",
"CBCMMT192.rsp",
@@ -65,8 +64,7 @@ class TestAES_CBC(object):
class TestAES_ECB(object):
test_KAT = generate_encrypt_test(
lambda path: load_nist_vectors_from_file(path, "ENCRYPT"),
- "AES",
- "KAT",
+ os.path.join("AES", "KAT"),
[
"ECBGFSbox128.rsp",
"ECBGFSbox192.rsp",
@@ -87,8 +85,7 @@ class TestAES_ECB(object):
test_MMT = generate_encrypt_test(
lambda path: load_nist_vectors_from_file(path, "ENCRYPT"),
- "AES",
- "MMT",
+ os.path.join("AES", "MMT"),
[
"ECBMMT128.rsp",
"ECBMMT192.rsp",
@@ -102,8 +99,7 @@ class TestAES_ECB(object):
class TestAES_OFB(object):
test_KAT = generate_encrypt_test(
lambda path: load_nist_vectors_from_file(path, "ENCRYPT"),
- "AES",
- "KAT",
+ os.path.join("AES", "KAT"),
[
"OFBGFSbox128.rsp",
"OFBGFSbox192.rsp",
@@ -124,8 +120,7 @@ class TestAES_OFB(object):
test_MMT = generate_encrypt_test(
lambda path: load_nist_vectors_from_file(path, "ENCRYPT"),
- "AES",
- "MMT",
+ os.path.join("AES", "MMT"),
[
"OFBMMT128.rsp",
"OFBMMT192.rsp",
@@ -139,8 +134,7 @@ class TestAES_OFB(object):
class TestAES_CFB(object):
test_KAT = generate_encrypt_test(
lambda path: load_nist_vectors_from_file(path, "ENCRYPT"),
- "AES",
- "KAT",
+ os.path.join("AES", "KAT"),
[
"CFB128GFSbox128.rsp",
"CFB128GFSbox192.rsp",
@@ -162,8 +156,7 @@ class TestAES_CFB(object):
test_MMT = generate_encrypt_test(
lambda path: load_nist_vectors_from_file(path, "ENCRYPT"),
- "AES",
- "MMT",
+ os.path.join("AES", "MMT"),
[
"CFB128MMT128.rsp",
"CFB128MMT192.rsp",