Crypto++
8.2
Free C++ class library of cryptographic schemes
|
Go to the documentation of this file.
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_SIMON64_ADVANCED_PROCESS_BLOCKS 1
28 #if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || \
29 CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8 || \
30 CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64
31 # ifndef CRYPTOPP_DISABLE_SIMON_SIMD
32 # define CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS 1
38 #if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x5120)
39 # undef CRYPTOPP_SIMON64_ADVANCED_PROCESS_BLOCKS
40 # undef CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS
51 template <
unsigned int L,
unsigned int D,
unsigned int N,
unsigned int M>
79 unsigned int m_kwords;
80 unsigned int m_rounds;
107 "(" +
IntToString(m_kwords*
sizeof(word32)*8) +
")");
110 std::string AlgorithmProvider()
const;
113 void UncheckedSetKey(
const byte *userKey,
unsigned int keyLength,
const NameValuePairs ¶ms);
123 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock,
byte *outBlock)
const;
124 #if CRYPTOPP_SIMON64_ADVANCED_PROCESS_BLOCKS
125 size_t AdvancedProcessBlocks(
const byte *inBlocks,
const byte *xorBlocks,
byte *outBlocks,
size_t length, word32 flags)
const;
136 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock,
byte *outBlock)
const;
137 #if CRYPTOPP_SIMON64_ADVANCED_PROCESS_BLOCKS
138 size_t AdvancedProcessBlocks(
const byte *inBlocks,
const byte *xorBlocks,
byte *outBlocks,
size_t length, word32 flags)
const;
170 "(" +
IntToString(m_kwords*
sizeof(word64)*8) +
")");
173 std::string AlgorithmProvider()
const;
176 void UncheckedSetKey(
const byte *userKey,
unsigned int keyLength,
const NameValuePairs ¶ms);
186 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock,
byte *outBlock)
const;
187 #if CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS
188 size_t AdvancedProcessBlocks(
const byte *inBlocks,
const byte *xorBlocks,
byte *outBlocks,
size_t length, word32 flags)
const;
199 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock,
byte *outBlock)
const;
200 #if CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS
201 size_t AdvancedProcessBlocks(
const byte *inBlocks,
const byte *xorBlocks,
byte *outBlocks,
size_t length, word32 flags)
const;
211 #endif // CRYPTOPP_SIMON_H
Encryption transformation.
Encryption transformation.
Encryption transformation.
Encryption transformation.
Classes and functions for secure memory allocations.
SIMON 128-bit block cipher.
SIMON block cipher information.
SIMON 64-bit block cipher.
Inherited by algorithms with fixed block size.
Provides a base implementation of Algorithm and SimpleKeyingInterface for block ciphers.
std::string AlgorithmName() const
The algorithm name.
std::string AlgorithmName() const
The algorithm name.
std::string IntToString(T value, unsigned int base=10)
Converts a value to a string.
Provides Encryption and Decryption typedefs used by derived classes to implement a block cipher.
SIMON block cipher transformation functions.
Classes and functions for implementing secret key algorithms.
SIMON block cipher base class.
static std::string StaticAlgorithmName()
The algorithm name.
static const std::string StaticAlgorithmName()
The algorithm name.
Crypto++ library namespace.
SIMON block cipher transformation functions.
Library configuration file.
Interface for one direction (encryption or decryption) of a block cipher.
Secure memory block with allocator and cleanup.
Interface for retrieving values given their names.
Inherited by keyed algorithms with variable key length.