Crypto++  5.6.3
Free C++ class library of cryptographic schemes
shacal2.h
1 // shacal.h - written and placed in the public domain by Wei Dai
2 
3 //! \file shacal.h
4 //! \brief Classes for the SHACAL-2 block cipher
5 
6 #ifndef CRYPTOPP_SHACAL2_H
7 #define CRYPTOPP_SHACAL2_H
8 
9 #include "seckey.h"
10 #include "secblock.h"
11 
12 NAMESPACE_BEGIN(CryptoPP)
13 
14 //! _
15 struct SHACAL2_Info : public FixedBlockSize<32>, public VariableKeyLength<16, 16, 64>
16 {
17  static const char *StaticAlgorithmName() {return "SHACAL-2";}
18 };
19 
20 /// <a href="http://www.weidai.com/scan-mirror/cs.html#SHACAL-2">SHACAL-2</a>
22 {
23  class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<SHACAL2_Info>
24  {
25  public:
26  void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs &params);
27 
28  protected:
30 
31  static const word32 K[64];
32  };
33 
34  class CRYPTOPP_NO_VTABLE Enc : public Base
35  {
36  public:
37  void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
38  };
39 
40  class CRYPTOPP_NO_VTABLE Dec : public Base
41  {
42  public:
43  void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
44  };
45 
46 public:
49 };
50 
53 
54 NAMESPACE_END
55 
56 #endif
SHACAL-2
Definition: shacal2.h:21
Provides Encryption and Decryption typedefs used by derived classes to implement a block cipher...
Definition: seckey.h:385
Interface for one direction (encryption or decryption) of a block cipher.
Definition: cryptlib.h:1013
Classes and functions for secure memory allocations.
Inherited by block ciphers with fixed block size.
Definition: seckey.h:34
Classes and functions for implementing secret key algorithms.
Inherited by keyed algorithms with variable key length.
Definition: seckey.h:152
Provides class member functions to access BlockCipher constants.
Definition: seckey.h:292
Crypto++ library namespace.
Interface for retrieving values given their names.
Definition: cryptlib.h:261