aboutsummaryrefslogtreecommitdiffstats
path: root/src/modes/xts/xts.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-11-17 07:19:37 +0000
committerlloyd <[email protected]>2009-11-17 07:19:37 +0000
commite00b46cf9c1dcb364ebb7d5968d6ff9dcd600c4e (patch)
tree8ffb8d032f06bbcb7ab376c7469751a25b556dca /src/modes/xts/xts.h
parenta98a9ff5f95bd4dca9c1eda11e27e712c869cd66 (diff)
Move most code that relies heavily on Filters into src/filters.
Remove support for (unused) modset settings. Move tss, fpe, cryptobox, and aont to new dir constructs
Diffstat (limited to 'src/modes/xts/xts.h')
-rw-r--r--src/modes/xts/xts.h82
1 files changed, 0 insertions, 82 deletions
diff --git a/src/modes/xts/xts.h b/src/modes/xts/xts.h
deleted file mode 100644
index 9badd3666..000000000
--- a/src/modes/xts/xts.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-* XTS mode, from IEEE P1619
-* (C) 2009 Jack Lloyd
-*
-* Distributed under the terms of the Botan license
-*/
-
-#ifndef BOTAN_XTS_H__
-#define BOTAN_XTS_H__
-
-#include <botan/key_filt.h>
-#include <botan/block_cipher.h>
-
-namespace Botan {
-
-/*
-* XTS Encryption
-*/
-class BOTAN_DLL XTS_Encryption : public Keyed_Filter
- {
- public:
- void set_key(const SymmetricKey& key);
- void set_iv(const InitializationVector& iv);
-
- bool valid_keylength(u32bit key_len) const
- { return cipher->valid_keylength(key_len); }
-
- std::string name() const;
-
- XTS_Encryption(BlockCipher* ciph);
-
- XTS_Encryption(BlockCipher* ciph,
- const SymmetricKey& key,
- const InitializationVector& iv);
-
- ~XTS_Encryption() { delete cipher; delete cipher2; }
- private:
- void write(const byte[], u32bit);
- void end_msg();
- void encrypt(const byte block[]);
-
- BlockCipher* cipher;
- BlockCipher* cipher2;
- SecureVector<byte> tweak;
- SecureVector<byte> buffer;
- u32bit position;
- };
-
-/*
-* XTS Decryption
-*/
-class BOTAN_DLL XTS_Decryption : public Keyed_Filter
- {
- public:
- void set_key(const SymmetricKey& key);
- void set_iv(const InitializationVector& iv);
-
- bool valid_keylength(u32bit key_len) const
- { return cipher->valid_keylength(key_len); }
-
- std::string name() const;
-
- XTS_Decryption(BlockCipher* ciph);
-
- XTS_Decryption(BlockCipher* ciph,
- const SymmetricKey& key,
- const InitializationVector& iv);
- private:
- void write(const byte[], u32bit);
- void end_msg();
- void decrypt(const byte[]);
-
- BlockCipher* cipher;
- BlockCipher* cipher2;
- SecureVector<byte> tweak;
- SecureVector<byte> buffer;
- u32bit position;
- };
-
-}
-
-#endif