30 static void ascon_pbkdf2_hmac_f
32 const unsigned char *password,
size_t passwordlen,
33 const unsigned char *salt,
size_t saltlen,
34 unsigned long count,
unsigned long blocknum)
59 (
unsigned char *out,
size_t outlen,
60 const unsigned char *password,
size_t passwordlen,
61 const unsigned char *salt,
size_t saltlen,
unsigned long count)
65 unsigned long blocknum = 1;
68 ascon_pbkdf2_hmac_f(&
state, out, U, password, passwordlen,
69 salt, saltlen, count, blocknum);
74 ascon_pbkdf2_hmac_f(&
state, T, U, password, passwordlen,
75 salt, saltlen, count, blocknum);
76 memcpy(out, T, outlen);
void ascon_pbkdf2_hmac(unsigned char *out, size_t outlen, const unsigned char *password, size_t passwordlen, const unsigned char *salt, size_t saltlen, unsigned long count)
Derives key material using ASCON-PBKDF2 (legacy HMAC version).
#define lw_xor_block(dest, src, len)
#define be_store_word32(ptr, x)
Hashed Message Authentication Code (HMAC) based on ASCON-HASH.
void ascon_hmac_update(ascon_hmac_state_t *state, const unsigned char *in, size_t inlen)
Updates an incremental ASCON-HMAC state with more input data.
#define ASCON_HMAC_SIZE
Default size of the output for ASCON-HMAC.
void ascon_hmac_reinit(ascon_hmac_state_t *state, const unsigned char *key, size_t keylen)
Re-initializes an incremental HMAC state using ASCON-HASH.
void ascon_hmac_init(ascon_hmac_state_t *state, const unsigned char *key, size_t keylen)
Initializes an incremental HMAC state using ASCON-HASH.
void ascon_hmac_finalize(ascon_hmac_state_t *state, const unsigned char *key, size_t keylen, unsigned char *out)
Finalizes an incremental ASCON-HMAC state.
void ascon_hmac_free(ascon_hmac_state_t *state)
Frees the ASCON-HMAC state and destroys any sensitive material.
Password-based key derivation function based on ASCON.
ascon_state_t state
[snippet_key]
State information for the ASCON-HMAC incremental mode.
System utilities of use to applications that use ASCON.
void ascon_clean(void *buf, unsigned size)
Cleans a buffer that contains sensitive material.