23 #ifndef LWCRYPTO_SPARKLE_HKDF_H
24 #define LWCRYPTO_SPARKLE_HKDF_H
43 #define ESCH_256_HKDF_OUTPUT_SIZE 32
82 (
unsigned char *out,
size_t outlen,
83 const unsigned char *key,
size_t keylen,
84 const unsigned char *salt,
size_t saltlen,
85 const unsigned char *info,
size_t infolen);
100 const unsigned char *key,
size_t keylen,
101 const unsigned char *salt,
size_t saltlen);
117 const unsigned char *info,
size_t infolen,
118 unsigned char *out,
size_t outlen);
131 #define ESCH_384_HKDF_OUTPUT_SIZE 48
170 (
unsigned char *out,
size_t outlen,
171 const unsigned char *key,
size_t keylen,
172 const unsigned char *salt,
size_t saltlen,
173 const unsigned char *info,
size_t infolen);
188 const unsigned char *key,
size_t keylen,
189 const unsigned char *salt,
size_t saltlen);
205 const unsigned char *info,
size_t infolen,
206 unsigned char *out,
size_t outlen);
int esch_256_hkdf(unsigned char *out, size_t outlen, const unsigned char *key, size_t keylen, const unsigned char *salt, size_t saltlen, const unsigned char *info, size_t infolen)
Derives key material using Esch256-HKDF.
void esch_384_hkdf_free(esch_384_hkdf_state_t *state)
Frees all sensitive material in a Esch384-HKDF state.
int esch_384_hkdf(unsigned char *out, size_t outlen, const unsigned char *key, size_t keylen, const unsigned char *salt, size_t saltlen, const unsigned char *info, size_t infolen)
Derives key material using Esch384-HKDF.
#define ESCH_256_HKDF_OUTPUT_SIZE
Default output block size for Ecsh256-HKDF. Key material is generated in blocks of this size...
Definition: sparkle-hkdf.h:43
int esch_384_hkdf_expand(esch_384_hkdf_state_t *state, const unsigned char *info, size_t infolen, unsigned char *out, size_t outlen)
Expands key material using a Esch384-HKDF state.
unsigned char posn
Definition: sparkle-hkdf.h:148
unsigned char counter
Definition: sparkle-hkdf.h:145
int esch_256_hkdf_expand(esch_256_hkdf_state_t *state, const unsigned char *info, size_t infolen, unsigned char *out, size_t outlen)
Expands key material using a Esch256-HKDF state.
void esch_384_hkdf_extract(esch_384_hkdf_state_t *state, const unsigned char *key, size_t keylen, const unsigned char *salt, size_t saltlen)
Extracts entropy from a key and salt for Esch384-HKDF.
void esch_256_hkdf_free(esch_256_hkdf_state_t *state)
Frees all sensitive material in a Esch256-HKDF state.
unsigned char posn
Definition: sparkle-hkdf.h:60
unsigned char counter
Definition: sparkle-hkdf.h:57
State for incremental generation of key material from Esch384-HKDF.
Definition: sparkle-hkdf.h:136
State for incremental generation of key material from Esch256-HKDF.
Definition: sparkle-hkdf.h:48
void esch_256_hkdf_extract(esch_256_hkdf_state_t *state, const unsigned char *key, size_t keylen, const unsigned char *salt, size_t saltlen)
Extracts entropy from a key and salt for Esch256-HKDF.
#define ESCH_384_HKDF_OUTPUT_SIZE
Default output block size for Ecsh384-HKDF. Key material is generated in blocks of this size...
Definition: sparkle-hkdf.h:131