Crypto++
gost.h
Go to the documentation of this file.
1 #ifndef CRYPTOPP_GOST_H
2 #define CRYPTOPP_GOST_H
3 
4 /** \file
5 */
6 
7 #include "seckey.h"
8 #include "secblock.h"
9 
10 NAMESPACE_BEGIN(CryptoPP)
11 
12 //! _
13 struct GOST_Info : public FixedBlockSize<8>, public FixedKeyLength<32>
14 {
15  static const char *StaticAlgorithmName() {return "GOST";}
16 };
17 
18 /// <a href="http://www.weidai.com/scan-mirror/cs.html#GOST">GOST</a>
19 class GOST : public GOST_Info, public BlockCipherDocumentation
20 {
21  class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<GOST_Info>
22  {
23  public:
24  void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs &params);
25 
26  protected:
27  static void PrecalculateSTable();
28 
29  static const byte sBox[8][16];
30  static volatile bool sTableCalculated;
31  static word32 sTable[4][256];
32 
34  };
35 
36  class CRYPTOPP_NO_VTABLE Enc : public Base
37  {
38  public:
39  void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
40  };
41 
42  class CRYPTOPP_NO_VTABLE Dec : public Base
43  {
44  public:
45  void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
46  };
47 
48 public:
51 };
52 
55 
56 NAMESPACE_END
57 
58 #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
to be inherited by block ciphers with fixed block size
Definition: seckey.h:21
_
Definition: gost.h:13
GOST
Definition: gost.h:19
interface for retrieving values given their names
Definition: cryptlib.h:224