Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

EncodePreSharedKeyCH

function EncodePreSharedKeyCH(const aIdentity: tBytes; aObfuscatedAge: UInt32; aBinderLen: Integer; out aBinderPortionLen: Integer): tBytes;
pre_shared_key for ClientHello (RFC 8446 sec.4.2.11): a single PskIdentity (aIdentity + aObfuscatedAge) plus a zero placeholder PskBinderEntry of aBinderLen bytes. The binder occupies the LAST aBinderLen bytes of the returned extension; the caller computes it over the truncated ClientHello and patches it in. aBinderPortionLen returns the number of trailing ClientHello bytes (the binders vector) that must be EXCLUDED from the binder transcript. pre_shared_key MUST be the last extension in the ClientHello.