1 2 3 4 5 6 7 8 9
| import AES256,sbox send = (126, 143, 160, 15, 180, 170, 84, 152, 109, 20, 40, 136, 49, 179, 125, 165, 53, 251, 215, 87, 167, 41, 241, 178, 253, 239, 233, 193, 60, 110, 14, 246, 89, 228, 31, 42, 72, 213, 22, 102, 111, 52, 28, 254, 5, 219, 98, 94, 36, 161, 223, 191, 62, 57, 200, 133, 130, 149, 93, 248, 3, 13, 164, 76, 17, 101, 236, 51, 182, 81, 127, 185, 197, 100, 166, 183, 10, 18, 243, 196, 201, 119, 85, 131, 80, 46, 7, 224, 32, 158, 146, 71, 19, 25, 112, 249, 138, 139, 55, 175, 226, 1, 78, 106, 181, 211, 118, 218, 9, 64, 173, 207, 105, 63, 108, 235, 77, 134, 45, 44, 88, 171, 240, 65, 232, 33, 82, 227, 217, 129, 70, 8, 177, 128, 252, 135, 61, 190, 12, 150, 58, 216, 59, 121, 206, 188, 187, 104, 27, 242, 34, 212, 30, 176, 203, 244, 230, 141, 247, 114, 117, 0, 237, 39, 234, 21, 148, 2, 238, 250, 74, 4, 145, 29, 189, 192, 103, 229, 123, 163, 144, 153, 255, 154, 202, 86, 225, 195, 67, 37, 245, 43, 142, 221, 147, 209, 174, 97, 92, 231, 90, 107, 122, 56, 157, 35, 6, 156, 199, 120, 68, 116, 162, 79, 69, 198, 95, 38, 140, 169, 205, 204, 115, 210, 113, 23, 24, 132, 91, 73, 184, 172, 54, 159, 214, 47, 186, 208, 96, 66, 151, 83, 168, 99, 222, 26, 75, 124, 48, 137, 50, 155, 194, 16, 220, 11) invsbox = sbox.InvSbox(send) print (invsbox) cipher = [93, 78, 25, 81, 18, 232, 250, 12, 94, 128, 81, 128, 88, 156, 180, 110, 151, 87, 197, 247, 8, 228, 51, 71, 102, 38, 146, 218, 40, 70, 6, 16] key = "letrvcgspwxjknzfylteavqbimszrwhk" plain = AES256.decrypt(cipher,key,"ECB","")
AES256.plain_to_ascii(plain)
|