Fabcoin Core  0.16.2
P2P Digital Currency
skipjack.h
Go to the documentation of this file.
1 // skipjack.h - written and placed in the public domain by Wei Dai
2 
5 
6 #ifndef CRYPTOPP_SKIPJACK_H
7 #define CRYPTOPP_SKIPJACK_H
8 
9 #include "seckey.h"
10 #include "secblock.h"
11 
13 
14 struct SKIPJACK_Info : public FixedBlockSize<8>, public FixedKeyLength<10>
17 {
18  CRYPTOPP_DLL static const char * CRYPTOPP_API StaticAlgorithmName() {return "SKIPJACK";}
19 };
20 
25 {
28  class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<SKIPJACK_Info>
29  {
30  public:
31  void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs &params);
32  unsigned int OptimalDataAlignment() const {return GetAlignmentOf<word16>();}
33 
34  protected:
35  static const byte fTable[256];
36 
38  };
39 
43  {
44  public:
45  void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
46  private:
47  static const byte Se[256];
48  static const word32 Te[4][256];
49  };
50 
54  {
55  public:
56  void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
57  private:
58  static const byte Sd[256];
59  static const word32 Td[4][256];
60  };
61 
62 public:
65 };
66 
69 
71 
72 #endif
SKIPJACK block cipher encryption operation.
Definition: skipjack.h:42
Inherited by keyed algorithms with fixed key length.
Definition: seckey.h:127
uint8_t byte
Definition: Common.h:57
Provides Encryption and Decryption typedefs used by derived classes to implement a block cipher...
Definition: seckey.h:408
SKIPJACK block cipher decryption operation.
Definition: skipjack.h:53
FixedSizeSecBlock< byte, 10 *256 > tab
Definition: skipjack.h:37
#define NAMESPACE_BEGIN(x)
Definition: config.h:200
unsigned int OptimalDataAlignment() const
Provides input and output data alignment for optimal performance.
Definition: skipjack.h:32
SKIPJACK block cipher information.
Definition: skipjack.h:16
Classes and functions for secure memory allocations.
Inherited by algorithms with fixed block size.
Definition: seckey.h:40
SKIPJACK block cipher default operation.
Definition: skipjack.h:28
Classes and functions for implementing secret key algorithms.
BlockCipherFinal< ENCRYPTION, Enc > Encryption
Definition: skipjack.h:63
#define CRYPTOPP_API
Definition: config.h:705
#define CRYPTOPP_NO_VTABLE
Definition: config.h:369
SKIPJACK::Decryption SKIPJACKDecryption
Definition: skipjack.h:68
#define NAMESPACE_END
Definition: config.h:201
Provides a base implementation of Algorithm and SimpleKeyingInterface for block ciphers.
Definition: seckey.h:311
SKIPJACK block cipher.
Definition: skipjack.h:24
#define CRYPTOPP_DLL
Definition: config.h:704
unsigned int word32
Definition: config.h:231
BlockCipherFinal< DECRYPTION, Dec > Decryption
Definition: skipjack.h:64
SKIPJACK::Encryption SKIPJACKEncryption
Definition: skipjack.h:67
static CRYPTOPP_DLL const char *CRYPTOPP_API StaticAlgorithmName()
Definition: skipjack.h:18
Interface for retrieving values given their names.
Definition: cryptlib.h:279