diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-10-21 17:04:40 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-10-21 17:04:40 -0700 |
commit | 804e98193659ec33e6433e8f4587c99d91a0ea09 (patch) | |
tree | e2d999f0455aeee2f66f9e0c0ca8fa53f5b16fdb | |
parent | 58dbc672b2ac5529240ba4cf792800686b51af80 (diff) | |
download | cryptography-804e98193659ec33e6433e8f4587c99d91a0ea09.tar.gz cryptography-804e98193659ec33e6433e8f4587c99d91a0ea09.tar.bz2 cryptography-804e98193659ec33e6433e8f4587c99d91a0ea09.zip |
KAT tests for 3des ofb
-rw-r--r-- | tests/primitives/test_nist.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/primitives/test_nist.py b/tests/primitives/test_nist.py index abd04b6d..eb0091b6 100644 --- a/tests/primitives/test_nist.py +++ b/tests/primitives/test_nist.py @@ -243,6 +243,30 @@ class TestTripleDES_CBC(object): class TestTripleDES_OFB(object): + test_KAT1 = generate_encrypt_test( + lambda path: load_nist_vectors_from_file(path, "ENCRYPT"), + os.path.join("3DES", "KAT"), + [ + "tests/primitives/vectors/NIST/3DES/KAT/TOFBpermop.rsp", + "tests/primitives/vectors/NIST/3DES/KAT/TOFBsubtab.rsp", + "tests/primitives/vectors/NIST/3DES/KAT/TOFBvarkey.rsp", + "tests/primitives/vectors/NIST/3DES/KAT/TOFBvartext.rsp", + "tests/primitives/vectors/NIST/3DES/KAT/TOFBinvperm.rsp", + ], + ) + + test_KAT2 = generate_encrypt_test( + lambda path: load_nist_vectors_from_file(path, "ENCRYPT"), + os.path.join("3DES", "KAT"), + [ + "tests/primitives/vectors/NIST/3DES/KAT/TOFBIinvperm.rsp", + "tests/primitives/vectors/NIST/3DES/KAT/TOFBIpermop.rsp", + "tests/primitives/vectors/NIST/3DES/KAT/TOFBIsubtab.rsp", + "tests/primitives/vectors/NIST/3DES/KAT/TOFBIvarkey.rsp", + "tests/primitives/vectors/NIST/3DES/KAT/TOFBIvartext.rsp", + ], + ) + test_MMT1 = generate_encrypt_test( lambda path: load_nist_vectors_from_file(path, "ENCRYPT"), os.path.join("3DES", "MMT"), |