23 #ifndef LWCRYPTO_SPARKLE_HASH_H
24 #define LWCRYPTO_SPARKLE_HASH_H
53 #define ESCH_256_HASH_SIZE 32
58 #define ESCH_256_RATE 16
63 #define ESCH_384_HASH_SIZE 48
68 #define ESCH_384_RATE 16
77 unsigned char state[48];
78 unsigned char block[16];
93 unsigned char state[64];
94 unsigned char block[16];
113 int esch_256_hash(
unsigned char *out,
const unsigned char *in,
size_t inlen);
127 int esch_256_xof(
unsigned char *out,
const unsigned char *in,
size_t inlen);
188 int esch_384_hash(
unsigned char *out,
const unsigned char *in,
size_t inlen);
202 int esch_384_xof(
unsigned char *out,
const unsigned char *in,
size_t inlen);
unsigned char mode
Definition: sparkle-hash.h:96
void esch_384_hash_finalize(esch_384_hash_state_t *state, unsigned char *out)
Returns the final hash value from an Esch384 hashing operation.
Definition: sparkle-hash.c:388
void esch_256_hash_update(esch_256_hash_state_t *state, const unsigned char *in, size_t inlen)
Updates an Esch256 or XOEsch256 state with more input data.
Definition: sparkle-hash.c:148
void esch_384_hash_init(esch_384_hash_state_t *state)
Initializes the state for an Esch384 hashing or a XOEsch384 XOF operation.
Definition: sparkle-hash.c:355
unsigned char count
Definition: sparkle-hash.h:95
int esch_256_xof(unsigned char *out, const unsigned char *in, size_t inlen)
Hashes a block of input data with XOEsch256 to generate an XOF output value.
Definition: sparkle-hash.c:112
int esch_384_hash(unsigned char *out, const unsigned char *in, size_t inlen)
Hashes a block of input data with Esch384 to generate a hash value.
Definition: sparkle-hash.c:291
int esch_384_xof(unsigned char *out, const unsigned char *in, size_t inlen)
Hashes a block of input data with XOEsch384 to generate an XOF output value.
Definition: sparkle-hash.c:323
void esch_256_hash_squeeze(esch_256_hash_state_t *state, unsigned char *out, size_t outlen)
Squeezes output data from a XOEsch256 XOF state.
Definition: sparkle-hash.c:197
unsigned char mode
Definition: sparkle-hash.h:80
State information for the Esch384 incremental hash mod ande the XOEsch384 increment XOF mode...
Definition: sparkle-hash.h:90
void esch_256_hash_finalize(esch_256_hash_state_t *state, unsigned char *out)
Returns the final hash value from an Esch256 hashing operation.
Definition: sparkle-hash.c:175
unsigned char count
Definition: sparkle-hash.h:79
void esch_384_hash_squeeze(esch_384_hash_state_t *state, unsigned char *out, size_t outlen)
Squeezes output data from a XOEsch384 XOF state.
Definition: sparkle-hash.c:412
State information for the Esch256 incremental hash mode and the XOEsch256 increment XOF mode...
Definition: sparkle-hash.h:74
unsigned long long align
Definition: sparkle-hash.h:98
unsigned long long align
Definition: sparkle-hash.h:82
void esch_384_hash_update(esch_384_hash_state_t *state, const unsigned char *in, size_t inlen)
Updates an Esch384 state with more input data.
Definition: sparkle-hash.c:361
int esch_256_hash(unsigned char *out, const unsigned char *in, size_t inlen)
Hashes a block of input data with Esch256 to generate a hash value.
Definition: sparkle-hash.c:82
void esch_256_hash_init(esch_256_hash_state_t *state)
Initializes the state for an Esch256 hashing or a XOEsch256 XOF operation.
Definition: sparkle-hash.c:142