draft-ietf-quic-invariants-08.txt   draft-ietf-quic-invariants-09.txt 
QUIC M. Thomson QUIC M. Thomson
Internet-Draft Mozilla Internet-Draft Mozilla
Intended status: Standards Track 20 May 2020 Intended status: Standards Track 9 June 2020
Expires: 21 November 2020 Expires: 11 December 2020
Version-Independent Properties of QUIC Version-Independent Properties of QUIC
draft-ietf-quic-invariants-08 draft-ietf-quic-invariants-09
Abstract Abstract
This document defines the properties of the QUIC transport protocol This document defines the properties of the QUIC transport protocol
that are expected to remain unchanged over time as new versions of that are expected to remain unchanged over time as new versions of
the protocol are developed. the protocol are developed.
Note to Readers Note to Readers
Discussion of this draft takes place on the QUIC working group Discussion of this draft takes place on the QUIC working group
skipping to change at page 1, line 43 skipping to change at page 1, line 43
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on 21 November 2020. This Internet-Draft will expire on 11 December 2020.
Copyright Notice Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents (https://trustee.ietf.org/ Provisions Relating to IETF Documents (https://trustee.ietf.org/
license-info) in effect on the date of publication of this document. license-info) in effect on the date of publication of this document.
Please review these documents carefully, as they describe your rights Please review these documents carefully, as they describe your rights
and restrictions with respect to this document. Code Components and restrictions with respect to this document. Code Components
extracted from this document must include Simplified BSD License text extracted from this document must include Simplified BSD License text
as described in Section 4.e of the Trust Legal Provisions and are as described in Section 4.e of the Trust Legal Provisions and are
provided without warranty as described in the Simplified BSD License. provided without warranty as described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Conventions and Definitions . . . . . . . . . . . . . . . . . 3 2. Conventions and Definitions . . . . . . . . . . . . . . . . . 3
3. An Extremely Abstract Description of QUIC . . . . . . . . . . 3 3. An Extremely Abstract Description of QUIC . . . . . . . . . . 3
4. QUIC Packet Headers . . . . . . . . . . . . . . . . . . . . . 3 4. Notational Conventions . . . . . . . . . . . . . . . . . . . 3
4.1. Long Header . . . . . . . . . . . . . . . . . . . . . . . 3 5. QUIC Packet Headers . . . . . . . . . . . . . . . . . . . . . 4
4.2. Short Header . . . . . . . . . . . . . . . . . . . . . . 4 5.1. Long Header . . . . . . . . . . . . . . . . . . . . . . . 4
4.3. Connection ID . . . . . . . . . . . . . . . . . . . . . . 5 5.2. Short Header . . . . . . . . . . . . . . . . . . . . . . 5
4.4. Version . . . . . . . . . . . . . . . . . . . . . . . . . 5 5.3. Connection ID . . . . . . . . . . . . . . . . . . . . . . 5
5. Version Negotiation . . . . . . . . . . . . . . . . . . . . . 5 5.4. Version . . . . . . . . . . . . . . . . . . . . . . . . . 6
6. Security and Privacy Considerations . . . . . . . . . . . . . 7 6. Version Negotiation . . . . . . . . . . . . . . . . . . . . . 6
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 7. Security and Privacy Considerations . . . . . . . . . . . . . 7
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8
8.1. Normative References . . . . . . . . . . . . . . . . . . 7 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 8
8.2. Informative References . . . . . . . . . . . . . . . . . 7 9.1. Normative References . . . . . . . . . . . . . . . . . . 8
9.2. Informative References . . . . . . . . . . . . . . . . . 8
Appendix A. Incorrect Assumptions . . . . . . . . . . . . . . . 8 Appendix A. Incorrect Assumptions . . . . . . . . . . . . . . . 8
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 9 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 10
1. Introduction 1. Introduction
In addition to providing secure, multiplexed transport, QUIC In addition to providing secure, multiplexed transport, QUIC
[QUIC-TRANSPORT] includes the ability to negotiate a version. This [QUIC-TRANSPORT] includes the ability to negotiate a version. This
allows the protocol to change over time in response to new allows the protocol to change over time in response to new
requirements. Many characteristics of the protocol will change requirements. Many characteristics of the protocol will change
between versions. between versions.
This document describes the subset of QUIC that is intended to remain This document describes the subset of QUIC that is intended to remain
skipping to change at page 3, line 27 skipping to change at page 3, line 27
This document uses terms and notational conventions from This document uses terms and notational conventions from
[QUIC-TRANSPORT]. [QUIC-TRANSPORT].
3. An Extremely Abstract Description of QUIC 3. An Extremely Abstract Description of QUIC
QUIC is a connection-oriented protocol between two endpoints. Those QUIC is a connection-oriented protocol between two endpoints. Those
endpoints exchange UDP datagrams. These UDP datagrams contain QUIC endpoints exchange UDP datagrams. These UDP datagrams contain QUIC
packets. QUIC endpoints use QUIC packets to establish a QUIC packets. QUIC endpoints use QUIC packets to establish a QUIC
connection, which is shared protocol state between those endpoints. connection, which is shared protocol state between those endpoints.
4. QUIC Packet Headers 4. Notational Conventions
A QUIC packet is the content of the UDP datagrams exchanged by QUIC Packet diagrams in this document use a format defined in
endpoints. This document describes the contents of those datagrams. [QUIC-TRANSPORT] to illustrate the order and size of fields.
Complex fields are named and then followed by a list of fields
surrounded by a pair of matching braces. Each field in this list is
separated by commas.
Individual fields include length information, plus indications about
fixed value, optionality, or repetitions. Individual fields use the
following notational conventions, with all lengths in bits:
x (A): Indicates that x is A bits long
x (A..B): Indicates that x can be any length from A to B; A can be
omitted to indicate a minimum of zero bits and B can be omitted to
indicate no set upper limit; values in this format always end on
an octet boundary
x (?) = C: Indicates that x has a fixed value of C
x (E) ...: Indicates that x is repeated zero or more times (and that
each instance is length E)
This document uses network byte order (that is, big endian) values.
Fields are placed starting from the high-order bits of each byte.
Figure 1 shows an example structure:
Example Structure {
One-bit Field (1),
7-bit Field with Fixed Value (7) = 61,
Arbitrary-Length Field (..),
Variable-Length Field (8..24),
Repeated Field (8) ...,
}
Figure 1: Example Format
5. QUIC Packet Headers
QUIC endpoints exchange UDP datagrams that contain one or more QUIC
packets. This section describes the invariant characteristics of a
QUIC packet. A version of QUIC could permit multiple QUIC packets in
a single UDP datagram, but the invariant properties only describe the
first packet in a datagram.
QUIC defines two types of packet header: long and short. Packets QUIC defines two types of packet header: long and short. Packets
with long headers are identified by the most significant bit of the with long headers are identified by the most significant bit of the
first byte being set; packets with a short header have that bit first byte being set; packets with a short header have that bit
cleared. cleared.
Aside from the values described here, the payload of QUIC packets is Aside from the values described here, the payload of QUIC packets is
version-specific and of arbitrary length. version-specific and of arbitrary length.
4.1. Long Header 5.1. Long Header
Long headers take the form described in Figure 1. Long headers take the form described in Figure 2.
Long Header Packet { Long Header Packet {
Header Form (1) = 1, Header Form (1) = 1,
Version-Specific Bits (7), Version-Specific Bits (7),
Version (32), Version (32),
DCID Len (8), Destination Connection ID Length (8),
Destination Connection ID (0..2040), Destination Connection ID (0..2040),
SCID Len (8), Source Connection ID Length (8),
Source Connection ID (0..2040), Source Connection ID (0..2040),
Version-Specific Data (..), Version-Specific Data (..),
} }
Figure 1: QUIC Long Header Figure 2: QUIC Long Header
A QUIC packet with a long header has the high bit of the first byte A QUIC packet with a long header has the high bit of the first byte
set to 1. All other bits in that byte are version specific. set to 1. All other bits in that byte are version specific.
The next four bytes include a 32-bit Version field (see Section 4.4). The next four bytes include a 32-bit Version field. Versions are
described in Section 5.4.
The next byte contains the length in bytes of the Destination The next byte contains the length in bytes of the Destination
Connection ID (see Section 4.3) field that follows it. This length Connection ID field that follows it. This length is encoded as an
is encoded as an 8-bit unsigned integer. The Destination Connection 8-bit unsigned integer. The Destination Connection ID field follows
ID field follows the DCID Len field and is between 0 and 255 bytes in the Destination Connection ID Length field and is between 0 and 255
length. bytes in length. Connection IDs are described in Section 5.3.
The next byte contains the length in bytes of the Source Connection The next byte contains the length in bytes of the Source Connection
ID field that follows it. This length is encoded as a 8-bit unsigned ID field that follows it. This length is encoded as a 8-bit unsigned
integer. The Source Connection ID field follows the SCID Len field integer. The Source Connection ID field follows the Source
and is between 0 and 255 bytes in length. Connection ID Length field and is between 0 and 255 bytes in length.
The remainder of the packet contains version-specific content. The remainder of the packet contains version-specific content.
4.2. Short Header 5.2. Short Header
Short headers take the form described in Figure 2. Short headers take the form described in Figure 3.
Short Header Packet { Short Header Packet {
Header Form (1) = 0, Header Form (1) = 0,
Version-Specific Bits (7), Version-Specific Bits (7),
Destination Connection ID (..), Destination Connection ID (..),
Version-Specific Data (..), Version-Specific Data (..),
} }
Figure 2: QUIC Short Header Figure 3: QUIC Short Header
A QUIC packet with a short header has the high bit of the first byte A QUIC packet with a short header has the high bit of the first byte
set to 0. set to 0.
A QUIC packet with a short header includes a Destination Connection A QUIC packet with a short header includes a Destination Connection
ID immediately following the first byte. The short header does not ID immediately following the first byte. The short header does not
include the Connection ID Lengths, Source Connection ID, or Version include the Connection ID Lengths, Source Connection ID, or Version
fields. The length of the Destination Connection ID is not specified fields. The length of the Destination Connection ID is not encoded
in packets with a short header and is not constrained by this in packets with a short header and is not constrained by this
specification. specification.
The remainder of the packet has version-specific semantics. The remainder of the packet has version-specific semantics.
4.3. Connection ID 5.3. Connection ID
A connection ID is an opaque field of arbitrary length. A connection ID is an opaque field of arbitrary length.
The primary function of a connection ID is to ensure that changes in The primary function of a connection ID is to ensure that changes in
addressing at lower protocol layers (UDP, IP, and below) don't cause addressing at lower protocol layers (UDP, IP, and below) don't cause
packets for a QUIC connection to be delivered to the wrong endpoint. packets for a QUIC connection to be delivered to the wrong QUIC
The connection ID is used by endpoints and the intermediaries that endpoint. The connection ID is used by endpoints and the
support them to ensure that each QUIC packet can be delivered to the intermediaries that support them to ensure that each QUIC packet can
correct instance of an endpoint. At the endpoint, the connection ID be delivered to the correct instance of an endpoint. At the
is used to identify which QUIC connection the packet is intended for. endpoint, the connection ID is used to identify which QUIC connection
the packet is intended for.
The connection ID is chosen by each endpoint using version-specific The connection ID is chosen by each endpoint using version-specific
methods. Packets for the same QUIC connection might use different methods. Packets for the same QUIC connection might use different
connection ID values. connection ID values.
4.4. Version 5.4. Version
QUIC versions are identified with a 32-bit integer, encoded in QUIC versions are identified with a 32-bit integer, encoded in
network byte order. Version 0 is reserved for version negotiation network byte order. Version 0 is reserved for version negotiation
(see Section 5). All other version numbers are potentially valid. (see Section 6). All other version numbers are potentially valid.
The properties described in this document apply to all versions of The properties described in this document apply to all versions of
QUIC. A protocol that does not conform to the properties described QUIC. A protocol that does not conform to the properties described
in this document is not QUIC. Future documents might describe in this document is not QUIC. Future documents might describe
additional properties which apply to a specific QUIC version, or to a additional properties which apply to a specific QUIC version, or to a
range of QUIC versions. range of QUIC versions.
5. Version Negotiation 6. Version Negotiation
A QUIC endpoint that receives a packet with a long header and a A QUIC endpoint that receives a packet with a long header and a
version it either does not understand or does not support might send version it either does not understand or does not support might send
a Version Negotiation packet in response. Packets with a short a Version Negotiation packet in response. Packets with a short
header do not trigger version negotiation. header do not trigger version negotiation.
A Version Negotiation packet sets the high bit of the first byte, and A Version Negotiation packet sets the high bit of the first byte, and
thus it conforms with the format of a packet with a long header as thus it conforms with the format of a packet with a long header as
defined in Section 4.1. A Version Negotiation packet is identifiable defined in Section 5.1. A Version Negotiation packet is identifiable
as such by the Version field, which is set to 0x00000000. as such by the Version field, which is set to 0x00000000.
Version Negotiation Packet { Version Negotiation Packet {
Header Form (1) = 1, Header Form (1) = 1,
Unused (7), Unused (7),
Version (32) = 0, Version (32) = 0,
DCID Len (8), Destination Connection ID Length (8),
Destination Connection ID (0..2040), Destination Connection ID (0..2040),
SCID Len (8), Source Connection ID Length (8),
Source Connection ID (0..2040), Source Connection ID (0..2040),
Supported Version (32) ..., Supported Version (32) ...,
} }
Figure 4: Version Negotiation Packet
Figure 3: Version Negotiation Packet
The Version Negotiation packet contains a list of Supported Version The Version Negotiation packet contains a list of Supported Version
fields, each identifying a version that the endpoint sending the fields, each identifying a version that the endpoint sending the
packet supports. The Supported Version fields follow the Version packet supports. The Supported Version fields follow the Version
field. A Version Negotiation packet contains no other fields. An field. A Version Negotiation packet contains no other fields. An
endpoint MUST ignore a packet that contains no Supported Version endpoint MUST ignore a packet that contains no Supported Version
fields, or a truncated Supported Version. fields, or a truncated Supported Version.
Version Negotiation packets do not use integrity or confidentiality Version Negotiation packets do not use integrity or confidentiality
protection. A specific QUIC version might authenticate the packet as protection. A specific QUIC version might authenticate the packet as
skipping to change at page 7, line 5 skipping to change at page 7, line 35
An endpoint that receives a Version Negotiation packet might change An endpoint that receives a Version Negotiation packet might change
the version that it decides to use for subsequent packets. The the version that it decides to use for subsequent packets. The
conditions under which an endpoint changes QUIC version will depend conditions under which an endpoint changes QUIC version will depend
on the version of QUIC that it chooses. on the version of QUIC that it chooses.
See [QUIC-TRANSPORT] for a more thorough description of how an See [QUIC-TRANSPORT] for a more thorough description of how an
endpoint that supports QUIC version 1 generates and consumes a endpoint that supports QUIC version 1 generates and consumes a
Version Negotiation packet. Version Negotiation packet.
6. Security and Privacy Considerations 7. Security and Privacy Considerations
It is possible that middleboxes could use traits of a specific It is possible that middleboxes could use traits of a specific
version of QUIC and assume that when other versions of QUIC exhibit version of QUIC and assume that when other versions of QUIC exhibit
similar traits the same underlying semantic is being expressed. similar traits the same underlying semantic is being expressed.
There are potentially many such traits (see Appendix A). Some effort There are potentially many such traits (see Appendix A). Some effort
has been made to either eliminate or obscure some observable traits has been made to either eliminate or obscure some observable traits
in QUIC version 1, but many of these remain. Other QUIC versions in QUIC version 1, but many of these remain. Other QUIC versions
might make different design decisions and so exhibit different might make different design decisions and so exhibit different
traits. traits.
The QUIC version number does not appear in all QUIC packets, which The QUIC version number does not appear in all QUIC packets, which
means that reliably extracting information from a flow based on means that reliably extracting information from a flow based on
version-specific traits requires that middleboxes retain state for version-specific traits requires that middleboxes retain state for
every connection ID they see. every connection ID they see.
The Version Negotiation packet described in this document is not The Version Negotiation packet described in this document is not
integrity-protected; it only has modest protection against insertion integrity-protected; it only has modest protection against insertion
by off-path attackers. QUIC versions MUST define a mechanism that by off-path attackers. QUIC versions MUST define a mechanism that
authenticates the values it contains. authenticates the values it contains.
7. IANA Considerations 8. IANA Considerations
This document makes no request of IANA. This document makes no request of IANA.
8. References 9. References
8.1. Normative References
[QUIC-TRANSPORT] 9.1. Normative References
Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based
Multiplexed and Secure Transport", Work in Progress,
Internet-Draft, draft-ietf-quic-transport-28, 20 May 2020,
<https://tools.ietf.org/html/draft-ietf-quic-transport-
28>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>. May 2017, <https://www.rfc-editor.org/info/rfc8174>.
8.2. Informative References 9.2. Informative References
[QUIC-TLS] Thomson, M., Ed. and S. Turner, Ed., "Using Transport [QUIC-TLS] Thomson, M., Ed. and S. Turner, Ed., "Using Transport
Layer Security (TLS) to Secure QUIC", Work in Progress, Layer Security (TLS) to Secure QUIC", Work in Progress,
Internet-Draft, draft-ietf-quic-tls-28, 20 May 2020, Internet-Draft, draft-ietf-quic-tls-29, 9 June 2020,
<https://tools.ietf.org/html/draft-ietf-quic-tls-28>. <https://tools.ietf.org/html/draft-ietf-quic-tls-29>.
[QUIC-TRANSPORT]
Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based
Multiplexed and Secure Transport", Work in Progress,
Internet-Draft, draft-ietf-quic-transport-29, 9 June 2020,
<https://tools.ietf.org/html/draft-ietf-quic-transport-
29>.
[RFC5116] McGrew, D., "An Interface and Algorithms for Authenticated [RFC5116] McGrew, D., "An Interface and Algorithms for Authenticated
Encryption", RFC 5116, DOI 10.17487/RFC5116, January 2008, Encryption", RFC 5116, DOI 10.17487/RFC5116, January 2008,
<https://www.rfc-editor.org/info/rfc5116>. <https://www.rfc-editor.org/info/rfc5116>.
Appendix A. Incorrect Assumptions Appendix A. Incorrect Assumptions
There are several traits of QUIC version 1 [QUIC-TRANSPORT] that are There are several traits of QUIC version 1 [QUIC-TRANSPORT] that are
not protected from observation, but are nonetheless considered to be not protected from observation, but are nonetheless considered to be
changeable when a new version is deployed. changeable when a new version is deployed.
skipping to change at page 8, line 39 skipping to change at page 9, line 24
wire wire
* QUIC long headers are only exchanged during connection * QUIC long headers are only exchanged during connection
establishment establishment
* Every flow on a given 5-tuple will include a connection * Every flow on a given 5-tuple will include a connection
establishment phase establishment phase
* The first packets exchanged on a flow use the long header * The first packets exchanged on a flow use the long header
* QUIC forbids acknowledgments of packets that only contain ACK * The last packet before a long period of quiescence might be
frames, therefore the last packet before a long period of assumed to contain only an acknowledgment
quiescence might be assumed to contain an acknowledgment
* QUIC uses an AEAD (AEAD_AES_128_GCM [RFC5116]) to protect the * QUIC uses an AEAD (AEAD_AES_128_GCM [RFC5116]) to protect the
packets it exchanges during connection establishment packets it exchanges during connection establishment
* QUIC packet numbers are encrypted and appear as the first * QUIC packet numbers are encrypted and appear as the first
encrypted bytes encrypted bytes
* QUIC packet numbers increase by one for every packet sent * QUIC packet numbers increase by one for every packet sent
* QUIC has a minimum size for the first handshake packet sent by a * QUIC has a minimum size for the first handshake packet sent by a
 End of changes. 35 change blocks. 
66 lines changed or deleted 110 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/