AES block cipher constant-time implementation.
The aes-soft crate implements the AES algorithm completely in software
without using any table lookups or other timing dependant mechanisms.
The encryption implementation is based on a technique called fixslicing,
while the decryption implementation is heavily based on aessafe module,
from the original rust-crypto crate.
Usage example
use GenericArray;
use ;
use Aes128;
let key = from_slice;
let mut block = clone_from_slice;
let mut block8 = clone_from_slice;
// Initialize cipher
let cipher = new;
let block_copy = block.clone;
// Encrypt block in-place
cipher.encrypt_block;
// And decrypt it back
cipher.decrypt_block;
assert_eq!;
// We can encrypt 8 blocks simultaneously using
// instruction-level parallelism
let block8_copy = block8.clone;
cipher.encrypt_blocks;
cipher.decrypt_blocks;
assert_eq!;