Botan  2.11.0
Crypto and TLS for C++11
camellia.h
Go to the documentation of this file.
1 /*
2 * Camellia
3 * (C) 2012 Jack Lloyd
4 *
5 * Botan is released under the Simplified BSD License (see license.txt)
6 */
7 
8 #ifndef BOTAN_CAMELLIA_H_
9 #define BOTAN_CAMELLIA_H_
10 
11 #include <botan/block_cipher.h>
12 
13 namespace Botan {
14 
15 /**
16 * Camellia-128
17 */
18 class BOTAN_PUBLIC_API(2,0) Camellia_128 final : public Block_Cipher_Fixed_Params<16, 16>
19  {
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 clear() override;
25  std::string name() const override { return "Camellia-128"; }
26  BlockCipher* clone() const override { return new Camellia_128; }
27  private:
28  void key_schedule(const uint8_t key[], size_t length) override;
29 
30  secure_vector<uint64_t> m_SK;
31  };
32 
33 /**
34 * Camellia-192
35 */
36 class BOTAN_PUBLIC_API(2,0) Camellia_192 final : public Block_Cipher_Fixed_Params<16, 24>
37  {
38  public:
39  void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override;
40  void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override;
41 
42  void clear() override;
43  std::string name() const override { return "Camellia-192"; }
44  BlockCipher* clone() const override { return new Camellia_192; }
45  private:
46  void key_schedule(const uint8_t key[], size_t length) override;
47 
48  secure_vector<uint64_t> m_SK;
49  };
50 
51 /**
52 * Camellia-256
53 */
54 class BOTAN_PUBLIC_API(2,0) Camellia_256 final : public Block_Cipher_Fixed_Params<16, 32>
55  {
56  public:
57  void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override;
58  void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override;
59 
60  void clear() override;
61  std::string name() const override { return "Camellia-256"; }
62  BlockCipher* clone() const override { return new Camellia_256; }
63  private:
64  void key_schedule(const uint8_t key[], size_t length) override;
65 
66  secure_vector<uint64_t> m_SK;
67  };
68 
69 }
70 
71 #endif
int(* final)(unsigned char *, CTX *)
void const uint8_t in[]
Definition: mgf1.h:26
char * name
Definition: ffi.h:330
const uint8_t uint8_t size_t blocks
Definition: ffi.h:691
class BOTAN_PUBLIC_API(2, 11) Argon2 final class BOTAN_PUBLIC_API(2, 11) Argon2_Family final void size_t const char size_t const uint8_t size_t const uint8_t key[]
Definition: argon2.h:87
Definition: alg_id.cpp:13
uint8_t out[]
Definition: pbkdf2.h:19
class BOTAN_PUBLIC_API(2, 0) AlgorithmIdentifier final bool BOTAN_PUBLIC_API(2, 0) operator
Name Constraints.
Definition: asn1_obj.h:66