draft-ietf-quic-invariants-07.txt   draft-ietf-quic-invariants-08.txt 
QUIC M. Thomson QUIC M. Thomson
Internet-Draft Mozilla Internet-Draft Mozilla
Intended status: Standards Track September 12, 2019 Intended status: Standards Track 20 May 2020
Expires: March 15, 2020 Expires: 21 November 2020
Version-Independent Properties of QUIC Version-Independent Properties of QUIC
draft-ietf-quic-invariants-07 draft-ietf-quic-invariants-08
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
mailing list (quic@ietf.org), which is archived at mailing list (quic@ietf.org (mailto:quic@ietf.org)), which is
https://mailarchive.ietf.org/arch/search/?email_list=quic [1]. archived at https://mailarchive.ietf.org/arch/
search/?email_list=quic.
Working Group information can be found at https://github.com/quicwg Working Group information can be found at https://github.com/quicwg;
[2]; source code and issues list for this draft can be found at source code and issues list for this draft can be found at
https://github.com/quicwg/base-drafts/labels/-invariants [3]. https://github.com/quicwg/base-drafts/labels/-invariants.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
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 March 15, 2020. This Internet-Draft will expire on 21 November 2020.
Copyright Notice Copyright Notice
Copyright (c) 2019 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 Provisions Relating to IETF Documents (https://trustee.ietf.org/
(https://trustee.ietf.org/license-info) in effect on the date of license-info) in effect on the date of publication of this document.
publication of this document. Please review these documents Please review these documents carefully, as they describe your rights
carefully, as they describe your rights and restrictions with respect and restrictions with respect to this document. Code Components
to this document. Code Components extracted from this document must extracted from this document must include Simplified BSD License text
include Simplified BSD License text as described in Section 4.e of as described in Section 4.e of the Trust Legal Provisions and are
the Trust Legal Provisions and are provided without warranty as provided without warranty as described in the Simplified BSD License.
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. QUIC Packet Headers . . . . . . . . . . . . . . . . . . . . . 3
4.1. Long Header . . . . . . . . . . . . . . . . . . . . . . . 3 4.1. Long Header . . . . . . . . . . . . . . . . . . . . . . . 3
4.2. Short Header . . . . . . . . . . . . . . . . . . . . . . 4 4.2. Short Header . . . . . . . . . . . . . . . . . . . . . . 4
4.3. Connection ID . . . . . . . . . . . . . . . . . . . . . . 5 4.3. Connection ID . . . . . . . . . . . . . . . . . . . . . . 5
4.4. Version . . . . . . . . . . . . . . . . . . . . . . . . . 5 4.4. Version . . . . . . . . . . . . . . . . . . . . . . . . . 5
5. Version Negotiation . . . . . . . . . . . . . . . . . . . . . 6 5. Version Negotiation . . . . . . . . . . . . . . . . . . . . . 5
6. Security and Privacy Considerations . . . . . . . . . . . . . 7 6. Security and Privacy Considerations . . . . . . . . . . . . . 7
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 7
8.1. Normative References . . . . . . . . . . . . . . . . . . 8 8.1. Normative References . . . . . . . . . . . . . . . . . . 7
8.2. Informative References . . . . . . . . . . . . . . . . . 8 8.2. Informative References . . . . . . . . . . . . . . . . . 7
8.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Appendix A. Incorrect Assumptions . . . . . . . . . . . . . . . 8 Appendix A. Incorrect Assumptions . . . . . . . . . . . . . . . 8
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 9 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 9
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.
skipping to change at page 3, line 13 skipping to change at page 3, line 13
between different versions. between different versions.
Appendix A is a non-exhaustive list of some incorrect assumptions Appendix A is a non-exhaustive list of some incorrect assumptions
that might be made based on knowledge of QUIC version 1; these do not that might be made based on knowledge of QUIC version 1; these do not
apply to every version of QUIC. apply to every version of QUIC.
2. Conventions and Definitions 2. Conventions and Definitions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP "OPTIONAL" in this document are to be interpreted as described in
14 [RFC2119] [RFC8174] when, and only when, they appear in all BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here. capitals, as shown here.
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
skipping to change at page 3, line 42 skipping to change at page 3, line 42
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 4.1. Long Header
Long headers take the form described in Figure 1. Bits that have Long headers take the form described in Figure 1.
version-specific semantics are marked with an X.
0 1 2 3 Long Header Packet {
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 Header Form (1) = 1,
+-+-+-+-+-+-+-+-+ Version-Specific Bits (7),
|1|X X X X X X X| Version (32),
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ DCID Len (8),
| Version (32) | Destination Connection ID (0..2040),
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ SCID Len (8),
| DCID Len (8) | Source Connection ID (0..2040),
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Version-Specific Data (..),
| Destination Connection ID (0..2040) ... }
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SCID Len (8) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Connection ID (0..2040) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 1: QUIC Long Header Figure 1: 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 (see Section 4.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 (see Section 4.3) field that follows it. This length
is encoded as an 8-bit unsigned integer. The Destination Connection is encoded as an 8-bit unsigned integer. The Destination Connection
ID field follows the DCID Len field and is between 0 and 255 bytes in ID field follows the DCID Len field and is between 0 and 255 bytes in
skipping to change at page 4, line 45 skipping to change at page 4, line 38
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 SCID Len field
and is between 0 and 255 bytes in length. 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 4.2. Short Header
Short headers take the form described in Figure 2. Bits that have Short headers take the form described in Figure 2.
version-specific semantics are marked with an X.
0 1 2 3 Short Header Packet {
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 Header Form (1) = 0,
+-+-+-+-+-+-+-+-+ Version-Specific Bits (7),
|0|X X X X X X X| Destination Connection ID (..),
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Version-Specific Data (..),
| Destination Connection ID (*) ... }
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 2: QUIC Short Header Figure 2: 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 specified
skipping to change at page 6, line 20 skipping to change at page 6, line 5
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 4.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.
0 1 2 3 Version Negotiation Packet {
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 Header Form (1) = 1,
+-+-+-+-+-+-+-+-+ Unused (7),
|1|X X X X X X X| Version (32) = 0,
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ DCID Len (8),
| Version (32) = 0 | Destination Connection ID (0..2040),
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ SCID Len (8),
| DCID Len (8) | Source Connection ID (0..2040),
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Supported Version (32) ...,
| Destination Connection ID (0..2040) ... }
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SCID Len (8) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Connection ID (0..2040) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Supported Version 1 (32) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| [Supported Version 2 (32)] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| [Supported Version N (32)] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 3: 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 8, line 11 skipping to change at page 7, line 36
7. IANA Considerations 7. IANA Considerations
This document makes no request of IANA. This document makes no request of IANA.
8. References 8. References
8.1. Normative References 8.1. Normative References
[QUIC-TRANSPORT] [QUIC-TRANSPORT]
Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based
Multiplexed and Secure Transport", draft-ietf-quic- Multiplexed and Secure Transport", Work in Progress,
transport-23 (work in progress), September 2019. 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 8.2. Informative References
[QUIC-TLS] [QUIC-TLS] Thomson, M., Ed. and S. Turner, Ed., "Using Transport
Thomson, M., Ed. and S. Turner, Ed., "Using Transport Layer Security (TLS) to Secure QUIC", Work in Progress,
Layer Security (TLS) to Secure QUIC", draft-ietf-quic- Internet-Draft, draft-ietf-quic-tls-28, 20 May 2020,
tls-23 (work in progress), September 2019. <https://tools.ietf.org/html/draft-ietf-quic-tls-28>.
[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>.
8.3. URIs
[1] https://mailarchive.ietf.org/arch/search/?email_list=quic
[2] https://github.com/quicwg
[3] https://github.com/quicwg/base-drafts/labels/-invariants
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.
This section lists a sampling of incorrect assumptions that might be This section lists a sampling of incorrect assumptions that might be
made based on knowledge of QUIC version 1. Some of these statements made based on knowledge of QUIC version 1. Some of these statements
are not even true for QUIC version 1. This is not an exhaustive are not even true for QUIC version 1. This is not an exhaustive
list, it is intended to be illustrative only. list, it is intended to be illustrative only.
The following statements are NOT guaranteed to be true for every QUIC The following statements are NOT guaranteed to be true for every QUIC
version: version:
o QUIC uses TLS [QUIC-TLS] and some TLS messages are visible on the * QUIC uses TLS [QUIC-TLS] and some TLS messages are visible on the
wire wire
o QUIC long headers are only exchanged during connection * QUIC long headers are only exchanged during connection
establishment establishment
o 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
o The first packets exchanged on a flow use the long header * The first packets exchanged on a flow use the long header
o QUIC forbids acknowledgments of packets that only contain ACK * QUIC forbids acknowledgments of packets that only contain ACK
frames, therefore the last packet before a long period of frames, therefore the last packet before a long period of
quiescence might be assumed to contain an acknowledgment quiescence might be assumed to contain an acknowledgment
o 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
o QUIC packet numbers appear after the Version field * QUIC packet numbers are encrypted and appear as the first
encrypted bytes
o QUIC packet numbers increase by one for every packet sent * QUIC packet numbers increase by one for every packet sent
o 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
client client
o QUIC stipulates that a client speaks first * QUIC stipulates that a client speaks first
o A QUIC Version Negotiation packet is only sent by a server * QUIC packets always have the second bit of the first byte (0x40)
set
o A QUIC connection ID changes infrequently * A QUIC Version Negotiation packet is only sent by a server
o QUIC endpoints change the version they speak if they are sent a * A QUIC connection ID changes infrequently
* QUIC endpoints change the version they speak if they are sent a
Version Negotiation packet Version Negotiation packet
o The version field in a QUIC long header is the same in both * The version field in a QUIC long header is the same in both
directions directions
o Only one connection at a time is established between any pair of * Only one connection at a time is established between any pair of
QUIC endpoints QUIC endpoints
Author's Address Author's Address
Martin Thomson Martin Thomson
Mozilla Mozilla
Email: mt@lowentropy.net Email: mt@lowentropy.net
 End of changes. 36 change blocks. 
109 lines changed or deleted 82 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/