23 #ifndef ASCON_MASKED_STATE_H
24 #define ASCON_MASKED_STATE_H
void ascon_x4_copy_to_x1(ascon_state_t *dest, const ascon_masked_state_t *src)
Copies the entire ASCON-x4 permutation state to a regular ASCON-x1 permutation state.
void ascon_x2_copy_from_x3(ascon_masked_state_t *dest, const ascon_masked_state_t *src, ascon_trng_state_t *trng)
Copies the entire ASCON-x3 permutation state to an ASCON-x2 permutation state.
void ascon_x2_permute(ascon_masked_state_t *state, uint8_t first_round, uint64_t *preserve)
Permutes the ASCON-x2 state with a specified number of rounds.
void ascon_x2_copy_from_x2(ascon_masked_state_t *dest, const ascon_masked_state_t *src, ascon_trng_state_t *trng)
Copies the entire ASCON-x2 permutation state from a source to a destination.
void ascon_x4_randomize(ascon_masked_state_t *state, ascon_trng_state_t *trng)
Randomizes an ASCON-x4 permutation state.
void ascon_x4_permute(ascon_masked_state_t *state, uint8_t first_round, uint64_t *preserve)
Permutes the ASCON-x4 state with a specified number of rounds.
void ascon_x2_copy_from_x4(ascon_masked_state_t *dest, const ascon_masked_state_t *src, ascon_trng_state_t *trng)
Copies the entire ASCON-x4 permutation state to an ASCON-x2 permutation state.
void ascon_x4_copy_from_x4(ascon_masked_state_t *dest, const ascon_masked_state_t *src, ascon_trng_state_t *trng)
Copies the entire ASCON-x4 permutation state from a source to a destination.
void ascon_x3_copy_to_x1(ascon_state_t *dest, const ascon_masked_state_t *src)
Copies the entire ASCON-x3 permutation state to a regular ASCON-x1 permutation state.
void ascon_x3_copy_from_x3(ascon_masked_state_t *dest, const ascon_masked_state_t *src, ascon_trng_state_t *trng)
Copies the entire ASCON-x3 permutation state from a source to a destination.
void ascon_x4_copy_from_x3(ascon_masked_state_t *dest, const ascon_masked_state_t *src, ascon_trng_state_t *trng)
Copies the entire ASCON-x4 permutation state from an ASCON-x3 permutation state.
void ascon_x4_copy_from_x2(ascon_masked_state_t *dest, const ascon_masked_state_t *src, ascon_trng_state_t *trng)
Copies the entire ASCON-x4 permutation state from an ASCON-x2 permutation state.
void ascon_x3_copy_from_x2(ascon_masked_state_t *dest, const ascon_masked_state_t *src, ascon_trng_state_t *trng)
Copies the entire ASCON-x3 permutation state from an ASCON-x2 permutation state.
void ascon_x3_copy_from_x1(ascon_masked_state_t *dest, const ascon_state_t *src, ascon_trng_state_t *trng)
Copies the entire ASCON-x3 permutation state from a regular ASCON-x1 permutation state.
void ascon_masked_state_free(ascon_masked_state_t *state)
Frees an ASCON-x2 permutation state and attempts to destroy any sensitive material.
void ascon_masked_state_init(ascon_masked_state_t *state)
Initializes the words of a masked ASCON permutation state.
void ascon_x2_randomize(ascon_masked_state_t *state, ascon_trng_state_t *trng)
Randomizes an ASCON-x2 permutation state.
void ascon_x3_randomize(ascon_masked_state_t *state, ascon_trng_state_t *trng)
Randomizes an ASCON-x3 permutation state.
void ascon_x3_copy_from_x4(ascon_masked_state_t *dest, const ascon_masked_state_t *src, ascon_trng_state_t *trng)
Copies the entire ASCON-x3 permutation state from an ASCON-x4 permutation state.
void ascon_x4_copy_from_x1(ascon_masked_state_t *dest, const ascon_state_t *src, ascon_trng_state_t *trng)
Copies the entire ASCON-x4 permutation state from a regular ASCON-x1 permutation state.
void ascon_masked_key_128_randomize_with_trng(ascon_masked_key_128_t *masked, ascon_trng_state_t *trng)
Randomizes a masked 128-bit key by mixing in fresh random material from a caller-supplied TRNG.
void ascon_x2_copy_to_x1(ascon_state_t *dest, const ascon_masked_state_t *src)
Copies the entire ASCON-x2 permutation state to a regular ASCON-x1 permutation state.
void ascon_masked_key_160_randomize_with_trng(ascon_masked_key_160_t *masked, ascon_trng_state_t *trng)
Randomizes a masked 160-bit key by mixing in fresh random material from a caller-supplied TRNG.
void ascon_x3_permute(ascon_masked_state_t *state, uint8_t first_round, uint64_t *preserve)
Permutes the ASCON-x3 state with a specified number of rounds.
void ascon_x2_copy_from_x1(ascon_masked_state_t *dest, const ascon_state_t *src, ascon_trng_state_t *trng)
Copies the entire ASCON-x2 permutation state from a regular ASCON-x1 permutation state.
Utility functions for operating on masked words.
ascon_state_t state
[snippet_key]
128-bit key that has been masked to hide its value when the code is operating on it.
160-bit key that has been masked to hide its value when the code is operating on it.
State of the ASCON permutation which has been masked with up to 4 shares.
State of the random number source.
Masked 64-bit word with up to ASCON_MASKED_MAX_SHARES shares.
Structure of the internal state of the ASCON permutation.