Fabcoin Core  0.16.2
P2P Digital Currency
3way.h
Go to the documentation of this file.
1 // 3way.h - written and placed in the public domain by Wei Dai
2 
5 
6 #ifndef CRYPTOPP_THREEWAY_H
7 #define CRYPTOPP_THREEWAY_H
8 
9 #include "config.h"
10 #include "seckey.h"
11 #include "secblock.h"
12 
14 
15 struct ThreeWay_Info : public FixedBlockSize<12>, public FixedKeyLength<12>, public VariableRounds<11>
18 {
19  CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "3-Way";}
20 };
21 
26 {
30  class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<ThreeWay_Info>
31  {
32  public:
33  void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs &params);
34 
35  protected:
36  unsigned int m_rounds;
38  };
39 
43  class CRYPTOPP_NO_VTABLE Enc : public Base
44  {
45  public:
46  void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
47  };
48 
52  class CRYPTOPP_NO_VTABLE Dec : public Base
53  {
54  public:
55  void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
56  };
57 
58 public:
61 };
62 
65 
67 
68 #endif
Inherited by keyed algorithms with fixed key length.
Definition: seckey.h:127
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
#define NAMESPACE_BEGIN(x)
Definition: config.h:200
CRYPTOPP_STATIC_CONSTEXPR const char * StaticAlgorithmName()
Definition: 3way.h:19
Library configuration file.
BlockCipherFinal< DECRYPTION, Dec > Decryption
Definition: 3way.h:60
ThreeWay::Decryption ThreeWayDecryption
Definition: 3way.h:64
Class specific methods used to operate the cipher in the forward direction.
Definition: 3way.h:43
unsigned int m_rounds
Definition: 3way.h:36
ThreeWay::Encryption ThreeWayEncryption
Definition: 3way.h:63
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
Classes and functions for implementing secret key algorithms.
ThreeWay block cipher.
Definition: 3way.h:25
#define CRYPTOPP_NO_VTABLE
Definition: config.h:369
ThreeWay block cipher information.
Definition: 3way.h:17
Class specific implementation and overrides used to operate the cipher.
Definition: 3way.h:30
#define NAMESPACE_END
Definition: config.h:201
Provides a base implementation of Algorithm and SimpleKeyingInterface for block ciphers.
Definition: seckey.h:311
BlockCipherFinal< ENCRYPTION, Enc > Encryption
Definition: 3way.h:59
FixedSizeSecBlock< word32, 3 > m_k
Definition: 3way.h:37
Class specific methods used to operate the cipher in the reverse direction.
Definition: 3way.h:52
Interface for retrieving values given their names.
Definition: cryptlib.h:279