First half of set 2

This commit is contained in:
2023-04-27 20:19:27 -07:00
parent ea25f818e5
commit 5a4924ab99
13 changed files with 410 additions and 14 deletions

13
examples/set2_11/main.rs Normal file
View File

@ -0,0 +1,13 @@
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));
}
}