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

Permutations that are used by the KNOT AEAD and hash algorithms. More...

#include "internal-util.h"

Go to the source code of this file.

Data Structures

union  knot256_state_t
 Internal state of the KNOT-256 permutation. More...
 
union  knot384_state_t
 Internal state of the KNOT-384 permutation. More...
 
union  knot512_state_t
 Internal state of the KNOT-512 permutation. More...
 

Typedefs

typedef void(* knot_permute_t )(void *state, uint8_t rounds)
 Generic pointer to a function that performs a KNOT permutation. More...
 

Functions

void knot256_permute_6 (knot256_state_t *state, uint8_t rounds)
 Permutes the KNOT-256 state, using 6-bit round constants. More...
 
void knot256_permute_7 (knot256_state_t *state, uint8_t rounds)
 Permutes the KNOT-256 state, using 7-bit round constants. More...
 
void knot384_permute_7 (knot384_state_t *state, uint8_t rounds)
 Permutes the KNOT-384 state, using 7-bit round constants. More...
 
void knot512_permute_7 (knot512_state_t *state, uint8_t rounds)
 Permutes the KNOT-512 state, using 7-bit round constants. More...
 
void knot512_permute_8 (knot512_state_t *state, uint8_t rounds)
 Permutes the KNOT-512 state, using 8-bit round constants. More...
 

Detailed Description

Permutations that are used by the KNOT AEAD and hash algorithms.

Typedef Documentation

typedef void(* knot_permute_t)(void *state, uint8_t rounds)

Generic pointer to a function that performs a KNOT permutation.

Parameters
statePoints to the permutation state.
roundNumber of rounds to perform.

Function Documentation

void knot256_permute_6 ( knot256_state_t state,
uint8_t  rounds 
)

Permutes the KNOT-256 state, using 6-bit round constants.

Parameters
stateThe KNOT-256 state to be permuted.
roundsThe number of rounds to be performed, 1 to 52.

The input and output state will be in little-endian byte order.

void knot256_permute_7 ( knot256_state_t state,
uint8_t  rounds 
)

Permutes the KNOT-256 state, using 7-bit round constants.

Parameters
stateThe KNOT-256 state to be permuted.
roundsThe number of rounds to be performed, 1 to 104.

The input and output state will be in little-endian byte order.

void knot384_permute_7 ( knot384_state_t state,
uint8_t  rounds 
)

Permutes the KNOT-384 state, using 7-bit round constants.

Parameters
stateThe KNOT-384 state to be permuted.
roundsThe number of rounds to be performed, 1 to 104.

The input and output state will be in little-endian byte order.

void knot512_permute_7 ( knot512_state_t state,
uint8_t  rounds 
)

Permutes the KNOT-512 state, using 7-bit round constants.

Parameters
stateThe KNOT-512 state to be permuted.
roundsThe number of rounds to be performed, 1 to 104.

The input and output state will be in little-endian byte order.

void knot512_permute_8 ( knot512_state_t state,
uint8_t  rounds 
)

Permutes the KNOT-512 state, using 8-bit round constants.

Parameters
stateThe KNOT-512 state to be permuted.
roundsThe number of rounds to be performed, 1 to 140.

The input and output state will be in little-endian byte order.