ASCON-HASH and ASCON-HASHA hash algorithms.
More...
#include "ascon-xof.h"
Go to the source code of this file.
|
int | ascon_hash (unsigned char *out, const unsigned char *in, size_t inlen) |
| Hashes a block of input data with ASCON-HASH. More...
|
|
void | ascon_hash_init (ascon_hash_state_t *state) |
| Initializes the state for an ASCON-HASH hashing operation. More...
|
|
void | ascon_hash_update (ascon_hash_state_t *state, const unsigned char *in, size_t inlen) |
| Updates an ASCON-HASH state with more input data. More...
|
|
void | ascon_hash_finalize (ascon_hash_state_t *state, unsigned char *out) |
| Returns the final hash value from an ASCON-HASH hashing operation. More...
|
|
int | 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_hash_state_t *state) |
| Initializes the state for an ASCON-HASHA hashing operation. More...
|
|
void | ascon_hasha_update (ascon_hash_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_hash_state_t *state, unsigned char *out) |
| Returns the final hash value from an ASCON-HASHA hashing operation. More...
|
|
ASCON-HASH and ASCON-HASHA hash algorithms.
ASCON-XOF and ASCON-XOFA extensible output functions (XOF's).
References: https://ascon.iaik.tugraz.at/
int ascon_hash |
( |
unsigned char * |
out, |
|
|
const unsigned char * |
in, |
|
|
size_t |
inlen |
|
) |
| |
Hashes a block of input data with ASCON-HASH.
- Parameters
-
out | Buffer to receive the hash output which must be at least ASCON_HASH_SIZE bytes in length. |
in | Points to the input data to be hashed. |
inlen | Length of the input data in bytes. |
- Returns
- Returns zero on success or -1 if there was an error in the parameters.
- See Also
- ascon_hash_init(), ascon_hash_absorb(), ascon_hash_squeeze()
Returns the final hash value from an ASCON-HASH hashing operation.
- Parameters
-
state | Hash state to be finalized. |
out | Points to the output buffer to receive the 32-byte hash value. |
- See Also
- ascon_hash_init(), ascon_hash_update()
void ascon_hash_update |
( |
ascon_hash_state_t * |
state, |
|
|
const unsigned char * |
in, |
|
|
size_t |
inlen |
|
) |
| |
Updates an ASCON-HASH state with more input data.
- Parameters
-
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. |
- See Also
- ascon_hash_init(), ascon_hash_finalize()
int ascon_hasha |
( |
unsigned char * |
out, |
|
|
const unsigned char * |
in, |
|
|
size_t |
inlen |
|
) |
| |
Hashes a block of input data with ASCON-HASHA.
- Parameters
-
out | Buffer to receive the hash output which must be at least ASCON_HASH_SIZE bytes in length. |
in | Points to the input data to be hashed. |
inlen | Length of the input data in bytes. |
- Returns
- Returns zero on success or -1 if there was an error in the parameters.
- See Also
- ascon_hasha_init(), ascon_hasha_absorb(), ascon_hasha_squeeze()
Returns the final hash value from an ASCON-HASHA hashing operation.
- Parameters
-
state | Hash state to be finalized. |
out | Points to the output buffer to receive the 32-byte hash value. |
- See Also
- ascon_hasha_init(), ascon_hasha_update()
void ascon_hasha_update |
( |
ascon_hash_state_t * |
state, |
|
|
const unsigned char * |
in, |
|
|
size_t |
inlen |
|
) |
| |
Updates an ASCON-HASHA state with more input data.
- Parameters
-
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. |
- See Also
- ascon_hasha_init(), ascon_hasha_finalize()