aes-project/src/main.rs

19 lines
401 B
Rust
Raw Normal View History

2024-04-26 18:47:30 +02:00
mod aes;
use aes::Aes;
2024-04-12 18:52:42 +02:00
fn main() {
2024-04-26 18:47:30 +02:00
let key: [u8; 16] = [
0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf,
0x4f, 0x3c,
2024-04-26 18:47:30 +02:00
];
let found_key: [u8; 16] = Aes::findroundkey(&key);
for &byte in &found_key {
print!("{:02x}", byte);
2024-04-26 18:47:30 +02:00
}
println!()
// should be
// ef44a541
// a8525b7f
// b671253b
// db0bad00
2024-04-12 18:52:42 +02:00
}