Lightweight Cryptography Primitives
 All Data Structures Files Functions Variables Typedefs Macros Pages
Data Structures | Functions
internal-ascon-m.h File Reference

Masked implementation of the ASCON permutation. More...

#include "internal-masking.h"
#include "internal-ascon.h"

Go to the source code of this file.

Data Structures

struct  ascon_masked_state_t
 Structure of the internal state of the masked ASCON permutation. More...
 

Functions

void ascon_permute_masked (ascon_masked_state_t *state, uint8_t first_round)
 Permutes the masked ASCON state. More...
 
void ascon_mask (ascon_masked_state_t *output, const ascon_state_t *input)
 Converts an unmasked ASCON state into a masked state. More...
 
void ascon_unmask (ascon_state_t *output, const ascon_masked_state_t *input)
 Converts a masked ASCON state into an unmasked state. More...
 
void ascon_mask_sliced (ascon_masked_state_t *output, const ascon_state_t *input)
 Converts an unmasked sliced ASCON state into a masked state. More...
 
void ascon_unmask_sliced (ascon_state_t *output, const ascon_masked_state_t *input)
 Converts a masked ASCON state into an unmasked sliced state. More...
 

Detailed Description

Masked implementation of the ASCON permutation.

References: http://competitions.cr.yp.to/round3/asconv12.pdf, http://ascon.iaik.tugraz.at/

Function Documentation

void ascon_mask ( ascon_masked_state_t output,
const ascon_state_t input 
)

Converts an unmasked ASCON state into a masked state.

Parameters
outputThe output masked state in host byte order.
inputThe input unmasked state, in big-endian byte order.
void ascon_mask_sliced ( ascon_masked_state_t output,
const ascon_state_t input 
)

Converts an unmasked sliced ASCON state into a masked state.

Parameters
outputThe output masked state in host byte order.
inputThe input unmasked state, sliced, in host byte order.
void ascon_permute_masked ( ascon_masked_state_t state,
uint8_t  first_round 
)

Permutes the masked ASCON state.

Parameters
stateThe masked ASCON state to be permuted.
first_roundThe first round (of 12) to be performed; 0, 4, or 6.

The input and output state will be in host byte order.

void ascon_unmask ( ascon_state_t output,
const ascon_masked_state_t input 
)

Converts a masked ASCON state into an unmasked state.

Parameters
outputThe output unmasked state, in big-endian byte order.
inputThe input masked state in host byte order.
void ascon_unmask_sliced ( ascon_state_t output,
const ascon_masked_state_t input 
)

Converts a masked ASCON state into an unmasked sliced state.

Parameters
outputThe output unmasked state, sliced, in host byte order.
inputThe input masked state in host byte order.