1#ifndef QUIC_HKDF_HKDF_H
2#define QUIC_HKDF_HKDF_H
13#define QUIC_HKDF_PRK QUIC_SHA256_DIGEST
16#define QUIC_HKDF_PRK_384 QUIC_SHA384_DIGEST
int quic_hkdf_expand(const u8 prk[QUIC_HKDF_PRK], quic_span info, quic_mspan okm)
okm = HKDF-Expand(prk, info, okm.n).
void quic_hkdf_extract(quic_span salt, quic_span ikm, u8 prk[QUIC_HKDF_PRK])
prk = HKDF-Extract(salt, ikm).
void quic_hkdf_extract_384(quic_span salt, quic_span ikm, u8 prk[QUIC_HKDF_PRK_384])
prk = HKDF-Extract(salt, ikm) instantiated with HMAC-SHA-384 (RFC 5869 2.2, TLS_AES_256_GCM_SHA384).
int quic_hkdf_expand_label(const u8 prk[QUIC_HKDF_PRK], const quic_hkdf_label *l, quic_mspan okm)
okm = HKDF-Expand-Label(prk, label, context, okm.n) with the "tls13 " prefix.
#define QUIC_HKDF_PRK
pseudorandom key length
Definition hkdf.h:13
int quic_hkdf_expand_label_384(const u8 prk[QUIC_HKDF_PRK_384], const quic_hkdf_label *l, quic_mspan okm)
okm = HKDF-Expand-Label(prk, label, context, okm.n) with the "tls13 " prefix, instantiated with HMAC-...
#define QUIC_HKDF_PRK_384
pseudorandom key length for the SHA-384 instantiation
Definition hkdf.h:16
int quic_hkdf_expand_384(const u8 prk[QUIC_HKDF_PRK_384], quic_span info, quic_mspan okm)
okm = HKDF-Expand(prk, info, okm.n) instantiated with HMAC-SHA-384 (RFC 5869 2.3).
FIPS 198-1 HMAC-SHA-256 and HMAC-SHA-384.
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
quic_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 syscall.h:19
unsigned char u8
unsigned 8-bit integer / byte
Definition syscall.h:17