26 #include "AuthenticatedCipher.h"
27 #include "BlockCipher.h"
38 bool setKey(
const uint8_t *key,
size_t len);
39 bool setIV(
const uint8_t *iv,
size_t len);
41 void encrypt(uint8_t *output,
const uint8_t *input,
size_t len);
42 void decrypt(uint8_t *output,
const uint8_t *input,
size_t len);
47 bool checkTag(
const void *tag,
size_t len);
68 void omacInitFirst(uint8_t omac[16]);
69 void omacInit(uint8_t omac[16], uint8_t t);
70 void omacUpdate(uint8_t omac[16],
const uint8_t *data,
size_t len);
71 void omacFinal(uint8_t omac[16]);
74 void encryptCTR(uint8_t *output,
const uint8_t *input,
size_t len);
bool setIV(const uint8_t *iv, size_t len)
Sets the initialization vector to use for future encryption and decryption operations.
Abstract base class for block ciphers.
void decrypt(uint8_t *output, const uint8_t *input, size_t len)
Decrypts an input buffer and writes the plaintext to an output buffer.
Abstract base class for authenticated ciphers.
size_t tagSize() const
Returns the size of the authentication tag.
EAXCommon()
Constructs a new cipher in EAX mode.
bool checkTag(const void *tag, size_t len)
Finalizes the decryption process and checks the authentication tag.
Concrete base class to assist with implementing EAX for 128-bit block ciphers.
EAX()
Constructs a new EAX object for the block cipher T.
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 clear()
Clears all security-sensitive state from this cipher.
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
void computeTag(void *tag, size_t len)
Finalizes the encryption process and computes the authentication tag.
Implementation of the EAX authenticated cipher.
void setBlockCipher(BlockCipher *cipher)
Sets the block cipher to use for this EAX object.
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.
size_t keySize() const
Default size of the key for this cipher, in bytes.