13 #ifndef CRYPTOPP_SPECK_H 14 #define CRYPTOPP_SPECK_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 # define CRYPTOPP_SPECK64_ADVANCED_PROCESS_BLOCKS 1 26 #if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || \ 27 CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8 || \ 28 CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64 29 # define CRYPTOPP_SPECK128_ADVANCED_PROCESS_BLOCKS 1 34 #if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x5120) 35 # undef CRYPTOPP_SPECK64_ADVANCED_PROCESS_BLOCKS 36 # undef CRYPTOPP_SPECK128_ADVANCED_PROCESS_BLOCKS 47 template <
unsigned int L,
unsigned int D,
unsigned int N,
unsigned int M>
73 mutable AlignedSecBlock m_wspace;
74 AlignedSecBlock m_rkeys;
75 unsigned int m_kwords;
76 unsigned int m_rounds;
103 "(" +
IntToString(m_kwords*
sizeof(word32)*8) +
")");
106 std::string AlgorithmProvider()
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;
120 #if CRYPTOPP_SPECK64_ADVANCED_PROCESS_BLOCKS 121 size_t AdvancedProcessBlocks(
const byte *inBlocks,
const byte *xorBlocks, byte *outBlocks,
size_t length, word32 flags)
const;
132 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock, byte *outBlock)
const;
133 #if CRYPTOPP_SPECK64_ADVANCED_PROCESS_BLOCKS 134 size_t AdvancedProcessBlocks(
const byte *inBlocks,
const byte *xorBlocks, byte *outBlocks,
size_t length, word32 flags)
const;
166 "(" +
IntToString(m_kwords*
sizeof(word64)*8) +
")");
169 std::string AlgorithmProvider()
const;
172 void UncheckedSetKey(
const byte *userKey,
unsigned int keyLength,
const NameValuePairs ¶ms);
182 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock, byte *outBlock)
const;
183 #if CRYPTOPP_SPECK128_ADVANCED_PROCESS_BLOCKS 184 size_t AdvancedProcessBlocks(
const byte *inBlocks,
const byte *xorBlocks, byte *outBlocks,
size_t length, word32 flags)
const;
195 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock, byte *outBlock)
const;
196 #if CRYPTOPP_SPECK128_ADVANCED_PROCESS_BLOCKS 197 size_t AdvancedProcessBlocks(
const byte *inBlocks,
const byte *xorBlocks, byte *outBlocks,
size_t length, word32 flags)
const;
207 #endif // CRYPTOPP_SPECK_H std::string AlgorithmName() const
The algorithm name.
Provides Encryption and Decryption typedefs used by derived classes to implement a block cipher...
Encryption transformation.
Secure memory block with allocator and cleanup.
Library configuration file.
SPECK block cipher transformation functions.
Interface for one direction (encryption or decryption) of a block cipher.
SPECK block cipher base class.
Classes and functions for secure memory allocations.
Inherited by algorithms with fixed block size.
std::string AlgorithmName() const
The algorithm name.
SPECK block cipher transformation functions.
Classes and functions for implementing secret key algorithms.
Encryption transformation.
SPECK 128-bit block cipher.
Encryption transformation.
Inherited by keyed algorithms with variable key length.
std::string IntToString(T value, unsigned int base=10)
Converts a value to a string.
SPECK 64-bit block cipher.
Provides a base implementation of Algorithm and SimpleKeyingInterface for block ciphers.
Crypto++ library namespace.
Encryption transformation.
static const std::string StaticAlgorithmName()
The algorithm name.
SPECK block cipher information.
Interface for retrieving values given their names.