|
Lightweight Cryptography Primitives
|
ForkSkinny block cipher family. More...
#include "internal-util.h"Go to the source code of this file.
Data Structures | |
| struct | forkskinny_128_256_state_t |
| State information for ForkSkinny-128-256. More... | |
| struct | forkskinny_128_384_state_t |
| State information for ForkSkinny-128-384. More... | |
| struct | forkskinny_64_192_state_t |
| State information for ForkSkinny-64-192. More... | |
Functions | |
| void | forkskinny_128_256_rounds (forkskinny_128_256_state_t *state, unsigned first, unsigned last) |
| Applies several rounds of ForkSkinny-128-256. More... | |
| void | forkskinny_128_256_inv_rounds (forkskinny_128_256_state_t *state, unsigned first, unsigned last) |
| Applies several rounds of ForkSkinny-128-256 in reverse. More... | |
| void | forkskinny_128_256_forward_tk (forkskinny_128_256_state_t *state, unsigned rounds) |
| Forwards the tweakey for ForkSkinny-128-256. More... | |
| void | forkskinny_128_256_reverse_tk (forkskinny_128_256_state_t *state, unsigned rounds) |
| Reverses the tweakey for ForkSkinny-128-256. More... | |
| void | forkskinny_128_384_rounds (forkskinny_128_384_state_t *state, unsigned first, unsigned last) |
| Applies several rounds of ForkSkinny-128-384. More... | |
| void | forkskinny_128_384_inv_rounds (forkskinny_128_384_state_t *state, unsigned first, unsigned last) |
| Applies several rounds of ForkSkinny-128-384 in reverse. More... | |
| void | forkskinny_128_384_forward_tk (forkskinny_128_384_state_t *state, unsigned rounds) |
| Forwards the tweakey for ForkSkinny-128-384. More... | |
| void | forkskinny_128_384_reverse_tk (forkskinny_128_384_state_t *state, unsigned rounds) |
| Reverses the tweakey for ForkSkinny-128-384. More... | |
| void | forkskinny_64_192_rounds (forkskinny_64_192_state_t *state, unsigned first, unsigned last) |
| Applies several rounds of ForkSkinny-64-192. More... | |
| void | forkskinny_64_192_inv_rounds (forkskinny_64_192_state_t *state, unsigned first, unsigned last) |
| Applies several rounds of ForkSkinny-64-192 in reverse. More... | |
| void | forkskinny_64_192_forward_tk (forkskinny_64_192_state_t *state, unsigned rounds) |
| Forwards the tweakey for ForkSkinny-64-192. More... | |
| void | forkskinny_64_192_reverse_tk (forkskinny_64_192_state_t *state, unsigned rounds) |
| Reverses the tweakey for ForkSkinny-64-192. More... | |
| void | forkskinny_128_256_encrypt (const unsigned char key[32], unsigned char *output_left, unsigned char *output_right, const unsigned char *input) |
| Encrypts a block of plaintext with ForkSkinny-128-256. More... | |
| void | forkskinny_128_256_decrypt (const unsigned char key[32], unsigned char *output_left, unsigned char *output_right, const unsigned char *input) |
| Decrypts a block of ciphertext with ForkSkinny-128-256. More... | |
| void | forkskinny_128_384_encrypt (const unsigned char key[48], unsigned char *output_left, unsigned char *output_right, const unsigned char *input) |
| Encrypts a block of plaintext with ForkSkinny-128-384. More... | |
| void | forkskinny_128_384_decrypt (const unsigned char key[48], unsigned char *output_left, unsigned char *output_right, const unsigned char *input) |
| Decrypts a block of ciphertext with ForkSkinny-128-384. More... | |
| void | forkskinny_64_192_encrypt (const unsigned char key[24], unsigned char *output_left, unsigned char *output_right, const unsigned char *input) |
| Encrypts a block of input with ForkSkinny-64-192. More... | |
| void | forkskinny_64_192_decrypt (const unsigned char key[24], unsigned char *output_left, unsigned char *output_right, const unsigned char *input) |
| Decrypts a block of ciphertext with ForkSkinny-64-192. More... | |
ForkSkinny block cipher family.
ForkSkinny is a modified version of the SKINNY block cipher that supports "forking": half-way through the rounds the cipher is forked in two different directions to produce two different outputs.
References: https://www.esat.kuleuven.be/cosic/forkae/
| void forkskinny_128_256_decrypt | ( | const unsigned char | key[32], |
| unsigned char * | output_left, | ||
| unsigned char * | output_right, | ||
| const unsigned char * | input | ||
| ) |
Decrypts a block of ciphertext with ForkSkinny-128-256.
| key | 256-bit tweakey for ForkSkinny-128-256. |
| output_left | Left output block, which is the plaintext. |
| output_right | Right output block for the authentication tag. |
| input | 128-bit input ciphertext block. |
Both output blocks will be populated; neither is optional.
| void forkskinny_128_256_encrypt | ( | const unsigned char | key[32], |
| unsigned char * | output_left, | ||
| unsigned char * | output_right, | ||
| const unsigned char * | input | ||
| ) |
Encrypts a block of plaintext with ForkSkinny-128-256.
| key | 256-bit tweakey for ForkSkinny-128-256. |
| output_left | Left output block for the ciphertext, or NULL if the left output is not required. |
| output_right | Right output block for the authentication tag, or NULL if the right output is not required. |
| input | 128-bit input plaintext block. |
ForkSkinny-128-192 also uses this function with a padded tweakey.
| void forkskinny_128_256_forward_tk | ( | forkskinny_128_256_state_t * | state, |
| unsigned | rounds | ||
| ) |
Forwards the tweakey for ForkSkinny-128-256.
| state | Points to the ForkSkinny-128-256 state. |
| rounds | Number of rounds to forward by. |
| void forkskinny_128_256_inv_rounds | ( | forkskinny_128_256_state_t * | state, |
| unsigned | first, | ||
| unsigned | last | ||
| ) |
Applies several rounds of ForkSkinny-128-256 in reverse.
| state | State to apply the rounds to. |
| first | First round to apply plus 1. |
| last | Last round to apply. |
| void forkskinny_128_256_reverse_tk | ( | forkskinny_128_256_state_t * | state, |
| unsigned | rounds | ||
| ) |
Reverses the tweakey for ForkSkinny-128-256.
| state | Points to the ForkSkinny-128-256 state. |
| rounds | Number of rounds to reverse by. |
| void forkskinny_128_256_rounds | ( | forkskinny_128_256_state_t * | state, |
| unsigned | first, | ||
| unsigned | last | ||
| ) |
Applies several rounds of ForkSkinny-128-256.
| state | State to apply the rounds to. |
| first | First round to apply. |
| last | Last round to apply plus 1. |
| void forkskinny_128_384_decrypt | ( | const unsigned char | key[48], |
| unsigned char * | output_left, | ||
| unsigned char * | output_right, | ||
| const unsigned char * | input | ||
| ) |
Decrypts a block of ciphertext with ForkSkinny-128-384.
| key | 384-bit tweakey for ForkSkinny-128-384. |
| output_left | Left output block, which is the plaintext. |
| output_right | Right output block for the authentication tag. |
| input | 128-bit input ciphertext block. |
Both output blocks will be populated; neither is optional.
| void forkskinny_128_384_encrypt | ( | const unsigned char | key[48], |
| unsigned char * | output_left, | ||
| unsigned char * | output_right, | ||
| const unsigned char * | input | ||
| ) |
Encrypts a block of plaintext with ForkSkinny-128-384.
| key | 384-bit tweakey for ForkSkinny-128-384. |
| output_left | Left output block for the ciphertext, or NULL if the left output is not required. |
| output_right | Right output block for the authentication tag, or NULL if the right output is not required. |
| input | 128-bit input plaintext block. |
ForkSkinny-128-288 also uses this function with a padded tweakey.
| void forkskinny_128_384_forward_tk | ( | forkskinny_128_384_state_t * | state, |
| unsigned | rounds | ||
| ) |
Forwards the tweakey for ForkSkinny-128-384.
| state | Points to the ForkSkinny-128-384 state. |
| rounds | Number of rounds to forward by. |
| void forkskinny_128_384_inv_rounds | ( | forkskinny_128_384_state_t * | state, |
| unsigned | first, | ||
| unsigned | last | ||
| ) |
Applies several rounds of ForkSkinny-128-384 in reverse.
| state | State to apply the rounds to. |
| first | First round to apply plus 1. |
| last | Last round to apply. |
| void forkskinny_128_384_reverse_tk | ( | forkskinny_128_384_state_t * | state, |
| unsigned | rounds | ||
| ) |
Reverses the tweakey for ForkSkinny-128-384.
| state | Points to the ForkSkinny-128-384 state. |
| rounds | Number of rounds to reverse by. |
| void forkskinny_128_384_rounds | ( | forkskinny_128_384_state_t * | state, |
| unsigned | first, | ||
| unsigned | last | ||
| ) |
Applies several rounds of ForkSkinny-128-384.
| state | State to apply the rounds to. |
| first | First round to apply. |
| last | Last round to apply plus 1. |
| void forkskinny_64_192_decrypt | ( | const unsigned char | key[24], |
| unsigned char * | output_left, | ||
| unsigned char * | output_right, | ||
| const unsigned char * | input | ||
| ) |
Decrypts a block of ciphertext with ForkSkinny-64-192.
| key | 192-bit tweakey for ForkSkinny-64-192. |
| output_left | Left output block, which is the plaintext. |
| output_right | Right output block for the authentication tag. |
| input | 64-bit input ciphertext block. |
Both output blocks will be populated; neither is optional.
| void forkskinny_64_192_encrypt | ( | const unsigned char | key[24], |
| unsigned char * | output_left, | ||
| unsigned char * | output_right, | ||
| const unsigned char * | input | ||
| ) |
Encrypts a block of input with ForkSkinny-64-192.
| key | 192-bit tweakey for ForkSkinny-64-192. |
| output_left | First output block, or NULL if left is not required. |
| output_right | Second output block, or NULL if right is not required. |
| input | 64-bit input block. Encrypts a block of plaintext with ForkSkinny-64-192. |
| key | 192-bit tweakey for ForkSkinny-64-192. |
| output_left | Left output block for the ciphertext, or NULL if the left output is not required. |
| output_right | Right output block for the authentication tag, or NULL if the right output is not required. |
| input | 64-bit input plaintext block. |
| void forkskinny_64_192_forward_tk | ( | forkskinny_64_192_state_t * | state, |
| unsigned | rounds | ||
| ) |
Forwards the tweakey for ForkSkinny-64-192.
| state | Points to the ForkSkinny-64-192 state. |
| rounds | Number of rounds to forward by. |
| void forkskinny_64_192_inv_rounds | ( | forkskinny_64_192_state_t * | state, |
| unsigned | first, | ||
| unsigned | last | ||
| ) |
Applies several rounds of ForkSkinny-64-192 in reverse.
| state | State to apply the rounds to. |
| first | First round to apply plus 1. |
| last | Last round to apply. |
| void forkskinny_64_192_reverse_tk | ( | forkskinny_64_192_state_t * | state, |
| unsigned | rounds | ||
| ) |
Reverses the tweakey for ForkSkinny-64-192.
| state | Points to the ForkSkinny-64-192 state. |
| rounds | Number of rounds to reverse by. |
| void forkskinny_64_192_rounds | ( | forkskinny_64_192_state_t * | state, |
| unsigned | first, | ||
| unsigned | last | ||
| ) |
Applies several rounds of ForkSkinny-64-192.
| state | State to apply the rounds to. |
| first | First round to apply. |
| last | Last round to apply plus 1. |
Note: The cells of each row are ordered in big-endian nibble order so it is simplest to manage the rows in big-endian byte order.
1.8.6