EAX mode
EAX mode is a mode of operation for cryptographic block ciphers. It is an Authenticated Encryption with Associated Data algorithm designed to simultaneously provide both authentication and privacy of the message with a two-pass scheme, one pass for achieving privacy and one for authenticity for each block.
EAX mode was submitted on October 3, 2003, to the attention of NIST in order to replace CCM as standard AEAD mode of operation, since CCM mode lacks some desirable attributes of EAX and is more complex.
Encryption and authentication
EAX is a flexible nonce-using two-pass AEAD scheme with no restrictions on block cipher primitive to be used, nor on block size, and supports arbitrary-length messages. Authentication tag length is arbitrarily sizeable up to the used cipher's block size.The block cipher primitive is used in CTR mode for encryption and as OMAC for authentication over each block through the EAX composition method, that may be seen as a particular case of a more general algorithm called EAX2 and described in The EAX Mode of Operation
The reference implementation in the aforementioned paper uses AES in CTR mode for encryption combined with AES OMAC for authentication.
Performance
Being a two-pass scheme, EAX mode is slower than a well designed one-pass scheme based on the same primitives.EAX mode has several desirable attributes, notably:
- provable security ;
- message expansion is minimal, being limited to the overhead of the tag length;
- using CTR mode means the cipher need be implemented only for encryption, in simplifying implementation of some ciphers ;
- the algorithm is "on-line", that means that can process a stream of data, using constant memory, without knowing total data length in advance;
- the algorithm can pre-process static Associated Data, useful for encryption/decryption of communication session parameters.