cipher-workshop/aes/src/lib.rs
Kristofers Solo 454d1d6011
feat(aes): add AES-CBC mode implementation
Add AesCbc struct with:
    - CBC mode encryption with PKCS#7 padding
    - CBC mode decryption with padding validation
    - XOR chaining with IV for first block
    - Expose encrypt_block/decrypt_block as pub(crate)
2025-12-31 00:58:49 +02:00

24 lines
505 B
Rust

//! AES (Advanced Encryption Standard) implementation.
//!
//! Provides AES-128 block cipher with 128-bit keys and blocks.
//!
//! # Example
//! ```
//! use aes::Aes;
//! use cipher_core::BlockCipher;
//!
//! let cipher = Aes::new(0x2b7e1516_28aed2a6_abf71588_09cf4f3c_u128);
//! let ciphertext = cipher.encrypt(&[0u8; 16]).unwrap();
//! ```
mod aes;
mod block;
mod cbc;
mod constants;
mod iv;
mod key;
mod operations;
mod sbox;
pub use {aes::Aes, block::Block32, block::Block128, cbc::AesCbc, iv::Iv};