Security Scol plugin
shacal2.h
Go to the documentation of this file.
1// shacal.h - originally written and placed in the public domain by Wei Dai
2
6
7#ifndef CRYPTOPP_SHACAL2_H
8#define CRYPTOPP_SHACAL2_H
9
10#include "seckey.h"
11#include "secblock.h"
12
13NAMESPACE_BEGIN(CryptoPP)
14
15
16struct SHACAL2_Info : public FixedBlockSize<32>, public VariableKeyLength<16, 16, 64>
17{
18 CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "SHACAL-2";}
19};
20
25{
28 class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<SHACAL2_Info>
29 {
30 public:
31 std::string AlgorithmProvider() const;
32 void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs &params);
33
34 protected:
36
37 static const word32 K[64];
38 };
39
42 class CRYPTOPP_NO_VTABLE Enc : public Base
43 {
44 public:
45 void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
46 };
47
50 class CRYPTOPP_NO_VTABLE Dec : public Base
51 {
52 public:
53 void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
54 };
55
56public:
59};
60
63
64NAMESPACE_END
65
66#endif
Provides class member functions to key a block cipher.
Definition seckey.h:318
Provides a base implementation of Algorithm and SimpleKeyingInterface for block ciphers.
Definition seckey.h:306
Inherited by algorithms with fixed block size.
Definition seckey.h:41
Fixed size stack-based SecBlock with 16-byte alignment.
Definition secblock.h:1259
Interface for retrieving values given their names.
Definition cryptlib.h:322
SHACAL2 block cipher.
Definition shacal2.h:25
Inherited by keyed algorithms with variable key length.
Definition seckey.h:166
unsigned int word32
32-bit unsigned datatype
Definition config_int.h:62
Classes and functions for secure memory allocations.
Classes and functions for implementing secret key algorithms.
Provides Encryption and Decryption typedefs used by derived classes to implement a block cipher.
Definition seckey.h:399
SHACAL2 block cipher information.
Definition shacal2.h:17