Security Scol plugin
skipjack.h
Go to the documentation of this file.
1// skipjack.h - originally written and placed in the public domain by Wei Dai
2
11// Crypto++ wiki
12
13#ifndef CRYPTOPP_SKIPJACK_H
14#define CRYPTOPP_SKIPJACK_H
15
16#include "seckey.h"
17#include "secblock.h"
18
19NAMESPACE_BEGIN(CryptoPP)
20
21
22struct SKIPJACK_Info : public FixedBlockSize<8>, public FixedKeyLength<10>
23{
24 CRYPTOPP_DLL static const char * CRYPTOPP_API StaticAlgorithmName() {return "SKIPJACK";}
25};
26
36{
38 class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<SKIPJACK_Info>
39 {
40 public:
41 void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs &params);
42 unsigned int OptimalDataAlignment() const {return GetAlignmentOf<word16>();}
43
44 protected:
45 static const byte fTable[256];
46
48 };
49
51 class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Enc : public Base
52 {
53 public:
54 void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
55 private:
56 static const byte Se[256];
57 static const word32 Te[4][256];
58 };
59
61 class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Dec : public Base
62 {
63 public:
64 void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
65 private:
66 static const byte Sd[256];
67 static const word32 Td[4][256];
68 };
69
70public:
73};
74
77
78NAMESPACE_END
79
80#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
SKIPJACK block cipher.
Definition skipjack.h:36
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
SKIPJACK block cipher information.
Definition skipjack.h:23