pub trait AesBlockCipher: 'static + Clone + Sync + Send {
    type Key: 'static + Clone + Sync + Send;
    type EncryptOnly: AesBlockCipher<Key = Self::Key> + From<Self>;

    const FIXED_KEY: Self;
    const BLOCK_COUNT_HINT: usize;

    fn new_with_key(key: Self::Key) -> Self;
    fn encrypt_many<const N: usize>(&self, blocks: [U8x16; N]) -> [U8x16; N]
    where
        ArrayUnrolledOps: UnrollableArraySize<N>
; fn encrypt(&self, block: U8x16) -> U8x16 { ... } }

Required Associated Types

If you don’t need to use Aes for decryption, it’s faster to only perform key scheduling for encryption than for both encryption and decryption.

Required Associated Constants

A pre-scheduled Aes block cipher with a compile-time constant key.

Running encrypt_many with this many blocks will result in the best performance.

When using hardware AES instructions, if the AES encrypt instructions all have a throughput of 1, then this constant will be equal to the instruction latency.

Required Methods

If you need to AES with a particular key, be careful about endianness issues.

Provided Methods

Implementors