QUIC                                                     J. Iyengar, Ed.
Internet-Draft                                                    Fastly
Intended status: Standards Track                         M. Thomson, Ed.
Expires: October 19, 2018                                        Mozilla
                                                          April 17, 2018


           QUIC: A UDP-Based Multiplexed and Secure Transport
                      draft-ietf-quic-transport-11

Abstract

   This document defines the core of the QUIC transport protocol.  This
   document describes connection establishment, packet format,
   multiplexing and reliability.  Accompanying documents describe the
   cryptographic handshake and loss detection.

Note to Readers

   Discussion of this draft takes place on the QUIC working group
   mailing list (quic@ietf.org), which is archived at
   https://mailarchive.ietf.org/arch/search/?email_list=quic [1].

   Working Group information can be found at https://github.com/quicwg
   [2]; source code and issues list for this draft can be found at
   https://github.com/quicwg/base-drafts/labels/-transport [3].

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on October 19, 2018.








Iyengar & Thomson       Expires October 19, 2018                [Page 1]


Internet-Draft           QUIC Transport Protocol              April 2018


Copyright Notice

   Copyright (c) 2018 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (https://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   5
   2.  Conventions and Definitions . . . . . . . . . . . . . . . . .   6
     2.1.  Notational Conventions  . . . . . . . . . . . . . . . . .   6
   3.  Versions  . . . . . . . . . . . . . . . . . . . . . . . . . .   7
   4.  Packet Types and Formats  . . . . . . . . . . . . . . . . . .   8
     4.1.  Long Header . . . . . . . . . . . . . . . . . . . . . . .   8
     4.2.  Short Header  . . . . . . . . . . . . . . . . . . . . . .  10
     4.3.  Version Negotiation Packet  . . . . . . . . . . . . . . .  12
     4.4.  Cryptographic Handshake Packets . . . . . . . . . . . . .  14
       4.4.1.  Initial Packet  . . . . . . . . . . . . . . . . . . .  14
       4.4.2.  Retry Packet  . . . . . . . . . . . . . . . . . . . .  15
       4.4.3.  Handshake Packet  . . . . . . . . . . . . . . . . . .  16
     4.5.  Protected Packets . . . . . . . . . . . . . . . . . . . .  17
     4.6.  Coaslescing Packets . . . . . . . . . . . . . . . . . . .  17
     4.7.  Connection ID . . . . . . . . . . . . . . . . . . . . . .  18
     4.8.  Packet Numbers  . . . . . . . . . . . . . . . . . . . . .  19
       4.8.1.  Initial Packet Number . . . . . . . . . . . . . . . .  20
   5.  Frames and Frame Types  . . . . . . . . . . . . . . . . . . .  20
   6.  Life of a Connection  . . . . . . . . . . . . . . . . . . . .  22
     6.1.  Matching Packets to Connections . . . . . . . . . . . . .  23
       6.1.1.  Client Packet Handling  . . . . . . . . . . . . . . .  23
       6.1.2.  Server Packet Handling  . . . . . . . . . . . . . . .  23
     6.2.  Version Negotiation . . . . . . . . . . . . . . . . . . .  24
       6.2.1.  Sending Version Negotiation Packets . . . . . . . . .  25
       6.2.2.  Handling Version Negotiation Packets  . . . . . . . .  25
       6.2.3.  Using Reserved Versions . . . . . . . . . . . . . . .  26
     6.3.  Cryptographic and Transport Handshake . . . . . . . . . .  26
     6.4.  Transport Parameters  . . . . . . . . . . . . . . . . . .  27
       6.4.1.  Transport Parameter Definitions . . . . . . . . . . .  29
       6.4.2.  Values of Transport Parameters for 0-RTT  . . . . . .  30
       6.4.3.  New Transport Parameters  . . . . . . . . . . . . . .  31



Iyengar & Thomson       Expires October 19, 2018                [Page 2]


Internet-Draft           QUIC Transport Protocol              April 2018


       6.4.4.  Version Negotiation Validation  . . . . . . . . . . .  31
     6.5.  Stateless Retries . . . . . . . . . . . . . . . . . . . .  33
     6.6.  Proof of Source Address Ownership . . . . . . . . . . . .  33
       6.6.1.  Client Address Validation Procedure . . . . . . . . .  34
       6.6.2.  Address Validation on Session Resumption  . . . . . .  35
       6.6.3.  Address Validation Token Integrity  . . . . . . . . .  35
     6.7.  Path Validation . . . . . . . . . . . . . . . . . . . . .  36
       6.7.1.  Initiation  . . . . . . . . . . . . . . . . . . . . .  36
       6.7.2.  Response  . . . . . . . . . . . . . . . . . . . . . .  37
       6.7.3.  Completion  . . . . . . . . . . . . . . . . . . . . .  37
       6.7.4.  Abandonment . . . . . . . . . . . . . . . . . . . . .  38
     6.8.  Connection Migration  . . . . . . . . . . . . . . . . . .  38
       6.8.1.  Probing a New Path  . . . . . . . . . . . . . . . . .  38
       6.8.2.  Initiating Connection Migration . . . . . . . . . . .  39
       6.8.3.  Responding to Connection Migration  . . . . . . . . .  39
       6.8.4.  Loss Detection and Congestion Control . . . . . . . .  41
       6.8.5.  Privacy Implications of Connection Migration  . . . .  42
     6.9.  Connection Termination  . . . . . . . . . . . . . . . . .  43
       6.9.1.  Closing and Draining Connection States  . . . . . . .  44
       6.9.2.  Idle Timeout  . . . . . . . . . . . . . . . . . . . .  45
       6.9.3.  Immediate Close . . . . . . . . . . . . . . . . . . .  45
       6.9.4.  Stateless Reset . . . . . . . . . . . . . . . . . . .  46
   7.  Frame Types and Formats . . . . . . . . . . . . . . . . . . .  49
     7.1.  Variable-Length Integer Encoding  . . . . . . . . . . . .  49
     7.2.  PADDING Frame . . . . . . . . . . . . . . . . . . . . . .  50
     7.3.  RST_STREAM Frame  . . . . . . . . . . . . . . . . . . . .  50
     7.4.  CONNECTION_CLOSE frame  . . . . . . . . . . . . . . . . .  51
     7.5.  APPLICATION_CLOSE frame . . . . . . . . . . . . . . . . .  52
     7.6.  MAX_DATA Frame  . . . . . . . . . . . . . . . . . . . . .  52
     7.7.  MAX_STREAM_DATA Frame . . . . . . . . . . . . . . . . . .  53
     7.8.  MAX_STREAM_ID Frame . . . . . . . . . . . . . . . . . . .  54
     7.9.  PING Frame  . . . . . . . . . . . . . . . . . . . . . . .  54
     7.10. BLOCKED Frame . . . . . . . . . . . . . . . . . . . . . .  55
     7.11. STREAM_BLOCKED Frame  . . . . . . . . . . . . . . . . . .  55
     7.12. STREAM_ID_BLOCKED Frame . . . . . . . . . . . . . . . . .  56
     7.13. NEW_CONNECTION_ID Frame . . . . . . . . . . . . . . . . .  56
     7.14. STOP_SENDING Frame  . . . . . . . . . . . . . . . . . . .  58
     7.15. ACK Frame . . . . . . . . . . . . . . . . . . . . . . . .  58
       7.15.1.  ACK Block Section  . . . . . . . . . . . . . . . . .  60
       7.15.2.  Sending ACK Frames . . . . . . . . . . . . . . . . .  61
       7.15.3.  ACK Frames and Packet Protection . . . . . . . . . .  62
     7.16. PATH_CHALLENGE Frame  . . . . . . . . . . . . . . . . . .  63
     7.17. PATH_RESPONSE Frame . . . . . . . . . . . . . . . . . . .  63
     7.18. STREAM Frames . . . . . . . . . . . . . . . . . . . . . .  64
   8.  Packetization and Reliability . . . . . . . . . . . . . . . .  65
     8.1.  Packet Processing and Acknowledgment  . . . . . . . . . .  66
     8.2.  Retransmission of Information . . . . . . . . . . . . . .  66
     8.3.  Packet Size . . . . . . . . . . . . . . . . . . . . . . .  68



Iyengar & Thomson       Expires October 19, 2018                [Page 3]


Internet-Draft           QUIC Transport Protocol              April 2018


     8.4.  Path Maximum Transmission Unit  . . . . . . . . . . . . .  68
       8.4.1.  Special Considerations for PMTU Discovery . . . . . .  69
       8.4.2.  Special Considerations for Packetization Layer PMTU
               Discovery . . . . . . . . . . . . . . . . . . . . . .  70
   9.  Streams: QUIC's Data Structuring Abstraction  . . . . . . . .  70
     9.1.  Stream Identifiers  . . . . . . . . . . . . . . . . . . .  71
     9.2.  Stream States . . . . . . . . . . . . . . . . . . . . . .  72
       9.2.1.  Send Stream States  . . . . . . . . . . . . . . . . .  73
       9.2.2.  Receive Stream States . . . . . . . . . . . . . . . .  75
       9.2.3.  Permitted Frame Types . . . . . . . . . . . . . . . .  77
       9.2.4.  Bidirectional Stream States . . . . . . . . . . . . .  77
     9.3.  Solicited State Transitions . . . . . . . . . . . . . . .  78
     9.4.  Stream Concurrency  . . . . . . . . . . . . . . . . . . .  79
     9.5.  Sending and Receiving Data  . . . . . . . . . . . . . . .  80
     9.6.  Stream Prioritization . . . . . . . . . . . . . . . . . .  80
   10. Flow Control  . . . . . . . . . . . . . . . . . . . . . . . .  81
     10.1.  Edge Cases and Other Considerations  . . . . . . . . . .  83
       10.1.1.  Response to a RST_STREAM . . . . . . . . . . . . . .  83
       10.1.2.  Data Limit Increments  . . . . . . . . . . . . . . .  83
       10.1.3.  Handshake Exemption  . . . . . . . . . . . . . . . .  84
     10.2.  Stream Limit Increment . . . . . . . . . . . . . . . . .  84
       10.2.1.  Blocking on Flow Control . . . . . . . . . . . . . .  84
     10.3.  Stream Final Offset  . . . . . . . . . . . . . . . . . .  85
   11. Error Handling  . . . . . . . . . . . . . . . . . . . . . . .  85
     11.1.  Connection Errors  . . . . . . . . . . . . . . . . . . .  86
     11.2.  Stream Errors  . . . . . . . . . . . . . . . . . . . . .  87
     11.3.  Transport Error Codes  . . . . . . . . . . . . . . . . .  87
     11.4.  Application Protocol Error Codes . . . . . . . . . . . .  88
   12. Security and Privacy Considerations . . . . . . . . . . . . .  89
     12.1.  Spoofed ACK Attack . . . . . . . . . . . . . . . . . . .  89
     12.2.  Optimistic ACK Attack  . . . . . . . . . . . . . . . . .  89
     12.3.  Slowloris Attacks  . . . . . . . . . . . . . . . . . . .  90
     12.4.  Stream Fragmentation and Reassembly Attacks  . . . . . .  90
     12.5.  Stream Commitment Attack . . . . . . . . . . . . . . . .  90
   13. IANA Considerations . . . . . . . . . . . . . . . . . . . . .  91
     13.1.  QUIC Transport Parameter Registry  . . . . . . . . . . .  91
     13.2.  QUIC Transport Error Codes Registry  . . . . . . . . . .  92
   14. References  . . . . . . . . . . . . . . . . . . . . . . . . .  94
     14.1.  Normative References . . . . . . . . . . . . . . . . . .  94
     14.2.  Informative References . . . . . . . . . . . . . . . . .  95
     14.3.  URIs . . . . . . . . . . . . . . . . . . . . . . . . . .  96
   Appendix A.  Contributors . . . . . . . . . . . . . . . . . . . .  96
   Appendix B.  Acknowledgments  . . . . . . . . . . . . . . . . . .  97
   Appendix C.  Change Log . . . . . . . . . . . . . . . . . . . . .  97
     C.1.  Since draft-ietf-quic-transport-10  . . . . . . . . . . .  97
     C.2.  Since draft-ietf-quic-transport-09  . . . . . . . . . . .  98
     C.3.  Since draft-ietf-quic-transport-08  . . . . . . . . . . .  98
     C.4.  Since draft-ietf-quic-transport-07  . . . . . . . . . . .  99



Iyengar & Thomson       Expires October 19, 2018                [Page 4]


Internet-Draft           QUIC Transport Protocol              April 2018


     C.5.  Since