cryptopals/examples/set1_8/main.rs

17 lines
460 B
Rust
Raw Normal View History

2023-04-27 04:58:19 +00:00
use cryptopals::bvecs;
use cryptopals::prelude::*;
fn main() {
let inputs = bvecs!("inputs.txt");
for input in inputs {
'seek: for ix_0 in (0..input.len()).step_by(16) {
for ix_1 in (ix_0+16..input.len()).step_by(16) {
if input[ix_0..ix_0+16]==input[ix_1..ix_1+16] {
println!("possible ECB: {}", input.to_hex());
break 'seek
}
}
}
}
}