#include "ext_headers.h"
#include "lc_hmac.h"
#include "lc_rng.h"
#include "lc_memset_secure.h"
Go to the source code of this file.
|
int | lc_hkdf_extract (struct lc_hkdf_ctx *hkdf_ctx, const uint8_t *ikm, size_t ikmlen, const uint8_t *salt, size_t saltlen) |
| HMAC-based Extract-and-Expand Key Derivation Function (HKDF) - RFC5869 Extract phase.
|
|
int | lc_hkdf_expand (struct lc_hkdf_ctx *hkdf_ctx, const uint8_t *info, size_t infolen, uint8_t *dst, size_t dlen) |
| HMAC-based Extract-and-Expand Key Derivation Function (HKDF) - RFC5869 Expand phase.
|
|
static void | lc_hkdf_zero (struct lc_hkdf_ctx *hkdf_ctx) |
| Zeroize HKDF context allocated with either LC_HKDF_CTX_ON_STACK or hkdf_alloc.
|
|
int | lc_hkdf_alloc (const struct lc_hash *hash, struct lc_hkdf_ctx **hkdf_ctx) |
| Allocate HKDF context on heap.
|
|
void | lc_hkdf_zero_free (struct lc_hkdf_ctx *hkdf_ctx) |
| Zeroize and free HKDF context.
|
|
static int | lc_hkdf (const struct lc_hash *hash, const uint8_t *ikm, size_t ikmlen, const uint8_t *salt, size_t saltlen, const uint8_t *info, size_t infolen, uint8_t *dst, size_t dlen) |
| HMAC-based Extract-and-Expand Key Derivation Function (HKDF) - RFC5869 Complete implementation.
|
|
int | lc_hkdf_rng_alloc (struct lc_rng_ctx **state, const struct lc_hash *hash) |
| Allocation of a HKDF DRNG context.
|
|
◆ LC_HKDF_DRNG_CTX_SIZE
#define LC_HKDF_DRNG_CTX_SIZE |
( |
| hashname | ) |
(sizeof(struct lc_rng_ctx) + LC_HKDF_CTX_SIZE(hashname)) |
◆ LC_HKDF_DRNG_SET_CTX
#define LC_HKDF_DRNG_SET_CTX |
( |
| name, |
|
|
| hashname ) LC_HKDF_SET_CTX(name, hashname) |
◆ LC_HKDF_RNG_CTX
#define LC_HKDF_RNG_CTX |
( |
| name, |
|
|
| hashname ) |
Value:
LC_HKDF_DRNG_SET_CTX(((struct lc_hkdf_ctx *)(name->rng_state)), \
hashname); \
lc_rng_zero(name)
const struct lc_rng * lc_hkdf_rng
Definition at line 210 of file lc_hkdf.h.
◆ lc_hkdf_rng
const struct lc_rng* lc_hkdf_rng |
|
extern |