public void AESCBC128Test() { var aes = new AESCipher(128); aes.Init(new KeyParameter(HexConverter.FromHex("2b7e151628aed2a6abf7158809cf4f3c"))); var tests = new[] { new[] { "000102030405060708090a0b0c0d0e0f", "6bc1bee22e409f96e93d7e117393172a6bc1bee22e409f96e93d7e117393172a", "7649abac8119b246cee98e9b12e9197d4cbbc858756b358125529e9698a38f44"}, }; RunTests(tests, aes); }
public void TestAES192() { var tests = new[] { new [] { "6bc1bee22e409f96e93d7e117393172a", "bd334f1d6e45f25ff712a214571fa5cc" }, new [] { "ae2d8a571e03ac9c9eb76fac45af8e51", "974104846d0ad3ad7734ecb3ecee4eef" }, new [] { "30c81c46a35ce411e5fbc1191a0a52ef", "ef7afd2270e2e60adce0ba2face6444e" }, new [] { "f69f2445df4f9b17ad2b417be66c3710", "9a4b41ba738d6c72fb16691603c18e0e" }, }; var aes = new AESCipher(192); aes.Init(new KeyParameter(HexConverter.FromHex("8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b"))); RunAESTests(tests, aes); }
public void TestAES256() { var tests = new[] { new [] { "6bc1bee22e409f96e93d7e117393172a", "f3eed1bdb5d2a03c064b5a7e3db181f8" }, new [] { "ae2d8a571e03ac9c9eb76fac45af8e51", "591ccb10d410ed26dc5ba74a31362870" }, new [] { "30c81c46a35ce411e5fbc1191a0a52ef", "b6ed21b99ca6f4f9f153e7b1beafed1d" }, new [] { "f69f2445df4f9b17ad2b417be66c3710", "23304b7a39f9f3ff067d8d8f9e24ecc7" }, }; var aes = new AESCipher(256); aes.Init(new KeyParameter(HexConverter.FromHex("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"))); RunAESTests(tests, aes); }
public void TestAES128() { var tests = new[] { new [] { "6bc1bee22e409f96e93d7e117393172a", "3ad77bb40d7a3660a89ecaf32466ef97" }, new [] { "ae2d8a571e03ac9c9eb76fac45af8e51", "f5d3d58503b9699de785895a96fdbaaf" }, new [] { "30c81c46a35ce411e5fbc1191a0a52ef", "43b1cd7f598ece23881b00e3ed030688" }, new [] { "f69f2445df4f9b17ad2b417be66c3710", "7b0c785e27e8ad3f8223207104725dd4" }, }; var aes = new AESCipher(128); aes.Init(new KeyParameter(HexConverter.FromHex("2b7e151628aed2a6abf7158809cf4f3c"))); RunAESTests(tests, aes); }