26 #include "AuthenticatedCipher.h"
27 #include "BlockCipher.h"
39 bool setKey(
const uint8_t *key,
size_t len);
40 bool setIV(
const uint8_t *iv,
size_t len);
42 void encrypt(uint8_t *output,
const uint8_t *input,
size_t len);
43 void decrypt(uint8_t *output,
const uint8_t *input,
size_t len);
48 bool checkTag(
const void *tag,
size_t len);
71 void encryptCTR(uint8_t *output,
const uint8_t *input,
size_t len);
Abstract base class for authenticated ciphers.
Abstract base class for block ciphers.
Concrete base class to assist with implementing EAX for 128-bit block ciphers.
size_t keySize() const
Default size of the key for this cipher, in bytes.
bool setIV(const uint8_t *iv, size_t len)
Sets the initialization vector to use for future encryption and decryption operations.
size_t tagSize() const
Returns the size of the authentication tag.
void decrypt(uint8_t *output, const uint8_t *input, size_t len)
Decrypts an input buffer and writes the plaintext to an output buffer.
bool checkTag(const void *tag, size_t len)
Finalizes the decryption process and checks the authentication tag.
void setBlockCipher(BlockCipher *cipher)
Sets the block cipher to use for this EAX object.
void encrypt(uint8_t *output, const uint8_t *input, size_t len)
Encrypts an input buffer and writes the ciphertext to an output buffer.
void computeTag(void *tag, size_t len)
Finalizes the encryption process and computes the authentication tag.
size_t ivSize() const
Size of the initialization vector for this cipher, in bytes.
void addAuthData(const void *data, size_t len)
Adds extra data that will be authenticated but not encrypted.
EAXCommon()
Constructs a new cipher in EAX mode.
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
void clear()
Clears all security-sensitive state from this cipher.
Implementation of the EAX authenticated cipher.
EAX()
Constructs a new EAX object for the block cipher T.
Implementation of the OMAC message authenticator.
void setBlockCipher(BlockCipher *cipher)
Sets the block cipher to use for this OMAC object.