Crypto++ 8.6 Free C++ class library of cryptographic schemes

seed.h
Go to the documentation of this file.
1 // seed.h - originally written and placed in the public domain by Wei Dai
2
3 /// \file seed.h
4 /// \brief Classes for the SEED block cipher
5 /// \since Crypto++ 5.6.0
6
7 #ifndef CRYPTOPP_SEED_H
8 #define CRYPTOPP_SEED_H
9
10 #include "seckey.h"
11 #include "secblock.h"
12
13 NAMESPACE_BEGIN(CryptoPP)
14
15 /// \brief SEED block cipher information
16 /// \since Crypto++ 5.6.0
17 struct SEED_Info : public FixedBlockSize<16>, public FixedKeyLength<16>, public FixedRounds<16>
18 {
19 CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "SEED";}
20 };
21
22 /// \brief SEED block cipher
23 /// \sa <a href="http://www.cryptolounge.org/wiki/SEED">SEED</a>
24 /// \since Crypto++ 5.6.0
25 class SEED : public SEED_Info, public BlockCipherDocumentation
26 {
27 class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<SEED_Info>
28 {
29 public:
30 void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs &params);
31 void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
32
33 protected:
34 FixedSizeSecBlock<word32, 32> m_k;
35 };
36
37 public:
38 typedef BlockCipherFinal<ENCRYPTION, Base> Encryption;
39 typedef BlockCipherFinal<DECRYPTION, Base> Decryption;
40 };
41
42 NAMESPACE_END
43
44 #endif
secblock.h
Classes and functions for secure memory allocations.
SEED_Info
SEED block cipher information.
Definition: seed.h:17
FixedBlockSize
Inherited by algorithms with fixed block size.
Definition: seckey.h:40
BlockCipherImpl
Provides a base implementation of Algorithm and SimpleKeyingInterface for block ciphers.
Definition: seckey.h:305
FixedKeyLength
Inherited by keyed algorithms with fixed key length.
Definition: seckey.h:124
BlockCipherDocumentation
Provides Encryption and Decryption typedefs used by derived classes to implement a block cipher.
Definition: seckey.h:398
seckey.h
Classes and functions for implementing secret key algorithms.
BlockCipherFinal
Provides class member functions to key a block cipher.
Definition: seckey.h:317
FixedSizeSecBlock< word32, 32 >
CryptoPP
Crypto++ library namespace.
BlockCipher
Interface for one direction (encryption or decryption) of a block cipher.
Definition: cryptlib.h:1282
NameValuePairs
Interface for retrieving values given their names.
Definition: cryptlib.h:321
FixedRounds
Inherited by algorithms with fixed number of rounds.
Definition: seckey.h:52
SEED
SEED block cipher.
Definition: seed.h:25