Leancrypto 1.7.2
Post-Quantum Cryptographic Library
Macros | Functions | Variables
lc_hkdf.h File Reference
#include "ext_headers.h"
#include "lc_hmac.h"
#include "lc_rng.h"
#include "lc_memset_secure.h"
#include "lc_status.h"
+ Include dependency graph for lc_hkdf.h:

Go to the source code of this file.

Macros

#define LC_HKDF_CTX_ON_STACK(name, hashname)
 Allocate stack memory for the HKDF context. More...
 
#define LC_HKDF_DRNG_CTX_ON_STACK(name, hashname)
 Allocate stack memory for the HKDF DRNG context. More...
 

Functions

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. More...
 
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. More...
 
void lc_hkdf_zero (struct lc_hkdf_ctx *hkdf_ctx)
 Zeroize HKDF context allocated with either LC_HKDF_CTX_ON_STACK or hkdf_alloc. More...
 
int lc_hkdf_alloc (const struct lc_hash *hash, struct lc_hkdf_ctx **hkdf_ctx)
 Allocate HKDF context on heap. More...
 
void lc_hkdf_zero_free (struct lc_hkdf_ctx *hkdf_ctx)
 Zeroize and free HKDF context. More...
 
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. More...
 
enum lc_alg_status_val lc_hkdf_alg_status (const struct lc_hash *hash)
 Obtain algorithm status. More...
 
int lc_hkdf_rng_alloc (struct lc_rng_ctx **state, const struct lc_hash *hash)
 Allocation of a HKDF DRNG context. More...
 

Variables

const struct lc_rng * lc_hkdf_rng
 

Variable Documentation

◆ lc_hkdf_rng

const struct lc_rng* lc_hkdf_rng
extern