Skip to content

Commit

Permalink
AES ECB mode support (#597)
Browse files Browse the repository at this point in the history
* AES ECB mode support

* Reorganize code, and simplify some duplication

* Switch to debug_assert
  • Loading branch information
skmcgrail authored Nov 15, 2024
1 parent 8f7f96d commit 602aeb7
Show file tree
Hide file tree
Showing 8 changed files with 1,153 additions and 326 deletions.
4 changes: 2 additions & 2 deletions aws-lc-rs/src/aead/quic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//!
//! See draft-ietf-quic-tls.

use crate::cipher::aes::encrypt_block_aes;
use crate::cipher::aes::encrypt_block;
use crate::cipher::block;
use crate::cipher::chacha::encrypt_block_chacha20;
use crate::cipher::key::SymmetricCipherKey;
Expand Down Expand Up @@ -149,7 +149,7 @@ fn cipher_new_mask(

let encrypted_block = match cipher_key {
SymmetricCipherKey::Aes128 { enc_key, .. } | SymmetricCipherKey::Aes256 { enc_key, .. } => {
encrypt_block_aes(enc_key, block)
encrypt_block(enc_key, block)
}
SymmetricCipherKey::ChaCha20 { raw_key } => {
let plaintext = block.as_ref();
Expand Down
Loading

0 comments on commit 602aeb7

Please sign in to comment.