eax 0.6.1

Pure Rust implementation of the EAX Authenticated Encryption with Associated Data (AEAD) Cipher with optional architecture-specific hardware acceleration. Implemented generically around block ciphers, it combines counter mode (CTR) encryption with CMAC authentication.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use aead::array::ArraySize;
use aead::array::typenum::Unsigned;
use aead::array::typenum::type_operators::{IsGreaterOrEqual, IsLessOrEqual};
use aead::consts::{U4, U16};

mod private {
    // Sealed traits stop other crates from implementing any traits that use it.
    pub trait SealedTag {}

    impl<T> SealedTag for T where
        T: super::IsGreaterOrEqual<super::U4> + super::IsLessOrEqual<super::U16>
    {
    }
}

pub trait TagSize: ArraySize + Unsigned + private::SealedTag {}

impl<T> TagSize for T where T: ArraySize + IsGreaterOrEqual<U4> + IsLessOrEqual<U16> {}