Fabcoin Core  0.16.2
P2P Digital Currency
rc6.h
Go to the documentation of this file.
1 // rc6.h - written and placed in the public domain by Wei Dai
2 
5 
6 #ifndef CRYPTOPP_RC6_H
7 #define CRYPTOPP_RC6_H
8 
9 #include "seckey.h"
10 #include "secblock.h"
11 
13 
14 struct RC6_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 16, 32, 8>, public VariableRounds<20>
17 {
18  CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "RC6";}
19  typedef word32 RC6_WORD;
20 };
21 
25 class RC6 : public RC6_Info, public BlockCipherDocumentation
26 {
27  class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<RC6_Info>
28  {
29  public:
30  void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs &params);
31 
32  protected:
33  unsigned int r; // number of rounds
34  SecBlock<RC6_WORD> sTable; // expanded key table
35  };
36 
37  class CRYPTOPP_NO_VTABLE Enc : public Base
38  {
39  public:
40  void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
41  };
42 
43  class CRYPTOPP_NO_VTABLE Dec : public Base
44  {
45  public:
46  void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
47  };
48 
49 public:
52 };
53 
56 
58 
59 #endif
uint8_t byte
Definition: Common.h:57
#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
RC6 block cipher.
Definition: rc6.h:25
RC6 block cipher information.
Definition: rc6.h:16
#define NAMESPACE_BEGIN(x)
Definition: config.h:200
SecBlock< RC6_WORD > sTable
Definition: rc6.h:34
unsigned int r
Definition: rc6.h:33
BlockCipherFinal< DECRYPTION, Dec > Decryption
Definition: rc6.h:51
Definition: rc6.h:37
Classes and functions for secure memory allocations.
Inherited by algorithms with fixed block size.
Definition: seckey.h:40
Inherited by algorithms with variable number of rounds.
Definition: seckey.h:66
RC6::Decryption RC6Decryption
Definition: rc6.h:55
Classes and functions for implementing secret key algorithms.
CRYPTOPP_STATIC_CONSTEXPR const char * StaticAlgorithmName()
Definition: rc6.h:18
word32 RC6_WORD
Definition: rc6.h:19
Inherited by keyed algorithms with variable key length.
Definition: seckey.h:169
#define CRYPTOPP_NO_VTABLE
Definition: config.h:369
Definition: rc6.h:27
#define NAMESPACE_END
Definition: config.h:201
Provides a base implementation of Algorithm and SimpleKeyingInterface for block ciphers.
Definition: seckey.h:311
Definition: rc6.h:43
unsigned int word32
Definition: config.h:231
RC6::Encryption RC6Encryption
Definition: rc6.h:54
Interface for retrieving values given their names.
Definition: cryptlib.h:279
BlockCipherFinal< ENCRYPTION, Enc > Encryption
Definition: rc6.h:50