Botan 3.9.0
Crypto and TLS for C&
threefish_512.h
Go to the documentation of this file.
1/*
2* Threefish-512
3* (C) 2013,2014 Jack Lloyd
4*
5* Botan is released under the Simplified BSD License (see license.txt)
6*/
7
8#ifndef BOTAN_THREEFISH_512_H_
9#define BOTAN_THREEFISH_512_H_
10
11#include <botan/block_cipher.h>
12#include <botan/secmem.h>
13
14namespace Botan {
15
16/**
17* Threefish-512
18*/
19class Threefish_512 final : public Block_Cipher_Fixed_Params<64, 64, 0, 1, Tweakable_Block_Cipher> {
20 public:
21 void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override;
22 void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override;
23
24 void set_tweak(const uint8_t tweak[], size_t len) override;
25
26 void clear() override;
27
28 std::string name() const override { return "Threefish-512"; }
29
30 std::unique_ptr<BlockCipher> new_object() const override { return std::make_unique<Threefish_512>(); }
31
32 bool has_keying_material() const override;
33
34 private:
35 void key_schedule(std::span<const uint8_t> key) override;
36
37 // Interface for Skein
38 friend class Skein_512;
39
40 void skein_feedfwd(const secure_vector<uint64_t>& M, const secure_vector<uint64_t>& T);
41
42 // Private data
45};
46
47} // namespace Botan
48
49#endif
friend class Skein_512
bool has_keying_material() const override
std::unique_ptr< BlockCipher > new_object() const override
std::string name() const override
void set_tweak(const uint8_t tweak[], size_t len) override
void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
void clear() override
std::vector< T, secure_allocator< T > > secure_vector
Definition secmem.h:69