9#ifndef BOTAN_MODE_XTS_H_
10#define BOTAN_MODE_XTS_H_
12#include <botan/block_cipher.h>
13#include <botan/cipher_mode.h>
22 std::string
name()
const final;
45 const uint8_t*
tweak()
const {
return m_tweak.data(); }
47 bool tweak_set()
const {
return m_tweak.empty() ==
false; }
58 void start_msg(
const uint8_t nonce[],
size_t nonce_len)
override;
59 void key_schedule(std::span<const uint8_t> key)
override;
61 std::unique_ptr<BlockCipher> m_cipher;
62 std::unique_ptr<BlockCipher> m_tweak_cipher;
64 const size_t m_cipher_block_size;
65 const size_t m_cipher_parallelism;
66 const size_t m_tweak_blocks;
82 size_t process_msg(uint8_t buf[],
size_t size)
override;
99 size_t process_msg(uint8_t buf[],
size_t size)
override;
XTS_Decryption(std::unique_ptr< BlockCipher > cipher)
size_t output_length(size_t input_length) const override
size_t output_length(size_t input_length) const override
XTS_Encryption(std::unique_ptr< BlockCipher > cipher)
const uint8_t * tweak() const
size_t ideal_granularity() const final
std::string name() const final
size_t default_nonce_length() const final
size_t cipher_block_size() const
size_t update_granularity() const final
bool has_keying_material() const final
XTS_Mode(std::unique_ptr< BlockCipher > cipher)
const BlockCipher & cipher() const
size_t tweak_blocks() const
Key_Length_Specification key_spec() const final
void update_tweak(size_t last_used)
bool valid_nonce_length(size_t n) const final
size_t minimum_final_size() const final
int(* final)(unsigned char *, CTX *)
std::vector< T, secure_allocator< T > > secure_vector