diff options
author | lloyd <[email protected]> | 2013-08-14 19:31:00 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2013-08-14 19:31:00 +0000 |
commit | fea5a34379a62bfadac4b8601db4b54198b47acd (patch) | |
tree | 5971a4de1060a59ebd4e8dbecb25d5feebabaafe /src/aead/aead.h | |
parent | f71a892cec86340321accff6ee06b9ab9774b89c (diff) |
Make XTS a Transformation under src/modes
Move AEAD modes to src/modes/aead
Add filters for Transformations (based on original AEAD filters)
Diffstat (limited to 'src/aead/aead.h')
-rw-r--r-- | src/aead/aead.h | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/src/aead/aead.h b/src/aead/aead.h deleted file mode 100644 index 97f156d60..000000000 --- a/src/aead/aead.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -* Interface for AEAD modes -* (C) 2013 Jack Lloyd -* -* Distributed under the terms of the Botan license -*/ - -#ifndef BOTAN_AEAD_MODE_H__ -#define BOTAN_AEAD_MODE_H__ - -#include <botan/transform.h> - -namespace Botan { - -/** -* Interface for AEAD (Authenticated Encryption with Associated Data) -* modes. These modes provide both encryption and message -* authentication, and can authenticate additional per-message data -* which is not included in the ciphertext (for instance a sequence -* number). -*/ -class AEAD_Mode : public Transformation - { - public: - /** - * Set associated data that is not included in the ciphertext but - * that should be authenticated. Must be called after set_key - * and before finish. - * - * Unless reset by another call, the associated data is kept - * between messages. Thus, if the AD does not change, calling - * once (after set_key) is the optimum. - * - * @param ad the associated data - * @param ad_len length of add in bytes - */ - virtual void set_associated_data(const byte ad[], size_t ad_len) = 0; - - template<typename Alloc> - void set_associated_data_vec(const std::vector<byte, Alloc>& ad) - { - set_associated_data(&ad[0], ad.size()); - } - - /** - * Default AEAD nonce size (a commonly supported value among AEAD - * modes, and, large enough that random collisions are unlikely). - */ - size_t default_nonce_size() const override { return 12; } - }; - -/** -* Get an AEAD mode by name (eg "AES-128/GCM" or "Serpent/EAX") -*/ -BOTAN_DLL AEAD_Mode* get_aead(const std::string& name, Cipher_Dir direction); - -} - -#endif |