Expand description
§plain-aes
This crate implements Rijndael’s cipher, in 128 bits and 192 bits modes respectively.
§Considerations
- Within this crate, “block” or “block of data” refers specifically to a 16-byte sequence, as defined in the FIPS 197 specification.
- For efficiency, most affine transformations and operations within GF(2^8) (e.g., polynomial multiplication) are implemented using pre-computed lookup tables.
- While this crate is comprehensively tested, it should not be used in security-critical applications due to potential vulnerabilities. Modern CPUs offer hardware-accelerated AES, and some even have dedicated cryptographic coprocessors. These hardware features provide a more secure and performant solution for critical applications.
§Getting started
Re-exports§
pub use internal::KeyExpansionError;
Modules§
- internal
- This module encapsulates all internal operations for this crate.
Enums§
- Cipher
Version - The cipher version to use, each cipher version encapsulates a key and ModeOfOperation.
- Mode
OfOperation - Mode of operation for AES.
- Operation
Error - An error produced during an encryption/decryption.
Traits§
- Encryptable
- A trait implemented by types that can be used as input for encryption or decryption operations.
Functions§
- decrypt
- Decrypts a data object using the specified cipher version.
- encrypt
- Encrypts a data object using the specified cipher version.
- pkcs5_
padding - Applies PKCS#5 padding to blocks less than 16 bytes in length.