Files
unisa_prog_sicurezza_aes_20…/index.html

66 lines
1.6 KiB
HTML

<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script src="aes.js"></script>
<script>
/*
Input = 32 43 f6 a8 88 5a 30 8d 31 31 98 a2 e0 37 07 34
Cipher Key = 2b 7e 15 16 28 ae d2 a6 ab f7 15 88 09 cf 4f 3c
*/
var i = [
new byte(hex_to_bin("32")),
new byte(hex_to_bin("43")),
new byte(hex_to_bin("f6")),
new byte(hex_to_bin("a8")),
new byte(hex_to_bin("88")),
new byte(hex_to_bin("5a")),
new byte(hex_to_bin("30")),
new byte(hex_to_bin("8d")),
new byte(hex_to_bin("31")),
new byte(hex_to_bin("31")),
new byte(hex_to_bin("98")),
new byte(hex_to_bin("a2")),
new byte(hex_to_bin("e0")),
new byte(hex_to_bin("37")),
new byte(hex_to_bin("07")),
new byte(hex_to_bin("34")),
];
var k = [
new byte(hex_to_bin("2b")),
new byte(hex_to_bin("7e")),
new byte(hex_to_bin("15")),
new byte(hex_to_bin("16")),
new byte(hex_to_bin("28")),
new byte(hex_to_bin("ae")),
new byte(hex_to_bin("d2")),
new byte(hex_to_bin("a6")),
new byte(hex_to_bin("ab")),
new byte(hex_to_bin("f7")),
new byte(hex_to_bin("15")),
new byte(hex_to_bin("88")),
new byte(hex_to_bin("09")),
new byte(hex_to_bin("cf")),
new byte(hex_to_bin("4f")),
new byte(hex_to_bin("3c")),
];
KeyExpansion(k);
console.log("Result " + print_result( encrypt(i)));
</script>
</body>
</html>