13#define HKDF_PRK SHA256_DIGEST
16#define HKDF_PRK_384 SHA384_DIGEST
void hkdf_extract_384(wired_span salt, wired_span ikm, u8 prk[HKDF_PRK_384])
prk = HKDF-Extract(salt, ikm) instantiated with HMAC-SHA-384 (RFC 5869 2.2, TLS_AES_256_GCM_SHA384).
void hkdf_extract(wired_span salt, wired_span ikm, u8 prk[HKDF_PRK])
prk = HKDF-Extract(salt, ikm).
#define HKDF_PRK
pseudorandom key length
Definition hkdf.h:13
int hkdf_expand(const u8 prk[HKDF_PRK], wired_span info, wired_mspan okm)
okm = HKDF-Expand(prk, info, okm.n).
int hkdf_expand_384(const u8 prk[HKDF_PRK_384], wired_span info, wired_mspan okm)
okm = HKDF-Expand(prk, info, okm.n) instantiated with HMAC-SHA-384 (RFC 5869 2.3).
int hkdf_expand_label(const u8 prk[HKDF_PRK], const hkdf_label *l, wired_mspan okm)
okm = HKDF-Expand-Label(prk, label, context, okm.n) with the "tls13 " prefix.
#define HKDF_PRK_384
pseudorandom key length for the SHA-384 instantiation
Definition hkdf.h:16
int hkdf_expand_label_384(const u8 prk[HKDF_PRK_384], const hkdf_label *l, wired_mspan okm)
okm = HKDF-Expand-Label(prk, label, context, okm.n) with the "tls13 " prefix, instantiated with HMAC-...
FIPS 198-1 HMAC-SHA-256, HMAC-SHA-384 and HMAC-SHA-512.
HkdfLabel inputs (RFC 8446 7.1): the label (without the "tls13 " prefix) and the context (may be empt...
Definition hkdf.h:22
const char * label
label text without the "tls13 " prefix
Definition hkdf.h:23
wired_span ctx
context (hash value); may be empty {0, 0}
Definition hkdf.h:25
usz label_len
length of label in bytes
Definition hkdf.h:24
Mutable view of a byte range.
Definition span.h:42
Read-only view of a byte range.
Definition span.h:30
u64 usz
unsigned size (size_t equivalent)
Definition types.h:20
unsigned char u8
unsigned 8-bit integer / byte
Definition types.h:18