|
Lightweight Cryptography Primitives
|
Masked version of the Pyjamask block cipher. More...
Go to the source code of this file.
Data Structures | |
| struct | pyjamask_masked_128_key_schedule_t |
| Structure of the key schedule for masked Pyjamask-128. More... | |
| struct | pyjamask_masked_96_key_schedule_t |
| Structure of the key schedule for masked Pyjamask-96. More... | |
Macros | |
| #define | PYJAMASK_MASKED_ROUNDS 14 |
| Number of rounds in the masked Pyjamask block cipher. | |
Functions | |
| void | pyjamask_masked_128_setup_key (pyjamask_masked_128_key_schedule_t *ks, const unsigned char *key) |
| Sets up the key schedule for the masked Pyjamask-128 block cipher. More... | |
| void | pyjamask_masked_96_setup_key (pyjamask_masked_96_key_schedule_t *ks, const unsigned char *key) |
| Sets up the key schedule for the masked Pyjamask-96 block cipher. More... | |
| void | pyjamask_masked_128_encrypt (const pyjamask_masked_128_key_schedule_t *ks, unsigned char *output, const unsigned char *input) |
| Encrypts a 128-bit block with Pyjamask-128 in masked mode. More... | |
| void | pyjamask_masked_128_decrypt (const pyjamask_masked_128_key_schedule_t *ks, unsigned char *output, const unsigned char *input) |
| Decrypts a 128-bit block with Pyjamask-128 in masked mode. More... | |
| void | pyjamask_masked_96_encrypt (const pyjamask_masked_96_key_schedule_t *ks, unsigned char *output, const unsigned char *input) |
| Encrypts a 96-bit block with Pyjamask-96 in masked mode. More... | |
| void | pyjamask_masked_96_decrypt (const pyjamask_masked_96_key_schedule_t *ks, unsigned char *output, const unsigned char *input) |
| Decrypts a 96-bit block with Pyjamask-96 in masked mode. More... | |
Masked version of the Pyjamask block cipher.
| void pyjamask_masked_128_decrypt | ( | const pyjamask_masked_128_key_schedule_t * | ks, |
| unsigned char * | output, | ||
| const unsigned char * | input | ||
| ) |
Decrypts a 128-bit block with Pyjamask-128 in masked mode.
| ks | Points to the 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 pyjamask_masked_128_encrypt | ( | const pyjamask_masked_128_key_schedule_t * | ks, |
| unsigned char * | output, | ||
| const unsigned char * | input | ||
| ) |
Encrypts a 128-bit block with Pyjamask-128 in masked mode.
| ks | Points to the 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 pyjamask_masked_128_setup_key | ( | pyjamask_masked_128_key_schedule_t * | ks, |
| const unsigned char * | key | ||
| ) |
Sets up the key schedule for the masked Pyjamask-128 block cipher.
| ks | The key schedule on output. |
| key | The 16 bytes of the key on input. |
| void pyjamask_masked_96_decrypt | ( | const pyjamask_masked_96_key_schedule_t * | ks, |
| unsigned char * | output, | ||
| const unsigned char * | input | ||
| ) |
Decrypts a 96-bit block with Pyjamask-96 in masked mode.
| ks | Points to the key schedule. |
| output | Output buffer which must be at least 12 bytes in length. |
| input | Input buffer which must be at least 12 bytes in length. |
The input and output buffers can be the same buffer for in-place decryption.
| void pyjamask_masked_96_encrypt | ( | const pyjamask_masked_96_key_schedule_t * | ks, |
| unsigned char * | output, | ||
| const unsigned char * | input | ||
| ) |
Encrypts a 96-bit block with Pyjamask-96 in masked mode.
| ks | Points to the key schedule. |
| output | Output buffer which must be at least 12 bytes in length. |
| input | Input buffer which must be at least 12 bytes in length. |
The input and output buffers can be the same buffer for in-place encryption.
| void pyjamask_masked_96_setup_key | ( | pyjamask_masked_96_key_schedule_t * | ks, |
| const unsigned char * | key | ||
| ) |
Sets up the key schedule for the masked Pyjamask-96 block cipher.
| ks | The key schedule on output. |
| key | The 16 bytes of the key on input. |
1.8.6