Package io.github.mahmoudimus.quic.crypto


package io.github.mahmoudimus.quic.crypto
QUIC packet protection (RFC 9001 section 5): AEAD payload keys, header protection keys, Initial keys per version, key updates and the Retry integrity tag.

Key objects hold reusable JDK Cipher instances and are confined to one thread at a time; no locking is used.

  • Class
    Description
    The keys that protect packets in one direction at one encryption level: a header protection key and a packet (payload) key.
    A header protection key (RFC 9001 section 5.4): masks the low bits of the first byte and the packet number with five bytes derived from a 16-byte sample of the ciphertext.
    The packet protection keys of one encryption level, from one endpoint's point of view: local protects what it sends and remote removes protection from what it receives.
    The AEAD key and IV that protect packet payloads in one direction (RFC 9001 section 5.3).
    The Retry Integrity Tag (RFC 9001 section 5.8, RFC 9369 section 3.3.3): AES-128-GCM with a fixed per-version key and nonce over the Retry pseudo-packet, which is the original Destination Connection ID (with its length byte) followed by the Retry packet without its tag.