Security Scol plugin
3way.h
Go to the documentation of this file.
1// 3way.h - originally written and placed in the public domain by Wei Dai
2
5
6#ifndef CRYPTOPP_THREEWAY_H
7#define CRYPTOPP_THREEWAY_H
8
9#include "config.h"
10#include "seckey.h"
11#include "secblock.h"
12
13NAMESPACE_BEGIN(CryptoPP)
14
15
16struct ThreeWay_Info : public FixedBlockSize<12>, public FixedKeyLength<12>, public VariableRounds<11>
17{
18 CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "3-Way";}
19};
20
24{
27 class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<ThreeWay_Info>
28 {
29 public:
30 void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs &params);
31
32 protected:
33 unsigned int m_rounds;
35 };
36
39 class CRYPTOPP_NO_VTABLE Enc : public Base
40 {
41 public:
42 void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
43 };
44
47 class CRYPTOPP_NO_VTABLE Dec : public Base
48 {
49 public:
50 void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
51 };
52
53public:
56};
57
60
61NAMESPACE_END
62
63#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
Inherited by keyed algorithms with fixed key length.
Definition seckey.h:125
Fixed size stack-based SecBlock.
Definition secblock.h:1246
Interface for retrieving values given their names.
Definition cryptlib.h:322
ThreeWay block cipher.
Definition 3way.h:24
Inherited by algorithms with variable number of rounds.
Definition seckey.h:65
Library configuration file.
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
ThreeWay block cipher information.
Definition 3way.h:17