diff options
-rwxr-xr-x | aes_keywrap.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/aes_keywrap.py b/aes_keywrap.py index a026518..382c310 100755 --- a/aes_keywrap.py +++ b/aes_keywrap.py @@ -210,4 +210,12 @@ if __name__ == "__main__": def test_loopback_9(self): self.loopback_test("Hello! My name is Inigo Montoya. You killed my AES key wrapper. Prepare to die.") + def test_joachim_loopback(self): + from os import urandom + I = "31:32:33" + K = AESKeyWrapWithPadding(urandom(256/8)) + C = K.wrap_key(I) + O = K.unwrap_key(C) + self.assertEqual(I, O, "Input and output plaintext did not match: {!r} <> {!r}".format(I, O)) + unittest.main(verbosity = 9) |