ASCON Suite
|
Go to the source code of this file.
Functions | |
void | ascon_hasha (unsigned char *out, const unsigned char *in, size_t inlen) |
Hashes a block of input data with ASCON-HASHA. More... | |
void | ascon_hasha_init (ascon_hasha_state_t *state) |
Initializes the state for an ASCON-HASHA hashing operation. More... | |
void | ascon_hasha_reinit (ascon_hasha_state_t *state) |
Re-initializes the state for an ASCON-HASHA hashing operation. More... | |
void | ascon_hasha_free (ascon_hasha_state_t *state) |
Frees the ASCON-HASHA state and destroys any sensitive material. More... | |
void | ascon_hasha_update (ascon_hasha_state_t *state, const unsigned char *in, size_t inlen) |
Updates an ASCON-HASHA state with more input data. More... | |
void | ascon_hasha_finalize (ascon_hasha_state_t *state, unsigned char *out) |
Returns the final hash value from an ASCON-HASHA hashing operation. More... | |
void | ascon_hasha_copy (ascon_hasha_state_t *dest, const ascon_hasha_state_t *src) |
Clones a copy of an ASCON-HASHA state. More... | |
void ascon_hasha | ( | unsigned char * | out, |
const unsigned char * | in, | ||
size_t | inlen | ||
) |
Hashes a block of input data with ASCON-HASHA.
out | Buffer to receive the hash output which must be at least ASCON_HASHA_SIZE bytes in length. |
in | Points to the input data to be hashed. |
inlen | Length of the input data in bytes. |
Definition at line 27 of file ascon-hasha.c.
void ascon_hasha_copy | ( | ascon_hasha_state_t * | dest, |
const ascon_hasha_state_t * | src | ||
) |
Clones a copy of an ASCON-HASHA state.
dest | Destination hash state to copy into. |
src | Source hash state to copy from. |
The destination will be initialized by this operation, so it must not previously have been initialized or it has already been freed. The source must be already initialized.
Definition at line 100 of file ascon-hasha.c.
void ascon_hasha_finalize | ( | ascon_hasha_state_t * | state, |
unsigned char * | out | ||
) |
Returns the final hash value from an ASCON-HASHA hashing operation.
state | Hash state to be finalized. |
out | Points to the output buffer to receive the 32-byte hash value. |
Definition at line 95 of file ascon-hasha.c.
void ascon_hasha_free | ( | ascon_hasha_state_t * | state | ) |
Frees the ASCON-HASHA state and destroys any sensitive material.
state | Hash state to be freed. |
Definition at line 84 of file ascon-hasha.c.
void ascon_hasha_init | ( | ascon_hasha_state_t * | state | ) |
Initializes the state for an ASCON-HASHA hashing operation.
state | Hash state to be initialized. |
Definition at line 36 of file ascon-hasha.c.
void ascon_hasha_reinit | ( | ascon_hasha_state_t * | state | ) |
Re-initializes the state for an ASCON-HASHA hashing operation.
state | Hash state to be re-initialized. |
This function is equivalent to calling ascon_hasha_free() and then ascon_hasha_init() to restart the hashing process.
Definition at line 73 of file ascon-hasha.c.
void ascon_hasha_update | ( | ascon_hasha_state_t * | state, |
const unsigned char * | in, | ||
size_t | inlen | ||
) |
Updates an ASCON-HASHA state with more input data.
state | Hash state to be updated. |
in | Points to the input data to be incorporated into the state. |
inlen | Length of the input data to be incorporated into the state. |
Definition at line 89 of file ascon-hasha.c.