Fix test vectors
parent
6e9f2ba1dc
commit
3ab80ac113
|
|
@ -32,7 +32,7 @@ if _lib.CHACHA20_POLY1305_ENABLED:
|
|||
|
||||
def test_encrypt_decrypt():
|
||||
key = h2b("808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f")
|
||||
iv = h2b("07000000404142434445464748")
|
||||
iv = h2b("070000004041424344454647")
|
||||
aad = h2b("50515253c0c1c2c3c4c5c6c7")
|
||||
plaintext = h2b("4c616469657320616e642047656e746c656d656e206f662074686520636c617373206f66202739393a204966204920636f756c64206f6666657220796f75206f6e6c79206f6e652074697020666f7220746865206675747572652c2073756e73637265656e20776f756c642062652069742e")
|
||||
expected_ciphertext = h2b("d31a8d34648e60db7b86afbc53ef7ec2a4aded51296e08fea9e2b5a736ee62d63dbea45e8ca9671282fafb69da92728b1a71de0a9e060b2905d6a5b67ecd3b3692ddbd7f2d778b8c9803aee328091b58fab324e4fad675945585808b4831d7bc3ff4def08e4b7a9de576d26586cec64b6116")
|
||||
|
|
@ -70,7 +70,7 @@ if _lib.CHACHA20_POLY1305_ENABLED:
|
|||
|
||||
def test_decrypt_bad_tag():
|
||||
key = h2b("808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f")
|
||||
iv = h2b("07000000404142434445464748")
|
||||
iv = h2b("070000004041424344454647")
|
||||
aad = h2b("50515253c0c1c2c3c4c5c6c7")
|
||||
plaintext = b"hello world"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue