draft-ietf-quic-invariants-01.txt   draft-ietf-quic-invariants-02.txt 
QUIC M. Thomson QUIC M. Thomson
Internet-Draft Mozilla Internet-Draft Mozilla
Intended status: Standards Track March 20, 2018 Intended status: Standards Track September 11, 2018
Expires: September 21, 2018 Expires: March 15, 2019
Version-Independent Properties of QUIC Version-Independent Properties of QUIC
draft-ietf-quic-invariants-01 draft-ietf-quic-invariants-02
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 42 skipping to change at page 1, line 42
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 September 21, 2018. This Internet-Draft will expire on March 15, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 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/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 47 skipping to change at page 2, line 47
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
stable as new versions are developed and deployed. All of these stable as new versions are developed and deployed. All of these
invariants are IP-version-independent. invariants are IP-version-independent.
The primary goal of this document is to ensure that it is possible The primary goal of this document is to ensure that it is possible to
deploy new versions of QUIC. By documenting the things that can't deploy new versions of QUIC. By documenting the properties that
change, this document aims to preserve the ability to change any can't change, this document aims to preserve the ability to change
other aspect of the protocol. Thus, unless specifically described in any other aspect of the protocol. Thus, unless specifically
this document, any aspect of the protocol can change between described in this document, any aspect of the protocol can change
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 BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all 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
[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. QUIC Packet Headers
A QUIC packet is the content of the UDP datagrams exchanged by QUIC A QUIC packet is the content of the UDP datagrams exchanged by QUIC
skipping to change at page 4, line 33 skipping to change at page 4, line 33
A QUIC packet with a long header has the high bit of the first octet A QUIC packet with a long header has the high bit of the first octet
set to 1. All other bits in that octet are version specific. set to 1. All other bits in that octet are version specific.
The next four octets include a 32-bit Version field (see The next four octets include a 32-bit Version field (see
Section 4.4). Section 4.4).
The next octet contains the length in octets of the two Connection The next octet contains the length in octets of the two Connection
IDs (see Section 4.3) that follow. Each length is encoded as a 4-bit IDs (see Section 4.3) that follow. Each length is encoded as a 4-bit
unsigned integer. The length of the Destination Connection ID (DCIL) unsigned integer. The length of the Destination Connection ID (DCIL)
occupies the high bits of the octet and the length of the Source occupies the high bits of the octet and the length of the Source
Connection ID (SCIL) occupying the low bits of the octet. An encoded Connection ID (SCIL) occupies the low bits of the octet. An encoded
length of 0 indicates that the connection ID is also 0 octets in length of 0 indicates that the connection ID is also 0 octets in
length. Non-zero encoded lengths are increased by 3 to get the full length. Non-zero encoded lengths are increased by 3 to get the full
length of the connection ID; the final value is therefore either 0 or length of the connection ID; the final value is therefore either 0 or
between 4 and 18 octets in length (inclusive). For example, an octet between 4 and 18 octets in length (inclusive). For example, an octet
with the value 0xe0 describes a 17 octet Destination Connection ID with the value 0xe0 describes a 17 octet Destination Connection ID
and a zero octet Source Connection ID. and a zero octet Source Connection ID.
The connection ID lengths are followed by a two connection IDs. The The connection ID lengths are followed by two connection IDs. The
connection ID associated with the recipient of the packet (the connection ID associated with the recipient of the packet (the
Destination Connection ID) is followed by the connection ID Destination Connection ID) is followed by the connection ID
associated with the sender of the packet (the Source Connection ID). associated with the sender of the packet (the Source Connection ID).
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. Bits that have
version-specific semantics are marked with an X. version-specific semantics are marked with an X.
skipping to change at page 6, line 5 skipping to change at page 5, line 49
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 4.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 5). All other version numbers are potentially valid.
The properties described in this document apply to all versions of
QUIC. A protocol that does not conform to the properties described
in this document is not QUIC. Future documents might describe
additional properties which apply to a specific QUIC version, or to a
range of QUIC versions.
5. Version Negotiation 5. 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 and are always associated header do not trigger version negotiation.
with an existing connection.
Consequently, until an endpoint has confirmed that its peer supports
the QUIC version it has chosen, it can only send packets that use the
long header.
A Version Negotiation packet sets the high bit of the first octet, A Version Negotiation packet sets the high bit of the first octet,
and thus it conforms with the format of a packet with a long header and thus it conforms with the format of a packet with a long header
as defined in Section 4.1. A Version Negotiation packet is as defined in Section 4.1. A Version Negotiation packet is
identifiable as such by the Version field, which is set to identifiable as such by the Version field, which is set to
0x00000000. 0x00000000.
0 1 2 3 0 1 2 3
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 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
+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
skipping to change at page 7, line 9 skipping to change at page 7, line 9
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
part of its connection establishment process. part of its connection establishment process.
The server MUST include the value from the Source Connection ID field An endpoint MUST include the value from the Source Connection ID
of the packet it receives in the Destination Connection ID field. field of the packet it receives in the Destination Connection ID
The value for Source Connection ID MUST be copied from the field. The value for Source Connection ID MUST be copied from the
Destination Connection ID of the received packet, which is initially Destination Connection ID of the received packet, which is initially
randomly selected by a client. Echoing both connection IDs gives randomly selected by a client. Echoing both connection IDs gives
clients some assurance that the server received the packet and that clients some assurance that the server received the packet and that
the Version Negotiation packet was not generated by an off-path the Version Negotiation packet was not generated by an off-path
attacker. attacker.
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.
skipping to change at page 7, line 44 skipping to change at page 7, line 44
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 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", draft-ietf-quic-
transport-10 (work in progress), March 2018. transport-14 (work in progress), September 2018.
[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", draft-ietf-quic- Layer Security (TLS) to Secure QUIC", draft-ietf-quic-
tls-10 (work in progress), March 2018. tls-14 (work in progress), September 2018.
[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 8.3. URIs
[1] https://mailarchive.ietf.org/arch/search/?email_list=quic [1] https://mailarchive.ietf.org/arch/search/?email_list=quic
[2] https://github.com/quicwg [2] https://github.com/quicwg
skipping to change at page 9, line 17 skipping to change at page 9, line 17
o QUIC uses TLS [QUIC-TLS] and some TLS messages are visible on the o QUIC uses TLS [QUIC-TLS] and some TLS messages are visible on the
wire wire
o QUIC long headers are only exchanged during connection o QUIC long headers are only exchanged during connection
establishment establishment
o Every flow on a given 5-tuple will include a connection o 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
o QUIC forbids acknowledgments of packets that only contain ACK o 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 o 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 o QUIC packet numbers appear after the Version field
o QUIC packet numbers increase by one for every packet sent o QUIC packet numbers increase by one for every packet sent
 End of changes. 14 change blocks. 
24 lines changed or deleted 30 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/