9 #ifndef BOTAN_MODE_XTS_H__
10 #define BOTAN_MODE_XTS_H__
12 #include <botan/cipher_mode.h>
13 #include <botan/block_cipher.h>
23 std::string name()
const override;
25 size_t update_granularity()
const override;
27 size_t minimum_final_size()
const override;
31 size_t default_nonce_length()
const override;
33 bool valid_nonce_length(
size_t n)
const override;
35 void clear()
override;
37 void reset()
override;
42 const uint8_t*
tweak()
const {
return m_tweak.data(); }
46 void update_tweak(
size_t last_used);
49 void start_msg(
const uint8_t nonce[],
size_t nonce_len)
override;
50 void key_schedule(
const uint8_t key[],
size_t length)
override;
52 std::unique_ptr<BlockCipher> m_cipher, m_tweak_cipher;
67 size_t process(uint8_t buf[],
size_t size)
override;
71 size_t output_length(
size_t input_length)
const override;
85 size_t process(uint8_t buf[],
size_t size)
override;
89 size_t output_length(
size_t input_length)
const override;
XTS_Encryption(BlockCipher *cipher)
std::vector< T, secure_allocator< T >> secure_vector
XTS_Decryption(BlockCipher *cipher)
const BlockCipher & cipher() const
const uint8_t * tweak() const