23 #ifndef CRYPTO_SKINNY64_h
24 #define CRYPTO_SKINNY64_h
26 #include "BlockCipher.h"
35 void encryptBlock(uint8_t *output,
const uint8_t *input);
36 void decryptBlock(uint8_t *output,
const uint8_t *input);
41 Skinny64(uint32_t *schedule, uint8_t rounds);
43 void setTK1(
const uint8_t *key,
bool tweaked =
false);
44 void xorTK1(
const uint8_t *key);
45 void setTK2(
const uint8_t *key);
46 void setTK3(
const uint8_t *key);
58 bool setTweak(
const uint8_t *tweak,
size_t len);
79 bool setKey(
const uint8_t *key,
size_t len);
93 bool setKey(
const uint8_t *key,
size_t len);
107 bool setKey(
const uint8_t *key,
size_t len);
121 bool setKey(
const uint8_t *key,
size_t len);
135 bool setKey(
const uint8_t *key,
size_t len);
void encryptBlock(uint8_t *output, const uint8_t *input)
Encrypts a single block using this cipher.
void resetTweak()
Resets the tweak to all-zeroes.
SKINNY block cipher with a 64-bit block and a 128-bit key.
SKINNY block cipher with a 64-bit block and a 64-bit key.
size_t keySize() const
Size of a Skinny64_128_Tweaked key in bytes.
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
Skinny64_128_Tweaked()
Constructs a tweakable Skinny-64 block cipher with a 64-bit key and a 64-bit tweak.
void clear()
Clears all security-sensitive state from this block cipher.
size_t keySize() const
Size of a Skinny64_128 key in bytes.
Abstract base class for block ciphers.
size_t keySize() const
Size of a Skinny64_192 key in bytes.
virtual ~Skinny64_64()
Destroys this Skinny-64 block cipher object after clearing sensitive information. ...
void xorTK1(const uint8_t *key)
XOR's the key schedule with the schedule for TK1.
virtual ~Skinny64_192_Tweaked()
Destroys this tweakable Skinny-64 block cipher object after clearing sensitive information.
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
virtual ~Skinny64_192()
Destroys this Skinny-64 block cipher object after clearing sensitive information. ...
SKINNY block cipher with a 64-bit block, a 128-bit key, and a 64-bit tweak.
size_t blockSize() const
Size of a Skinny-64 block in bytes.
size_t keySize() const
Size of a Skinny64_64 key in bytes.
Abstract base class for SKINNY block ciphers with 64-bit blocks.
Skinny64_Tweaked(uint32_t *schedule, uint8_t rounds)
Constructs a tweakable Skinny-64 block cipher object.
size_t keySize() const
Size of a Skinny64_192_Tweaked key in bytes.
void setTK3(const uint8_t *key)
XOR's the key schedule with the schedule for TK3.
Skinny64_192_Tweaked()
Constructs a tweakable Skinny-64 block cipher with a 128-bit key and a 64-bit tweak.
Skinny64_128()
Constructs a Skinny-64 block cipher with a 128-bit key.
virtual ~Skinny64_128_Tweaked()
Destroys this tweakable Skinny-64 block cipher object after clearing sensitive information.
Skinny64(uint32_t *schedule, uint8_t rounds)
Constructs a Skinny-64 block cipher object.
void setTK1(const uint8_t *key, bool tweaked=false)
Clears the key schedule and sets it to the schedule for TK1.
bool setTweak(const uint8_t *tweak, size_t len)
Sets the 64-bit tweak value for this block cipher.
Skinny64_64()
Constructs a Skinny-64 block cipher with a 64-bit key.
virtual ~Skinny64()
Destroys this Skinny-64 block cipher object after clearing sensitive information. ...
void clear()
Clears all security-sensitive state from this block cipher.
virtual ~Skinny64_Tweaked()
Destroys this tweakable Skinny-64 block cipher object after clearing sensitive information.
SKINNY block cipher with a 64-bit block, a 64-bit key, and a 64-bit tweak.
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
void decryptBlock(uint8_t *output, const uint8_t *input)
Decrypts a single block using this cipher.
Skinny64_192()
Constructs a Skinny-64 block cipher with a 192-bit key.
SKINNY block cipher with a 64-bit block and a 192-bit key.
virtual ~Skinny64_128()
Destroys this Skinny-64 block cipher object after clearing sensitive information. ...
Abstract base class for SKINNY tweakable block ciphers with 64-bit blocks.
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
void setTK2(const uint8_t *key)
XOR's the key schedule with the schedule for TK2.
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.