ASCON Suite
Functions
ascon-aead-masked-common.c File Reference
#include "aead/ascon-aead-masked-common.h"

Go to the source code of this file.

Functions

void ascon_masked_aead_absorb_8 (ascon_masked_state_t *state, const unsigned char *data, size_t len, uint8_t first_round, ascon_masked_word_t *word, uint64_t *preserve, ascon_trng_state_t *trng)
 Absorbs data into a masked ASCON state with an 8-byte rate. More...
 
void ascon_masked_aead_absorb_16 (ascon_masked_state_t *state, const unsigned char *data, size_t len, uint8_t first_round, ascon_masked_word_t *word, uint64_t *preserve, ascon_trng_state_t *trng)
 Absorbs data into a masked ASCON state with a 16-byte rate. More...
 
void ascon_masked_aead_encrypt_8 (ascon_masked_state_t *state, unsigned char *dest, const unsigned char *src, size_t len, uint8_t first_round, ascon_masked_word_t *word, uint64_t *preserve, ascon_trng_state_t *trng)
 Encrypts a block of data with a masked ASCON state and an 8-byte rate. More...
 
void ascon_masked_aead_encrypt_16 (ascon_masked_state_t *state, unsigned char *dest, const unsigned char *src, size_t len, uint8_t first_round, ascon_masked_word_t *word, uint64_t *preserve, ascon_trng_state_t *trng)
 Encrypts a block of data with a masked ASCON state and a 16-byte rate. More...
 
void ascon_masked_aead_decrypt_8 (ascon_masked_state_t *state, unsigned char *dest, const unsigned char *src, size_t len, uint8_t first_round, ascon_masked_word_t *word, uint64_t *preserve, ascon_trng_state_t *trng)
 Decrypts a block of data with a masked ASCON state and an 8-byte rate. More...
 
void ascon_masked_aead_decrypt_16 (ascon_masked_state_t *state, unsigned char *dest, const unsigned char *src, size_t len, uint8_t first_round, ascon_masked_word_t *word, uint64_t *preserve, ascon_trng_state_t *trng)
 Decrypts a block of data with an ASCON state and a 16-byte rate. More...
 

Function Documentation

◆ ascon_masked_aead_absorb_16()

void ascon_masked_aead_absorb_16 ( ascon_masked_state_t state,
const unsigned char *  data,
size_t  len,
uint8_t  first_round,
ascon_masked_word_t word,
uint64_t *  preserve,
ascon_trng_state_t trng 
)

Absorbs data into a masked ASCON state with a 16-byte rate.

Parameters
stateThe state to absorb the data into.
dataPoints to the data to be absorbed.
lenLength of the data to be absorbed.
first_roundFirst round of the permutation to apply each block.
wordPoints to temporary storage for a masked word.
preservePreserved randomness from the previous step.
trngTRNG to use to generate randomness to mask the data.

Definition at line 48 of file ascon-aead-masked-common.c.

◆ ascon_masked_aead_absorb_8()

void ascon_masked_aead_absorb_8 ( ascon_masked_state_t state,
const unsigned char *  data,
size_t  len,
uint8_t  first_round,
ascon_masked_word_t word,
uint64_t *  preserve,
ascon_trng_state_t trng 
)

Absorbs data into a masked ASCON state with an 8-byte rate.

Parameters
stateThe state to absorb the data into.
dataPoints to the data to be absorbed.
lenLength of the data to be absorbed.
first_roundFirst round of the permutation to apply each block.
wordPoints to temporary storage for a masked word.
preservePreserved randomness from the previous step.
trngTRNG to use to generate randomness to mask the data.

Definition at line 28 of file ascon-aead-masked-common.c.

◆ ascon_masked_aead_decrypt_16()

void ascon_masked_aead_decrypt_16 ( ascon_masked_state_t state,
unsigned char *  dest,
const unsigned char *  src,
size_t  len,
uint8_t  first_round,
ascon_masked_word_t word,
uint64_t *  preserve,
ascon_trng_state_t trng 
)

Decrypts a block of data with an ASCON state and a 16-byte rate.

Parameters
stateThe state to decrypt with.
destPoints to the destination buffer.
srcPoints to the source buffer.
lenLength of the data to decrypt from src into dest.
first_roundFirst round of the permutation to apply each block.
wordPoints to temporary storage for a masked word.
preservePreserved randomness from the previous step.
trngTRNG to use to generate randomness to mask the data.

Definition at line 168 of file ascon-aead-masked-common.c.

◆ ascon_masked_aead_decrypt_8()

void ascon_masked_aead_decrypt_8 ( ascon_masked_state_t state,
unsigned char *  dest,
const unsigned char *  src,
size_t  len,
uint8_t  first_round,
ascon_masked_word_t word,
uint64_t *  preserve,
ascon_trng_state_t trng 
)

Decrypts a block of data with a masked ASCON state and an 8-byte rate.

Parameters
stateThe state to decrypt with.
destPoints to the destination buffer.
srcPoints to the source buffer.
lenLength of the data to decrypt from src into dest.
first_roundFirst round of the permutation to apply each block.
wordPoints to temporary storage for a masked word.
preservePreserved randomness from the previous step.
trngTRNG to use to generate randomness to mask the data.

Definition at line 144 of file ascon-aead-masked-common.c.

◆ ascon_masked_aead_encrypt_16()

void ascon_masked_aead_encrypt_16 ( ascon_masked_state_t state,
unsigned char *  dest,
const unsigned char *  src,
size_t  len,
uint8_t  first_round,
ascon_masked_word_t word,
uint64_t *  preserve,
ascon_trng_state_t trng 
)

Encrypts a block of data with a masked ASCON state and a 16-byte rate.

Parameters
stateThe state to encrypt with.
destPoints to the destination buffer.
srcPoints to the source buffer.
lenLength of the data to encrypt from src into dest.
first_roundFirst round of the permutation to apply each block.
wordPoints to temporary storage for a masked word.
preservePreserved randomness from the previous step.
trngTRNG to use to generate randomness to mask the data.

Definition at line 104 of file ascon-aead-masked-common.c.

◆ ascon_masked_aead_encrypt_8()

void ascon_masked_aead_encrypt_8 ( ascon_masked_state_t state,
unsigned char *  dest,
const unsigned char *  src,
size_t  len,
uint8_t  first_round,
ascon_masked_word_t word,
uint64_t *  preserve,
ascon_trng_state_t trng 
)

Encrypts a block of data with a masked ASCON state and an 8-byte rate.

Parameters
stateThe state to encrypt with.
destPoints to the destination buffer.
srcPoints to the source buffer.
lenLength of the data to encrypt from src into dest.
first_roundFirst round of the permutation to apply each block.
wordPoints to temporary storage for a masked word.
preservePreserved randomness from the previous step.
trngTRNG to use to generate randomness to mask the data.

Definition at line 82 of file ascon-aead-masked-common.c.