11#include <botan/stream_cipher.h>
26 explicit ChaCha(
size_t rounds = 20);
28 std::string
provider()
const override;
42 void clear()
override;
44 std::unique_ptr<StreamCipher>
new_object()
const override;
46 std::string
name()
const override;
48 void seek(uint64_t offset)
override;
54 void key_schedule(
const uint8_t key[],
size_t key_len)
override;
56 void cipher_bytes(
const uint8_t in[], uint8_t out[],
size_t length)
override;
58 void generate_keystream(uint8_t out[],
size_t len)
override;
60 void set_iv_bytes(
const uint8_t iv[],
size_t iv_len)
override;
62 void initialize_state();
64 static size_t parallelism();
66 static void chacha(uint8_t output[],
71#if defined(BOTAN_HAS_CHACHA_SIMD32)
72 static void chacha_simd32_x4(uint8_t output[64*4], uint32_t state[16],
size_t rounds);
75#if defined(BOTAN_HAS_CHACHA_AVX2)
76 static void chacha_avx2_x8(uint8_t output[64*8], uint32_t state[16],
size_t rounds);
83 size_t m_position = 0;
std::string name() const override
size_t buffer_size() const override
std::unique_ptr< StreamCipher > new_object() const override
Key_Length_Specification key_spec() const override
bool valid_iv_length(size_t iv_len) const override
size_t default_iv_length() const override
std::string provider() const override
bool has_keying_material() const override
void seek(uint64_t offset) override
int(* final)(unsigned char *, CTX *)
std::vector< T, secure_allocator< T > > secure_vector