Package io.github.mahmoudimus.quic.tls
package io.github.mahmoudimus.quic.tls
A TLS 1.3 handshake (RFC 8446) for QUIC (RFC 9001), client and server, ported from rustls with
quinn's session interface.
TlsSession is the entry point,
configured by TlsConfig; cryptography comes from the JDK.
The JDK's SSLEngine cannot be used for QUIC: it emits TLS records, keeps the traffic
secrets to itself and has no quic_transport_parameters extension. This package has no
record layer: handshake messages are exchanged per encryption level and the secrets are handed to
packet protection.
Session resumption and 0-RTT: a server seals tickets with a Ticketer, a client keeps them as SessionTickets in a ClientSessionStore, and a server's EarlyDataPolicy decides on early data, which can be replayed.
-
ClassDescriptionA certificate chain, end-entity certificate first, and the private key for that certificate: what a server, or a client asked for a certificate, presents and signs with.Whether a server asks clients for a certificate (RFC 8446 section 4.3.2).What a server's certificate and ALPN selectors see of a ClientHello.A bounded, in-memory
ClientSessionStore: up to a number of servers, each with up to 8 tickets.Where a client keeps session tickets between connections, by server.A resuming client's offer of 0-RTT data, as anEarlyDataPolicysees it.Decides, on a server, whether to accept the 0-RTT data a resuming client offers.The (EC)DHE groups the handshake offers and accepts for key exchange (RFC 8446 section 4.2.7).A session ticket a client received in a NewSessionTicket message (RFC 8446 section 4.6.1), with what it needs to resume the session: the pre-shared key derived from the resumption master secret, the cipher suite, the ticket age obfuscation, and for 0-RTT the ALPN protocol and the server's QUIC transport parameters, which a client must remember and use for its early data (RFC 9000 section 7.4.1).The signature schemes (RFC 8446 section 4.2.3) the handshake knows.A stateless session ticket encrypter for a server (RFC 8446 section 4.6.1, RFC 5077 section 4): the session state is sealed into the ticket with AES-256-GCM under a server key, so the server keeps nothing per session.The TLS alert descriptions (RFC 8446 section 6) the handshake raises.Configuration for TLS 1.3 handshakes in QUIC, shared by any number ofTlsSessions.Builds aTlsConfig.A TLS 1.3 handshake for QUIC (RFC 9001), as a sans-I/O state machine modelled on quinn'scrypto::Session.