Fabcoin Core  0.16.2
P2P Digital Currency
camellia.h
Go to the documentation of this file.
1 // camellia.h - written and placed in the public domain by Wei Dai
2 
5 
6 #ifndef CRYPTOPP_CAMELLIA_H
7 #define CRYPTOPP_CAMELLIA_H
8 
9 #include "config.h"
10 #include "seckey.h"
11 #include "secblock.h"
12 
14 
15 struct Camellia_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 16, 32, 8>
18 {
19  CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "Camellia";}
20 };
21 
26 {
27  class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<Camellia_Info>
28  {
29  public:
30  void UncheckedSetKey(const byte *key, unsigned int keylen, const NameValuePairs &params);
31  void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
32 
33  protected:
34  CRYPTOPP_ALIGN_DATA(4) static const byte s1[256];
35  static const word32 SP[4][256];
36 
37  unsigned int m_rounds;
39  };
40 
41 public:
44 };
45 
48 
50 
51 #endif
uint8_t byte
Definition: Common.h:57
Camellia::Encryption CamelliaEncryption
Definition: camellia.h:46
#define CRYPTOPP_STATIC_CONSTEXPR
Definition: config.h:892
Provides Encryption and Decryption typedefs used by derived classes to implement a block cipher...
Definition: seckey.h:408
BlockCipherFinal< DECRYPTION, Base > Decryption
Definition: camellia.h:43
#define NAMESPACE_BEGIN(x)
Definition: config.h:200
Library configuration file.
Classes and functions for secure memory allocations.
Inherited by algorithms with fixed block size.
Definition: seckey.h:40
#define CRYPTOPP_ALIGN_DATA(x)
Definition: config.h:338
Classes and functions for implementing secret key algorithms.
SecBlock< word32 > m_key
Definition: camellia.h:38
CRYPTOPP_STATIC_CONSTEXPR const char * StaticAlgorithmName()
Definition: camellia.h:19
Provides class member functions to key a block cipher.
Definition: seckey.h:324
Camellia block cipher.
Definition: camellia.h:25
unsigned int m_rounds
Definition: camellia.h:37
BlockCipherFinal< ENCRYPTION, Base > Encryption
Definition: camellia.h:42
Inherited by keyed algorithms with variable key length.
Definition: seckey.h:169
#define CRYPTOPP_NO_VTABLE
Definition: config.h:369
Camellia block cipher information.
Definition: camellia.h:17
Camellia::Decryption CamelliaDecryption
Definition: camellia.h:47
#define NAMESPACE_END
Definition: config.h:201
Provides a base implementation of Algorithm and SimpleKeyingInterface for block ciphers.
Definition: seckey.h:311
unsigned int word32
Definition: config.h:231
#define s1(x)
Definition: sha256.c:70
Interface for retrieving values given their names.
Definition: cryptlib.h:279