Crypto++  5.6.3
Free C++ class library of cryptographic schemes
camellia.h
Go to the documentation of this file.
1 // camellia.h - written and placed in the public domain by Wei Dai
2 
3 //! \file camellia.h
4 //! \brief Classes for the Cameliia block cipher
5 
6 #ifndef CRYPTOPP_CAMELLIA_H
7 #define CRYPTOPP_CAMELLIA_H
8 
9 /** \file
10 */
11 
12 #include "config.h"
13 #include "seckey.h"
14 #include "secblock.h"
15 
16 NAMESPACE_BEGIN(CryptoPP)
17 
18 //! _
19 struct Camellia_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 16, 32, 8>
20 {
21  static const char *StaticAlgorithmName() {return "Camellia";}
22 };
23 
24 /// <a href="http://www.weidai.com/scan-mirror/cs.html#Camellia">Camellia</a>
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  static const byte s1[256];
35  static const word32 SP[4][256];
36 
37  unsigned int m_rounds;
38  SecBlock<word32> m_key;
39  };
40 
41 public:
44 };
45 
48 
49 NAMESPACE_END
50 
51 #endif
Provides Encryption and Decryption typedefs used by derived classes to implement a block cipher...
Definition: seckey.h:385
Library configuration file.
Classes and functions for secure memory allocations.
Inherited by block ciphers with fixed block size.
Definition: seckey.h:34
Classes and functions for implementing secret key algorithms.
Provides class member functions to key a block cipher.
Definition: seckey.h:305
Camellia
Definition: camellia.h:25
Inherited by keyed algorithms with variable key length.
Definition: seckey.h:152
Provides class member functions to access BlockCipher constants.
Definition: seckey.h:292
Crypto++ library namespace.
Interface for retrieving values given their names.
Definition: cryptlib.h:261