| draft-ietf-quic-transport-11.txt | draft-ietf-quic-transport-12.txt | |||
|---|---|---|---|---|
| QUIC J. Iyengar, Ed. | QUIC J. Iyengar, Ed. | |||
| Internet-Draft Fastly | Internet-Draft Fastly | |||
| Intended status: Standards Track M. Thomson, Ed. | Intended status: Standards Track M. Thomson, Ed. | |||
| Expires: October 19, 2018 Mozilla | Expires: November 23, 2018 Mozilla | |||
| April 17, 2018 | May 22, 2018 | |||
| QUIC: A UDP-Based Multiplexed and Secure Transport | QUIC: A UDP-Based Multiplexed and Secure Transport | |||
| draft-ietf-quic-transport-11 | draft-ietf-quic-transport-12 | |||
| Abstract | Abstract | |||
| This document defines the core of the QUIC transport protocol. This | This document defines the core of the QUIC transport protocol. This | |||
| document describes connection establishment, packet format, | document describes connection establishment, packet format, | |||
| multiplexing and reliability. Accompanying documents describe the | multiplexing and reliability. Accompanying documents describe the | |||
| cryptographic handshake and loss detection. | cryptographic handshake and loss detection. | |||
| 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), which is archived at | |||
| https://mailarchive.ietf.org/arch/search/?email_list=quic [1]. | <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/ | |||
| [2]; source code and issues list for this draft can be found at | quicwg>; source code and issues list for this draft can be found at | |||
| https://github.com/quicwg/base-drafts/labels/-transport [3]. | <https://github.com/quicwg/base-drafts/labels/-transport>. | |||
| 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 October 19, 2018. | This Internet-Draft will expire on November 23, 2018. | |||
| 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 30 ¶ | skipping to change at page 2, line 30 ¶ | |||
| Table of Contents | Table of Contents | |||
| 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 5 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 5 | |||
| 2. Conventions and Definitions . . . . . . . . . . . . . . . . . 6 | 2. Conventions and Definitions . . . . . . . . . . . . . . . . . 6 | |||
| 2.1. Notational Conventions . . . . . . . . . . . . . . . . . 6 | 2.1. Notational Conventions . . . . . . . . . . . . . . . . . 6 | |||
| 3. Versions . . . . . . . . . . . . . . . . . . . . . . . . . . 7 | 3. Versions . . . . . . . . . . . . . . . . . . . . . . . . . . 7 | |||
| 4. Packet Types and Formats . . . . . . . . . . . . . . . . . . 8 | 4. Packet Types and Formats . . . . . . . . . . . . . . . . . . 8 | |||
| 4.1. Long Header . . . . . . . . . . . . . . . . . . . . . . . 8 | 4.1. Long Header . . . . . . . . . . . . . . . . . . . . . . . 8 | |||
| 4.2. Short Header . . . . . . . . . . . . . . . . . . . . . . 10 | 4.2. Short Header . . . . . . . . . . . . . . . . . . . . . . 10 | |||
| 4.3. Version Negotiation Packet . . . . . . . . . . . . . . . 12 | 4.3. Version Negotiation Packet . . . . . . . . . . . . . . . 12 | |||
| 4.4. Cryptographic Handshake Packets . . . . . . . . . . . . . 14 | 4.4. Cryptographic Handshake Packets . . . . . . . . . . . . . 13 | |||
| 4.4.1. Initial Packet . . . . . . . . . . . . . . . . . . . 14 | 4.4.1. Initial Packet . . . . . . . . . . . . . . . . . . . 13 | |||
| 4.4.2. Retry Packet . . . . . . . . . . . . . . . . . . . . 15 | 4.4.2. Retry Packet . . . . . . . . . . . . . . . . . . . . 14 | |||
| 4.4.3. Handshake Packet . . . . . . . . . . . . . . . . . . 16 | 4.4.3. Handshake Packet . . . . . . . . . . . . . . . . . . 15 | |||
| 4.5. Protected Packets . . . . . . . . . . . . . . . . . . . . 17 | 4.5. Protected Packets . . . . . . . . . . . . . . . . . . . . 16 | |||
| 4.6. Coaslescing Packets . . . . . . . . . . . . . . . . . . . 17 | 4.6. Coalescing Packets . . . . . . . . . . . . . . . . . . . 17 | |||
| 4.7. Connection ID . . . . . . . . . . . . . . . . . . . . . . 18 | 4.7. Connection ID . . . . . . . . . . . . . . . . . . . . . . 17 | |||
| 4.8. Packet Numbers . . . . . . . . . . . . . . . . . . . . . 19 | 4.8. Packet Numbers . . . . . . . . . . . . . . . . . . . . . 18 | |||
| 4.8.1. Initial Packet Number . . . . . . . . . . . . . . . . 20 | ||||
| 5. Frames and Frame Types . . . . . . . . . . . . . . . . . . . 20 | 5. Frames and Frame Types . . . . . . . . . . . . . . . . . . . 20 | |||
| 6. Life of a Connection . . . . . . . . . . . . . . . . . . . . 22 | 6. Life of a Connection . . . . . . . . . . . . . . . . . . . . 22 | |||
| 6.1. Matching Packets to Connections . . . . . . . . . . . . . 23 | 6.1. Matching Packets to Connections . . . . . . . . . . . . . 23 | |||
| 6.1.1. Client Packet Handling . . . . . . . . . . . . . . . 23 | 6.1.1. Client Packet Handling . . . . . . . . . . . . . . . 23 | |||
| 6.1.2. Server Packet Handling . . . . . . . . . . . . . . . 23 | 6.1.2. Server Packet Handling . . . . . . . . . . . . . . . 23 | |||
| 6.2. Version Negotiation . . . . . . . . . . . . . . . . . . . 24 | 6.2. Version Negotiation . . . . . . . . . . . . . . . . . . . 24 | |||
| 6.2.1. Sending Version Negotiation Packets . . . . . . . . . 25 | 6.2.1. Sending Version Negotiation Packets . . . . . . . . . 25 | |||
| 6.2.2. Handling Version Negotiation Packets . . . . . . . . 25 | 6.2.2. Handling Version Negotiation Packets . . . . . . . . 25 | |||
| 6.2.3. Using Reserved Versions . . . . . . . . . . . . . . . 26 | 6.2.3. Using Reserved Versions . . . . . . . . . . . . . . . 26 | |||
| 6.3. Cryptographic and Transport Handshake . . . . . . . . . . 26 | 6.3. Cryptographic and Transport Handshake . . . . . . . . . . 26 | |||
| 6.4. Transport Parameters . . . . . . . . . . . . . . . . . . 27 | 6.4. Transport Parameters . . . . . . . . . . . . . . . . . . 27 | |||
| 6.4.1. Transport Parameter Definitions . . . . . . . . . . . 29 | 6.4.1. Transport Parameter Definitions . . . . . . . . . . . 29 | |||
| 6.4.2. Values of Transport Parameters for 0-RTT . . . . . . 30 | 6.4.2. Values of Transport Parameters for 0-RTT . . . . . . 31 | |||
| 6.4.3. New Transport Parameters . . . . . . . . . . . . . . 31 | 6.4.3. New Transport Parameters . . . . . . . . . . . . . . 31 | |||
| 6.4.4. Version Negotiation Validation . . . . . . . . . . . 31 | 6.4.4. Version Negotiation Validation . . . . . . . . . . . 32 | |||
| 6.5. Stateless Retries . . . . . . . . . . . . . . . . . . . . 33 | 6.5. Stateless Retries . . . . . . . . . . . . . . . . . . . . 33 | |||
| 6.6. Proof of Source Address Ownership . . . . . . . . . . . . 33 | 6.6. Proof of Source Address Ownership . . . . . . . . . . . . 34 | |||
| 6.6.1. Client Address Validation Procedure . . . . . . . . . 34 | 6.6.1. Client Address Validation Procedure . . . . . . . . . 34 | |||
| 6.6.2. Address Validation on Session Resumption . . . . . . 35 | 6.6.2. Address Validation on Session Resumption . . . . . . 35 | |||
| 6.6.3. Address Validation Token Integrity . . . . . . . . . 35 | 6.6.3. Address Validation Token Integrity . . . . . . . . . 36 | |||
| 6.7. Path Validation . . . . . . . . . . . . . . . . . . . . . 36 | 6.7. Path Validation . . . . . . . . . . . . . . . . . . . . . 36 | |||
| 6.7.1. Initiation . . . . . . . . . . . . . . . . . . . . . 36 | 6.7.1. Initiation . . . . . . . . . . . . . . . . . . . . . 37 | |||
| 6.7.2. Response . . . . . . . . . . . . . . . . . . . . . . 37 | 6.7.2. Response . . . . . . . . . . . . . . . . . . . . . . 37 | |||
| 6.7.3. Completion . . . . . . . . . . . . . . . . . . . . . 37 | 6.7.3. Completion . . . . . . . . . . . . . . . . . . . . . 38 | |||
| 6.7.4. Abandonment . . . . . . . . . . . . . . . . . . . . . 38 | 6.7.4. Abandonment . . . . . . . . . . . . . . . . . . . . . 38 | |||
| 6.8. Connection Migration . . . . . . . . . . . . . . . . . . 38 | 6.8. Connection Migration . . . . . . . . . . . . . . . . . . 39 | |||
| 6.8.1. Probing a New Path . . . . . . . . . . . . . . . . . 38 | 6.8.1. Probing a New Path . . . . . . . . . . . . . . . . . 39 | |||
| 6.8.2. Initiating Connection Migration . . . . . . . . . . . 39 | 6.8.2. Initiating Connection Migration . . . . . . . . . . . 39 | |||
| 6.8.3. Responding to Connection Migration . . . . . . . . . 39 | 6.8.3. Responding to Connection Migration . . . . . . . . . 40 | |||
| 6.8.4. Loss Detection and Congestion Control . . . . . . . . 41 | 6.8.4. Loss Detection and Congestion Control . . . . . . . . 42 | |||
| 6.8.5. Privacy Implications of Connection Migration . . . . 42 | 6.8.5. Privacy Implications of Connection Migration . . . . 42 | |||
| 6.9. Connection Termination . . . . . . . . . . . . . . . . . 43 | 6.9. Server's Preferred Address . . . . . . . . . . . . . . . 44 | |||
| 6.9.1. Closing and Draining Connection States . . . . . . . 44 | 6.9.1. Communicating A Preferred Address . . . . . . . . . . 44 | |||
| 6.9.2. Idle Timeout . . . . . . . . . . . . . . . . . . . . 45 | 6.9.2. Responding to Connection Migration . . . . . . . . . 44 | |||
| 6.9.3. Immediate Close . . . . . . . . . . . . . . . . . . . 45 | 6.9.3. Interaction of Client Migration and Preferred Address 45 | |||
| 6.9.4. Stateless Reset . . . . . . . . . . . . . . . . . . . 46 | 6.10. Connection Termination . . . . . . . . . . . . . . . . . 45 | |||
| 7. Frame Types and Formats . . . . . . . . . . . . . . . . . . . 49 | 6.10.1. Closing and Draining Connection States . . . . . . . 45 | |||
| 7.1. Variable-Length Integer Encoding . . . . . . . . . . . . 49 | 6.10.2. Idle Timeout . . . . . . . . . . . . . . . . . . . . 47 | |||
| 7.2. PADDING Frame . . . . . . . . . . . . . . . . . . . . . . 50 | 6.10.3. Immediate Close . . . . . . . . . . . . . . . . . . 47 | |||
| 7.3. RST_STREAM Frame . . . . . . . . . . . . . . . . . . . . 50 | 6.10.4. Stateless Reset . . . . . . . . . . . . . . . . . . 48 | |||
| 7.4. CONNECTION_CLOSE frame . . . . . . . . . . . . . . . . . 51 | 7. Frame Types and Formats . . . . . . . . . . . . . . . . . . . 51 | |||
| 7.5. APPLICATION_CLOSE frame . . . . . . . . . . . . . . . . . 52 | 7.1. Variable-Length Integer Encoding . . . . . . . . . . . . 51 | |||
| 7.6. MAX_DATA Frame . . . . . . . . . . . . . . . . . . . . . 52 | 7.2. PADDING Frame . . . . . . . . . . . . . . . . . . . . . . 52 | |||
| 7.7. MAX_STREAM_DATA Frame . . . . . . . . . . . . . . . . . . 53 | 7.3. RST_STREAM Frame . . . . . . . . . . . . . . . . . . . . 52 | |||
| 7.8. MAX_STREAM_ID Frame . . . . . . . . . . . . . . . . . . . 54 | 7.4. CONNECTION_CLOSE frame . . . . . . . . . . . . . . . . . 53 | |||
| 7.9. PING Frame . . . . . . . . . . . . . . . . . . . . . . . 54 | 7.5. APPLICATION_CLOSE frame . . . . . . . . . . . . . . . . . 53 | |||
| 7.10. BLOCKED Frame . . . . . . . . . . . . . . . . . . . . . . 55 | 7.6. MAX_DATA Frame . . . . . . . . . . . . . . . . . . . . . 54 | |||
| 7.11. STREAM_BLOCKED Frame . . . . . . . . . . . . . . . . . . 55 | 7.7. MAX_STREAM_DATA Frame . . . . . . . . . . . . . . . . . . 54 | |||
| 7.12. STREAM_ID_BLOCKED Frame . . . . . . . . . . . . . . . . . 56 | 7.8. MAX_STREAM_ID Frame . . . . . . . . . . . . . . . . . . . 55 | |||
| 7.13. NEW_CONNECTION_ID Frame . . . . . . . . . . . . . . . . . 56 | 7.9. PING Frame . . . . . . . . . . . . . . . . . . . . . . . 56 | |||
| 7.14. STOP_SENDING Frame . . . . . . . . . . . . . . . . . . . 58 | 7.10. BLOCKED Frame . . . . . . . . . . . . . . . . . . . . . . 57 | |||
| 7.15. ACK Frame . . . . . . . . . . . . . . . . . . . . . . . . 58 | 7.11. STREAM_BLOCKED Frame . . . . . . . . . . . . . . . . . . 57 | |||
| 7.15.1. ACK Block Section . . . . . . . . . . . . . . . . . 60 | 7.12. STREAM_ID_BLOCKED Frame . . . . . . . . . . . . . . . . . 58 | |||
| 7.15.2. Sending ACK Frames . . . . . . . . . . . . . . . . . 61 | 7.13. NEW_CONNECTION_ID Frame . . . . . . . . . . . . . . . . . 58 | |||
| 7.15.3. ACK Frames and Packet Protection . . . . . . . . . . 62 | 7.14. STOP_SENDING Frame . . . . . . . . . . . . . . . . . . . 59 | |||
| 7.16. PATH_CHALLENGE Frame . . . . . . . . . . . . . . . . . . 63 | 7.15. ACK Frame . . . . . . . . . . . . . . . . . . . . . . . . 60 | |||
| 7.17. PATH_RESPONSE Frame . . . . . . . . . . . . . . . . . . . 63 | 7.15.1. ACK Block Section . . . . . . . . . . . . . . . . . 61 | |||
| 7.18. STREAM Frames . . . . . . . . . . . . . . . . . . . . . . 64 | 7.15.2. Sending ACK Frames . . . . . . . . . . . . . . . . . 63 | |||
| 8. Packetization and Reliability . . . . . . . . . . . . . . . . 65 | 7.15.3. ACK Frames and Packet Protection . . . . . . . . . . 64 | |||
| 8.1. Packet Processing and Acknowledgment . . . . . . . . . . 66 | 7.16. PATH_CHALLENGE Frame . . . . . . . . . . . . . . . . . . 65 | |||
| 8.2. Retransmission of Information . . . . . . . . . . . . . . 66 | 7.17. PATH_RESPONSE Frame . . . . . . . . . . . . . . . . . . . 65 | |||
| 8.3. Packet Size . . . . . . . . . . . . . . . . . . . . . . . 68 | 7.18. STREAM Frames . . . . . . . . . . . . . . . . . . . . . . 65 | |||
| 8.4. Path Maximum Transmission Unit . . . . . . . . . . . . . 68 | 8. Packetization and Reliability . . . . . . . . . . . . . . . . 67 | |||
| 8.4.1. Special Considerations for PMTU Discovery . . . . . . 69 | 8.1. Packet Processing and Acknowledgment . . . . . . . . . . 67 | |||
| 8.2. Retransmission of Information . . . . . . . . . . . . . . 68 | ||||
| 8.3. Packet Size . . . . . . . . . . . . . . . . . . . . . . . 70 | ||||
| 8.4. Path Maximum Transmission Unit . . . . . . . . . . . . . 70 | ||||
| 8.4.1. Special Considerations for PMTU Discovery . . . . . . 71 | ||||
| 8.4.2. Special Considerations for Packetization Layer PMTU | 8.4.2. Special Considerations for Packetization Layer PMTU | |||
| Discovery . . . . . . . . . . . . . . . . . . . . . . 70 | Discovery . . . . . . . . . . . . . . . . . . . . . . 71 | |||
| 9. Streams: QUIC's Data Structuring Abstraction . . . . . . . . 70 | 9. Streams: QUIC's Data Structuring Abstraction . . . . . . . . 72 | |||
| 9.1. Stream Identifiers . . . . . . . . . . . . . . . . . . . 71 | 9.1. Stream Identifiers . . . . . . . . . . . . . . . . . . . 73 | |||
| 9.2. Stream States . . . . . . . . . . . . . . . . . . . . . . 72 | 9.2. Stream States . . . . . . . . . . . . . . . . . . . . . . 74 | |||
| 9.2.1. Send Stream States . . . . . . . . . . . . . . . . . 73 | 9.2.1. Send Stream States . . . . . . . . . . . . . . . . . 74 | |||
| 9.2.2. Receive Stream States . . . . . . . . . . . . . . . . 75 | 9.2.2. Receive Stream States . . . . . . . . . . . . . . . . 76 | |||
| 9.2.3. Permitted Frame Types . . . . . . . . . . . . . . . . 77 | 9.2.3. Permitted Frame Types . . . . . . . . . . . . . . . . 79 | |||
| 9.2.4. Bidirectional Stream States . . . . . . . . . . . . . 77 | 9.2.4. Bidirectional Stream States . . . . . . . . . . . . . 79 | |||
| 9.3. Solicited State Transitions . . . . . . . . . . . . . . . 78 | 9.3. Solicited State Transitions . . . . . . . . . . . . . . . 80 | |||
| 9.4. Stream Concurrency . . . . . . . . . . . . . . . . . . . 79 | 9.4. Stream Concurrency . . . . . . . . . . . . . . . . . . . 81 | |||
| 9.5. Sending and Receiving Data . . . . . . . . . . . . . . . 80 | 9.5. Sending and Receiving Data . . . . . . . . . . . . . . . 82 | |||
| 9.6. Stream Prioritization . . . . . . . . . . . . . . . . . . 80 | 9.6. Stream Prioritization . . . . . . . . . . . . . . . . . . 82 | |||
| 10. Flow Control . . . . . . . . . . . . . . . . . . . . . . . . 81 | 10. Flow Control . . . . . . . . . . . . . . . . . . . . . . . . 83 | |||
| 10.1. Edge Cases and Other Considerations . . . . . . . . . . 83 | 10.1. Edge Cases and Other Considerations . . . . . . . . . . 85 | |||
| 10.1.1. Response to a RST_STREAM . . . . . . . . . . . . . . 83 | 10.1.1. Response to a RST_STREAM . . . . . . . . . . . . . . 85 | |||
| 10.1.2. Data Limit Increments . . . . . . . . . . . . . . . 83 | 10.1.2. Data Limit Increments . . . . . . . . . . . . . . . 85 | |||
| 10.1.3. Handshake Exemption . . . . . . . . . . . . . . . . 84 | 10.1.3. Handshake Exemption . . . . . . . . . . . . . . . . 86 | |||
| 10.2. Stream Limit Increment . . . . . . . . . . . . . . . . . 84 | 10.2. Stream Limit Increment . . . . . . . . . . . . . . . . . 86 | |||
| 10.2.1. Blocking on Flow Control . . . . . . . . . . . . . . 84 | 10.2.1. Blocking on Flow Control . . . . . . . . . . . . . . 86 | |||
| 10.3. Stream Final Offset . . . . . . . . . . . . . . . . . . 85 | 10.3. Stream Final Offset . . . . . . . . . . . . . . . . . . 87 | |||
| 11. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 85 | 11. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 87 | |||
| 11.1. Connection Errors . . . . . . . . . . . . . . . . . . . 86 | 11.1. Connection Errors . . . . . . . . . . . . . . . . . . . 88 | |||
| 11.2. Stream Errors . . . . . . . . . . . . . . . . . . . . . 87 | 11.2. Stream Errors . . . . . . . . . . . . . . . . . . . . . 89 | |||
| 11.3. Transport Error Codes . . . . . . . . . . . . . . . . . 87 | 11.3. Transport Error Codes . . . . . . . . . . . . . . . . . 89 | |||
| 11.4. Application Protocol Error Codes . . . . . . . . . . . . 88 | 11.4. Application Protocol Error Codes . . . . . . . . . . . . 90 | |||
| 12. Security and Privacy Considerations . . . . . . . . . . . . . 89 | 12. Security Considerations . . . . . . . . . . . . . . . . . . . 91 | |||
| 12.1. Spoofed ACK Attack . . . . . . . . . . . . . . . . . . . 89 | 12.1. Spoofed ACK Attack . . . . . . . . . . . . . . . . . . . 91 | |||
| 12.2. Optimistic ACK Attack . . . . . . . . . . . . . . . . . 89 | 12.2. Optimistic ACK Attack . . . . . . . . . . . . . . . . . 91 | |||
| 12.3. Slowloris Attacks . . . . . . . . . . . . . . . . . . . 90 | 12.3. Slowloris Attacks . . . . . . . . . . . . . . . . . . . 92 | |||
| 12.4. Stream Fragmentation and Reassembly Attacks . . . . . . 90 | 12.4. Stream Fragmentation and Reassembly Attacks . . . . . . 92 | |||
| 12.5. Stream Commitment Attack . . . . . . . . . . . . . . . . 90 | 12.5. Stream Commitment Attack . . . . . . . . . . . . . . . . 92 | |||
| 13. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 91 | 13. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 93 | |||
| 13.1. QUIC Transport Parameter Registry . . . . . . . . . . . 91 | 13.1. QUIC Transport Parameter Registry . . . . . . . . . . . 93 | |||
| 13.2. QUIC Transport Error Codes Registry . . . . . . . . . . 92 | 13.2. QUIC Transport Error Codes Registry . . . . . . . . . . 94 | |||
| 14. References . . . . . . . . . . . . . . . . . . . . . . . . . 94 | 14. References . . . . . . . . . . . . . . . . . . . . . . . . . 96 | |||
| 14.1. Normative References . . . . . . . . . . . . . . . . . . 94 | 14.1. Normative References . . . . . . . . . . . . . . . . . . 96 | |||
| 14.2. Informative References . . . . . . . . . . . . . . . . . 95 | 14.2. Informative References . . . . . . . . . . . . . . . . . 97 | |||
| 14.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 96 | Appendix A. Contributors . . . . . . . . . . . . . . . . . . . . 98 | |||
| Appendix A. Contributors . . . . . . . . . . . . . . . . . . . . 96 | Appendix B. Acknowledgments . . . . . . . . . . . . . . . . . . 98 | |||
| Appendix B. Acknowledgments . . . . . . . . . . . . . . . . . . 97 | Appendix C. Change Log . . . . . . . . . . . . . . . . . . . . . 99 | |||
| Appendix C. Change Log . . . . . . . . . . . . . . . . . . . . . 97 | C.1. Since draft-ietf-quic-transport-11 . . . . . . . . . . . 99 | |||
| C.1. Since draft-ietf-quic-transport-10 . . . . . . . . . . . 97 | C.2. Since draft-ietf-quic-transport-10 . . . . . . . . . . . 99 | |||
| C.2. Since draft-ietf-quic-transport-09 . . . . . . . . . . . 98 | C.3. Since draft-ietf-quic-transport-09 . . . . . . . . . . . 100 | |||
| C.3. Since draft-ietf-quic-transport-08 . . . . . . . . . . . 98 | C.4. Since draft-ietf-quic-transport-08 . . . . . . . . . . . 100 | |||
| C.4. Since draft-ietf-quic-transport-07 . . . . . . . . . . . 99 | C.5. Since draft-ietf-quic-transport-07 . . . . . . . . . . . 101 | |||
| C.5. Since draft-ietf-quic-transport-06 . . . . . . . . . . . 100 | C.6. Since draft-ietf-quic-transport-06 . . . . . . . . . . . 102 | |||
| C.6. Since draft-ietf-quic-transport-05 . . . . . . . . . . . 100 | C.7. Since draft-ietf-quic-transport-05 . . . . . . . . . . . 102 | |||
| C.7. Since draft-ietf-quic-transport-04 . . . . . . . . . . . 100 | C.8. Since draft-ietf-quic-transport-04 . . . . . . . . . . . 102 | |||
| C.8. Since draft-ietf-quic-transport-03 . . . . . . . . . . . 101 | C.9. Since draft-ietf-quic-transport-03 . . . . . . . . . . . 103 | |||
| C.9. Since draft-ietf-quic-transport-02 . . . . . . . . . . . 101 | C.10. Since draft-ietf-quic-transport-02 . . . . . . . . . . . 103 | |||
| C.10. Since draft-ietf-quic-transport-01 . . . . . . . . . . . 102 | C.11. Since draft-ietf-quic-transport-01 . . . . . . . . . . . 104 | |||
| C.11. Since draft-ietf-quic-transport-00 . . . . . . . . . . . 104 | C.12. Since draft-ietf-quic-transport-00 . . . . . . . . . . . 106 | |||
| C.12. Since draft-hamilton-quic-transport-protocol-01 . . . . . 104 | C.13. Since draft-hamilton-quic-transport-protocol-01 . . . . . 106 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 105 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 107 | |||
| 1. Introduction | 1. Introduction | |||
| QUIC is a multiplexed and secure transport protocol that runs on top | QUIC is a multiplexed and secure transport protocol that runs on top | |||
| of UDP. QUIC aims to provide a flexible set of features that allow | of UDP. QUIC aims to provide a flexible set of features that allow | |||
| it to be a general-purpose secure transport for multiple | it to be a general-purpose secure transport for multiple | |||
| applications. | applications. | |||
| o Version negotiation | o Version negotiation | |||
| skipping to change at page 7, line 48 ¶ | skipping to change at page 7, line 50 ¶ | |||
| The version number for the final version of this specification | The version number for the final version of this specification | |||
| (0x00000001), is reserved for the version of the protocol that is | (0x00000001), is reserved for the version of the protocol that is | |||
| published as an RFC. | published as an RFC. | |||
| Version numbers used to identify IETF drafts are created by adding | Version numbers used to identify IETF drafts are created by adding | |||
| the draft number to 0xff000000. For example, draft-ietf-quic- | the draft number to 0xff000000. For example, draft-ietf-quic- | |||
| transport-13 would be identified as 0xff00000D. | transport-13 would be identified as 0xff00000D. | |||
| Implementors are encouraged to register version numbers of QUIC that | Implementors are encouraged to register version numbers of QUIC that | |||
| they are using for private experimentation on the github wiki [4]. | they are using for private experimentation on the GitHub wiki at | |||
| <https://github.com/quicwg/base-drafts/wiki/QUIC-Versions>. | ||||
| 4. Packet Types and Formats | 4. Packet Types and Formats | |||
| We first describe QUIC's packet types and their formats, since some | We first describe QUIC's packet types and their formats, since some | |||
| are referenced in subsequent mechanisms. | are referenced in subsequent mechanisms. | |||
| All numeric values are encoded in network byte order (that is, big- | All numeric values are encoded in network byte order (that is, big- | |||
| endian) and all field sizes are in bits. When discussing individual | endian) and all field sizes are in bits. When discussing individual | |||
| bits of fields, the least significant bit is referred to as bit 0. | bits of fields, the least significant bit is referred to as bit 0. | |||
| Hexadecimal notation is used for describing the value of fields. | Hexadecimal notation is used for describing the value of fields. | |||
| skipping to change at page 8, line 38 ¶ | skipping to change at page 8, line 38 ¶ | |||
| | Version (32) | | | Version (32) | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| |DCIL(4)|SCIL(4)| | |DCIL(4)|SCIL(4)| | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Destination Connection ID (0/32..144) ... | | Destination Connection ID (0/32..144) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Source Connection ID (0/32..144) ... | | Source Connection ID (0/32..144) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Payload Length (i) ... | | Payload Length (i) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Packet Number (32) | | | Packet Number (8/16/32) | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Payload (*) ... | | Payload (*) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Figure 1: Long Header Format | Figure 1: Long Header Format | |||
| Long headers are used for packets that are sent prior to the | Long headers are used for packets that are sent prior to the | |||
| completion of version negotiation and establishment of 1-RTT keys. | completion of version negotiation and establishment of 1-RTT keys. | |||
| Once both conditions are met, a sender switches to sending packets | Once both conditions are met, a sender switches to sending packets | |||
| using the short header (Section 4.2). The long form allows for | using the short header (Section 4.2). The long form allows for | |||
| skipping to change at page 9, line 41 ¶ | skipping to change at page 9, line 41 ¶ | |||
| field in more detail. | field in more detail. | |||
| Source Connection ID: The Source Connection ID field follows the | Source Connection ID: The Source Connection ID field follows the | |||
| Destination Connection ID and is either 0 octets in length or | Destination Connection ID and is either 0 octets in length or | |||
| between 4 and 18 octets. Section 4.7 describes the use of this | between 4 and 18 octets. Section 4.7 describes the use of this | |||
| field in more detail. | field in more detail. | |||
| Payload Length: The length of the Payload field in octets, encoded | Payload Length: The length of the Payload field in octets, encoded | |||
| as a variable-length integer (Section 7.1). | as a variable-length integer (Section 7.1). | |||
| Packet Number: The Packet Number is a 32-bit field that follows the | Packet Number: The packet number field is 1, 2, or 4 octets long. | |||
| two connection IDs. Section 4.8 describes the use of packet | The packet number has confidentiality protection separate from | |||
| numbers. | packet protection, as described in Section 5.6 of [QUIC-TLS]. The | |||
| length of the packet number field is encoded in the plaintext | ||||
| packet number. See Section 4.8 for details. | ||||
| Payload: The payload of the packet. | Payload: The payload of the packet. | |||
| The following packet types are defined: | The following packet types are defined: | |||
| +------+-----------------+---------------+ | +------+-----------------+---------------+ | |||
| | Type | Name | Section | | | Type | Name | Section | | |||
| +------+-----------------+---------------+ | +------+-----------------+---------------+ | |||
| | 0x7F | Initial | Section 4.4.1 | | | 0x7F | Initial | Section 4.4.1 | | |||
| | | | | | | | | | | |||
| skipping to change at page 10, line 30 ¶ | skipping to change at page 10, line 30 ¶ | |||
| source connection IDs, and version fields of a long header packet are | source connection IDs, and version fields of a long header packet are | |||
| version-independent. The packet number and values for packet types | version-independent. The packet number and values for packet types | |||
| defined in Table 1 are version-specific. See [QUIC-INVARIANTS] for | defined in Table 1 are version-specific. See [QUIC-INVARIANTS] for | |||
| details on how packets from different versions of QUIC are | details on how packets from different versions of QUIC are | |||
| interpreted. | interpreted. | |||
| The interpretation of the fields and the payload are specific to a | The interpretation of the fields and the payload are specific to a | |||
| version and packet type. Type-specific semantics for this version | version and packet type. Type-specific semantics for this version | |||
| are described in the following sections. | are described in the following sections. | |||
| End of the Payload field (which is also the end of the long header | The end of the Payload field (which is also the end of the long | |||
| packet) is determined by the value of the Payload Length field. | header packet) is determined by the value of the Payload Length | |||
| Senders can coalesce multiple long header packets into one UDP | field. Senders can sometimes coalesce multiple packets into one UDP | |||
| datagram. See Section 4.6 for more details. | datagram. See Section 4.6 for more details. | |||
| 4.2. Short Header | 4.2. Short Header | |||
| 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 | |||
| +-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+ | |||
| |0|K|1|1|0|R|T T| | |0|K|1|1|0|R R R| | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Destination Connection ID (0..144) ... | | Destination Connection ID (0..144) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Packet Number (8/16/32) ... | | Packet Number (8/16/32) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Protected Payload (*) ... | | Protected Payload (*) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Figure 2: Short Header Format | Figure 2: Short Header Format | |||
| skipping to change at page 11, line 34 ¶ | skipping to change at page 11, line 34 ¶ | |||
| definitions changed before this draft goes to the IESG.]] | definitions changed before this draft goes to the IESG.]] | |||
| Google QUIC Demultipexing Bit: The fifth bit (0x8) of octet 0 is set | Google QUIC Demultipexing Bit: The fifth bit (0x8) of octet 0 is set | |||
| to 0. This allows implementations of Google QUIC to distinguish | to 0. This allows implementations of Google QUIC to distinguish | |||
| Google QUIC packets from short header packets sent by a client | Google QUIC packets from short header packets sent by a client | |||
| because Google QUIC servers expect the connection ID to always be | because Google QUIC servers expect the connection ID to always be | |||
| present. The special interpretation of this bit SHOULD be removed | present. The special interpretation of this bit SHOULD be removed | |||
| from this specification when Google QUIC has finished | from this specification when Google QUIC has finished | |||
| transitioning to the new header format. | transitioning to the new header format. | |||
| Reserved: The sixth bit (0x4) of octet 0 is reserved for | Reserved: The sixth, seventh, and eighth bits (0x7) of octet 0 are | |||
| experimentation. | reserved for experimentation. | |||
| Short Packet Type: The remaining 2 bits of octet 0 include one of 4 | ||||
| packet types. Table 2 lists the types that are defined for short | ||||
| packets. | ||||
| Destination Connection ID: The Destination Connection ID is a | Destination Connection ID: The Destination Connection ID is a | |||
| connection ID that is chosen by the intended recipient of the | connection ID that is chosen by the intended recipient of the | |||
| packet. See Section 4.7 for more details. | packet. See Section 4.7 for more details. | |||
| Packet Number: The length of the packet number field depends on the | Packet Number: The packet number field is 1, 2, or 4 octets long. | |||
| packet type. This field can be 1, 2 or 4 octets long depending on | The packet number has confidentiality protection separate from | |||
| the short packet type. | packet protection, as described in Section 5.6 of [QUIC-TLS]. The | |||
| length of the packet number field is encoded in the plaintext | ||||
| packet number. See Section 4.8 for details. | ||||
| Protected Payload: Packets with a short header always include a | Protected Payload: Packets with a short header always include a | |||
| 1-RTT protected payload. | 1-RTT protected payload. | |||
| The packet type in a short header currently determines only the size | The packet type in a short header currently determines only the size | |||
| of the packet number field. Additional types can be used to signal | of the packet number field. Additional types can be used to signal | |||
| the presence of other fields. | the presence of other fields. | |||
| +------+--------------------+ | ||||
| | Type | Packet Number Size | | ||||
| +------+--------------------+ | ||||
| | 0x0 | 1 octet | | ||||
| | | | | ||||
| | 0x1 | 2 octets | | ||||
| | | | | ||||
| | 0x2 | 4 octets | | ||||
| +------+--------------------+ | ||||
| Table 2: Short Header Packet Types | ||||
| The header form and connection ID field of a short header packet are | The header form and connection ID field of a short header packet are | |||
| version-independent. The remaining fields are specific to the | version-independent. The remaining fields are specific to the | |||
| selected QUIC version. See [QUIC-INVARIANTS] for details on how | selected QUIC version. See [QUIC-INVARIANTS] for details on how | |||
| packets from different versions of QUIC are interpreted. | packets from different versions of QUIC are interpreted. | |||
| 4.3. Version Negotiation Packet | 4.3. Version Negotiation Packet | |||
| A Version Negotiation packet is inherently not version-specific, and | A Version Negotiation packet is inherently not version-specific, and | |||
| does not use the long packet header (see Section 4.1. Upon receipt | does not use the long packet header (see Section 4.1. Upon receipt | |||
| by a client, it will appear to be a packet using the long header, but | by a client, it will appear to be a packet using the long header, but | |||
| skipping to change at page 14, line 38 ¶ | skipping to change at page 14, line 7 ¶ | |||
| The Initial packet uses long headers with a type value of 0x7F. It | The Initial packet uses long headers with a type value of 0x7F. It | |||
| carries the first cryptographic handshake message sent by the client. | carries the first cryptographic handshake message sent by the client. | |||
| If the client has not previously received a Retry packet from the | If the client has not previously received a Retry packet from the | |||
| server, it populates the Destination Connection ID field with a | server, it populates the Destination Connection ID field with a | |||
| randomly selected value. This MUST be at least 8 octets in length. | randomly selected value. This MUST be at least 8 octets in length. | |||
| Until a packet is received from the server, the client MUST use the | Until a packet is received from the server, the client MUST use the | |||
| same random value unless it also changes the Source Connection ID | same random value unless it also changes the Source Connection ID | |||
| (which effectively starts a new connection attempt). The randomized | (which effectively starts a new connection attempt). The randomized | |||
| Destination Connection ID is used to determine packet protection | Destination Connection ID is used to determine packet protection | |||
| keys, but is not included in server packets. | keys. | |||
| If the client received a Retry packet and is sending a second Initial | If the client received a Retry packet and is sending a second Initial | |||
| packet, then it sets the Destination Connection ID to the value from | packet, then it sets the Destination Connection ID to the value from | |||
| the Source Connection ID in the Retry packet. Changing Destination | the Source Connection ID in the Retry packet. Changing Destination | |||
| Connection ID also results in a change to the keys used to protect | Connection ID also results in a change to the keys used to protect | |||
| the Initial packet. | the Initial packet. | |||
| The client populates the Source Connection ID field with a value of | The client populates the Source Connection ID field with a value of | |||
| its choosing and sets the low bits of the ConnID Len field to match. | its choosing and sets the SCIL field to match. | |||
| The first Initial packet that is sent by a client contains a | The first Initial packet that is sent by a client contains a packet | |||
| randomized packet number. All subsequent packets contain a packet | number of 0. All subsequent packets contain a packet number that is | |||
| number that is incremented by one, see (Section 4.8). | incremented by at least one, see (Section 4.8). | |||
| The payload of an Initial packet conveys a STREAM frame (or frames) | The payload of an Initial packet conveys a STREAM frame (or frames) | |||
| for stream 0 containing a cryptographic handshake message. The | for stream 0 containing a cryptographic handshake message. The | |||
| stream in this packet always starts at an offset of 0 (see | stream in this packet always starts at an offset of 0 (see | |||
| Section 6.5) and the complete cryptographic handshake message MUST | Section 6.5) and the complete cryptographic handshake message MUST | |||
| fit in a single packet (see Section 6.3). | fit in a single packet (see Section 6.3). | |||
| The payload of a UDP datagram carrying the Initial packet MUST be | The payload of a UDP datagram carrying the Initial packet MUST be | |||
| expanded to at least 1200 octets (see Section 8), by adding PADDING | expanded to at least 1200 octets (see Section 8), by adding PADDING | |||
| frames to the Initial packet and/or by combining the Initial packet | frames to the Initial packet and/or by combining the Initial packet | |||
| skipping to change at page 15, line 37 ¶ | skipping to change at page 15, line 9 ¶ | |||
| Section 6.5). | Section 6.5). | |||
| The server populates the Destination Connection ID with the | The server populates the Destination Connection ID with the | |||
| connection ID that the client included in the Source Connection ID of | connection ID that the client included in the Source Connection ID of | |||
| the Initial packet. This might be a zero-length value. | the Initial packet. This might be a zero-length value. | |||
| The server includes a connection ID of its choice in the Source | The server includes a connection ID of its choice in the Source | |||
| Connection ID field. The client MUST use this connection ID in the | Connection ID field. The client MUST use this connection ID in the | |||
| Destination Connection ID of subsequent packets that it sends. | Destination Connection ID of subsequent packets that it sends. | |||
| The packet number field echoes the packet number field from the | The Packet Number field of a Retry packet MUST be set to 0. This | |||
| triggering client packet. | value is subsequently protected as normal. [[Editor's Note: This | |||
| isn't ideal, because it creates a "cheat" where the client assumes a | ||||
| value. That's a problem, so I'm tempted to suggest that this include | ||||
| any value less than 2^30 so that normal processing works - and can be | ||||
| properly exercised.]] | ||||
| A Retry packet is never explicitly acknowledged in an ACK frame by a | A Retry packet is never explicitly acknowledged in an ACK frame by a | |||
| client. Receiving another Initial packet implicitly acknowledges a | client. Receiving another Initial packet implicitly acknowledges a | |||
| Retry packet. | Retry packet. | |||
| After receiving a Retry packet, the client uses a new Initial packet | After receiving a Retry packet, the client uses a new Initial packet | |||
| containing the next cryptographic handshake message. The client | containing the next cryptographic handshake message. The client | |||
| retains the state of its cryptographic handshake, but discards all | retains the state of its cryptographic handshake, but discards all | |||
| transport state. The Initial packet that is generated in response to | transport state. The Initial packet that is generated in response to | |||
| a Retry packet includes STREAM frames on stream 0 that start again at | a Retry packet includes STREAM frames on stream 0 that start again at | |||
| skipping to change at page 16, line 4 ¶ | skipping to change at page 15, line 29 ¶ | |||
| After receiving a Retry packet, the client uses a new Initial packet | After receiving a Retry packet, the client uses a new Initial packet | |||
| containing the next cryptographic handshake message. The client | containing the next cryptographic handshake message. The client | |||
| retains the state of its cryptographic handshake, but discards all | retains the state of its cryptographic handshake, but discards all | |||
| transport state. The Initial packet that is generated in response to | transport state. The Initial packet that is generated in response to | |||
| a Retry packet includes STREAM frames on stream 0 that start again at | a Retry packet includes STREAM frames on stream 0 that start again at | |||
| an offset of 0. | an offset of 0. | |||
| Continuing the cryptographic handshake is necessary to ensure that an | Continuing the cryptographic handshake is necessary to ensure that an | |||
| attacker cannot force a downgrade of any cryptographic parameters. | attacker cannot force a downgrade of any cryptographic parameters. | |||
| In addition to continuing the cryptographic handshake, the client | In addition to continuing the cryptographic handshake, the client | |||
| MUST remember the results of any version negotiation that occurred | MUST remember the results of any version negotiation that occurred | |||
| (see Section 6.2). The client MAY also retain any observed RTT or | (see Section 6.2). The client MAY also retain any observed RTT or | |||
| congestion state that it has accumulated for the flow, but other | congestion state that it has accumulated for the flow, but other | |||
| transport state MUST be discarded. | transport state MUST be discarded. | |||
| The payload of the Retry packet contains at least two frames. It | The payload of the Retry packet contains at least two frames. It | |||
| MUST include a STREAM frame on stream 0 with offset 0 containing the | MUST include a STREAM frame on stream 0 with offset 0 containing the | |||
| server's cryptographic stateless retry material. It MUST also | server's cryptographic stateless retry material. It MUST also | |||
| include an ACK frame to acknowledge the client's Initial packet. It | include an ACK frame to acknowledge the client's Initial packet. It | |||
| MAY additionally include PADDING frames. The next STREAM frame sent | MAY additionally include PADDING frames. The next STREAM frame sent | |||
| by the server will also start at stream offset 0. | by the server will also start at stream offset 0. | |||
| 4.4.3. Handshake Packet | 4.4.3. Handshake Packet | |||
| A Handshake packet uses long headers with a type value of 0x7D. It | A Handshake packet uses long headers with a type value of 0x7D. It | |||
| is used to carry acknowledgments and cryptographic handshake messages | is used to carry acknowledgments and cryptographic handshake messages | |||
| from the server and client. | from the server and client. | |||
| A server sends its cryptographic handshake in one or more Handshake | ||||
| packets in response to an Initial packet if it does not send a Retry | ||||
| packet. Once a client has received a Handshake packet from a server, | ||||
| it uses Handshake packets to send subsequent cryptographic handshake | ||||
| messages and acknowledgments to the server. | ||||
| The Destination Connection ID field in a Handshake packet contains a | The Destination Connection ID field in a Handshake packet contains a | |||
| connection ID that is chosen by the recipient of the packet; the | connection ID that is chosen by the recipient of the packet; the | |||
| Source Connection ID includes the connection ID that the sender of | Source Connection ID includes the connection ID that the sender of | |||
| the packet wishes to use (see Section 4.7). | the packet wishes to use (see Section 4.7). | |||
| The first Handshake packet sent by a server contains a randomized | The first Handshake packet sent by a server contains a packet number | |||
| packet number. This value is increased for each subsequent packet | of 0. Packet numbers are incremented normally for other Handshake | |||
| sent by the server as described in Section 4.8. The client | packets. | |||
| increments the packet number from its previous packet by one for each | ||||
| Handshake packet that it sends (which might be an Initial, 0-RTT | ||||
| Protected, or Handshake packet). | ||||
| Servers MUST NOT send more than three Handshake packets without | Servers MUST NOT send more than three Handshake packets without | |||
| receiving a packet from a verified source address. Source addresses | receiving a packet from a verified source address. Source addresses | |||
| can be verified through an address validation token, receipt of the | can be verified through an address validation token, receipt of the | |||
| final cryptographic message from the client, or by receiving a valid | final cryptographic message from the client, or by receiving a valid | |||
| PATH_RESPONSE frame from the client. | PATH_RESPONSE frame from the client. | |||
| If the server expects to generate more than three Handshake packets | If the server expects to generate more than three Handshake packets | |||
| in response to an Initial packet, it SHOULD include a PATH_CHALLENGE | in response to an Initial packet, it SHOULD include a PATH_CHALLENGE | |||
| frame in each Handshake packet that it sends. After receiving at | frame in each Handshake packet that it sends. After receiving at | |||
| skipping to change at page 17, line 9 ¶ | skipping to change at page 16, line 36 ¶ | |||
| server, but could involve additional computational effort depending | server, but could involve additional computational effort depending | |||
| on implementation choices. | on implementation choices. | |||
| The payload of this packet contains STREAM frames and could contain | The payload of this packet contains STREAM frames and could contain | |||
| PADDING, ACK, PATH_CHALLENGE, or PATH_RESPONSE frames. Handshake | PADDING, ACK, PATH_CHALLENGE, or PATH_RESPONSE frames. Handshake | |||
| packets MAY contain CONNECTION_CLOSE frames if the handshake is | packets MAY contain CONNECTION_CLOSE frames if the handshake is | |||
| unsuccessful. | unsuccessful. | |||
| 4.5. Protected Packets | 4.5. Protected Packets | |||
| Packets that are protected with 0-RTT keys are sent with long | All QUIC packets are protected. Packets that are protected with the | |||
| headers; all packets protected with 1-RTT keys are sent with short | static handshake keys or the 0-RTT keys are sent with long headers; | |||
| headers. The different packet types explicitly indicate the | all packets protected with 1-RTT keys are sent with short headers. | |||
| encryption level and therefore the keys that are used to remove | The different packet types explicitly indicate the encryption level | |||
| packet protection. | and therefore the keys that are used to remove packet protection. | |||
| Packets protected with 0-RTT keys use a type value of 0x7C. The | Packets protected with 0-RTT keys use a type value of 0x7C. The | |||
| connection ID fields for a 0-RTT packet MUST match the values used in | connection ID fields for a 0-RTT packet MUST match the values used in | |||
| the Initial packet (Section 4.4.1). | the Initial packet (Section 4.4.1). | |||
| The client can send 0-RTT packets after receiving a Handshake packet | The client can send 0-RTT packets after receiving a Handshake packet | |||
| (Section 4.4.3), if that packet does not complete the handshake. | (Section 4.4.3), if that packet does not complete the handshake. | |||
| Even if the client receives a different connection ID in the | Even if the client receives a different connection ID in the | |||
| Handshake packet, it MUST continue to use the same Destination | Handshake packet, it MUST continue to use the same Destination | |||
| Connection ID for 0-RTT packets, see Section 4.7. | Connection ID for 0-RTT packets, see Section 4.7. | |||
| The version field for protected packets is the current QUIC version. | The version field for protected packets is the current QUIC version. | |||
| The packet number field contains a packet number, which increases | The packet number field contains a packet number, which has | |||
| with each packet sent, see Section 4.8 for details. | additional confidentiality protection that is applied after packet | |||
| protection is applied (see [QUIC-TLS] for details). The underlying | ||||
| packet number increases with each packet sent, see Section 4.8 for | ||||
| details. | ||||
| The payload is protected using authenticated encryption. [QUIC-TLS] | The payload is protected using authenticated encryption. [QUIC-TLS] | |||
| describes packet protection in detail. After decryption, the | describes packet protection in detail. After decryption, the | |||
| plaintext consists of a sequence of frames, as described in | plaintext consists of a sequence of frames, as described in | |||
| Section 5. | Section 5. | |||
| 4.6. Coaslescing Packets | 4.6. Coalescing Packets | |||
| A sender can coalesce multiple QUIC packets (typically a | A sender can coalesce multiple QUIC packets (typically a | |||
| Cryptographic Handshake packet and a Protected packet) into one UDP | Cryptographic Handshake packet and a Protected packet) into one UDP | |||
| datagram. This can reduce the number of UDP datagrams needed to send | datagram. This can reduce the number of UDP datagrams needed to send | |||
| application data during the handshake and immediately afterwards. A | application data during the handshake and immediately afterwards. A | |||
| packet with a short header does not include a length, so it has to be | packet with a short header does not include a length, so it has to be | |||
| the last packet included in a UDP datagram. | the last packet included in a UDP datagram. | |||
| The sender MUST NOT coalesce QUIC packets belonging to different QUIC | The sender MUST NOT coalesce QUIC packets belonging to different QUIC | |||
| connections into a single UDP datagram. | connections into a single UDP datagram. | |||
| skipping to change at page 19, line 19 ¶ | skipping to change at page 18, line 44 ¶ | |||
| The connection ID can change over the lifetime of a connection, | The connection ID can change over the lifetime of a connection, | |||
| especially in response to connection migration (Section 6.8). | especially in response to connection migration (Section 6.8). | |||
| NEW_CONNECTION_ID frames (Section 7.13) are used to provide new | NEW_CONNECTION_ID frames (Section 7.13) are used to provide new | |||
| connection ID values. | connection ID values. | |||
| 4.8. Packet Numbers | 4.8. Packet Numbers | |||
| The packet number is an integer in the range 0 to 2^62-1. The value | The packet number is an integer in the range 0 to 2^62-1. The value | |||
| is used in determining the cryptographic nonce for packet encryption. | is used in determining the cryptographic nonce for packet encryption. | |||
| Each endpoint maintains a separate packet number for sending and | Each endpoint maintains a separate packet number for sending and | |||
| receiving. The packet number for sending MUST increase by at least | receiving. The packet number for sending MUST start at zero for the | |||
| one after sending any packet, unless otherwise specified (see | first packet sent and MUST increase by at least one after sending a | |||
| Section 4.8.1). | packet. | |||
| A QUIC endpoint MUST NOT reuse a packet number within the same | A QUIC endpoint MUST NOT reuse a packet number within the same | |||
| connection (that is, under the same cryptographic keys). If the | connection (that is, under the same cryptographic keys). If the | |||
| packet number for sending reaches 2^62 - 1, the sender MUST close the | packet number for sending reaches 2^62 - 1, the sender MUST close the | |||
| connection without sending a CONNECTION_CLOSE frame or any further | connection without sending a CONNECTION_CLOSE frame or any further | |||
| packets; a server MAY send a Stateless Reset (Section 6.9.4) in | packets; a server MAY send a Stateless Reset (Section 6.10.4) in | |||
| response to further packets that it receives. | response to further packets that it receives. | |||
| For the packet header, the number of bits required to represent the | In the QUIC long and short packet headers, the number of bits | |||
| packet number are reduced by including only the least significant | required to represent the packet number are reduced by including only | |||
| bits of the packet number. The actual packet number for each packet | a variable number of the least significant bits of the packet number. | |||
| is reconstructed at the receiver based on the largest packet number | One or two of the most significant bits of the first octet determine | |||
| received on a successfully authenticated packet. | how many bits of the packet number are provided, as shown in Table 2. | |||
| A packet number is decoded by finding the packet number value that is | +---------------------+----------------+--------------+ | |||
| closest to the next expected packet. The next expected packet is the | | First octet pattern | Encoded Length | Bits Present | | |||
| highest received packet number plus one. For example, if the highest | +---------------------+----------------+--------------+ | |||
| | 0b0xxxxxxx | 1 octet | 7 | | ||||
| | | | | | ||||
| | 0b10xxxxxx | 2 | 14 | | ||||
| | | | | | ||||
| | 0b11xxxxxx | 4 | 30 | | ||||
| +---------------------+----------------+--------------+ | ||||
| Table 2: Packet Number Encodings for Packet Headers | ||||
| Note that these encodings are similar to those in Section 7.1, but | ||||
| use different values. | ||||
| The encoded packet number is protected as described in Section 5.6 | ||||
| [QUIC-TLS]. Protection of the packet number is removed prior to | ||||
| recovering the full packet number. The full packet number is | ||||
| reconstructed at the receiver based on the number of significant bits | ||||
| present, the content of those bits, and the largest packet number | ||||
| received on a successfully authenticated packet. Recovering the full | ||||
| packet number is necessary to successfully remove packet protection. | ||||
| Once packet number protection is removed, the packet number is | ||||
| decoded by finding the packet number value that is closest to the | ||||
| next expected packet. The next expected packet is the highest | ||||
| received packet number plus one. For example, if the highest | ||||
| successfully authenticated packet had a packet number of 0xaa82f30e, | successfully authenticated packet had a packet number of 0xaa82f30e, | |||
| then a packet containing a 16-bit value of 0x1f94 will be decoded as | then a packet containing a 14-bit value of 0x1f94 will be decoded as | |||
| 0xaa831f94. | 0xaa831f94. | |||
| The sender MUST use a packet number size able to represent more than | The sender MUST use a packet number size able to represent more than | |||
| twice as large a range than the difference between the largest | twice as large a range than the difference between the largest | |||
| acknowledged packet and packet number being sent. A peer receiving | acknowledged packet and packet number being sent. A peer receiving | |||
| the packet will then correctly decode the packet number, unless the | the packet will then correctly decode the packet number, unless the | |||
| packet is delayed in transit such that it arrives after many higher- | packet is delayed in transit such that it arrives after many higher- | |||
| numbered packets have been received. An endpoint SHOULD use a large | numbered packets have been received. An endpoint SHOULD use a large | |||
| enough packet number encoding to allow the packet number to be | enough packet number encoding to allow the packet number to be | |||
| recovered even if the packet arrives after packets that are sent | recovered even if the packet arrives after packets that are sent | |||
| afterwards. | afterwards. | |||
| As a result, the size of the packet number encoding is at least one | As a result, the size of the packet number encoding is at least one | |||
| more than the base 2 logarithm of the number of contiguous | more than the base 2 logarithm of the number of contiguous | |||
| unacknowledged packet numbers, including the new packet. | unacknowledged packet numbers, including the new packet. | |||
| For example, if an endpoint has received an acknowledgment for packet | For example, if an endpoint has received an acknowledgment for packet | |||
| 0x6afa2f, sending a packet with a number of 0x6b4264 requires a | 0x6afa2f, sending a packet with a number of 0x6b2d79 requires a | |||
| 16-bit or larger packet number encoding; whereas a 32-bit packet | packet number encoding with 14 bits or more; whereas the 30-bit | |||
| number is needed to send a packet with a number of 0x6bc107. | packet number encoding is needed to send a packet with a number of | |||
| 0x6bc107. | ||||
| A Version Negotiation packet (Section 4.3) does not include a packet | A Version Negotiation packet (Section 4.3) does not include a packet | |||
| number. The Retry packet (Section 4.4.2) has special rules for | number. The Retry packet (Section 4.4.2) has special rules for | |||
| populating the packet number field. | populating the packet number field. | |||
| 4.8.1. Initial Packet Number | ||||
| The initial value for packet number MUST be selected randomly from a | ||||
| range between 0 and 2^32 - 1025 (inclusive). This value is selected | ||||
| so that Initial and Handshake packets exercise as many possible | ||||
| values for the Packet Number field as possible. | ||||
| Limiting the range allows both for loss of packets and for any | ||||
| stateless exchanges. Packet numbers are incremented for subsequent | ||||
| packets, but packet loss and stateless handling can both mean that | ||||
| the first packet sent by an endpoint isn't necessarily the first | ||||
| packet received by its peer. The first packet received by a peer | ||||
| cannot be 2^32 or greater or the recipient will incorrectly assume a | ||||
| packet number that is 2^32 values lower and discard the packet. | ||||
| Use of a secure random number generator [RFC4086] is not necessary | ||||
| for generating the initial packet number, nor is it necessary that | ||||
| the value be uniformly distributed. | ||||
| 5. Frames and Frame Types | 5. Frames and Frame Types | |||
| The payload of all packets, after removing packet protection, | The payload of all packets, after removing packet protection, | |||
| consists of a sequence of frames, as shown in Figure 4. Version | consists of a sequence of frames, as shown in Figure 4. Version | |||
| Negotiation and Stateless Reset do not contain frames. | Negotiation and Stateless Reset do not contain frames. | |||
| 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 | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Frame 1 (*) ... | | Frame 1 (*) ... | |||
| skipping to change at page 23, line 5 ¶ | skipping to change at page 23, line 5 ¶ | |||
| 6. Life of a Connection | 6. Life of a Connection | |||
| A QUIC connection is a single conversation between two QUIC | A QUIC connection is a single conversation between two QUIC | |||
| endpoints. QUIC's connection establishment intertwines version | endpoints. QUIC's connection establishment intertwines version | |||
| negotiation with the cryptographic and transport handshakes to reduce | negotiation with the cryptographic and transport handshakes to reduce | |||
| connection establishment latency, as described in Section 6.3. Once | connection establishment latency, as described in Section 6.3. Once | |||
| established, a connection may migrate to a different IP or port at | established, a connection may migrate to a different IP or port at | |||
| either endpoint, due to NAT rebinding or mobility, as described in | either endpoint, due to NAT rebinding or mobility, as described in | |||
| Section 6.8. Finally a connection may be terminated by either | Section 6.8. Finally a connection may be terminated by either | |||
| endpoint, as described in Section 6.9. | endpoint, as described in Section 6.10. | |||
| 6.1. Matching Packets to Connections | 6.1. Matching Packets to Connections | |||
| Incoming packets are classified on receipt. Packets can either be | Incoming packets are classified on receipt. Packets can either be | |||
| associated with an existing connection, or - for servers - | associated with an existing connection, or - for servers - | |||
| potentially create a new connection. | potentially create a new connection. | |||
| Hosts try to associate a packet with an existing connection. If the | Hosts try to associate a packet with an existing connection. If the | |||
| packet has a Destination Connection ID corresponding to an existing | packet has a Destination Connection ID corresponding to an existing | |||
| connection, QUIC processes that packet accordingly. Note that a | connection, QUIC processes that packet accordingly. Note that a | |||
| skipping to change at page 24, line 32 ¶ | skipping to change at page 24, line 32 ¶ | |||
| send a Handshake packet containing a CONNECTION_CLOSE frame with | send a Handshake packet containing a CONNECTION_CLOSE frame with | |||
| error code SERVER_BUSY. | error code SERVER_BUSY. | |||
| If the packet is a 0-RTT packet, the server MAY buffer a limited | If the packet is a 0-RTT packet, the server MAY buffer a limited | |||
| number of these packets in anticipation of a late-arriving Initial | number of these packets in anticipation of a late-arriving Initial | |||
| Packet. Clients are forbidden from sending Handshake packets prior | Packet. Clients are forbidden from sending Handshake packets prior | |||
| to receiving a server response, so servers SHOULD ignore any such | to receiving a server response, so servers SHOULD ignore any such | |||
| packets. | packets. | |||
| Servers MUST drop incoming packets under all other circumstances. | Servers MUST drop incoming packets under all other circumstances. | |||
| They SHOULD send a Stateless Reset (Section 6.9.4) if a connection ID | They SHOULD send a Stateless Reset (Section 6.10.4) if a connection | |||
| is present in the header. | ID is present in the header. | |||
| 6.2. Version Negotiation | 6.2. Version Negotiation | |||
| Version negotiation ensures that client and server agree to a QUIC | Version negotiation ensures that client and server agree to a QUIC | |||
| version that is mutually supported. A server sends a Version | version that is mutually supported. A server sends a Version | |||
| Negotiation packet in response to each packet that might initiate a | Negotiation packet in response to each packet that might initiate a | |||
| new connection, see Section 6.1 for details. | new connection, see Section 6.1 for details. | |||
| The size of the first packet sent by a client will determine whether | The size of the first packet sent by a client will determine whether | |||
| a server sends a Version Negotiation packet. Clients that support | a server sends a Version Negotiation packet. Clients that support | |||
| skipping to change at page 28, line 10 ¶ | skipping to change at page 28, line 10 ¶ | |||
| The format of the transport parameters is the TransportParameters | The format of the transport parameters is the TransportParameters | |||
| struct from Figure 6. This is described using the presentation | struct from Figure 6. This is described using the presentation | |||
| language from Section 3 of [I-D.ietf-tls-tls13]. | language from Section 3 of [I-D.ietf-tls-tls13]. | |||
| uint32 QuicVersion; | uint32 QuicVersion; | |||
| enum { | enum { | |||
| initial_max_stream_data(0), | initial_max_stream_data(0), | |||
| initial_max_data(1), | initial_max_data(1), | |||
| initial_max_stream_id_bidi(2), | initial_max_bidi_streams(2), | |||
| idle_timeout(3), | idle_timeout(3), | |||
| preferred_address(4), | ||||
| max_packet_size(5), | max_packet_size(5), | |||
| stateless_reset_token(6), | stateless_reset_token(6), | |||
| ack_delay_exponent(7), | ack_delay_exponent(7), | |||
| initial_max_stream_id_uni(8), | initial_max_uni_streams(8), | |||
| (65535) | (65535) | |||
| } TransportParameterId; | } TransportParameterId; | |||
| struct { | struct { | |||
| TransportParameterId parameter; | TransportParameterId parameter; | |||
| opaque value<0..2^16-1>; | opaque value<0..2^16-1>; | |||
| } TransportParameter; | } TransportParameter; | |||
| struct { | struct { | |||
| select (Handshake.msg_type) { | select (Handshake.msg_type) { | |||
| case client_hello: | case client_hello: | |||
| QuicVersion initial_version; | QuicVersion initial_version; | |||
| case encrypted_extensions: | case encrypted_extensions: | |||
| QuicVersion negotiated_version; | QuicVersion negotiated_version; | |||
| QuicVersion supported_versions<4..2^8-4>; | QuicVersion supported_versions<4..2^8-4>; | |||
| }; | }; | |||
| TransportParameter parameters<22..2^16-1>; | TransportParameter parameters<22..2^16-1>; | |||
| } TransportParameters; | } TransportParameters; | |||
| struct { | ||||
| enum { IPv4(4), IPv6(6), (15) } ipVersion; | ||||
| opaque ipAddress<4..2^8-1>; | ||||
| uint16 port; | ||||
| opaque connectionId<0..18>; | ||||
| opaque statelessResetToken[16]; | ||||
| } PreferredAddress; | ||||
| Figure 6: Definition of TransportParameters | Figure 6: Definition of TransportParameters | |||
| The "extension_data" field of the quic_transport_parameters extension | The "extension_data" field of the quic_transport_parameters extension | |||
| defined in [QUIC-TLS] contains a TransportParameters value. TLS | defined in [QUIC-TLS] contains a TransportParameters value. TLS | |||
| encoding rules are therefore used to encode the transport parameters. | encoding rules are therefore used to encode the transport parameters. | |||
| QUIC encodes transport parameters into a sequence of octets, which | QUIC encodes transport parameters into a sequence of octets, which | |||
| are then included in the cryptographic handshake. Once the handshake | are then included in the cryptographic handshake. Once the handshake | |||
| completes, the transport parameters declared by the peer are | completes, the transport parameters declared by the peer are | |||
| available. Each endpoint validates the value provided by its peer. | available. Each endpoint validates the value provided by its peer. | |||
| skipping to change at page 29, line 32 ¶ | skipping to change at page 29, line 41 ¶ | |||
| unsigned 32-bit integer in units of octets. This is equivalent to | unsigned 32-bit integer in units of octets. This is equivalent to | |||
| sending a MAX_DATA (Section 7.6) for the connection immediately | sending a MAX_DATA (Section 7.6) for the connection immediately | |||
| after completing the handshake. | after completing the handshake. | |||
| idle_timeout (0x0003): The idle timeout is a value in seconds that | idle_timeout (0x0003): The idle timeout is a value in seconds that | |||
| is encoded as an unsigned 16-bit integer. The maximum value is | is encoded as an unsigned 16-bit integer. The maximum value is | |||
| 600 seconds (10 minutes). | 600 seconds (10 minutes). | |||
| An endpoint MAY use the following transport parameters: | An endpoint MAY use the following transport parameters: | |||
| initial_max_streams_bidi (0x0002): The initial maximum bidirectional | initial_max_bidi_streams (0x0002): The initial maximum bidirectional | |||
| streams parameter contains the initial maximum number of | streams parameter contains the initial maximum number of | |||
| application-owned bidirectional streams the peer may initiate, | application-owned bidirectional streams the peer may initiate, | |||
| encoded as an unsigned 16-bit integer. If this parameter is | encoded as an unsigned 16-bit integer. If this parameter is | |||
| absent or zero, application-owned bidirectional streams cannot be | absent or zero, application-owned bidirectional streams cannot be | |||
| created until a MAX_STREAM_ID frame is sent. Note that a value of | created until a MAX_STREAM_ID frame is sent. Note that a value of | |||
| 0 does not prevent the cryptographic handshake stream (that is, | 0 does not prevent the cryptographic handshake stream (that is, | |||
| stream 0) from being used. Setting this parameter is equivalent | stream 0) from being used. Setting this parameter is equivalent | |||
| to sending a MAX_STREAM_ID (Section 7.8) immediately after | to sending a MAX_STREAM_ID (Section 7.8) immediately after | |||
| completing the handshake containing the corresponding Stream ID. | completing the handshake containing the corresponding Stream ID. | |||
| For example, a value of 0x05 would be equivalent to receiving a | For example, a value of 0x05 would be equivalent to receiving a | |||
| MAX_STREAM_ID containing 20 when received by a client or 17 when | MAX_STREAM_ID containing 20 when received by a client or 17 when | |||
| received by a server. | received by a server. | |||
| initial_max_stream_id_uni (0x0008): The initial maximum | initial_max_uni_streams (0x0008): The initial maximum unidirectional | |||
| unidirectional streams parameter contains the initial maximum | streams parameter contains the initial maximum number of | |||
| number of application-owned unidirectional streams the peer may | application-owned unidirectional streams the peer may initiate, | |||
| initiate, encoded as an unsigned 16-bit integer. If this | encoded as an unsigned 16-bit integer. If this parameter is | |||
| parameter is absent or zero, unidirectional streams cannot be | absent or zero, unidirectional streams cannot be created until a | |||
| created until a MAX_STREAM_ID frame is sent. Setting this | MAX_STREAM_ID frame is sent. Setting this parameter is equivalent | |||
| parameter is equivalent to sending a MAX_STREAM_ID (Section 7.8) | to sending a MAX_STREAM_ID (Section 7.8) immediately after | |||
| immediately after completing the handshake containing the | completing the handshake containing the corresponding Stream ID. | |||
| corresponding Stream ID. For example, a value of 0x05 would be | For example, a value of 0x05 would be equivalent to receiving a | |||
| equivalent to receiving a MAX_STREAM_ID containing 18 when | MAX_STREAM_ID containing 18 when received by a client or 19 when | |||
| received by a client or 19 when received by a server. | received by a server. | |||
| max_packet_size (0x0005): The maximum packet size parameter places a | max_packet_size (0x0005): The maximum packet size parameter places a | |||
| limit on the size of packets that the endpoint is willing to | limit on the size of packets that the endpoint is willing to | |||
| receive, encoded as an unsigned 16-bit integer. This indicates | receive, encoded as an unsigned 16-bit integer. This indicates | |||
| that packets larger than this limit will be dropped. The default | that packets larger than this limit will be dropped. The default | |||
| for this parameter is the maximum permitted UDP payload of 65527. | for this parameter is the maximum permitted UDP payload of 65527. | |||
| Values below 1200 are invalid. This limit only applies to | Values below 1200 are invalid. This limit only applies to | |||
| protected packets (Section 4.5). | protected packets (Section 4.5). | |||
| ack_delay_exponent (0x0007): An 8-bit unsigned integer value | ack_delay_exponent (0x0007): An 8-bit unsigned integer value | |||
| indicating an exponent used to decode the ACK Delay field in the | indicating an exponent used to decode the ACK Delay field in the | |||
| ACK frame, see Section 7.15. If this value is absent, a default | ACK frame, see Section 7.15. If this value is absent, a default | |||
| value of 3 is assumed (indicating a multiplier of 8). The default | value of 3 is assumed (indicating a multiplier of 8). The default | |||
| value is also used for ACK frames that are sent in Initial, | value is also used for ACK frames that are sent in Initial, | |||
| Handshake, and Retry packets. Values above 20 are invalid. | Handshake, and Retry packets. Values above 20 are invalid. | |||
| A server MAY include the following transport parameters: | A server MAY include the following transport parameters: | |||
| stateless_reset_token (0x0006): The Stateless Reset Token is used in | stateless_reset_token (0x0006): The Stateless Reset Token is used in | |||
| verifying a stateless reset, see Section 6.9.4. This parameter is | verifying a stateless reset, see Section 6.10.4. This parameter | |||
| a sequence of 16 octets. | is a sequence of 16 octets. | |||
| A client MUST NOT include a stateless reset token. A server MUST | preferred_address (0x0004): The server's Preferred Address is used | |||
| treat receipt of a stateless_reset_token transport parameter as a | to effect a change in server address at the end of the handshake, | |||
| connection error of type TRANSPORT_PARAMETER_ERROR. | as described in Section 6.9. | |||
| A client MUST NOT include a stateless reset token or a preferred | ||||
| address. A server MUST treat receipt of either transport parameter | ||||
| as a connection error of type TRANSPORT_PARAMETER_ERROR. | ||||
| 6.4.2. Values of Transport Parameters for 0-RTT | 6.4.2. Values of Transport Parameters for 0-RTT | |||
| A client that attempts to send 0-RTT data MUST remember the transport | A client that attempts to send 0-RTT data MUST remember the transport | |||
| parameters used by the server. The transport parameters that the | parameters used by the server. The transport parameters that the | |||
| server advertises during connection establishment apply to all | server advertises during connection establishment apply to all | |||
| connections that are resumed using the keying material established | connections that are resumed using the keying material established | |||
| during that handshake. Remembered transport parameters apply to the | during that handshake. Remembered transport parameters apply to the | |||
| new connection until the handshake completes and new transport | new connection until the handshake completes and new transport | |||
| parameters from the server can be provided. | parameters from the server can be provided. | |||
| skipping to change at page 31, line 9 ¶ | skipping to change at page 31, line 27 ¶ | |||
| recover the information when accepting 0-RTT data. A server uses the | recover the information when accepting 0-RTT data. A server uses the | |||
| transport parameters in determining whether to accept 0-RTT data. | transport parameters in determining whether to accept 0-RTT data. | |||
| A server MAY accept 0-RTT and subsequently provide different values | A server MAY accept 0-RTT and subsequently provide different values | |||
| for transport parameters for use in the new connection. If 0-RTT | for transport parameters for use in the new connection. If 0-RTT | |||
| data is accepted by the server, the server MUST NOT reduce any limits | data is accepted by the server, the server MUST NOT reduce any limits | |||
| or alter any values that might be violated by the client with its | or alter any values that might be violated by the client with its | |||
| 0-RTT data. In particular, a server that accepts 0-RTT data MUST NOT | 0-RTT data. In particular, a server that accepts 0-RTT data MUST NOT | |||
| set values for initial_max_data or initial_max_stream_data that are | set values for initial_max_data or initial_max_stream_data that are | |||
| smaller than the remembered value of those parameters. Similarly, a | smaller than the remembered value of those parameters. Similarly, a | |||
| server MUST NOT reduce the value of initial_max_stream_id_bidi or | server MUST NOT reduce the value of initial_max_bidi_streams or | |||
| initial_max_stream_id_uni. | initial_max_uni_streams. | |||
| Omitting or setting a zero value for certain transport parameters can | Omitting or setting a zero value for certain transport parameters can | |||
| result in 0-RTT data being enabled, but not usable. The following | result in 0-RTT data being enabled, but not usable. The following | |||
| transport parameters SHOULD be set to non-zero values for 0-RTT: | transport parameters SHOULD be set to non-zero values for 0-RTT: | |||
| initial_max_stream_id_bidi, initial_max_stream_id_uni, | initial_max_bidi_streams, initial_max_uni_streams, initial_max_data, | |||
| initial_max_data, initial_max_stream_data. | initial_max_stream_data. | |||
| The value of the server's previous preferred_address MUST NOT be used | ||||
| when establishing a new connection; rather, the client should wait to | ||||
| observe the server's new preferred_address value in the handshake. | ||||
| A server MUST reject 0-RTT data or even abort a handshake if the | A server MUST reject 0-RTT data or even abort a handshake if the | |||
| implied values for transport parameters cannot be supported. | implied values for transport parameters cannot be supported. | |||
| 6.4.3. New Transport Parameters | 6.4.3. New Transport Parameters | |||
| New transport parameters can be used to negotiate new protocol | New transport parameters can be used to negotiate new protocol | |||
| behavior. An endpoint MUST ignore transport parameters that it does | behavior. An endpoint MUST ignore transport parameters that it does | |||
| not support. Absence of a transport parameter therefore disables any | not support. Absence of a transport parameter therefore disables any | |||
| optional protocol feature that is negotiated using the parameter. | optional protocol feature that is negotiated using the parameter. | |||
| skipping to change at page 33, line 12 ¶ | skipping to change at page 33, line 33 ¶ | |||
| format of the version fields in transport parameters MUST either be | format of the version fields in transport parameters MUST either be | |||
| identical across different QUIC versions, or be unambiguously | identical across different QUIC versions, or be unambiguously | |||
| different to ensure no confusion about their interpretation. One way | different to ensure no confusion about their interpretation. One way | |||
| that a new format could be introduced is to define a TLS extension | that a new format could be introduced is to define a TLS extension | |||
| with a different codepoint. | with a different codepoint. | |||
| 6.5. Stateless Retries | 6.5. Stateless Retries | |||
| A server can process an initial cryptographic handshake messages from | A server can process an initial cryptographic handshake messages from | |||
| a client without committing any state. This allows a server to | a client without committing any state. This allows a server to | |||
| perform address validation (Section 6.6, or to defer connection | perform address validation (Section 6.6), or to defer connection | |||
| establishment costs. | establishment costs. | |||
| A server that generates a response to an initial packet without | A server that generates a response to an initial packet without | |||
| retaining connection state MUST use the Retry packet (Section 4.4.2). | retaining connection state MUST use the Retry packet (Section 4.4.2). | |||
| This packet causes a client to reset its transport state and to | This packet causes a client to reset its transport state and to | |||
| continue the connection attempt with new connection state while | continue the connection attempt with new connection state while | |||
| maintaining the state of the cryptographic handshake. | maintaining the state of the cryptographic handshake. | |||
| A server MUST NOT send multiple Retry packets in response to a client | A server MUST NOT send multiple Retry packets in response to a client | |||
| handshake packet. Thus, any cryptographic handshake message that is | handshake packet. Thus, any cryptographic handshake message that is | |||
| skipping to change at page 36, line 18 ¶ | skipping to change at page 36, line 45 ¶ | |||
| PROTOCOL_VIOLATION error code. | PROTOCOL_VIOLATION error code. | |||
| 6.7. Path Validation | 6.7. Path Validation | |||
| Path validation is used by an endpoint to verify reachability of a | Path validation is used by an endpoint to verify reachability of a | |||
| peer over a specific path. That is, it tests reachability between a | peer over a specific path. That is, it tests reachability between a | |||
| specific local address and a specific peer address, where an address | specific local address and a specific peer address, where an address | |||
| is the two-tuple of IP address and port. Path validation tests that | is the two-tuple of IP address and port. Path validation tests that | |||
| packets can be both sent to and received from a peer. | packets can be both sent to and received from a peer. | |||
| Path validation is used during connection migration (see Section 6.8) | Path validation is used during connection migration (see Section 6.8 | |||
| by the migrating endpoint to verify reachability of a peer from a new | and Section 6.9) by the migrating endpoint to verify reachability of | |||
| local address. Path validation is also used by the peer to verify | a peer from a new local address. Path validation is also used by the | |||
| that the migrating endpoint is able to receive packets sent to its | peer to verify that the migrating endpoint is able to receive packets | |||
| new address. That is, that the packets received from the migrating | sent to the its new address. That is, that the packets received from | |||
| endpoint do not carry a spoofed source address. | the migrating endpoint do not carry a spoofed source address. | |||
| Path validation can be used at any time by either endpoint. For | Path validation can be used at any time by either endpoint. For | |||
| instance, an endpoint might check that a peer is still in possession | instance, an endpoint might check that a peer is still in possession | |||
| of its address after a period of quiescence. | of its address after a period of quiescence. | |||
| Path validation is not designed as a NAT traversal mechanism. Though | Path validation is not designed as a NAT traversal mechanism. Though | |||
| the mechanism described here might be effective for the creation of | the mechanism described here might be effective for the creation of | |||
| NAT bindings that support NAT traversal, the expectation is that one | NAT bindings that support NAT traversal, the expectation is that one | |||
| or other peer is able to receive packets without first having sent a | or other peer is able to receive packets without first having sent a | |||
| packet on that path. Effective NAT traversal needs additional | packet on that path. Effective NAT traversal needs additional | |||
| skipping to change at page 38, line 38 ¶ | skipping to change at page 39, line 16 ¶ | |||
| QUIC allows connections to survive changes to endpoint addresses | QUIC allows connections to survive changes to endpoint addresses | |||
| (that is, IP address and/or port), such as those caused by a endpoint | (that is, IP address and/or port), such as those caused by a endpoint | |||
| migrating to a new network. This section describes the process by | migrating to a new network. This section describes the process by | |||
| which an endpoint migrates to a new address. | which an endpoint migrates to a new address. | |||
| An endpoint MUST NOT initiate connection migration before the | An endpoint MUST NOT initiate connection migration before the | |||
| handshake is finished and the endpoint has 1-RTT keys. | handshake is finished and the endpoint has 1-RTT keys. | |||
| This document limits migration of connections to new client | This document limits migration of connections to new client | |||
| addresses. Clients are responsible for initiating all migrations. | addresses, except as described in Section 6.9. Clients are | |||
| Servers do not send non-probing packets (see Section 6.8.1) toward a | responsible for initiating all migrations. Servers do not send non- | |||
| client address until it sees a non-probing packet from that address. | probing packets (see Section 6.8.1) toward a client address until it | |||
| If a client receives packets from an unknown server address, the | sees a non-probing packet from that address. If a client receives | |||
| client MAY discard these packets. Migrating a connection to a new | packets from an unknown server address, the client MAY discard these | |||
| server address is left for future work. | packets. | |||
| 6.8.1. Probing a New Path | 6.8.1. Probing a New Path | |||
| An endpoint MAY probe for peer reachability from a new local address | An endpoint MAY probe for peer reachability from a new local address | |||
| using path validation Section 6.7 prior to migrating the connection | using path validation Section 6.7 prior to migrating the connection | |||
| to the new local address. Failure of path validation simply means | to the new local address. Failure of path validation simply means | |||
| that the new path is not usable for this connection. Failure to | that the new path is not usable for this connection. Failure to | |||
| validate a path does not cause the connection to end unless there are | validate a path does not cause the connection to end unless there are | |||
| no valid alternative paths available. | no valid alternative paths available. | |||
| skipping to change at page 42, line 17 ¶ | skipping to change at page 42, line 47 ¶ | |||
| a PATH_CHALLENGE is sent, which is disarmed when the corresponding | a PATH_CHALLENGE is sent, which is disarmed when the corresponding | |||
| PATH_RESPONSE is received. If the alarm fires before the | PATH_RESPONSE is received. If the alarm fires before the | |||
| PATH_RESPONSE is received, the endpoint might send a new | PATH_RESPONSE is received, the endpoint might send a new | |||
| PATH_CHALLENGE, and restart the alarm for a longer period of time. | PATH_CHALLENGE, and restart the alarm for a longer period of time. | |||
| 6.8.5. Privacy Implications of Connection Migration | 6.8.5. Privacy Implications of Connection Migration | |||
| Using a stable connection ID on multiple network paths allows a | Using a stable connection ID on multiple network paths allows a | |||
| passive observer to correlate activity between those paths. An | passive observer to correlate activity between those paths. An | |||
| endpoint that moves between networks might not wish to have their | endpoint that moves between networks might not wish to have their | |||
| activity correlated by any entity other than a server. The | activity correlated by any entity other than their peer. The | |||
| NEW_CONNECTION_ID message can be sent by both endpoints to provide an | NEW_CONNECTION_ID message can be sent to provide an unlinkable | |||
| unlinkable connection ID for use in case a peer wishes to explicitly | connection ID for use in case a peer wishes to explicitly break | |||
| break linkability between two points of network attachment. | linkability between two points of network attachment. | |||
| An endpoint might need to send packets on multiple networks without | ||||
| receiving any response from its peer. To ensure that the endpoint is | ||||
| not linkable across each of these changes, a new connection ID and | ||||
| packet number gap are needed for each network. To support this, each | ||||
| endpoint sends multiple NEW_CONNECTION_ID messages. Each | ||||
| NEW_CONNECTION_ID is marked with a sequence number. Connection IDs | ||||
| MUST be used in the order in which they are numbered. | ||||
| An endpoint that does not require the use of a connection ID should | An endpoint that does not require the use of a connection ID should | |||
| not request that its peer use a connection ID. Such an endpoint does | not request that its peer use a connection ID. Such an endpoint does | |||
| not need to provide new connection IDs using the NEW_CONNECTION_ID | not need to provide new connection IDs using the NEW_CONNECTION_ID | |||
| frame. | frame. | |||
| An endpoint which wishes to break linkability upon changing networks | An endpoint might need to send packets on multiple networks without | |||
| MUST use the connection ID provided by its peer as well as | receiving any response from its peer. To ensure that the endpoint is | |||
| incrementing the packet sequence number by an externally | not linkable across each of these changes, a new connection ID is | |||
| unpredictable value computed as described in Section 6.8.5.1. Packet | needed for each network. To support this, multiple NEW_CONNECTION_ID | |||
| number gaps are cumulative. An endpoint might skip connection IDs, | messages are needed. Each NEW_CONNECTION_ID is marked with a | |||
| but it MUST ensure that it applies the associated packet number gaps | sequence number. Connection IDs MUST be used in the order in which | |||
| for connection IDs that it skips in addition to the packet number gap | they are numbered. | |||
| associated with the connection ID that it does use. | ||||
| An endpoint that receives a packet that is marked with a new | An endpoint that to break linkability upon changing networks MUST use | |||
| connection ID recovers the packet number by adding the cumulative | a previously unused connection ID provided by its peer. Protection | |||
| packet number gap to its expected packet number. An endpoint MUST | of packet numbers ensures that packet numbers cannot be used to | |||
| discard packets that contain a smaller gap than it advertised. | correlate connections. Other properties of packets, such as timing | |||
| and size, might be used to correlate activity, but no explicit | ||||
| correlation can be used to link activity across paths. | ||||
| Clients MAY change connection ID at any time based on implementation- | Clients MAY change connection ID at any time based on implementation- | |||
| specific concerns. For example, after a period of network inactivity | specific concerns. For example, after a period of network inactivity | |||
| NAT rebinding might occur when the client begins sending data again. | NAT rebinding might occur when the client begins sending data again. | |||
| A client might wish to reduce linkability by employing a new | A client might wish to reduce linkability by employing a new | |||
| connection ID and source UDP port when sending traffic after a period | connection ID and source UDP port when sending traffic after a period | |||
| of inactivity. Changing the UDP port from which it sends packets at | of inactivity. Changing the UDP port from which it sends packets at | |||
| the same time might cause the packet to appear as a connection | the same time might cause the packet to appear as a connection | |||
| migration. This ensures that the mechanisms that support migration | migration. This ensures that the mechanisms that support migration | |||
| skipping to change at page 43, line 25 ¶ | skipping to change at page 44, line 5 ¶ | |||
| An endpoint that receives a successfully authenticated packet with a | An endpoint that receives a successfully authenticated packet with a | |||
| previously unused connection ID MUST use the next available | previously unused connection ID MUST use the next available | |||
| connection ID for any packets it sends to that address. To avoid | connection ID for any packets it sends to that address. To avoid | |||
| changing connection IDs multiple times when packets arrive out of | changing connection IDs multiple times when packets arrive out of | |||
| order, endpoints MUST change only in response to a packet that | order, endpoints MUST change only in response to a packet that | |||
| increases the largest received packet number. Failing to do this | increases the largest received packet number. Failing to do this | |||
| could allow for use of that connection ID to link activity on new | could allow for use of that connection ID to link activity on new | |||
| paths. There is no need to move to a new connection ID if the | paths. There is no need to move to a new connection ID if the | |||
| address of a peer changes without also changing the connection ID. | address of a peer changes without also changing the connection ID. | |||
| For instance, a server might provide a packet number gap of 7 | 6.9. Server's Preferred Address | |||
| associated with a new connection ID. If the server received packet | ||||
| 10 using the previous connection ID, it should expect packets on the | ||||
| new connection ID to start at 18. A packet with the new connection | ||||
| ID and a packet number of 17 is discarded as being in error. | ||||
| 6.8.5.1. Packet Number Gap | QUIC allows servers to accept connections on one IP address and | |||
| attempt to transfer these connections to a more preferred address | ||||
| shortly after the handshake. This is particularly useful when | ||||
| clients initially connect to an address shared by multiple servers | ||||
| but would prefer to use a unicast address to ensure connection | ||||
| stability. This section describes the protocol for migrating a | ||||
| connection to a preferred server address. | ||||
| In order to avoid linkage, the packet number gap MUST be externally | Migrating a connection to a new server address mid-connection is left | |||
| indistinguishable from random. The packet number gap for a | for future work. If a client receives packets from a new server | |||
| connection ID with sequence number is computed by encoding the | address not indicated by the preferred_address transport parameter, | |||
| sequence number as a 32-bit integer in big-endian format, and then | the client SHOULD discard these packets. | |||
| computing: | ||||
| Gap = HKDF-Expand-Label(packet_number_secret, | 6.9.1. Communicating A Preferred Address | |||
| "QUIC packet sequence gap", sequence, 4) | ||||
| The output of HKDF-Expand-Label is interpreted as a big-endian | A server conveys a preferred address by including the | |||
| number. "packet_number_secret" is derived from the TLS key exchange, | preferred_address transport parameter in the TLS handshake. | |||
| as described in Section 5.6 of [QUIC-TLS]. | ||||
| 6.9. Connection Termination | Once the handshake is finished, the client SHOULD initiate path | |||
| validation (see Section 6.7) of the server's preferred address using | ||||
| the connection ID provided in the preferred_address transport | ||||
| parameter. | ||||
| If path validation succeeds, the client SHOULD immediately begin | ||||
| sending all future packets to the new server address using the new | ||||
| connection ID and discontinue use of the old server address. If path | ||||
| validation fails, the client MUST continue sending all future packets | ||||
| to the server's original IP address. | ||||
| 6.9.2. Responding to Connection Migration | ||||
| A server might receive a packet addressed to its preferred IP address | ||||
| at any time after the handshake is completed. If this packet | ||||
| contains a PATH_CHALLENGE frame, the server sends a PATH_RESPONSE | ||||
| frame as per Section 6.7, but the server MUST continue sending all | ||||
| other packets from its original IP address. | ||||
| The server SHOULD also initiate path validation of the client using | ||||
| its preferred address and the address from which it received the | ||||
| client probe. This helps to guard against spurious migration | ||||
| initiated by an attacker. | ||||
| Once the server has completed its path validation and has received a | ||||
| non-probing packet with a new largest packet number on its preferred | ||||
| address, the server begins sending to the client exclusively from its | ||||
| preferred IP address. It SHOULD drop packets for this connection | ||||
| received on the old IP address, but MAY continue to process delayed | ||||
| packets. | ||||
| 6.9.3. Interaction of Client Migration and Preferred Address | ||||
| A client might need to perform a connection migration before it has | ||||
| migrated to the server's preferred address. In this case, the client | ||||
| SHOULD perform path validation to both the original and preferred | ||||
| server address from the client's new address concurrently. | ||||
| If path validation of the server's preferred address succeeds, the | ||||
| client MUST abandon validation of the original address and migrate to | ||||
| using the server's preferred address. If path validation of the | ||||
| server's preferred address fails, but validation of the server's | ||||
| original address succeeds, the client MAY migrate to using the | ||||
| original address from the client's new address. | ||||
| If the connection to the server's preferred address is not from the | ||||
| same client address, the server MUST protect against potential | ||||
| attacks as described in Section 6.8.3.1 and Section 6.8.3.2. In | ||||
| addition to intentional simultaneous migration, this might also occur | ||||
| because the client's access network used a different NAT binding for | ||||
| the server's preferred address. | ||||
| Servers SHOULD initiate path validation to the client's new address | ||||
| upon receiving a probe packet from a different address. Servers MUST | ||||
| NOT send more than a minimum congestion window's worth of non-probing | ||||
| packets to the new address before path validation is complete. | ||||
| 6.10. Connection Termination | ||||
| Connections should remain open until they become idle for a pre- | Connections should remain open until they become idle for a pre- | |||
| negotiated period of time. A QUIC connection, once established, can | negotiated period of time. A QUIC connection, once established, can | |||
| be terminated in one of three ways: | be terminated in one of three ways: | |||
| o idle timeout (Section 6.9.2) | o idle timeout (Section 6.10.2) | |||
| o immediate close (Section 6.9.3) | ||||
| o stateless reset (Section 6.9.4) | o immediate close (Section 6.10.3) | |||
| 6.9.1. Closing and Draining Connection States | o stateless reset (Section 6.10.4) | |||
| 6.10.1. Closing and Draining Connection States | ||||
| The closing and draining connection states exist to ensure that | The closing and draining connection states exist to ensure that | |||
| connections close cleanly and that delayed or reordered packets are | connections close cleanly and that delayed or reordered packets are | |||
| properly discarded. These states SHOULD persist for three times the | properly discarded. These states SHOULD persist for three times the | |||
| current Retransmission Timeout (RTO) interval as defined in | current Retransmission Timeout (RTO) interval as defined in | |||
| [QUIC-RECOVERY]. | [QUIC-RECOVERY]. | |||
| An endpoint enters a closing period after initiating an immediate | An endpoint enters a closing period after initiating an immediate | |||
| close (Section 6.9.3). While closing, an endpoint MUST NOT send | close (Section 6.10.3). While closing, an endpoint MUST NOT send | |||
| packets unless they contain a CONNECTION_CLOSE or APPLICATION_CLOSE | packets unless they contain a CONNECTION_CLOSE or APPLICATION_CLOSE | |||
| frame (see Section 6.9.3 for details). | frame (see Section 6.10.3 for details). | |||
| In the closing state, only a packet containing a closing frame can be | In the closing state, only a packet containing a closing frame can be | |||
| sent. An endpoint retains only enough information to generate a | sent. An endpoint retains only enough information to generate a | |||
| packet containing a closing frame and to identify packets as | packet containing a closing frame and to identify packets as | |||
| belonging to the connection. The connection ID and QUIC version is | belonging to the connection. The connection ID and QUIC version is | |||
| sufficient information to identify packets for a closing connection; | sufficient information to identify packets for a closing connection; | |||
| an endpoint can discard all other connection state. An endpoint MAY | an endpoint can discard all other connection state. An endpoint MAY | |||
| retain packet protection keys for incoming packets to allow it to | retain packet protection keys for incoming packets to allow it to | |||
| read and process a closing frame. | read and process a closing frame. | |||
| skipping to change at page 45, line 11 ¶ | skipping to change at page 46, line 47 ¶ | |||
| an abbreviated draining period which can allow for faster resource | an abbreviated draining period which can allow for faster resource | |||
| recovery. Servers that retain an open socket for accepting new | recovery. Servers that retain an open socket for accepting new | |||
| connections SHOULD NOT exit the closing or draining period early. | connections SHOULD NOT exit the closing or draining period early. | |||
| Once the closing or draining period has ended, an endpoint SHOULD | Once the closing or draining period has ended, an endpoint SHOULD | |||
| discard all connection state. This results in new packets on the | discard all connection state. This results in new packets on the | |||
| connection being handled generically. For instance, an endpoint MAY | connection being handled generically. For instance, an endpoint MAY | |||
| send a stateless reset in response to any further incoming packets. | send a stateless reset in response to any further incoming packets. | |||
| The draining and closing periods do not apply when a stateless reset | The draining and closing periods do not apply when a stateless reset | |||
| (Section 6.9.4) is sent. | (Section 6.10.4) is sent. | |||
| An endpoint is not expected to handle key updates when it is closing | An endpoint is not expected to handle key updates when it is closing | |||
| or draining. A key update might prevent the endpoint from moving | or draining. A key update might prevent the endpoint from moving | |||
| from the closing state to draining, but it otherwise has no impact. | from the closing state to draining, but it otherwise has no impact. | |||
| An endpoint could receive packets from a new source address, | An endpoint could receive packets from a new source address, | |||
| indicating a client connection migration (Section 6.8), while in the | indicating a client connection migration (Section 6.8), while in the | |||
| closing period. An endpoint in the closing state MUST strictly limit | closing period. An endpoint in the closing state MUST strictly limit | |||
| the number of packets it sends to this new address until the address | the number of packets it sends to this new address until the address | |||
| is validated (see Section 6.7). A server in the closing state MAY | is validated (see Section 6.7). A server in the closing state MAY | |||
| instead choose to discard packets received from a new source address. | instead choose to discard packets received from a new source address. | |||
| 6.9.2. Idle Timeout | 6.10.2. Idle Timeout | |||
| A connection that remains idle for longer than the idle timeout (see | A connection that remains idle for longer than the idle timeout (see | |||
| Section 6.4.1) is closed. A connection enters the draining state | Section 6.4.1) is closed. A connection enters the draining state | |||
| when the idle timeout expires. | when the idle timeout expires. | |||
| The time at which an idle timeout takes effect won't be perfectly | The time at which an idle timeout takes effect won't be perfectly | |||
| synchronized on both endpoints. An endpoint that sends packets near | synchronized on both endpoints. An endpoint that sends packets near | |||
| the end of an idle period could have those packets discarded if its | the end of an idle period could have those packets discarded if its | |||
| peer enters the draining state before the packet is received. | peer enters the draining state before the packet is received. | |||
| 6.9.3. Immediate Close | 6.10.3. Immediate Close | |||
| An endpoint sends a closing frame, either CONNECTION_CLOSE or | An endpoint sends a closing frame, either CONNECTION_CLOSE or | |||
| APPLICATION_CLOSE, to terminate the connection immediately. Either | APPLICATION_CLOSE, to terminate the connection immediately. Either | |||
| closing frame causes all streams to immediately become closed; open | closing frame causes all streams to immediately become closed; open | |||
| streams can be assumed to be implicitly reset. | streams can be assumed to be implicitly reset. | |||
| After sending a closing frame, endpoints immediately enter the | After sending a closing frame, endpoints immediately enter the | |||
| closing state. During the closing period, an endpoint that sends a | closing state. During the closing period, an endpoint that sends a | |||
| closing frame SHOULD respond to any packet that it receives with | closing frame SHOULD respond to any packet that it receives with | |||
| another packet containing a closing frame. To minimize the state | another packet containing a closing frame. To minimize the state | |||
| skipping to change at page 46, line 29 ¶ | skipping to change at page 48, line 16 ¶ | |||
| An immediate close can be used after an application protocol has | An immediate close can be used after an application protocol has | |||
| arranged to close a connection. This might be after the application | arranged to close a connection. This might be after the application | |||
| protocols negotiates a graceful shutdown. The application protocol | protocols negotiates a graceful shutdown. The application protocol | |||
| exchanges whatever messages that are needed to cause both endpoints | exchanges whatever messages that are needed to cause both endpoints | |||
| to agree to close the connection, after which the application | to agree to close the connection, after which the application | |||
| requests that the connection be closed. The application protocol can | requests that the connection be closed. The application protocol can | |||
| use an APPLICATION_CLOSE message with an appropriate error code to | use an APPLICATION_CLOSE message with an appropriate error code to | |||
| signal closure. | signal closure. | |||
| 6.9.4. Stateless Reset | 6.10.4. Stateless Reset | |||
| A stateless reset is provided as an option of last resort for a | A stateless reset is provided as an option of last resort for a | |||
| server that does not have access to the state of a connection. A | server that does not have access to the state of a connection. A | |||
| server crash or outage might result in clients continuing to send | server crash or outage might result in clients continuing to send | |||
| data to a server that is unable to properly continue the connection. | data to a server that is unable to properly continue the connection. | |||
| A server that wishes to communicate a fatal connection error MUST use | A server that wishes to communicate a fatal connection error MUST use | |||
| a closing frame if it has sufficient state to do so. | a closing frame if it has sufficient state to do so. | |||
| To support this process, the server sends a stateless_reset_token | To support this process, the server sends a stateless_reset_token | |||
| value during the handshake in the transport parameters. This value | value during the handshake in the transport parameters. This value | |||
| skipping to change at page 47, line 48 ¶ | skipping to change at page 49, line 27 ¶ | |||
| and recovered. In this case, clients will need to rely on other | and recovered. In this case, clients will need to rely on other | |||
| methods - such as timers - to detect that the connection has | methods - such as timers - to detect that the connection has | |||
| failed. | failed. | |||
| o The randomly generated connection ID can be used by entities other | o The randomly generated connection ID can be used by entities other | |||
| than the client to identify this as a potential stateless reset. | than the client to identify this as a potential stateless reset. | |||
| A server that occasionally uses different connection IDs might | A server that occasionally uses different connection IDs might | |||
| introduce some uncertainty about this. | introduce some uncertainty about this. | |||
| The Packet Number field is set to a randomized value. The server | The Packet Number field is set to a randomized value. The server | |||
| SHOULD send a packet with a short header and a type of 0x1F. This | SHOULD send a packet with a short header and a packet number length | |||
| produces the shortest possible packet number encoding, which | of 1 octet. Using the shortest possible packet number encoding | |||
| minimizes the perceived gap between the last packet that the server | minimizes the perceived gap between the last packet that the server | |||
| sent and this packet. A server MAY use a different short header | sent and this packet. A server MAY indicate a different packet | |||
| type, indicating a different packet number length, but a longer | number length, but a longer packet number encoding might allow this | |||
| packet number encoding might allow this message to be identified as a | message to be identified as a stateless reset more easily using | |||
| stateless reset more easily using heuristics. | heuristics. | |||
| After the Packet Number, the server pads the message with an | After the Packet Number, the server pads the message with an | |||
| arbitrary number of octets containing random values. | arbitrary number of octets containing random values. | |||
| Finally, the last 16 octets of the packet are set to the value of the | Finally, the last 16 octets of the packet are set to the value of the | |||
| Stateless Reset Token. | Stateless Reset Token. | |||
| A stateless reset is not appropriate for signaling error conditions. | A stateless reset is not appropriate for signaling error conditions. | |||
| An endpoint that wishes to communicate a fatal connection error MUST | An endpoint that wishes to communicate a fatal connection error MUST | |||
| use a CONNECTION_CLOSE or APPLICATION_CLOSE frame if it has | use a CONNECTION_CLOSE or APPLICATION_CLOSE frame if it has | |||
| sufficient state to do so. | sufficient state to do so. | |||
| This stateless reset design is specific to QUIC version 1. A server | This stateless reset design is specific to QUIC version 1. A server | |||
| that supports multiple versions of QUIC needs to generate a stateless | that supports multiple versions of QUIC needs to generate a stateless | |||
| reset that will be accepted by clients that support any version that | reset that will be accepted by clients that support any version that | |||
| the server might support (or might have supported prior to losing | the server might support (or might have supported prior to losing | |||
| state). Designers of new versions of QUIC need to be aware of this | state). Designers of new versions of QUIC need to be aware of this | |||
| and either reuse this design, or use a portion of the packet other | and either reuse this design, or use a portion of the packet other | |||
| than the last 16 octets for carrying data. | than the last 16 octets for carrying data. | |||
| 6.9.4.1. Detecting a Stateless Reset | 6.10.4.1. Detecting a Stateless Reset | |||
| A client detects a potential stateless reset when a packet with a | A client detects a potential stateless reset when a packet with a | |||
| short header either cannot be decrypted or is marked as a duplicate | short header either cannot be decrypted or is marked as a duplicate | |||
| packet. The client then compares the last 16 octets of the packet | packet. The client then compares the last 16 octets of the packet | |||
| with the Stateless Reset Token provided by the server in its | with the Stateless Reset Token provided by the server in its | |||
| transport parameters. If these values are identical, the client MUST | transport parameters. If these values are identical, the client MUST | |||
| enter the draining period and not send any further packets on this | enter the draining period and not send any further packets on this | |||
| connection. If the comparison fails, the packet can be discarded. | connection. If the comparison fails, the packet can be discarded. | |||
| 6.9.4.2. Calculating a Stateless Reset Token | 6.10.4.2. Calculating a Stateless Reset Token | |||
| The stateless reset token MUST be difficult to guess. In order to | The stateless reset token MUST be difficult to guess. In order to | |||
| create a Stateless Reset Token, a server could randomly generate | create a Stateless Reset Token, a server could randomly generate | |||
| [RFC4086] a secret for every connection that it creates. However, | [RFC4086] a secret for every connection that it creates. However, | |||
| this presents a coordination problem when there are multiple servers | this presents a coordination problem when there are multiple servers | |||
| in a cluster or a storage problem for a server that might lose state. | in a cluster or a storage problem for a server that might lose state. | |||
| Stateless reset specifically exists to handle the case where state is | Stateless reset specifically exists to handle the case where state is | |||
| lost, so this approach is suboptimal. | lost, so this approach is suboptimal. | |||
| A single static key can be used across all connections to the same | A single static key can be used across all connections to the same | |||
| skipping to change at page 49, line 38 ¶ | skipping to change at page 51, line 19 ¶ | |||
| protection. | protection. | |||
| 7. Frame Types and Formats | 7. Frame Types and Formats | |||
| As described in Section 5, packets contain one or more frames. This | As described in Section 5, packets contain one or more frames. This | |||
| section describes the format and semantics of the core QUIC frame | section describes the format and semantics of the core QUIC frame | |||
| types. | types. | |||
| 7.1. Variable-Length Integer Encoding | 7.1. Variable-Length Integer Encoding | |||
| QUIC frames use a common variable-length encoding for all non- | QUIC frames commonly use a variable-length encoding for non-negative | |||
| negative integer values. This encoding ensures that smaller integer | integer values. This encoding ensures that smaller integer values | |||
| values need fewer octets to encode. | need fewer octets to encode. | |||
| The QUIC variable-length integer encoding reserves the two most | The QUIC variable-length integer encoding reserves the two most | |||
| significant bits of the first octet to encode the base 2 logarithm of | significant bits of the first octet to encode the base 2 logarithm of | |||
| the integer encoding length in octets. The integer value is encoded | the integer encoding length in octets. The integer value is encoded | |||
| on the remaining bits, in network byte order. | on the remaining bits, in network byte order. | |||
| This means that integers are encoded on 1, 2, 4, or 8 octets and can | This means that integers are encoded on 1, 2, 4, or 8 octets and can | |||
| encode 6, 14, 30, or 62 bit values respectively. Table 4 summarizes | encode 6, 14, 30, or 62 bit values respectively. Table 4 summarizes | |||
| the encoding properties. | the encoding properties. | |||
| skipping to change at page 55, line 16 ¶ | skipping to change at page 56, line 43 ¶ | |||
| application or application protocol wishes to prevent the connection | application or application protocol wishes to prevent the connection | |||
| from timing out. An application protocol SHOULD provide guidance | from timing out. An application protocol SHOULD provide guidance | |||
| about the conditions under which generating a PING is recommended. | about the conditions under which generating a PING is recommended. | |||
| This guidance SHOULD indicate whether it is the client or the server | This guidance SHOULD indicate whether it is the client or the server | |||
| that is expected to send the PING. Having both endpoints send PING | that is expected to send the PING. Having both endpoints send PING | |||
| frames without coordination can produce an excessive number of | frames without coordination can produce an excessive number of | |||
| packets and poor performance. | packets and poor performance. | |||
| A connection will time out if no packets are sent or received for a | A connection will time out if no packets are sent or received for a | |||
| period longer than the time specified in the idle_timeout transport | period longer than the time specified in the idle_timeout transport | |||
| parameter (see Section 6.9). However, state in middleboxes might | parameter (see Section 6.10). However, state in middleboxes might | |||
| time out earlier than that. Though REQ-5 in [RFC4787] recommends a 2 | time out earlier than that. Though REQ-5 in [RFC4787] recommends a 2 | |||
| minute timeout interval, experience shows that sending packets every | minute timeout interval, experience shows that sending packets every | |||
| 15 to 30 seconds is necessary to prevent the majority of middleboxes | 15 to 30 seconds is necessary to prevent the majority of middleboxes | |||
| from losing state for UDP flows. | from losing state for UDP flows. | |||
| 7.10. BLOCKED Frame | 7.10. BLOCKED Frame | |||
| A sender SHOULD send a BLOCKED frame (type=0x08) when it wishes to | A sender SHOULD send a BLOCKED frame (type=0x08) when it wishes to | |||
| send data, but is unable to due to connection-level flow control (see | send data, but is unable to due to connection-level flow control (see | |||
| Section 10.2.1). BLOCKED frames can be used as input to tuning of | Section 10.2.1). BLOCKED frames can be used as input to tuning of | |||
| skipping to change at page 57, line 39 ¶ | skipping to change at page 59, line 21 ¶ | |||
| Length: An 8-bit unsigned integer containing the length of the | Length: An 8-bit unsigned integer containing the length of the | |||
| connection ID. Values less than 4 and greater than 18 are invalid | connection ID. Values less than 4 and greater than 18 are invalid | |||
| and MUST be treated as a connection error of type | and MUST be treated as a connection error of type | |||
| PROTOCOL_VIOLATION. | PROTOCOL_VIOLATION. | |||
| Connection ID: A connection ID of the specified length. | Connection ID: A connection ID of the specified length. | |||
| Stateless Reset Token: A 128-bit value that will be used to for a | Stateless Reset Token: A 128-bit value that will be used to for a | |||
| stateless reset when the associated connection ID is used (see | stateless reset when the associated connection ID is used (see | |||
| Section 6.9.4). | Section 6.10.4). | |||
| An endpoint MUST NOT send this frame if it currently requires that | An endpoint MUST NOT send this frame if it currently requires that | |||
| its peer send packets with a zero-length Destination Connection ID. | its peer send packets with a zero-length Destination Connection ID. | |||
| Changing the length of a connection ID to or from zero-length makes | Changing the length of a connection ID to or from zero-length makes | |||
| it difficult to identify when the value of the connection ID changed. | it difficult to identify when the value of the connection ID changed. | |||
| An endpoint that is sending packets with a zero-length Destination | An endpoint that is sending packets with a zero-length Destination | |||
| Connection ID MUST treat receipt of a NEW_CONNECTION_ID frame as a | Connection ID MUST treat receipt of a NEW_CONNECTION_ID frame as a | |||
| connection error of type PROTOCOL_VIOLATION. | connection error of type PROTOCOL_VIOLATION. | |||
| 7.14. STOP_SENDING Frame | 7.14. STOP_SENDING Frame | |||
| skipping to change at page 58, line 41 ¶ | skipping to change at page 60, line 24 ¶ | |||
| Stream ID: A variable-length integer carrying the Stream ID of the | Stream ID: A variable-length integer carrying the Stream ID of the | |||
| stream being ignored. | stream being ignored. | |||
| Application Error Code: A 16-bit, application-specified reason the | Application Error Code: A 16-bit, application-specified reason the | |||
| sender is ignoring the stream (see Section 11.4). | sender is ignoring the stream (see Section 11.4). | |||
| 7.15. ACK Frame | 7.15. ACK Frame | |||
| Receivers send ACK frames (type=0x0d) to inform senders which packets | Receivers send ACK frames (type=0x0d) to inform senders which packets | |||
| they have received and processed. A sent packet that has never been | they have received and processed. The ACK frame contains any number | |||
| acknowledged is missing. The ACK frame contains any number of ACK | of ACK blocks. ACK blocks are ranges of acknowledged packets. | |||
| blocks. ACK blocks are ranges of acknowledged packets. | ||||
| Unlike TCP SACKs, QUIC acknowledgements are irrevocable. Once a | QUIC acknowledgements are irrevocable. Once acknowledged, a packet | |||
| packet has been acknowledged, even if it does not appear in a future | remains acknowledged, even if it does not appear in a future ACK | |||
| ACK frame, it remains acknowledged. | frame. This is unlike TCP SACKs ([RFC2018]). | |||
| A client MUST NOT acknowledge Retry packets. Retry packets include | A client MUST NOT acknowledge Retry packets. Retry packets include | |||
| the packet number from the Initial packet it responds to. Version | the packet number from the Initial packet it responds to. Version | |||
| Negotiation packets cannot be acknowledged because they do not | Negotiation packets cannot be acknowledged because they do not | |||
| contain a packet number. Rather than relying on ACK frames, these | contain a packet number. Rather than relying on ACK frames, these | |||
| packets are implicitly acknowledged by the next Initial packet sent | packets are implicitly acknowledged by the next Initial packet sent | |||
| by the client. | by the client. | |||
| An ACK frame is shown below. | An ACK frame is shown below. | |||
| skipping to change at page 65, line 20 ¶ | skipping to change at page 67, line 5 ¶ | |||
| when the OFF bit is set to 1. When the Offset field is absent, | when the OFF bit is set to 1. When the Offset field is absent, | |||
| the offset is 0. | the offset is 0. | |||
| Length: A variable-length integer specifying the length of the | Length: A variable-length integer specifying the length of the | |||
| Stream Data field in this STREAM frame. This field is present | Stream Data field in this STREAM frame. This field is present | |||
| when the LEN bit is set to 1. When the LEN bit is set to 0, the | when the LEN bit is set to 1. When the LEN bit is set to 0, the | |||
| Stream Data field consumes all the remaining octets in the packet. | Stream Data field consumes all the remaining octets in the packet. | |||
| Stream Data: The bytes from the designated stream to be delivered. | Stream Data: The bytes from the designated stream to be delivered. | |||
| A stream frame's Stream Data MUST NOT be empty, unless the offset is | When a Stream Data field has a length of 0, the offset in the STREAM | |||
| 0 or the FIN bit is set. When the FIN flag is sent on an empty | frame is the offset of the next byte that would be sent. | |||
| STREAM frame, the offset in the STREAM frame is the offset of the | ||||
| next byte that would be sent. | ||||
| The first byte in the stream has an offset of 0. The largest offset | The first byte in the stream has an offset of 0. The largest offset | |||
| delivered on a stream - the sum of the re-constructed offset and data | delivered on a stream - the sum of the re-constructed offset and data | |||
| length - MUST be less than 2^62. | length - MUST be less than 2^62. | |||
| Stream multiplexing is achieved by interleaving STREAM frames from | Stream multiplexing is achieved by interleaving STREAM frames from | |||
| multiple streams into one or more QUIC packets. A single QUIC packet | multiple streams into one or more QUIC packets. A single QUIC packet | |||
| can include multiple STREAM frames from one or more streams. | can include multiple STREAM frames from one or more streams. | |||
| Implementation note: One of the benefits of QUIC is avoidance of | Implementation note: One of the benefits of QUIC is avoidance of | |||
| skipping to change at page 67, line 17 ¶ | skipping to change at page 68, line 47 ¶ | |||
| acknowledged by the peer (that is, either the "Reset Recvd" or | acknowledged by the peer (that is, either the "Reset Recvd" or | |||
| "Data Recvd" state is reached on the send stream). The content of | "Data Recvd" state is reached on the send stream). The content of | |||
| a RST_STREAM frame MUST NOT change when it is sent again. | a RST_STREAM frame MUST NOT change when it is sent again. | |||
| o Similarly, a request to cancel stream transmission, as encoded in | o Similarly, a request to cancel stream transmission, as encoded in | |||
| a STOP_SENDING frame, is sent until the receive stream enters | a STOP_SENDING frame, is sent until the receive stream enters | |||
| either a "Data Recvd" or "Reset Recvd" state, see Section 9.3. | either a "Data Recvd" or "Reset Recvd" state, see Section 9.3. | |||
| o Connection close signals, including those that use | o Connection close signals, including those that use | |||
| CONNECTION_CLOSE and APPLICATION_CLOSE frames, are not sent again | CONNECTION_CLOSE and APPLICATION_CLOSE frames, are not sent again | |||
| when packet loss is detected, but as described in Section 6.9. | when packet loss is detected, but as described in Section 6.10. | |||
| o The current connection maximum data is sent in MAX_DATA frames. | o The current connection maximum data is sent in MAX_DATA frames. | |||
| An updated value is sent in a MAX_DATA frame if the packet | An updated value is sent in a MAX_DATA frame if the packet | |||
| containing the most recently sent MAX_DATA frame is declared lost, | containing the most recently sent MAX_DATA frame is declared lost, | |||
| or when the endpoint decides to update the limit. Care is | or when the endpoint decides to update the limit. Care is | |||
| necessary to avoid sending this frame too often as the limit can | necessary to avoid sending this frame too often as the limit can | |||
| increase frequently and cause an unnecessarily large number of | increase frequently and cause an unnecessarily large number of | |||
| MAX_DATA frames to be sent. | MAX_DATA frames to be sent. | |||
| o The current maximum stream data offset is sent in MAX_STREAM_DATA | o The current maximum stream data offset is sent in MAX_STREAM_DATA | |||
| skipping to change at page 69, line 34 ¶ | skipping to change at page 71, line 19 ¶ | |||
| limit might exist. | limit might exist. | |||
| If a QUIC endpoint determines that the PMTU between any pair of local | If a QUIC endpoint determines that the PMTU between any pair of local | |||
| and remote IP addresses has fallen below 1280 octets, it MUST | and remote IP addresses has fallen below 1280 octets, it MUST | |||
| immediately cease sending QUIC packets on the affected path. This | immediately cease sending QUIC packets on the affected path. This | |||
| could result in termination of the connection if an alternative path | could result in termination of the connection if an alternative path | |||
| cannot be found. | cannot be found. | |||
| 8.4.1. Special Considerations for PMTU Discovery | 8.4.1. Special Considerations for PMTU Discovery | |||
| Traditional ICMP-based path MTU discovery in IPv4 [RFC1191] is | Traditional ICMP-based path MTU discovery in IPv4 [PMTUDv4] is | |||
| potentially vulnerable to off-path attacks that successfully guess | potentially vulnerable to off-path attacks that successfully guess | |||
| the IP/port 4-tuple and reduce the MTU to a bandwidth-inefficient | the IP/port 4-tuple and reduce the MTU to a bandwidth-inefficient | |||
| value. TCP connections mitigate this risk by using the (at minimum) | value. TCP connections mitigate this risk by using the (at minimum) | |||
| 8 bytes of transport header echoed in the ICMP message to validate | 8 bytes of transport header echoed in the ICMP message to validate | |||
| the TCP sequence number as valid for the current connection. | the TCP sequence number as valid for the current connection. | |||
| However, as QUIC operates over UDP, in IPv4 the echoed information | However, as QUIC operates over UDP, in IPv4 the echoed information | |||
| could consist only of the IP and UDP headers, which usually has | could consist only of the IP and UDP headers, which usually has | |||
| insufficient entropy to mitigate off-path attacks. | insufficient entropy to mitigate off-path attacks. | |||
| As a result, endpoints that implement PMTUD in IPv4 SHOULD take steps | As a result, endpoints that implement PMTUD in IPv4 SHOULD take steps | |||
| skipping to change at page 70, line 15 ¶ | skipping to change at page 71, line 47 ¶ | |||
| o Store additional information from the IP or UDP headers from DF | o Store additional information from the IP or UDP headers from DF | |||
| packets (for example, the IP ID or UDP checksum) to further | packets (for example, the IP ID or UDP checksum) to further | |||
| authenticate incoming Datagram Too Big messages. | authenticate incoming Datagram Too Big messages. | |||
| o Any reduction in PMTU due to a report contained in an ICMP packet | o Any reduction in PMTU due to a report contained in an ICMP packet | |||
| is provisional until QUIC's loss detection algorithm determines | is provisional until QUIC's loss detection algorithm determines | |||
| that the packet is actually lost. | that the packet is actually lost. | |||
| 8.4.2. Special Considerations for Packetization Layer PMTU Discovery | 8.4.2. Special Considerations for Packetization Layer PMTU Discovery | |||
| The PADDING frame provides a useful option for PMTU probe packets | The PADDING frame provides a useful option for PMTU probe packets. | |||
| that does not exist in other transports. PADDING frames generate | PADDING frames generate acknowledgements, but they need not be | |||
| acknowledgements, but their content need not be delivered reliably. | delivered reliably. As a result, the loss of PADDING frames in probe | |||
| PADDING frames may delay the delivery of application data, as they | packets does not require delay-inducing retransmission. However, | |||
| consume the congestion window. However, by definition their likely | PADDING frames do consume congestion window, which may delay the | |||
| loss in a probe packet does not require delay-inducing retransmission | transmission of subsequent application data. | |||
| of application data. | ||||
| When implementing the algorithm in Section 7.2 of [RFC4821], the | When implementing the algorithm in Section 7.2 of [PLPMTUD], the | |||
| initial value of search_low SHOULD be consistent with the IPv6 | initial value of search_low SHOULD be consistent with the IPv6 | |||
| minimum packet size. Paths that do not support this size cannot | minimum packet size. Paths that do not support this size cannot | |||
| deliver Initial packets, and therefore are not QUIC-compliant. | deliver Initial packets, and therefore are not QUIC-compliant. | |||
| Section 7.3 of [RFC4821] discusses tradeoffs between small and large | Section 7.3 of [PLPMTUD] discusses tradeoffs between small and large | |||
| increases in the size of probe packets. As QUIC probe packets need | increases in the size of probe packets. As QUIC probe packets need | |||
| not contain application data, aggressive increases in probe size | not contain application data, aggressive increases in probe size | |||
| carry fewer consequences. | carry fewer consequences. | |||
| 9. Streams: QUIC's Data Structuring Abstraction | 9. Streams: QUIC's Data Structuring Abstraction | |||
| Streams in QUIC provide a lightweight, ordered byte-stream | Streams in QUIC provide a lightweight, ordered byte-stream | |||
| abstraction. | abstraction. | |||
| There are two basic types of stream in QUIC. Unidirectional streams | There are two basic types of stream in QUIC. Unidirectional streams | |||
| skipping to change at page 80, line 22 ¶ | skipping to change at page 82, line 19 ¶ | |||
| encapsulating data on a stream until the stream is terminated in that | encapsulating data on a stream until the stream is terminated in that | |||
| direction. Streams are an ordered byte-stream abstraction, and they | direction. Streams are an ordered byte-stream abstraction, and they | |||
| have no other structure within them. STREAM frame boundaries are not | have no other structure within them. STREAM frame boundaries are not | |||
| expected to be preserved in retransmissions from the sender or during | expected to be preserved in retransmissions from the sender or during | |||
| delivery to the application at the receiver. | delivery to the application at the receiver. | |||
| When new data is to be sent on a stream, a sender MUST set the | When new data is to be sent on a stream, a sender MUST set the | |||
| encapsulating STREAM frame's offset field to the stream offset of the | encapsulating STREAM frame's offset field to the stream offset of the | |||
| first byte of this new data. The first octet of data on a stream has | first byte of this new data. The first octet of data on a stream has | |||
| an offset of 0. An endpoint is expected to send every stream octet. | an offset of 0. An endpoint is expected to send every stream octet. | |||
| The largest offset delivered on a stream MUST be less than 2^62. A | The largest offset delivered on a stream MUST be less than 2^62. | |||
| receiver MUST ensure that received stream data is delivered to the | ||||
| application as an ordered byte-stream. Data received out of order | QUIC makes no specific allowances for partial reliability or delivery | |||
| MUST be buffered for later delivery, as long as it is not in | of stream data out of order. Endpoints MUST be able to deliver | |||
| violation of the receiver's flow control limits. | stream data to an application as an ordered byte-stream. Delivering | |||
| an ordered byte-stream requires that an endpoint buffer any data that | ||||
| is received out of order, up to the advertised flow control limit. | ||||
| An endpoint could receive the same octets multiple times; octets that | ||||
| have already been received can be discarded. The value for a given | ||||
| octet MUST NOT change if it is sent multiple times; an endpoint MAY | ||||
| treat receipt of a changed octet as a connection error of type | ||||
| PROTOCOL_VIOLATION. | ||||
| An endpoint MUST NOT send data on any stream without ensuring that it | An endpoint MUST NOT send data on any stream without ensuring that it | |||
| is within the data limits set by its peer. The cryptographic | is within the data limits set by its peer. The cryptographic | |||
| handshake stream, Stream 0, is exempt from the connection-level data | handshake stream, Stream 0, is exempt from the connection-level data | |||
| limits established by MAX_DATA. Data on stream 0 other than the | limits established by MAX_DATA. Data on stream 0 other than the | |||
| initial cryptographic handshake message is still subject to stream- | initial cryptographic handshake message is still subject to stream- | |||
| level data limits and MAX_STREAM_DATA. This message is exempt from | level data limits and MAX_STREAM_DATA. This message is exempt from | |||
| flow control because it needs to be sent in a single packet | flow control because it needs to be sent in a single packet | |||
| regardless of the server's flow control state. This rule applies | regardless of the server's flow control state. This rule applies | |||
| even for 0-RTT handshakes where the remembered value of | even for 0-RTT handshakes where the remembered value of | |||
| skipping to change at page 86, line 12 ¶ | skipping to change at page 88, line 12 ¶ | |||
| error to its peer. Both transport-level and application-level errors | error to its peer. Both transport-level and application-level errors | |||
| can affect an entire connection (see Section 11.1), while only | can affect an entire connection (see Section 11.1), while only | |||
| application-level errors can be isolated to a single stream (see | application-level errors can be isolated to a single stream (see | |||
| Section 11.2). | Section 11.2). | |||
| The most appropriate error code (Section 11.3) SHOULD be included in | The most appropriate error code (Section 11.3) SHOULD be included in | |||
| the frame that signals the error. Where this specification | the frame that signals the error. Where this specification | |||
| identifies error conditions, it also identifies the error code that | identifies error conditions, it also identifies the error code that | |||
| is used. | is used. | |||
| A stateless reset (Section 6.9.4) is not suitable for any error that | A stateless reset (Section 6.10.4) is not suitable for any error that | |||
| can be signaled with a CONNECTION_CLOSE, APPLICATION_CLOSE, or | can be signaled with a CONNECTION_CLOSE, APPLICATION_CLOSE, or | |||
| RST_STREAM frame. A stateless reset MUST NOT be used by an endpoint | RST_STREAM frame. A stateless reset MUST NOT be used by an endpoint | |||
| that has the state necessary to send a frame on the connection. | that has the state necessary to send a frame on the connection. | |||
| 11.1. Connection Errors | 11.1. Connection Errors | |||
| Errors that result in the connection being unusable, such as an | Errors that result in the connection being unusable, such as an | |||
| obvious violation of protocol semantics or corruption of state that | obvious violation of protocol semantics or corruption of state that | |||
| affects an entire connection, MUST be signaled using a | affects an entire connection, MUST be signaled using a | |||
| CONNECTION_CLOSE or APPLICATION_CLOSE frame (Section 7.4, | CONNECTION_CLOSE or APPLICATION_CLOSE frame (Section 7.4, | |||
| skipping to change at page 86, line 43 ¶ | skipping to change at page 88, line 43 ¶ | |||
| packet that is lost. An endpoint SHOULD be prepared to retransmit a | packet that is lost. An endpoint SHOULD be prepared to retransmit a | |||
| packet containing either frame type if it receives more packets on a | packet containing either frame type if it receives more packets on a | |||
| terminated connection. Limiting the number of retransmissions and | terminated connection. Limiting the number of retransmissions and | |||
| the time over which this final packet is sent limits the effort | the time over which this final packet is sent limits the effort | |||
| expended on terminated connections. | expended on terminated connections. | |||
| An endpoint that chooses not to retransmit packets containing | An endpoint that chooses not to retransmit packets containing | |||
| CONNECTION_CLOSE or APPLICATION_CLOSE risks a peer missing the first | CONNECTION_CLOSE or APPLICATION_CLOSE risks a peer missing the first | |||
| such packet. The only mechanism available to an endpoint that | such packet. The only mechanism available to an endpoint that | |||
| continues to receive data for a terminated connection is to use the | continues to receive data for a terminated connection is to use the | |||
| stateless reset process (Section 6.9.4). | stateless reset process (Section 6.10.4). | |||
| An endpoint that receives an invalid CONNECTION_CLOSE or | An endpoint that receives an invalid CONNECTION_CLOSE or | |||
| APPLICATION_CLOSE frame MUST NOT signal the existence of the error to | APPLICATION_CLOSE frame MUST NOT signal the existence of the error to | |||
| its peer. | its peer. | |||
| 11.2. Stream Errors | 11.2. Stream Errors | |||
| If an application-level error affects a single stream, but otherwise | If an application-level error affects a single stream, but otherwise | |||
| leaves the connection in a recoverable state, the endpoint can send a | leaves the connection in a recoverable state, the endpoint can send a | |||
| RST_STREAM frame (Section 7.3) with an appropriate error code to | RST_STREAM frame (Section 7.3) with an appropriate error code to | |||
| skipping to change at page 89, line 11 ¶ | skipping to change at page 91, line 11 ¶ | |||
| the management of application error codes are left to application | the management of application error codes are left to application | |||
| protocols. Application protocol error codes are used for the | protocols. Application protocol error codes are used for the | |||
| RST_STREAM (Section 7.3) and APPLICATION_CLOSE (Section 7.5) frames. | RST_STREAM (Section 7.3) and APPLICATION_CLOSE (Section 7.5) frames. | |||
| There is no restriction on the use of the 16-bit error code space for | There is no restriction on the use of the 16-bit error code space for | |||
| application protocols. However, QUIC reserves the error code with a | application protocols. However, QUIC reserves the error code with a | |||
| value of 0 to mean STOPPING. The application error code of STOPPING | value of 0 to mean STOPPING. The application error code of STOPPING | |||
| (0) is used by the transport to cancel a stream in response to | (0) is used by the transport to cancel a stream in response to | |||
| receipt of a STOP_SENDING frame. | receipt of a STOP_SENDING frame. | |||
| 12. Security and Privacy Considerations | 12. Security Considerations | |||
| 12.1. Spoofed ACK Attack | 12.1. Spoofed ACK Attack | |||
| An attacker might be able to receive an address validation token | An attacker might be able to receive an address validation token | |||
| (Section 6.6) from the server and then release the IP address it used | (Section 6.6) from the server and then release the IP address it used | |||
| to acquire that token. The attacker may, in the future, spoof this | to acquire that token. The attacker may, in the future, spoof this | |||
| same address (which now presumably addresses a different endpoint), | same address (which now presumably addresses a different endpoint), | |||
| and initiate a 0-RTT connection with a server on the victim's behalf. | and initiate a 0-RTT connection with a server on the victim's behalf. | |||
| The attacker can then spoof ACK frames to the server which cause the | The attacker can then spoof ACK frames to the server which cause the | |||
| server to send excessive amounts of data toward the new owner of the | server to send excessive amounts of data toward the new owner of the | |||
| skipping to change at page 89, line 49 ¶ | skipping to change at page 91, line 49 ¶ | |||
| forward secure key, the attacker will not be able to generate | forward secure key, the attacker will not be able to generate | |||
| forward-secure protected packets with ACK frames. | forward-secure protected packets with ACK frames. | |||
| 12.2. Optimistic ACK Attack | 12.2. Optimistic ACK Attack | |||
| An endpoint that acknowledges packets it has not received might cause | An endpoint that acknowledges packets it has not received might cause | |||
| a congestion controller to permit sending at rates beyond what the | a congestion controller to permit sending at rates beyond what the | |||
| network supports. An endpoint MAY skip packet numbers when sending | network supports. An endpoint MAY skip packet numbers when sending | |||
| packets to detect this behavior. An endpoint can then immediately | packets to detect this behavior. An endpoint can then immediately | |||
| close the connection with a connection error of type | close the connection with a connection error of type | |||
| PROTOCOL_VIOLATION (see Section 6.9.3). | PROTOCOL_VIOLATION (see Section 6.10.3). | |||
| 12.3. Slowloris Attacks | 12.3. Slowloris Attacks | |||
| The attacks commonly known as Slowloris [SLOWLORIS] try to keep many | The attacks commonly known as Slowloris [SLOWLORIS] try to keep many | |||
| connections to the target endpoint open and hold them open as long as | connections to the target endpoint open and hold them open as long as | |||
| possible. These attacks can be executed against a QUIC endpoint by | possible. These attacks can be executed against a QUIC endpoint by | |||
| generating the minimum amount of activity necessary to avoid being | generating the minimum amount of activity necessary to avoid being | |||
| closed for inactivity. This might involve sending small amounts of | closed for inactivity. This might involve sending small amounts of | |||
| data, gradually opening flow control windows in order to control the | data, gradually opening flow control windows in order to control the | |||
| sender rate, or manufacturing ACK frames that simulate a high loss | sender rate, or manufacturing ACK frames that simulate a high loss | |||
| skipping to change at page 92, line 5 ¶ | skipping to change at page 94, line 5 ¶ | |||
| the value. | the value. | |||
| The nominated expert(s) verify that a specification exists and is | The nominated expert(s) verify that a specification exists and is | |||
| readily accessible. The expert(s) are encouraged to be biased | readily accessible. The expert(s) are encouraged to be biased | |||
| towards approving registrations unless they are abusive, frivolous, | towards approving registrations unless they are abusive, frivolous, | |||
| or actively harmful (not merely aesthetically displeasing, or | or actively harmful (not merely aesthetically displeasing, or | |||
| architecturally dubious). | architecturally dubious). | |||
| The initial contents of this registry are shown in Table 7. | The initial contents of this registry are shown in Table 7. | |||
| +--------+----------------------------+---------------+ | +--------+--------------------------+---------------+ | |||
| | Value | Parameter Name | Specification | | | Value | Parameter Name | Specification | | |||
| +--------+----------------------------+---------------+ | +--------+--------------------------+---------------+ | |||
| | 0x0000 | initial_max_stream_data | Section 6.4.1 | | | 0x0000 | initial_max_stream_data | Section 6.4.1 | | |||
| | | | | | | | | | | |||
| | 0x0001 | initial_max_data | Section 6.4.1 | | | 0x0001 | initial_max_data | Section 6.4.1 | | |||
| | | | | | | | | | | |||
| | 0x0002 | initial_max_stream_id_bidi | Section 6.4.1 | | | 0x0002 | initial_max_bidi_streams | Section 6.4.1 | | |||
| | | | | | | | | | | |||
| | 0x0003 | idle_timeout | Section 6.4.1 | | | 0x0003 | idle_timeout | Section 6.4.1 | | |||
| | | | | | | | | | | |||
| | 0x0005 | max_packet_size | Section 6.4.1 | | | 0x0004 | preferred_address | Section 6.4.1 | | |||
| | | | | | | | | | | |||
| | 0x0006 | stateless_reset_token | Section 6.4.1 | | | 0x0005 | max_packet_size | Section 6.4.1 | | |||
| | | | | | | | | | | |||
| | 0x0007 | ack_delay_exponent | Section 6.4.1 | | | 0x0006 | stateless_reset_token | Section 6.4.1 | | |||
| | | | | | | | | | | |||
| | 0x0008 | initial_max_stream_id_uni | Section 6.4.1 | | | 0x0007 | ack_delay_exponent | Section 6.4.1 | | |||
| +--------+----------------------------+---------------+ | | | | | | |||
| | 0x0008 | initial_max_uni_streams | Section 6.4.1 | | ||||
| +--------+--------------------------+---------------+ | ||||
| Table 7: Initial QUIC Transport Parameters Entries | Table 7: Initial QUIC Transport Parameters Entries | |||
| 13.2. QUIC Transport Error Codes Registry | 13.2. QUIC Transport Error Codes Registry | |||
| IANA [SHALL add/has added] a registry for "QUIC Transport Error | IANA [SHALL add/has added] a registry for "QUIC Transport Error | |||
| Codes" under a "QUIC Protocol" heading. | Codes" under a "QUIC Protocol" heading. | |||
| The "QUIC Transport Error Codes" registry governs a 16-bit space. | The "QUIC Transport Error Codes" registry governs a 16-bit space. | |||
| This space is split into two spaces that are governed by different | This space is split into two spaces that are governed by different | |||
| skipping to change at page 94, line 38 ¶ | skipping to change at page 96, line 38 ¶ | |||
| DOI 10.17487/RFC1191, November 1990, | DOI 10.17487/RFC1191, November 1990, | |||
| <https://www.rfc-editor.org/info/rfc1191>. | <https://www.rfc-editor.org/info/rfc1191>. | |||
| [PMTUDv6] McCann, J., Deering, S., Mogul, J., and R. Hinden, Ed., | [PMTUDv6] McCann, J., Deering, S., Mogul, J., and R. Hinden, Ed., | |||
| "Path MTU Discovery for IP version 6", STD 87, RFC 8201, | "Path MTU Discovery for IP version 6", STD 87, RFC 8201, | |||
| DOI 10.17487/RFC8201, July 2017, | DOI 10.17487/RFC8201, July 2017, | |||
| <https://www.rfc-editor.org/info/rfc8201>. | <https://www.rfc-editor.org/info/rfc8201>. | |||
| [QUIC-RECOVERY] | [QUIC-RECOVERY] | |||
| Iyengar, J., Ed. and I. Swett, Ed., "QUIC Loss Detection | Iyengar, J., Ed. and I. Swett, Ed., "QUIC Loss Detection | |||
| and Congestion Control", draft-ietf-quic-recovery-10 (work | and Congestion Control", draft-ietf-quic-recovery-12 (work | |||
| in progress), April 2018. | in progress), May 2018. | |||
| [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), April 2018. | tls-12 (work in progress), May 2018. | |||
| [RFC1191] Mogul, J. and S. Deering, "Path MTU discovery", RFC 1191, | ||||
| DOI 10.17487/RFC1191, November 1990, | ||||
| <https://www.rfc-editor.org/info/rfc1191>. | ||||
| [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>. | |||
| [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO | [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO | |||
| 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November | 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November | |||
| 2003, <https://www.rfc-editor.org/info/rfc3629>. | 2003, <https://www.rfc-editor.org/info/rfc3629>. | |||
| [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, | [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, | |||
| "Randomness Requirements for Security", BCP 106, RFC 4086, | "Randomness Requirements for Security", BCP 106, RFC 4086, | |||
| DOI 10.17487/RFC4086, June 2005, | DOI 10.17487/RFC4086, June 2005, | |||
| <https://www.rfc-editor.org/info/rfc4086>. | <https://www.rfc-editor.org/info/rfc4086>. | |||
| [RFC4821] Mathis, M. and J. Heffner, "Packetization Layer Path MTU | ||||
| Discovery", RFC 4821, DOI 10.17487/RFC4821, March 2007, | ||||
| <https://www.rfc-editor.org/info/rfc4821>. | ||||
| [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for | [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for | |||
| Writing an IANA Considerations Section in RFCs", BCP 26, | Writing an IANA Considerations Section in RFCs", BCP 26, | |||
| RFC 8126, DOI 10.17487/RFC8126, June 2017, | RFC 8126, DOI 10.17487/RFC8126, June 2017, | |||
| <https://www.rfc-editor.org/info/rfc8126>. | <https://www.rfc-editor.org/info/rfc8126>. | |||
| [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>. | |||
| 14.2. Informative References | 14.2. Informative References | |||
| skipping to change at page 95, line 45 ¶ | skipping to change at page 97, line 36 ¶ | |||
| Roskind, J., "QUIC: Multiplexed Transport Over UDP", | Roskind, J., "QUIC: Multiplexed Transport Over UDP", | |||
| December 2013, <https://goo.gl/dMVtFi>. | December 2013, <https://goo.gl/dMVtFi>. | |||
| [HTTP2] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext | [HTTP2] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext | |||
| Transfer Protocol Version 2 (HTTP/2)", RFC 7540, | Transfer Protocol Version 2 (HTTP/2)", RFC 7540, | |||
| DOI 10.17487/RFC7540, May 2015, | DOI 10.17487/RFC7540, May 2015, | |||
| <https://www.rfc-editor.org/info/rfc7540>. | <https://www.rfc-editor.org/info/rfc7540>. | |||
| [QUIC-INVARIANTS] | [QUIC-INVARIANTS] | |||
| Thomson, M., "Version-Independent Properties of QUIC", | Thomson, M., "Version-Independent Properties of QUIC", | |||
| draft-ietf-quic-invariants-01 (work in progress), April | draft-ietf-quic-invariants-01 (work in progress), May | |||
| 2018. | 2018. | |||
| [RFC2018] Mathis, M., Mahdavi, J., Floyd, S., and A. Romanow, "TCP | ||||
| Selective Acknowledgment Options", RFC 2018, | ||||
| DOI 10.17487/RFC2018, October 1996, | ||||
| <https://www.rfc-editor.org/info/rfc2018>. | ||||
| [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- | [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- | |||
| Hashing for Message Authentication", RFC 2104, | Hashing for Message Authentication", RFC 2104, | |||
| DOI 10.17487/RFC2104, February 1997, | DOI 10.17487/RFC2104, February 1997, | |||
| <https://www.rfc-editor.org/info/rfc2104>. | <https://www.rfc-editor.org/info/rfc2104>. | |||
| [RFC2360] Scott, G., "Guide for Internet Standards Writers", BCP 22, | [RFC2360] Scott, G., "Guide for Internet Standards Writers", BCP 22, | |||
| RFC 2360, DOI 10.17487/RFC2360, June 1998, | RFC 2360, DOI 10.17487/RFC2360, June 1998, | |||
| <https://www.rfc-editor.org/info/rfc2360>. | <https://www.rfc-editor.org/info/rfc2360>. | |||
| [RFC4787] Audet, F., Ed. and C. Jennings, "Network Address | [RFC4787] Audet, F., Ed. and C. Jennings, "Network Address | |||
| skipping to change at page 96, line 33 ¶ | skipping to change at page 98, line 29 ¶ | |||
| [SLOWLORIS] | [SLOWLORIS] | |||
| RSnake Hansen, R., "Welcome to Slowloris...", June 2009, | RSnake Hansen, R., "Welcome to Slowloris...", June 2009, | |||
| <https://web.archive.org/web/20150315054838/ | <https://web.archive.org/web/20150315054838/ | |||
| http://ha.ckers.org/slowloris/>. | http://ha.ckers.org/slowloris/>. | |||
| [SST] Ford, B., "Structured streams", ACM SIGCOMM Computer | [SST] Ford, B., "Structured streams", ACM SIGCOMM Computer | |||
| Communication Review Vol. 37, pp. 361, | Communication Review Vol. 37, pp. 361, | |||
| DOI 10.1145/1282427.1282421, October 2007. | DOI 10.1145/1282427.1282421, October 2007. | |||
| 14.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/-transport | ||||
| [4] https://github.com/quicwg/base-drafts/wiki/QUIC-Versions | ||||
| Appendix A. Contributors | Appendix A. Contributors | |||
| The original authors of this specification were Ryan Hamilton, Jana | The original authors of this specification were Ryan Hamilton, Jana | |||
| Iyengar, Ian Swett, and Alyssa Wilk. | Iyengar, Ian Swett, and Alyssa Wilk. | |||
| The original design and rationale behind this protocol draw | The original design and rationale behind this protocol draw | |||
| significantly from work by Jim Roskind [EARLY-DESIGN]. In | significantly from work by Jim Roskind [EARLY-DESIGN]. In | |||
| alphabetical order, the contributors to the pre-IETF QUIC project at | alphabetical order, the contributors to the pre-IETF QUIC project at | |||
| Google are: Britt Cyr, Jeremy Dorfman, Ryan Hamilton, Jana Iyengar, | Google are: Britt Cyr, Jeremy Dorfman, Ryan Hamilton, Jana Iyengar, | |||
| Fedor Kouranov, Charles Krasic, Jo Kulik, Adam Langley, Jim Roskind, | Fedor Kouranov, Charles Krasic, Jo Kulik, Adam Langley, Jim Roskind, | |||
| skipping to change at page 97, line 25 ¶ | skipping to change at page 99, line 12 ¶ | |||
| discussions and public ones on the quic@ietf.org and proto- | discussions and public ones on the quic@ietf.org and proto- | |||
| quic@chromium.org mailing lists. Our thanks to all. | quic@chromium.org mailing lists. Our thanks to all. | |||
| Appendix C. Change Log | Appendix C. Change Log | |||
| *RFC Editor's Note:* Please remove this section prior to | *RFC Editor's Note:* Please remove this section prior to | |||
| publication of a final version of this document. | publication of a final version of this document. | |||
| Issue and pull request numbers are listed with a leading octothorp. | Issue and pull request numbers are listed with a leading octothorp. | |||
| C.1. Since draft-ietf-quic-transport-10 | C.1. Since draft-ietf-quic-transport-11 | |||
| o Enable server to transition connections to a preferred address | ||||
| (#560, #1251) | ||||
| o Packet numbers are encrypted (#1174, #1043, #1048, #1034, #850, | ||||
| #990, #734, #1079) | ||||
| o Packet numbers use a variable-length encoding (#989, #1334) | ||||
| o STREAM frames can now be empty (#1350) | ||||
| C.2. Since draft-ietf-quic-transport-10 | ||||
| o Swap payload length and packed number fields in long header | o Swap payload length and packed number fields in long header | |||
| (#1294) | (#1294) | |||
| o Clarified that CONNECTION_CLOSE is allowed in Handshake packet | o Clarified that CONNECTION_CLOSE is allowed in Handshake packet | |||
| (#1274) | (#1274) | |||
| o Spin bit reserved (#1283) | o Spin bit reserved (#1283) | |||
| o Coalescing multiple QUIC packets in a UDP datagram (#1262, #1285) | o Coalescing multiple QUIC packets in a UDP datagram (#1262, #1285) | |||
| skipping to change at page 98, line 12 ¶ | skipping to change at page 100, line 12 ¶ | |||
| o STOP_SENDING is now prohibited before streams are used (#1050) | o STOP_SENDING is now prohibited before streams are used (#1050) | |||
| o Recommend including ACK in Retry packets and allow PADDING (#1067, | o Recommend including ACK in Retry packets and allow PADDING (#1067, | |||
| #882) | #882) | |||
| o Endpoints now become closing after an idle timeout (#1178, #1179) | o Endpoints now become closing after an idle timeout (#1178, #1179) | |||
| o Remove implication that Version Negotiation is sent when a packet | o Remove implication that Version Negotiation is sent when a packet | |||
| of the wrong version is received (#1197) | of the wrong version is received (#1197) | |||
| C.2. Since draft-ietf-quic-transport-09 | C.3. Since draft-ietf-quic-transport-09 | |||
| o Added PATH_CHALLENGE and PATH_RESPONSE frames to replace PING with | o Added PATH_CHALLENGE and PATH_RESPONSE frames to replace PING with | |||
| Data and PONG frame. Changed ACK frame type from 0x0e to 0x0d. | Data and PONG frame. Changed ACK frame type from 0x0e to 0x0d. | |||
| (#1091, #725, #1086) | (#1091, #725, #1086) | |||
| o A server can now only send 3 packets without validating the client | o A server can now only send 3 packets without validating the client | |||
| address (#38, #1090) | address (#38, #1090) | |||
| o Delivery order of stream data is no longer strongly specified | o Delivery order of stream data is no longer strongly specified | |||
| (#252, #1070) | (#252, #1070) | |||
| skipping to change at page 98, line 39 ¶ | skipping to change at page 100, line 39 ¶ | |||
| o Improved retransmission rules for all frame types: information is | o Improved retransmission rules for all frame types: information is | |||
| retransmitted, not packets or frames (#463, #765, #1095, #1053) | retransmitted, not packets or frames (#463, #765, #1095, #1053) | |||
| o Added an error code for server busy signals (#1137) | o Added an error code for server busy signals (#1137) | |||
| o Endpoints now set the connection ID that their peer uses. | o Endpoints now set the connection ID that their peer uses. | |||
| Connection IDs are variable length. Removed the | Connection IDs are variable length. Removed the | |||
| omit_connection_id transport parameter and the corresponding short | omit_connection_id transport parameter and the corresponding short | |||
| header flag. (#1089, #1052, #1146, #821, #745, #821, #1166, #1151) | header flag. (#1089, #1052, #1146, #821, #745, #821, #1166, #1151) | |||
| C.3. Since draft-ietf-quic-transport-08 | C.4. Since draft-ietf-quic-transport-08 | |||
| o Clarified requirements for BLOCKED usage (#65, #924) | o Clarified requirements for BLOCKED usage (#65, #924) | |||
| o BLOCKED frame now includes reason for blocking (#452, #924, #927, | o BLOCKED frame now includes reason for blocking (#452, #924, #927, | |||
| #928) | #928) | |||
| o GAP limitation in ACK Frame (#613) | o GAP limitation in ACK Frame (#613) | |||
| o Improved PMTUD description (#614, #1036) | o Improved PMTUD description (#614, #1036) | |||
| skipping to change at page 99, line 19 ¶ | skipping to change at page 101, line 19 ¶ | |||
| o Stateless reset clarified as version-specific (#930, #986) | o Stateless reset clarified as version-specific (#930, #986) | |||
| o initial_max_stream_id_x transport parameters are optional (#970, | o initial_max_stream_id_x transport parameters are optional (#970, | |||
| #971) | #971) | |||
| o Ack Delay assumes a default value during the handshake (#1007, | o Ack Delay assumes a default value during the handshake (#1007, | |||
| #1009) | #1009) | |||
| o Removed transport parameters from NewSessionTicket (#1015) | o Removed transport parameters from NewSessionTicket (#1015) | |||
| C.4. Since draft-ietf-quic-transport-07 | C.5. Since draft-ietf-quic-transport-07 | |||
| o The long header now has version before packet number (#926, #939) | o The long header now has version before packet number (#926, #939) | |||
| o Rename and consolidate packet types (#846, #822, #847) | o Rename and consolidate packet types (#846, #822, #847) | |||
| o Packet types are assigned new codepoints and the Connection ID | o Packet types are assigned new codepoints and the Connection ID | |||
| Flag is inverted (#426, #956) | Flag is inverted (#426, #956) | |||
| o Removed type for Version Negotiation and use Version 0 (#963, | o Removed type for Version Negotiation and use Version 0 (#963, | |||
| #968) | #968) | |||
| skipping to change at page 100, line 15 ¶ | skipping to change at page 102, line 15 ¶ | |||
| o Address validation for connection migration (#161, #732, #878) | o Address validation for connection migration (#161, #732, #878) | |||
| o Clearly defined retransmission rules for BLOCKED (#452, #65, #924) | o Clearly defined retransmission rules for BLOCKED (#452, #65, #924) | |||
| o negotiated_version is sent in server transport parameters (#710, | o negotiated_version is sent in server transport parameters (#710, | |||
| #959) | #959) | |||
| o Increased the range over which packet numbers are randomized | o Increased the range over which packet numbers are randomized | |||
| (#864, #850, #964) | (#864, #850, #964) | |||
| C.5. Since draft-ietf-quic-transport-06 | C.6. Since draft-ietf-quic-transport-06 | |||
| o Replaced FNV-1a with AES-GCM for all "Cleartext" packets (#554) | o Replaced FNV-1a with AES-GCM for all "Cleartext" packets (#554) | |||
| o Split error code space between application and transport (#485) | o Split error code space between application and transport (#485) | |||
| o Stateless reset token moved to end (#820) | o Stateless reset token moved to end (#820) | |||
| o 1-RTT-protected long header types removed (#848) | o 1-RTT-protected long header types removed (#848) | |||
| o No acknowledgments during draining period (#852) | o No acknowledgments during draining period (#852) | |||
| o Remove "application close" as a separate close type (#854) | o Remove "application close" as a separate close type (#854) | |||
| o Remove timestamps from the ACK frame (#841) | o Remove timestamps from the ACK frame (#841) | |||
| o Require transport parameters to only appear once (#792) | o Require transport parameters to only appear once (#792) | |||
| C.6. Since draft-ietf-quic-transport-05 | C.7. Since draft-ietf-quic-transport-05 | |||
| o Stateless token is server-only (#726) | o Stateless token is server-only (#726) | |||
| o Refactor section on connection termination (#733, #748, #328, | o Refactor section on connection termination (#733, #748, #328, | |||
| #177) | #177) | |||
| o Limit size of Version Negotiation packet (#585) | o Limit size of Version Negotiation packet (#585) | |||
| o Clarify when and what to ack (#736) | o Clarify when and what to ack (#736) | |||
| o Renamed STREAM_ID_NEEDED to STREAM_ID_BLOCKED | o Renamed STREAM_ID_NEEDED to STREAM_ID_BLOCKED | |||
| o Clarify Keep-alive requirements (#729) | o Clarify Keep-alive requirements (#729) | |||
| C.7. Since draft-ietf-quic-transport-04 | C.8. Since draft-ietf-quic-transport-04 | |||
| o Introduce STOP_SENDING frame, RST_STREAM only resets in one | o Introduce STOP_SENDING frame, RST_STREAM only resets in one | |||
| direction (#165) | direction (#165) | |||
| o Removed GOAWAY; application protocols are responsible for graceful | o Removed GOAWAY; application protocols are responsible for graceful | |||
| shutdown (#696) | shutdown (#696) | |||
| o Reduced the number of error codes (#96, #177, #184, #211) | o Reduced the number of error codes (#96, #177, #184, #211) | |||
| o Version validation fields can't move or change (#121) | o Version validation fields can't move or change (#121) | |||
| skipping to change at page 101, line 34 ¶ | skipping to change at page 103, line 34 ¶ | |||
| o Increased the maximum length of the Largest Acknowledged field in | o Increased the maximum length of the Largest Acknowledged field in | |||
| ACK frames to 64 bits (#629) | ACK frames to 64 bits (#629) | |||
| o truncate_connection_id is renamed to omit_connection_id (#659) | o truncate_connection_id is renamed to omit_connection_id (#659) | |||
| o CONNECTION_CLOSE terminates the connection like TCP RST (#330, | o CONNECTION_CLOSE terminates the connection like TCP RST (#330, | |||
| #328) | #328) | |||
| o Update labels used in HKDF-Expand-Label to match TLS 1.3 (#642) | o Update labels used in HKDF-Expand-Label to match TLS 1.3 (#642) | |||
| C.8. Since draft-ietf-quic-transport-03 | C.9. Since draft-ietf-quic-transport-03 | |||
| o Change STREAM and RST_STREAM layout | o Change STREAM and RST_STREAM layout | |||
| o Add MAX_STREAM_ID settings | o Add MAX_STREAM_ID settings | |||
| C.9. Since draft-ietf-quic-transport-02 | C.10. Since draft-ietf-quic-transport-02 | |||
| o The size of the initial packet payload has a fixed minimum (#267, | o The size of the initial packet payload has a fixed minimum (#267, | |||
| #472) | #472) | |||
| o Define when Version Negotiation packets are ignored (#284, #294, | o Define when Version Negotiation packets are ignored (#284, #294, | |||
| #241, #143, #474) | #241, #143, #474) | |||
| o The 64-bit FNV-1a algorithm is used for integrity protection of | o The 64-bit FNV-1a algorithm is used for integrity protection of | |||
| unprotected packets (#167, #480, #481, #517) | unprotected packets (#167, #480, #481, #517) | |||
| skipping to change at page 102, line 37 ¶ | skipping to change at page 104, line 37 ¶ | |||
| linkability (#232, #491, #496) | linkability (#232, #491, #496) | |||
| o Transport parameters for 0-RTT are retained from a previous | o Transport parameters for 0-RTT are retained from a previous | |||
| connection (#405, #513, #512) | connection (#405, #513, #512) | |||
| * A client in 0-RTT no longer required to reset excess streams | * A client in 0-RTT no longer required to reset excess streams | |||
| (#425, #479) | (#425, #479) | |||
| o Expanded security considerations (#440, #444, #445, #448) | o Expanded security considerations (#440, #444, #445, #448) | |||
| C.10. Since draft-ietf-quic-transport-01 | C.11. Since draft-ietf-quic-transport-01 | |||
| o Defined short and long packet headers (#40, #148, #361) | o Defined short and long packet headers (#40, #148, #361) | |||
| o Defined a versioning scheme and stable fields (#51, #361) | o Defined a versioning scheme and stable fields (#51, #361) | |||
| o Define reserved version values for "greasing" negotiation (#112, | o Define reserved version values for "greasing" negotiation (#112, | |||
| #278) | #278) | |||
| o The initial packet number is randomized (#35, #283) | o The initial packet number is randomized (#35, #283) | |||
| skipping to change at page 104, line 36 ¶ | skipping to change at page 106, line 36 ¶ | |||
| o Remove error code and reason phrase from GOAWAY (#352, #355) | o Remove error code and reason phrase from GOAWAY (#352, #355) | |||
| o GOAWAY includes a final stream number for both directions (#347) | o GOAWAY includes a final stream number for both directions (#347) | |||
| o Error codes for RST_STREAM and CONNECTION_CLOSE are now at a | o Error codes for RST_STREAM and CONNECTION_CLOSE are now at a | |||
| consistent offset (#249) | consistent offset (#249) | |||
| o Defined priority as the responsibility of the application protocol | o Defined priority as the responsibility of the application protocol | |||
| (#104, #303) | (#104, #303) | |||
| C.11. Since draft-ietf-quic-transport-00 | C.12. Since draft-ietf-quic-transport-00 | |||
| o Replaced DIVERSIFICATION_NONCE flag with KEY_PHASE flag | o Replaced DIVERSIFICATION_NONCE flag with KEY_PHASE flag | |||
| o Defined versioning | o Defined versioning | |||
| o Reworked description of packet and frame layout | o Reworked description of packet and frame layout | |||
| o Error code space is divided into regions for each component | o Error code space is divided into regions for each component | |||
| o Use big endian for all numeric values | o Use big endian for all numeric values | |||
| C.12. Since draft-hamilton-quic-transport-protocol-01 | C.13. Since draft-hamilton-quic-transport-protocol-01 | |||
| o Adopted as base for draft-ietf-quic-tls | o Adopted as base for draft-ietf-quic-tls | |||
| o Updated authors/editors list | o Updated authors/editors list | |||
| o Added IANA Considerations section | o Added IANA Considerations section | |||
| o Moved Contributors and Acknowledgments to appendices | o Moved Contributors and Acknowledgments to appendices | |||
| Authors' Addresses | Authors' Addresses | |||
| End of changes. 113 change blocks. | ||||
| 387 lines changed or deleted | 467 lines changed or added | |||
This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||