Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow ClientHello to span multiple QUIC packets #3045

Merged
merged 9 commits into from
Oct 31, 2019
Merged
24 changes: 13 additions & 11 deletions draft-ietf-quic-tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -570,11 +570,16 @@ older than 1.3 is negotiated.

## ClientHello Size {#clienthello-size}

QUIC requires that the first Initial packet from a client contain an entire
cryptographic handshake message, which for TLS is the ClientHello. Though a
packet larger than 1200 bytes might be supported by the path, a client improves
the likelihood that a packet is accepted if it ensures that the first
ClientHello message is small enough to stay within this limit.
The first Initial packet from a client contains the start or all of its first
cryptographic handshake message, which for TLS is the ClientHello. Servers
might need to parse the entire ClientHello (e.g., to access extensions such as
Server Name Identification (SNI) or Application Layer Protocol Negotiation
(ALPN)) in order to decide whether to accept the new incoming QUIC connection.
If the ClientHello spans multiple Initial packets, such servers would need to
buffer the first received fragments, which could consume excessive resources if
the client's address has not yet been validated. To avoid this, servers MAY
use the Retry feature (see Section 8.1 of {{QUIC-TRANSPORT}}) to only buffer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or address tokens, presumably?

partial ClientHello messages from clients with a validated address.

QUIC packet and framing add at least 36 bytes of overhead to the ClientHello
message. That overhead increases if the client chooses a connection ID without
Expand All @@ -589,12 +594,9 @@ QUIC transport parameters, and other negotiable parameters and extensions could
cause this message to grow.

For servers, in addition to connection IDs and tokens, the size of TLS session
tickets can have an effect on a client's ability to connect. Minimizing the
size of these values increases the probability that they can be successfully
used by a client.

A client is not required to fit the ClientHello that it sends in response to a
HelloRetryRequest message into a single UDP datagram.
tickets can have an effect on a client's ability to connect efficiently.
Minimizing the size of these values increases the probability that clients can
use them and still fit their ClientHello message in their first Initial packet.

The TLS implementation does not need to ensure that the ClientHello is
sufficiently large. QUIC PADDING frames are added to increase the size of the
Expand Down
28 changes: 9 additions & 19 deletions draft-ietf-quic-transport.md
Original file line number Diff line number Diff line change
Expand Up @@ -1298,15 +1298,6 @@ properties:
* authenticated negotiation of an application protocol (TLS uses ALPN
{{?RFC7301}} for this purpose)

The first CRYPTO frame from a client MUST be sent in a single packet. Any
second attempt that is triggered by address validation (see
{{validate-handshake}}) MUST also be sent within a single packet. This avoids
having to reassemble a message from multiple packets.

The first client packet of the cryptographic handshake protocol MUST fit within
a 1232 byte QUIC packet payload. This includes overheads that reduce the space
available to the cryptographic handshake protocol.

An endpoint can verify support for Explicit Congestion Notification (ECN) in the
first packets it sends, as described in {{ecn-validation}}.

Expand Down Expand Up @@ -3959,16 +3950,15 @@ Initial packet containing other frames can either discard the packet as spurious
or treat it as a connection error.

The first packet sent by a client always includes a CRYPTO frame that contains
the entirety of the first cryptographic handshake message. This packet, and the
cryptographic handshake message, MUST fit in a single UDP datagram (see
{{handshake}}). The first CRYPTO frame sent always begins at an offset of 0
(see {{handshake}}).

Note that if the server sends a HelloRetryRequest, the client will send a second
Initial packet. This Initial packet will continue the cryptographic handshake
and will contain a CRYPTO frame with an offset matching the size of the CRYPTO
frame sent in the first Initial packet. Cryptographic handshake messages
subsequent to the first do not need to fit within a single UDP datagram.
the start or all of the first cryptographic handshake message. The first
CRYPTO frame sent always begins at an offset of 0 (see {{handshake}}).

Note that if the server sends a HelloRetryRequest, the client will send another
series of Initial packets. These Initial packets will continue the
cryptographic handshake and will contain CRYPTO frames starting at an offset
matching the size of the CRYPTO frames sent in the first flight of Initial
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"matching the size" is a bit odd. Perhaps "immediately after the last byte of..."

packets.


#### Abandoning Initial Packets {#discard-initial}

Expand Down