13 #ifndef CRYPTOPP_SIMON_H 14 #define CRYPTOPP_SIMON_H 20 #if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || \ 21 CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8 || \ 22 CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64 23 # ifndef CRYPTOPP_DISABLE_SIMON_SIMD 24 # define CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS 1 30 #if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x5120) 31 # undef CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS 42 template <
unsigned int L,
unsigned int D,
unsigned int N,
unsigned int M>
70 unsigned int m_kwords;
71 unsigned int m_rounds;
101 std::string AlgorithmProvider()
const;
106 unsigned int OptimalDataAlignment()
const;
109 void UncheckedSetKey(
const byte *userKey,
unsigned int keyLength,
const NameValuePairs ¶ms);
119 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock,
byte *outBlock)
const;
129 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock,
byte *outBlock)
const;
163 std::string AlgorithmProvider()
const;
168 unsigned int OptimalDataAlignment()
const;
171 void UncheckedSetKey(
const byte *userKey,
unsigned int keyLength,
const NameValuePairs ¶ms);
181 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock,
byte *outBlock)
const;
182 #if CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS 183 size_t AdvancedProcessBlocks(
const byte *inBlocks,
const byte *xorBlocks,
byte *outBlocks,
size_t length,
word32 flags)
const;
194 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock,
byte *outBlock)
const;
195 #if CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS 196 size_t AdvancedProcessBlocks(
const byte *inBlocks,
const byte *xorBlocks,
byte *outBlocks,
size_t length,
word32 flags)
const;
206 #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...
SIMON128 decryption transformation.
std::string AlgorithmName() const
The algorithm name.
unsigned int word32
32-bit unsigned datatype
Secure memory block with allocator and cleanup.
SIMON128 encryption transformation.
Library configuration file.
static const std::string StaticAlgorithmName()
The algorithm name.
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.
SIMON64 encryption transformation.
std::string AlgorithmName() const
The algorithm name.
SIMON64 block cipher base implementation.
Classes and functions for implementing secret key algorithms.
unsigned long long word64
64-bit unsigned datatype
SIMON 128-bit block cipher.
Inherited by keyed algorithms with variable key length.
SIMON64 decryption transformation.
unsigned char byte
8-bit unsigned datatype
SIMON128 block cipher base implementation.
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.