Tls13KeySchedule.hkdfExpandLabel

ubyte[] hkdfExpandLabel(const(ubyte)[] secret, string label, const(ubyte)[] context, size_t length)

HKDF-Expand-Label as defined in RFC 8446 §7.1.

HkdfLabel = HkdfLabel { length: uint16, label: opaque vector ("tls13 " + label), context: opaque vector }

Parameters

secretThe input secret.
labelThe label string (without "tls13 " prefix).
contextThe context data (transcript hash), or null.
lengthOutput length in bytes.

Returns

Derived key material.