Package io.github.mahmoudimus.quic.tls
Class ProfileExtensions
java.lang.Object
io.github.mahmoudimus.quic.tls.ProfileExtensions
The extensions browser profiles send, each as an
ExtensionSpec whose body is encoded
the way the browser encodes it (RFC 8446 section 4.2 and the extensions' own specifications).
In the lists, GREASE stands for the hello's GREASE value of that list.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intapplication_settings(ALPS) with the codepoint Chrome has used since 2025.static final intCertificate compression algorithms (RFC 8879 section 7.3).static final intcompress_certificate(RFC 8879).static final intdelegated_credentials(RFC 9345).static final intencrypted_client_hello(RFC 9849).static final intIn a cipher suite, group, version or signature scheme list: the hello's GREASE value.static final intquic_transport_parameters(RFC 9001 section 8.2).static final intrecord_size_limit(RFC 8449).static final inttrust_anchors(draft-ietf-tls-trust-anchor-ids).static final intThe hybrid named group X25519MLKEM768 (draft-ietf-tls-ecdhe-mlkem).static final intCertificate compression algorithms (RFC 8879 section 7.3).static final intCertificate compression algorithms (RFC 8879 section 7.3). -
Method Summary
Modifier and TypeMethodDescriptionstatic ExtensionSpecalpn()application_layer_protocol_negotiationwith the context's protocols; left out when there are none.static ExtensionSpecapplicationSettings(String... protocols) application_settings(ALPS) forprotocols, Chrome's codepoint.static ExtensionSpeccompressCertificate(int... algorithms) compress_certificate(RFC 8879) offeringalgorithmsin order.static ExtensionSpecdelegatedCredentials(int... schemes) delegated_credentials(RFC 9345) accepting credentials signed withschemes, in order.static ExtensionSpecec_point_formatsoffering only the uncompressed format.static ExtensionSpecextended_master_secret(RFC 7627), empty.static ExtensionSpecgreaseEch(int... payloadLengths) A GREASEencrypted_client_hello(RFC 9849 section 6.2), as BoringSSL sends one when it has no ECHConfig: an outer ClientHello extension for HKDF-SHA256 and AES-128-GCM, a random config id, a random 32-byteencand a random payload of one ofpayloadLengths.static ExtensionSpecThe first GREASE extension, with an empty body, as BoringSSL sends it.static ExtensionSpecThe last GREASE extension, with a one-byte body of zero, as BoringSSL sends it.static ExtensionSpeckeyShare(int... groups) key_sharewith a share for each ofgroups: the GREASE group's is one zero byte, the others are the context's public keys.static ExtensionSpecA GREASEencrypted_client_helloas NSS (Firefox) sends one when it has no ECHConfig (tls13_MaybeGreaseEch): an outer ClientHello extension for HKDF-SHA256 and, at random, AES-128-GCM or ChaCha20-Poly1305, a random config id and 32-byteenc, and a random payload as long as the ClientHelloInner NSS would have encrypted.static ExtensionSpecpsk_key_exchange_modesoffering onlypsk_dhe_ke.static ExtensionSpecrecordSizeLimit(int limit) record_size_limit(RFC 8449) announcinglimit.static ExtensionSpecrenegotiation_info(RFC 5746) of an initial handshake: an empty renegotiated_connection.static ExtensionSpecserver_namewith the context's host name; left out when there is none.static ExtensionSpecsession_ticket(RFC 5077), empty: no ticket to resume with.static ExtensionSpecsession_ticket(RFC 5077), empty, left out of a hello that resumes a TLS 1.3 session, as NSS (Firefox) leaves it out.static ExtensionSpecsignatureAlgorithms(int... schemes) signature_algorithms:schemesin order.static ExtensionSpecsigned_certificate_timestamp, empty.static ExtensionSpecstatus_requestfor OCSP, with no responder ids and no extensions.static ExtensionSpecsupplied(int type) An extension whose body the connection makes itself (HelloContext.supplied()), such as QUIC'squic_transport_parameters; left out when the connection supplies none.static ExtensionSpecsupportedGroups(int... groups) supported_groups:groupsin order.static ExtensionSpecsupportedVersions(int... versions) supported_versions:versionsin order.static ExtensionSpectrustAnchors(String... hexIds) trust_anchorsnaminghexIds, each a hex-encoded trust anchor ID.
-
Field Details
-
GREASE
public static final int GREASEIn a cipher suite, group, version or signature scheme list: the hello's GREASE value.- See Also:
-
APPLICATION_SETTINGS
public static final int APPLICATION_SETTINGSapplication_settings(ALPS) with the codepoint Chrome has used since 2025.- See Also:
-
TRUST_ANCHORS
public static final int TRUST_ANCHORStrust_anchors(draft-ietf-tls-trust-anchor-ids).- See Also:
-
ENCRYPTED_CLIENT_HELLO
public static final int ENCRYPTED_CLIENT_HELLOencrypted_client_hello(RFC 9849).- See Also:
-
QUIC_TRANSPORT_PARAMETERS
public static final int QUIC_TRANSPORT_PARAMETERSquic_transport_parameters(RFC 9001 section 8.2).- See Also:
-
RECORD_SIZE_LIMIT
public static final int RECORD_SIZE_LIMITrecord_size_limit(RFC 8449).- See Also:
-
DELEGATED_CREDENTIALS
public static final int DELEGATED_CREDENTIALSdelegated_credentials(RFC 9345).- See Also:
-
COMPRESS_CERTIFICATE
public static final int COMPRESS_CERTIFICATEcompress_certificate(RFC 8879).- See Also:
-
X25519_MLKEM768
public static final int X25519_MLKEM768The hybrid named group X25519MLKEM768 (draft-ietf-tls-ecdhe-mlkem).- See Also:
-
ZLIB
public static final int ZLIBCertificate compression algorithms (RFC 8879 section 7.3).- See Also:
-
BROTLI
public static final int BROTLICertificate compression algorithms (RFC 8879 section 7.3).- See Also:
-
ZSTD
public static final int ZSTDCertificate compression algorithms (RFC 8879 section 7.3).- See Also:
-
-
Method Details
-
greaseFirst
The first GREASE extension, with an empty body, as BoringSSL sends it. -
greaseLast
The last GREASE extension, with a one-byte body of zero, as BoringSSL sends it. -
serverName
server_namewith the context's host name; left out when there is none. -
extendedMasterSecret
extended_master_secret(RFC 7627), empty. -
renegotiationInfo
renegotiation_info(RFC 5746) of an initial handshake: an empty renegotiated_connection. -
supportedGroups
supported_groups:groupsin order. -
ecPointFormats
ec_point_formatsoffering only the uncompressed format. -
sessionTicket
session_ticket(RFC 5077), empty: no ticket to resume with. -
sessionTicketUnlessResuming
session_ticket(RFC 5077), empty, left out of a hello that resumes a TLS 1.3 session, as NSS (Firefox) leaves it out. -
delegatedCredentials
delegated_credentials(RFC 9345) accepting credentials signed withschemes, in order. -
recordSizeLimit
record_size_limit(RFC 8449) announcinglimit. -
alpn
application_layer_protocol_negotiationwith the context's protocols; left out when there are none. -
statusRequest
status_requestfor OCSP, with no responder ids and no extensions. -
signatureAlgorithms
signature_algorithms:schemesin order. -
signedCertificateTimestamp
signed_certificate_timestamp, empty. -
supplied
An extension whose body the connection makes itself (HelloContext.supplied()), such as QUIC'squic_transport_parameters; left out when the connection supplies none. -
pskKeyExchangeModes
psk_key_exchange_modesoffering onlypsk_dhe_ke. -
supportedVersions
supported_versions:versionsin order. -
compressCertificate
compress_certificate(RFC 8879) offeringalgorithmsin order. -
applicationSettings
application_settings(ALPS) forprotocols, Chrome's codepoint. -
trustAnchors
trust_anchorsnaminghexIds, each a hex-encoded trust anchor ID. -
greaseEch
A GREASEencrypted_client_hello(RFC 9849 section 6.2), as BoringSSL sends one when it has no ECHConfig: an outer ClientHello extension for HKDF-SHA256 and AES-128-GCM, a random config id, a random 32-byteencand a random payload of one ofpayloadLengths. -
nssGreaseEch
A GREASEencrypted_client_helloas NSS (Firefox) sends one when it has no ECHConfig (tls13_MaybeGreaseEch): an outer ClientHello extension for HKDF-SHA256 and, at random, AES-128-GCM or ChaCha20-Poly1305, a random config id and 32-byteenc, and a random payload as long as the ClientHelloInner NSS would have encrypted. That is the EncodedClientHelloInner made from this hello (tls13_ConstructInnerExtensionsFromOuter):- an inner
encrypted_client_hello, theserver_name, andsupported_versionswith TLS 1.3 alone; - the hello's other extensions that TLS 1.3 has, as one
ech_outer_extensions; - the
pre_shared_key, when resuming;
maximum_name_lengthis 100 (tls13_PadChInner), plus the 16-byte AEAD tag. - an inner
-