Coverage Report

Created: 2023-02-22 06:39

/src/botan/build/include/botan/internal/threefish_512.h
Line
Count
Source (jump to first uncovered line)
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
13
namespace Botan {
14
15
/**
16
* Threefish-512
17
*/
18
class Threefish_512 final :
19
   public Block_Cipher_Fixed_Params<64, 64, 0, 1, Tweakable_Block_Cipher>
20
   {
21
   public:
22
      void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override;
23
      void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override;
24
25
      void set_tweak(const uint8_t tweak[], size_t len) override;
26
27
      void clear() override;
28
0
      std::string name() const override { return "Threefish-512"; }
29
0
      std::unique_ptr<BlockCipher> new_object() const override { return std::make_unique<Threefish_512>(); }
30
      bool has_keying_material() const override;
31
32
   private:
33
      void key_schedule(const uint8_t key[], size_t key_len) override;
34
35
      // Interface for Skein
36
      friend class Skein_512;
37
38
      void skein_feedfwd(const secure_vector<uint64_t>& M,
39
                         const secure_vector<uint64_t>& T);
40
41
      // Private data
42
      secure_vector<uint64_t> m_T;
43
      secure_vector<uint64_t> m_K;
44
   };
45
46
}
47
48
#endif