13 #ifndef CRYPTOPP_SIMON_H 14 #define CRYPTOPP_SIMON_H 20 #if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64 21 # define CRYPTOPP_SIMON64_ADVANCED_PROCESS_BLOCKS 1 24 #if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64 25 # define CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS 1 36 template <
unsigned int L,
unsigned int D,
unsigned int N,
unsigned int M>
39 static const std::string StaticAlgorithmName()
60 unsigned int m_kwords;
61 unsigned int m_rounds;
84 "(" +
IntToString(m_kwords*
sizeof(word32)*8) +
")");
88 void UncheckedSetKey(
const byte *userKey,
unsigned int keyLength,
const NameValuePairs ¶ms);
95 class CRYPTOPP_NO_VTABLE
Enc :
public Base 98 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock, byte *outBlock)
const;
99 #if CRYPTOPP_SIMON64_ADVANCED_PROCESS_BLOCKS 100 size_t AdvancedProcessBlocks(
const byte *inBlocks,
const byte *xorBlocks, byte *outBlocks,
size_t length, word32 flags)
const;
111 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock, byte *outBlock)
const;
112 #if CRYPTOPP_SIMON64_ADVANCED_PROCESS_BLOCKS 113 size_t AdvancedProcessBlocks(
const byte *inBlocks,
const byte *xorBlocks, byte *outBlocks,
size_t length, word32 flags)
const;
141 "(" +
IntToString(m_kwords*
sizeof(word64)*8) +
")");
145 void UncheckedSetKey(
const byte *userKey,
unsigned int keyLength,
const NameValuePairs ¶ms);
155 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock, byte *outBlock)
const;
156 #if CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS 157 size_t AdvancedProcessBlocks(
const byte *inBlocks,
const byte *xorBlocks, byte *outBlocks,
size_t length, word32 flags)
const;
168 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock, byte *outBlock)
const;
169 #if CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS 170 size_t AdvancedProcessBlocks(
const byte *inBlocks,
const byte *xorBlocks, byte *outBlocks,
size_t length, word32 flags)
const;
180 #endif // CRYPTOPP_SIMON_H static std::string StaticAlgorithmName()
The algorithm name.
Provides Encryption and Decryption typedefs used by derived classes to implement a block cipher...
Provides implementation for encryption transformation.
std::string AlgorithmName() const
The algorithm name.
Secure memory block with allocator and cleanup.
Provides implementation for encryption transformation.
Library configuration file.
Interface for one direction (encryption or decryption) of a block cipher.
Classes and functions for secure memory allocations.
Inherited by algorithms with fixed block size.
SIMON 64-bit block cipher.
Provides implementation for encryption transformation.
SIMON block cipher transformation functions.
Classes and functions for implementing secret key algorithms.
SIMON 128-bit block cipher.
Inherited by keyed algorithms with variable key length.
Provides implementation for encryption transformation.
SIMON block cipher transformation functions.
std::string IntToString(T value, unsigned int base=10)
Converts a value to a string.
Provides a base implementation of Algorithm and SimpleKeyingInterface for block ciphers.
Crypto++ library namespace.
SIMON block cipher information.
SIMON block cipher base class.
Interface for retrieving values given their names.