Skip to content

Commit

Permalink
typo aes_chained_cbc.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
cypherpepe authored Dec 18, 2024
1 parent 1c65668 commit 2bec396
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/aes_chained_cbc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fn attacker<'a>(key: &Key<128>, iv: &Block, ciphertext: Vec<u8>) -> &'a [u8] {
// first blocks' ciphertext
let c1 = &ciphertext[..16];

// select new IV as last blocks' ciphertext and intiate CBC with AES again with new IV
// select new IV as last blocks' ciphertext and initiate CBC with AES again with new IV
let new_iv: [u8; 16] = ciphertext[ciphertext.len() - 16..].try_into().unwrap();
let cbc2 = CBC::<AES<128>>::new(Block(new_iv));

Expand Down

0 comments on commit 2bec396

Please sign in to comment.