23 #ifndef SKINNY128_CIPHER_h
24 #define SKINNY128_CIPHER_h
47 #define SKINNY128_BLOCK_SIZE 16
52 #define SKINNY128_MAX_ROUNDS 56
326 (
void *output,
const void *input,
size_t size,
Skinny128CTR_t *ctr);
Union that describes a 64-bit 2x4 array of cells.
State information for Skinny-128 in CTR mode.
int skinny128_ctr_set_key(Skinny128CTR_t *ctr, const void *key, unsigned size)
Sets the key schedule for a Skinny128 block cipher in CTR mode.
#define SKINNY128_MAX_ROUNDS
Maximum number of rounds for Skinny128 block ciphers.
Key schedule for Skinny128 block ciphers when a tweak is in use.
int skinny128_ctr_encrypt(void *output, const void *input, size_t size, Skinny128CTR_t *ctr)
Encrypt a block of data using Skinny-128 in CTR mode.
int skinny128_set_tweaked_key(Skinny128TweakedKey_t *ks, const void *key, unsigned key_size)
Sets the key schedule for a Skinny128 block cipher, and prepare for tweaked encryption.
int skinny128_ctr_set_tweak(Skinny128CTR_t *ctr, const void *tweak, unsigned tweak_size)
Changes the tweak value for a previously-initialized key schedule.
void skinny128_ecb_encrypt(void *output, const void *input, const Skinny128Key_t *ks)
Encrypts a single block using the Skinny128 block cipher in ECB mode.
Key schedule for Skinny128 block ciphers.
Union that describes a 128-bit 4x4 array of cells.
void skinny128_ecb_decrypt(void *output, const void *input, const Skinny128Key_t *ks)
Decrypts a single block using the Skinny128 block cipher in ECB mode.
int skinny128_set_key(Skinny128Key_t *ks, const void *key, unsigned size)
Sets the key schedule for a Skinny128 block cipher.
int skinny128_ctr_init(Skinny128CTR_t *ctr)
Initializes Skinny-128 in CTR mode.
#define SKINNY128_BLOCK_SIZE
Size of a block for Skinny128 block ciphers.
int skinny128_ctr_set_counter(Skinny128CTR_t *ctr, const void *counter, unsigned size)
Sets the counter value in a Skinny-128 CTR control block.
int skinny128_set_tweak(Skinny128TweakedKey_t *ks, const void *tweak, unsigned tweak_size)
Changes the tweak value for a previously-initialized key schedule.
int skinny128_ctr_set_tweaked_key(Skinny128CTR_t *ctr, const void *key, unsigned key_size)
Sets the key schedule for a Skinny128 block cipher in CTR mode, and prepare for tweaked encryption...
void skinny128_ctr_cleanup(Skinny128CTR_t *ctr)
Cleans up a CTR control block for Skinny-128.