12#define TLS_HASH_MAX HKDF_PRK_384
RFC 5869 HKDF over HMAC-SHA-256, plus the TLS 1.3 / QUIC HKDF-Expand-Label construction (RFC 8446 7....
HkdfLabel inputs (RFC 8446 7.1): the label (without the "tls13 " prefix) and the context (may be empt...
Definition hkdf.h:22
One suite's hash and the HKDF/HMAC instantiated over it.
Definition suitehash.h:15
usz len
Hash.length in bytes (32 or 48).
Definition suitehash.h:16
void(* extract)(wired_span salt, wired_span ikm, u8 *prk)
HKDF-Extract(salt, ikm) into prk (len bytes).
Definition suitehash.h:20
int(* expand_label)(const u8 *prk, const hkdf_label *l, wired_mspan okm)
HKDF-Expand-Label(prk, l, okm.n).
Definition suitehash.h:22
void(* digest)(const u8 *p, usz n, u8 *out)
one-shot digest of n bytes at p into out (len bytes)
Definition suitehash.h:18
void(* mac)(wired_span key, wired_span msg, u8 *out)
HMAC(key, msg) into out (len bytes).
Definition suitehash.h:24
Mutable view of a byte range.
Definition span.h:42
Read-only view of a byte range.
Definition span.h:30
const tls_hash * tls_hash_of(u16 suite)
The hash for suite: SHA-384 for TLS_AES_256_GCM_SHA384, SHA-256 for every other value (including 0,...
u64 usz
unsigned size (size_t equivalent)
Definition types.h:20
unsigned short u16
unsigned 16-bit integer
Definition types.h:17
unsigned char u8
unsigned 8-bit integer / byte
Definition types.h:18