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
42template <
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;
Provides class member functions to key a block cipher.
Provides a base implementation of Algorithm and SimpleKeyingInterface for block ciphers.
Inherited by algorithms with fixed block size.
Interface for retrieving values given their names.
SIMON128 block cipher base implementation.
std::string AlgorithmName() const
The algorithm name.
SIMON128 decryption transformation.
SIMON128 encryption transformation.
SIMON 128-bit block cipher.
SIMON64 block cipher base implementation.
std::string AlgorithmName() const
The algorithm name.
SIMON64 decryption transformation.
SIMON64 encryption transformation.
SIMON 64-bit block cipher.
Secure memory block with allocator and cleanup.
Inherited by keyed algorithms with variable key length.
Library configuration file.
unsigned int word32
32-bit unsigned datatype
unsigned long long word64
64-bit unsigned datatype
std::string IntToString(T value, unsigned int base=10)
Converts a value to a string.
Crypto++ library namespace.
Classes and functions for secure memory allocations.
Classes and functions for implementing secret key algorithms.
Provides Encryption and Decryption typedefs used by derived classes to implement a block cipher.
BlockCipher Decryption
implements the BlockCipher interface
BlockCipher Encryption
implements the BlockCipher interface
SIMON block cipher base class.
SIMON block cipher information.
static const std::string StaticAlgorithmName()
The algorithm name.