Expand description
PQ handshake fragmentation with admission before buffering.
Bytes are charged against a per-message cap first. Only then may a fragment
be copied into the bounded reassembly slot. Truncated wire is
QdnfError::Truncated and does not copy. Interface loss is
QdnfError::Closed; reconnect bumps generation so old tickets are useless.
Structs§
- Admit
Ticket - Proof that
chargedbytes were admitted formsg_idatgeneration. - Fragment
Header - Handshake
Reassembler
Constants§
- FRAG_
HDR_ LEN msg_id(4) || offset(2) || total(2) || frag_len(2).- MAX_
FRAGMENTS - MAX_
FRAME - MAX_
HANDSHAKE_ BYTES - Hybrid handshake (ML-KEM-768 + X25519 + signatures) fits under this cap.
- MAX_
SESSIONS
Functions§
- admit_
and_ buffer - Decode, admit, then copy. Truncated or oversize wire never copies.
- decode_
fragment - Decodes a fragment header, returning it with the payload slice.
- encode_
fragment - Encodes a fragment header + payload into the frame.
- fragment_
payload_ mtu - Payload bytes available per fragment under
mtu. - split_
handshake - Split a PQ handshake into bounded frames.
payload_mtuis bytes after the fragment header (usefragment_payload_mtu).