Skinny-C
 All Data Structures Files Functions Variables Groups Pages
Public Member Functions
Skinny64_192_Tweaked Class Reference

SKINNY block cipher with a 64-bit block, a 128-bit key, and a 64-bit tweak. More...

#include <Skinny64.h>

Inheritance diagram for Skinny64_192_Tweaked:
Skinny64_Tweaked Skinny64 BlockCipher

Public Member Functions

 Skinny64_192_Tweaked ()
 Constructs a tweakable Skinny-64 block cipher with a 128-bit key and a 64-bit tweak.
 
virtual ~Skinny64_192_Tweaked ()
 Destroys this tweakable Skinny-64 block cipher object after clearing sensitive information.
 
size_t keySize () const
 Size of a Skinny64_192_Tweaked key in bytes. More...
 
bool setKey (const uint8_t *key, size_t len)
 Sets the key to use for future encryption and decryption operations. More...
 
- Public Member Functions inherited from Skinny64_Tweaked
virtual ~Skinny64_Tweaked ()
 Destroys this tweakable Skinny-64 block cipher object after clearing sensitive information.
 
bool setTweak (const uint8_t *tweak, size_t len)
 Sets the 64-bit tweak value for this block cipher. More...
 
void clear ()
 Clears all security-sensitive state from this block cipher. More...
 
- Public Member Functions inherited from Skinny64
virtual ~Skinny64 ()
 Destroys this Skinny-64 block cipher object after clearing sensitive information.
 
size_t blockSize () const
 Size of a Skinny-64 block in bytes. More...
 
void encryptBlock (uint8_t *output, const uint8_t *input)
 Encrypts a single block using this cipher. More...
 
void decryptBlock (uint8_t *output, const uint8_t *input)
 Decrypts a single block using this cipher. More...
 
- Public Member Functions inherited from BlockCipher
 BlockCipher ()
 Constructs a block cipher.
 
virtual ~BlockCipher ()
 Destroys this block cipher object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Skinny64_Tweaked
 Skinny64_Tweaked (uint32_t *schedule, uint8_t rounds)
 Constructs a tweakable Skinny-64 block cipher object. More...
 
void resetTweak ()
 Resets the tweak to all-zeroes. More...
 
- Protected Member Functions inherited from Skinny64
 Skinny64 (uint32_t *schedule, uint8_t rounds)
 Constructs a Skinny-64 block cipher object. More...
 
void setTK1 (const uint8_t *key, bool tweaked=false)
 Clears the key schedule and sets it to the schedule for TK1. More...
 
void xorTK1 (const uint8_t *key)
 XOR's the key schedule with the schedule for TK1. More...
 
void setTK2 (const uint8_t *key)
 XOR's the key schedule with the schedule for TK2. More...
 
void setTK3 (const uint8_t *key)
 XOR's the key schedule with the schedule for TK3. More...
 

Detailed Description

SKINNY block cipher with a 64-bit block, a 128-bit key, and a 64-bit tweak.

See Also
Skinny64_192, Skinny64_Tweaked, Skinny64_128_Tweaked

Definition at line 127 of file Skinny64.h.

Member Function Documentation

size_t Skinny64_192_Tweaked::keySize ( ) const
virtual

Size of a Skinny64_192_Tweaked key in bytes.

Returns
Always returns 16.

Implements BlockCipher.

Definition at line 1263 of file Skinny64.cpp.

bool Skinny64_192_Tweaked::setKey ( const uint8_t *  key,
size_t  len 
)
virtual

Sets the key to use for future encryption and decryption operations.

Parameters
keyThe key to use.
lenThe length of the key.
Returns
Returns false if the key length is not supported, or the key is somehow "weak" and unusable by this cipher.

Use clear() or the destructor to remove the key and any other sensitive data from the object once encryption or decryption is complete.

See Also
keySize(), clear()

Implements BlockCipher.

Definition at line 1268 of file Skinny64.cpp.


The documentation for this class was generated from the following files: