Skip to content

Commit 3ab80ac

Browse files
committed
Fix test vectors
1 parent 6e9f2ba commit 3ab80ac

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_chacha20poly1305.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
def test_encrypt_decrypt():
3434
key = h2b("808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f")
35-
iv = h2b("07000000404142434445464748")
35+
iv = h2b("070000004041424344454647")
3636
aad = h2b("50515253c0c1c2c3c4c5c6c7")
3737
plaintext = h2b("4c616469657320616e642047656e746c656d656e206f662074686520636c617373206f66202739393a204966204920636f756c64206f6666657220796f75206f6e6c79206f6e652074697020666f7220746865206675747572652c2073756e73637265656e20776f756c642062652069742e")
3838
expected_ciphertext = h2b("d31a8d34648e60db7b86afbc53ef7ec2a4aded51296e08fea9e2b5a736ee62d63dbea45e8ca9671282fafb69da92728b1a71de0a9e060b2905d6a5b67ecd3b3692ddbd7f2d778b8c9803aee328091b58fab324e4fad675945585808b4831d7bc3ff4def08e4b7a9de576d26586cec64b6116")
@@ -70,7 +70,7 @@ def test_decrypt_invalid_tag_length():
7070

7171
def test_decrypt_bad_tag():
7272
key = h2b("808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f")
73-
iv = h2b("07000000404142434445464748")
73+
iv = h2b("070000004041424344454647")
7474
aad = h2b("50515253c0c1c2c3c4c5c6c7")
7575
plaintext = b"hello world"
7676

0 commit comments

Comments
 (0)