23 #ifndef LWCRYPTO_SPARKLE_KMAC_H
24 #define LWCRYPTO_SPARKLE_KMAC_H
50 #define ESCH_256_KMAC_SIZE ESCH_256_HASH_SIZE
55 #define ESCH_384_KMAC_SIZE ESCH_384_HASH_SIZE
78 (
const unsigned char *key,
size_t keylen,
79 const unsigned char *in,
size_t inlen,
80 const unsigned char *custom,
size_t customlen,
81 unsigned char *out,
size_t outlen);
95 (esch_256_kmac_state_t *state,
const unsigned char *key,
size_t keylen,
96 const unsigned char *custom,
size_t customlen);
108 (esch_256_kmac_state_t *state,
const unsigned char *in,
size_t inlen);
121 (esch_256_kmac_state_t *state,
size_t outlen);
138 (esch_256_kmac_state_t *state,
unsigned char *out,
size_t outlen);
177 (
const unsigned char *key,
size_t keylen,
178 const unsigned char *in,
size_t inlen,
179 const unsigned char *custom,
size_t customlen,
180 unsigned char *out,
size_t outlen);
194 (esch_384_kmac_state_t *state,
const unsigned char *key,
size_t keylen,
195 const unsigned char *custom,
size_t customlen);
207 (esch_384_kmac_state_t *state,
const unsigned char *in,
size_t inlen);
220 (esch_384_kmac_state_t *state,
size_t outlen);
237 (esch_384_kmac_state_t *state,
unsigned char *out,
size_t outlen);
void esch_256_kmac_squeeze(esch_256_kmac_state_t *state, unsigned char *out, size_t outlen)
Squeezes output data from an incremental XOEsch256-KMAC state.
#define ESCH_256_KMAC_SIZE
Default size of the output for XOEsch256-KMAC.
Definition: sparkle-kmac.h:50
void esch_256_kmac_finalize(esch_256_kmac_state_t *state, unsigned char out[ESCH_256_KMAC_SIZE])
Squeezes fixed-length data from an incremental XOEsch256-KMAC state and finalizes the KMAC process...
esch_384_hash_state_t esch_384_kmac_state_t
State information for the XOEsch384-KMAC incremental mode.
Definition: sparkle-kmac.h:159
Hash algorithms based on the SPARKLE permutation.
void esch_384_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 the XOEsch384 XOF mode.
void esch_256_kmac_absorb(esch_256_kmac_state_t *state, const unsigned char *in, size_t inlen)
Absorbs more input data into an incremental XOEsch256-KMAC state.
void esch_256_kmac_set_output_length(esch_256_kmac_state_t *state, size_t outlen)
Sets the desired output length for an incremental XOEsch256-KMAC state.
State information for the Esch384 incremental hash mod ande the XOEsch384 increment XOF mode...
Definition: sparkle-hash.h:90
void esch_384_kmac_absorb(esch_384_kmac_state_t *state, const unsigned char *in, size_t inlen)
Absorbs more input data into an incremental XOEsch384-KMAC state.
void esch_384_kmac_squeeze(esch_384_kmac_state_t *state, unsigned char *out, size_t outlen)
Squeezes output data from an incremental XOEsch384-KMAC state.
void esch_384_kmac_set_output_length(esch_384_kmac_state_t *state, size_t outlen)
Sets the desired output length for an incremental XOEsch384-KMAC state.
#define ESCH_384_KMAC_SIZE
Default size of the output for XOEsch384-KMAC.
Definition: sparkle-kmac.h:55
void esch_384_kmac_finalize(esch_384_kmac_state_t *state, unsigned char out[ESCH_384_KMAC_SIZE])
Squeezes fixed-length data from an incremental XOEsch384-KMAC state and finalizes the KMAC process...
void esch_384_kmac_init(esch_384_kmac_state_t *state, const unsigned char *key, size_t keylen, const unsigned char *custom, size_t customlen)
Initializes an incremental KMAC state using the XOEsch384 XOF mode.
State information for the Esch256 incremental hash mode and the XOEsch256 increment XOF mode...
Definition: sparkle-hash.h:74
esch_256_hash_state_t esch_256_kmac_state_t
State information for the XOEsch256-KMAC incremental mode.
Definition: sparkle-kmac.h:60
void esch_256_kmac_init(esch_256_kmac_state_t *state, const unsigned char *key, size_t keylen, const unsigned char *custom, size_t customlen)
Initializes an incremental KMAC state using the XOEsch256 XOF mode.
void esch_256_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 the XOEsch256 XOF mode.