| draft-ietf-quic-transport-14.txt | draft-ietf-quic-transport-15.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: February 16, 2019 Mozilla | Expires: April 6, 2019 Mozilla | |||
| August 15, 2018 | October 03, 2018 | |||
| QUIC: A UDP-Based Multiplexed and Secure Transport | QUIC: A UDP-Based Multiplexed and Secure Transport | |||
| draft-ietf-quic-transport-14 | draft-ietf-quic-transport-15 | |||
| 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>. | <https://mailarchive.ietf.org/arch/search/?email_list=quic>. | |||
| Working Group information can be found at <https://github.com/ | Working Group information can be found at <https://github.com/ | |||
| quicwg>; 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 | |||
| skipping to change at page 1, line 44 ¶ | skipping to change at page 1, line 44 ¶ | |||
| 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 February 16, 2019. | This Internet-Draft will expire on April 6, 2019. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2018 IETF Trust and the persons identified as the | Copyright (c) 2018 IETF Trust and the persons identified as the | |||
| document authors. All rights reserved. | document authors. All rights reserved. | |||
| This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
| Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
| (https://trustee.ietf.org/license-info) in effect on the date of | (https://trustee.ietf.org/license-info) in effect on the date of | |||
| publication of this document. Please review these documents | publication of this document. Please review these documents | |||
| skipping to change at page 2, line 32 ¶ | skipping to change at page 2, line 32 ¶ | |||
| 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 5 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 5 | |||
| 2. Conventions and Definitions . . . . . . . . . . . . . . . . . 6 | 2. Conventions and Definitions . . . . . . . . . . . . . . . . . 6 | |||
| 2.1. Notational Conventions . . . . . . . . . . . . . . . . . 7 | 2.1. Notational Conventions . . . . . . . . . . . . . . . . . 7 | |||
| 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 . . . . . . . . . . . . . . . . . . . . . . 11 | 4.2. Short Header . . . . . . . . . . . . . . . . . . . . . . 11 | |||
| 4.3. Version Negotiation Packet . . . . . . . . . . . . . . . 12 | 4.3. Version Negotiation Packet . . . . . . . . . . . . . . . 12 | |||
| 4.4. Retry Packet . . . . . . . . . . . . . . . . . . . . . . 14 | 4.4. Retry Packet . . . . . . . . . . . . . . . . . . . . . . 14 | |||
| 4.5. Cryptographic Handshake Packets . . . . . . . . . . . . . 16 | 4.5. Cryptographic Handshake Packets . . . . . . . . . . . . . 16 | |||
| 4.6. Initial Packet . . . . . . . . . . . . . . . . . . . . . 16 | 4.6. Initial Packet . . . . . . . . . . . . . . . . . . . . . 17 | |||
| 4.6.1. Connection IDs . . . . . . . . . . . . . . . . . . . 18 | 4.6.1. Connection IDs . . . . . . . . . . . . . . . . . . . 18 | |||
| 4.6.2. Tokens . . . . . . . . . . . . . . . . . . . . . . . 19 | 4.6.2. Tokens . . . . . . . . . . . . . . . . . . . . . . . 19 | |||
| 4.6.3. Starting Packet Numbers . . . . . . . . . . . . . . . 20 | 4.6.3. Starting Packet Numbers . . . . . . . . . . . . . . . 20 | |||
| 4.6.4. 0-RTT Packet Numbers . . . . . . . . . . . . . . . . 20 | 4.6.4. 0-RTT Packet Numbers . . . . . . . . . . . . . . . . 20 | |||
| 4.6.5. Minimum Packet Size . . . . . . . . . . . . . . . . . 20 | 4.6.5. Minimum Packet Size . . . . . . . . . . . . . . . . . 21 | |||
| 4.7. Handshake Packet . . . . . . . . . . . . . . . . . . . . 21 | 4.7. Handshake Packet . . . . . . . . . . . . . . . . . . . . 21 | |||
| 4.8. Protected Packets . . . . . . . . . . . . . . . . . . . . 21 | 4.8. Protected Packets . . . . . . . . . . . . . . . . . . . . 22 | |||
| 4.9. Coalescing Packets . . . . . . . . . . . . . . . . . . . 22 | 4.9. Coalescing Packets . . . . . . . . . . . . . . . . . . . 22 | |||
| 4.10. Connection ID Encoding . . . . . . . . . . . . . . . . . 23 | 4.10. Connection ID Encoding . . . . . . . . . . . . . . . . . 23 | |||
| 4.11. Packet Numbers . . . . . . . . . . . . . . . . . . . . . 24 | 4.11. Packet Numbers . . . . . . . . . . . . . . . . . . . . . 24 | |||
| 5. Frames and Frame Types . . . . . . . . . . . . . . . . . . . 26 | 5. Frames and Frame Types . . . . . . . . . . . . . . . . . . . 27 | |||
| 5.1. Extension Frames . . . . . . . . . . . . . . . . . . . . 29 | 5.1. Extension Frames . . . . . . . . . . . . . . . . . . . . 30 | |||
| 6. Life of a Connection . . . . . . . . . . . . . . . . . . . . 29 | 6. Life of a Connection . . . . . . . . . . . . . . . . . . . . 30 | |||
| 6.1. Connection ID . . . . . . . . . . . . . . . . . . . . . . 30 | 6.1. Connection ID . . . . . . . . . . . . . . . . . . . . . . 31 | |||
| 6.2. Matching Packets to Connections . . . . . . . . . . . . . 31 | 6.1.1. Issuing Connection IDs . . . . . . . . . . . . . . . 31 | |||
| 6.2.1. Client Packet Handling . . . . . . . . . . . . . . . 31 | 6.1.2. Consuming and Retiring Connection IDs . . . . . . . . 32 | |||
| 6.2.2. Server Packet Handling . . . . . . . . . . . . . . . 32 | 6.2. Matching Packets to Connections . . . . . . . . . . . . . 32 | |||
| 6.3. Version Negotiation . . . . . . . . . . . . . . . . . . . 32 | 6.2.1. Client Packet Handling . . . . . . . . . . . . . . . 33 | |||
| 6.3.1. Sending Version Negotiation Packets . . . . . . . . . 33 | 6.2.2. Server Packet Handling . . . . . . . . . . . . . . . 33 | |||
| 6.3.2. Handling Version Negotiation Packets . . . . . . . . 33 | 6.3. Version Negotiation . . . . . . . . . . . . . . . . . . . 34 | |||
| 6.3.3. Using Reserved Versions . . . . . . . . . . . . . . . 34 | 6.3.1. Sending Version Negotiation Packets . . . . . . . . . 34 | |||
| 6.4. Cryptographic and Transport Handshake . . . . . . . . . . 34 | 6.3.2. Handling Version Negotiation Packets . . . . . . . . 35 | |||
| 6.5. Example Handshake Flows . . . . . . . . . . . . . . . . . 35 | 6.3.3. Using Reserved Versions . . . . . . . . . . . . . . . 35 | |||
| 6.6. Transport Parameters . . . . . . . . . . . . . . . . . . 37 | 6.4. Cryptographic and Transport Handshake . . . . . . . . . . 36 | |||
| 6.6.1. Transport Parameter Definitions . . . . . . . . . . . 39 | 6.5. Example Handshake Flows . . . . . . . . . . . . . . . . . 37 | |||
| 6.6.2. Values of Transport Parameters for 0-RTT . . . . . . 41 | 6.6. Transport Parameters . . . . . . . . . . . . . . . . . . 38 | |||
| 6.6.3. New Transport Parameters . . . . . . . . . . . . . . 42 | 6.6.1. Transport Parameter Definitions . . . . . . . . . . . 41 | |||
| 6.6.4. Version Negotiation Validation . . . . . . . . . . . 42 | 6.6.2. Values of Transport Parameters for 0-RTT . . . . . . 43 | |||
| 6.7. Stateless Retries . . . . . . . . . . . . . . . . . . . . 44 | 6.6.3. New Transport Parameters . . . . . . . . . . . . . . 44 | |||
| 6.8. Using Explicit Congestion Notification . . . . . . . . . 44 | 6.6.4. Version Negotiation Validation . . . . . . . . . . . 45 | |||
| 6.9. Proof of Source Address Ownership . . . . . . . . . . . . 46 | 6.7. Stateless Retries . . . . . . . . . . . . . . . . . . . . 46 | |||
| 6.9.1. Client Address Validation Procedure . . . . . . . . . 47 | 6.8. Using Explicit Congestion Notification . . . . . . . . . 46 | |||
| 6.9.2. Address Validation for Future Connections . . . . . . 47 | 6.9. Proof of Source Address Ownership . . . . . . . . . . . . 48 | |||
| 6.9.3. Address Validation Token Integrity . . . . . . . . . 48 | 6.9.1. Client Address Validation Procedure . . . . . . . . . 49 | |||
| 6.10. Path Validation . . . . . . . . . . . . . . . . . . . . . 48 | 6.9.2. Address Validation for Future Connections . . . . . . 50 | |||
| 6.10.1. Initiation . . . . . . . . . . . . . . . . . . . . . 49 | 6.9.3. Address Validation Token Integrity . . . . . . . . . 50 | |||
| 6.10.2. Response . . . . . . . . . . . . . . . . . . . . . . 49 | 6.10. Path Validation . . . . . . . . . . . . . . . . . . . . . 51 | |||
| 6.10.3. Completion . . . . . . . . . . . . . . . . . . . . . 50 | 6.10.1. Initiation . . . . . . . . . . . . . . . . . . . . . 51 | |||
| 6.10.4. Abandonment . . . . . . . . . . . . . . . . . . . . 50 | 6.10.2. Response . . . . . . . . . . . . . . . . . . . . . . 52 | |||
| 6.11. Connection Migration . . . . . . . . . . . . . . . . . . 51 | 6.10.3. Completion . . . . . . . . . . . . . . . . . . . . . 52 | |||
| 6.11.1. Probing a New Path . . . . . . . . . . . . . . . . . 51 | 6.10.4. Abandonment . . . . . . . . . . . . . . . . . . . . 53 | |||
| 6.11.2. Initiating Connection Migration . . . . . . . . . . 52 | 6.11. Connection Migration . . . . . . . . . . . . . . . . . . 53 | |||
| 6.11.3. Responding to Connection Migration . . . . . . . . . 52 | 6.11.1. Probing a New Path . . . . . . . . . . . . . . . . . 54 | |||
| 6.11.4. Loss Detection and Congestion Control . . . . . . . 54 | 6.11.2. Initiating Connection Migration . . . . . . . . . . 54 | |||
| 6.11.5. Privacy Implications of Connection Migration . . . . 55 | 6.11.3. Responding to Connection Migration . . . . . . . . . 55 | |||
| 6.12. Server's Preferred Address . . . . . . . . . . . . . . . 55 | 6.11.4. Loss Detection and Congestion Control . . . . . . . 56 | |||
| 6.12.1. Communicating A Preferred Address . . . . . . . . . 56 | 6.11.5. Privacy Implications of Connection Migration . . . . 57 | |||
| 6.12.2. Responding to Connection Migration . . . . . . . . . 56 | 6.12. Server's Preferred Address . . . . . . . . . . . . . . . 58 | |||
| 6.12.1. Communicating A Preferred Address . . . . . . . . . 59 | ||||
| 6.12.2. Responding to Connection Migration . . . . . . . . . 59 | ||||
| 6.12.3. Interaction of Client Migration and Preferred | 6.12.3. Interaction of Client Migration and Preferred | |||
| Address . . . . . . . . . . . . . . . . . . . . . . 56 | Address . . . . . . . . . . . . . . . . . . . . . . 59 | |||
| 6.13. Connection Termination . . . . . . . . . . . . . . . . . 57 | 6.13. Connection Termination . . . . . . . . . . . . . . . . . 60 | |||
| 6.13.1. Closing and Draining Connection States . . . . . . . 57 | 6.13.1. Closing and Draining Connection States . . . . . . . 60 | |||
| 6.13.2. Idle Timeout . . . . . . . . . . . . . . . . . . . . 58 | 6.13.2. Idle Timeout . . . . . . . . . . . . . . . . . . . . 61 | |||
| 6.13.3. Immediate Close . . . . . . . . . . . . . . . . . . 59 | 6.13.3. Immediate Close . . . . . . . . . . . . . . . . . . 62 | |||
| 6.13.4. Stateless Reset . . . . . . . . . . . . . . . . . . 60 | 6.13.4. Stateless Reset . . . . . . . . . . . . . . . . . . 63 | |||
| 7. Frame Types and Formats . . . . . . . . . . . . . . . . . . . 64 | 7. Frame Types and Formats . . . . . . . . . . . . . . . . . . . 67 | |||
| 7.1. Variable-Length Integer Encoding . . . . . . . . . . . . 64 | 7.1. Variable-Length Integer Encoding . . . . . . . . . . . . 67 | |||
| 7.2. PADDING Frame . . . . . . . . . . . . . . . . . . . . . . 65 | 7.2. PADDING Frame . . . . . . . . . . . . . . . . . . . . . . 68 | |||
| 7.3. RST_STREAM Frame . . . . . . . . . . . . . . . . . . . . 65 | 7.3. RST_STREAM Frame . . . . . . . . . . . . . . . . . . . . 68 | |||
| 7.4. CONNECTION_CLOSE frame . . . . . . . . . . . . . . . . . 66 | 7.4. CONNECTION_CLOSE frame . . . . . . . . . . . . . . . . . 69 | |||
| 7.5. APPLICATION_CLOSE frame . . . . . . . . . . . . . . . . . 67 | 7.5. APPLICATION_CLOSE frame . . . . . . . . . . . . . . . . . 70 | |||
| 7.6. MAX_DATA Frame . . . . . . . . . . . . . . . . . . . . . 68 | 7.6. MAX_DATA Frame . . . . . . . . . . . . . . . . . . . . . 71 | |||
| 7.7. MAX_STREAM_DATA Frame . . . . . . . . . . . . . . . . . . 69 | 7.7. MAX_STREAM_DATA Frame . . . . . . . . . . . . . . . . . . 72 | |||
| 7.8. MAX_STREAM_ID Frame . . . . . . . . . . . . . . . . . . . 70 | 7.8. MAX_STREAM_ID Frame . . . . . . . . . . . . . . . . . . . 73 | |||
| 7.9. PING Frame . . . . . . . . . . . . . . . . . . . . . . . 70 | 7.9. PING Frame . . . . . . . . . . . . . . . . . . . . . . . 73 | |||
| 7.10. BLOCKED Frame . . . . . . . . . . . . . . . . . . . . . . 71 | 7.10. BLOCKED Frame . . . . . . . . . . . . . . . . . . . . . . 74 | |||
| 7.11. STREAM_BLOCKED Frame . . . . . . . . . . . . . . . . . . 71 | 7.11. STREAM_BLOCKED Frame . . . . . . . . . . . . . . . . . . 74 | |||
| 7.12. STREAM_ID_BLOCKED Frame . . . . . . . . . . . . . . . . . 72 | 7.12. STREAM_ID_BLOCKED Frame . . . . . . . . . . . . . . . . . 75 | |||
| 7.13. NEW_CONNECTION_ID Frame . . . . . . . . . . . . . . . . . 72 | 7.13. NEW_CONNECTION_ID Frame . . . . . . . . . . . . . . . . . 75 | |||
| 7.14. STOP_SENDING Frame . . . . . . . . . . . . . . . . . . . 74 | 7.14. RETIRE_CONNECTION_ID Frame . . . . . . . . . . . . . . . 77 | |||
| 7.15. ACK Frame . . . . . . . . . . . . . . . . . . . . . . . . 74 | 7.15. STOP_SENDING Frame . . . . . . . . . . . . . . . . . . . 77 | |||
| 7.15.1. ACK Block Section . . . . . . . . . . . . . . . . . 76 | 7.16. ACK Frame . . . . . . . . . . . . . . . . . . . . . . . . 78 | |||
| 7.15.2. Sending ACK Frames . . . . . . . . . . . . . . . . . 77 | 7.16.1. ACK Block Section . . . . . . . . . . . . . . . . . 79 | |||
| 7.15.3. ACK Frames and Packet Protection . . . . . . . . . . 78 | 7.16.2. ECN section . . . . . . . . . . . . . . . . . . . . 81 | |||
| 7.16. ACK_ECN Frame . . . . . . . . . . . . . . . . . . . . . . 78 | 7.16.3. Sending ACK Frames . . . . . . . . . . . . . . . . . 82 | |||
| 7.17. PATH_CHALLENGE Frame . . . . . . . . . . . . . . . . . . 79 | 7.16.4. ACK Frames and Packet Protection . . . . . . . . . . 83 | |||
| 7.18. PATH_RESPONSE Frame . . . . . . . . . . . . . . . . . . . 80 | 7.17. PATH_CHALLENGE Frame . . . . . . . . . . . . . . . . . . 83 | |||
| 7.19. NEW_TOKEN frame . . . . . . . . . . . . . . . . . . . . . 80 | 7.18. PATH_RESPONSE Frame . . . . . . . . . . . . . . . . . . . 84 | |||
| 7.20. STREAM Frames . . . . . . . . . . . . . . . . . . . . . . 80 | 7.19. NEW_TOKEN frame . . . . . . . . . . . . . . . . . . . . . 84 | |||
| 7.21. CRYPTO Frame . . . . . . . . . . . . . . . . . . . . . . 82 | 7.20. STREAM Frames . . . . . . . . . . . . . . . . . . . . . . 84 | |||
| 8. Packetization and Reliability . . . . . . . . . . . . . . . . 83 | 7.21. CRYPTO Frame . . . . . . . . . . . . . . . . . . . . . . 86 | |||
| 8.1. Packet Processing and Acknowledgment . . . . . . . . . . 84 | 8. Packetization and Reliability . . . . . . . . . . . . . . . . 87 | |||
| 8.2. Retransmission of Information . . . . . . . . . . . . . . 84 | 8.1. Packet Processing and Acknowledgment . . . . . . . . . . 87 | |||
| 8.3. Packet Size . . . . . . . . . . . . . . . . . . . . . . . 86 | 8.2. Retransmission of Information . . . . . . . . . . . . . . 88 | |||
| 8.4. Path Maximum Transmission Unit . . . . . . . . . . . . . 87 | 8.3. Packet Size . . . . . . . . . . . . . . . . . . . . . . . 90 | |||
| 8.4.1. IPv4 PMTU Discovery . . . . . . . . . . . . . . . . . 87 | 8.4. Path Maximum Transmission Unit . . . . . . . . . . . . . 90 | |||
| 8.4.1. IPv4 PMTU Discovery . . . . . . . . . . . . . . . . . 91 | ||||
| 8.4.2. Special Considerations for Packetization Layer PMTU | 8.4.2. Special Considerations for Packetization Layer PMTU | |||
| Discovery . . . . . . . . . . . . . . . . . . . . . . 88 | Discovery . . . . . . . . . . . . . . . . . . . . . . 92 | |||
| 9. Streams: QUIC's Data Structuring Abstraction . . . . . . . . 88 | 9. Streams: QUIC's Data Structuring Abstraction . . . . . . . . 92 | |||
| 9.1. Stream Identifiers . . . . . . . . . . . . . . . . . . . 89 | 9.1. Stream Identifiers . . . . . . . . . . . . . . . . . . . 93 | |||
| 9.2. Stream States . . . . . . . . . . . . . . . . . . . . . . 90 | 9.2. Stream States . . . . . . . . . . . . . . . . . . . . . . 94 | |||
| 9.2.1. Send Stream States . . . . . . . . . . . . . . . . . 91 | 9.2.1. Send Stream States . . . . . . . . . . . . . . . . . 95 | |||
| 9.2.2. Receive Stream States . . . . . . . . . . . . . . . . 93 | 9.2.2. Receive Stream States . . . . . . . . . . . . . . . . 97 | |||
| 9.2.3. Permitted Frame Types . . . . . . . . . . . . . . . . 96 | 9.2.3. Permitted Frame Types . . . . . . . . . . . . . . . . 99 | |||
| 9.2.4. Bidirectional Stream States . . . . . . . . . . . . . 96 | 9.2.4. Bidirectional Stream States . . . . . . . . . . . . . 99 | |||
| 9.3. Solicited State Transitions . . . . . . . . . . . . . . . 97 | 9.3. Solicited State Transitions . . . . . . . . . . . . . . . 101 | |||
| 9.4. Stream Concurrency . . . . . . . . . . . . . . . . . . . 98 | 9.4. Stream Concurrency . . . . . . . . . . . . . . . . . . . 101 | |||
| 9.5. Sending and Receiving Data . . . . . . . . . . . . . . . 99 | 9.5. Sending and Receiving Data . . . . . . . . . . . . . . . 102 | |||
| 9.6. Stream Prioritization . . . . . . . . . . . . . . . . . . 99 | 9.6. Stream Prioritization . . . . . . . . . . . . . . . . . . 102 | |||
| 10. Flow Control . . . . . . . . . . . . . . . . . . . . . . . . 100 | 10. Flow Control . . . . . . . . . . . . . . . . . . . . . . . . 103 | |||
| 10.1. Edge Cases and Other Considerations . . . . . . . . . . 101 | 10.1. Edge Cases and Other Considerations . . . . . . . . . . 105 | |||
| 10.1.1. Response to a RST_STREAM . . . . . . . . . . . . . . 102 | 10.1.1. Response to a RST_STREAM . . . . . . . . . . . . . . 105 | |||
| 10.1.2. Data Limit Increments . . . . . . . . . . . . . . . 102 | 10.1.2. Data Limit Increments . . . . . . . . . . . . . . . 105 | |||
| 10.2. Stream Limit Increment . . . . . . . . . . . . . . . . . 103 | 10.2. Stream Limit Increment . . . . . . . . . . . . . . . . . 106 | |||
| 10.2.1. Blocking on Flow Control . . . . . . . . . . . . . . 103 | 10.2.1. Blocking on Flow Control . . . . . . . . . . . . . . 106 | |||
| 10.3. Stream Final Offset . . . . . . . . . . . . . . . . . . 103 | 10.3. Stream Final Offset . . . . . . . . . . . . . . . . . . 107 | |||
| 10.4. Flow Control for Cryptographic Handshake . . . . . . . . 104 | 10.4. Flow Control for Cryptographic Handshake . . . . . . . . 107 | |||
| 11. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 104 | 11. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 107 | |||
| 11.1. Connection Errors . . . . . . . . . . . . . . . . . . . 104 | 11.1. Connection Errors . . . . . . . . . . . . . . . . . . . 108 | |||
| 11.2. Stream Errors . . . . . . . . . . . . . . . . . . . . . 105 | 11.2. Stream Errors . . . . . . . . . . . . . . . . . . . . . 108 | |||
| 11.3. Transport Error Codes . . . . . . . . . . . . . . . . . 105 | 11.3. Transport Error Codes . . . . . . . . . . . . . . . . . 109 | |||
| 11.4. Application Protocol Error Codes . . . . . . . . . . . . 107 | 11.4. Application Protocol Error Codes . . . . . . . . . . . . 110 | |||
| 12. Security Considerations . . . . . . . . . . . . . . . . . . . 107 | 12. Security Considerations . . . . . . . . . . . . . . . . . . . 110 | |||
| 12.1. Handshake Denial of Service . . . . . . . . . . . . . . 107 | 12.1. Handshake Denial of Service . . . . . . . . . . . . . . 110 | |||
| 12.2. Spoofed ACK Attack . . . . . . . . . . . . . . . . . . . 108 | 12.2. Spoofed ACK Attack . . . . . . . . . . . . . . . . . . . 111 | |||
| 12.3. Optimistic ACK Attack . . . . . . . . . . . . . . . . . 109 | 12.3. Optimistic ACK Attack . . . . . . . . . . . . . . . . . 112 | |||
| 12.4. Slowloris Attacks . . . . . . . . . . . . . . . . . . . 109 | 12.4. Slowloris Attacks . . . . . . . . . . . . . . . . . . . 112 | |||
| 12.5. Stream Fragmentation and Reassembly Attacks . . . . . . 109 | 12.5. Stream Fragmentation and Reassembly Attacks . . . . . . 113 | |||
| 12.6. Stream Commitment Attack . . . . . . . . . . . . . . . . 110 | 12.6. Stream Commitment Attack . . . . . . . . . . . . . . . . 113 | |||
| 12.7. Explicit Congestion Notification Attacks . . . . . . . . 110 | 12.7. Explicit Congestion Notification Attacks . . . . . . . . 114 | |||
| 12.8. Stateless Reset Oracle . . . . . . . . . . . . . . . . . 110 | 12.8. Stateless Reset Oracle . . . . . . . . . . . . . . . . . 114 | |||
| 13. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 111 | 13. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 114 | |||
| 13.1. QUIC Transport Parameter Registry . . . . . . . . . . . 111 | 13.1. QUIC Transport Parameter Registry . . . . . . . . . . . 114 | |||
| 13.2. QUIC Frame Type Registry . . . . . . . . . . . . . . . . 112 | 13.2. QUIC Frame Type Registry . . . . . . . . . . . . . . . . 116 | |||
| 13.3. QUIC Transport Error Codes Registry . . . . . . . . . . 113 | 13.3. QUIC Transport Error Codes Registry . . . . . . . . . . 117 | |||
| 14. References . . . . . . . . . . . . . . . . . . . . . . . . . 115 | 14. References . . . . . . . . . . . . . . . . . . . . . . . . . 120 | |||
| 14.1. Normative References . . . . . . . . . . . . . . . . . . 115 | 14.1. Normative References . . . . . . . . . . . . . . . . . . 120 | |||
| 14.2. Informative References . . . . . . . . . . . . . . . . . 116 | 14.2. Informative References . . . . . . . . . . . . . . . . . 121 | |||
| Appendix A. Sample Packet Number Decoding Algorithm . . . . . . 117 | Appendix A. Sample Packet Number Decoding Algorithm . . . . . . 122 | |||
| Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 118 | Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 123 | |||
| B.1. Since draft-ietf-quic-transport-13 . . . . . . . . . . . 118 | B.1. Since draft-ietf-quic-transport-14 . . . . . . . . . . . 123 | |||
| B.2. Since draft-ietf-quic-transport-12 . . . . . . . . . . . 119 | B.2. Since draft-ietf-quic-transport-13 . . . . . . . . . . . 124 | |||
| B.3. Since draft-ietf-quic-transport-11 . . . . . . . . . . . 120 | B.3. Since draft-ietf-quic-transport-12 . . . . . . . . . . . 124 | |||
| B.4. Since draft-ietf-quic-transport-10 . . . . . . . . . . . 120 | B.4. Since draft-ietf-quic-transport-11 . . . . . . . . . . . 125 | |||
| B.5. Since draft-ietf-quic-transport-09 . . . . . . . . . . . 121 | B.5. Since draft-ietf-quic-transport-10 . . . . . . . . . . . 126 | |||
| B.6. Since draft-ietf-quic-transport-08 . . . . . . . . . . . 121 | B.6. Since draft-ietf-quic-transport-09 . . . . . . . . . . . 126 | |||
| B.7. Since draft-ietf-quic-transport-07 . . . . . . . . . . . 122 | B.7. Since draft-ietf-quic-transport-08 . . . . . . . . . . . 127 | |||
| B.8. Since draft-ietf-quic-transport-06 . . . . . . . . . . . 123 | B.8. Since draft-ietf-quic-transport-07 . . . . . . . . . . . 127 | |||
| B.9. Since draft-ietf-quic-transport-05 . . . . . . . . . . . 123 | B.9. Since draft-ietf-quic-transport-06 . . . . . . . . . . . 128 | |||
| B.10. Since draft-ietf-quic-transport-04 . . . . . . . . . . . 124 | B.10. Since draft-ietf-quic-transport-05 . . . . . . . . . . . 129 | |||
| B.11. Since draft-ietf-quic-transport-03 . . . . . . . . . . . 124 | B.11. Since draft-ietf-quic-transport-04 . . . . . . . . . . . 129 | |||
| B.12. Since draft-ietf-quic-transport-02 . . . . . . . . . . . 125 | B.12. Since draft-ietf-quic-transport-03 . . . . . . . . . . . 130 | |||
| B.13. Since draft-ietf-quic-transport-01 . . . . . . . . . . . 126 | B.13. Since draft-ietf-quic-transport-02 . . . . . . . . . . . 130 | |||
| B.14. Since draft-ietf-quic-transport-00 . . . . . . . . . . . 128 | B.14. Since draft-ietf-quic-transport-01 . . . . . . . . . . . 131 | |||
| B.15. Since draft-hamilton-quic-transport-protocol-01 . . . . . 128 | B.15. Since draft-ietf-quic-transport-00 . . . . . . . . . . . 133 | |||
| Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 128 | B.16. Since draft-hamilton-quic-transport-protocol-01 . . . . . 133 | |||
| Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . 128 | Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 133 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 129 | Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . 134 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 134 | ||||
| 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 5, line 47 ¶ | skipping to change at page 6, line 4 ¶ | |||
| 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 | |||
| o Low-latency connection establishment | o Low-latency connection establishment | |||
| o Authenticated and encrypted header and payload | o Authenticated and encrypted header and payload | |||
| o Stream multiplexing | o Stream multiplexing | |||
| o Stream and connection-level flow control | o Stream and connection-level flow control | |||
| o Connection migration and resilience to NAT rebinding | o Connection migration and resilience to NAT rebinding | |||
| QUIC implements techniques learned from experience with TCP, SCTP and | QUIC uses UDP as a substrate to avoid requiring changes in legacy | |||
| other transport protocols. QUIC uses UDP as substrate so as to not | client operating systems and middleboxes. QUIC authenticates all of | |||
| require changes to legacy client operating systems and middleboxes to | its headers and encrypts most of the data it exchanges, including its | |||
| be deployable. QUIC authenticates all of its headers and encrypts | signaling. This allows the protocol to evolve without incurring a | |||
| most of the data it exchanges, including its signaling. This allows | dependency on upgrades to middleboxes. | |||
| the protocol to evolve without incurring a dependency on upgrades to | ||||
| middleboxes. This document describes the core QUIC protocol, | This document describes the core QUIC protocol, including the | |||
| including the conceptual design, wire format, and mechanisms of the | conceptual design, wire format, and mechanisms of the QUIC protocol | |||
| QUIC protocol for connection establishment, stream multiplexing, | for connection establishment, stream multiplexing, stream and | |||
| stream and connection-level flow control, connection migration, and | connection-level flow control, connection migration, and data | |||
| data reliability. | reliability. | |||
| Accompanying documents describe QUIC's loss detection and congestion | Accompanying documents describe QUIC's loss detection and congestion | |||
| control [QUIC-RECOVERY], and the use of TLS 1.3 for key negotiation | control [QUIC-RECOVERY], and the use of TLS 1.3 for key negotiation | |||
| [QUIC-TLS]. | [QUIC-TLS]. | |||
| QUIC version 1 conforms to the protocol invariants in | QUIC version 1 conforms to the protocol invariants in | |||
| [QUIC-INVARIANTS]. | [QUIC-INVARIANTS]. | |||
| 2. Conventions and Definitions | 2. Conventions and Definitions | |||
| skipping to change at page 7, line 5 ¶ | skipping to change at page 7, line 9 ¶ | |||
| Stream: A logical, bi-directional channel of ordered bytes within a | Stream: A logical, bi-directional channel of ordered bytes within a | |||
| QUIC connection. | QUIC connection. | |||
| Connection: A conversation between two QUIC endpoints with a single | Connection: A conversation between two QUIC endpoints with a single | |||
| encryption context that multiplexes streams within it. | encryption context that multiplexes streams within it. | |||
| Connection ID: An opaque identifier that is used to identify a QUIC | Connection ID: An opaque identifier that is used to identify a QUIC | |||
| connection at an endpoint. Each endpoint sets a value that its | connection at an endpoint. Each endpoint sets a value that its | |||
| peer includes in packets. | peer includes in packets. | |||
| QUIC packet: A well-formed UDP payload that can be parsed by a QUIC | QUIC packet: The smallest unit of data that can be exchanged by QUIC | |||
| receiver. | endpoints. | |||
| QUIC is a name, not an acronym. | QUIC is a name, not an acronym. | |||
| 2.1. Notational Conventions | 2.1. Notational Conventions | |||
| Packet and frame diagrams use the format described in Section 3.1 of | Packet and frame diagrams use the format described in Section 3.1 of | |||
| [RFC2360], with the following additional conventions: | [RFC2360], with the following additional conventions: | |||
| [x] Indicates that x is optional | [x] Indicates that x is optional | |||
| skipping to change at page 11, line 12 ¶ | skipping to change at page 11, line 12 ¶ | |||
| 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. | |||
| The end of the packet is determined by the Length field. The Length | The end of the packet is determined by the Length field. The Length | |||
| field covers the both the Packet Number and Payload fields, both of | field covers both the Packet Number and Payload fields, both of which | |||
| which are confidentiality protected and initially of unknown length. | are confidentiality protected and initially of unknown length. The | |||
| The size of the Payload field is learned once the packet number | size of the Payload field is learned once the packet number | |||
| protection is removed. | protection is removed. | |||
| Senders can sometimes coalesce multiple packets into one UDP | Senders can sometimes coalesce multiple packets into one UDP | |||
| datagram. See Section 4.9 for more details. | datagram. See Section 4.9 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 | |||
| +-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+ | |||
| skipping to change at page 12, line 13 ¶ | skipping to change at page 12, line 13 ¶ | |||
| Third Bit: The third bit (0x20) of octet 0 is set to 1. | Third Bit: The third bit (0x20) of octet 0 is set to 1. | |||
| [[Editor's Note: this section should be removed and the bit | [[Editor's Note: this section should be removed and the bit | |||
| definitions changed before this draft goes to the IESG.]] | definitions changed before this draft goes to the IESG.]] | |||
| Fourth Bit: The fourth bit (0x10) of octet 0 is set to 1. | Fourth Bit: The fourth bit (0x10) of octet 0 is set to 1. | |||
| [[Editor's Note: this section should be removed and the bit | [[Editor's Note: this section should be removed and the bit | |||
| 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 Demultiplexing Bit: The fifth bit (0x8) of octet 0 is | |||
| to 0. This allows implementations of Google QUIC to distinguish | set to 0. This allows implementations of Google QUIC to | |||
| Google QUIC packets from short header packets sent by a client | distinguish Google QUIC packets from short header packets sent by | |||
| because Google QUIC servers expect the connection ID to always be | a client because Google QUIC servers expect the connection ID to | |||
| present. The special interpretation of this bit SHOULD be removed | always be present. The special interpretation of this bit SHOULD | |||
| from this specification when Google QUIC has finished | be removed from this specification when Google QUIC has finished | |||
| transitioning to the new header format. | transitioning to the new header format. | |||
| Reserved: The sixth, seventh, and eighth bits (0x7) of octet 0 are | Reserved: The sixth, seventh, and eighth bits (0x7) of octet 0 are | |||
| reserved for experimentation. Endpoints MUST ignore these bits on | reserved for experimentation. Endpoints MUST ignore these bits on | |||
| packets they receive unless they are participating in an | packets they receive unless they are participating in an | |||
| experiment that uses these bits. An endpoint not actively using | experiment that uses these bits. An endpoint not actively using | |||
| these bits SHOULD set the value randomly on packets they send to | these bits SHOULD set the value randomly on packets they send to | |||
| protect against unwanted inference about particular values. | protect against unwanted inference about particular values. | |||
| Destination Connection ID: The Destination Connection ID is a | Destination Connection ID: The Destination Connection ID is a | |||
| skipping to change at page 14, line 45 ¶ | skipping to change at page 14, line 45 ¶ | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | ODCIL(8) | Original Destination Connection ID (*) | | | ODCIL(8) | Original Destination Connection ID (*) | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Retry Token (*) ... | | Retry Token (*) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Figure 4: Retry Packet | Figure 4: Retry Packet | |||
| A Retry packet (shown in Figure 4) only uses the invariant portion of | A Retry packet (shown in Figure 4) only uses the invariant portion of | |||
| the long packet header [QUIC-INVARIANTS]; that is, the fields up to | the long packet header [QUIC-INVARIANTS]; that is, the fields up to | |||
| and including the Destination and Source Connection ID fields. The | and including the Destination and Source Connection ID fields. A | |||
| contents of the Retry packet are not protected. Like Version | Retry packet does not contain any protected fields. Like Version | |||
| Negotiation, a Retry packet contains the long header including the | Negotiation, a Retry packet contains the long header including the | |||
| connection IDs, but omits the Length, Packet Number, and Payload | connection IDs, but omits the Length, Packet Number, and Payload | |||
| fields. These are replaced with: | fields. These are replaced with: | |||
| ODCIL: The length of the Original Destination Connection ID field. | ODCIL: The length of the Original Destination Connection ID field. | |||
| The length is encoded in the least significant 4 bits of the | The length is encoded in the least significant 4 bits of the | |||
| octet, using the same encoding as the DCIL and SCIL fields. The | octet, using the same encoding as the DCIL and SCIL fields. The | |||
| most significant 4 bits of this octet are reserved. Unless a use | most significant 4 bits of this octet are reserved. Unless a use | |||
| for these bits has been negotiated, endpoints SHOULD send | for these bits has been negotiated, endpoints SHOULD send | |||
| randomized values and MUST ignore any value that it receives. | randomized values and MUST ignore any value that it receives. | |||
| skipping to change at page 15, line 22 ¶ | skipping to change at page 15, line 22 ¶ | |||
| length of this field is given in ODCIL. | length of this field is given in ODCIL. | |||
| Retry Token: An opaque token that the server can use to validate the | Retry Token: An opaque token that the server can use to validate the | |||
| client's address. | client's address. | |||
| 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. | the Initial packet. | |||
| 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. This value MUST not be equal to the Destination | |||
| Destination Connection ID of subsequent packets that it sends. | Connection ID field of the packet sent by the client. The client | |||
| MUST use this connection ID in the Destination Connection ID of | ||||
| subsequent packets that it sends. | ||||
| A Retry packet does not include a packet number and cannot be | A server MAY send Retry packets in response to Initial and 0-RTT | |||
| explicitly acknowledged by a client. | packets. A server can either discard or buffer 0-RTT packets that it | |||
| receives. A server can send multiple Retry packets as it receives | ||||
| Initial or 0-RTT packets. | ||||
| A server MUST NOT send a Retry in response to packets other than | A client MUST accept and process at most one Retry packet for each | |||
| Initial or 0-RTT packets. A server MAY choose to only send Retry in | connection attempt. After the client has received and processed an | |||
| response to Initial packets and discard or buffer 0-RTT packets | Initial or Retry packet from the server, it MUST discard any | |||
| corresponding to unvalidated client addresses. | subsequent Retry packets that it receives. | |||
| If the Original Destination Connection ID field does not match the | Clients MUST discard Retry packets that contain an Original | |||
| Destination Connection ID from the most recent Initial packet it | Destination Connection ID field that does not match the Destination | |||
| sent, clients MUST discard the packet. This prevents an off-path | Connection ID from its Initial packet. This prevents an off-path | |||
| attacker from injecting a Retry packet. | attacker from injecting a Retry packet. | |||
| The client responds to a Retry packet with an Initial packet that | The client responds to a Retry packet with an Initial packet that | |||
| includes the provided Retry Token to continue connection | includes the provided Retry Token to continue connection | |||
| establishment. | establishment. | |||
| A client sets the Destination Connection ID field of this Initial | ||||
| packet to the value from the Source Connection ID in the Retry | ||||
| packet. Changing Destination Connection ID also results in a change | ||||
| to the keys used to protect the Initial packet. It also sets the | ||||
| Token field to the token provided in the Retry. The client MUST NOT | ||||
| change the Source Connection ID because the server could include the | ||||
| connection ID as part of its token validation logic (see | ||||
| Section 4.6.2). | ||||
| All subsequent Initial packets from the client MUST use the | ||||
| connection ID and token values from the Retry packet. Aside from | ||||
| this, the Initial packet sent by the client is subject to the same | ||||
| restrictions as the first Initial packet. A client can either reuse | ||||
| the cryptographic handshake message or construct a new one at its | ||||
| discretion. | ||||
| A client MAY attempt 0-RTT after receiving a Retry packet by sending | A client MAY attempt 0-RTT after receiving a Retry packet by sending | |||
| 0-RTT packets to the connection ID provided by the server. A client | 0-RTT packets to the connection ID provided by the server. A client | |||
| that sends additional 0-RTT packets MUST NOT reset the packet number | that sends additional 0-RTT packets without constructing a new | |||
| to 0 after a Retry packet, see Section 4.6.4. | cryptographic handshake message MUST NOT reset the packet number to 0 | |||
| after a Retry packet, see Section 4.6.4. | ||||
| A server that might send another Retry packet in response to a | A server acknowledges the use of a Retry packet for a connection | |||
| subsequent Initial packet MUST set the Source Connection ID to a new | using the original_connection_id transport parameter (see | |||
| value of at least 8 octets in length. This allows clients to | Section 6.6.1). If the server sends a Retry packet, it MUST include | |||
| distinguish between Retry packets when the server sends multiple | the value of the Original Destination Connection ID field of the | |||
| rounds of Retry packets. Consequently, a valid Retry packet will | Retry packet (that is, the Destination Connection ID field from the | |||
| always have an Original Destination Connection ID that is at least 8 | client's first Initial packet) in the transport parameter. | |||
| octets long; clients MUST discard Retry packets that include a | ||||
| shorter value. A server that will not send additional Retry packets | If the client received and processed a Retry packet, it validates | |||
| can set the Source Connection ID to any value. | that the original_connection_id transport parameter is present and | |||
| correct; otherwise, it validates that the transport parameter is | ||||
| absent. A client MUST treat a failed validation as a connection | ||||
| error of type TRANSPORT_PARAMETER_ERROR. | ||||
| A Retry packet does not include a packet number and cannot be | ||||
| explicitly acknowledged by a client. | ||||
| 4.5. Cryptographic Handshake Packets | 4.5. Cryptographic Handshake Packets | |||
| Once version negotiation is complete, the cryptographic handshake is | Once version negotiation is complete, the cryptographic handshake is | |||
| used to agree on cryptographic keys. The cryptographic handshake is | used to agree on cryptographic keys. The cryptographic handshake is | |||
| carried in Initial (Section 4.6) and Handshake (Section 4.7) packets. | carried in Initial (Section 4.6) and Handshake (Section 4.7) packets. | |||
| All these packets use the long header and contain the current QUIC | All these packets use the long header and contain the current QUIC | |||
| version in the version field. | version in the version field. | |||
| skipping to change at page 18, line 7 ¶ | skipping to change at page 18, line 18 ¶ | |||
| message needs to be created, such as the packets sent after receiving | message needs to be created, such as the packets sent after receiving | |||
| a Version Negotiation (Section 4.3) or Retry packet (Section 4.4). | a Version Negotiation (Section 4.3) or Retry packet (Section 4.4). | |||
| A server sends its first Initial packet in response to a client | A server sends its first Initial packet in response to a client | |||
| Initial. A server may send multiple Initial packets. The | Initial. A server may send multiple Initial packets. The | |||
| cryptographic key exchange could require multiple round trips or | cryptographic key exchange could require multiple round trips or | |||
| retransmissions of this data. | retransmissions of this data. | |||
| The payload of an Initial packet includes a CRYPTO frame (or frames) | The payload of an Initial packet includes a CRYPTO frame (or frames) | |||
| containing a cryptographic handshake message, ACK frames, or both. | containing a cryptographic handshake message, ACK frames, or both. | |||
| PADDING frames are also permitted. The first CRYPTO frame sent | PADDING and CONNECTION_CLOSE frames are also permitted. An endpoint | |||
| always begins at an offset of 0 (see Section 6.4). | that receives an Initial packet containing other frames can either | |||
| discard the packet as spurious or treat it as a connection error. | ||||
| The first packet sent by a client always includes a CRYPTO frame that | The first packet sent by a client always includes a CRYPTO frame that | |||
| contains the entirety of the first cryptographic handshake message. | contains the entirety of the first cryptographic handshake message. | |||
| This packet, and the cryptographic handshake message, MUST fit in a | This packet, and the cryptographic handshake message, MUST fit in a | |||
| single UDP datagram (see Section 6.4). | single UDP datagram (see Section 6.4). The first CRYPTO frame sent | |||
| always begins at an offset of 0 (see Section 6.4). | ||||
| Note that if the server sends a HelloRetryRequest, the client will | Note that if the server sends a HelloRetryRequest, the client will | |||
| send a second Initial packet. This Initial packet will continue the | send a second Initial packet. This Initial packet will continue the | |||
| cryptographic handshake and will contain a CRYPTO frame with an | cryptographic handshake and will contain a CRYPTO frame with an | |||
| offset matching the size of the CRYPTO frame sent in the first | offset matching the size of the CRYPTO frame sent in the first | |||
| Initial packet. Cryptographic handshake messages subsequent to the | Initial packet. Cryptographic handshake messages subsequent to the | |||
| first do not need to fit within a single UDP datagram. | first do not need to fit within a single UDP datagram. | |||
| 4.6.1. Connection IDs | 4.6.1. Connection IDs | |||
| skipping to change at page 18, line 45 ¶ | skipping to change at page 19, line 9 ¶ | |||
| The Destination Connection ID field in the server's Initial packet | The Destination Connection ID field in the server's Initial packet | |||
| contains a connection ID that is chosen by the recipient of the | contains a connection ID that is chosen by the recipient of the | |||
| packet (i.e., the client); the Source Connection ID includes the | packet (i.e., the client); the Source Connection ID includes the | |||
| connection ID that the sender of the packet wishes to use (see | connection ID that the sender of the packet wishes to use (see | |||
| Section 6.1). The server MUST use consistent Source Connection IDs | Section 6.1). The server MUST use consistent Source Connection IDs | |||
| during the handshake. | during the handshake. | |||
| On first receiving an Initial or Retry packet from the server, the | On first receiving an Initial or Retry packet from the server, the | |||
| client uses the Source Connection ID supplied by the server as the | client uses the Source Connection ID supplied by the server as the | |||
| Destination Connection ID for subsequent packets. Once a client has | Destination Connection ID for subsequent packets. That means that a | |||
| received an Initial packet from the server, it MUST discard any | client might change the Destination Connection ID twice during | |||
| packet it receives with a different Source Connection ID. | connection establishment. Once a client has received an Initial | |||
| packet from the server, it MUST discard any packet it receives with a | ||||
| different Source Connection ID. | ||||
| 4.6.2. Tokens | 4.6.2. Tokens | |||
| If the client has a token received in a NEW_TOKEN frame on a previous | If the client has a token received in a NEW_TOKEN frame on a previous | |||
| connection to what it believes to be the same server, it can include | connection to what it believes to be the same server, it can include | |||
| that value in the Token field of its Initial packet. | that value in the Token field of its Initial packet. | |||
| A token allows a server to correlate activity between connections. | A token allows a server to correlate activity between connections. | |||
| Specifically, the connection where the token was issued, and any | Specifically, the connection where the token was issued, and any | |||
| connection where it is used. Clients that want to break continuity | connection where it is used. Clients that want to break continuity | |||
| skipping to change at page 19, line 26 ¶ | skipping to change at page 19, line 36 ¶ | |||
| discarded. | discarded. | |||
| A client SHOULD NOT reuse a token. Reusing a token allows | A client SHOULD NOT reuse a token. Reusing a token allows | |||
| connections to be linked by entities on the network path (see | connections to be linked by entities on the network path (see | |||
| Section 6.11.5). A client MUST NOT reuse a token if it believes that | Section 6.11.5). A client MUST NOT reuse a token if it believes that | |||
| its point of network attachment has changed since the token was last | its point of network attachment has changed since the token was last | |||
| used; that is, if there is a change in its local IP address or | used; that is, if there is a change in its local IP address or | |||
| network interface. A client needs to start the connection process | network interface. A client needs to start the connection process | |||
| over if it migrates prior to completing the handshake. | over if it migrates prior to completing the handshake. | |||
| If the client received a Retry packet from the server and sends an | ||||
| Initial packet in response, then it sets the Destination Connection | ||||
| ID to the value from the Source Connection ID in the Retry packet. | ||||
| Changing Destination Connection ID also results in a change to the | ||||
| keys used to protect the Initial packet. It also sets the Token | ||||
| field to the token provided in the Retry. The client MUST NOT change | ||||
| the Source Connection ID because the server could include the | ||||
| connection ID as part of its token validation logic. | ||||
| When a server receives an Initial packet with an address validation | When a server receives an Initial packet with an address validation | |||
| token, it SHOULD attempt to validate it. If the token is invalid | token, it SHOULD attempt to validate it. If the token is invalid | |||
| then the server SHOULD proceed as if the client did not have a | then the server SHOULD proceed as if the client did not have a | |||
| validated address, including potentially sending a Retry. If the | validated address, including potentially sending a Retry. If the | |||
| validation succeeds, the server SHOULD then allow the handshake to | validation succeeds, the server SHOULD then allow the handshake to | |||
| proceed (see Section 6.7). | proceed (see Section 6.7). | |||
| Note: The rationale for treating the client as unvalidated rather | Note: The rationale for treating the client as unvalidated rather | |||
| than discarding the packet is that the client might have received | than discarding the packet is that the client might have received | |||
| the token in a previous connection using the NEW_TOKEN frame, and | the token in a previous connection using the NEW_TOKEN frame, and | |||
| if the server has lost state, it might be unable to validate the | if the server has lost state, it might be unable to validate the | |||
| token at all, leading to connection failure if the packet is | token at all, leading to connection failure if the packet is | |||
| discarded. A server MAY encode tokens provided with NEW_TOKEN | discarded. A server MAY encode tokens provided with NEW_TOKEN | |||
| frames and Retry packets differently, and validate the latter more | frames and Retry packets differently, and validate the latter more | |||
| strictly. | strictly. | |||
| In a stateless design, a server can use encrypted and authenticated | ||||
| tokens to pass information to clients that the server can later | ||||
| recover and use to validate a client address. Tokens are not | ||||
| integrated into the cryptographic handshake and so they are not | ||||
| authenticated. For instance, a client might be able to reuse a | ||||
| token. To avoid attacks that exploit this property, a server can | ||||
| limit its use of tokens to only the information needed validate | ||||
| client addresses. | ||||
| 4.6.3. Starting Packet Numbers | 4.6.3. Starting Packet Numbers | |||
| The first Initial packet sent by either endpoint contains a packet | The first Initial packet sent by either endpoint contains a packet | |||
| number of 0. The packet number MUST increase monotonically | number of 0. The packet number MUST increase monotonically | |||
| thereafter. Initial packets are in a different packet number space | thereafter. Initial packets are in a different packet number space | |||
| to other packets (see Section 4.11). | to other packets (see Section 4.11). | |||
| 4.6.4. 0-RTT Packet Numbers | 4.6.4. 0-RTT Packet Numbers | |||
| Packet numbers for 0-RTT protected packets use the same space as | Packet numbers for 0-RTT protected packets use the same space as | |||
| skipping to change at page 20, line 41 ¶ | skipping to change at page 20, line 50 ¶ | |||
| that changes the connection ID used for subsequent packets, indicates | that changes the connection ID used for subsequent packets, indicates | |||
| a strong possibility that 0-RTT packets could be lost. A client only | a strong possibility that 0-RTT packets could be lost. A client only | |||
| receives acknowledgments for its 0-RTT packets once the handshake is | receives acknowledgments for its 0-RTT packets once the handshake is | |||
| complete. Consequently, a server might expect 0-RTT packets to start | complete. Consequently, a server might expect 0-RTT packets to start | |||
| with a packet number of 0. Therefore, in determining the length of | with a packet number of 0. Therefore, in determining the length of | |||
| the packet number encoding for 0-RTT packets, a client MUST assume | the packet number encoding for 0-RTT packets, a client MUST assume | |||
| that all packets up to the current packet number are in flight, | that all packets up to the current packet number are in flight, | |||
| starting from a packet number of 0. Thus, 0-RTT packets could need | starting from a packet number of 0. Thus, 0-RTT packets could need | |||
| to use a longer packet number encoding. | to use a longer packet number encoding. | |||
| A client MAY instead generate a fresh cryptographic handshake message | A client SHOULD instead generate a fresh cryptographic handshake | |||
| and start packet numbers from 0. This ensures that new 0-RTT packets | message and start packet numbers from 0. This ensures that new 0-RTT | |||
| will not use the same keys, avoiding any risk of key and nonce reuse; | packets will not use the same keys, avoiding any risk of key and | |||
| this also prevents 0-RTT packets from previous handshake attempts | nonce reuse; this also prevents 0-RTT packets from previous handshake | |||
| from being accepted as part of the connection. | attempts from being accepted as part of the connection. | |||
| 4.6.5. Minimum Packet Size | 4.6.5. Minimum Packet Size | |||
| 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 | |||
| with a 0-RTT packet (see Section 4.9). | with a 0-RTT packet (see Section 4.9). | |||
| 4.7. Handshake Packet | 4.7. Handshake Packet | |||
| skipping to change at page 21, line 26 ¶ | skipping to change at page 21, line 35 ¶ | |||
| 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.10). | the packet wishes to use (see Section 4.10). | |||
| The first Handshake packet sent by a server contains a packet number | The first Handshake packet sent by a server contains a packet number | |||
| of 0. Handshake packets are their own packet number space. Packet | of 0. Handshake packets are their own packet number space. Packet | |||
| numbers are incremented normally for other Handshake packets. | numbers are incremented normally for other Handshake packets. | |||
| Servers MUST NOT send more than three datagrams including Initial and | Servers MUST NOT send more than three times as many bytes as the | |||
| Handshake packets without receiving a packet from a verified source | number of bytes received prior to verifying the client's address. | |||
| address. Source addresses can be verified through an address | Source addresses can be verified through an address validation token | |||
| validation token (delivered via a Retry packet or a NEW_TOKEN frame) | (delivered via a Retry packet or a NEW_TOKEN frame) or by processing | |||
| or by receiving any message from the client encrypted using the | any message from the client encrypted using the Handshake keys. This | |||
| Handshake keys. | limit exists to mitigate amplification attacks. | |||
| In order to prevent this limit causing a handshake deadlock, the | ||||
| client SHOULD always send a packet upon a handshake timeout, as | ||||
| described in [QUIC-RECOVERY]. If the client has no data to | ||||
| retransmit and does not have Handshake keys, it SHOULD send an | ||||
| Initial packet in a UDP datagram of at least 1200 octets. If the | ||||
| client has Handshake keys, it SHOULD send a Handshake packet. | ||||
| The payload of this packet contains CRYPTO frames and could contain | The payload of this packet contains CRYPTO frames and could contain | |||
| PADDING, or ACK frames. Handshake packets MAY contain | PADDING, or ACK frames. Handshake packets MAY contain | |||
| CONNECTION_CLOSE frames if the handshake is unsuccessful. | CONNECTION_CLOSE or APPLICATION_CLOSE frames. Endpoints MUST treat | |||
| receipt of Handshake packets with other frames as a connection error. | ||||
| 4.8. Protected Packets | 4.8. Protected Packets | |||
| All QUIC packets use packet protection. Packets that are protected | All QUIC packets use packet protection. Packets that are protected | |||
| with the static handshake keys or the 0-RTT keys are sent with long | with the static handshake keys or the 0-RTT keys are sent with long | |||
| headers; all packets protected with 1-RTT keys are sent with short | headers; all packets protected with 1-RTT keys are sent with short | |||
| headers. The different packet types explicitly indicate the | headers. The different packet types explicitly indicate the | |||
| encryption level and therefore the keys that are used to remove | encryption level and therefore the keys that are used to remove | |||
| packet protection. 0-RTT and 1-RTT protected packets share a single | packet protection. 0-RTT and 1-RTT protected packets share a single | |||
| packet number space. | packet number space. | |||
| skipping to change at page 22, line 14 ¶ | skipping to change at page 22, line 33 ¶ | |||
| Packets protected with 0-RTT and 1-RTT keys are expected to have | Packets protected with 0-RTT and 1-RTT keys are expected to have | |||
| confidentiality and data origin authentication; the cryptographic | confidentiality and data origin authentication; the cryptographic | |||
| handshake ensures that only the communicating endpoints receive the | handshake ensures that only the communicating endpoints receive the | |||
| corresponding keys. | corresponding keys. | |||
| 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.6). | the Initial packet (Section 4.6). | |||
| The client can send 0-RTT packets after receiving an Initial | ||||
| Section 4.6 or Handshake (Section 4.7) packet, if that packet does | ||||
| not complete the handshake. Even if the client receives a different | ||||
| connection ID in the Handshake packet, it MUST continue to use the | ||||
| same Destination Connection ID for 0-RTT packets, see Section 4.10. | ||||
| 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 has | The packet number field contains a packet number, which has | |||
| additional confidentiality protection that is applied after packet | additional confidentiality protection that is applied after packet | |||
| protection is applied (see [QUIC-TLS] for details). The underlying | protection is applied (see [QUIC-TLS] for details). The underlying | |||
| packet number increases with each packet sent, see Section 4.11 for | packet number increases with each packet sent, see Section 4.11 for | |||
| details. | 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 | |||
| skipping to change at page 22, line 44 ¶ | skipping to change at page 23, line 9 ¶ | |||
| 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. It | application data during the handshake and immediately afterwards. It | |||
| is not necessary for senders to coalesce packets, though failing to | is not necessary for senders to coalesce packets, though failing to | |||
| do so will require sending a significantly larger number of datagrams | do so will require sending a significantly larger number of datagrams | |||
| during the handshake. Receivers MUST be able to process coalesced | during the handshake. Receivers MUST be able to process coalesced | |||
| packets. | packets. | |||
| Senders SHOULD coalesce packets in order of increasing encryption | Coalescing packets in order of increasing encryption levels (Initial, | |||
| levels (Initial, Handshake, 0-RTT, 1-RTT), as this makes it more | 0-RTT, Handshake, 1-RTT) makes it more likely the receiver will be | |||
| likely the receiver will be able to process all the packets in a | able to process all the packets in a single pass. A packet with a | |||
| single pass. A packet with a short header does not include a length, | short header does not include a length, so it will always be the last | |||
| so it will always be the last packet included in a UDP datagram. | packet included in a UDP datagram. | |||
| Senders MUST NOT coalesce QUIC packets with different Destination | Senders MUST NOT coalesce QUIC packets with different Destination | |||
| Connection IDs into a single UDP datagram. Receivers SHOULD ignore | Connection IDs into a single UDP datagram. Receivers SHOULD ignore | |||
| any subsequent packets with a different Destination Connection ID | any subsequent packets with a different Destination Connection ID | |||
| than the first packet in the datagram. | than the first packet in the datagram. | |||
| Every QUIC packet that is coalesced into a single UDP datagram is | Every QUIC packet that is coalesced into a single UDP datagram is | |||
| separate and complete. Though the values of some fields in the | separate and complete. Though the values of some fields in the | |||
| packet header might be redundant, no fields are omitted. The | packet header might be redundant, no fields are omitted. The | |||
| receiver of coalesced QUIC packets MUST individually process each | receiver of coalesced QUIC packets MUST individually process each | |||
| skipping to change at page 23, line 40 ¶ | skipping to change at page 24, line 5 ¶ | |||
| the peer. | the peer. | |||
| During the handshake, packets with the long header are used to | During the handshake, packets with the long header are used to | |||
| establish the connection ID that each endpoint uses. Each endpoint | establish the connection ID that each endpoint uses. Each endpoint | |||
| uses the Source Connection ID field to specify the connection ID that | uses the Source Connection ID field to specify the connection ID that | |||
| is used in the Destination Connection ID field of packets being sent | is used in the Destination Connection ID field of packets being sent | |||
| to them. Upon receiving a packet, each endpoint sets the Destination | to them. Upon receiving a packet, each endpoint sets the Destination | |||
| Connection ID it sends to match the value of the Source Connection ID | Connection ID it sends to match the value of the Source Connection ID | |||
| that they receive. | that they receive. | |||
| During the handshake, an endpoint might receive multiple packets with | During the handshake, a client can receive both a Retry and an | |||
| the long header, and thus be given multiple opportunities to update | Initial packet, and thus be given two opportunities to update the | |||
| the Destination Connection ID it sends. A client MUST only change | Destination Connection ID it sends. A client MUST only change the | |||
| the value it sends in the Destination Connection ID in response to | value it sends in the Destination Connection ID in response to the | |||
| the first packet of each type it receives from the server (Retry or | first packet of each type it receives from the server (Retry or | |||
| Initial); a server MUST set its value based on the Initial packet. | Initial); a server MUST set its value based on the Initial packet. | |||
| Any additional changes are not permitted; if subsequent packets of | Any additional changes are not permitted; if subsequent packets of | |||
| those types include a different Source Connection ID, they MUST be | those types include a different Source Connection ID, they MUST be | |||
| discarded. This avoids problems that might arise from stateless | discarded. This avoids problems that might arise from stateless | |||
| processing of multiple Initial packets producing different connection | processing of multiple Initial packets producing different connection | |||
| IDs. | IDs. | |||
| Short headers only include the Destination Connection ID and omit the | Short headers only include the Destination Connection ID and omit the | |||
| explicit length. The length of the Destination Connection ID field | explicit length. The length of the Destination Connection ID field | |||
| is expected to be known to endpoints. | is expected to be known to endpoints. | |||
| skipping to change at page 24, line 19 ¶ | skipping to change at page 24, line 31 ¶ | |||
| Endpoints using a connection-ID based load balancer could agree with | Endpoints using a connection-ID based load balancer could agree with | |||
| the load balancer on a fixed or minimum length and on an encoding for | the load balancer on a fixed or minimum length and on an encoding for | |||
| connection IDs. This fixed portion could encode an explicit length, | connection IDs. This fixed portion could encode an explicit length, | |||
| which allows the entire connection ID to vary in length and still be | which allows the entire connection ID to vary in length and still be | |||
| used by the load balancer. | used by the load balancer. | |||
| The very first packet sent by a client includes a random value for | The very first packet sent by a client includes a random value for | |||
| Destination Connection ID. The same value MUST be used for all 0-RTT | Destination Connection ID. The same value MUST be used for all 0-RTT | |||
| packets sent on that connection (Section 4.8). This randomized value | packets sent on that connection (Section 4.8). This randomized value | |||
| is used to determine the packet protection keys for Initial packets | is used to determine the packet protection keys for Initial packets | |||
| (see Section 5.1.1 of [QUIC-TLS]). | (see Section 5.2 of [QUIC-TLS]). | |||
| A Version Negotiation (Section 4.3) packet MUST use both connection | A Version Negotiation (Section 4.3) packet MUST use both connection | |||
| IDs selected by the client, swapped to ensure correct routing toward | IDs selected by the client, swapped to ensure correct routing toward | |||
| the client. | the client. | |||
| 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.11). | especially in response to connection migration (Section 6.11). | |||
| 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.11. Packet Numbers | 4.11. 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 protection. | |||
| Each endpoint maintains a separate packet number for sending and | Each endpoint maintains a separate packet number for sending and | |||
| receiving. | receiving. | |||
| Packet numbers are divided into 3 spaces in QUIC: | Packet numbers are divided into 3 spaces in QUIC: | |||
| o Initial space: All Initial packets Section 4.6 are in this space. | o Initial space: All Initial packets Section 4.6 are in this space. | |||
| o Handshake space: All Handshake packets Section 4.7 are in this | o Handshake space: All Handshake packets Section 4.7 are in this | |||
| space. | space. | |||
| o Application data space: All 0-RTT and 1-RTT encrypted packets | o Application data space: All 0-RTT and 1-RTT encrypted packets | |||
| Section 4.8 are in this space. | Section 4.8 are in this space. | |||
| As described in [QUIC-TLS], each packet type uses different | As described in [QUIC-TLS], each packet type uses different | |||
| encryption keys. | protection keys. | |||
| Conceptually, a packet number space is the encryption context in | Conceptually, a packet number space is the context in which a packet | |||
| which a packet can be processed and ACKed. Initial packets can only | can be processed and acknowledged. Initial packets can only be sent | |||
| be sent with Initial encryption keys and ACKed in packets which are | with Initial packet protection keys and acknowledged in packets which | |||
| also Initial packets. Similarly, Handshake packets can only be sent | are also Initial packets. Similarly, Handshake packets are sent at | |||
| and acknowledged in Handshake packets. | the Handshake encryption level and can only be acknowledged in | |||
| Handshake packets. | ||||
| This enforces cryptographic separation between the data sent in the | This enforces cryptographic separation between the data sent in the | |||
| different packet sequence number spaces. Each packet number space | different packet sequence number spaces. Each packet number space | |||
| starts at packet number 0. Subsequent packets sent in the same | starts at packet number 0. Subsequent packets sent in the same | |||
| packet number space MUST increase the packet number by at least one. | packet number space MUST increase the packet number by at least one. | |||
| 0-RTT and 1-RTT data exist in the same packet number space to make | 0-RTT and 1-RTT data exist in the same packet number space to make | |||
| loss recovery algorithms easier to implement between the two packet | loss recovery algorithms easier to implement between the two packet | |||
| types. | types. | |||
| skipping to change at page 25, line 48 ¶ | skipping to change at page 26, line 24 ¶ | |||
| Table 2: Packet Number Encodings for Packet Headers | Table 2: Packet Number Encodings for Packet Headers | |||
| Note that these encodings are similar to those in Section 7.1, but | Note that these encodings are similar to those in Section 7.1, but | |||
| use different values. | use different values. | |||
| The encoded packet number is protected as described in Section 5.3 | The encoded packet number is protected as described in Section 5.3 | |||
| [QUIC-TLS]. Protection of the packet number is removed prior to | [QUIC-TLS]. Protection of the packet number is removed prior to | |||
| recovering the full packet number. The full packet number is | recovering the full packet number. The full packet number is | |||
| reconstructed at the receiver based on the number of significant bits | reconstructed at the receiver based on the number of significant bits | |||
| present, the content of those bits, and the largest packet number | present, the value of those bits, and the largest packet number | |||
| received on a successfully authenticated packet. Recovering the full | received on a successfully authenticated packet. Recovering the full | |||
| packet number is necessary to successfully remove packet protection. | packet number is necessary to successfully remove packet protection. | |||
| Once packet number protection is removed, the packet number is | Once packet number protection is removed, the packet number is | |||
| decoded by finding the packet number value that is closest to the | decoded by finding the packet number value that is closest to the | |||
| next expected packet. The next expected packet is the highest | next expected packet. The next expected packet is the highest | |||
| received packet number plus one. For example, if 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 14-bit value of 0x9b3 will be decoded as | then a packet containing a 14-bit value of 0x9b3 will be decoded as | |||
| 0xaa8309b3. Example pseudo-code for packet number decoding can be | 0xaa8309b3. Example pseudo-code for packet number decoding can be | |||
| skipping to change at page 27, line 17 ¶ | skipping to change at page 27, line 37 ¶ | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Frame 1 (*) ... | | Frame 1 (*) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Frame 2 (*) ... | | Frame 2 (*) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| ... | ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Frame N (*) ... | | Frame N (*) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Figure 6: Contents of Protected Payload | Figure 6: QUIC Payload | |||
| Protected payloads MUST contain at least one frame, and MAY contain | QUIC payloads MUST contain at least one frame, and MAY contain | |||
| multiple frames and multiple frame types. | multiple frames and multiple frame types. | |||
| Frames MUST fit within a single QUIC packet and MUST NOT span a QUIC | Frames MUST fit within a single QUIC packet and MUST NOT span a QUIC | |||
| packet boundary. Each frame begins with a Frame Type, indicating its | packet boundary. Each frame begins with a Frame Type, indicating its | |||
| type, followed by additional type-dependent fields: | type, followed by additional type-dependent fields: | |||
| 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 Type (i) ... | | Frame Type (i) ... | |||
| skipping to change at page 28, line 5 ¶ | skipping to change at page 29, line 5 ¶ | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Figure 7: Generic Frame Layout | Figure 7: Generic Frame Layout | |||
| The frame types defined in this specification are listed in Table 3. | The frame types defined in this specification are listed in Table 3. | |||
| The Frame Type in STREAM frames is used to carry other frame-specific | The Frame Type in STREAM frames is used to carry other frame-specific | |||
| flags. For all other frames, the Frame Type field simply identifies | flags. For all other frames, the Frame Type field simply identifies | |||
| the frame. These frames are explained in more detail as they are | the frame. These frames are explained in more detail as they are | |||
| referenced later in the document. | referenced later in the document. | |||
| +-------------+-------------------+--------------+ | +-------------+----------------------+--------------+ | |||
| | Type Value | Frame Type Name | Definition | | | Type Value | Frame Type Name | Definition | | |||
| +-------------+-------------------+--------------+ | +-------------+----------------------+--------------+ | |||
| | 0x00 | PADDING | Section 7.2 | | | 0x00 | PADDING | Section 7.2 | | |||
| | | | | | | | | | | |||
| | 0x01 | RST_STREAM | Section 7.3 | | | 0x01 | RST_STREAM | Section 7.3 | | |||
| | | | | | | | | | | |||
| | 0x02 | CONNECTION_CLOSE | Section 7.4 | | | 0x02 | CONNECTION_CLOSE | Section 7.4 | | |||
| | | | | | | | | | | |||
| | 0x03 | APPLICATION_CLOSE | Section 7.5 | | | 0x03 | APPLICATION_CLOSE | Section 7.5 | | |||
| | | | | | | | | | | |||
| | 0x04 | MAX_DATA | Section 7.6 | | | 0x04 | MAX_DATA | Section 7.6 | | |||
| | | | | | | | | | | |||
| | 0x05 | MAX_STREAM_DATA | Section 7.7 | | | 0x05 | MAX_STREAM_DATA | Section 7.7 | | |||
| | | | | | | | | | | |||
| | 0x06 | MAX_STREAM_ID | Section 7.8 | | | 0x06 | MAX_STREAM_ID | Section 7.8 | | |||
| | | | | | | | | | | |||
| | 0x07 | PING | Section 7.9 | | | 0x07 | PING | Section 7.9 | | |||
| | | | | | | | | | | |||
| | 0x08 | BLOCKED | Section 7.10 | | | 0x08 | BLOCKED | Section 7.10 | | |||
| | | | | | | | | | | |||
| | 0x09 | STREAM_BLOCKED | Section 7.11 | | | 0x09 | STREAM_BLOCKED | Section 7.11 | | |||
| | | | | | | | | | | |||
| | 0x0a | STREAM_ID_BLOCKED | Section 7.12 | | | 0x0a | STREAM_ID_BLOCKED | Section 7.12 | | |||
| | | | | | | | | | | |||
| | 0x0b | NEW_CONNECTION_ID | Section 7.13 | | | 0x0b | NEW_CONNECTION_ID | Section 7.13 | | |||
| | | | | | | | | | | |||
| | 0x0c | STOP_SENDING | Section 7.14 | | | 0x0c | STOP_SENDING | Section 7.15 | | |||
| | | | | | | | | | | |||
| | 0x0d | ACK | Section 7.15 | | | 0x0d | RETIRE_CONNECTION_ID | Section 7.14 | | |||
| | | | | | | | | | | |||
| | 0x0e | PATH_CHALLENGE | Section 7.17 | | | 0x0e | PATH_CHALLENGE | Section 7.17 | | |||
| | | | | | | | | | | |||
| | 0x0f | PATH_RESPONSE | Section 7.18 | | | 0x0f | PATH_RESPONSE | Section 7.18 | | |||
| | | | | | | | | | | |||
| | 0x10 - 0x17 | STREAM | Section 7.20 | | | 0x10 - 0x17 | STREAM | Section 7.20 | | |||
| | | | | | | | | | | |||
| | 0x18 | CRYPTO | Section 7.21 | | | 0x18 | CRYPTO | Section 7.21 | | |||
| | | | | | | | | | | |||
| | 0x19 | NEW_TOKEN | Section 7.19 | | | 0x19 | NEW_TOKEN | Section 7.19 | | |||
| | | | | | | | | | | |||
| | 0x1a | ACK_ECN | Section 7.16 | | | 0x1a - 0x1b | ACK | Section 7.16 | | |||
| +-------------+-------------------+--------------+ | +-------------+----------------------+--------------+ | |||
| Table 3: Frame Types | Table 3: Frame Types | |||
| All QUIC frames are idempotent. That is, a valid frame does not | All QUIC frames are idempotent. That is, a valid frame does not | |||
| cause undesirable side effects or errors when received more than | cause undesirable side effects or errors when received more than | |||
| once. | once. | |||
| The Frame Type field uses a variable length integer encoding (see | The Frame Type field uses a variable length integer encoding (see | |||
| Section 7.1) with one exception. To ensure simple and efficient | Section 7.1) with one exception. To ensure simple and efficient | |||
| implementations of frame parsing, a frame type MUST use the shortest | implementations of frame parsing, a frame type MUST use the shortest | |||
| possible encoding. Though a two-, four- or eight-octet encoding of | possible encoding. Though a two-, four- or eight-octet encoding of | |||
| the frame types defined in this document is possible, the Frame Type | the frame types defined in this document is possible, the Frame Type | |||
| field for these frames are encoded on a single octet. For instance, | field for these frames is encoded on a single octet. For instance, | |||
| though 0x4007 is a legitimate two-octet encoding for a variable- | though 0x4007 is a legitimate two-octet encoding for a variable- | |||
| length integer with a value of 7, PING frames are always encoded as a | length integer with a value of 7, PING frames are always encoded as a | |||
| single octet with the value 0x07. An endpoint MUST treat the receipt | single octet with the value 0x07. An endpoint MUST treat the receipt | |||
| of a frame type that uses a longer encoding than necessary as a | of a frame type that uses a longer encoding than necessary as a | |||
| connection error of type PROTOCOL_VIOLATION. | connection error of type PROTOCOL_VIOLATION. | |||
| 5.1. Extension Frames | 5.1. Extension Frames | |||
| QUIC frames do not use a self-describing encoding. An endpoint | QUIC frames do not use a self-describing encoding. An endpoint | |||
| therefore needs to understand the syntax of all frames before it can | therefore needs to understand the syntax of all frames before it can | |||
| successfully process a packet. This allows for efficient encoding of | successfully process a packet. This allows for efficient encoding of | |||
| frames, but it means that an endpoint cannot send a frame of a type | frames, but it means that an endpoint cannot send a frame of a type | |||
| that is unknown to its peer. | that is unknown to its peer. | |||
| An extension to QUIC that wishes to use a new type of frame MUST | An extension to QUIC that wishes to use a new type of frame MUST | |||
| first ensure that a peer is able to understand the frame. An | first ensure that a peer is able to understand the frame. An | |||
| endpoint can use a transport parameter to signal its willingness to | endpoint can use a transport parameter to signal its willingness to | |||
| receive one or more extension frame types with the one transport | receive one or more extension frame types with the one transport | |||
| parameter. | parameter. | |||
| Extension frames MUST be congestion controlled and MUST cause an ACK | ||||
| frame to be sent. The exception is extension frames that replace or | ||||
| supplement the ACK frame. Extension frames are not included in flow | ||||
| control unless specified in the extension. | ||||
| An IANA registry is used to manage the assignment of frame types, see | An IANA registry is used to manage the assignment of frame types, see | |||
| Section 13.2. | Section 13.2. | |||
| 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.4. Once | connection establishment latency, as described in Section 6.4. 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.11. Finally a connection may be terminated by either | Section 6.11. Finally, a connection may be terminated by either | |||
| endpoint, as described in Section 6.13. | endpoint, as described in Section 6.13. | |||
| 6.1. Connection ID | 6.1. Connection ID | |||
| Each connection possesses a set of identifiers, any of which could be | Each connection possesses a set of identifiers, any of which could be | |||
| used to distinguish it from other connections. A connection ID can | used to distinguish it from other connections. Connection IDs are | |||
| be either 0 octets in length, or between 4 and 18 octets (inclusive). | selected independently in each direction. Each Connection ID has an | |||
| Connection IDs are selected independently in each direction. | associated sequence number to assist in deduplicating messages. | |||
| The primary function of a connection ID is to ensure that changes in | The primary function of a connection ID is to ensure that changes in | |||
| addressing at lower protocol layers (UDP, IP, and below) don't cause | addressing at lower protocol layers (UDP, IP, and below) don't cause | |||
| packets for a QUIC connection to be delivered to the wrong endpoint. | packets for a QUIC connection to be delivered to the wrong endpoint. | |||
| Each endpoint selects connection IDs using an implementation-specific | Each endpoint selects connection IDs using an implementation-specific | |||
| (and perhaps deployment-specific) method which will allow packets | (and perhaps deployment-specific) method which will allow packets | |||
| with that connection ID to be routed back to the endpoint and | with that connection ID to be routed back to the endpoint and | |||
| identified by the endpoint upon receipt. | identified by the endpoint upon receipt. | |||
| Connection IDs MUST NOT contain any information that can be used to | ||||
| correlate them with other connection IDs for the same connection. As | ||||
| a trivial example, this means the same connection ID MUST NOT be | ||||
| issued more than once on the same connection. | ||||
| A zero-length connection ID MAY be used when the connection ID is not | A zero-length connection ID MAY be used when the connection ID is not | |||
| needed for routing and the address/port tuple of packets is | needed for routing and the address/port tuple of packets is | |||
| sufficient to associate them to a connection. An endpoint whose peer | sufficient to identify a connection. An endpoint whose peer has | |||
| has selected a zero-length connection ID MUST continue to use a zero- | selected a zero-length connection ID MUST continue to use a zero- | |||
| length connection ID for the lifetime of the connection and MUST NOT | length connection ID for the lifetime of the connection and MUST NOT | |||
| send packets from any other local address. | send packets from any other local address. | |||
| When an endpoint has requested a non-zero-length connection ID, it | When an endpoint has requested a non-zero-length connection ID, it | |||
| will issue a series of connection IDs over the lifetime of a | needs to ensure that the peer has a supply of connection IDs from | |||
| connection. The series of connection IDs issued by an endpoint is | which to choose for packets sent to the endpoint. These connection | |||
| ordered, with the final connection ID selected during the handshake | IDs are supplied by the endpoint using the NEW_CONNECTION_ID frame | |||
| coming first. Additional connection IDs are provided using the | (Section 7.13). | |||
| NEW_CONNECTION_ID frame (Section 7.13), each with a specified | ||||
| sequence number. The series of connection IDs issued SHOULD be | ||||
| contiguous, but might not appear to be upon receipt due to reordering | ||||
| or loss. | ||||
| Each connection ID MUST be used on only one local address. When | 6.1.1. Issuing Connection IDs | |||
| packets are sent for the first time on a new local address, a new | ||||
| connection ID MUST be used with a higher sequence number than any | ||||
| connection ID previously used on any local address. At any time, an | ||||
| endpoint MAY change to a new connection ID on a local address already | ||||
| in use. | ||||
| An endpoint MUST NOT send packets with a connection ID which has a | The initial connection ID issued by an endpoint is the Source | |||
| lower sequence number than the highest sequence number of any | Connection ID during the handshake. The sequence number of the | |||
| connection ID ever sent or received on that local address. This | initial connection ID is 0. If the preferred_address transport | |||
| ensures that when an endpoint migrates to a new path or changes | parameter is sent, the sequence number of the supplied connection ID | |||
| connection ID on an existing path, the packets will use a new | is 1. Subsequent connection IDs are communicated to the peer using | |||
| connection ID in both directions. | NEW_CONNECTION_ID frames (Section 7.13), and the sequence number on | |||
| each newly-issued connection ID MUST increase by 1. The connection | ||||
| ID randomly selected by the client in the Initial packet and any | ||||
| connection ID provided by a Reset packet are not assigned sequence | ||||
| numbers unless a server opts to retain them as its initial connection | ||||
| ID. | ||||
| Implementations SHOULD ensure that peers have a connection ID with a | When an endpoint issues a connection ID, it MUST accept packets that | |||
| matching sequence number available when changing to a new connection | carry this connection ID for the duration of the connection or until | |||
| ID. An implementation could do this by always supplying a | its peer invalidates the connection ID via a RETIRE_CONNECTION_ID | |||
| corresponding connection ID to a peer for each connection ID received | frame (Section 7.14). | |||
| from that peer. | ||||
| While endpoints select connection IDs as appropriate for their | An endpoint SHOULD ensure that its peer has a sufficient number of | |||
| implementation, the connection ID MUST NOT include the unprotected | available and unused connection IDs. While each endpoint | |||
| sequence number. Endpoints need to be able to recover the sequence | independently chooses how many connection IDs to issue, endpoints | |||
| number associated with each connection ID they generate without | SHOULD provide and maintain at least eight connection IDs. The | |||
| relying on information available to unaffiliated parties. A | endpoint can do this by always supplying a new connection ID when a | |||
| connection ID that encodes an unencrypted sequence number could be | connection ID is retired by its peer or when the endpoint receives a | |||
| used to correlate connection IDs across network paths. | packet with a previously unused connection ID. Endpoints that | |||
| initiate migration and require non-zero-length connection IDs SHOULD | ||||
| provide their peers with new connection IDs before migration, or risk | ||||
| the peer closing the connection. | ||||
| 6.1.2. Consuming and Retiring Connection IDs | ||||
| An endpoint can change the connection ID it uses for a peer to | ||||
| another available one at any time during the connection. An endpoint | ||||
| consumes connection IDs in response to a migrating peer, see | ||||
| Section 6.11.5 for more. | ||||
| An endpoint maintains a set of connection IDs received from its peer, | ||||
| any of which it can use when sending packets. When the endpoint | ||||
| wishes to remove a connection ID from use, it sends a | ||||
| RETIRE_CONNECTION_ID frame to its peer, indicating that the peer | ||||
| might bring a new connection ID into circulation using the | ||||
| NEW_CONNECTION_ID frame. | ||||
| An endpoint that retires a connection ID can retain knowledge of that | ||||
| connection ID for a period of time after sending the | ||||
| RETIRE_CONNECTION_ID frame, or until that frame is acknowledged. | ||||
| As discussed in Section 6.11.5, each connection ID MUST be used on | ||||
| packets sent from only one local address. An endpoint that migrates | ||||
| away from a local address SHOULD retire all connection IDs used on | ||||
| that address once it no longer plans to use that address. | ||||
| 6.2. Matching Packets to Connections | 6.2. 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 more | connection, QUIC processes that packet accordingly. Note that more | |||
| than one connection ID can be associated with a connection; see | than one connection ID can be associated with a connection; see | |||
| Section 6.1. | Section 6.1. | |||
| If the Destination Connection ID is zero length and the packet | If the Destination Connection ID is zero length and the packet | |||
| matches the address/port tuple of a connection where the host did not | matches the address/port tuple of a connection where the host did not | |||
| require connection IDs, QUIC processes the packet as part of that | require connection IDs, QUIC processes the packet as part of that | |||
| connection. Endpoints MUST drop packets with zero-length Destination | connection. Endpoints MUST drop packets with zero-length Destination | |||
| Connection ID fields if they do not correspond to a single | Connection ID fields if they do not correspond to a single | |||
| connection. | connection. | |||
| Endpoints SHOULD send a Stateless Reset (Section 6.13.4) for any | ||||
| packets that cannot be attributed to an existing connection. | ||||
| 6.2.1. Client Packet Handling | 6.2.1. Client Packet Handling | |||
| Valid packets sent to clients always include a Destination Connection | Valid packets sent to clients always include a Destination Connection | |||
| ID that matches the value the client selects. Clients that choose to | ID that matches the value the client selects. Clients that choose to | |||
| receive zero-length connection IDs can use the address/port tuple to | receive zero-length connection IDs can use the address/port tuple to | |||
| identify a connection. Packets that don't match an existing | identify a connection. Packets that don't match an existing | |||
| connection MAY be discarded. | connection are discarded. | |||
| Due to packet reordering or loss, clients might receive packets for a | Due to packet reordering or loss, clients might receive packets for a | |||
| connection that are encrypted with a key it has not yet computed. | connection that are encrypted with a key it has not yet computed. | |||
| Clients MAY drop these packets, or MAY buffer them in anticipation of | Clients MAY drop these packets, or MAY buffer them in anticipation of | |||
| later packets that allow it to compute the key. | later packets that allow it to compute the key. | |||
| If a client receives a packet that has an unsupported version, it | If a client receives a packet that has an unsupported version, it | |||
| MUST discard that packet. | MUST discard that packet. | |||
| 6.2.2. Server Packet Handling | 6.2.2. Server Packet Handling | |||
| If a server receives a packet that has an unsupported version and | If a server receives a packet that has an unsupported version, but | |||
| sufficient length to be an Initial packet for some version supported | the packet is sufficiently large to initiate a new connection for any | |||
| by the server, it SHOULD send a Version Negotiation packet as | version supported by the server, it SHOULD send a Version Negotiation | |||
| described in Section 6.3.1. Servers MAY rate control these packets | packet as described in Section 6.3.1. Servers MAY rate control these | |||
| to avoid storms of Version Negotiation packets. | packets to avoid storms of Version Negotiation packets. | |||
| The first packet for an unsupported version can use different | The first packet for an unsupported version can use different | |||
| semantics and encodings for any version-specific field. In | semantics and encodings for any version-specific field. In | |||
| particular, different packet protection keys might be used for | particular, different packet protection keys might be used for | |||
| different versions. Servers that do not support a particular version | different versions. Servers that do not support a particular version | |||
| are unlikely to be able to decrypt the content of the packet. | are unlikely to be able to decrypt the payload of the packet. | |||
| Servers SHOULD NOT attempt to decode or decrypt a packet from an | Servers SHOULD NOT attempt to decode or decrypt a packet from an | |||
| unknown version, but instead send a Version Negotiation packet, | unknown version, but instead send a Version Negotiation packet, | |||
| provided that the packet is sufficiently long. | provided that the packet is sufficiently long. | |||
| Servers MUST drop other packets that contain unsupported versions. | Servers MUST drop other packets that contain unsupported versions. | |||
| Packets with a supported version, or no version field, are matched to | Packets with a supported version, or no version field, are matched to | |||
| a connection as described in Section 6.2. If not matched, the server | a connection as described in Section 6.2. If not matched, the server | |||
| continues below. | continues below. | |||
| If the packet is an Initial packet fully conforming with the | If the packet is an Initial packet fully conforming with the | |||
| specification, the server proceeds with the handshake (Section 6.4). | specification, the server proceeds with the handshake (Section 6.4). | |||
| This commits the server to the version that the client selected. | This commits the server to the version that the client selected. | |||
| If a server isn't currently accepting any new connections, it SHOULD | If a server isn't currently accepting any new connections, it SHOULD | |||
| send a Handshake packet containing a CONNECTION_CLOSE frame with | send an Initial packet containing a CONNECTION_CLOSE frame with error | |||
| error code SERVER_BUSY. | 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.13.4) if a connection | ||||
| ID is present in the header. | ||||
| 6.3. Version Negotiation | 6.3. 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.2 for details. | new connection, see Section 6.2 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 | |||
| multiple QUIC versions SHOULD pad their Initial packets to reflect | multiple QUIC versions SHOULD pad the first packet they send to the | |||
| the largest minimum Initial packet size of all their versions. This | largest of the minimum packet sizes across all versions they support. | |||
| ensures that the server responds if there are any mutually supported | This ensures that the server responds if there is a mutually | |||
| versions. | supported version. | |||
| 6.3.1. Sending Version Negotiation Packets | 6.3.1. Sending Version Negotiation Packets | |||
| If the version selected by the client is not acceptable to the | If the version selected by the client is not acceptable to the | |||
| server, the server responds with a Version Negotiation packet (see | server, the server responds with a Version Negotiation packet (see | |||
| Section 4.3). This includes a list of versions that the server will | Section 4.3). This includes a list of versions that the server will | |||
| accept. | accept. | |||
| This system allows a server to process packets with unsupported | This system allows a server to process packets with unsupported | |||
| versions without retaining state. Though either the Initial packet | versions without retaining state. Though either the Initial packet | |||
| skipping to change at page 33, line 35 ¶ | skipping to change at page 35, line 15 ¶ | |||
| 6.3.2. Handling Version Negotiation Packets | 6.3.2. Handling Version Negotiation Packets | |||
| When the client receives a Version Negotiation packet, it first | When the client receives a Version Negotiation packet, it first | |||
| checks that the Destination and Source Connection ID fields match the | checks that the Destination and Source Connection ID fields match the | |||
| Source and Destination Connection ID fields in a packet that the | Source and Destination Connection ID fields in a packet that the | |||
| client sent. If this check fails, the packet MUST be discarded. | client sent. If this check fails, the packet MUST be discarded. | |||
| Once the Version Negotiation packet is determined to be valid, the | Once the Version Negotiation packet is determined to be valid, the | |||
| client then selects an acceptable protocol version from the list | client then selects an acceptable protocol version from the list | |||
| provided by the server. The client then attempts to create a | provided by the server. The client then attempts to create a | |||
| connection using that version. Though the contents of the Initial | connection using that version. Though the content of the Initial | |||
| packet the client sends might not change in response to version | packet the client sends might not change in response to version | |||
| negotiation, a client MUST increase the packet number it uses on | negotiation, a client MUST increase the packet number it uses on | |||
| every packet it sends. Packets MUST continue to use long headers and | every packet it sends. Packets MUST continue to use long headers and | |||
| MUST include the new negotiated protocol version. | MUST include the new negotiated protocol version. | |||
| The client MUST use the long header format and include its selected | The client MUST use the long header format and include its selected | |||
| version on all packets until it has 1-RTT keys and it has received a | version on all packets until it has 1-RTT keys and it has received a | |||
| packet from the server which is not a Version Negotiation packet. | packet from the server which is not a Version Negotiation packet. | |||
| A client MUST NOT change the version it uses unless it is in response | A client MUST NOT change the version it uses unless it is in response | |||
| skipping to change at page 35, line 4 ¶ | skipping to change at page 36, line 32 ¶ | |||
| QUIC provides reliable, ordered delivery of the cryptographic | QUIC provides reliable, ordered delivery of the cryptographic | |||
| handshake data. QUIC packet protection ensures confidentiality and | handshake data. QUIC packet protection ensures confidentiality and | |||
| integrity protection that meets the requirements of the cryptographic | integrity protection that meets the requirements of the cryptographic | |||
| handshake protocol: | handshake protocol: | |||
| o authenticated key exchange, where | o authenticated key exchange, where | |||
| * a server is always authenticated, | * a server is always authenticated, | |||
| * a client is optionally authenticated, | * a client is optionally authenticated, | |||
| * every connection produces distinct and unrelated keys, | * every connection produces distinct and unrelated keys, | |||
| * keying material is usable for packet protection for both 0-RTT | * keying material is usable for packet protection for both 0-RTT | |||
| and 1-RTT packets, and | and 1-RTT packets, and | |||
| * 1-RTT keys have forward secrecy | * 1-RTT keys have forward secrecy | |||
| o authenticated values for the transport parameters of the peer (see | o authenticated values for the transport parameters of the peer (see | |||
| Section 6.6) | Section 6.6) | |||
| o authenticated confirmation of version negotiation (see | o authenticated confirmation of version negotiation (see | |||
| Section 6.6.4) | Section 6.6.4) | |||
| o authenticated negotiation of an application protocol (TLS uses | o authenticated negotiation of an application protocol (TLS uses | |||
| ALPN [RFC7301] for this purpose) | ALPN [RFC7301] for this purpose) | |||
| o for the server, the ability to carry data that provides assurance | o for the server, the ability to carry data that provides assurance | |||
| that the client can receive packets that are addressed with the | that the client can receive packets that are addressed with the | |||
| transport address that is claimed by the client (see Section 6.9) | transport address that is claimed by the client (see Section 6.9) | |||
| The initial CRYPTO frame MUST be sent in a single packet. Any second | The first CRYPTO frame MUST be sent in a single packet. Any second | |||
| attempt that is triggered by address validation MUST also be sent | attempt that is triggered by address validation MUST also be sent | |||
| within a single packet. This avoids having to reassemble a message | within a single packet. This avoids having to reassemble a message | |||
| from multiple packets. | from multiple packets. | |||
| The first client packet of the cryptographic handshake protocol MUST | The first client packet of the cryptographic handshake protocol MUST | |||
| fit within a 1232 octet QUIC packet payload. This includes overheads | fit within a 1232 octet QUIC packet payload. This includes overheads | |||
| that reduce the space available to the cryptographic handshake | that reduce the space available to the cryptographic handshake | |||
| protocol. | protocol. | |||
| The CRYPTO frame can be sent in different packet number spaces. | The CRYPTO frame can be sent in different packet number spaces. | |||
| CRYPTO frames in each packet number space carry a separate sequence | CRYPTO frames in each packet number space carry a separate sequence | |||
| of handshake data starting from an offset of 0. | of handshake data starting from an offset of 0. | |||
| 6.5. Example Handshake Flows | 6.5. Example Handshake Flows | |||
| Details of how TLS is integrated with QUIC are provided in | Details of how TLS is integrated with QUIC are provided in | |||
| [QUIC-TLS], but some examples are provided here. | [QUIC-TLS], but some examples are provided here. | |||
| Figure 8 provides an overview of the 1-RTT handshake. Each line | Figure 8 provides an overview of the 1-RTT handshake. Each line | |||
| shows a QUIC packet with the packet type and packet number shown | shows a QUIC packet with the packet type and packet number shown | |||
| first, followed by the contents. So, for instance the first packet | first, followed by the frames that are typically contained in those | |||
| is of type Initial, with packet number 0, and contains a CRYPTO frame | packets. So, for instance the first packet is of type Initial, with | |||
| carrying the ClientHello. | packet number 0, and contains a CRYPTO frame carrying the | |||
| ClientHello. | ||||
| Note that multiple QUIC packets - even of different encryption levels | Note that multiple QUIC packets - even of different encryption levels | |||
| - may be coalesced into a single UDP datagram (see Section 4.9), and | - may be coalesced into a single UDP datagram (see Section 4.9), and | |||
| so this handshake may consist of as few as 4 UDP datagrams, or any | so this handshake may consist of as few as 4 UDP datagrams, or any | |||
| number more. For instance, the server's first flight contains | number more. For instance, the server's first flight contains | |||
| packets from the Initial encryption level (obfuscation), the | packets from the Initial encryption level (obfuscation), the | |||
| Handshake level, and "0.5-RTT data" from the server at the 1-RTT | Handshake level, and "0.5-RTT data" from the server at the 1-RTT | |||
| encryption level. | encryption level. | |||
| Client Server | Client Server | |||
| skipping to change at page 36, line 49 ¶ | skipping to change at page 38, line 45 ¶ | |||
| <- 1-RTT[0]: STREAM[1, "..."] ACK[0] | <- 1-RTT[0]: STREAM[1, "..."] ACK[0] | |||
| Initial[1]: ACK[0] | Initial[1]: ACK[0] | |||
| 0-RTT[1]: CRYPTO[EOED] | 0-RTT[1]: CRYPTO[EOED] | |||
| Handshake[0]: CRYPTO[FIN], ACK[0] | Handshake[0]: CRYPTO[FIN], ACK[0] | |||
| 1-RTT[2]: STREAM[0, "..."] ACK[0] -> | 1-RTT[2]: STREAM[0, "..."] ACK[0] -> | |||
| 1-RTT[1]: STREAM[55, "..."], ACK[1,2] | 1-RTT[1]: STREAM[55, "..."], ACK[1,2] | |||
| <- Handshake[1]: ACK[0] | <- Handshake[1]: ACK[0] | |||
| Figure 9: Example 1-RTT Handshake | Figure 9: Example 0-RTT Handshake | |||
| 6.6. Transport Parameters | 6.6. Transport Parameters | |||
| During connection establishment, both endpoints make authenticated | During connection establishment, both endpoints make authenticated | |||
| declarations of their transport parameters. These declarations are | declarations of their transport parameters. These declarations are | |||
| made unilaterally by each endpoint. Endpoints are required to comply | made unilaterally by each endpoint. Endpoints are required to comply | |||
| with the restrictions implied by these parameters; the description of | with the restrictions implied by these parameters; the description of | |||
| each parameter includes rules for its handling. | each parameter includes rules for its handling. | |||
| The format of the transport parameters is the TransportParameters | The format of the transport parameters is the TransportParameters | |||
| skipping to change at page 38, line 20 ¶ | skipping to change at page 40, line 20 ¶ | |||
| initial_max_bidi_streams(2), | initial_max_bidi_streams(2), | |||
| idle_timeout(3), | idle_timeout(3), | |||
| preferred_address(4), | 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_uni_streams(8), | initial_max_uni_streams(8), | |||
| disable_migration(9), | disable_migration(9), | |||
| initial_max_stream_data_bidi_remote(10), | initial_max_stream_data_bidi_remote(10), | |||
| initial_max_stream_data_uni(11), | initial_max_stream_data_uni(11), | |||
| max_ack_delay(12), | ||||
| original_connection_id(13), | ||||
| (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) { | |||
| skipping to change at page 39, line 21 ¶ | skipping to change at page 41, line 25 ¶ | |||
| properly complete. | properly complete. | |||
| Definitions for each of the defined transport parameters are included | Definitions for each of the defined transport parameters are included | |||
| in Section 6.6.1. Any given parameter MUST appear at most once in a | in Section 6.6.1. Any given parameter MUST appear at most once in a | |||
| given transport parameters extension. An endpoint MUST treat receipt | given transport parameters extension. An endpoint MUST treat receipt | |||
| of duplicate transport parameters as a connection error of type | of duplicate transport parameters as a connection error of type | |||
| TRANSPORT_PARAMETER_ERROR. | TRANSPORT_PARAMETER_ERROR. | |||
| 6.6.1. Transport Parameter Definitions | 6.6.1. Transport Parameter Definitions | |||
| An endpoint MUST include the following parameters in its encoded | ||||
| TransportParameters: | ||||
| idle_timeout (0x0003): The idle timeout is a value in seconds that | ||||
| is encoded as an unsigned 16-bit integer. The maximum value is | ||||
| 600 seconds (10 minutes). | ||||
| An endpoint MAY use the following transport parameters: | An endpoint MAY use the following transport parameters: | |||
| initial_max_data (0x0001): The initial maximum data parameter | initial_max_data (0x0001): The initial maximum data parameter | |||
| contains the initial value for the maximum amount of data that can | contains the initial value for the maximum amount of data that can | |||
| be sent on the connection. This parameter is encoded as an | be sent on the connection. This parameter is encoded as an | |||
| 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. If the transport parameter is | after completing the handshake. If the transport parameter is | |||
| absent, the connection starts with a flow control limit of 0. | absent, the connection starts with a flow control limit of 0. | |||
| skipping to change at page 40, line 13 ¶ | skipping to change at page 42, line 10 ¶ | |||
| unidirectional streams the peer may initiate, encoded as an | unidirectional streams the peer may initiate, encoded as an | |||
| unsigned 16-bit integer. If this parameter is absent or zero, | unsigned 16-bit integer. If this parameter is absent or zero, | |||
| unidirectional streams cannot be created until a MAX_STREAM_ID | unidirectional streams cannot be created until a MAX_STREAM_ID | |||
| frame is sent. Setting this parameter is equivalent to sending a | frame is sent. Setting this parameter is equivalent to sending a | |||
| MAX_STREAM_ID (Section 7.8) immediately after completing the | MAX_STREAM_ID (Section 7.8) immediately after completing the | |||
| handshake containing the corresponding Stream ID. For example, a | handshake containing the corresponding Stream ID. For example, a | |||
| value of 0x05 would be equivalent to receiving a MAX_STREAM_ID | value of 0x05 would be equivalent to receiving a MAX_STREAM_ID | |||
| containing 18 when received by a client or 19 when received by a | containing 18 when received by a client or 19 when received by a | |||
| server. | server. | |||
| idle_timeout (0x0003): The idle timeout is a value in seconds that | ||||
| is encoded as an unsigned 16-bit integer. If this parameter is | ||||
| absent or zero then the idle timeout is disabled. | ||||
| 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.8). | protected packets (Section 4.8). | |||
| 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.16. 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 and | value is also used for ACK frames that are sent in Initial and | |||
| Handshake packets. Values above 20 are invalid. | Handshake packets. Values above 20 are invalid. | |||
| disable_migration (0x0009): The endpoint does not support connection | disable_migration (0x0009): The endpoint does not support connection | |||
| migration (Section 6.11). Peers MUST NOT send any packets, | migration (Section 6.11). Peers MUST NOT send any packets, | |||
| including probing packets (Section 6.11.1), from a local address | including probing packets (Section 6.11.1), from a local address | |||
| other than that used to perform the handshake. This parameter is | other than that used to perform the handshake. This parameter is | |||
| a zero-length value. | a zero-length value. | |||
| max_ack_delay (0x000c): An 8 bit unsigned integer value indicating | ||||
| the maximum amount of time in milliseconds by which it will delay | ||||
| sending of acknowledgments. If this value is absent, a default of | ||||
| 25 milliseconds is assumed. | ||||
| Either peer MAY advertise an initial value for the flow control on | Either peer MAY advertise an initial value for the flow control on | |||
| each type of stream on which they might receive data. Each of the | each type of stream on which they might receive data. Each of the | |||
| following transport parameters is encoded as an unsigned 32-bit | following transport parameters is encoded as an unsigned 32-bit | |||
| integer in units of octets: | integer in units of octets: | |||
| initial_max_stream_data_bidi_local (0x0000): The initial stream | initial_max_stream_data_bidi_local (0x0000): The initial stream | |||
| maximum data for bidirectional, locally-initiated streams | maximum data for bidirectional, locally-initiated streams | |||
| parameter contains the initial flow control limit for newly | parameter contains the initial flow control limit for newly | |||
| created bidirectional streams opened by the endpoint that sets the | created bidirectional streams opened by the endpoint that sets the | |||
| transport parameter. In client transport parameters, this applies | transport parameter. In client transport parameters, this applies | |||
| skipping to change at page 41, line 21 ¶ | skipping to change at page 43, line 27 ¶ | |||
| transport parameters, this applies to streams with an identifier | transport parameters, this applies to streams with an identifier | |||
| ending in 0x3; in server transport parameters, this applies to | ending in 0x3; in server transport parameters, this applies to | |||
| streams ending in 0x2. | streams ending in 0x2. | |||
| If present, transport parameters that set initial stream flow control | If present, transport parameters that set initial stream flow control | |||
| limits are equivalent to sending a MAX_STREAM_DATA frame | limits are equivalent to sending a MAX_STREAM_DATA frame | |||
| (Section 7.7) on every stream of the corresponding type immediately | (Section 7.7) on every stream of the corresponding type immediately | |||
| after opening. If the transport parameter is absent, streams of that | after opening. If the transport parameter is absent, streams of that | |||
| type start with a flow control limit of 0. | type start with a flow control limit of 0. | |||
| A server MUST include the original_connection_id transport parameter | ||||
| if it sent a Retry packet: | ||||
| original_connection_id (0x000d): The value of the Destination | ||||
| Connection ID field from the first Initial packet sent by the | ||||
| client. This transport parameter is only sent by the server. | ||||
| 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.13.4. This parameter | verifying a stateless reset, see Section 6.13.4. This parameter | |||
| is a sequence of 16 octets. | is a sequence of 16 octets. | |||
| preferred_address (0x0004): The server's Preferred Address is used | preferred_address (0x0004): The server's Preferred Address is used | |||
| to effect a change in server address at the end of the handshake, | to effect a change in server address at the end of the handshake, | |||
| as described in Section 6.12. | as described in Section 6.12. | |||
| skipping to change at page 44, line 17 ¶ | skipping to change at page 46, line 31 ¶ | |||
| versions it supports. The version field in the QUIC packet header is | versions it supports. The version field in the QUIC packet header is | |||
| authenticated using transport parameters. The position and the | authenticated using transport parameters. The position and the | |||
| 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.7. Stateless Retries | 6.7. Stateless Retries | |||
| A server can process an initial cryptographic handshake messages from | A server can process an Initial packet from a client without | |||
| a client without committing any state. This allows a server to | committing any state. This allows a server to perform address | |||
| perform address validation (Section 6.9), or to defer connection | validation (Section 6.9), 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). | retaining connection state MUST use the Retry packet (Section 4.4). | |||
| This packet causes a client to restart the connection attempt and | This packet causes a client to restart the connection attempt and | |||
| includes the token in the new Initial packet (Section 4.6) to prove | includes the token in the new Initial packet (Section 4.6) to prove | |||
| source address ownership. | source address ownership. | |||
| 6.8. Using Explicit Congestion Notification | 6.8. Using Explicit Congestion Notification | |||
| QUIC endpoints use Explicit Congestion Notification (ECN) [RFC3168] | QUIC endpoints use Explicit Congestion Notification (ECN) [RFC3168] | |||
| to detect and respond to network congestion. ECN allows a network | to detect and respond to network congestion. ECN allows a network | |||
| node to indicate congestion in the network by setting a codepoint in | node to indicate congestion in the network by setting a codepoint in | |||
| the IP header of a packet instead of dropping it. Endpoints react to | the IP header of a packet instead of dropping it. Endpoints react to | |||
| congestion by reducing their sending rate in response, as described | congestion by reducing their sending rate in response, as described | |||
| in [QUIC-RECOVERY]. | in [QUIC-RECOVERY]. | |||
| To use ECN, QUIC endpoints first determine whether a path and peer | To use ECN, QUIC endpoints first determine whether a path supports | |||
| support ECN marking. Verifying the path occurs at the beginning of a | ECN marking and the peer is able to access the ECN codepoint in the | |||
| connection and when the connection migrates to a new path (see | IP header. A network path does not support ECN if ECN marked packets | |||
| Section 6.11). | get dropped or ECN markings are rewritten on the path. An endpoint | |||
| verifies the path, both during connection establishment and when | ||||
| migrating to a new path (see Section 6.11). | ||||
| Each endpoint independently verifies and enables ECN for the path | Each endpoint independently verifies and enables use of ECN by | |||
| from it to the peer. | setting the IP header ECN codepoint to ECN Capable Transport (ECT) | |||
| for the path from it to the other peer. Even if ECN is not used on | ||||
| the path to the peer, the endpoint MUST provide feedback about ECN | ||||
| markings received (if accessible). | ||||
| To verify that both a path and the peer support ECN, an endpoint MUST | To verify both that a path supports ECN and the peer can provide ECN | |||
| set one of the ECN Capable Transport (ECT) codepoints - ECT(0) or | feedback, an endpoint MUST set the ECT(0) codepoint in the IP header | |||
| ECT(1) - in the IP header [RFC8311] of all outgoing packets. | of all outgoing packets [RFC8311]. | |||
| If an ECT codepoint set in the IP header is not corrupted by a | If an ECT codepoint set in the IP header is not corrupted by a | |||
| network device, then a received packet contains either the codepoint | network device, then a received packet contains either the codepoint | |||
| sent by the peer or the Congestion Experienced (CE) codepoint set by | sent by the peer or the Congestion Experienced (CE) codepoint set by | |||
| a network device that is experiencing congestion. | a network device that is experiencing congestion. | |||
| On receiving a packet with an ECT or CE codepoint, an endpoint that | On receiving a packet with an ECT or CE codepoint, an endpoint that | |||
| supports ECN increases the corresponding ECT(0), ECT(1), or CE count, | can access the IP ECN codepoints increases the corresponding ECT(0), | |||
| and includes these counters in subsequent (see Section 8.1) ACK_ECN | ECT(1), or CE count, and includes these counters in subsequent (see | |||
| frames (see Section 7.16). | Section 8.1) ACK frames (see Section 7.16). | |||
| A packet detected by a receiver as a duplicate does not affect the | A packet detected by a receiver as a duplicate does not affect the | |||
| receiver's local ECN codepoint counts; see (Section 12.7) for | receiver's local ECN codepoint counts; see (Section 12.7) for | |||
| relevant security concerns. | relevant security concerns. | |||
| If an endpoint receives a packet without an ECT or CE codepoint, it | If an endpoint receives a packet without an ECT or CE codepoint, it | |||
| responds per Section 8.1 with an ACK frame. | responds per Section 8.1 with an ACK frame. | |||
| If an endpoint does not support ECN or does not have access to | If an endpoint does not have access to received ECN codepoints, it | |||
| received ECN codepoints, it acknowledges received packets per | acknowledges received packets per Section 8.1 with an ACK frame. | |||
| Section 8.1 with an ACK frame. | ||||
| If a packet sent with an ECT codepoint is newly acknowledged by the | If a packet sent with an ECT codepoint is newly acknowledged by the | |||
| peer in an ACK frame, the endpoint stops setting ECT codepoints in | peer in an ACK frame, the endpoint stops setting ECT codepoints in | |||
| subsequent packets, with the expectation that either the network or | subsequent packets, with the expectation that either the network or | |||
| the peer no longer supports ECN. | the peer no longer supports ECN. | |||
| To protect the connection from arbitrary corruption of ECN codepoints | To protect the connection from arbitrary corruption of ECN codepoints | |||
| by the network, an endpoint verifies the following when an ACK_ECN | by the network, an endpoint verifies the following when an ACK frame | |||
| frame is received: | is received: | |||
| o The increase in ECT(0) and ECT(1) counters MUST be at least the | o The increase in ECT(0) and ECT(1) counters MUST be at least the | |||
| number of packets newly acknowledged that were sent with the | number of packets newly acknowledged that were sent with the | |||
| corresponding codepoint. | corresponding codepoint. | |||
| o The total increase in ECT(0), ECT(1), and CE counters reported in | o The total increase in ECT(0), ECT(1), and CE counters reported in | |||
| the ACK_ECN frame MUST be at least the total number of packets | the ACK frame MUST be at least the total number of packets newly | |||
| newly acknowledged in this ACK_ECN frame. | acknowledged in this ACK frame. | |||
| An endpoint could miss acknowledgements for a packet when ACK frames | An endpoint could miss acknowledgements for a packet when ACK frames | |||
| are lost. It is therefore possible for the total increase in ECT(0), | are lost. It is therefore possible for the total increase in ECT(0), | |||
| ECT(1), and CE counters to be greater than the number of packets | ECT(1), and CE counters to be greater than the number of packets | |||
| acknowledged in an ACK frame. When this happens, the local reference | acknowledged in an ACK frame. When this happens, the local reference | |||
| counts MUST be increased to match the counters in the ACK frame. | counts MUST be increased to match the counters in the ACK frame. | |||
| Upon successful verification, an endpoint continues to set ECT | Upon successful verification, an endpoint continues to set ECT | |||
| codepoints in subsequent packets with the expectation that the path | codepoints in subsequent packets with the expectation that the path | |||
| is ECN-capable. | is ECN-capable. | |||
| skipping to change at page 49, line 18 ¶ | skipping to change at page 51, line 37 ¶ | |||
| 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 | |||
| synchronization mechanisms that are not provided here. | synchronization mechanisms that are not provided here. | |||
| An endpoint MAY bundle PATH_CHALLENGE and PATH_RESPONSE frames that | An endpoint MAY bundle PATH_CHALLENGE and PATH_RESPONSE frames that | |||
| are used for path validation with other frames. For instance, an | are used for path validation with other frames. For instance, an | |||
| endpoint may pad a packet carrying a PATH_CHALLENGE for PMTU | endpoint may pad a packet carrying a PATH_CHALLENGE for PMTU | |||
| discovery, or an endpoint may bundle a PATH_RESPONSE with its own | discovery, or an endpoint may bundle a PATH_RESPONSE with its own | |||
| PATH_CHALLENGE. | PATH_CHALLENGE. | |||
| When probing a new path, an endpoint might want to ensure that its | ||||
| peer has an unused connection ID available for responses. The | ||||
| endpoint can send NEW_CONNECTION_ID and PATH_CHALLENGE frames in the | ||||
| same packet. This ensures that an unused connection ID will be | ||||
| available to the peer when sending a response. | ||||
| 6.10.1. Initiation | 6.10.1. Initiation | |||
| To initiate path validation, an endpoint sends a PATH_CHALLENGE frame | To initiate path validation, an endpoint sends a PATH_CHALLENGE frame | |||
| containing a random payload on the path to be validated. | containing a random payload on the path to be validated. | |||
| An endpoint MAY send additional PATH_CHALLENGE frames to handle | An endpoint MAY send additional PATH_CHALLENGE frames to handle | |||
| packet loss. An endpoint SHOULD NOT send a PATH_CHALLENGE more | packet loss. An endpoint SHOULD NOT send a PATH_CHALLENGE more | |||
| frequently than it would an Initial packet, ensuring that connection | frequently than it would an Initial packet, ensuring that connection | |||
| migration is no more load on a new path than establishing a new | migration is no more load on a new path than establishing a new | |||
| connection. | connection. | |||
| skipping to change at page 51, line 8 ¶ | skipping to change at page 53, line 30 ¶ | |||
| available or close the connection. | available or close the connection. | |||
| A path validation might be abandoned for other reasons besides | A path validation might be abandoned for other reasons besides | |||
| failure. Primarily, this happens if a connection migration to a new | failure. Primarily, this happens if a connection migration to a new | |||
| path is initiated while a path validation on the old path is in | path is initiated while a path validation on the old path is in | |||
| progress. | progress. | |||
| 6.11. Connection Migration | 6.11. Connection Migration | |||
| 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 an | |||
| migrating to a new network. This section describes the process by | endpoint migrating to a new network. This section describes the | |||
| which an endpoint migrates to a new address. | process by 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. The design of | handshake is finished and the endpoint has 1-RTT keys. The design of | |||
| QUIC relies on endpoints retaining a stable address for the duration | QUIC relies on endpoints retaining a stable address for the duration | |||
| of the handshake. | of the handshake. | |||
| An endpoint also MUST NOT initiate connection migration if the peer | An endpoint also MUST NOT initiate connection migration if the peer | |||
| sent the "disable_migration" transport parameter during the | sent the "disable_migration" transport parameter during the | |||
| handshake. An endpoint which has sent this transport parameter, but | handshake. An endpoint which has sent this transport parameter, but | |||
| detects that a peer has nonetheless migrated to a different network | detects that a peer has nonetheless migrated to a different network | |||
| skipping to change at page 51, line 33 ¶ | skipping to change at page 54, line 8 ¶ | |||
| Not all changes of peer address are intentional migrations. The peer | Not all changes of peer address are intentional migrations. The peer | |||
| could experience NAT rebinding: a change of address due to a | could experience NAT rebinding: a change of address due to a | |||
| middlebox, usually a NAT, allocating a new outgoing port or even a | middlebox, usually a NAT, allocating a new outgoing port or even a | |||
| new outgoing IP address for a flow. Endpoints SHOULD perform path | new outgoing IP address for a flow. Endpoints SHOULD perform path | |||
| validation (Section 6.10) if a NAT rebinding does not cause the | validation (Section 6.10) if a NAT rebinding does not cause the | |||
| connection to fail. | connection to fail. | |||
| This document limits migration of connections to new client | This document limits migration of connections to new client | |||
| addresses, except as described in Section 6.12. Clients are | addresses, except as described in Section 6.12. Clients are | |||
| responsible for initiating all migrations. Servers do not send non- | responsible for initiating all migrations. Servers do not send non- | |||
| probing packets (see Section 6.11.1) toward a client address until it | probing packets (see Section 6.11.1) toward a client address until | |||
| sees a non-probing packet from that address. If a client receives | they see a non-probing packet from that address. If a client | |||
| packets from an unknown server address, the client MAY discard these | receives packets from an unknown server address, the client MAY | |||
| packets. | discard these packets. | |||
| 6.11.1. Probing a New Path | 6.11.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.10 prior to migrating the connection | using path validation Section 6.10 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. | |||
| An endpoint uses a new connection ID for probes sent from a new local | An endpoint uses a new connection ID for probes sent from a new local | |||
| address, see Section 6.11.5 for further discussion. | address, see Section 6.11.5 for further discussion. An endpoint that | |||
| uses a new local address needs to ensure that at least one new | ||||
| connection ID is available at the peer. That can be achieved by | ||||
| including a NEW_CONNECTION_ID frame in the probe. | ||||
| Receiving a PATH_CHALLENGE frame from a peer indicates that the peer | Receiving a PATH_CHALLENGE frame from a peer indicates that the peer | |||
| is probing for reachability on a path. An endpoint sends a | is probing for reachability on a path. An endpoint sends a | |||
| PATH_RESPONSE in response as per Section 6.10. | PATH_RESPONSE in response as per Section 6.10. | |||
| PATH_CHALLENGE, PATH_RESPONSE, and PADDING frames are "probing | PATH_CHALLENGE, PATH_RESPONSE, NEW_CONNECTION_ID, and PADDING frames | |||
| frames", and all other frames are "non-probing frames". A packet | are "probing frames", and all other frames are "non-probing frames". | |||
| containing only probing frames is a "probing packet", and a packet | A packet containing only probing frames is a "probing packet", and a | |||
| containing any other frame is a "non-probing packet". | packet containing any other frame is a "non-probing packet". | |||
| 6.11.2. Initiating Connection Migration | 6.11.2. Initiating Connection Migration | |||
| A endpoint can migrate a connection to a new local address by sending | An endpoint can migrate a connection to a new local address by | |||
| packets containing frames other than probing frames from that | sending packets containing frames other than probing frames from that | |||
| address. | address. | |||
| Each endpoint validates its peer's address during connection | Each endpoint validates its peer's address during connection | |||
| establishment. Therefore, a migrating endpoint can send to its peer | establishment. Therefore, a migrating endpoint can send to its peer | |||
| knowing that the peer is willing to receive at the peer's current | knowing that the peer is willing to receive at the peer's current | |||
| address. Thus an endpoint can migrate to a new local address without | address. Thus an endpoint can migrate to a new local address without | |||
| first validating the peer's address. | first validating the peer's address. | |||
| When migrating, the new path might not support the endpoint's current | When migrating, the new path might not support the endpoint's current | |||
| sending rate. Therefore, the endpoint resets its congestion | sending rate. Therefore, the endpoint resets its congestion | |||
| skipping to change at page 55, line 15 ¶ | skipping to change at page 57, line 43 ¶ | |||
| 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 timer for a longer period of time. | PATH_CHALLENGE, and restart the timer for a longer period of time. | |||
| 6.11.5. Privacy Implications of Connection Migration | 6.11.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 their peer, so different | activity correlated by any entity other than their peer, so different | |||
| connection IDs are used when sending from different local addresses, | connection IDs are used when sending from different local addresses, | |||
| as discussed in Section 6.1. | as discussed in Section 6.1. For this to be effective endpoints need | |||
| to ensure that connections IDs they provide cannot be linked by any | ||||
| other entity. | ||||
| This eliminates the use of the connection ID for linking activity | This eliminates the use of the connection ID for linking activity | |||
| from the same connection on different networks. Protection of packet | from the same connection on different networks. Protection of packet | |||
| numbers ensures that packet numbers cannot be used to correlate | numbers ensures that packet numbers cannot be used to correlate | |||
| activity. This does not prevent other properties of packets, such as | activity. This does not prevent other properties of packets, such as | |||
| timing and size, from being used to correlate activity. | timing and size, from being used to correlate activity. | |||
| Clients MAY move to a new connection ID at any time based on | Clients MAY move to a new connection ID at any time based on | |||
| implementation-specific concerns. For example, after a period of | implementation-specific concerns. For example, after a period of | |||
| network inactivity NAT rebinding might occur when the client begins | network inactivity NAT rebinding might occur when the client begins | |||
| skipping to change at page 55, line 38 ¶ | skipping to change at page 58, line 20 ¶ | |||
| 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 | |||
| are exercised even for clients that don't experience NAT rebindings | are exercised even for clients that don't experience NAT rebindings | |||
| or genuine migrations. Changing port number can cause a peer to | or genuine migrations. Changing port number can cause a peer to | |||
| reset its congestion state (see Section 6.11.4), so the port SHOULD | reset its congestion state (see Section 6.11.4), so the port SHOULD | |||
| only be changed infrequently. | only be changed infrequently. | |||
| Endpoints that use connection IDs with length greater than zero could | ||||
| have their activity correlated if their peers keep using the same | ||||
| destination connection ID after migration. Endpoints that receive | ||||
| packets with a previously unused Destination Connection ID SHOULD | ||||
| change to sending packets with a connection ID that has not been used | ||||
| on any other network path. The goal here is to ensure that packets | ||||
| sent on different paths cannot be correlated. To fulfill this | ||||
| privacy requirement, endpoints that initiate migration and use | ||||
| connection IDs with length greater than zero SHOULD provide their | ||||
| peers with new connection IDs before migration. | ||||
| Caution: If both endpoints change connection ID in response to | ||||
| seeing a change in connection ID from their peer, then this can | ||||
| trigger an infinite sequence of changes. | ||||
| 6.12. Server's Preferred Address | 6.12. Server's Preferred Address | |||
| QUIC allows servers to accept connections on one IP address and | QUIC allows servers to accept connections on one IP address and | |||
| attempt to transfer these connections to a more preferred address | attempt to transfer these connections to a more preferred address | |||
| shortly after the handshake. This is particularly useful when | shortly after the handshake. This is particularly useful when | |||
| clients initially connect to an address shared by multiple servers | clients initially connect to an address shared by multiple servers | |||
| but would prefer to use a unicast address to ensure connection | but would prefer to use a unicast address to ensure connection | |||
| stability. This section describes the protocol for migrating a | stability. This section describes the protocol for migrating a | |||
| connection to a preferred server address. | connection to a preferred server address. | |||
| skipping to change at page 58, line 48 ¶ | skipping to change at page 61, line 48 ¶ | |||
| 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.11), while in the | indicating a client connection migration (Section 6.11), 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.10). A server in the closing state MAY | is validated (see Section 6.10). 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.13.2. Idle Timeout | 6.13.2. Idle Timeout | |||
| A connection that remains idle for longer than the advertised idle | If the idle timeout is enabled, a connection that remains idle for | |||
| timeout (see Section 6.6.1) is closed. A connection enters the | longer than the advertised idle timeout (see Section 6.6.1) is | |||
| draining state when the idle timeout expires. | closed. A connection enters the draining state when the idle timeout | |||
| expires. | ||||
| Each endpoint advertises their own idle timeout to their peer. The | Each endpoint advertises their own idle timeout to their peer. The | |||
| idle timeout starts from the last packet received. In order to | idle timeout starts from the last packet received. In order to | |||
| ensure that initiating new activity postpones an idle timeout, an | ensure that initiating new activity postpones an idle timeout, an | |||
| endpoint restarts this timer when sending a packet. An endpoint does | endpoint restarts this timer when sending a packet. An endpoint does | |||
| not postpone the idle timeout if another packet has been sent | not postpone the idle timeout if another packet has been sent | |||
| containing frames other than ACK or PADDING, and that other packet | containing frames other than ACK or PADDING, and that other packet | |||
| has not been acknowledged or declared lost. Packets that contain | has not been acknowledged or declared lost. Packets that contain | |||
| only ACK or PADDING frames are not acknowledged until an endpoint has | only ACK or PADDING frames are not acknowledged until an endpoint has | |||
| other frames to send, so they could prevent the timeout from being | other frames to send, so they could prevent the timeout from being | |||
| skipping to change at page 60, line 33 ¶ | skipping to change at page 63, line 33 ¶ | |||
| endpoint that is unable to properly continue the connection. An | endpoint that is unable to properly continue the connection. An | |||
| endpoint that wishes to communicate a fatal connection error MUST use | endpoint 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, a token is sent by endpoints. The token is | To support this process, a token is sent by endpoints. The token is | |||
| carried in the NEW_CONNECTION_ID frame sent by either peer, and | carried in the NEW_CONNECTION_ID frame sent by either peer, and | |||
| servers can specify the stateless_reset_token transport parameter | servers can specify the stateless_reset_token transport parameter | |||
| during the handshake (clients cannot because their transport | during the handshake (clients cannot because their transport | |||
| parameters don't have confidentiality protection). This value is | parameters don't have confidentiality protection). This value is | |||
| protected by encryption, so only client and server know this value. | protected by encryption, so only client and server know this value. | |||
| Tokens sent via NEW_CONNECTION_ID frames are invalidated when their | ||||
| associated connection ID is retired via a RETIRE_CONNECTION_ID frame | ||||
| (Section 7.14). | ||||
| An endpoint that receives packets that it cannot process sends a | An endpoint that receives packets that it cannot process sends a | |||
| packet in the following layout: | packet in the following layout: | |||
| 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|0|0|0| | |0|K|1|1|0|0|0|0| | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Random Octets (160..) ... | | Random Octets (160..) ... | |||
| skipping to change at page 62, line 7 ¶ | skipping to change at page 65, line 7 ¶ | |||
| An endpoint MAY send a stateless reset in response to a packet with a | An endpoint MAY send a stateless reset in response to a packet with a | |||
| long header. This would not be effective if the stateless reset | long header. This would not be effective if the stateless reset | |||
| token was not yet available to a peer. In this QUIC version, packets | token was not yet available to a peer. In this QUIC version, packets | |||
| with a long header are only used during connection establishment. | with a long header are only used during connection establishment. | |||
| Because the stateless reset token is not available until connection | Because the stateless reset token is not available until connection | |||
| establishment is complete or near completion, ignoring an unknown | establishment is complete or near completion, ignoring an unknown | |||
| packet with a long header might be more effective. | packet with a long header might be more effective. | |||
| An endpoint cannot determine the Source Connection ID from a packet | An endpoint cannot determine the Source Connection ID from a packet | |||
| with a short header, therefore it cannot set the Destination | with a short header, therefore it cannot set the Destination | |||
| Connection ID in the stateless reset packet. The destination | Connection ID in the stateless reset packet. The Destination | |||
| connection ID will therefore differ from the value used in previous | Connection ID will therefore differ from the value used in previous | |||
| packets. A random Destination Connection ID makes the connection ID | packets. A random Destination Connection ID makes the connection ID | |||
| appear to be the result of moving to a new connection ID that was | appear to be the result of moving to a new connection ID that was | |||
| provided using a NEW_CONNECTION_ID frame (Section 7.13). | provided using a NEW_CONNECTION_ID frame (Section 7.13). | |||
| Using a randomized connection ID results in two problems: | Using a randomized connection ID results in two problems: | |||
| o The packet might not reach the peer. If the Destination | o The packet might not reach the peer. If the Destination | |||
| Connection ID is critical for routing toward the peer, then this | Connection ID is critical for routing toward the peer, then this | |||
| packet could be incorrectly routed. This might also trigger | packet could be incorrectly routed. This might also trigger | |||
| another Stateless Reset in response, see Section 6.13.4.3. A | another Stateless Reset in response, see Section 6.13.4.3. A | |||
| skipping to change at page 63, line 13 ¶ | skipping to change at page 66, line 13 ¶ | |||
| these values are identical, the endpoint MUST enter the draining | these values are identical, the endpoint MUST enter the draining | |||
| period and not send any further packets on this connection. If the | period and not send any further packets on this connection. If the | |||
| comparison fails, the packet can be discarded. | comparison fails, the packet can be discarded. | |||
| 6.13.4.2. Calculating a Stateless Reset Token | 6.13.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, an endpoint could randomly generate | create a Stateless Reset Token, an endpoint 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 | this presents a coordination problem when there are multiple | |||
| instances in a cluster or a storage problem for a endpoint that might | instances in a cluster or a storage problem for an endpoint that | |||
| lose state. Stateless reset specifically exists to handle the case | might lose state. Stateless reset specifically exists to handle the | |||
| where state is lost, so this approach is suboptimal. | case where state is 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 | |||
| endpoint by generating the proof using a second iteration of a | endpoint by generating the proof using a second iteration of a | |||
| preimage-resistant function that takes a static key and the | preimage-resistant function that takes a static key and the | |||
| connection ID chosen by the endpoint (see Section 6.1) as input. An | connection ID chosen by the endpoint (see Section 6.1) as input. An | |||
| endpoint could use HMAC [RFC2104] (for example, HMAC(static_key, | endpoint could use HMAC [RFC2104] (for example, HMAC(static_key, | |||
| connection_id)) or HKDF [RFC5869] (for example, using the static key | connection_id)) or HKDF [RFC5869] (for example, using the static key | |||
| as input keying material, with the connection ID as salt). The | as input keying material, with the connection ID as salt). The | |||
| output of this function is truncated to 16 octets to produce the | output of this function is truncated to 16 octets to produce the | |||
| Stateless Reset Token for that connection. | Stateless Reset Token for that connection. | |||
| skipping to change at page 64, line 16 ¶ | skipping to change at page 67, line 16 ¶ | |||
| protection. | protection. | |||
| 6.13.4.3. Looping | 6.13.4.3. Looping | |||
| The design of a Stateless Reset is such that it is indistinguishable | The design of a Stateless Reset is such that it is indistinguishable | |||
| from a valid packet. This means that a Stateless Reset might trigger | from a valid packet. This means that a Stateless Reset might trigger | |||
| the sending of a Stateless Reset in response, which could lead to | the sending of a Stateless Reset in response, which could lead to | |||
| infinite exchanges. | infinite exchanges. | |||
| An endpoint MUST ensure that every Stateless Reset that it sends is | An endpoint MUST ensure that every Stateless Reset that it sends is | |||
| smaller than the packet triggered it, unless it maintains state | smaller than the packet which triggered it, unless it maintains state | |||
| sufficient to prevent looping. In the event of a loop, this results | sufficient to prevent looping. In the event of a loop, this results | |||
| in packets eventually being too small to trigger a response. | in packets eventually being too small to trigger a response. | |||
| An endpoint can remember the number of Stateless Reset packets that | An endpoint can remember the number of Stateless Reset packets that | |||
| it has sent and stop generating new Stateless Reset packets once a | it has sent and stop generating new Stateless Reset packets once a | |||
| limit is reached. Using separate limits for different remote | limit is reached. Using separate limits for different remote | |||
| addresses will ensure that Stateless Reset packets can be used to | addresses will ensure that Stateless Reset packets can be used to | |||
| close connections when other peers or connections have exhausted | close connections when other peers or connections have exhausted | |||
| limits. | limits. | |||
| Reducing the size of a Stateless Reset below the recommended minimum | Reducing the size of a Stateless Reset below the recommended minimum | |||
| size of 37 octets could mean that the packet could reveal to an | size of 37 octets could mean that the packet could reveal to an | |||
| observer that it is a Stateless Reset. Conversely, refusing to send | observer that it is a Stateless Reset. Conversely, refusing to send | |||
| a Stateless Reset in response to a small packet might result in | a Stateless Reset in response to a small packet might result in | |||
| Stateless Reset not being useful in detecting cases of broken | Stateless Reset not being useful in detecting cases of broken | |||
| connections where only very small packets are sent; such failures | connections where only very small packets are sent; such failures | |||
| might only be detected by other means, such as timers. | might only be detected by other means, such as timers. | |||
| An endpoint can increase the odds that a packet will trigger a | ||||
| Stateless Reset if it cannot be processed by padding it to at least | ||||
| 38 octets. | ||||
| 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 commonly use a variable-length encoding for non-negative | QUIC frames commonly use a variable-length encoding for non-negative | |||
| integer values. This encoding ensures that smaller integer values | integer values. This encoding ensures that smaller integer values | |||
| skipping to change at page 68, line 15 ¶ | skipping to change at page 71, line 15 ¶ | |||
| 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 | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Error Code (16) | | | Error Code (16) | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Reason Phrase Length (i) ... | | Reason Phrase Length (i) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Reason Phrase (*) ... | | Reason Phrase (*) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| The fields of a APPLICATION_CLOSE frame are as follows: | The fields of an APPLICATION_CLOSE frame are as follows: | |||
| Error Code: A 16-bit error code which indicates the reason for | Error Code: A 16-bit error code which indicates the reason for | |||
| closing this connection. APPLICATION_CLOSE uses codes from the | closing this connection. APPLICATION_CLOSE uses codes from the | |||
| application protocol error code space, see Section 11.4. | application protocol error code space, see Section 11.4. | |||
| Reason Phrase Length: This field is identical in format and | Reason Phrase Length: This field is identical in format and | |||
| semantics to the Reason Phrase Length field from CONNECTION_CLOSE. | semantics to the Reason Phrase Length field from CONNECTION_CLOSE. | |||
| Reason Phrase: This field is identical in format and semantics to | Reason Phrase: This field is identical in format and semantics to | |||
| the Reason Phrase field from CONNECTION_CLOSE. | the Reason Phrase field from CONNECTION_CLOSE. | |||
| skipping to change at page 69, line 8 ¶ | skipping to change at page 72, line 8 ¶ | |||
| The fields in the MAX_DATA frame are as follows: | The fields in the MAX_DATA frame are as follows: | |||
| Maximum Data: A variable-length integer indicating the maximum | Maximum Data: A variable-length integer indicating the maximum | |||
| amount of data that can be sent on the entire connection, in units | amount of data that can be sent on the entire connection, in units | |||
| of octets. | of octets. | |||
| All data sent in STREAM frames counts toward this limit. The sum of | All data sent in STREAM frames counts toward this limit. The sum of | |||
| the largest received offsets on all streams - including streams in | the largest received offsets on all streams - including streams in | |||
| terminal states - MUST NOT exceed the value advertised by a receiver. | terminal states - MUST NOT exceed the value advertised by a receiver. | |||
| An endpoint MUST terminate a connection with a | An endpoint MUST terminate a connection with a FLOW_CONTROL_ERROR | |||
| QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA error if it receives more | error if it receives more data than the maximum data value that it | |||
| data than the maximum data value that it has sent, unless this is a | has sent, unless this is a result of a change in the initial limits | |||
| result of a change in the initial limits (see Section 6.6.2). | (see Section 6.6.2). | |||
| 7.7. MAX_STREAM_DATA Frame | 7.7. MAX_STREAM_DATA Frame | |||
| The MAX_STREAM_DATA frame (type=0x05) is used in flow control to | The MAX_STREAM_DATA frame (type=0x05) is used in flow control to | |||
| inform a peer of the maximum amount of data that can be sent on a | inform a peer of the maximum amount of data that can be sent on a | |||
| stream. | stream. | |||
| An endpoint that receives a MAX_STREAM_DATA frame for a receive-only | An endpoint that receives a MAX_STREAM_DATA frame for a receive-only | |||
| stream MUST terminate the connection with error PROTOCOL_VIOLATION. | stream MUST terminate the connection with error PROTOCOL_VIOLATION. | |||
| skipping to change at page 72, line 50 ¶ | skipping to change at page 75, line 50 ¶ | |||
| Stream ID: A variable-length integer indicating the highest stream | Stream ID: A variable-length integer indicating the highest stream | |||
| ID that the sender was permitted to open. | ID that the sender was permitted to open. | |||
| 7.13. NEW_CONNECTION_ID Frame | 7.13. NEW_CONNECTION_ID Frame | |||
| An endpoint sends a NEW_CONNECTION_ID frame (type=0x0b) to provide | An endpoint sends a NEW_CONNECTION_ID frame (type=0x0b) to provide | |||
| its peer with alternative connection IDs that can be used to break | its peer with alternative connection IDs that can be used to break | |||
| linkability when migrating connections (see Section 6.11.5). | linkability when migrating connections (see Section 6.11.5). | |||
| The NEW_CONNECTION_ID is as follows: | The NEW_CONNECTION_ID frame is as follows: | |||
| 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 | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Sequence (i) ... | | Length (8) | Sequence Number (i) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Length (8) | Connection ID (32..144) ... | | Connection ID (32..144) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | | | | | | |||
| + + | + + | |||
| | | | | | | |||
| + Stateless Reset Token (128) + | + Stateless Reset Token (128) + | |||
| | | | | | | |||
| + + | + + | |||
| | | | | | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| The fields are: | The fields are: | |||
| Sequence: A variable-length integer. This value starts at 0 and | ||||
| increases by 1 for each connection ID that is provided by the | ||||
| server. The connection ID that is assigned during the handshake | ||||
| is assumed to have a sequence of -1. That is, the value selected | ||||
| during the handshake comes immediately before the first value that | ||||
| a server can send. | ||||
| 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. | |||
| Sequence Number: The sequence number assigned to the connection ID | ||||
| by the sender. See Section 6.1.1. | ||||
| 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 for a | |||
| stateless reset when the associated connection ID is used (see | stateless reset when the associated connection ID is used (see | |||
| Section 6.13.4). | Section 6.13.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 | Transmission errors, timeouts and retransmissions might cause the | |||
| same NEW_CONNECTION_ID frame to be received multiple times. Receipt | ||||
| of the same frame multiple times MUST NOT be treated as a connection | ||||
| error. A receiver can use the sequence number supplied in the | ||||
| NEW_CONNECTION_ID frame to identify new connection IDs from old ones. | ||||
| If an endpoint receives a NEW_CONNECTION_ID frame that repeats a | ||||
| previously issued connection ID with a different Stateless Reset | ||||
| Token or a different sequence number, the endpoint MAY treat that | ||||
| receipt as a connection error of type PROTOCOL_VIOLATION. | ||||
| 7.14. RETIRE_CONNECTION_ID Frame | ||||
| An endpoint sends a RETIRE_CONNECTION_ID frame (type=0x1b) to | ||||
| indicate that it will no longer use a connection ID that was issued | ||||
| by its peer. This may include the connection ID provided during the | ||||
| handshake. Sending a RETIRE_CONNECTION_ID frame also serves as a | ||||
| request to the peer to send additional connection IDs for future use | ||||
| (see Section 6.1). New connection IDs can be delivered to a peer | ||||
| using the NEW_CONNECTION_ID frame (Section 7.13). | ||||
| Retiring a connection ID invalidates the stateless reset token | ||||
| associated with that connection ID. | ||||
| The RETIRE_CONNECTION_ID frame is as follows: | ||||
| 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 | ||||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| | Sequence Number (i) ... | ||||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| The fields are: | ||||
| Sequence Number: The sequence number of the connection ID being | ||||
| retired. See Section 6.1.2. | ||||
| Receipt of a RETIRE_CONNECTION_ID frame containing a sequence number | ||||
| greater than any previously sent to the peer MAY be treated as a | ||||
| connection error of type PROTOCOL_VIOLATION. | ||||
| An endpoint cannot send this frame if it was provided with a zero- | ||||
| length connection ID by its peer. An endpoint that provides a zero- | ||||
| length connection ID MUST treat receipt of a RETIRE_CONNECTION_ID | ||||
| frame as a connection error of type PROTOCOL_VIOLATION. | ||||
| 7.15. STOP_SENDING Frame | ||||
| An endpoint may use a STOP_SENDING frame (type=0x0c) to communicate | An endpoint may use a STOP_SENDING frame (type=0x0c) to communicate | |||
| that incoming data is being discarded on receipt at application | that incoming data is being discarded on receipt at application | |||
| request. This signals a peer to abruptly terminate transmission on a | request. This signals a peer to abruptly terminate transmission on a | |||
| stream. | stream. | |||
| Receipt of a STOP_SENDING frame is only valid for a send stream that | Receipt of a STOP_SENDING frame is only valid for a send stream that | |||
| exists and is not in the "Ready" state (see Section 9.2.1). | exists and is not in the "Ready" state (see Section 9.2.1). | |||
| Receiving a STOP_SENDING frame for a send stream that is "Ready" or | Receiving a STOP_SENDING frame for a send stream that is "Ready" or | |||
| non-existent MUST be treated as a connection error of type | non-existent MUST be treated as a connection error of type | |||
| skipping to change at page 74, line 38 ¶ | skipping to change at page 78, line 27 ¶ | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| The fields are: | The fields are: | |||
| 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.16. ACK Frame | |||
| Receivers send ACK frames (type=0x0d) to inform senders which packets | Receivers send ACK frames (types 0x1a and 0x1b) to inform senders of | |||
| they have received and processed. The ACK frame contains any number | packets they have received and processed. The ACK frame contains one | |||
| of ACK blocks. ACK blocks are ranges of acknowledged packets. | or more ACK Blocks. ACK Blocks are ranges of acknowledged packets. | |||
| If the frame type is 0x1b, ACK frames also contain the sum of ECN | ||||
| marks received on the connection up until this point. | ||||
| QUIC acknowledgements are irrevocable. Once acknowledged, a packet | QUIC acknowledgements are irrevocable. Once acknowledged, a packet | |||
| remains acknowledged, even if it does not appear in a future ACK | remains acknowledged, even if it does not appear in a future ACK | |||
| frame. This is unlike TCP SACKs ([RFC2018]). | frame. This is unlike TCP SACKs ([RFC2018]). | |||
| It is expected that a sender will reuse the same packet number across | It is expected that a sender will reuse the same packet number across | |||
| different packet number spaces. ACK frames only acknowledge the | different packet number spaces. ACK frames only acknowledge the | |||
| packet numbers that were transmitted by the sender in the same packet | packet numbers that were transmitted by the sender in the same packet | |||
| number space of the packet that the ACK was received in. | number space of the packet that the ACK was received in. | |||
| A client MUST NOT acknowledge Retry packets. Retry packets include | Version Negotiation and Retry packets cannot be acknowledged because | |||
| the packet number from the Initial packet it responds to. Version | they do not contain a packet number. Rather than relying on ACK | |||
| Negotiation packets cannot be acknowledged because they do not | frames, these packets are implicitly acknowledged by the next Initial | |||
| contain a packet number. Rather than relying on ACK frames, these | packet sent by the client. | |||
| packets are implicitly acknowledged by the next Initial packet sent | ||||
| by the client. | ||||
| An ACK frame is shown below. | An ACK frame is shown below. | |||
| 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 | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Largest Acknowledged (i) ... | | Largest Acknowledged (i) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | ACK Delay (i) ... | | ACK Delay (i) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | ACK Block Count (i) ... | | ACK Block Count (i) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | ACK Blocks (*) ... | | ACK Blocks (*) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | [ECN Section] ... | ||||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| Figure 12: ACK Frame Format | Figure 12: ACK Frame Format | |||
| The fields in the ACK frame are as follows: | The fields in the ACK frame are as follows: | |||
| Largest Acknowledged: A variable-length integer representing the | Largest Acknowledged: A variable-length integer representing the | |||
| largest packet number the peer is acknowledging; this is usually | largest packet number the peer is acknowledging; this is usually | |||
| the largest packet number that the peer has received prior to | the largest packet number that the peer has received prior to | |||
| generating the ACK frame. Unlike the packet number in the QUIC | generating the ACK frame. Unlike the packet number in the QUIC | |||
| long or short header, the value in an ACK frame is not truncated. | long or short header, the value in an ACK frame is not truncated. | |||
| ACK Delay: A variable-length integer including the time in | ACK Delay: A variable-length integer including the time in | |||
| microseconds that the largest acknowledged packet, as indicated in | microseconds that the largest acknowledged packet, as indicated in | |||
| the Largest Acknowledged field, was received by this peer to when | the Largest Acknowledged field, was received by this peer to when | |||
| this ACK was sent. The value of the ACK Delay field is scaled by | this ACK was sent. The value of the ACK Delay field is scaled by | |||
| multiplying the encoded value by the 2 to the power of the value | multiplying the encoded value by 2 to the power of the value of | |||
| of the "ack_delay_exponent" transport parameter set by the sender | the "ack_delay_exponent" transport parameter set by the sender of | |||
| of the ACK frame. The "ack_delay_exponent" defaults to 3, or a | the ACK frame. The "ack_delay_exponent" defaults to 3, or a | |||
| multiplier of 8 (see Section 6.6.1). Scaling in this fashion | multiplier of 8 (see Section 6.6.1). Scaling in this fashion | |||
| allows for a larger range of values with a shorter encoding at the | allows for a larger range of values with a shorter encoding at the | |||
| cost of lower resolution. | cost of lower resolution. | |||
| ACK Block Count: A variable-length integer specifying the number of | ACK Block Count: A variable-length integer specifying the number of | |||
| Additional ACK Block (and Gap) fields after the First ACK Block. | Additional ACK Block (and Gap) fields after the First ACK Block. | |||
| ACK Blocks: Contains one or more blocks of packet numbers which have | ACK Blocks: Contains one or more blocks of packet numbers which have | |||
| been successfully received, see Section 7.15.1. | been successfully received, see Section 7.16.1. | |||
| 7.15.1. ACK Block Section | 7.16.1. ACK Block Section | |||
| The ACK Block Section consists of alternating Gap and ACK Block | The ACK Block Section consists of alternating Gap and ACK Block | |||
| fields in descending packet number order. A First Ack Block field is | fields in descending packet number order. A First Ack Block field is | |||
| followed by a variable number of alternating Gap and Additional ACK | followed by a variable number of alternating Gap and Additional ACK | |||
| Blocks. The number of Gap and Additional ACK Block fields is | Blocks. The number of Gap and Additional ACK Block fields is | |||
| determined by the ACK Block Count field. | determined by the ACK Block Count field. | |||
| Gap and ACK Block fields use a relative integer encoding for | Gap and ACK Block fields use a relative integer encoding for | |||
| efficiency. Though each encoded value is positive, the values are | efficiency. Though each encoded value is positive, the values are | |||
| subtracted, so that each ACK Block describes progressively lower- | subtracted, so that each ACK Block describes progressively lower- | |||
| numbered packets. As long as contiguous ranges of packets are small, | numbered packets. As long as contiguous ranges of packets are small, | |||
| the variable-length integer encoding ensures that each range can be | the variable-length integer encoding ensures that each range can be | |||
| expressed in a small number of octets. | expressed in a small number of octets. | |||
| The ACK frame uses the least significant bit(bit (that is, type 0x1b) | ||||
| to indicate ECN feedback and report receipt of packets with ECN | ||||
| codepoints of ECT(0), ECT(1), or CE in the packet's IP 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 | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | First ACK Block (i) ... | | First ACK Block (i) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Gap (i) ... | | Gap (i) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Additional ACK Block (i) ... | | Additional ACK Block (i) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Gap (i) ... | | Gap (i) ... | |||
| skipping to change at page 77, line 5 ¶ | skipping to change at page 80, line 49 ¶ | |||
| indicating the number of acknowledged packets that precede the | indicating the number of acknowledged packets that precede the | |||
| largest packet number in that block. A value of zero indicates that | largest packet number in that block. A value of zero indicates that | |||
| only the largest packet number is acknowledged. Larger ACK Block | only the largest packet number is acknowledged. Larger ACK Block | |||
| values indicate a larger range, with corresponding lower values for | values indicate a larger range, with corresponding lower values for | |||
| the smallest packet number in the range. Thus, given a largest | the smallest packet number in the range. Thus, given a largest | |||
| packet number for the ACK, the smallest value is determined by the | packet number for the ACK, the smallest value is determined by the | |||
| formula: | formula: | |||
| smallest = largest - ack_block | smallest = largest - ack_block | |||
| The range of packets that are acknowledged by the ACK block include | The range of packets that are acknowledged by the ACK Block include | |||
| the range from the smallest packet number to the largest, inclusive. | the range from the smallest packet number to the largest, inclusive. | |||
| The largest value for the First ACK Block is determined by the | The largest value for the First ACK Block is determined by the | |||
| Largest Acknowledged field; the largest for Additional ACK Blocks is | Largest Acknowledged field; the largest for Additional ACK Blocks is | |||
| determined by cumulatively subtracting the size of all preceding ACK | determined by cumulatively subtracting the size of all preceding ACK | |||
| Blocks and Gaps. | Blocks and Gaps. | |||
| Each Gap indicates a range of packets that are not being | Each Gap indicates a range of packets that are not being | |||
| acknowledged. The number of packets in the gap is one higher than | acknowledged. The number of packets in the gap is one higher than | |||
| the encoded value of the Gap Field. | the encoded value of the Gap Field. | |||
| The value of the Gap field establishes the largest packet number | The value of the Gap field establishes the largest packet number | |||
| value for the ACK block that follows the gap using the following | value for the ACK Block that follows the gap using the following | |||
| formula: | formula: | |||
| largest = previous_smallest - gap - 2 | largest = previous_smallest - gap - 2 | |||
| If the calculated value for largest or smallest packet number for any | If the calculated value for largest or smallest packet number for any | |||
| ACK Block is negative, an endpoint MUST generate a connection error | ACK Block is negative, an endpoint MUST generate a connection error | |||
| of type FRAME_ENCODING_ERROR indicating an error in an ACK frame. | of type FRAME_ENCODING_ERROR indicating an error in an ACK frame. | |||
| The fields in the ACK Block Section are: | The fields in the ACK Block Section are: | |||
| First ACK Block: A variable-length integer indicating the number of | First ACK Block: A variable-length integer indicating the number of | |||
| contiguous packets preceding the Largest Acknowledged that are | contiguous packets preceding the Largest Acknowledged that are | |||
| being acknowledged. | being acknowledged. | |||
| Gap (repeated): A variable-length integer indicating the number of | Gap (repeated): A variable-length integer indicating the number of | |||
| contiguous unacknowledged packets preceding the packet number one | contiguous unacknowledged packets preceding the packet number one | |||
| lower than the smallest in the preceding ACK Block. | lower than the smallest in the preceding ACK Block. | |||
| ACK Block (repeated): A variable-length integer indicating the | Additional ACK Block (repeated): A variable-length integer | |||
| number of contiguous acknowledged packets preceding the largest | indicating the number of contiguous acknowledged packets preceding | |||
| packet number, as determined by the preceding Gap. | the largest packet number, as determined by the preceding Gap. | |||
| 7.15.2. Sending ACK Frames | 7.16.2. ECN section | |||
| The ECN section should only be parsed when the ACK frame type byte is | ||||
| 0x1b. The ECN section consists of 3 ECN counters as shown below. | ||||
| 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 | ||||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| | ECT(0) Count (i) ... | ||||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| | ECT(1) Count (i) ... | ||||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| | ECN-CE Count (i) ... | ||||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| ECT(0) Count: A variable-length integer representing the total | ||||
| number packets received with the ECT(0) codepoint. | ||||
| ECT(1) Count: A variable-length integer representing the total | ||||
| number packets received with the ECT(1) codepoint. | ||||
| CE Count: A variable-length integer representing the total number | ||||
| packets received with the CE codepoint. | ||||
| 7.16.3. Sending ACK Frames | ||||
| Implementations MUST NOT generate packets that only contain ACK | Implementations MUST NOT generate packets that only contain ACK | |||
| frames in response to packets which only contain ACK frames. | frames in response to packets which only contain ACK and PADDING | |||
| However, they MUST acknowledge packets containing only ACK frames | frames. However, they MUST acknowledge packets containing only ACK | |||
| when sending ACK frames in response to other packets. | and PADDING frames when sending ACK frames in response to other | |||
| Implementations MUST NOT send more than one packet containing only | packets. Implementations MUST NOT send more than one packet | |||
| ACK frames per received packet that contains frames other than ACK | containing only an ACK frame per received packet that contains frames | |||
| frames. Packets containing non-ACK frames MUST be acknowledged | other than ACK and PADDING frames. Packets containing frames besides | |||
| immediately or when a delayed ack timer expires. | ACK and PADDING MUST be acknowledged immediately or when a delayed | |||
| ack timer expires. | ||||
| To limit ACK blocks to those that have not yet been received by the | The receiver's delayed acknowledgment timer SHOULD NOT exceed the | |||
| current RTT estimate or the value it indicates in the "max_ack_delay" | ||||
| transport parameter. This ensures an acknowledgment is sent at least | ||||
| once per RTT when packets needing acknowledgement are received. The | ||||
| sender can use the receiver's "max_ack_delay" value in determining | ||||
| timeouts for timer-based retransmission. | ||||
| An acknowledgment SHOULD be sent immediately after receiving 2 | ||||
| packets that require acknowledgement, unless multiple packets are | ||||
| received together. | ||||
| To limit ACK Blocks to those that have not yet been received by the | ||||
| sender, the receiver SHOULD track which ACK frames have been | sender, the receiver SHOULD track which ACK frames have been | |||
| acknowledged by its peer. Once an ACK frame has been acknowledged, | acknowledged by its peer. Once an ACK frame has been acknowledged, | |||
| the packets it acknowledges SHOULD NOT be acknowledged again. | the packets it acknowledges SHOULD NOT be acknowledged again. | |||
| Because ACK frames are not sent in response to ACK-only packets, a | Because ACK frames are not sent in response to ACK-only packets, a | |||
| receiver that is only sending ACK frames will only receive | receiver that is only sending ACK frames will only receive | |||
| acknowledgements for its packets if the sender includes them in | acknowledgements for its packets if the sender includes them in | |||
| packets with non-ACK frames. A sender SHOULD bundle ACK frames with | packets with non-ACK frames. A sender SHOULD bundle ACK frames with | |||
| other frames when possible. | other frames when possible. | |||
| Endpoints can only acknowledge packets sent in a particular packet | Endpoints can only acknowledge packets sent in a particular packet | |||
| number space by sending ACK frames in packets from the same packet | number space by sending ACK frames in packets from the same packet | |||
| number space. | number space. | |||
| To limit receiver state or the size of ACK frames, a receiver MAY | To limit receiver state or the size of ACK frames, a receiver MAY | |||
| limit the number of ACK blocks it sends. A receiver can do this even | limit the number of ACK Blocks it sends. A receiver can do this even | |||
| without receiving acknowledgment of its ACK frames, with the | without receiving acknowledgment of its ACK frames, with the | |||
| knowledge this could cause the sender to unnecessarily retransmit | knowledge this could cause the sender to unnecessarily retransmit | |||
| some data. Standard QUIC [QUIC-RECOVERY] algorithms declare packets | some data. Standard QUIC [QUIC-RECOVERY] algorithms declare packets | |||
| lost after sufficiently newer packets are acknowledged. Therefore, | lost after sufficiently newer packets are acknowledged. Therefore, | |||
| the receiver SHOULD repeatedly acknowledge newly received packets in | the receiver SHOULD repeatedly acknowledge newly received packets in | |||
| preference to packets received in the past. | preference to packets received in the past. | |||
| 7.15.3. ACK Frames and Packet Protection | 7.16.4. ACK Frames and Packet Protection | |||
| ACK frames MUST only be carried in a packet that has the same packet | ACK frames MUST only be carried in a packet that has the same packet | |||
| number space as the packet being ACKed (see Section 4.8). For | number space as the packet being ACKed (see Section 4.8). For | |||
| instance, packets that are protected with 1-RTT keys MUST be | instance, packets that are protected with 1-RTT keys MUST be | |||
| acknowledged in packets that are also protected with 1-RTT keys. | acknowledged in packets that are also protected with 1-RTT keys. | |||
| Packets that a client sends with 0-RTT packet protection MUST be | Packets that a client sends with 0-RTT packet protection MUST be | |||
| acknowledged by the server in packets protected by 1-RTT keys. This | acknowledged by the server in packets protected by 1-RTT keys. This | |||
| can mean that the client is unable to use these acknowledgments if | can mean that the client is unable to use these acknowledgments if | |||
| the server cryptographic handshake messages are delayed or lost. | the server cryptographic handshake messages are delayed or lost. | |||
| Note that the same limitation applies to other data sent by the | Note that the same limitation applies to other data sent by the | |||
| server protected by the 1-RTT keys. | server protected by the 1-RTT keys. | |||
| Endpoints SHOULD send acknowledgments for packets containing CRYPTO | Endpoints SHOULD send acknowledgments for packets containing CRYPTO | |||
| frames with a reduced delay; see Section 4.3.1 of [QUIC-RECOVERY]. | frames with a reduced delay; see Section 4.3.1 of [QUIC-RECOVERY]. | |||
| 7.16. ACK_ECN Frame | ||||
| The ACK_ECN frame (type=0x1a) is used by an endpoint that supports | ||||
| ECN to acknowledge packets received with ECN codepoints of ECT(0), | ||||
| ECT(1), or CE in the packet's IP header. | ||||
| 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 | ||||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| | Largest Acknowledged (i) ... | ||||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| | ACK Delay (i) ... | ||||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| | ECT(0) Count (i) ... | ||||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| | ECT(1) Count (i) ... | ||||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| | ECN-CE Count (i) ... | ||||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| | ACK Block Count (i) ... | ||||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| | ACK Blocks (*) ... | ||||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| Figure 14: ACK_ECN Frame Format | ||||
| An ACK_ECN frame contains all the elements of the ACK frame | ||||
| (Section 7.15) with the addition of three counts following the ACK | ||||
| Delay field. | ||||
| ECT(0) Count: A variable-length integer representing the total | ||||
| number packets received with the ECT(0) codepoint. | ||||
| ECT(1) Count: A variable-length integer representing the total | ||||
| number packets received with the ECT(1) codepoint. | ||||
| CE Count: A variable-length integer representing the total number | ||||
| packets received with the CE codepoint. | ||||
| 7.17. PATH_CHALLENGE Frame | 7.17. PATH_CHALLENGE Frame | |||
| Endpoints can use PATH_CHALLENGE frames (type=0x0e) to check | Endpoints can use PATH_CHALLENGE frames (type=0x0e) to check | |||
| reachability to the peer and for path validation during connection | reachability to the peer and for path validation during connection | |||
| establishment and connection migration. | migration. | |||
| PATH_CHALLENGE frames contain an 8-byte payload. | PATH_CHALLENGE frames contain an 8-byte payload. | |||
| 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 | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | | | | | | |||
| + Data (8) + | + Data (8) + | |||
| | | | | | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| skipping to change at page 81, line 40 ¶ | skipping to change at page 85, line 33 ¶ | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Stream ID (i) ... | | Stream ID (i) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | [Offset (i)] ... | | [Offset (i)] ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | [Length (i)] ... | | [Length (i)] ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Stream Data (*) ... | | Stream Data (*) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Figure 15: STREAM Frame Format | Figure 14: STREAM Frame Format | |||
| The STREAM frame contains the following fields: | The STREAM frame contains the following fields: | |||
| Stream ID: A variable-length integer indicating the stream ID of the | Stream ID: A variable-length integer indicating the stream ID of the | |||
| stream (see Section 9.1). | stream (see Section 9.1). | |||
| Offset: A variable-length integer specifying the byte offset in the | Offset: A variable-length integer specifying the byte offset in the | |||
| stream for the data in this STREAM frame. This field is present | stream for the data in this STREAM frame. This field is present | |||
| 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. | |||
| skipping to change at page 83, line 15 ¶ | skipping to change at page 86, line 48 ¶ | |||
| 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 | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Offset (i) ... | | Offset (i) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Length (i) ... | | Length (i) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Crypto Data (*) ... | | Crypto Data (*) ... | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Figure 16: CRYPTO Frame Format | Figure 15: CRYPTO Frame Format | |||
| The CRYPTO frame contains the following fields: | The CRYPTO frame contains the following fields: | |||
| Offset: A variable-length integer specifying the byte offset in the | Offset: A variable-length integer specifying the byte offset in the | |||
| stream for the data in this CRYPTO frame. | stream for the data in this CRYPTO frame. | |||
| Length: A variable-length integer specifying the length of the | Length: A variable-length integer specifying the length of the | |||
| Crypto Data field in this CRYPTO frame. | Crypto Data field in this CRYPTO frame. | |||
| Crypto Data: The cryptographic message data. | Crypto Data: The cryptographic message data. | |||
| skipping to change at page 84, line 9 ¶ | skipping to change at page 87, line 42 ¶ | |||
| use knowledge about application sending behavior or heuristics to | use knowledge about application sending behavior or heuristics to | |||
| determine whether and for how long to wait. This waiting period is | determine whether and for how long to wait. This waiting period is | |||
| an implementation decision, and an implementation should be careful | an implementation decision, and an implementation should be careful | |||
| to delay conservatively, since any delay is likely to increase | to delay conservatively, since any delay is likely to increase | |||
| application-visible latency. | application-visible latency. | |||
| 8.1. Packet Processing and Acknowledgment | 8.1. Packet Processing and Acknowledgment | |||
| A packet MUST NOT be acknowledged until packet protection has been | A packet MUST NOT be acknowledged until packet protection has been | |||
| successfully removed and all frames contained in the packet have been | successfully removed and all frames contained in the packet have been | |||
| processed. Any stream state transitions triggered by the frame MUST | processed. For STREAM frames, this means the data has been enqueued | |||
| have occurred. For STREAM frames, this means the data has been | in preparation to be received by the application protocol, but it | |||
| enqueued in preparation to be received by the application protocol, | does not require that data is delivered and consumed. | |||
| but it does not require that data is delivered and consumed. | ||||
| Once the packet has been fully processed, a receiver acknowledges | Once the packet has been fully processed, a receiver acknowledges | |||
| receipt by sending one or more ACK frames containing the packet | receipt by sending one or more ACK frames containing the packet | |||
| number of the received packet. To avoid creating an indefinite | number of the received packet. To avoid creating an indefinite | |||
| feedback loop, an endpoint MUST NOT send an ACK frame in response to | feedback loop, an endpoint MUST NOT send an ACK frame in response to | |||
| a packet containing only ACK or PADDING frames, even if there are | a packet containing only ACK or PADDING frames, even if there are | |||
| packet gaps which precede the received packet. The endpoint MUST | packet gaps which precede the received packet. The endpoint MUST | |||
| acknowledge packets containing only ACK or PADDING frames in the next | acknowledge packets containing only ACK or PADDING frames in the next | |||
| ACK frame that it sends. | ACK frame that it sends. | |||
| skipping to change at page 84, line 48 ¶ | skipping to change at page 88, line 32 ¶ | |||
| whole. The same applies to the frames that are contained within lost | whole. The same applies to the frames that are contained within lost | |||
| packets. Instead, the information that might be carried in frames is | packets. Instead, the information that might be carried in frames is | |||
| sent again in new frames as needed. | sent again in new frames as needed. | |||
| New frames and packets are used to carry information that is | New frames and packets are used to carry information that is | |||
| determined to have been lost. In general, information is sent again | determined to have been lost. In general, information is sent again | |||
| when a packet containing that information is determined to be lost | when a packet containing that information is determined to be lost | |||
| and sending ceases when a packet containing that information is | and sending ceases when a packet containing that information is | |||
| acknowledged. | acknowledged. | |||
| o Data sent in CRYPTO frames are retransmitted according to the | o Data sent in CRYPTO frames is retransmitted according to the rules | |||
| rules in [QUIC-RECOVERY], until either all data has been | in [QUIC-RECOVERY], until either all data has been acknowledged or | |||
| acknowledged or the crypto state machine implicitly knows that the | the crypto state machine implicitly knows that the peer received | |||
| peer received the data. | the data. | |||
| o Application data sent in STREAM frames is retransmitted in new | o Application data sent in STREAM frames is retransmitted in new | |||
| STREAM frames unless the endpoint has sent a RST_STREAM for that | STREAM frames unless the endpoint has sent a RST_STREAM for that | |||
| stream. Once an endpoint sends a RST_STREAM frame, no further | stream. Once an endpoint sends a RST_STREAM frame, no further | |||
| STREAM frames are needed. | STREAM frames are needed. | |||
| o The most recent set of acknowledgments are sent in ACK frames. An | o The most recent set of acknowledgments are sent in ACK frames. An | |||
| ACK frame SHOULD contain all unacknowledged acknowledgments, as | ACK frame SHOULD contain all unacknowledged acknowledgments, as | |||
| described in Section 7.15.2. | described in Section 7.16.3. | |||
| o Cancellation of stream transmission, as carried in a RST_STREAM | o Cancellation of stream transmission, as carried in a RST_STREAM | |||
| frame, is sent until acknowledged or until all stream data is | frame, is sent until acknowledged or until all stream data is | |||
| 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. | |||
| skipping to change at page 86, line 22 ¶ | skipping to change at page 90, line 7 ¶ | |||
| or until there is no remaining need for liveness or path | or until there is no remaining need for liveness or path | |||
| validation checking. PATH_CHALLENGE frames include a different | validation checking. PATH_CHALLENGE frames include a different | |||
| payload each time they are sent. | payload each time they are sent. | |||
| o Responses to path validation using PATH_RESPONSE frames are sent | o Responses to path validation using PATH_RESPONSE frames are sent | |||
| just once. A new PATH_CHALLENGE frame will be sent if another | just once. A new PATH_CHALLENGE frame will be sent if another | |||
| PATH_RESPONSE frame is needed. | PATH_RESPONSE frame is needed. | |||
| o New connection IDs are sent in NEW_CONNECTION_ID frames and | o New connection IDs are sent in NEW_CONNECTION_ID frames and | |||
| retransmitted if the packet containing them is lost. | retransmitted if the packet containing them is lost. | |||
| Retransmissions of this frame carry the same sequence number | ||||
| value. Likewise, retired connection IDs are sent in | ||||
| RETIRE_CONNECTION_ID frames and retransmitted if the packet | ||||
| containing them is lost. | ||||
| o PADDING frames contain no information, so lost PADDING frames do | o PADDING frames contain no information, so lost PADDING frames do | |||
| not require repair. | not require repair. | |||
| Upon detecting losses, a sender MUST take appropriate congestion | Upon detecting losses, a sender MUST take appropriate congestion | |||
| control action. The details of loss detection and congestion control | control action. The details of loss detection and congestion control | |||
| are described in [QUIC-RECOVERY]. | are described in [QUIC-RECOVERY]. | |||
| 8.3. Packet Size | 8.3. Packet Size | |||
| The QUIC packet size includes the QUIC header and integrity check, | The QUIC packet size includes the QUIC header and integrity check, | |||
| but not the UDP or IP header. | but not the UDP or IP header. | |||
| Clients MUST ensure that the first Initial packet it sends is sent in | Clients MUST ensure that the first Initial packet they send is sent | |||
| a UDP datagram that is at least 1200 octets. Padding the Initial | in a UDP datagram that is at least 1200 octets. Padding the Initial | |||
| packet or including a 0-RTT packet in the same datagram are ways to | packet or including a 0-RTT packet in the same datagram are ways to | |||
| meet this requirement. Sending a UDP datagram of this size ensures | meet this requirement. Sending a UDP datagram of this size ensures | |||
| that the network path supports a reasonable Maximum Transmission Unit | that the network path supports a reasonable Maximum Transmission Unit | |||
| (MTU), and helps reduce the amplitude of amplification attacks caused | (MTU), and helps reduce the amplitude of amplification attacks caused | |||
| by server responses toward an unverified client address. | by server responses toward an unverified client address. | |||
| The datagram containing the first Initial packet from a client MAY | The datagram containing the first Initial packet from a client MAY | |||
| exceed 1200 octets if the client believes that the Path Maximum | exceed 1200 octets if the client believes that the Path Maximum | |||
| Transmission Unit (PMTU) supports the size that it chooses. | Transmission Unit (PMTU) supports the size that it chooses. | |||
| skipping to change at page 87, line 24 ¶ | skipping to change at page 91, line 11 ¶ | |||
| All QUIC packets SHOULD be sized to fit within the estimated PMTU to | All QUIC packets SHOULD be sized to fit within the estimated PMTU to | |||
| avoid IP fragmentation or packet drops. To optimize bandwidth | avoid IP fragmentation or packet drops. To optimize bandwidth | |||
| efficiency, endpoints SHOULD use Packetization Layer PMTU Discovery | efficiency, endpoints SHOULD use Packetization Layer PMTU Discovery | |||
| ([PLPMTUD]). Endpoints MAY use PMTU Discovery ([PMTUDv4], [PMTUDv6]) | ([PLPMTUD]). Endpoints MAY use PMTU Discovery ([PMTUDv4], [PMTUDv6]) | |||
| for detecting the PMTU, setting the PMTU appropriately, and storing | for detecting the PMTU, setting the PMTU appropriately, and storing | |||
| the result of previous PMTU determinations. | the result of previous PMTU determinations. | |||
| In the absence of these mechanisms, QUIC endpoints SHOULD NOT send IP | In the absence of these mechanisms, QUIC endpoints SHOULD NOT send IP | |||
| packets larger than 1280 octets. Assuming the minimum IP header | packets larger than 1280 octets. Assuming the minimum IP header | |||
| size, this results in a QUIC packet size of 1232 octets for IPv6 and | size, this results in a QUIC packet size of 1232 octets for IPv6 and | |||
| 1252 octets for IPv4. Some QUIC implementations MAY wish to be more | 1252 octets for IPv4. Some QUIC implementations MAY be more | |||
| conservative in computing allowed QUIC packet size given unknown | conservative in computing allowed QUIC packet size given unknown | |||
| tunneling overheads or IP header options. | tunneling overheads or IP header options. | |||
| QUIC endpoints that implement any kind of PMTU discovery SHOULD | QUIC endpoints that implement any kind of PMTU discovery SHOULD | |||
| maintain an estimate for each combination of local and remote IP | maintain an estimate for each combination of local and remote IP | |||
| addresses. Each pairing of local and remote addresses could have a | addresses. Each pairing of local and remote addresses could have a | |||
| different maximum MTU in the path. | different maximum MTU in the path. | |||
| QUIC depends on the network path supporting a MTU of at least 1280 | QUIC depends on the network path supporting an MTU of at least 1280 | |||
| octets. This is the IPv6 minimum MTU and therefore also supported by | octets. This is the IPv6 minimum MTU and therefore also supported by | |||
| most modern IPv4 networks. An endpoint MUST NOT reduce its MTU below | most modern IPv4 networks. An endpoint MUST NOT reduce its MTU below | |||
| this number, even if it receives signals that indicate a smaller | this number, even if it receives signals that indicate a smaller | |||
| 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. | |||
| skipping to change at page 88, line 50 ¶ | skipping to change at page 92, line 38 ¶ | |||
| 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 | |||
| carry data in one direction only; bidirectional streams allow for | carry data in one direction: from the initiator of the stream to its | |||
| data to be sent in both directions. Different stream identifiers are | peer; bidirectional streams allow for data to be sent in both | |||
| used to distinguish between unidirectional and bidirectional streams, | directions. Different stream identifiers are used to distinguish | |||
| as well as to create a separation between streams that are initiated | between unidirectional and bidirectional streams, as well as to | |||
| by the client and server (see Section 9.1). | create a separation between streams that are initiated by the client | |||
| and server (see Section 9.1). | ||||
| Either type of stream can be created by either endpoint, can | Either type of stream can be created by either endpoint, can | |||
| concurrently send data interleaved with other streams, and can be | concurrently send data interleaved with other streams, and can be | |||
| cancelled. | cancelled. | |||
| Stream offsets allow for the octets on a stream to be placed in | Stream offsets allow for the octets on a stream to be placed in | |||
| order. An endpoint MUST be capable of delivering data received on a | order. An endpoint MUST be capable of delivering data received on a | |||
| stream in order. Implementations MAY choose to offer the ability to | stream in order. Implementations MAY choose to offer the ability to | |||
| deliver data out of order. There is no means of ensuring ordering | deliver data out of order. There is no means of ensuring ordering | |||
| between octets on different streams. | between octets on different streams. | |||
| skipping to change at page 91, line 21 ¶ | skipping to change at page 95, line 12 ¶ | |||
| of frames can be sent and the reactions that are expected when | of frames can be sent and the reactions that are expected when | |||
| different types of frames are received. Though these state | different types of frames are received. Though these state | |||
| machines are intended to be useful in implementing QUIC, these | machines are intended to be useful in implementing QUIC, these | |||
| states aren't intended to constrain implementations. An | states aren't intended to constrain implementations. An | |||
| implementation can define a different state machine as long as its | implementation can define a different state machine as long as its | |||
| behavior is consistent with an implementation that implements | behavior is consistent with an implementation that implements | |||
| these states. | these states. | |||
| 9.2.1. Send Stream States | 9.2.1. Send Stream States | |||
| Figure 17 shows the states for the part of a stream that sends data | Figure 16 shows the states for the part of a stream that sends data | |||
| to a peer. | to a peer. | |||
| o | o | |||
| | Create Stream (Sending) | | Create Stream (Sending) | |||
| | Create Bidirectional Stream (Receiving) | | Create Bidirectional Stream (Receiving) | |||
| v | v | |||
| +-------+ | +-------+ | |||
| | Ready | Send RST_STREAM | | Ready | Send RST_STREAM | |||
| | |-----------------------. | | |-----------------------. | |||
| +-------+ | | +-------+ | | |||
| | | | | | | |||
| | Send STREAM / | | | Send STREAM / | | |||
| | STREAM_BLOCKED | | | STREAM_BLOCKED | | |||
| | | | ||||
| | Create Bidirectional | | ||||
| | Stream (Receiving) | | ||||
| v | | v | | |||
| +-------+ | | +-------+ | | |||
| | Send | Send RST_STREAM | | | Send | Send RST_STREAM | | |||
| | |---------------------->| | | |---------------------->| | |||
| +-------+ | | +-------+ | | |||
| | | | | | | |||
| | Send STREAM + FIN | | | Send STREAM + FIN | | |||
| v v | v v | |||
| +-------+ +-------+ | +-------+ +-------+ | |||
| | Data | Send RST_STREAM | Reset | | | Data | Send RST_STREAM | Reset | | |||
| | Sent +------------------>| Sent | | | Sent |------------------>| Sent | | |||
| +-------+ +-------+ | +-------+ +-------+ | |||
| | | | | | | |||
| | Recv All ACKs | Recv ACK | | Recv All ACKs | Recv ACK | |||
| v v | v v | |||
| +-------+ +-------+ | +-------+ +-------+ | |||
| | Data | | Reset | | | Data | | Reset | | |||
| | Recvd | | Recvd | | | Recvd | | Recvd | | |||
| +-------+ +-------+ | +-------+ +-------+ | |||
| Figure 17: States for Send Streams | Figure 16: States for Send Streams | |||
| The sending part of stream that the endpoint initiates (types 0 and 2 | The sending part of stream that the endpoint initiates (types 0 and 2 | |||
| for clients, 1 and 3 for servers) is opened by the application or | for clients, 1 and 3 for servers) is opened by the application or | |||
| application protocol. The "Ready" state represents a newly created | application protocol. The "Ready" state represents a newly created | |||
| stream that is able to accept data from the application. Stream data | stream that is able to accept data from the application. Stream data | |||
| might be buffered in this state in preparation for sending. | might be buffered in this state in preparation for sending. | |||
| The sending part of a bidirectional stream initiated by a peer (type | ||||
| 0 for a server, type 1 for a client) enters the "Ready" state if the | ||||
| receiving part enters the "Recv" state. | ||||
| Sending the first STREAM or STREAM_BLOCKED frame causes a send stream | Sending the first STREAM or STREAM_BLOCKED frame causes a send stream | |||
| to enter the "Send" state. An implementation might choose to defer | to enter the "Send" state. An implementation might choose to defer | |||
| allocating a Stream ID to a send stream until it sends the first | allocating a Stream ID to a send stream until it sends the first | |||
| frame and enters this state, which can allow for better stream | frame and enters this state, which can allow for better stream | |||
| prioritization. | prioritization. | |||
| The sending part of a bidirectional stream initiated by a peer (type | ||||
| 0 for a server, type 1 for a client) enters the "Ready" state then | ||||
| immediately transitions to the "Send" state if the receiving part | ||||
| enters the "Recv" state. | ||||
| In the "Send" state, an endpoint transmits - and retransmits as | In the "Send" state, an endpoint transmits - and retransmits as | |||
| necessary - data in STREAM frames. The endpoint respects the flow | necessary - data in STREAM frames. The endpoint respects the flow | |||
| control limits of its peer, accepting MAX_STREAM_DATA frames. An | control limits of its peer, accepting MAX_STREAM_DATA frames. An | |||
| endpoint in the "Send" state generates STREAM_BLOCKED frames if it | endpoint in the "Send" state generates STREAM_BLOCKED frames if it | |||
| encounters flow control limits. | encounters flow control limits. | |||
| After the application indicates that stream data is complete and a | After the application indicates that stream data is complete and a | |||
| STREAM frame containing the FIN bit is sent, the send stream enters | STREAM frame containing the FIN bit is sent, the send stream enters | |||
| the "Data Sent" state. From this state, the endpoint only | the "Data Sent" state. From this state, the endpoint only | |||
| retransmits stream data as necessary. The endpoint no longer needs | retransmits stream data as necessary. The endpoint no longer needs | |||
| skipping to change at page 93, line 39 ¶ | skipping to change at page 97, line 7 ¶ | |||
| An endpoint MAY send a RST_STREAM as the first frame on a send | An endpoint MAY send a RST_STREAM as the first frame on a send | |||
| stream; this causes the send stream to open and then immediately | stream; this causes the send stream to open and then immediately | |||
| transition to the "Reset Sent" state. | transition to the "Reset Sent" state. | |||
| Once a packet containing a RST_STREAM has been acknowledged, the send | Once a packet containing a RST_STREAM has been acknowledged, the send | |||
| stream enters the "Reset Recvd" state, which is a terminal state. | stream enters the "Reset Recvd" state, which is a terminal state. | |||
| 9.2.2. Receive Stream States | 9.2.2. Receive Stream States | |||
| Figure 18 shows the states for the part of a stream that receives | Figure 17 shows the states for the part of a stream that receives | |||
| data from a peer. The states for a receive stream mirror only some | data from a peer. The states for a receive stream mirror only some | |||
| of the states of the send stream at the peer. A receive stream | of the states of the send stream at the peer. A receive stream | |||
| doesn't track states on the send stream that cannot be observed, such | doesn't track states on the send stream that cannot be observed, such | |||
| as the "Ready" state; instead, receive streams track the delivery of | as the "Ready" state; instead, receive streams track the delivery of | |||
| data to the application or application protocol some of which cannot | data to the application or application protocol some of which cannot | |||
| be observed by the sender. | be observed by the sender. | |||
| o | o | |||
| | Recv STREAM / STREAM_BLOCKED / RST_STREAM | | Recv STREAM / STREAM_BLOCKED / RST_STREAM | |||
| | Create Bidirectional Stream (Sending) | | Create Bidirectional Stream (Sending) | |||
| skipping to change at page 94, line 20 ¶ | skipping to change at page 97, line 30 ¶ | |||
| v | v | |||
| +-------+ | +-------+ | |||
| | Recv | Recv RST_STREAM | | Recv | Recv RST_STREAM | |||
| | |-----------------------. | | |-----------------------. | |||
| +-------+ | | +-------+ | | |||
| | | | | | | |||
| | Recv STREAM + FIN | | | Recv STREAM + FIN | | |||
| v | | v | | |||
| +-------+ | | +-------+ | | |||
| | Size | Recv RST_STREAM | | | Size | Recv RST_STREAM | | |||
| | Known +---------------------->| | | Known |---------------------->| | |||
| +-------+ | | +-------+ | | |||
| | | | | | | |||
| | Recv All Data | | | Recv All Data | | |||
| v v | v v | |||
| +-------+ +-------+ | +-------+ Recv RST_STREAM +-------+ | |||
| | Data | Recv RST_STREAM | Reset | | | Data |--- (optional) --->| Reset | | |||
| | Recvd +<-- (optional) --->| Recvd | | | Recvd | Recv All Data | Recvd | | |||
| +-------+ +-------+ | +-------+<-- (optional) ----+-------+ | |||
| | | | | | | |||
| | App Read All Data | App Read RST | | App Read All Data | App Read RST | |||
| v v | v v | |||
| +-------+ +-------+ | +-------+ +-------+ | |||
| | Data | | Reset | | | Data | | Reset | | |||
| | Read | | Read | | | Read | | Read | | |||
| +-------+ +-------+ | +-------+ +-------+ | |||
| Figure 18: States for Receive Streams | Figure 17: States for Receive Streams | |||
| The receiving part of a stream initiated by a peer (types 1 and 3 for | The receiving part of a stream initiated by a peer (types 1 and 3 for | |||
| a client, or 0 and 2 for a server) are created when the first STREAM, | a client, or 0 and 2 for a server) are created when the first STREAM, | |||
| STREAM_BLOCKED, RST_STREAM, or MAX_STREAM_DATA (bidirectional only, | STREAM_BLOCKED, RST_STREAM, or MAX_STREAM_DATA (bidirectional only, | |||
| see below) is received for that stream. The initial state for a | see below) is received for that stream. The initial state for a | |||
| receive stream is "Recv". Receiving a RST_STREAM frame causes the | receive stream is "Recv". Receiving a RST_STREAM frame causes the | |||
| receive stream to immediately transition to the "Reset Recvd". | receive stream to immediately transition to the "Reset Recvd". | |||
| The receive stream enters the "Recv" state when the sending part of a | The receive stream enters the "Recv" state when the sending part of a | |||
| bidirectional stream initiated by the endpoint (type 0 for a client, | bidirectional stream initiated by the endpoint (type 0 for a client, | |||
| skipping to change at page 96, line 26 ¶ | skipping to change at page 99, line 35 ¶ | |||
| (Section 7.3). | (Section 7.3). | |||
| A sender MUST NOT send any of these frames from a terminal state | A sender MUST NOT send any of these frames from a terminal state | |||
| ("Data Recvd" or "Reset Recvd"). A sender MUST NOT send STREAM or | ("Data Recvd" or "Reset Recvd"). A sender MUST NOT send STREAM or | |||
| STREAM_BLOCKED after sending a RST_STREAM; that is, in the "Reset | STREAM_BLOCKED after sending a RST_STREAM; that is, in the "Reset | |||
| Sent" state in addition to the terminal states. A receiver could | Sent" state in addition to the terminal states. A receiver could | |||
| receive any of these frames in any state, but only due to the | receive any of these frames in any state, but only due to the | |||
| possibility of delayed delivery of packets carrying them. | possibility of delayed delivery of packets carrying them. | |||
| The receiver of a stream sends MAX_STREAM_DATA (Section 7.7) and | The receiver of a stream sends MAX_STREAM_DATA (Section 7.7) and | |||
| STOP_SENDING frames (Section 7.14). | STOP_SENDING frames (Section 7.15). | |||
| The receiver only sends MAX_STREAM_DATA in the "Recv" state. A | The receiver only sends MAX_STREAM_DATA in the "Recv" state. A | |||
| receiver can send STOP_SENDING in any state where it has not received | receiver can send STOP_SENDING in any state where it has not received | |||
| a RST_STREAM frame; that is states other than "Reset Recvd" or "Reset | a RST_STREAM frame; that is states other than "Reset Recvd" or "Reset | |||
| Read". However there is little value in sending a STOP_SENDING frame | Read". However there is little value in sending a STOP_SENDING frame | |||
| after all stream data has been received in the "Data Recvd" state. A | after all stream data has been received in the "Data Recvd" state. A | |||
| sender could receive these frames in any state as a result of delayed | sender could receive these frames in any state as a result of delayed | |||
| delivery of packets. | delivery of packets. | |||
| 9.2.4. Bidirectional Stream States | 9.2.4. Bidirectional Stream States | |||
| skipping to change at page 98, line 40 ¶ | skipping to change at page 101, line 49 ¶ | |||
| An endpoint limits the number of concurrently active incoming streams | An endpoint limits the number of concurrently active incoming streams | |||
| by adjusting the maximum stream ID. An initial value is set in the | by adjusting the maximum stream ID. An initial value is set in the | |||
| transport parameters (see Section 6.6.1) and is subsequently | transport parameters (see Section 6.6.1) and is subsequently | |||
| increased by MAX_STREAM_ID frames (see Section 7.8). | increased by MAX_STREAM_ID frames (see Section 7.8). | |||
| The maximum stream ID is specific to each endpoint and applies only | The maximum stream ID is specific to each endpoint and applies only | |||
| to the peer that receives the setting. That is, clients specify the | to the peer that receives the setting. That is, clients specify the | |||
| maximum stream ID the server can initiate, and servers specify the | maximum stream ID the server can initiate, and servers specify the | |||
| maximum stream ID the client can initiate. Each endpoint may respond | maximum stream ID the client can initiate. Each endpoint may respond | |||
| on streams initiated by the other peer, regardless of whether it is | on streams initiated by the other peer, regardless of whether it is | |||
| permitted to initiated new streams. | permitted to initiate new streams. | |||
| Endpoints MUST NOT exceed the limit set by their peer. An endpoint | Endpoints MUST NOT exceed the limit set by their peer. An endpoint | |||
| that receives a STREAM frame with an ID greater than the limit it has | that receives a STREAM frame with an ID greater than the limit it has | |||
| sent MUST treat this as a stream error of type STREAM_ID_ERROR | sent MUST treat this as a stream error of type STREAM_ID_ERROR | |||
| (Section 11), unless this is a result of a change in the initial | (Section 11), unless this is a result of a change in the initial | |||
| limits (see Section 6.6.2). | limits (see Section 6.6.2). | |||
| A receiver cannot renege on an advertisement; that is, once a | A receiver cannot renege on an advertisement; that is, once a | |||
| receiver advertises a stream ID via a MAX_STREAM_ID frame, | receiver advertises a stream ID via a MAX_STREAM_ID frame, | |||
| advertising a smaller maximum ID has no effect. A sender MUST ignore | advertising a smaller maximum ID has no effect. A sender MUST ignore | |||
| skipping to change at page 100, line 31 ¶ | skipping to change at page 103, line 40 ¶ | |||
| recovery, congestion control, and flow control operate effectively. | recovery, congestion control, and flow control operate effectively. | |||
| CRYPTO frames SHOULD be prioritized over other streams prior to the | CRYPTO frames SHOULD be prioritized over other streams prior to the | |||
| completion of the cryptographic handshake. This includes the | completion of the cryptographic handshake. This includes the | |||
| retransmission of the second flight of client handshake messages, | retransmission of the second flight of client handshake messages, | |||
| that is, the TLS Finished and any client authentication messages. | that is, the TLS Finished and any client authentication messages. | |||
| STREAM data in frames determined to be lost SHOULD be retransmitted | STREAM data in frames determined to be lost SHOULD be retransmitted | |||
| before sending new data, unless application priorities indicate | before sending new data, unless application priorities indicate | |||
| otherwise. Retransmitting lost stream data can fill in gaps, which | otherwise. Retransmitting lost stream data can fill in gaps, which | |||
| allows the peer to consume already received data and free up flow | allows the peer to consume already received data and free up the flow | |||
| control window. | control window. | |||
| 10. Flow Control | 10. Flow Control | |||
| It is necessary to limit the amount of data that a sender may have | It is necessary to limit the amount of data that a sender may have | |||
| outstanding at any time, so as to prevent a fast sender from | outstanding at any time, so as to prevent a fast sender from | |||
| overwhelming a slow receiver, or to prevent a malicious sender from | overwhelming a slow receiver, or to prevent a malicious sender from | |||
| consuming significant resources at a receiver. This section | consuming significant resources at a receiver. This section | |||
| describes QUIC's flow-control mechanisms. | describes QUIC's flow-control mechanisms. | |||
| skipping to change at page 106, line 30 ¶ | skipping to change at page 109, line 44 ¶ | |||
| FINAL_OFFSET_ERROR (0x6): An endpoint received a STREAM frame | FINAL_OFFSET_ERROR (0x6): An endpoint received a STREAM frame | |||
| containing data that exceeded the previously established final | containing data that exceeded the previously established final | |||
| offset. Or an endpoint received a RST_STREAM frame containing a | offset. Or an endpoint received a RST_STREAM frame containing a | |||
| final offset that was lower than the maximum offset of data that | final offset that was lower than the maximum offset of data that | |||
| was already received. Or an endpoint received a RST_STREAM frame | was already received. Or an endpoint received a RST_STREAM frame | |||
| containing a different final offset to the one already | containing a different final offset to the one already | |||
| established. | established. | |||
| FRAME_ENCODING_ERROR (0x7): An endpoint received a frame that was | FRAME_ENCODING_ERROR (0x7): An endpoint received a frame that was | |||
| badly formatted. For instance, an empty STREAM frame that omitted | badly formatted. For instance, a frame of an unknown type, or an | |||
| the FIN flag, or an ACK frame that has more acknowledgment ranges | ACK frame that has more acknowledgment ranges than the remainder | |||
| than the remainder of the packet could carry. | of the packet could carry. | |||
| TRANSPORT_PARAMETER_ERROR (0x8): An endpoint received transport | TRANSPORT_PARAMETER_ERROR (0x8): An endpoint received transport | |||
| parameters that were badly formatted, included an invalid value, | parameters that were badly formatted, included an invalid value, | |||
| was absent even though it is mandatory, was present though it is | was absent even though it is mandatory, was present though it is | |||
| forbidden, or is otherwise in error. | forbidden, or is otherwise in error. | |||
| VERSION_NEGOTIATION_ERROR (0x9): An endpoint received transport | VERSION_NEGOTIATION_ERROR (0x9): An endpoint received transport | |||
| parameters that contained version negotiation parameters that | parameters that contained version negotiation parameters that | |||
| disagreed with the version negotiation that it performed. This | disagreed with the version negotiation that it performed. This | |||
| error code indicates a potential version downgrade attack. | error code indicates a potential version downgrade attack. | |||
| skipping to change at page 109, line 7 ¶ | skipping to change at page 112, line 20 ¶ | |||
| server sees an acknowledgment for a packet that was never sent, the | server sees an acknowledgment for a packet that was never sent, the | |||
| connection can be aborted. | connection can be aborted. | |||
| The second mitigation is that the server can require that | The second mitigation is that the server can require that | |||
| acknowledgments for sent packets match the encryption level of the | acknowledgments for sent packets match the encryption level of the | |||
| sent packet. This mitigation is useful if the connection has an | sent packet. This mitigation is useful if the connection has an | |||
| ephemeral forward-secure key that is generated and used for every new | ephemeral forward-secure key that is generated and used for every new | |||
| connection. If a packet sent is protected with a forward-secure key, | connection. If a packet sent is protected with a forward-secure key, | |||
| then any acknowledgments that are received for them MUST also be | then any acknowledgments that are received for them MUST also be | |||
| forward-secure protected. Since the attacker will not have the | forward-secure protected. Since the attacker will not have the | |||
| 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.3. Optimistic ACK Attack | 12.3. 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.13.3). | PROTOCOL_VIOLATION (see Section 6.13.3). | |||
| skipping to change at page 109, line 39 ¶ | skipping to change at page 113, line 7 ¶ | |||
| QUIC deployments SHOULD provide mitigations for the Slowloris | QUIC deployments SHOULD provide mitigations for the Slowloris | |||
| attacks, such as increasing the maximum number of clients the server | attacks, such as increasing the maximum number of clients the server | |||
| will allow, limiting the number of connections a single IP address is | will allow, limiting the number of connections a single IP address is | |||
| allowed to make, imposing restrictions on the minimum transfer speed | allowed to make, imposing restrictions on the minimum transfer speed | |||
| a connection is allowed to have, and restricting the length of time | a connection is allowed to have, and restricting the length of time | |||
| an endpoint is allowed to stay connected. | an endpoint is allowed to stay connected. | |||
| 12.5. Stream Fragmentation and Reassembly Attacks | 12.5. Stream Fragmentation and Reassembly Attacks | |||
| An adversarial endpoint might intentionally fragment the data on | An adversarial sender might intentionally send fragments of stream | |||
| stream buffers in order to cause disproportionate memory commitment. | data in order to cause disproportionate receive buffer memory | |||
| An adversarial endpoint could open a stream and send some STREAM | commitment and/or creation of a large and inefficient data structure. | |||
| frames containing arbitrary fragments of the stream content. | ||||
| The attack is mitigated if flow control windows correspond to | An adversarial receiver might intentionally not acknowledge packets | |||
| available memory. However, some receivers will over-commit memory | containing stream data in order to force the sender to store the | |||
| and advertise flow control offsets in the aggregate that exceed | unacknowledged stream data for retransmission. | |||
| actual available memory. The over-commitment strategy can lead to | ||||
| better performance when endpoints are well behaved, but renders | ||||
| endpoints vulnerable to the stream fragmentation attack. | ||||
| QUIC deployments SHOULD provide mitigations against the stream | The attack on receivers is mitigated if flow control windows | |||
| fragmentation attack. Mitigations could consist of avoiding over- | correspond to available memory. However, some receivers will over- | |||
| committing memory, delaying reassembly of STREAM frames, implementing | commit memory and advertise flow control offsets in the aggregate | |||
| heuristics based on the age and duration of reassembly holes, or some | that exceed actual available memory. The over-commitment strategy | |||
| combination. | can lead to better performance when endpoints are well behaved, but | |||
| renders endpoints vulnerable to the stream fragmentation attack. | ||||
| QUIC deployments SHOULD provide mitigations against stream | ||||
| fragmentation attacks. Mitigations could consist of avoiding over- | ||||
| committing memory, limiting the size of tracking data structures, | ||||
| delaying reassembly of STREAM frames, implementing heuristics based | ||||
| on the age and duration of reassembly holes, or some combination. | ||||
| 12.6. Stream Commitment Attack | 12.6. Stream Commitment Attack | |||
| An adversarial endpoint can open lots of streams, exhausting state on | An adversarial endpoint can open lots of streams, exhausting state on | |||
| an endpoint. The adversarial endpoint could repeat the process on a | an endpoint. The adversarial endpoint could repeat the process on a | |||
| large number of connections, in a manner similar to SYN flooding | large number of connections, in a manner similar to SYN flooding | |||
| attacks in TCP. | attacks in TCP. | |||
| Normally, clients will open streams sequentially, as explained in | Normally, clients will open streams sequentially, as explained in | |||
| Section 9.1. However, when several streams are initiated at short | Section 9.1. However, when several streams are initiated at short | |||
| skipping to change at page 112, line 33 ¶ | skipping to change at page 116, line 31 ¶ | |||
| | | | | | | | | | | |||
| | 0x0007 | ack_delay_exponent | Section 6.6.1 | | | 0x0007 | ack_delay_exponent | Section 6.6.1 | | |||
| | | | | | | | | | | |||
| | 0x0008 | initial_max_uni_streams | Section 6.6.1 | | | 0x0008 | initial_max_uni_streams | Section 6.6.1 | | |||
| | | | | | | | | | | |||
| | 0x0009 | disable_migration | Section 6.6.1 | | | 0x0009 | disable_migration | Section 6.6.1 | | |||
| | | | | | | | | | | |||
| | 0x000a | initial_max_stream_data_bidi_remote | Section 6.6.1 | | | 0x000a | initial_max_stream_data_bidi_remote | Section 6.6.1 | | |||
| | | | | | | | | | | |||
| | 0x000b | initial_max_stream_data_uni | Section 6.6.1 | | | 0x000b | initial_max_stream_data_uni | Section 6.6.1 | | |||
| | | | | | ||||
| | 0x000c | max_ack_delay | Section 6.6.1 | | ||||
| | | | | | ||||
| | 0x000d | original_connection_id | Section 6.6.1 | | ||||
| +--------+-------------------------------------+---------------+ | +--------+-------------------------------------+---------------+ | |||
| Table 7: Initial QUIC Transport Parameters Entries | Table 7: Initial QUIC Transport Parameters Entries | |||
| 13.2. QUIC Frame Type Registry | 13.2. QUIC Frame Type Registry | |||
| IANA [SHALL add/has added] a registry for "QUIC Frame Types" under a | IANA [SHALL add/has added] a registry for "QUIC Frame Types" under a | |||
| "QUIC Protocol" heading. | "QUIC Protocol" heading. | |||
| The "QUIC Frame Types" registry governs a 62-bit space. This space | The "QUIC Frame Types" registry governs a 62-bit space. This space | |||
| skipping to change at page 115, line 24 ¶ | skipping to change at page 120, line 24 ¶ | |||
| 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-14 (work | and Congestion Control", draft-ietf-quic-recovery-15 (work | |||
| in progress), August 2018. | in progress), October 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-14 (work in progress), August 2018. | tls-15 (work in progress), October 2018. | |||
| [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
| Requirement Levels", BCP 14, RFC 2119, | Requirement Levels", BCP 14, RFC 2119, | |||
| DOI 10.17487/RFC2119, March 1997, | DOI 10.17487/RFC2119, March 1997, | |||
| <https://www.rfc-editor.org/info/rfc2119>. | <https://www.rfc-editor.org/info/rfc2119>. | |||
| [RFC3168] Ramakrishnan, K., Floyd, S., and D. Black, "The Addition | [RFC3168] Ramakrishnan, K., Floyd, S., and D. Black, "The Addition | |||
| of Explicit Congestion Notification (ECN) to IP", | of Explicit Congestion Notification (ECN) to IP", | |||
| RFC 3168, DOI 10.17487/RFC3168, September 2001, | RFC 3168, DOI 10.17487/RFC3168, September 2001, | |||
| <https://www.rfc-editor.org/info/rfc3168>. | <https://www.rfc-editor.org/info/rfc3168>. | |||
| skipping to change at page 116, line 36 ¶ | skipping to change at page 121, 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), August | draft-ietf-quic-invariants-03 (work in progress), October | |||
| 2018. | 2018. | |||
| [RFC2018] Mathis, M., Mahdavi, J., Floyd, S., and A. Romanow, "TCP | [RFC2018] Mathis, M., Mahdavi, J., Floyd, S., and A. Romanow, "TCP | |||
| Selective Acknowledgment Options", RFC 2018, | Selective Acknowledgment Options", RFC 2018, | |||
| DOI 10.17487/RFC2018, October 1996, | DOI 10.17487/RFC2018, October 1996, | |||
| <https://www.rfc-editor.org/info/rfc2018>. | <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, | |||
| skipping to change at page 118, line 37 ¶ | skipping to change at page 123, line 37 ¶ | |||
| return candidate_pn - pn_win | return candidate_pn - pn_win | |||
| return candidate_pn | return candidate_pn | |||
| Appendix B. Change Log | Appendix B. 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. | |||
| B.1. Since draft-ietf-quic-transport-13 | B.1. Since draft-ietf-quic-transport-14 | |||
| o Merge ACK and ACK_ECN (#1778, #1801) | ||||
| o Explicitly communicate max_ack_delay (#981, #1781) | ||||
| o Validate original connection ID after Retry packets (#1710, #1486, | ||||
| #1793) | ||||
| o Idle timeout is optional and has no specified maximum (#1520, | ||||
| #1521) | ||||
| o Update connection ID handling; add RETIRE_CONNECTION_ID type | ||||
| (#1464, #1468, #1483, #1484, #1486, #1495, #1729, #1742, #1799, | ||||
| #1821) | ||||
| o Include a Token in all Initial packets (#1649, #1794) | ||||
| o Prevent handshake deadlock (#1764, #1824) | ||||
| B.2. Since draft-ietf-quic-transport-13 | ||||
| o Streams open when higher-numbered streams of the same type open | o Streams open when higher-numbered streams of the same type open | |||
| (#1342, #1549) | (#1342, #1549) | |||
| o Split initial stream flow control limit into 3 transport | o Split initial stream flow control limit into 3 transport | |||
| parameters (#1016, #1542) | parameters (#1016, #1542) | |||
| o All flow control transport parameters are optional (#1610) | o All flow control transport parameters are optional (#1610) | |||
| o Removed UNSOLICITED_PATH_RESPONSE error code (#1265, #1539) | o Removed UNSOLICITED_PATH_RESPONSE error code (#1265, #1539) | |||
| skipping to change at page 119, line 26 ¶ | skipping to change at page 124, line 47 ¶ | |||
| o Permit 0-RTT after receiving Version Negotiation or Retry (#1507, | o Permit 0-RTT after receiving Version Negotiation or Retry (#1507, | |||
| #1514, #1621) | #1514, #1621) | |||
| o Permit Retry in response to 0-RTT (#1547, #1552) | o Permit Retry in response to 0-RTT (#1547, #1552) | |||
| o Looser verification of ECN counters to account for ACK loss | o Looser verification of ECN counters to account for ACK loss | |||
| (#1555, #1481, #1565) | (#1555, #1481, #1565) | |||
| o Remove frame type field from APPLICATION_CLOSE (#1508, #1528) | o Remove frame type field from APPLICATION_CLOSE (#1508, #1528) | |||
| B.2. Since draft-ietf-quic-transport-12 | B.3. Since draft-ietf-quic-transport-12 | |||
| o Changes to integration of the TLS handshake (#829, #1018, #1094, | o Changes to integration of the TLS handshake (#829, #1018, #1094, | |||
| #1165, #1190, #1233, #1242, #1252, #1450, #1458) | #1165, #1190, #1233, #1242, #1252, #1450, #1458) | |||
| * The cryptographic handshake uses CRYPTO frames, not stream 0 | * The cryptographic handshake uses CRYPTO frames, not stream 0 | |||
| * QUIC packet protection is used in place of TLS record | * QUIC packet protection is used in place of TLS record | |||
| protection | protection | |||
| * Separate QUIC packet number spaces are used for the handshake | * Separate QUIC packet number spaces are used for the handshake | |||
| * Changed Retry to be independent of the cryptographic handshake | * Changed Retry to be independent of the cryptographic handshake | |||
| * Added NEW_TOKEN frame and Token fields to Initial packet | * Added NEW_TOKEN frame and Token fields to Initial packet | |||
| * Limit the use of HelloRetryRequest to address TLS needs (like | * Limit the use of HelloRetryRequest to address TLS needs (like | |||
| skipping to change at page 120, line 20 ¶ | skipping to change at page 125, line 40 ¶ | |||
| o Fixed sampling method for packet number encryption; the length | o Fixed sampling method for packet number encryption; the length | |||
| field in long headers includes the packet number field in addition | field in long headers includes the packet number field in addition | |||
| to the packet payload (#1387, #1389) | to the packet payload (#1387, #1389) | |||
| o Stateless Reset is now symmetric and subject to size constraints | o Stateless Reset is now symmetric and subject to size constraints | |||
| (#466, #1346) | (#466, #1346) | |||
| o Added frame type extension mechanism (#58, #1473) | o Added frame type extension mechanism (#58, #1473) | |||
| B.3. Since draft-ietf-quic-transport-11 | B.4. Since draft-ietf-quic-transport-11 | |||
| o Enable server to transition connections to a preferred address | o Enable server to transition connections to a preferred address | |||
| (#560, #1251) | (#560, #1251) | |||
| o Packet numbers are encrypted (#1174, #1043, #1048, #1034, #850, | o Packet numbers are encrypted (#1174, #1043, #1048, #1034, #850, | |||
| #990, #734, #1317, #1267, #1079) | #990, #734, #1317, #1267, #1079) | |||
| o Packet numbers use a variable-length encoding (#989, #1334) | o Packet numbers use a variable-length encoding (#989, #1334) | |||
| o STREAM frames can now be empty (#1350) | o STREAM frames can now be empty (#1350) | |||
| B.4. Since draft-ietf-quic-transport-10 | B.5. 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 121, line 4 ¶ | skipping to change at page 126, line 24 ¶ | |||
| o Coalescing multiple QUIC packets in a UDP datagram (#1262, #1285) | o Coalescing multiple QUIC packets in a UDP datagram (#1262, #1285) | |||
| o A more complete connection migration (#1249) | o A more complete connection migration (#1249) | |||
| o Refine opportunistic ACK defense text (#305, #1030, #1185) | o Refine opportunistic ACK defense text (#305, #1030, #1185) | |||
| o A Stateless Reset Token isn't mandatory (#818, #1191) | o A Stateless Reset Token isn't mandatory (#818, #1191) | |||
| o Removed implicit stream opening (#896, #1193) | o Removed implicit stream opening (#896, #1193) | |||
| o An empty STREAM frame can be used to open a stream without sending | o An empty STREAM frame can be used to open a stream without sending | |||
| data (#901, #1194) | data (#901, #1194) | |||
| o Define stream counts in transport parameters rather than a maximum | o Define stream counts in transport parameters rather than a maximum | |||
| stream ID (#1023, #1065) | stream ID (#1023, #1065) | |||
| 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) | |||
| B.5. Since draft-ietf-quic-transport-09 | B.6. 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 121, line 47 ¶ | skipping to change at page 127, line 20 ¶ | |||
| 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) | |||
| B.6. Since draft-ietf-quic-transport-08 | B.7. 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) | |||
| o Clarified stream state machine (#634, #662, #743, #894) | o Clarified stream state machine (#634, #662, #743, #894) | |||
| o Reserved versions don't need to be generated deterministically | o Reserved versions don't need to be generated deterministically | |||
| skipping to change at page 122, line 28 ¶ | skipping to change at page 127, line 48 ¶ | |||
| 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) | |||
| B.7. Since draft-ietf-quic-transport-07 | B.8. 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) | |||
| o Streams are split into unidirectional and bidirectional (#643, | o Streams are split into unidirectional and bidirectional (#643, | |||
| #656, #720, #872, #175, #885) | #656, #720, #872, #175, #885) | |||
| * Stream limits now have separate uni- and bi-directional | * Stream limits now have separate uni- and bi-directional | |||
| skipping to change at page 123, line 25 ¶ | skipping to change at page 128, line 42 ¶ | |||
| 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) | |||
| B.8. Since draft-ietf-quic-transport-06 | B.9. 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) | |||
| B.9. Since draft-ietf-quic-transport-05 | B.10. 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) | |||
| B.10. Since draft-ietf-quic-transport-04 | B.11. 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 124, line 31 ¶ | skipping to change at page 130, line 4 ¶ | |||
| NewSessionTicket message (#547) | NewSessionTicket message (#547) | |||
| o Clarify the meaning of "bytes in flight" (#550) | o Clarify the meaning of "bytes in flight" (#550) | |||
| o Public reset is now stateless reset and not visible to the path | o Public reset is now stateless reset and not visible to the path | |||
| (#215) | (#215) | |||
| o Reordered bits and fields in STREAM frame (#620) | o Reordered bits and fields in STREAM frame (#620) | |||
| o Clarifications to the stream state machine (#572, #571) | o Clarifications to the stream state machine (#572, #571) | |||
| 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) | |||
| B.11. Since draft-ietf-quic-transport-03 | B.12. 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 | |||
| B.12. Since draft-ietf-quic-transport-02 | B.13. 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 125, line 37 ¶ | skipping to change at page 131, line 4 ¶ | |||
| different handshake protocol (#516) | different handshake protocol (#516) | |||
| o STREAM frames have a reduced number of offset lengths (#543, #430) | o STREAM frames have a reduced number of offset lengths (#543, #430) | |||
| o Split some frames into separate connection- and stream- level | o Split some frames into separate connection- and stream- level | |||
| frames (#443) | frames (#443) | |||
| * WINDOW_UPDATE split into MAX_DATA and MAX_STREAM_DATA (#450) | * WINDOW_UPDATE split into MAX_DATA and MAX_STREAM_DATA (#450) | |||
| * BLOCKED split to match WINDOW_UPDATE split (#454) | * BLOCKED split to match WINDOW_UPDATE split (#454) | |||
| * Define STREAM_ID_NEEDED frame (#455) | * Define STREAM_ID_NEEDED frame (#455) | |||
| o A NEW_CONNECTION_ID frame supports connection migration without | o A NEW_CONNECTION_ID frame supports connection migration without | |||
| 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) | |||
| B.13. Since draft-ietf-quic-transport-01 | B.14. 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 128, line 5 ¶ | skipping to change at page 133, line 17 ¶ | |||
| 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) | |||
| B.14. Since draft-ietf-quic-transport-00 | B.15. 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 | |||
| B.15. Since draft-hamilton-quic-transport-protocol-01 | B.16. 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 | |||
| Acknowledgments | Acknowledgments | |||
| End of changes. 176 change blocks. | ||||
| 571 lines changed or deleted | 768 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/ | ||||