23 #ifndef LWCRYPTO_ASCON_KMAC_H
24 #define LWCRYPTO_ASCON_KMAC_H
26 #include "ascon-xof.h"
53 #define ASCON_KMAC_SIZE ASCON_HASH_SIZE
77 (
const unsigned char *key,
size_t keylen,
78 const unsigned char *in,
size_t inlen,
79 const unsigned char *custom,
size_t customlen,
80 unsigned char *out,
size_t outlen);
94 (ascon_kmac_state_t *state,
const unsigned char *key,
size_t keylen,
95 const unsigned char *custom,
size_t customlen);
107 (ascon_kmac_state_t *state,
const unsigned char *in,
size_t inlen);
135 (ascon_kmac_state_t *state,
unsigned char *out,
size_t outlen);
169 (
const unsigned char *key,
size_t keylen,
170 const unsigned char *in,
size_t inlen,
171 const unsigned char *custom,
size_t customlen,
172 unsigned char *out,
size_t outlen);
186 (ascon_kmac_state_t *state,
const unsigned char *key,
size_t keylen,
187 const unsigned char *custom,
size_t customlen);
199 (ascon_kmac_state_t *state,
const unsigned char *in,
size_t inlen);
227 (ascon_kmac_state_t *state,
unsigned char *out,
size_t outlen);
void ascon_kmaca_init(ascon_kmac_state_t *state, const unsigned char *key, size_t keylen, const unsigned char *custom, size_t customlen)
Initializes an incremental KMAC state using ASCON-XOFA.
void ascon_kmac_absorb(ascon_kmac_state_t *state, const unsigned char *in, size_t inlen)
Absorbs more input data into an incremental ASCON-KMAC state.
void ascon_kmaca(const unsigned char *key, size_t keylen, const unsigned char *in, size_t inlen, const unsigned char *custom, size_t customlen, unsigned char *out, size_t outlen)
Computes a KMAC value using ASCON-XOFA.
void ascon_kmac_set_output_length(ascon_kmac_state_t *state, size_t outlen)
Sets the desired output length for an incremental ASCON-KMAC state.
void ascon_kmac_squeeze(ascon_kmac_state_t *state, unsigned char *out, size_t outlen)
Squeezes output data from an incremental ASCON-KMAC state.
#define ASCON_KMAC_SIZE
Default size of the output for ASCON-KMAC and ASCON-KMACA.
Definition: ascon-kmac.h:53
void ascon_kmaca_finalize(ascon_kmac_state_t *state, unsigned char out[ASCON_KMAC_SIZE])
Squeezes fixed-length data from an incremental ASCON-KMACA state and finalizes the KMAC process...
void ascon_kmac(const unsigned char *key, size_t keylen, const unsigned char *in, size_t inlen, const unsigned char *custom, size_t customlen, unsigned char *out, size_t outlen)
Computes a KMAC value using ASCON-XOF.
void ascon_kmac_init(ascon_kmac_state_t *state, const unsigned char *key, size_t keylen, const unsigned char *custom, size_t customlen)
Initializes an incremental KMAC state using ASCON-XOF.
void ascon_kmaca_absorb(ascon_kmac_state_t *state, const unsigned char *in, size_t inlen)
Absorbs more input data into an incremental ASCON-KMACA state.
State information for ASCON-XOF and ASCON-XOFA incremental modes.
Definition: ascon-xof.h:54
ascon_xof_state_t ascon_kmac_state_t
State information for the ASCON-KMAC and ASCON-KMACA incremental modes.
Definition: ascon-kmac.h:59
void ascon_kmac_finalize(ascon_kmac_state_t *state, unsigned char out[ASCON_KMAC_SIZE])
Squeezes fixed-length data from an incremental ASCON-KMAC state and finalizes the KMAC process...
void ascon_kmaca_squeeze(ascon_kmac_state_t *state, unsigned char *out, size_t outlen)
Squeezes output data from an incremental ASCON-KMACA state.
void ascon_kmaca_set_output_length(ascon_kmac_state_t *state, size_t outlen)
Sets the desired output length for an incremental ASCON-KMACA state.