Common functions for Romulus AEAD modes.
More...
Go to the source code of this file.
|
#define | romulus_set_domain(ks, domain) ((ks)->TK1[7] = (domain)) |
| Sets the domain separation value for Romulus-N, M, and T. More...
|
|
|
void | romulus_update_counter (uint8_t TK1[16]) |
| Updates the 56-bit LFSR block counter for Romulus-N, M, and T. More...
|
|
void | romulus_schedule_init (skinny_plus_key_schedule_t *ks, const unsigned char *k, const unsigned char *npub) |
| Initializes the key schedule for Romulus-N, M, or T. More...
|
|
void | romulus_rho (unsigned char S[16], unsigned char C[16], const unsigned char M[16]) |
| Applies the Romulus rho function. More...
|
|
void | romulus_rho_inverse (unsigned char S[16], unsigned char M[16], const unsigned char C[16]) |
| Applies the inverse of the Romulus rho function. More...
|
|
void | romulus_rho_short (unsigned char S[16], unsigned char C[16], const unsigned char M[16], unsigned len) |
| Applies the Romulus rho function to a short block. More...
|
|
void | romulus_rho_inverse_short (unsigned char S[16], unsigned char M[16], const unsigned char C[16], unsigned len) |
| Applies the inverse of the Romulus rho function to a short block. More...
|
|
void | romulus_generate_tag (unsigned char T[16], const unsigned char S[16]) |
| Generates the authentication tag from the rolling Romulus state. More...
|
|
Common functions for Romulus AEAD modes.
#define romulus_set_domain |
( |
|
ks, |
|
|
|
domain |
|
) |
| ((ks)->TK1[7] = (domain)) |
Sets the domain separation value for Romulus-N, M, and T.
- Parameters
-
ks | The key schedule to set the domain separation value into. |
domain | The domain separation value. |
void romulus_generate_tag |
( |
unsigned char |
T[16], |
|
|
const unsigned char |
S[16] |
|
) |
| |
Generates the authentication tag from the rolling Romulus state.
- Parameters
-
T | Buffer to receive the generated tag; can be the same as S. |
S | The rolling Romulus state. |
void romulus_rho |
( |
unsigned char |
S[16], |
|
|
unsigned char |
C[16], |
|
|
const unsigned char |
M[16] |
|
) |
| |
Applies the Romulus rho function.
- Parameters
-
S | The rolling Romulus state. |
C | Ciphertext message output block. |
M | Plaintext message input block. |
void romulus_rho_inverse |
( |
unsigned char |
S[16], |
|
|
unsigned char |
M[16], |
|
|
const unsigned char |
C[16] |
|
) |
| |
Applies the inverse of the Romulus rho function.
- Parameters
-
S | The rolling Romulus state. |
M | Plaintext message output block. |
C | Ciphertext message input block. |
void romulus_rho_inverse_short |
( |
unsigned char |
S[16], |
|
|
unsigned char |
M[16], |
|
|
const unsigned char |
C[16], |
|
|
unsigned |
len |
|
) |
| |
Applies the inverse of the Romulus rho function to a short block.
- Parameters
-
S | The rolling Romulus state. |
M | Plaintext message output block. |
C | Ciphertext message input block. |
len | Length of the short block, must be less than 16. |
void romulus_rho_short |
( |
unsigned char |
S[16], |
|
|
unsigned char |
C[16], |
|
|
const unsigned char |
M[16], |
|
|
unsigned |
len |
|
) |
| |
Applies the Romulus rho function to a short block.
- Parameters
-
S | The rolling Romulus state. |
C | Ciphertext message output block. |
M | Plaintext message input block. |
len | Length of the short block, must be less than 16. |
Initializes the key schedule for Romulus-N, M, or T.
- Parameters
-
ks | Points to the key schedule to initialize. |
k | Points to the 16 bytes of the key. |
npub | Points to the 16 bytes of the nonce. |
void romulus_update_counter |
( |
uint8_t |
TK1[16] | ) |
|
Updates the 56-bit LFSR block counter for Romulus-N, M, and T.
- Parameters
-
TK1 | Points to the TK1 part of the key schedule containing the LFSR. |