1
#ifndef CRYPTOPP_SKIPJACK_H
2
#define CRYPTOPP_SKIPJACK_H
10
NAMESPACE_BEGIN(CryptoPP)
12
struct SKIPJACK_Info : public FixedBlockSize<8>, public FixedKeyLength<10>
14
static const char *StaticAlgorithmName() {return "SKIPJACK";}
17
/// <a href="http://www.weidai.com/scan-mirror/cs.html#SKIPJACK">SKIPJACK</a>
18
class SKIPJACK : public SKIPJACK_Info, public BlockCipherDocumentation
20
class Base : public BlockCipherBaseTemplate<SKIPJACK_Info>
23
void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length);
26
static const byte fTable[256];
28
FixedSizeSecBlock<byte[256], 10> tab;
31
class Enc : public Base
34
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
36
static const byte Se[256];
37
static const word32 Te[4][256];
40
class Dec : public Base
43
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
45
static const byte Sd[256];
46
static const word32 Td[4][256];
50
typedef BlockCipherTemplate<ENCRYPTION, Enc> Encryption;
51
typedef BlockCipherTemplate<DECRYPTION, Dec> Decryption;
54
typedef SKIPJACK::Encryption SKIPJACKEncryption;
55
typedef SKIPJACK::Decryption SKIPJACKDecryption;