Security Scol plugin
serpent.h
Go to the documentation of this file.
1// serpent.h - originally written and placed in the public domain by Wei Dai
2
7
8#ifndef CRYPTOPP_SERPENT_H
9#define CRYPTOPP_SERPENT_H
10
11#include "seckey.h"
12#include "secblock.h"
13
14NAMESPACE_BEGIN(CryptoPP)
15
16
18struct Serpent_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 16, 32, 8>, public FixedRounds<32>
19{
20 CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "Serpent";}
21};
22
29{
33 class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<Serpent_Info>
34 {
35 public:
36 void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs &params);
37
38 protected:
40 };
41
46 class CRYPTOPP_NO_VTABLE Enc : public Base
47 {
48 public:
49 void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
50 };
51
56 class CRYPTOPP_NO_VTABLE Dec : public Base
57 {
58 public:
59 void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
60 };
61
62public:
65};
66
69
70NAMESPACE_END
71
72#endif // CRYPTOPP_SERPENT_H
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 algorithms with fixed number of rounds.
Definition seckey.h:53
Fixed size stack-based SecBlock.
Definition secblock.h:1246
Interface for retrieving values given their names.
Definition cryptlib.h:322
Serpent block cipher.
Definition serpent.h:29
Inherited by keyed algorithms with variable key length.
Definition seckey.h:166
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
Serpent block cipher information.
Definition serpent.h:19