|
Lightweight Cryptography Primitives
|
SKINNY-128-384+ block cipher. More...
Go to the source code of this file.
Data Structures | |
| struct | skinny_plus_key_schedule_t |
| Structure of the key schedule for SKINNY-128-384+. More... | |
Macros | |
| #define | SKINNY_PLUS_BLOCK_SIZE 16 |
| Size of a block for SKINNY-128-384+. | |
| #define | SKINNY_PLUS_ROUNDS 40 |
| Number of rounds for SKINNY-128-384+. | |
Functions | |
| void | skinny_plus_init (skinny_plus_key_schedule_t *ks, const unsigned char key[48]) |
| Initializes the key schedule for SKINNY-128-384+. More... | |
| void | skinny_plus_init_without_tk1 (skinny_plus_key_schedule_t *ks, const unsigned char *tk2, const unsigned char *tk3) |
| Initializes the key schedule for SKINNY-128-384+ without TK1. More... | |
| void | skinny_plus_encrypt (const skinny_plus_key_schedule_t *ks, unsigned char *output, const unsigned char *input) |
| Encrypts a 128-bit block with SKINNY-128-384+. More... | |
| void | skinny_plus_decrypt (const skinny_plus_key_schedule_t *ks, unsigned char *output, const unsigned char *input) |
| Decrypts a 128-bit block with SKINNY-128-384+. More... | |
| void | skinny_plus_encrypt_tk_full (const unsigned char key[48], unsigned char *output, const unsigned char *input) |
| Encrypts a 128-bit block with SKINNY-128-384+ and a fully specified tweakey value. More... | |
| void | skinny_plus_decrypt_tk_full (const unsigned char key[48], unsigned char *output, const unsigned char *input) |
| Decrypts a 128-bit block with SKINNY-128-384+ and a fully specified tweakey value. More... | |
SKINNY-128-384+ block cipher.
References: https://eprint.iacr.org/2016/660.pdf, https://romulusae.github.io/romulus/
| void skinny_plus_decrypt | ( | const skinny_plus_key_schedule_t * | ks, |
| unsigned char * | output, | ||
| const unsigned char * | input | ||
| ) |
Decrypts a 128-bit block with SKINNY-128-384+.
| ks | Points to the SKINNY-128-384+ key schedule. |
| output | Output buffer which must be at least 16 bytes in length. |
| input | Input buffer which must be at least 16 bytes in length. |
The input and output buffers can be the same buffer for in-place decryption.
| void skinny_plus_decrypt_tk_full | ( | const unsigned char | key[48], |
| unsigned char * | output, | ||
| const unsigned char * | input | ||
| ) |
Decrypts a 128-bit block with SKINNY-128-384+ and a fully specified tweakey value.
| key | Points to the 384-bit tweakey value. |
| output | Output buffer which must be at least 16 bytes in length. |
| input | Input buffer which must be at least 16 bytes in length. |
The input and output buffers can be the same buffer for in-place decryption.
This version is useful when the entire tweakey changes from block to block. It is slower than the other versions of SKINNY-128-384+ but more memory-efficient.
| void skinny_plus_encrypt | ( | const skinny_plus_key_schedule_t * | ks, |
| unsigned char * | output, | ||
| const unsigned char * | input | ||
| ) |
Encrypts a 128-bit block with SKINNY-128-384+.
| ks | Points to the SKINNY-128-384+ key schedule. |
| output | Output buffer which must be at least 16 bytes in length. |
| input | Input buffer which must be at least 16 bytes in length. |
The input and output buffers can be the same buffer for in-place encryption.
| void skinny_plus_encrypt_tk_full | ( | const unsigned char | key[48], |
| unsigned char * | output, | ||
| const unsigned char * | input | ||
| ) |
Encrypts a 128-bit block with SKINNY-128-384+ and a fully specified tweakey value.
| key | Points to the 384-bit tweakey value. |
| output | Output buffer which must be at least 16 bytes in length. |
| input | Input buffer which must be at least 16 bytes in length. |
The input and output buffers can be the same buffer for in-place encryption.
This version is useful when the entire tweakey changes from block to block. It is slower than the other versions of SKINNY-128-384+ but more memory-efficient.
| void skinny_plus_init | ( | skinny_plus_key_schedule_t * | ks, |
| const unsigned char | key[48] | ||
| ) |
Initializes the key schedule for SKINNY-128-384+.
| ks | Points to the key schedule to initialize. |
| key | Points to the key data. |
| void skinny_plus_init_without_tk1 | ( | skinny_plus_key_schedule_t * | ks, |
| const unsigned char * | tk2, | ||
| const unsigned char * | tk3 | ||
| ) |
Initializes the key schedule for SKINNY-128-384+ without TK1.
| ks | Points to the key schedule to initialize. |
| tk2 | Points to the 16 bytes of key data for TK2. |
| tk3 | Points to the 16 bytes of key data for TK3. |
1.8.6