First half of set 2
This commit is contained in:
13
examples/set2_11/main.rs
Normal file
13
examples/set2_11/main.rs
Normal 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));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user