Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

StreamSec.Quic.Protection

Feature notes: Asynchronous QUIC server and HTTP/3 component

Classes, interfaces and records

classtQuicPacketProtection

One instance holds one direction's packet and header protection keys. Its cipher state is mutable: calls require external serialization. Key schedules and IV are owned independently of constructor inputs. The transport enforces packet-number uniqueness, key updates and the connection-wide integrity budget. This class enforces the hard AES encryption bound and 65535-byte packet cap, but has no packet space.

constructor Create(aCipher: tQuicPacketCipher; const aKey, aIV, aHeaderKey: TBytes); destructor Destroy; override; function Seal(const aHeader, aPayload: TBytes; aPacketNumber: UInt64; aPacketNumberOffset: Integer): TBytes;
aHeader is unprotected and includes exactly the encoded packet number. aPacketNumberOffset is relative to this header. Its encoded number must agree with aPacketNumber. Returns one independent protected packet. The caller supplies frame padding when needed for the 16-byte header protection sample; this method raises eQuicError instead of padding.
function HeaderInfo(const aPacket: TBytes; aPacketNumberOffset: Integer; aExpectedPacketNumber: UInt64; out aFirstByte: Byte; out aPacketNumber: UInt64): Boolean;
aPacket contains exactly one packet, already split from any coalesced datagram. aPacketNumberOffset is relative to aPacket. Full description »
property EncryptionCount: UInt64 read fEncryptionCount; property LastAuthenticationAttempted: Boolean read fLastAuthenticationAttempted; function Open(const aPacket: TBytes; aPacketNumberOffset: Integer; aExpectedPacketNumber: UInt64; out aHeader, aPayload: TBytes; out aPacketNumber: UInt64): Boolean;

Types (enumerations, sets, aliases)

enumtQuicPacketCipher

  tQuicPacketCipher = (qpcAES128GCM, qpcAES256GCM, qpcChaCha20Poly1305);

Routines