diff options
Diffstat (limited to 'tests/test_utils.py')
-rw-r--r-- | tests/test_utils.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_utils.py b/tests/test_utils.py index a9bb6a87..3fe9e570 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -269,6 +269,20 @@ def test_load_cryptrec_vectors(): ] +def test_load_cryptrec_vectors_invalid(): + vector_data = textwrap.dedent(""" + # Vectors taken from http://info.isl.ntt.co.jp/crypt/eng/camellia/ + # Download is t_camelia.txt + + # Camellia with 128-bit key + + E No.001 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + """).splitlines() + + with pytest.raises(ValueError): + load_cryptrec_vectors(vector_data) + + def test_load_cryptrec_vectors_from_file_encrypt(): test_set = load_cryptrec_vectors_from_file( "Camellia/NTT/camellia-128-ecb.txt" |