cryptopals/examples/set1_8/main.rs
2023-04-26 21:58:19 -07:00

17 lines
460 B
Rust

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
}
}
}
}
}