9#ifndef CRYPTOPP_THREEFISH_H
10#define CRYPTOPP_THREEFISH_H
24template <
unsigned int BS>
27 static const std::string StaticAlgorithmName()
39template <
unsigned int BS>
53 m_tweak[2] = m_tweak[0] ^ m_tweak[1];
57 std::memset(m_tweak.begin(), 0x00, 24);
81 void UncheckedSetKey(
const byte *userKey,
unsigned int keyLength,
const NameValuePairs ¶ms);
88 class CRYPTOPP_NO_VTABLE
Enc :
public Base
91 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock,
byte *outBlock)
const;
98 class CRYPTOPP_NO_VTABLE
Dec :
public Base
101 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock,
byte *outBlock)
const;
125 void UncheckedSetKey(
const byte *userKey,
unsigned int keyLength,
const NameValuePairs ¶ms);
135 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock,
byte *outBlock)
const;
145 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock,
byte *outBlock)
const;
169 void UncheckedSetKey(
const byte *userKey,
unsigned int keyLength,
const NameValuePairs ¶ms);
179 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock,
byte *outBlock)
const;
189 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock,
byte *outBlock)
const;
Classes for working with NameValuePairs.
Standard names for retrieving values by name when working with NameValuePairs.
Provides class member functions to key a block cipher.
Provides a base implementation of Algorithm and SimpleKeyingInterface for block ciphers.
Used to pass byte array input as part of a NameValuePairs object.
const byte * begin() const
Pointer to the first byte in the memory block.
size_t size() const
Length of the memory block.
Inherited by algorithms with fixed block size.
Inherited by keyed algorithms with fixed key length.
Interface for retrieving values given their names.
bool GetValue(const char *name, T &value) const
Get a named value.
Secure memory block with allocator and cleanup.
Threefish block cipher transformation functions.
Encryption transformation.
Encryption transformation.
Threefish 1024-bit block cipher.
Threefish block cipher transformation functions.
Decryption transformation.
Encryption transformation.
Threefish 256-bit block cipher.
Threefish block cipher transformation functions.
Decryption transformation.
Encryption transformation.
Threefish 512-bit block cipher.
Library configuration file.
@ LITTLE_ENDIAN_ORDER
byte order is little-endian
std::string IntToString(T value, unsigned int base=10)
Converts a value to a string.
void GetUserKey(ByteOrder order, T *out, size_t outlen, const byte *in, size_t inlen)
Copy bytes in a buffer to an array of elements in big-endian order.
Crypto++ library namespace.
const char * Tweak()
ConstByteArrayParameter.
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.
Threefish block cipher base class.
Threefish block cipher information.
#define CRYPTOPP_ASSERT(exp)
Debugging and diagnostic assertion.