9#ifndef BOTAN_MODE_XTS_H_
10#define BOTAN_MODE_XTS_H_
12#include <botan/cipher_mode.h>
13#include <botan/block_cipher.h>
25 std::string
name()
const override;
37 void clear()
override;
39 void reset()
override;
44 const uint8_t*
tweak()
const {
return m_tweak.data(); }
46 bool tweak_set()
const {
return m_tweak.empty() ==
false; }
50 void update_tweak(
size_t last_used);
55 void start_msg(
const uint8_t nonce[],
size_t nonce_len)
override;
56 void key_schedule(
const uint8_t key[],
size_t length)
override;
58 std::unique_ptr<BlockCipher> m_cipher;
59 std::unique_ptr<BlockCipher> m_tweak_cipher;
61 const size_t m_cipher_block_size;
62 const size_t m_cipher_parallelism;
76 size_t process(uint8_t buf[],
size_t size)
override;
94 size_t process(uint8_t buf[],
size_t size)
override;
virtual void start_msg(const uint8_t nonce[], size_t nonce_len)=0
virtual size_t process(uint8_t msg[], size_t msg_len)=0
virtual size_t default_nonce_length() const =0
virtual size_t output_length(size_t input_length) const =0
virtual void finish(secure_vector< uint8_t > &final_block, size_t offset=0)=0
virtual size_t minimum_final_size() const =0
virtual bool valid_nonce_length(size_t nonce_len) const =0
virtual std::string name() const =0
virtual Key_Length_Specification key_spec() const =0
XTS_Decryption(BlockCipher *cipher)
XTS_Encryption(BlockCipher *cipher)
const uint8_t * tweak() const
size_t cipher_block_size() const
size_t update_granularity() const override
const BlockCipher & cipher() const
int(* final)(unsigned char *, CTX *)
#define BOTAN_PUBLIC_API(maj, min)
#define BOTAN_FUTURE_INTERNAL_HEADER(hdr)
std::vector< T, secure_allocator< T > > secure_vector