|
Lightweight Cryptography Primitives
|
Saturnin block cipher. More...
#include "internal-util.h"Go to the source code of this file.
Data Structures | |
| struct | saturnin_key_schedule_t |
| Structure of the key schedule for Saturnin. More... | |
Macros | |
| #define | SATURNIN_BLOCK_SIZE 32 |
| Size of a Saturnin block in bytes. | |
| #define | SATURNIN_DOMAIN_10_1 0 |
| Domain separator index 1 for the 10-round version of Saturnin. | |
| #define | SATURNIN_DOMAIN_10_2 10 |
| Domain separator index 2 for the 10-round version of Saturnin. | |
| #define | SATURNIN_DOMAIN_10_3 20 |
| Domain separator index 3 for the 10-round version of Saturnin. | |
| #define | SATURNIN_DOMAIN_10_4 30 |
| Domain separator index 4 for the 10-round version of Saturnin. | |
| #define | SATURNIN_DOMAIN_10_5 40 |
| Domain separator index 5 for the 10-round version of Saturnin. | |
| #define | SATURNIN_DOMAIN_10_6 50 |
| Domain separator index 6 for the 10-round version of Saturnin. | |
| #define | SATURNIN_DOMAIN_16_7 60 |
| Domain separator index 7 for the 16-round version of Saturnin. | |
| #define | SATURNIN_DOMAIN_16_8 76 |
| Domain separator index 8 for the 16-round version of Saturnin. | |
Functions | |
| void | saturnin_setup_key (saturnin_key_schedule_t *ks, const unsigned char *key) |
| Sets up a key schedule for Saturnin. More... | |
| void | saturnin_encrypt_block (const saturnin_key_schedule_t *ks, unsigned char *output, const unsigned char *input, unsigned domain) |
| Encrypts a 256-bit block with Saturnin. More... | |
| void | saturnin_decrypt_block (const saturnin_key_schedule_t *ks, unsigned char *output, const unsigned char *input, unsigned domain) |
| Decrypts a 256-bit block with Saturnin. More... | |
Saturnin block cipher.
References: https://project.inria.fr/saturnin/
| void saturnin_decrypt_block | ( | const saturnin_key_schedule_t * | ks, |
| unsigned char * | output, | ||
| const unsigned char * | input, | ||
| unsigned | domain | ||
| ) |
Decrypts a 256-bit block with Saturnin.
| ks | Points to the Saturnin key schedule. |
| output | Output buffer which must be at least 32 bytes in length. |
| input | Input buffer which must be at least 32 bytes in length. |
| domain | Domain separator and round count indicator. |
The input and output buffers can be the same buffer for in-place decryption.
| void saturnin_encrypt_block | ( | const saturnin_key_schedule_t * | ks, |
| unsigned char * | output, | ||
| const unsigned char * | input, | ||
| unsigned | domain | ||
| ) |
Encrypts a 256-bit block with Saturnin.
| ks | Points to the Saturnin key schedule. |
| output | Output buffer which must be at least 32 bytes in length. |
| input | Input buffer which must be at least 32 bytes in length. |
| domain | Domain separator and round count indicator. |
The input and output buffers can be the same buffer for in-place encryption.
| void saturnin_setup_key | ( | saturnin_key_schedule_t * | ks, |
| const unsigned char * | key | ||
| ) |
Sets up a key schedule for Saturnin.
| ks | Points to the key schedule to initialize. |
| key | Points to the 32 bytes of the key data. |
1.8.6