Crypto++
skipjack.h
Go to the documentation of this file.
1 #ifndef CRYPTOPP_SKIPJACK_H
2 #define CRYPTOPP_SKIPJACK_H
3 
4 /** \file
5 */
6 
7 #include "seckey.h"
8 #include "secblock.h"
9 
10 NAMESPACE_BEGIN(CryptoPP)
11 
12 //! _
13 struct SKIPJACK_Info : public FixedBlockSize<8>, public FixedKeyLength<10>
14 {
15  CRYPTOPP_DLL static const char * CRYPTOPP_API StaticAlgorithmName() {return "SKIPJACK";}
16 };
17 
18 /// <a href="http://www.weidai.com/scan-mirror/cs.html#SKIPJACK">SKIPJACK</a>
20 {
21  class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<SKIPJACK_Info>
22  {
23  public:
24  void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs &params);
25  unsigned int OptimalDataAlignment() const {return GetAlignmentOf<word16>();}
26 
27  protected:
28  static const byte fTable[256];
29 
31  };
32 
33  class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Enc : public Base
34  {
35  public:
36  void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
37  private:
38  static const byte Se[256];
39  static const word32 Te[4][256];
40  };
41 
42  class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Dec : public Base
43  {
44  public:
45  void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
46  private:
47  static const byte Sd[256];
48  static const word32 Td[4][256];
49  };
50 
51 public:
54 };
55 
58 
59 NAMESPACE_END
60 
61 #endif
to be inherited by keyed algorithms with fixed key length
Definition: seckey.h:66
These objects usually should not be used directly. See CipherModeDocumentation instead.
Definition: seckey.h:188
interface for one direction (encryption or decryption) of a block cipher
Definition: cryptlib.h:603
to be inherited by block ciphers with fixed block size
Definition: seckey.h:21
SKIPJACK
Definition: skipjack.h:19
interface for retrieving values given their names
Definition: cryptlib.h:224