cryptopals/examples/set2_11/main.rs
2023-04-27 20:19:27 -07:00

13 lines
363 B
Rust

use cryptopals::{set2_adversary::Set2Adversary, prelude::ByteBased, friendly::likely_ecb};
fn main() {
let adversary = Set2Adversary::gen();
// blackbox detector
for _ in 0..100 {
let output = adversary.oracle_11(&[b'A'; 64]);
println!("output: {}", output.to_hex());
println!("likely ECB: {}", likely_ecb(&output));
}
}