draft-ietf-quic-transport-24.txt   draft-ietf-quic-transport-25.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: May 7, 2020 Mozilla Expires: 25 July 2020 Mozilla
November 04, 2019 22 January 2020
QUIC: A UDP-Based Multiplexed and Secure Transport QUIC: A UDP-Based Multiplexed and Secure Transport
draft-ietf-quic-transport-24 draft-ietf-quic-transport-25
Abstract Abstract
This document defines the core of the QUIC transport protocol. This document defines the core of the QUIC transport protocol.
Accompanying documents describe QUIC's loss detection and congestion Accompanying documents describe QUIC's loss detection and congestion
control and the use of TLS for key negotiation. control and the use of TLS for key negotiation.
Note to Readers Note to Readers
Discussion of this draft takes place on the QUIC working group Discussion of this draft takes place on the QUIC working group
skipping to change at page 1, line 43 skipping to change at page 1, line 43
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 May 7, 2020. This Internet-Draft will expire on 25 July 2020.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents (https://trustee.ietf.org/
(https://trustee.ietf.org/license-info) in effect on the date of license-info) in effect on the date of publication of this document.
publication of this document. Please review these documents Please review these documents carefully, as they describe your rights
carefully, as they describe your rights and restrictions with respect and restrictions with respect to this document. Code Components
to this document. Code Components extracted from this document must extracted from this document must include Simplified BSD License text
include Simplified BSD License text as described in Section 4.e of as described in Section 4.e of the Trust Legal Provisions and are
the Trust Legal Provisions and are provided without warranty as provided without warranty as described in the Simplified BSD License.
described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 6 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 6
1.1. Document Structure . . . . . . . . . . . . . . . . . . . 6 1.1. Document Structure . . . . . . . . . . . . . . . . . . . 6
1.2. Terms and Definitions . . . . . . . . . . . . . . . . . . 8 1.2. Terms and Definitions . . . . . . . . . . . . . . . . . . 8
1.3. Notational Conventions . . . . . . . . . . . . . . . . . 8 1.3. Notational Conventions . . . . . . . . . . . . . . . . . 9
2. Streams . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2. Streams . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1. Stream Types and Identifiers . . . . . . . . . . . . . . 9 2.1. Stream Types and Identifiers . . . . . . . . . . . . . . 10
2.2. Sending and Receiving Data . . . . . . . . . . . . . . . 10 2.2. Sending and Receiving Data . . . . . . . . . . . . . . . 11
2.3. Stream Prioritization . . . . . . . . . . . . . . . . . . 11 2.3. Stream Prioritization . . . . . . . . . . . . . . . . . . 11
2.4. Required Operations on Streams . . . . . . . . . . . . . 11 2.4. Required Operations on Streams . . . . . . . . . . . . . 12
3. Stream States . . . . . . . . . . . . . . . . . . . . . . . . 12 3. Stream States . . . . . . . . . . . . . . . . . . . . . . . . 12
3.1. Sending Stream States . . . . . . . . . . . . . . . . . . 12 3.1. Sending Stream States . . . . . . . . . . . . . . . . . . 13
3.2. Receiving Stream States . . . . . . . . . . . . . . . . . 14 3.2. Receiving Stream States . . . . . . . . . . . . . . . . . 16
3.3. Permitted Frame Types . . . . . . . . . . . . . . . . . . 17 3.3. Permitted Frame Types . . . . . . . . . . . . . . . . . . 18
3.4. Bidirectional Stream States . . . . . . . . . . . . . . . 17 3.4. Bidirectional Stream States . . . . . . . . . . . . . . . 19
3.5. Solicited State Transitions . . . . . . . . . . . . . . . 19 3.5. Solicited State Transitions . . . . . . . . . . . . . . . 20
4. Flow Control . . . . . . . . . . . . . . . . . . . . . . . . 20 4. Flow Control . . . . . . . . . . . . . . . . . . . . . . . . 22
4.1. Data Flow Control . . . . . . . . . . . . . . . . . . . . 20 4.1. Data Flow Control . . . . . . . . . . . . . . . . . . . . 22
4.2. Flow Credit Increments . . . . . . . . . . . . . . . . . 21 4.2. Flow Credit Increments . . . . . . . . . . . . . . . . . 23
4.3. Handling Stream Cancellation . . . . . . . . . . . . . . 22 4.3. Handling Stream Cancellation . . . . . . . . . . . . . . 24
4.4. Stream Final Size . . . . . . . . . . . . . . . . . . . . 23 4.4. Stream Final Size . . . . . . . . . . . . . . . . . . . . 25
4.5. Controlling Concurrency . . . . . . . . . . . . . . . . . 23 4.5. Controlling Concurrency . . . . . . . . . . . . . . . . . 25
5. Connections . . . . . . . . . . . . . . . . . . . . . . . . . 24 5. Connections . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.1. Connection ID . . . . . . . . . . . . . . . . . . . . . . 24 5.1. Connection ID . . . . . . . . . . . . . . . . . . . . . . 26
5.1.1. Issuing Connection IDs . . . . . . . . . . . . . . . 25 5.1.1. Issuing Connection IDs . . . . . . . . . . . . . . . 27
5.1.2. Consuming and Retiring Connection IDs . . . . . . . . 26 5.1.2. Consuming and Retiring Connection IDs . . . . . . . . 28
5.2. Matching Packets to Connections . . . . . . . . . . . . . 27 5.2. Matching Packets to Connections . . . . . . . . . . . . . 29
5.2.1. Client Packet Handling . . . . . . . . . . . . . . . 28 5.2.1. Client Packet Handling . . . . . . . . . . . . . . . 30
5.2.2. Server Packet Handling . . . . . . . . . . . . . . . 28 5.2.2. Server Packet Handling . . . . . . . . . . . . . . . 30
5.3. Life of a QUIC Connection . . . . . . . . . . . . . . . . 29 5.3. Life of a QUIC Connection . . . . . . . . . . . . . . . . 31
5.4. Required Operations on Connections . . . . . . . . . . . 29 5.4. Required Operations on Connections . . . . . . . . . . . 32
6. Version Negotiation . . . . . . . . . . . . . . . . . . . . . 30 6. Version Negotiation . . . . . . . . . . . . . . . . . . . . . 33
6.1. Sending Version Negotiation Packets . . . . . . . . . . . 30 6.1. Sending Version Negotiation Packets . . . . . . . . . . . 33
6.2. Handling Version Negotiation Packets . . . . . . . . . . 31 6.2. Handling Version Negotiation Packets . . . . . . . . . . 34
6.2.1. Version Negotiation Between Draft Versions . . . . . 31 6.2.1. Version Negotiation Between Draft Versions . . . . . 34
6.3. Using Reserved Versions . . . . . . . . . . . . . . . . . 31 6.3. Using Reserved Versions . . . . . . . . . . . . . . . . . 34
7. Cryptographic and Transport Handshake . . . . . . . . . . . . 32 7. Cryptographic and Transport Handshake . . . . . . . . . . . . 35
7.1. Example Handshake Flows . . . . . . . . . . . . . . . . . 33 7.1. Example Handshake Flows . . . . . . . . . . . . . . . . . 36
7.2. Negotiating Connection IDs . . . . . . . . . . . . . . . 34 7.2. Negotiating Connection IDs . . . . . . . . . . . . . . . 37
7.3. Transport Parameters . . . . . . . . . . . . . . . . . . 36 7.3. Transport Parameters . . . . . . . . . . . . . . . . . . 38
7.3.1. Values of Transport Parameters for 0-RTT . . . . . . 36 7.3.1. Values of Transport Parameters for 0-RTT . . . . . . 39
7.3.2. New Transport Parameters . . . . . . . . . . . . . . 38 7.3.2. New Transport Parameters . . . . . . . . . . . . . . 40
7.4. Cryptographic Message Buffering . . . . . . . . . . . . . 38 7.4. Cryptographic Message Buffering . . . . . . . . . . . . . 41
8. Address Validation . . . . . . . . . . . . . . . . . . . . . 38 8. Address Validation . . . . . . . . . . . . . . . . . . . . . 41
8.1. Address Validation During Connection Establishment . . . 39 8.1. Address Validation During Connection Establishment . . . 42
8.1.1. Address Validation using Retry Packets . . . . . . . 40 8.1.1. Token Construction . . . . . . . . . . . . . . . . . 43
8.1.2. Address Validation for Future Connections . . . . . . 41 8.1.2. Address Validation using Retry Packets . . . . . . . 43
8.1.3. Address Validation Token Integrity . . . . . . . . . 43 8.1.3. Address Validation for Future Connections . . . . . . 44
8.2. Path Validation . . . . . . . . . . . . . . . . . . . . . 43 8.1.4. Address Validation Token Integrity . . . . . . . . . 46
8.3. Initiating Path Validation . . . . . . . . . . . . . . . 44 8.2. Path Validation . . . . . . . . . . . . . . . . . . . . . 47
8.4. Path Validation Responses . . . . . . . . . . . . . . . . 44 8.3. Initiating Path Validation . . . . . . . . . . . . . . . 47
8.5. Successful Path Validation . . . . . . . . . . . . . . . 44 8.4. Path Validation Responses . . . . . . . . . . . . . . . . 48
8.6. Failed Path Validation . . . . . . . . . . . . . . . . . 45 8.5. Successful Path Validation . . . . . . . . . . . . . . . 48
9. Connection Migration . . . . . . . . . . . . . . . . . . . . 45 8.6. Failed Path Validation . . . . . . . . . . . . . . . . . 48
9.1. Probing a New Path . . . . . . . . . . . . . . . . . . . 46 9. Connection Migration . . . . . . . . . . . . . . . . . . . . 49
9.2. Initiating Connection Migration . . . . . . . . . . . . . 47 9.1. Probing a New Path . . . . . . . . . . . . . . . . . . . 50
9.3. Responding to Connection Migration . . . . . . . . . . . 47 9.2. Initiating Connection Migration . . . . . . . . . . . . . 50
9.3.1. Peer Address Spoofing . . . . . . . . . . . . . . . . 48 9.3. Responding to Connection Migration . . . . . . . . . . . 51
9.3.2. On-Path Address Spoofing . . . . . . . . . . . . . . 48 9.3.1. Peer Address Spoofing . . . . . . . . . . . . . . . . 52
9.3.3. Off-Path Packet Forwarding . . . . . . . . . . . . . 49 9.3.2. On-Path Address Spoofing . . . . . . . . . . . . . . 52
9.4. Loss Detection and Congestion Control . . . . . . . . . . 50 9.3.3. Off-Path Packet Forwarding . . . . . . . . . . . . . 53
9.5. Privacy Implications of Connection Migration . . . . . . 51 9.4. Loss Detection and Congestion Control . . . . . . . . . . 54
9.6. Server's Preferred Address . . . . . . . . . . . . . . . 52 9.5. Privacy Implications of Connection Migration . . . . . . 55
9.6.1. Communicating a Preferred Address . . . . . . . . . . 52 9.6. Server's Preferred Address . . . . . . . . . . . . . . . 56
9.6.2. Responding to Connection Migration . . . . . . . . . 53 9.6.1. Communicating a Preferred Address . . . . . . . . . . 56
9.6.3. Interaction of Client Migration and Preferred Address 53 9.6.2. Responding to Connection Migration . . . . . . . . . 57
9.7. Use of IPv6 Flow-Label and Migration . . . . . . . . . . 54 9.6.3. Interaction of Client Migration and Preferred
10. Connection Termination . . . . . . . . . . . . . . . . . . . 54 Address . . . . . . . . . . . . . . . . . . . . . . . 57
10.1. Closing and Draining Connection States . . . . . . . . . 54 9.7. Use of IPv6 Flow-Label and Migration . . . . . . . . . . 58
10.2. Idle Timeout . . . . . . . . . . . . . . . . . . . . . . 56 10. Connection Termination . . . . . . . . . . . . . . . . . . . 58
10.3. Immediate Close . . . . . . . . . . . . . . . . . . . . 56 10.1. Closing and Draining Connection States . . . . . . . . . 58
10.4. Stateless Reset . . . . . . . . . . . . . . . . . . . . 58 10.2. Idle Timeout . . . . . . . . . . . . . . . . . . . . . . 60
10.4.1. Detecting a Stateless Reset . . . . . . . . . . . . 60 10.3. Immediate Close . . . . . . . . . . . . . . . . . . . . 60
10.4.2. Calculating a Stateless Reset Token . . . . . . . . 61 10.4. Stateless Reset . . . . . . . . . . . . . . . . . . . . 62
10.4.3. Looping . . . . . . . . . . . . . . . . . . . . . . 62 10.4.1. Detecting a Stateless Reset . . . . . . . . . . . . 65
11. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 63 10.4.2. Calculating a Stateless Reset Token . . . . . . . . 66
11.1. Connection Errors . . . . . . . . . . . . . . . . . . . 63 10.4.3. Looping . . . . . . . . . . . . . . . . . . . . . . 67
11.2. Stream Errors . . . . . . . . . . . . . . . . . . . . . 64 11. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 67
12. Packets and Frames . . . . . . . . . . . . . . . . . . . . . 64 11.1. Connection Errors . . . . . . . . . . . . . . . . . . . 68
12.1. Protected Packets . . . . . . . . . . . . . . . . . . . 65 11.2. Stream Errors . . . . . . . . . . . . . . . . . . . . . 68
12.2. Coalescing Packets . . . . . . . . . . . . . . . . . . . 65 12. Packets and Frames . . . . . . . . . . . . . . . . . . . . . 69
12.3. Packet Numbers . . . . . . . . . . . . . . . . . . . . . 66 12.1. Protected Packets . . . . . . . . . . . . . . . . . . . 69
12.4. Frames and Frame Types . . . . . . . . . . . . . . . . . 68 12.2. Coalescing Packets . . . . . . . . . . . . . . . . . . . 70
13. Packetization and Reliability . . . . . . . . . . . . . . . . 70 12.3. Packet Numbers . . . . . . . . . . . . . . . . . . . . . 71
13.1. Packet Processing . . . . . . . . . . . . . . . . . . . 71 12.4. Frames and Frame Types . . . . . . . . . . . . . . . . . 72
13.2. Generating Acknowledgements . . . . . . . . . . . . . . 71 13. Packetization and Reliability . . . . . . . . . . . . . . . . 75
13.2.1. Sending ACK Frames . . . . . . . . . . . . . . . . . 71 13.1. Packet Processing . . . . . . . . . . . . . . . . . . . 76
13.2.2. Managing ACK Ranges . . . . . . . . . . . . . . . . 73 13.2. Generating Acknowledgements . . . . . . . . . . . . . . 76
13.2.3. Receiver Tracking of ACK Frames . . . . . . . . . . 73 13.2.1. Sending ACK Frames . . . . . . . . . . . . . . . . . 77
13.2.4. Limiting ACK Ranges . . . . . . . . . . . . . . . . 73 13.2.2. Managing ACK Ranges . . . . . . . . . . . . . . . . 78
13.2.5. Measuring and Reporting Host Delay . . . . . . . . . 74 13.2.3. Receiver Tracking of ACK Frames . . . . . . . . . . 79
13.2.6. ACK Frames and Packet Protection . . . . . . . . . . 74 13.2.4. Limiting ACK Ranges . . . . . . . . . . . . . . . . 79
13.3. Retransmission of Information . . . . . . . . . . . . . 74 13.2.5. Measuring and Reporting Host Delay . . . . . . . . . 79
13.4. Explicit Congestion Notification . . . . . . . . . . . . 77 13.2.6. ACK Frames and Packet Protection . . . . . . . . . . 80
13.4.1. ECN Counts . . . . . . . . . . . . . . . . . . . . . 77 13.3. Retransmission of Information . . . . . . . . . . . . . 80
13.4.2. ECN Validation . . . . . . . . . . . . . . . . . . . 78 13.4. Explicit Congestion Notification . . . . . . . . . . . . 83
14. Packet Size . . . . . . . . . . . . . . . . . . . . . . . . . 80 13.4.1. ECN Counts . . . . . . . . . . . . . . . . . . . . . 83
14.1. Path Maximum Transmission Unit (PMTU) . . . . . . . . . 80 13.4.2. ECN Validation . . . . . . . . . . . . . . . . . . . 84
14.2. ICMP Packet Too Big Messages . . . . . . . . . . . . . . 81 14. Packet Size . . . . . . . . . . . . . . . . . . . . . . . . . 85
14.3. Datagram Packetization Layer PMTU Discovery . . . . . . 82 14.1. Path Maximum Transmission Unit (PMTU) . . . . . . . . . 86
14.3.1. PMTU Probes Containing Source Connection ID . . . . 83 14.2. ICMP Packet Too Big Messages . . . . . . . . . . . . . . 87
15. Versions . . . . . . . . . . . . . . . . . . . . . . . . . . 83 14.3. Datagram Packetization Layer PMTU Discovery . . . . . . 88
16. Variable-Length Integer Encoding . . . . . . . . . . . . . . 84 14.3.1. PMTU Probes Containing Source Connection ID . . . . 88
17. Packet Formats . . . . . . . . . . . . . . . . . . . . . . . 85 15. Versions . . . . . . . . . . . . . . . . . . . . . . . . . . 89
17.1. Packet Number Encoding and Decoding . . . . . . . . . . 85 16. Variable-Length Integer Encoding . . . . . . . . . . . . . . 90
17.2. Long Header Packets . . . . . . . . . . . . . . . . . . 86 17. Packet Formats . . . . . . . . . . . . . . . . . . . . . . . 90
17.2.1. Version Negotiation Packet . . . . . . . . . . . . . 89 17.1. Packet Number Encoding and Decoding . . . . . . . . . . 91
17.2.2. Initial Packet . . . . . . . . . . . . . . . . . . . 90 17.2. Long Header Packets . . . . . . . . . . . . . . . . . . 92
17.2.3. 0-RTT . . . . . . . . . . . . . . . . . . . . . . . 92 17.2.1. Version Negotiation Packet . . . . . . . . . . . . . 94
17.2.4. Handshake Packet . . . . . . . . . . . . . . . . . . 94 17.2.2. Initial Packet . . . . . . . . . . . . . . . . . . . 96
17.2.5. Retry Packet . . . . . . . . . . . . . . . . . . . . 95 17.2.3. 0-RTT . . . . . . . . . . . . . . . . . . . . . . . 98
17.3. Short Header Packets . . . . . . . . . . . . . . . . . . 98 17.2.4. Handshake Packet . . . . . . . . . . . . . . . . . . 100
17.3.1. Latency Spin Bit . . . . . . . . . . . . . . . . . . 99 17.2.5. Retry Packet . . . . . . . . . . . . . . . . . . . . 101
18. Transport Parameter Encoding . . . . . . . . . . . . . . . . 100 17.3. Short Header Packets . . . . . . . . . . . . . . . . . . 103
18.1. Reserved Transport Parameters . . . . . . . . . . . . . 101 17.3.1. Latency Spin Bit . . . . . . . . . . . . . . . . . . 105
18.2. Transport Parameter Definitions . . . . . . . . . . . . 101 18. Transport Parameter Encoding . . . . . . . . . . . . . . . . 106
19. Frame Types and Formats . . . . . . . . . . . . . . . . . . . 106 18.1. Reserved Transport Parameters . . . . . . . . . . . . . 107
19.1. PADDING Frame . . . . . . . . . . . . . . . . . . . . . 106 18.2. Transport Parameter Definitions . . . . . . . . . . . . 107
19.2. PING Frame . . . . . . . . . . . . . . . . . . . . . . . 106 19. Frame Types and Formats . . . . . . . . . . . . . . . . . . . 112
19.3. ACK Frames . . . . . . . . . . . . . . . . . . . . . . . 107 19.1. PADDING Frame . . . . . . . . . . . . . . . . . . . . . 112
19.3.1. ACK Ranges . . . . . . . . . . . . . . . . . . . . . 108 19.2. PING Frame . . . . . . . . . . . . . . . . . . . . . . . 112
19.3.2. ECN Counts . . . . . . . . . . . . . . . . . . . . . 110 19.3. ACK Frames . . . . . . . . . . . . . . . . . . . . . . . 113
19.4. RESET_STREAM Frame . . . . . . . . . . . . . . . . . . . 111 19.3.1. ACK Ranges . . . . . . . . . . . . . . . . . . . . . 114
19.5. STOP_SENDING Frame . . . . . . . . . . . . . . . . . . . 111 19.3.2. ECN Counts . . . . . . . . . . . . . . . . . . . . . 116
19.6. CRYPTO Frame . . . . . . . . . . . . . . . . . . . . . . 112 19.4. RESET_STREAM Frame . . . . . . . . . . . . . . . . . . . 117
19.7. NEW_TOKEN Frame . . . . . . . . . . . . . . . . . . . . 113 19.5. STOP_SENDING Frame . . . . . . . . . . . . . . . . . . . 118
19.8. STREAM Frames . . . . . . . . . . . . . . . . . . . . . 114 19.6. CRYPTO Frame . . . . . . . . . . . . . . . . . . . . . . 118
19.9. MAX_DATA Frame . . . . . . . . . . . . . . . . . . . . . 115 19.7. NEW_TOKEN Frame . . . . . . . . . . . . . . . . . . . . 119
19.10. MAX_STREAM_DATA Frame . . . . . . . . . . . . . . . . . 116 19.8. STREAM Frames . . . . . . . . . . . . . . . . . . . . . 120
19.11. MAX_STREAMS Frames . . . . . . . . . . . . . . . . . . . 117 19.9. MAX_DATA Frame . . . . . . . . . . . . . . . . . . . . . 122
19.12. DATA_BLOCKED Frame . . . . . . . . . . . . . . . . . . . 118 19.10. MAX_STREAM_DATA Frame . . . . . . . . . . . . . . . . . 122
19.13. STREAM_DATA_BLOCKED Frame . . . . . . . . . . . . . . . 118 19.11. MAX_STREAMS Frames . . . . . . . . . . . . . . . . . . . 123
19.14. STREAMS_BLOCKED Frames . . . . . . . . . . . . . . . . . 119 19.12. DATA_BLOCKED Frame . . . . . . . . . . . . . . . . . . . 124
19.15. NEW_CONNECTION_ID Frame . . . . . . . . . . . . . . . . 120 19.13. STREAM_DATA_BLOCKED Frame . . . . . . . . . . . . . . . 125
19.16. RETIRE_CONNECTION_ID Frame . . . . . . . . . . . . . . . 121 19.14. STREAMS_BLOCKED Frames . . . . . . . . . . . . . . . . . 125
19.17. PATH_CHALLENGE Frame . . . . . . . . . . . . . . . . . . 122 19.15. NEW_CONNECTION_ID Frame . . . . . . . . . . . . . . . . 126
19.18. PATH_RESPONSE Frame . . . . . . . . . . . . . . . . . . 123 19.16. RETIRE_CONNECTION_ID Frame . . . . . . . . . . . . . . . 128
19.19. CONNECTION_CLOSE Frames . . . . . . . . . . . . . . . . 123 19.17. PATH_CHALLENGE Frame . . . . . . . . . . . . . . . . . . 129
19.20. Extension Frames . . . . . . . . . . . . . . . . . . . . 124 19.18. PATH_RESPONSE Frame . . . . . . . . . . . . . . . . . . 129
20. Transport Error Codes . . . . . . . . . . . . . . . . . . . . 124 19.19. CONNECTION_CLOSE Frames . . . . . . . . . . . . . . . . 129
20.1. Application Protocol Error Codes . . . . . . . . . . . . 126 19.20. HANDSHAKE_DONE frame . . . . . . . . . . . . . . . . . . 131
21. Security Considerations . . . . . . . . . . . . . . . . . . . 126 19.21. Extension Frames . . . . . . . . . . . . . . . . . . . . 131
21.1. Handshake Denial of Service . . . . . . . . . . . . . . 126 20. Transport Error Codes . . . . . . . . . . . . . . . . . . . . 131
21.2. Amplification Attack . . . . . . . . . . . . . . . . . . 127 20.1. Application Protocol Error Codes . . . . . . . . . . . . 133
21.3. Optimistic ACK Attack . . . . . . . . . . . . . . . . . 127 21. Security Considerations . . . . . . . . . . . . . . . . . . . 133
21.4. Slowloris Attacks . . . . . . . . . . . . . . . . . . . 128 21.1. Handshake Denial of Service . . . . . . . . . . . . . . 133
21.5. Stream Fragmentation and Reassembly Attacks . . . . . . 128 21.2. Amplification Attack . . . . . . . . . . . . . . . . . . 134
21.6. Stream Commitment Attack . . . . . . . . . . . . . . . . 129 21.3. Optimistic ACK Attack . . . . . . . . . . . . . . . . . 135
21.7. Peer Denial of Service . . . . . . . . . . . . . . . . . 129 21.4. Slowloris Attacks . . . . . . . . . . . . . . . . . . . 135
21.8. Explicit Congestion Notification Attacks . . . . . . . . 130 21.5. Stream Fragmentation and Reassembly Attacks . . . . . . 135
21.9. Stateless Reset Oracle . . . . . . . . . . . . . . . . . 130 21.6. Stream Commitment Attack . . . . . . . . . . . . . . . . 136
21.10. Version Downgrade . . . . . . . . . . . . . . . . . . . 130 21.7. Peer Denial of Service . . . . . . . . . . . . . . . . . 136
21.11. Targeted Attacks by Routing . . . . . . . . . . . . . . 131 21.8. Explicit Congestion Notification Attacks . . . . . . . . 137
22. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 131 21.9. Stateless Reset Oracle . . . . . . . . . . . . . . . . . 137
22.1. QUIC Transport Parameter Registry . . . . . . . . . . . 131 21.10. Version Downgrade . . . . . . . . . . . . . . . . . . . 137
22.2. QUIC Frame Type Registry . . . . . . . . . . . . . . . . 132 21.11. Targeted Attacks by Routing . . . . . . . . . . . . . . 138
22.3. QUIC Transport Error Codes Registry . . . . . . . . . . 133 21.12. Overview of Security Properties . . . . . . . . . . . . 138
23. References . . . . . . . . . . . . . . . . . . . . . . . . . 135 21.12.1. Handshake . . . . . . . . . . . . . . . . . . . . . 138
23.1. Normative References . . . . . . . . . . . . . . . . . . 136 21.12.2. Protected Packets . . . . . . . . . . . . . . . . . 140
23.2. Informative References . . . . . . . . . . . . . . . . . 137 21.12.3. Connection Migration . . . . . . . . . . . . . . . 141
Appendix A. Sample Packet Number Decoding Algorithm . . . . . . 139 22. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 145
Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 140 22.1. Registration Policies for QUIC Registries . . . . . . . 145
B.1. Since draft-ietf-quic-transport-23 . . . . . . . . . . . 140 22.1.1. Provisional Registrations . . . . . . . . . . . . . 145
B.2. Since draft-ietf-quic-transport-22 . . . . . . . . . . . 140 22.1.2. Selecting Codepoints . . . . . . . . . . . . . . . . 146
B.3. Since draft-ietf-quic-transport-21 . . . . . . . . . . . 142 22.1.3. Reclaiming Provisional Codepoints . . . . . . . . . 146
B.4. Since draft-ietf-quic-transport-20 . . . . . . . . . . . 142 22.1.4. Permanent Registrations . . . . . . . . . . . . . . 147
B.5. Since draft-ietf-quic-transport-19 . . . . . . . . . . . 143 22.2. QUIC Transport Parameter Registry . . . . . . . . . . . 148
B.6. Since draft-ietf-quic-transport-18 . . . . . . . . . . . 143 22.3. QUIC Frame Type Registry . . . . . . . . . . . . . . . . 149
B.7. Since draft-ietf-quic-transport-17 . . . . . . . . . . . 144 22.4. QUIC Transport Error Codes Registry . . . . . . . . . . 150
B.8. Since draft-ietf-quic-transport-16 . . . . . . . . . . . 144 23. References . . . . . . . . . . . . . . . . . . . . . . . . . 152
B.9. Since draft-ietf-quic-transport-15 . . . . . . . . . . . 146 23.1. Normative References . . . . . . . . . . . . . . . . . . 152
B.10. Since draft-ietf-quic-transport-14 . . . . . . . . . . . 146 23.2. Informative References . . . . . . . . . . . . . . . . . 153
B.11. Since draft-ietf-quic-transport-13 . . . . . . . . . . . 146 Appendix A. Sample Packet Number Decoding Algorithm . . . . . . 155
B.12. Since draft-ietf-quic-transport-12 . . . . . . . . . . . 147 Appendix B. Sample ECN Validation Algorithm . . . . . . . . . . 156
B.13. Since draft-ietf-quic-transport-11 . . . . . . . . . . . 148 Appendix C. Change Log . . . . . . . . . . . . . . . . . . . . . 157
B.14. Since draft-ietf-quic-transport-10 . . . . . . . . . . . 148 C.1. Since draft-ietf-quic-transport-24 . . . . . . . . . . . 157
B.15. Since draft-ietf-quic-transport-09 . . . . . . . . . . . 149 C.2. Since draft-ietf-quic-transport-23 . . . . . . . . . . . 158
B.16. Since draft-ietf-quic-transport-08 . . . . . . . . . . . 149 C.3. Since draft-ietf-quic-transport-22 . . . . . . . . . . . 159
B.17. Since draft-ietf-quic-transport-07 . . . . . . . . . . . 150 C.4. Since draft-ietf-quic-transport-21 . . . . . . . . . . . 160
B.18. Since draft-ietf-quic-transport-06 . . . . . . . . . . . 151 C.5. Since draft-ietf-quic-transport-20 . . . . . . . . . . . 160
B.19. Since draft-ietf-quic-transport-05 . . . . . . . . . . . 151 C.6. Since draft-ietf-quic-transport-19 . . . . . . . . . . . 161
B.20. Since draft-ietf-quic-transport-04 . . . . . . . . . . . 151 C.7. Since draft-ietf-quic-transport-18 . . . . . . . . . . . 162
B.21. Since draft-ietf-quic-transport-03 . . . . . . . . . . . 152 C.8. Since draft-ietf-quic-transport-17 . . . . . . . . . . . 162
B.22. Since draft-ietf-quic-transport-02 . . . . . . . . . . . 152 C.9. Since draft-ietf-quic-transport-16 . . . . . . . . . . . 163
B.23. Since draft-ietf-quic-transport-01 . . . . . . . . . . . 153 C.10. Since draft-ietf-quic-transport-15 . . . . . . . . . . . 164
B.24. Since draft-ietf-quic-transport-00 . . . . . . . . . . . 155 C.11. Since draft-ietf-quic-transport-14 . . . . . . . . . . . 164
B.25. Since draft-hamilton-quic-transport-protocol-01 . . . . . 155 C.12. Since draft-ietf-quic-transport-13 . . . . . . . . . . . 164
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 156 C.13. Since draft-ietf-quic-transport-12 . . . . . . . . . . . 165
Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . 156 C.14. Since draft-ietf-quic-transport-11 . . . . . . . . . . . 166
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 156 C.15. Since draft-ietf-quic-transport-10 . . . . . . . . . . . 166
C.16. Since draft-ietf-quic-transport-09 . . . . . . . . . . . 167
C.17. Since draft-ietf-quic-transport-08 . . . . . . . . . . . 168
C.18. Since draft-ietf-quic-transport-07 . . . . . . . . . . . 168
C.19. Since draft-ietf-quic-transport-06 . . . . . . . . . . . 169
C.20. Since draft-ietf-quic-transport-05 . . . . . . . . . . . 170
C.21. Since draft-ietf-quic-transport-04 . . . . . . . . . . . 170
C.22. Since draft-ietf-quic-transport-03 . . . . . . . . . . . 171
C.23. Since draft-ietf-quic-transport-02 . . . . . . . . . . . 171
C.24. Since draft-ietf-quic-transport-01 . . . . . . . . . . . 172
C.25. Since draft-ietf-quic-transport-00 . . . . . . . . . . . 174
C.26. Since draft-hamilton-quic-transport-protocol-01 . . . . . 174
Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 174
1. Introduction 1. Introduction
QUIC is a multiplexed and secure general-purpose transport protocol QUIC is a multiplexed and secure general-purpose transport protocol
that provides: that provides:
o Stream multiplexing * Stream multiplexing
o Stream and connection-level flow control * Stream and connection-level flow control
o Low-latency connection establishment * Low-latency connection establishment
o Connection migration and resilience to NAT rebinding * Connection migration and resilience to NAT rebinding
o Authenticated and encrypted header and payload * Authenticated and encrypted header and payload
QUIC uses UDP as a substrate to avoid requiring changes to legacy QUIC uses UDP as a substrate to avoid requiring changes to legacy
client operating systems and middleboxes. QUIC authenticates all of client operating systems and middleboxes. QUIC authenticates all of
its headers and encrypts most of the data it exchanges, including its its headers and encrypts most of the data it exchanges, including its
signaling, to avoid incurring a dependency on middleboxes. signaling, to avoid incurring a dependency on middleboxes.
1.1. Document Structure 1.1. Document Structure
This document describes the core QUIC protocol and is structured as This document describes the core QUIC protocol and is structured as
follows. follows:
o Streams are the basic service abstraction that QUIC provides. * Streams are the basic service abstraction that QUIC provides.
* Section 2 describes core concepts related to streams, - Section 2 describes core concepts related to streams,
* Section 3 provides a reference model for stream states, and - Section 3 provides a reference model for stream states, and
* Section 4 outlines the operation of flow control. - Section 4 outlines the operation of flow control.
o Connections are the context in which QUIC endpoints communicate. * Connections are the context in which QUIC endpoints communicate.
* Section 5 describes core concepts related to connections, - Section 5 describes core concepts related to connections,
* Section 6 describes version negotiation, - Section 6 describes version negotiation,
* Section 7 details the process for establishing connections,
* Section 8 specifies critical denial of service mitigation - Section 7 details the process for establishing connections,
- Section 8 specifies critical denial of service mitigation
mechanisms, mechanisms,
* Section 9 describes how endpoints migrate a connection to a new - Section 9 describes how endpoints migrate a connection to a new
network path, network path,
* Section 10 lists the options for terminating an open - Section 10 lists the options for terminating an open
connection, and connection, and
* Section 11 provides general guidance for error handling. - Section 11 provides general guidance for error handling.
o Packets and frames are the basic unit used by QUIC to communicate. * Packets and frames are the basic unit used by QUIC to communicate.
* Section 12 describes concepts related to packets and frames, - Section 12 describes concepts related to packets and frames,
* Section 13 defines models for the transmission, retransmission, - Section 13 defines models for the transmission, retransmission,
and acknowledgement of data, and and acknowledgement of data, and
* Section 14 specifies rules for managing the size of packets. - Section 14 specifies rules for managing the size of packets.
o Finally, encoding details of QUIC protocol elements are described * Finally, encoding details of QUIC protocol elements are described
in: in:
* Section 15 (Versions), - Section 15 (Versions),
* Section 16 (Integer Encoding), - Section 16 (Integer Encoding),
* Section 17 (Packet Headers), - Section 17 (Packet Headers),
* Section 18 (Transport Parameters), - Section 18 (Transport Parameters),
* Section 19 (Frames), and - Section 19 (Frames), and
* Section 20 (Errors). - Section 20 (Errors).
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 for key negotiation control [QUIC-RECOVERY], and the use of TLS for key negotiation
[QUIC-TLS]. [QUIC-TLS].
This document defines QUIC version 1, which conforms to the protocol This document defines QUIC version 1, which conforms to the protocol
invariants in [QUIC-INVARIANTS]. invariants in [QUIC-INVARIANTS].
1.2. Terms and Definitions 1.2. Terms and Definitions
skipping to change at page 8, line 26 skipping to change at page 8, line 33
name, not an acronym. name, not an acronym.
QUIC packet: A complete processable unit of QUIC that can be QUIC packet: A complete processable unit of QUIC that can be
encapsulated in a UDP datagram. Multiple QUIC packets can be encapsulated in a UDP datagram. Multiple QUIC packets can be
encapsulated in a single UDP datagram. encapsulated in a single UDP datagram.
Ack-eliciting Packet: A QUIC packet that contains frames other than Ack-eliciting Packet: A QUIC packet that contains frames other than
ACK, PADDING, and CONNECTION_CLOSE. These cause a recipient to ACK, PADDING, and CONNECTION_CLOSE. These cause a recipient to
send an acknowledgment (see Section 13.2.1). send an acknowledgment (see Section 13.2.1).
Out-of-order packet: A packet that does not increase the largest
received packet number for its packet number space by exactly one.
A packet can arrive out of order if it is delayed or if earlier
packets are lost or delayed.
Endpoint: An entity that can participate in a QUIC connection by Endpoint: An entity that can participate in a QUIC connection by
generating, receiving, and processing QUIC packets. There are generating, receiving, and processing QUIC packets. There are
only two types of endpoint in QUIC: client and server. only two types of endpoint in QUIC: client and server.
Client: The endpoint initiating a QUIC connection. Client: The endpoint initiating a QUIC connection.
Server: The endpoint accepting incoming QUIC connections. Server: The endpoint accepting incoming QUIC connections.
Address: When used without qualification, the tuple of IP version,
IP address, UDP protocol, and UDP port number that represents one
end of a network path.
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 for its connection at an endpoint. Each endpoint sets a value for its
peer to include in packets sent towards the endpoint. peer to include in packets sent towards the endpoint.
Stream: A unidirectional or bidirectional channel of ordered bytes Stream: A unidirectional or bidirectional channel of ordered bytes
within a QUIC connection. A QUIC connection can carry multiple within a QUIC connection. A QUIC connection can carry multiple
simultaneous streams. simultaneous streams.
Application: An entity that uses QUIC to send and receive data. Application: An entity that uses QUIC to send and receive data.
skipping to change at page 10, line 14 skipping to change at page 10, line 32
The second least significant bit (0x2) of the stream ID distinguishes The second least significant bit (0x2) of the stream ID distinguishes
between bidirectional streams (with the bit set to 0) and between bidirectional streams (with the bit set to 0) and
unidirectional streams (with the bit set to 1). unidirectional streams (with the bit set to 1).
The least significant two bits from a stream ID therefore identify a The least significant two bits from a stream ID therefore identify a
stream as one of four types, as summarized in Table 1. stream as one of four types, as summarized in Table 1.
+------+----------------------------------+ +------+----------------------------------+
| Bits | Stream Type | | Bits | Stream Type |
+------+----------------------------------+ +======+==================================+
| 0x0 | Client-Initiated, Bidirectional | | 0x0 | Client-Initiated, Bidirectional |
| | | +------+----------------------------------+
| 0x1 | Server-Initiated, Bidirectional | | 0x1 | Server-Initiated, Bidirectional |
| | | +------+----------------------------------+
| 0x2 | Client-Initiated, Unidirectional | | 0x2 | Client-Initiated, Unidirectional |
| | | +------+----------------------------------+
| 0x3 | Server-Initiated, Unidirectional | | 0x3 | Server-Initiated, Unidirectional |
+------+----------------------------------+ +------+----------------------------------+
Table 1: Stream ID Types Table 1: Stream ID Types
Within each type, streams are created with numerically increasing Within each type, streams are created with numerically increasing
stream IDs. A stream ID that is used out of order results in all stream IDs. A stream ID that is used out of order results in all
streams of that type with lower-numbered stream IDs also being streams of that type with lower-numbered stream IDs also being
opened. opened.
The first bidirectional stream opened by the client has a stream ID The first bidirectional stream opened by the client has a stream ID
of 0. of 0.
2.2. Sending and Receiving Data 2.2. Sending and Receiving Data
skipping to change at page 11, line 42 skipping to change at page 12, line 16
There are certain operations which an application MUST be able to There are certain operations which an application MUST be able to
perform when interacting with QUIC streams. This document does not perform when interacting with QUIC streams. This document does not
specify an API, but any implementation of this version of QUIC MUST specify an API, but any implementation of this version of QUIC MUST
expose the ability to perform the operations described in this expose the ability to perform the operations described in this
section on a QUIC stream. section on a QUIC stream.
On the sending part of a stream, application protocols need to be On the sending part of a stream, application protocols need to be
able to: able to:
o write data, understanding when stream flow control credit * write data, understanding when stream flow control credit
(Section 4.1) has successfully been reserved to send the written (Section 4.1) has successfully been reserved to send the written
data; data;
o end the stream (clean termination), resulting in a STREAM frame * end the stream (clean termination), resulting in a STREAM frame
(Section 19.8) with the FIN bit set; and (Section 19.8) with the FIN bit set; and
o reset the stream (abrupt termination), resulting in a RESET_STREAM * reset the stream (abrupt termination), resulting in a RESET_STREAM
frame (Section 19.4), if the stream was not already in a terminal frame (Section 19.4), if the stream was not already in a terminal
state. state.
On the receiving part of a stream, application protocols need to be On the receiving part of a stream, application protocols need to be
able to: able to:
o read data; and * read data; and
o abort reading of the stream and request closure, possibly * abort reading of the stream and request closure, possibly
resulting in a STOP_SENDING frame (Section 19.5). resulting in a STOP_SENDING frame (Section 19.5).
Applications also need to be informed of state changes on streams, Applications also need to be informed of state changes on streams,
including when the peer has opened or reset a stream, when a peer including when the peer has opened or reset a stream, when a peer
aborts reading on a stream, when new data is available, and when data aborts reading on a stream, when new data is available, and when data
can or cannot be written to the stream due to flow control. can or cannot be written to the stream due to flow control.
3. Stream States 3. Stream States
This section describes streams in terms of their send or receive This section describes streams in terms of their send or receive
skipping to change at page 18, line 15 skipping to change at page 20, line 5
receiving streams are in terminal states. receiving streams are in terminal states.
Table 2 shows a more complex mapping of bidirectional stream states Table 2 shows a more complex mapping of bidirectional stream states
that loosely correspond to the stream states in HTTP/2 [HTTP2]. This that loosely correspond to the stream states in HTTP/2 [HTTP2]. This
shows that multiple states on sending or receiving parts of streams shows that multiple states on sending or receiving parts of streams
are mapped to the same composite state. Note that this is just one are mapped to the same composite state. Note that this is just one
possibility for such a mapping; this mapping requires that data is possibility for such a mapping; this mapping requires that data is
acknowledged before the transition to a "closed" or "half-closed" acknowledged before the transition to a "closed" or "half-closed"
state. state.
+-----------------------+---------------------+---------------------+ +----------------------+----------------------+-----------------+
| Sending Part | Receiving Part | Composite State | | Sending Part | Receiving Part | Composite State |
+-----------------------+---------------------+---------------------+ +======================+======================+=================+
| No Stream/Ready | No Stream/Recv *1 | idle | | No Stream/Ready | No Stream/Recv *1 | idle |
| | | | +----------------------+----------------------+-----------------+
| Ready/Send/Data Sent | Recv/Size Known | open | | Ready/Send/Data Sent | Recv/Size Known | open |
| | | | +----------------------+----------------------+-----------------+
| Ready/Send/Data Sent | Data Recvd/Data | half-closed | | Ready/Send/Data Sent | Data Recvd/Data Read | half-closed |
| | Read | (remote) | | | | (remote) |
| | | | +----------------------+----------------------+-----------------+
| Ready/Send/Data Sent | Reset Recvd/Reset | half-closed | | Ready/Send/Data Sent | Reset Recvd/Reset | half-closed |
| | Read | (remote) | | | Read | (remote) |
| | | | +----------------------+----------------------+-----------------+
| Data Recvd | Recv/Size Known | half-closed (local) | | Data Recvd | Recv/Size Known | half-closed |
| | | | | | | (local) |
| Reset Sent/Reset | Recv/Size Known | half-closed (local) | +----------------------+----------------------+-----------------+
| Recvd | | | | Reset Sent/Reset | Recv/Size Known | half-closed |
| | | | | Recvd | | (local) |
| Reset Sent/Reset | Data Recvd/Data | closed | +----------------------+----------------------+-----------------+
| Recvd | Read | | | Reset Sent/Reset | Data Recvd/Data Read | closed |
| | | | | Recvd | | |
| Reset Sent/Reset | Reset Recvd/Reset | closed | +----------------------+----------------------+-----------------+
| Recvd | Read | | | Reset Sent/Reset | Reset Recvd/Reset | closed |
| | | | | Recvd | Read | |
| Data Recvd | Data Recvd/Data | closed | +----------------------+----------------------+-----------------+
| | Read | | | Data Recvd | Data Recvd/Data Read | closed |
| | | | +----------------------+----------------------+-----------------+
| Data Recvd | Reset Recvd/Reset | closed | | Data Recvd | Reset Recvd/Reset | closed |
| | Read | | | | Read | |
+-----------------------+---------------------+---------------------+ +----------------------+----------------------+-----------------+
Table 2: Possible Mapping of Stream States to HTTP/2 Table 2: Possible Mapping of Stream States to HTTP/2
Note (*1): A stream is considered "idle" if it has not yet been Note (*1): A stream is considered "idle" if it has not yet been
created, or if the receiving part of the stream is in the "Recv" created, or if the receiving part of the stream is in the "Recv"
state without yet having received any frames. state without yet having received any frames.
3.5. Solicited State Transitions 3.5. Solicited State Transitions
If an application is no longer interested in the data it is receiving If an application is no longer interested in the data it is receiving
on a stream, it can abort reading the stream and specify an on a stream, it can abort reading the stream and specify an
application error code. application error code.
skipping to change at page 20, line 34 skipping to change at page 22, line 34
about its buffering limits so that there is not excessive buffering about its buffering limits so that there is not excessive buffering
at multiple layers. at multiple layers.
4.1. Data Flow Control 4.1. Data Flow Control
QUIC employs a credit-based flow-control scheme similar to that in QUIC employs a credit-based flow-control scheme similar to that in
HTTP/2 [HTTP2], where a receiver advertises the number of bytes it is HTTP/2 [HTTP2], where a receiver advertises the number of bytes it is
prepared to receive on a given stream and for the entire connection. prepared to receive on a given stream and for the entire connection.
This leads to two levels of data flow control in QUIC: This leads to two levels of data flow control in QUIC:
o Stream flow control, which prevents a single stream from consuming * Stream flow control, which prevents a single stream from consuming
the entire receive buffer for a connection by limiting the amount the entire receive buffer for a connection by limiting the amount
of data that can be sent on any stream. of data that can be sent on any stream.
o Connection flow control, which prevents senders from exceeding a * Connection flow control, which prevents senders from exceeding a
receiver's buffer capacity for the connection, by limiting the receiver's buffer capacity for the connection, by limiting the
total bytes of stream data sent in STREAM frames on all streams. total bytes of stream data sent in STREAM frames on all streams.
A receiver sets initial credits for all streams by sending transport A receiver sets initial credits for all streams by sending transport
parameters during the handshake (Section 7.3). A receiver sends parameters during the handshake (Section 7.3). A receiver sends
MAX_STREAM_DATA (Section 19.10) or MAX_DATA (Section 19.9) frames to MAX_STREAM_DATA (Section 19.10) or MAX_DATA (Section 19.9) frames to
the sender to advertise additional credit. the sender to advertise additional credit.
A receiver advertises credit for a stream by sending a A receiver advertises credit for a stream by sending a
MAX_STREAM_DATA frame with the Stream ID field set appropriately. A MAX_STREAM_DATA frame with the Stream ID field set appropriately. A
skipping to change at page 21, line 28 skipping to change at page 23, line 28
A receiver MUST close the connection with a FLOW_CONTROL_ERROR error A receiver MUST close the connection with a FLOW_CONTROL_ERROR error
(Section 11) if the sender violates the advertised connection or (Section 11) if the sender violates the advertised connection or
stream data limits. stream data limits.
A sender MUST ignore any MAX_STREAM_DATA or MAX_DATA frames that do A sender MUST ignore any MAX_STREAM_DATA or MAX_DATA frames that do
not increase flow control limits. not increase flow control limits.
If a sender runs out of flow control credit, it will be unable to If a sender runs out of flow control credit, it will be unable to
send new data and is considered blocked. A sender SHOULD send a send new data and is considered blocked. A sender SHOULD send a
STREAM_DATA_BLOCKED or DATA_BLOCKED frame to indicate it has data to STREAM_DATA_BLOCKED or DATA_BLOCKED frame to indicate it has data to
write but is blocked by flow control limits. These frames are write but is blocked by flow control limits. If a sender is blocked
expected to be sent infrequently in common cases, but they are for a period longer than the idle timeout (Section 10.2), the
considered useful for debugging and monitoring purposes. connection might be closed even when data is available for
transmission. To keep the connection from closing, a sender that is
A sender SHOULD NOT send multiple STREAM_DATA_BLOCKED or DATA_BLOCKED flow control limited SHOULD periodically send a STREAM_DATA_BLOCKED
frames for the same data limit, unless the original frame is or DATA_BLOCKED frame when it has no ack-eliciting packets in flight.
determined to be lost. Another STREAM_DATA_BLOCKED or DATA_BLOCKED
frame can be sent after the data limit is increased.
4.2. Flow Credit Increments 4.2. Flow Credit Increments
This document leaves when and how many bytes to advertise in a This document leaves when and how many bytes to advertise in a
MAX_STREAM_DATA or MAX_DATA frame to implementations, but offers a MAX_STREAM_DATA or MAX_DATA frame to implementations, but offers a
few considerations. These frames contribute to connection overhead. few considerations. These frames contribute to connection overhead.
Therefore frequently sending frames with small changes is Therefore frequently sending frames with small changes is
undesirable. At the same time, larger increments to limits are undesirable. At the same time, larger increments to limits are
necessary to avoid blocking if updates are less frequent, requiring necessary to avoid blocking if updates are less frequent, requiring
larger resource commitments at the receiver. Thus there is a trade- larger resource commitments at the receiver. Thus there is a trade-
skipping to change at page 25, line 37 skipping to change at page 27, line 37
response to an Initial packet. response to an Initial packet.
A zero-length connection ID can be used when a connection ID is not A zero-length connection ID can be used when a connection ID is not
needed to route to the correct endpoint. However, multiplexing needed to route to the correct endpoint. However, multiplexing
connections on the same local IP address and port while using zero- connections on the same local IP address and port while using zero-
length connection IDs will cause failures in the presence of peer length connection IDs will cause failures in the presence of peer
connection migration, NAT rebinding, and client port reuse; and connection migration, NAT rebinding, and client port reuse; and
therefore MUST NOT be done unless an endpoint is certain that those therefore MUST NOT be done unless an endpoint is certain that those
protocol features are not in use. protocol features are not in use.
When an endpoint has requested a non-zero-length connection ID, it When an endpoint uses a non-zero-length connection ID, it needs to
needs to ensure that the peer has a supply of connection IDs from ensure that the peer has a supply of connection IDs from which to
which to choose for packets sent to the endpoint. These connection choose for packets sent to the endpoint. These connection IDs are
IDs are supplied by the endpoint using the NEW_CONNECTION_ID frame supplied by the endpoint using the NEW_CONNECTION_ID frame
(Section 19.15). (Section 19.15).
5.1.1. Issuing Connection IDs 5.1.1. Issuing Connection IDs
Each Connection ID has an associated sequence number to assist in Each Connection ID has an associated sequence number to assist in
deduplicating messages. The initial connection ID issued by an deduplicating messages. The initial connection ID issued by an
endpoint is sent in the Source Connection ID field of the long packet endpoint is sent in the Source Connection ID field of the long packet
header (Section 17.2) during the handshake. The sequence number of header (Section 17.2) during the handshake. The sequence number of
the initial connection ID is 0. If the preferred_address transport the initial connection ID is 0. If the preferred_address transport
parameter is sent, the sequence number of the supplied connection ID parameter is sent, the sequence number of the supplied connection ID
skipping to change at page 26, line 23 skipping to change at page 28, line 23
When an endpoint issues a connection ID, it MUST accept packets that When an endpoint issues a connection ID, it MUST accept packets that
carry this connection ID for the duration of the connection or until carry this connection ID for the duration of the connection or until
its peer invalidates the connection ID via a RETIRE_CONNECTION_ID its peer invalidates the connection ID via a RETIRE_CONNECTION_ID
frame (Section 19.16). Connection IDs that are issued and not frame (Section 19.16). Connection IDs that are issued and not
retired are considered active; any active connection ID can be used. retired are considered active; any active connection ID can be used.
An endpoint SHOULD ensure that its peer has a sufficient number of An endpoint SHOULD ensure that its peer has a sufficient number of
available and unused connection IDs. Endpoints store received available and unused connection IDs. Endpoints store received
connection IDs for future use and advertise the number of connection connection IDs for future use and advertise the number of connection
IDs they are willing to store with the active_connection_id_limit IDs they are willing to store with the active_connection_id_limit
transport parameter. An endpoint SHOULD NOT provide more connection transport parameter. An endpoint MUST NOT provide more connection
IDs than the peer's limit. IDs than the peer's limit. An endpoint that receives more connection
IDs than its advertised active_connection_id_limit MUST close the
connection with an error of type CONNECTION_ID_LIMIT_ERROR.
An endpoint SHOULD supply a new connection ID when it receives a An endpoint SHOULD supply a new connection ID when the peer retires a
packet with a previously unused connection ID or when the peer connection ID. If an endpoint provided fewer connection IDs than the
retires one, unless providing the new connection ID would exceed the peer's active_connection_id_limit, it MAY supply a new connection ID
peer's limit. An endpoint MAY limit the frequency or the total when it receives a packet with a previously unused connection ID. An
number of connection IDs issued for each connection to avoid the risk endpoint MAY limit the frequency or the total number of connection
of running out of connection IDs; see Section 10.4.2. IDs issued for each connection to avoid the risk of running out of
connection IDs; see Section 10.4.2.
An endpoint that initiates migration and requires non-zero-length An endpoint that initiates migration and requires non-zero-length
connection IDs SHOULD ensure that the pool of connection IDs connection IDs SHOULD ensure that the pool of connection IDs
available to its peer allows the peer to use a new connection ID on available to its peer allows the peer to use a new connection ID on
migration, as the peer will close the connection if the pool is migration, as the peer will close the connection if the pool is
exhausted. exhausted.
5.1.2. Consuming and Retiring Connection IDs 5.1.2. Consuming and Retiring Connection IDs
An endpoint can change the connection ID it uses for a peer to An endpoint can change the connection ID it uses for a peer to
skipping to change at page 27, line 12 skipping to change at page 29, line 15
be used again and requests that the peer replace it with a new be used again and requests that the peer replace it with a new
connection ID using a NEW_CONNECTION_ID frame. connection ID using a NEW_CONNECTION_ID frame.
As discussed in Section 9.5, each connection ID MUST be used on As discussed in Section 9.5, each connection ID MUST be used on
packets sent from only one local address. An endpoint that migrates packets sent from only one local address. An endpoint that migrates
away from a local address SHOULD retire all connection IDs used on away from a local address SHOULD retire all connection IDs used on
that address once it no longer plans to use that address. that address once it no longer plans to use that address.
An endpoint can cause its peer to retire connection IDs by sending a An endpoint can cause its peer to retire connection IDs by sending a
NEW_CONNECTION_ID frame with an increased Retire Prior To field. NEW_CONNECTION_ID frame with an increased Retire Prior To field.
Upon receipt, the peer MUST retire the corresponding connection IDs Upon receipt, the peer MUST first retire the corresponding connection
and send corresponding RETIRE_CONNECTION_ID frames. Failing to IDs using RETIRE_CONNECTION_ID frames and then add the newly provided
retire the connection IDs within approximately one PTO can cause connection ID to the set of active connection IDs. Failure to retire
packets to be delayed, lost, or cause the original endpoint to send a the connection IDs within approximately one PTO can cause packets to
stateless reset in response to a connection ID it can no longer route be delayed, lost, or cause the original endpoint to send a stateless
reset in response to a connection ID it can no longer route
correctly. correctly.
An endpoint MAY discard a connection ID for which retirement has been An endpoint MAY discard a connection ID for which retirement has been
requested once an interval of no less than 3 PTO has elapsed since an requested once an interval of no less than 3 PTO has elapsed since an
acknowledgement is received for the NEW_CONNECTION_ID frame acknowledgement is received for the NEW_CONNECTION_ID frame
requesting that retirement. Until then, the endpoint SHOULD be requesting that retirement. Until then, the endpoint SHOULD be
prepared to receive packets that contain the connection ID that it prepared to receive packets that contain the connection ID that it
has requested be retired. Subsequent incoming packets using that has requested be retired. Subsequent incoming packets using that
connection ID could elicit a response with the corresponding connection ID could elicit a response with the corresponding
stateless reset token. stateless reset token.
5.2. Matching Packets to Connections 5.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 Endpoints try to associate a packet with an existing connection. If
packet has a non-zero-length Destination Connection ID corresponding the packet has a non-zero-length Destination Connection ID
to an existing connection, QUIC processes that packet accordingly. corresponding to an existing connection, QUIC processes that packet
Note that more than one connection ID can be associated with a accordingly. Note that more than one connection ID can be associated
connection; see Section 5.1. with a connection; see Section 5.1.
If the Destination Connection ID is zero length and the packet If the Destination Connection ID is zero length and the addressing
matches the local address and port of a connection where the host information in the packet matches the addressing information the
used zero-length connection IDs, QUIC processes the packet as part of endpoint uses to identify a connection with a zero-length connection
that connection. ID, QUIC processes the packet as part of that connection. An
endpoint can use just destination IP and port or both source and
destination addresses for identification, though this makes
connections fragile as described in Section 5.1.
Endpoints can send a Stateless Reset (Section 10.4) for any packets Endpoints can send a Stateless Reset (Section 10.4) for any packets
that cannot be attributed to an existing connection. A stateless that cannot be attributed to an existing connection. A stateless
reset allows a peer to more quickly identify when a connection reset allows a peer to more quickly identify when a connection
becomes unusable. becomes unusable.
Packets that are matched to an existing connection are discarded if Packets that are matched to an existing connection are discarded if
the packets are inconsistent with the state of that connection. For the packets are inconsistent with the state of that connection. For
example, packets are discarded if they indicate a different protocol example, packets are discarded if they indicate a different protocol
version than that of the connection, or if the removal of packet version than that of the connection, or if the removal of packet
skipping to change at page 29, line 23 skipping to change at page 31, line 30
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 not able to send Handshake packets prior to packet. Clients are not able to send Handshake packets prior to
receiving a server response, so servers SHOULD ignore any such 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.
5.3. Life of a QUIC Connection 5.3. Life of a QUIC Connection
TBD. A QUIC connection is a stateful interaction between a client and
server, the primary purpose of which is to support the exchange of
data by an application protocol. Streams (Section 2) are the primary
means by which an application protocol exchanges information.
Each connection starts with a handshake phase, during which client
and server establish a shared secret using the cryptographic
handshake protocol [QUIC-TLS] and negotiate the application protocol.
The handshake (Section 7) confirms that both endpoints are willing to
communicate (Section 8.1) and establishes parameters for the
connection (Section 7.3).
An application protocol can also operate in a limited fashion during
the handshake phase. 0-RTT allows application messages to be sent by
a client before receiving any messages from the server. However,
0-RTT lacks certain key security guarantees. In particular, there is
no protection against replay attacks in 0-RTT; see [QUIC-TLS].
Separately, a server can also send application data to a client
before it receives the final cryptographic handshake messages that
allow it to confirm the identity and liveness of the client. These
capabilities allow an application protocol to offer the option to
trade some security guarantees for reduced latency.
The use of connection IDs (Section 5.1) allows connections to migrate
to a new network path, both as a direct choice of an endpoint and
when forced by a change in a middlebox. Section 9 describes
mitigations for the security and privacy issues associated with
migration.
For connections that are no longer needed or desired, there are
several ways for a client and server to terminate a connection
(Section 10).
5.4. Required Operations on Connections 5.4. Required Operations on Connections
There are certain operations which an application MUST be able to There are certain operations which an application MUST be able to
perform when interacting with the QUIC transport. This document does perform when interacting with the QUIC transport. This document does
not specify an API, but any implementation of this version of QUIC not specify an API, but any implementation of this version of QUIC
MUST expose the ability to perform the operations described in this MUST expose the ability to perform the operations described in this
section on a QUIC connection. section on a QUIC connection.
When implementing the client role, applications need to be able to: When implementing the client role, applications need to be able to:
o open a connection, which begins the exchange described in * open a connection, which begins the exchange described in
Section 7; Section 7;
o enable 0-RTT when available; and * enable 0-RTT when available; and
o be informed when 0-RTT has been accepted or rejected by a server. * be informed when 0-RTT has been accepted or rejected by a server.
When implementing the server role, applications need to be able to: When implementing the server role, applications need to be able to:
o listen for incoming connections, which prepares for the exchange * listen for incoming connections, which prepares for the exchange
described in Section 7; described in Section 7;
o if Early Data is supported, embed application-controlled data in * if Early Data is supported, embed application-controlled data in
the TLS resumption ticket sent to the client; and the TLS resumption ticket sent to the client; and
o if Early Data is supported, retrieve application-controlled data * if Early Data is supported, retrieve application-controlled data
from the client's resumption ticket and enable rejecting Early from the client's resumption ticket and enable rejecting Early
Data based on that information. Data based on that information.
In either role, applications need to be able to: In either role, applications need to be able to:
o configure minimum values for the initial number of permitted * configure minimum values for the initial number of permitted
streams of each type, as communicated in the transport parameters streams of each type, as communicated in the transport parameters
(Section 7.3); (Section 7.3);
o control resource allocation of various types, including flow * control resource allocation of various types, including flow
control and the number of permitted streams of each type; control and the number of permitted streams of each type;
o identify whether the handshake has completed successfully or is * identify whether the handshake has completed successfully or is
still ongoing still ongoing
o keep a connection from silently closing, either by generating PING * keep a connection from silently closing, either by generating PING
frames (Section 19.2) or by requesting that the transport send frames (Section 19.2) or by requesting that the transport send
additional frames before the idle timeout expires (Section 10.2); additional frames before the idle timeout expires (Section 10.2);
and and
o immediately close (Section 10.3) the connection. * immediately close (Section 10.3) the connection.
6. Version Negotiation 6. 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 5.2 for details. new connection; see Section 5.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
skipping to change at page 31, line 22 skipping to change at page 34, line 16
When a client receives a Version Negotiation packet, it MUST abandon When a client receives a Version Negotiation packet, it MUST abandon
the current connection attempt. Version Negotiation packets are the current connection attempt. Version Negotiation packets are
designed to allow future versions of QUIC to negotiate the version in designed to allow future versions of QUIC to negotiate the version in
use between endpoints. Future versions of QUIC might change how use between endpoints. Future versions of QUIC might change how
implementations that support multiple versions of QUIC react to implementations that support multiple versions of QUIC react to
Version Negotiation packets when attempting to establish a connection Version Negotiation packets when attempting to establish a connection
using this version. How to perform version negotiation is left as using this version. How to perform version negotiation is left as
future work defined by future versions of QUIC. In particular, that future work defined by future versions of QUIC. In particular, that
future work will need to ensure robustness against version downgrade future work will need to ensure robustness against version downgrade
attacks Section 21.10. attacks; see Section 21.10.
6.2.1. Version Negotiation Between Draft Versions 6.2.1. Version Negotiation Between Draft Versions
[[RFC editor: please remove this section before publication.]] [[RFC editor: please remove this section before publication.]]
When a draft implementation receives a Version Negotiation packet, it When a draft implementation receives a Version Negotiation packet, it
MAY use it to attempt a new connection with one of the versions MAY use it to attempt a new connection with one of the versions
listed in the packet, instead of abandoning the current connection listed in the packet, instead of abandoning the current connection
attempt Section 6.2. attempt; see Section 6.2.
The client MUST check that the Destination and Source Connection ID The client MUST check that the Destination and Source Connection ID
fields match the Source and Destination Connection ID fields in a fields match the Source and Destination Connection ID fields in a
packet that the client sent. If this check fails, the packet MUST be packet that the client sent. If this check fails, the packet MUST be
discarded. 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 new provided by the server. The client then attempts to create a new
connection using that version. The new connection MUST use a new connection using that version. The new connection MUST use a new
skipping to change at page 32, line 28 skipping to change at page 35, line 23
frame Section 19.6 to transmit the cryptographic handshake. Version frame Section 19.6 to transmit the cryptographic handshake. Version
0x00000001 of QUIC uses TLS as described in [QUIC-TLS]; a different 0x00000001 of QUIC uses TLS as described in [QUIC-TLS]; a different
QUIC version number could indicate that a different cryptographic QUIC version number could indicate that a different cryptographic
handshake protocol is in use. handshake protocol is in use.
QUIC provides reliable, ordered delivery of the cryptographic QUIC provides reliable, ordered delivery of the cryptographic
handshake data. QUIC packet protection is used to encrypt as much of handshake data. QUIC packet protection is used to encrypt as much of
the handshake protocol as possible. The cryptographic handshake MUST the handshake protocol as possible. The cryptographic handshake MUST
provide the following properties: provide the following properties:
o authenticated key exchange, where * 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 transport parameters of both endpoints, * authenticated values for transport parameters of both endpoints,
and confidentiality protection for server transport parameters and confidentiality protection for server transport parameters
(see Section 7.3) (see Section 7.3)
o authenticated negotiation of an application protocol (TLS uses * authenticated negotiation of an application protocol (TLS uses
ALPN [RFC7301] for this purpose) ALPN [RFC7301] for this purpose)
An endpoint can verify support for Explicit Congestion Notification An endpoint can verify support for Explicit Congestion Notification
(ECN) in the first packets it sends, as described in Section 13.4.2. (ECN) in the first packets it sends, as described in Section 13.4.2.
The CRYPTO frame can be sent in different packet number spaces. The The CRYPTO frame can be sent in different packet number spaces. The
sequence numbers used by CRYPTO frames to ensure ordered delivery of sequence numbers used by CRYPTO frames to ensure ordered delivery of
cryptographic handshake data start from zero in each packet number cryptographic handshake data start from zero in each packet number
space. space.
Endpoints MUST explicitly negotiate an application protocol. This Endpoints MUST explicitly negotiate an application protocol. This
avoids situations where there is a disagreement about the protocol avoids situations where there is a disagreement about the protocol
that is in use. that is in use.
7.1. Example Handshake Flows 7.1. 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. An extension of [QUIC-TLS], but some examples are provided here. An extension of
this exchange to support client address validation is shown in this exchange to support client address validation is shown in
Section 8.1.1. Section 8.1.2.
Once any address validation exchanges are complete, the cryptographic Once any address validation exchanges are 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 17.2.2) and Handshake handshake is carried in Initial (Section 17.2.2) and Handshake
(Section 17.2.4) packets. (Section 17.2.4) packets.
Figure 3 provides an overview of the 1-RTT handshake. Each line Figure 3 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 frames that are typically contained in those first, followed by the frames that are typically contained in those
packets. So, for instance the first packet is of type Initial, with packets. So, for instance the first packet is of type Initial, with
skipping to change at page 37, line 21 skipping to change at page 40, line 7
the values in the ticket and recover the information when accepting the values in the ticket and recover the information when accepting
0-RTT data. A server uses the transport parameters in determining 0-RTT data. A server uses the transport parameters in determining
whether to accept 0-RTT data. whether to accept 0-RTT data.
If 0-RTT data is accepted by the server, the server MUST NOT reduce If 0-RTT data is accepted by the server, the server MUST NOT reduce
any limits or alter any values that might be violated by the client any limits or alter any values that might be violated by the client
with its 0-RTT data. In particular, a server that accepts 0-RTT data with its 0-RTT data. In particular, a server that accepts 0-RTT data
MUST NOT set values for the following parameters (Section 18.2) that MUST NOT set values for the following parameters (Section 18.2) that
are smaller than the remembered value of the parameters. are smaller than the remembered value of the parameters.
o initial_max_data * initial_max_data
o initial_max_stream_data_bidi_local * initial_max_stream_data_bidi_local
o initial_max_stream_data_bidi_remote * initial_max_stream_data_bidi_remote
o initial_max_stream_data_uni * initial_max_stream_data_uni
o initial_max_streams_bidi * initial_max_streams_bidi
o initial_max_streams_uni * initial_max_streams_uni
Omitting or setting a zero value for certain transport parameters can Omitting or setting a zero value for certain transport parameters can
result in 0-RTT data being enabled, but not usable. The applicable result in 0-RTT data being enabled, but not usable. The applicable
subset of transport parameters that permit sending of application subset of transport parameters that permit sending of application
data SHOULD be set to non-zero values for 0-RTT. This includes data SHOULD be set to non-zero values for 0-RTT. This includes
initial_max_data and either initial_max_streams_bidi and initial_max_data and either initial_max_streams_bidi and
initial_max_stream_data_bidi_remote, or initial_max_streams_uni and initial_max_stream_data_bidi_remote, or initial_max_streams_uni and
initial_max_stream_data_uni. initial_max_stream_data_uni.
A server MUST either reject 0-RTT data or abort a handshake if the A server MUST either reject 0-RTT data or abort a handshake if the
skipping to change at page 38, line 17 skipping to change at page 40, line 51
7.3.2. New Transport Parameters 7.3.2. New Transport Parameters
New transport parameters can be used to negotiate new protocol New transport parameters can be used to negotiate new protocol
behavior. An endpoint MUST ignore transport parameters that it does behavior. An endpoint MUST ignore transport parameters that it does
not support. Absence of a transport parameter therefore disables any not support. Absence of a transport parameter therefore disables any
optional protocol feature that is negotiated using the parameter. As optional protocol feature that is negotiated using the parameter. As
described in Section 18.1, some identifiers are reserved in order to described in Section 18.1, some identifiers are reserved in order to
exercise this requirement. exercise this requirement.
New transport parameters can be registered according to the rules in New transport parameters can be registered according to the rules in
Section 22.1. Section 22.2.
7.4. Cryptographic Message Buffering 7.4. Cryptographic Message Buffering
Implementations need to maintain a buffer of CRYPTO data received out Implementations need to maintain a buffer of CRYPTO data received out
of order. Because there is no flow control of CRYPTO frames, an of order. Because there is no flow control of CRYPTO frames, an
endpoint could potentially force its peer to buffer an unbounded endpoint could potentially force its peer to buffer an unbounded
amount of data. amount of data.
Implementations MUST support buffering at least 4096 bytes of data Implementations MUST support buffering at least 4096 bytes of data
received in CRYPTO frames out of order. Endpoints MAY choose to received in CRYPTO frames out of order. Endpoints MAY choose to
skipping to change at page 39, line 49 skipping to change at page 42, line 40
clients SHOULD send a packet upon a probe timeout, as described in clients SHOULD send a packet upon a probe timeout, as described in
[QUIC-RECOVERY]. If the client has no data to retransmit and does [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 not have Handshake keys, it SHOULD send an Initial packet in a UDP
datagram of at least 1200 bytes. If the client has Handshake keys, datagram of at least 1200 bytes. If the client has Handshake keys,
it SHOULD send a Handshake packet. it SHOULD send a Handshake packet.
A server might wish to validate the client address before starting A server might wish to validate the client address before starting
the cryptographic handshake. QUIC uses a token in the Initial packet the cryptographic handshake. QUIC uses a token in the Initial packet
to provide address validation prior to completing the handshake. to provide address validation prior to completing the handshake.
This token is delivered to the client during connection establishment This token is delivered to the client during connection establishment
with a Retry packet (see Section 8.1.1) or in a previous connection with a Retry packet (see Section 8.1.2) or in a previous connection
using the NEW_TOKEN frame (see Section 8.1.2). using the NEW_TOKEN frame (see Section 8.1.3).
In addition to sending limits imposed prior to address validation, In addition to sending limits imposed prior to address validation,
servers are also constrained in what they can send by the limits set servers are also constrained in what they can send by the limits set
by the congestion controller. Clients are only constrained by the by the congestion controller. Clients are only constrained by the
congestion controller. congestion controller.
8.1.1. Address Validation using Retry Packets 8.1.1. Token Construction
A token sent in a NEW_TOKEN frames or a Retry packet MUST be
constructed in a way that allows the server to identity how it was
provided to a client. These tokens are carried in the same field,
but require different handling from servers.
8.1.2. Address Validation using Retry Packets
Upon receiving the client's Initial packet, the server can request Upon receiving the client's Initial packet, the server can request
address validation by sending a Retry packet (Section 17.2.5) address validation by sending a Retry packet (Section 17.2.5)
containing a token. This token MUST be repeated by the client in all containing a token. This token MUST be repeated by the client in all
Initial packets it sends for that connection after it receives the Initial packets it sends for that connection after it receives the
Retry packet. In response to processing an Initial containing a Retry packet. In response to processing an Initial containing a
token, a server can either abort the connection or permit it to token, a server can either abort the connection or permit it to
proceed. proceed.
As long as it is not possible for an attacker to generate a valid As long as it is not possible for an attacker to generate a valid
token for its own address (see Section 8.1.3) and the client is able token for its own address (see Section 8.1.4) and the client is able
to return that token, it proves to the server that it received the to return that token, it proves to the server that it received the
token. token.
A server can also use a Retry packet to defer the state and A server can also use a Retry packet to defer the state and
processing costs of connection establishment. Requiring the server processing costs of connection establishment. Requiring the server
to provide a different connection ID, along with the to provide a different connection ID, along with the
original_connection_id transport parameter defined in Section 18.2, original_connection_id transport parameter defined in Section 18.2,
forces the server to demonstrate that it, or an entity it cooperates forces the server to demonstrate that it, or an entity it cooperates
with, received the original Initial packet from the client. with, received the original Initial packet from the client.
Providing a different connection ID also grants a server some control Providing a different connection ID also grants a server some control
over how subsequent packets are routed. This can be used to direct over how subsequent packets are routed. This can be used to direct
connections to a different server instance. connections to a different server instance.
If a server receives a client Initial that can be unprotected but
contains an invalid Retry token, it knows the client will not accept
another Retry token. The server can discard such a packet and allow
the client to time out to detect handshake failure, but that could
impose a significant latency penalty on the client. A server MAY
proceed with the connection without verifying the token, though the
server MUST NOT consider the client address validated. If a server
chooses not to proceed with the handshake, it SHOULD immediately
close (Section 10.3) the connection with an INVALID_TOKEN error.
Note that a server has not established any state for the connection
at this point and so does not enter the closing period.
A flow showing the use of a Retry packet is shown in Figure 5. A flow showing the use of a Retry packet is shown in Figure 5.
Client Server Client Server
Initial[0]: CRYPTO[CH] -> Initial[0]: CRYPTO[CH] ->
<- Retry+Token <- Retry+Token
Initial+Token[1]: CRYPTO[CH] -> Initial+Token[1]: CRYPTO[CH] ->
Initial[0]: CRYPTO[SH] ACK[1] Initial[0]: CRYPTO[SH] ACK[1]
Handshake[0]: CRYPTO[EE, CERT, CV, FIN] Handshake[0]: CRYPTO[EE, CERT, CV, FIN]
<- 1-RTT[0]: STREAM[1, "..."] <- 1-RTT[0]: STREAM[1, "..."]
Figure 5: Example Handshake with Retry Figure 5: Example Handshake with Retry
8.1.2. Address Validation for Future Connections 8.1.3. Address Validation for Future Connections
A server MAY provide clients with an address validation token during A server MAY provide clients with an address validation token during
one connection that can be used on a subsequent connection. Address one connection that can be used on a subsequent connection. Address
validation is especially important with 0-RTT because a server validation is especially important with 0-RTT because a server
potentially sends a significant amount of data to a client in potentially sends a significant amount of data to a client in
response to 0-RTT data. response to 0-RTT data.
The server uses the NEW_TOKEN frame Section 19.7 to provide the The server uses the NEW_TOKEN frame Section 19.7 to provide the
client with an address validation token that can be used to validate client with an address validation token that can be used to validate
future connections. The client includes this token in Initial future connections. The client includes this token in Initial
packets to provide address validation in a future connection. The packets to provide address validation in a future connection. The
client MUST include the token in all Initial packets it sends, unless client MUST include the token in all Initial packets it sends, unless
a Retry replaces the token with a newer one. The client MUST NOT use a Retry replaces the token with a newer one. The client MUST NOT use
the token provided in a Retry for future connections. Servers MAY the token provided in a Retry for future connections. Servers MAY
discard any Initial packet that does not carry the expected token. discard any Initial packet that does not carry the expected token.
A token SHOULD be constructed in a way that allows the server to
distinguish it from tokens that are sent in Retry packets as they are
carried in the same field.
The token MUST NOT include information that would allow it to be
linked by an on-path observer to the connection on which it was
issued. For example, it cannot include the connection ID or
addressing information unless the values are encrypted.
Unlike the token that is created for a Retry packet, there might be Unlike the token that is created for a Retry packet, there might be
some time between when the token is created and when the token is some time between when the token is created and when the token is
subsequently used. Thus, a token SHOULD have an expiration time, subsequently used. Thus, a token SHOULD have an expiration time,
which could be either an explicit expiration time or an issued which could be either an explicit expiration time or an issued
timestamp that can be used to dynamically calculate the expiration timestamp that can be used to dynamically calculate the expiration
time. A server can store the expiration time or include it in an time. A server can store the expiration time or include it in an
encrypted form in the token. encrypted form in the token.
A token issued with NEW_TOKEN MUST NOT include information that would
allow values to be linked by an on-path observer to the connection on
which it was issued, unless the values are encrypted. For example,
it cannot include the previous connection ID or addressing
information. A server MUST ensure that every NEW_TOKEN frame it
sends is unique across all clients, with the exception of those sent
to repair losses of previously sent NEW_TOKEN frames. Information
that allows the server to distinguish between tokens from Retry and
NEW_TOKEN MAY be accessible to entities other than the server.
It is unlikely that the client port number is the same on two It is unlikely that the client port number is the same on two
different connections; validating the port is therefore unlikely to different connections; validating the port is therefore unlikely to
be successful. be successful.
If the client has a token received in a NEW_TOKEN frame on a previous A token received in a NEW_TOKEN frame is applicable to any server
connection to what it believes to be the same server, it SHOULD that the connection is considered authoritative for (e.g., server
include that value in the Token field of its Initial packet. names included in the certificate). When connecting to a server for
which the client retains an applicable and unused token, it SHOULD
include that token in the Token field of its Initial packet.
Including a token might allow the server to validate the client Including a token might allow the server to validate the client
address without an additional round trip. address without an additional round trip. A client MUST NOT include
a token that is not applicable to the server that it is connecting
to, unless the client has the knowledge that the server that issued
the token and the server the client is connecting to are jointly
managing the tokens. A client MAY use a token from any previous
connection to that server.
A token allows a server to correlate activity between the connection A token allows a server to correlate activity between the connection
where the token was issued and any connection where it is used. where the token was issued and any connection where it is used.
Clients that want to break continuity of identity with a server MAY Clients that want to break continuity of identity with a server MAY
discard tokens provided using the NEW_TOKEN frame. A token obtained discard tokens provided using the NEW_TOKEN frame. In comparison, a
in a Retry packet MUST be used immediately during the connection token obtained in a Retry packet MUST be used immediately during the
attempt and cannot be used in subsequent connection attempts. connection attempt and cannot be used in subsequent connection
attempts.
A client SHOULD NOT reuse a token in different connections. Reusing A client SHOULD NOT reuse a NEW_TOKEN token for different connection
a token allows connections to be linked by entities on the network attempts. Reusing a token allows connections to be linked by
path; see Section 9.5. A client MUST NOT reuse a token if it entities on the network path; see Section 9.5. A client MUST NOT
believes that its point of network attachment has changed since the reuse a token if it believes that its point of network attachment has
token was last used; that is, if there is a change in its local IP changed since the token was last used; that is, if there is a change
address or network interface. A client needs to start the connection in its local IP address or network interface. A client needs to
process over if there is any change in its local address prior to start the connection process over if there is any change in its local
completing the handshake. address prior to completing the handshake.
Clients might receive multiple tokens on a single connection. Aside Clients might receive multiple tokens on a single connection. Aside
from preventing linkability, any token can be used in any connection from preventing linkability, any token can be used in any connection
attempt. Servers can send additional tokens to either enable address attempt. Servers can send additional tokens to either enable address
validation for multiple connection attempts or to replace older validation for multiple connection attempts or to replace older
tokens that might become invalid. For a client, this ambiguity means tokens that might become invalid. For a client, this ambiguity means
that sending the most recent unused token is most likely to be that sending the most recent unused token is most likely to be
effective. Though saving and using older tokens has no negative effective. Though saving and using older tokens has no negative
consequences, clients can regard older tokens as being less likely be consequences, clients can regard older tokens as being less likely be
useful to the server for address validation. useful to the server for address validation.
skipping to change at page 43, line 5 skipping to change at page 46, line 25
In a stateless design, a server can use encrypted and authenticated In a stateless design, a server can use encrypted and authenticated
tokens to pass information to clients that the server can later tokens to pass information to clients that the server can later
recover and use to validate a client address. Tokens are not recover and use to validate a client address. Tokens are not
integrated into the cryptographic handshake and so they are not integrated into the cryptographic handshake and so they are not
authenticated. For instance, a client might be able to reuse a authenticated. For instance, a client might be able to reuse a
token. To avoid attacks that exploit this property, a server can token. To avoid attacks that exploit this property, a server can
limit its use of tokens to only the information needed to validate limit its use of tokens to only the information needed to validate
client addresses. client addresses.
Clients MAY use tokens obtained on one connection for any connection
attempt using the same version. When selecting a token to use,
clients do not need to consider other properties of the connection
that is being attempted, including the choice of possible application
protocols, session tickets, or other connection properties.
Attackers could replay tokens to use servers as amplifiers in DDoS Attackers could replay tokens to use servers as amplifiers in DDoS
attacks. To protect against such attacks, servers SHOULD ensure that attacks. To protect against such attacks, servers SHOULD ensure that
tokens sent in Retry packets are only accepted for a short time. tokens sent in Retry packets are only accepted for a short time.
Tokens that are provided in NEW_TOKEN frames (see Section 19.7) need Tokens that are provided in NEW_TOKEN frames (see Section 19.7) need
to be valid for longer, but SHOULD NOT be accepted multiple times in to be valid for longer, but SHOULD NOT be accepted multiple times in
a short period. Servers are encouraged to allow tokens to be used a short period. Servers are encouraged to allow tokens to be used
only once, if possible. only once, if possible.
8.1.3. Address Validation Token Integrity 8.1.4. Address Validation Token Integrity
An address validation token MUST be difficult to guess. Including a An address validation token MUST be difficult to guess. Including a
large enough random value in the token would be sufficient, but this large enough random value in the token would be sufficient, but this
depends on the server remembering the value it sends to clients. depends on the server remembering the value it sends to clients.
A token-based scheme allows the server to offload any state A token-based scheme allows the server to offload any state
associated with validation to the client. For this design to work, associated with validation to the client. For this design to work,
the token MUST be covered by integrity protection against the token MUST be covered by integrity protection against
modification or falsification by clients. Without integrity modification or falsification by clients. Without integrity
protection, malicious clients could generate or guess values for protection, malicious clients could generate or guess values for
skipping to change at page 46, line 46 skipping to change at page 50, line 25
9.1. Probing a New Path 9.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 8.2 prior to migrating the connection using path validation Section 8.2 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 9.5 for further discussion. An endpoint that address; see Section 9.5 for further discussion. An endpoint that
uses a new local address needs to ensure that at least one new 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 connection ID is available at the peer. That can be achieved by
including a NEW_CONNECTION_ID frame in the probe. 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 8.2. PATH_RESPONSE in response as per Section 8.2.
PATH_CHALLENGE, PATH_RESPONSE, NEW_CONNECTION_ID, and PADDING frames PATH_CHALLENGE, PATH_RESPONSE, NEW_CONNECTION_ID, and PADDING frames
are "probing frames", and all other frames are "non-probing frames". are "probing frames", and all other frames are "non-probing frames".
skipping to change at page 47, line 52 skipping to change at page 51, line 30
frame indicates that the peer has migrated to that address. frame indicates that the peer has migrated to that address.
In response to such a packet, an endpoint MUST start sending In response to such a packet, an endpoint MUST start sending
subsequent packets to the new peer address and MUST initiate path subsequent packets to the new peer address and MUST initiate path
validation (Section 8.2) to verify the peer's ownership of the validation (Section 8.2) to verify the peer's ownership of the
unvalidated address. unvalidated address.
An endpoint MAY send data to an unvalidated peer address, but it MUST An endpoint MAY send data to an unvalidated peer address, but it MUST
protect against potential attacks as described in Section 9.3.1 and protect against potential attacks as described in Section 9.3.1 and
Section 9.3.2. An endpoint MAY skip validation of a peer address if Section 9.3.2. An endpoint MAY skip validation of a peer address if
that address has been seen recently. that address has been seen recently. In particular, if an endpoint
returns to a previously-validated path after detecting some form of
spurious migration, skipping address validation and restoring loss
detection and congestion state can reduce the performance impact of
the attack.
An endpoint only changes the address that it sends packets to in An endpoint only changes the address that it sends packets to in
response to the highest-numbered non-probing packet. This ensures response to the highest-numbered non-probing packet. This ensures
that an endpoint does not send packets to an old peer address in the that an endpoint does not send packets to an old peer address in the
case that it receives reordered packets. case that it receives reordered packets.
After changing the address to which it sends non-probing packets, an After changing the address to which it sends non-probing packets, an
endpoint could abandon any path validation for other addresses. endpoint could abandon any path validation for other addresses.
Receiving a packet from a new peer address might be the result of a Receiving a packet from a new peer address might be the result of a
skipping to change at page 50, line 24 skipping to change at page 54, line 12
An endpoint could also use heuristics to improve detection of this An endpoint could also use heuristics to improve detection of this
style of attack. For instance, NAT rebinding is improbable if style of attack. For instance, NAT rebinding is improbable if
packets were recently received on the old path, similarly rebinding packets were recently received on the old path, similarly rebinding
is rare on IPv6 paths. Endpoints can also look for duplicated is rare on IPv6 paths. Endpoints can also look for duplicated
packets. Conversely, a change in connection ID is more likely to packets. Conversely, a change in connection ID is more likely to
indicate an intentional migration rather than an attack. indicate an intentional migration rather than an attack.
9.4. Loss Detection and Congestion Control 9.4. Loss Detection and Congestion Control
The capacity available on the new path might not be the same as the The capacity available on the new path might not be the same as the
old path. Packets sent on the old path SHOULD NOT contribute to old path. Packets sent on the old path MUST NOT contribute to
congestion control or RTT estimation for the new path. congestion control or RTT estimation for the new path.
On confirming a peer's ownership of its new address, an endpoint MUST On confirming a peer's ownership of its new address, an endpoint MUST
immediately reset the congestion controller and round-trip time immediately reset the congestion controller and round-trip time
estimator for the new path to initial values (see Sections A.3 and estimator for the new path to initial values (see Sections A.3 and
B.3 in [QUIC-RECOVERY]) unless it has knowledge that a previous send B.3 in [QUIC-RECOVERY]) unless it has knowledge that a previous send
rate or round-trip time estimate is valid for the new path. For rate or round-trip time estimate is valid for the new path. For
instance, an endpoint might infer that a change in only the client's instance, an endpoint might infer that a change in only the client's
port number is indicative of a NAT rebinding, meaning that the new port number is indicative of a NAT rebinding, meaning that the new
path is likely to have similar bandwidth and round-trip time. path is likely to have similar bandwidth and round-trip time.
skipping to change at page 54, line 31 skipping to change at page 58, line 31
A possible implementation is to compute the flow label as a A possible implementation is to compute the flow label as a
cryptographic hash function of the source and destination addresses, cryptographic hash function of the source and destination addresses,
source and destination UDP ports, destination CID, and a local source and destination UDP ports, destination CID, and a local
secret. secret.
10. Connection Termination 10. Connection Termination
An established QUIC connection can be terminated in one of three An established QUIC connection can be terminated in one of three
ways: ways:
o idle timeout (Section 10.2) * idle timeout (Section 10.2)
o immediate close (Section 10.3) * immediate close (Section 10.3)
o stateless reset (Section 10.4) * stateless reset (Section 10.4)
An endpoint MAY discard connection state if it does not have a An endpoint MAY discard connection state if it does not have a
validated path on which it can send packets (see Section 8.2). validated path on which it can send packets (see Section 8.2).
10.1. Closing and Draining Connection States 10.1. Closing and Draining Connection States
The closing and draining connection states exist to ensure that The closing and draining connection states exist to ensure that
connections close cleanly and that delayed or reordered packets are connections close cleanly and that delayed or reordered packets are
properly discarded. These states SHOULD persist for at least three properly discarded. These states SHOULD persist for at least three
times the current Probe Timeout (PTO) interval as defined in times the current Probe Timeout (PTO) interval as defined in
skipping to change at page 56, line 7 skipping to change at page 60, line 7
While in the closing period, an endpoint could receive packets from a While in the closing period, an endpoint could receive packets from a
new source address, indicating a connection migration (Section 9). new source address, indicating a connection migration (Section 9).
An endpoint in the closing state MUST strictly limit the number of An endpoint in the closing state MUST strictly limit the number of
packets it sends to this new address until the address is validated packets it sends to this new address until the address is validated
(see Section 8.2). A server in the closing state MAY instead choose (see Section 8.2). A server in the closing state MAY instead choose
to discard packets received from a new source address. to discard packets received from a new source address.
10.2. Idle Timeout 10.2. Idle Timeout
If the idle timeout is enabled, a connection is silently closed and If the idle timeout is enabled by either peer, a connection is
the state is discarded when it remains idle for longer than both the silently closed and its state is discarded when it remains idle for
advertised idle timeout (see Section 18.2) and three times the longer than the minimum of the max_idle_timeouts (see Section 18.2)
current Probe Timeout (PTO). and three times the current Probe Timeout (PTO).
Each endpoint advertises its own idle timeout to its peer. An Each endpoint advertises a max_idle_timeout, but the effective value
endpoint restarts any timer it maintains when a packet from its peer at an endpoint is computed as the minimum of the two advertised
is received and processed successfully. The timer is also restarted values. By announcing a max_idle_timeout, an endpoint commits to
when sending an ack-eliciting packet (see [QUIC-RECOVERY]), but only initiating an immediate close (Section 10.3) if it abandons the
if no other ack-eliciting packets have been sent since last receiving connection prior to the effective value.
a packet. Restarting when sending packets ensures that connections
do not prematurely time out when initiating new activity.
The value for an idle timeout can be asymmetric. The value An endpoint restarts its idle timer when a packet from its peer is
advertised by an endpoint is only used to determine whether the received and processed successfully. The idle timer is also
connection is live at that endpoint. An endpoint that sends packets restarted when sending an ack-eliciting packet (see [QUIC-RECOVERY]),
near the end of the idle timeout period of a peer risks having those but only if no other ack-eliciting packets have been sent since last
packets discarded if its peer enters the draining state before the receiving a packet. Restarting when sending packets ensures that
packets arrive. If a peer could timeout within a Probe Timeout (PTO; connections do not prematurely time out when initiating new activity.
see Section 6.3 of [QUIC-RECOVERY]), it is advisable to test for An endpoint might need to send packets to avoid an idle timeout if it
liveness before sending any data that cannot be retried safely. Note is unable to send application data due to being blocked on flow
that it is likely that only applications or application protocols control limits; see Section 4.
will know what information can be retried.
An endpoint that sends packets near the end of the idle timeout
period risks having those packets discarded if its peer enters the
draining state before the packets arrive. If a peer could time out
within a Probe Timeout (PTO; see Section 6.2.2 of [QUIC-RECOVERY]),
it is advisable to test for liveness before sending any data that
cannot be retried safely. Note that it is likely that only
applications or application protocols will know what information can
be retried.
10.3. Immediate Close 10.3. Immediate Close
An endpoint sends a CONNECTION_CLOSE frame (Section 19.19) to An endpoint sends a CONNECTION_CLOSE frame (Section 19.19) to
terminate the connection immediately. A CONNECTION_CLOSE frame terminate the connection immediately. A CONNECTION_CLOSE frame
causes all streams to immediately become closed; open streams can be causes all streams to immediately become closed; open streams can be
assumed to be implicitly reset. assumed to be implicitly reset.
After sending a CONNECTION_CLOSE frame, endpoints immediately enter After sending a CONNECTION_CLOSE frame, an endpoint immediately
the closing state. During the closing period, an endpoint that sends enters the closing state.
a CONNECTION_CLOSE frame SHOULD respond to any packet that it
receives with another packet containing a CONNECTION_CLOSE frame. To During the closing period, an endpoint that sends a CONNECTION_CLOSE
minimize the state that an endpoint maintains for a closing frame SHOULD respond to any incoming packet that can be decrypted
connection, endpoints MAY send the exact same packet. However, with another packet containing a CONNECTION_CLOSE frame. Such an
endpoints SHOULD limit the number of packets they generate containing endpoint SHOULD limit the number of packets it generates containing a
a CONNECTION_CLOSE frame. For instance, an endpoint could CONNECTION_CLOSE frame. For instance, an endpoint could wait for a
progressively increase the number of packets that it receives before progressively increasing number of received packets or amount of time
sending additional packets or increase the time between packets. before responding to a received packet.
An endpoint is allowed to drop the packet protection keys when
entering the closing period (Section 10.1) and send a packet
containing a CONNECTION_CLOSE in response to any UDP datagram that is
received. However, an endpoint without the packet protection keys
cannot identify and discard invalid packets. To avoid creating an
unwitting amplification attack, such endpoints MUST reduce the
frequency with which it sends packets containing a CONNECTION_CLOSE
frame. To minimize the state that an endpoint maintains for a
closing connection, endpoints MAY send the exact same packet.
Note: Allowing retransmission of a closing packet contradicts other Note: Allowing retransmission of a closing packet contradicts other
advice in this document that recommends the creation of new packet advice in this document that recommends the creation of new packet
numbers for every packet. Sending new packet numbers is primarily numbers for every packet. Sending new packet numbers is primarily
of advantage to loss recovery and congestion control, which are of advantage to loss recovery and congestion control, which are
not expected to be relevant for a closed connection. not expected to be relevant for a closed connection.
Retransmitting the final packet requires less state. Retransmitting the final packet requires less state.
New packets from unverified addresses could be used to create an New packets from unverified addresses could be used to create an
amplification attack (see Section 8). To avoid this, endpoints MUST amplification attack (see Section 8). To avoid this, endpoints MUST
skipping to change at page 57, line 34 skipping to change at page 61, line 51
protocols negotiates a graceful shutdown. The application protocol protocols negotiates a graceful shutdown. The application protocol
exchanges whatever messages that are needed to cause both endpoints exchanges whatever messages that are needed to cause both endpoints
to agree to close the connection, after which the application to agree to close the connection, after which the application
requests that the connection be closed. The application protocol can requests that the connection be closed. The application protocol can
use a CONNECTION_CLOSE frame with an appropriate error code to signal use a CONNECTION_CLOSE frame with an appropriate error code to signal
closure. closure.
When sending CONNECTION_CLOSE, the goal is to ensure that the peer When sending CONNECTION_CLOSE, the goal is to ensure that the peer
will process the frame. Generally, this means sending the frame in a will process the frame. Generally, this means sending the frame in a
packet with the highest level of packet protection to avoid the packet with the highest level of packet protection to avoid the
packet being discarded. However, during the handshake, it is packet being discarded. After the handshake is confirmed (see
possible that more advanced packet protection keys are not available Section 4.1.2 of [QUIC-TLS]), an endpoint MUST send any
to the peer, so the frame MAY be replicated in a packet that uses a CONNECTION_CLOSE frames in a 1-RTT packet. However, prior to
lower packet protection level. confirming the handshake, it is possible that more advanced packet
protection keys are not available to the peer, so the frame MAY be
After the handshake is confirmed, an endpoint MUST send any replicated in a packet that uses a lower packet protection level.
CONNECTION_CLOSE frames in a 1-RTT packet. Prior to handshake
confirmation, the peer might not have 1-RTT keys, so the endpoint
SHOULD send CONNECTION_CLOSE frames in a Handshake packet. If the
endpoint does not have Handshake keys, it SHOULD send
CONNECTION_CLOSE frames in an Initial packet.
A client will always know whether the server has Handshake keys (see A client will always know whether the server has Handshake keys (see
Section 17.2.2.1), but it is possible that a server does not know Section 17.2.2.1), but it is possible that a server does not know
whether the client has Handshake keys. Under these circumstances, a whether the client has Handshake keys. Under these circumstances, a
server SHOULD send a CONNECTION_CLOSE frame in both Handshake and server SHOULD send a CONNECTION_CLOSE frame in both Handshake and
Initial packets to ensure that at least one of them is processable by Initial packets to ensure that at least one of them is processable by
the client. These packets can be coalesced into a single UDP the client. Similarly, a peer might be unable to read 1-RTT packets,
datagram (see Section 12.2). so an endpoint SHOULD send CONNECTION_CLOSE in Handshake and 1-RTT
packets prior to confirming the handshake. These packets can be
coalesced into a single UDP datagram; see Section 12.2.
10.4. Stateless Reset 10.4. Stateless Reset
A stateless reset is provided as an option of last resort for an A stateless reset is provided as an option of last resort for an
endpoint that does not have access to the state of a connection. A endpoint that does not have access to the state of a connection. A
crash or outage might result in peers continuing to send data to an crash or outage might result in peers continuing to send data to an
endpoint that is unable to properly continue the connection. An endpoint that is unable to properly continue the connection. An
endpoint MAY send a stateless reset in response to receiving a packet endpoint MAY send a stateless reset in response to receiving a packet
that it cannot associate with an active connection. that it cannot associate with an active connection.
skipping to change at page 58, line 48 skipping to change at page 63, line 19
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
+ + + +
| | | |
+ Stateless Reset Token (128) + + Stateless Reset Token (128) +
| | | |
+ + + +
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 6: Stateless Reset Packet Figure 6: Stateless Reset Packet
This design ensures that a stateless reset packet is - to the extent This design ensures that a stateless reset packet is - to the extent
possible - indistinguishable from a regular packet with a short possible - indistinguishable from a regular packet with a short
header. header.
A stateless reset uses an entire UDP datagram, starting with the A stateless reset uses an entire UDP datagram, starting with the
first two bits of the packet header. The remainder of the first byte first two bits of the packet header. The remainder of the first byte
and an arbitrary number of bytes following it that are set to and an arbitrary number of bytes following it that are set to
unpredictable values. The last 16 bytes of the datagram contain a unpredictable values. The last 16 bytes of the datagram contain a
Stateless Reset Token. Stateless Reset Token.
skipping to change at page 60, line 21 skipping to change at page 64, line 38
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 19.15). provided using a NEW_CONNECTION_ID frame (Section 19.15).
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 * 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 10.4.3. A another Stateless Reset in response; see Section 10.4.3. A
Stateless Reset that is not correctly routed is an ineffective Stateless Reset that is not correctly routed is an ineffective
error detection and recovery mechanism. In this case, endpoints error detection and recovery mechanism. In this case, endpoints
will need to rely on other methods - such as timers - to detect will need to rely on other methods - such as timers - to detect
that the connection has failed. that the connection has failed.
o The randomly generated connection ID can be used by entities other * The randomly generated connection ID can be used by entities other
than the peer to identify this as a potential stateless reset. An than the peer to identify this as a potential stateless reset. An
endpoint that occasionally uses different connection IDs might endpoint that occasionally uses different connection IDs might
introduce some uncertainty about this. introduce some uncertainty about this.
This stateless reset design is specific to QUIC version 1. An This stateless reset design is specific to QUIC version 1. An
endpoint that supports multiple versions of QUIC needs to generate a endpoint that supports multiple versions of QUIC needs to generate a
stateless reset that will be accepted by peers that support any stateless reset that will be accepted by peers that support any
version that the endpoint might support (or might have supported version that the endpoint might support (or might have supported
prior to losing state). Designers of new versions of QUIC need to be prior to losing state). Designers of new versions of QUIC need to be
aware of this and either reuse this design, or use a portion of the aware of this and either reuse this design, or use a portion of the
skipping to change at page 64, line 24 skipping to change at page 68, line 38
connection. Limiting the number of retransmissions and the time over connection. Limiting the number of retransmissions and the time over
which this final packet is sent limits the effort expended on which this final packet is sent limits the effort expended on
terminated connections. terminated connections.
An endpoint that chooses not to retransmit packets containing a An endpoint that chooses not to retransmit packets containing a
CONNECTION_CLOSE frame risks a peer missing the first such packet. CONNECTION_CLOSE frame risks a peer missing the first such packet.
The only mechanism available to an endpoint that continues to receive The only mechanism available to an endpoint that continues to receive
data for a terminated connection is to use the stateless reset data for a terminated connection is to use the stateless reset
process (Section 10.4). process (Section 10.4).
An endpoint that receives an invalid CONNECTION_CLOSE frame MUST NOT
signal the existence of the error to its peer.
11.2. Stream Errors 11.2. Stream Errors
If an application-level error affects a single stream, but otherwise If an application-level error affects a single stream, but otherwise
leaves the connection in a recoverable state, the endpoint can send a leaves the connection in a recoverable state, the endpoint can send a
RESET_STREAM frame (Section 19.4) with an appropriate error code to RESET_STREAM frame (Section 19.4) with an appropriate error code to
terminate just the affected stream. terminate just the affected stream.
RESET_STREAM MUST be instigated by the protocol using QUIC. Resetting a stream without the involvement of the application
RESET_STREAM carries an application error code. Only the application protocol could cause the application protocol to enter an
protocol is able to cause a stream to be terminated. A local unrecoverable state. RESET_STREAM MUST only be instigated by the
instance of the application protocol uses a direct API call and a application protocol that uses QUIC.
remote instance uses the STOP_SENDING frame, which triggers an
RESET_STREAM carries an application error code, for which the
semantics are defined by the application protocol. Only the
application protocol is able to cause a stream to be terminated. A
local instance of the application protocol uses a direct API call and
a remote instance uses the STOP_SENDING frame, which triggers an
automatic RESET_STREAM. automatic RESET_STREAM.
Resetting a stream without knowledge of the application protocol
could cause the protocol to enter an unrecoverable state.
Application protocols might require certain streams to be reliably
delivered in order to guarantee consistent state between endpoints.
Application protocols SHOULD define rules for handling streams that Application protocols SHOULD define rules for handling streams that
are prematurely cancelled by either endpoint. are prematurely cancelled by either endpoint.
12. Packets and Frames 12. Packets and Frames
QUIC endpoints communicate by exchanging packets. Packets have QUIC endpoints communicate by exchanging packets. Packets have
confidentiality and integrity protection (see Section 12.1) and are confidentiality and integrity protection (see Section 12.1) and are
carried in UDP datagrams (see Section 12.2). carried in UDP datagrams (see Section 12.2).
This version of QUIC uses the long packet header (see Section 17.2) This version of QUIC uses the long packet header (see Section 17.2)
skipping to change at page 65, line 18 skipping to change at page 69, line 30
(Section 17.2.4), and Retry (Section 17.2.5). Version negotiation (Section 17.2.4), and Retry (Section 17.2.5). Version negotiation
uses a version-independent packet with a long header (see uses a version-independent packet with a long header (see
Section 17.2.1). Section 17.2.1).
Packets with the short header (Section 17.3) are designed for minimal Packets with the short header (Section 17.3) are designed for minimal
overhead and are used after a connection is established and 1-RTT overhead and are used after a connection is established and 1-RTT
keys are available. keys are available.
12.1. Protected Packets 12.1. Protected Packets
All QUIC packets except Version Negotiation and Retry packets use All QUIC packets except Version Negotiation packets use authenticated
authenticated encryption with additional data (AEAD) [RFC5116] to encryption with additional data (AEAD) [RFC5116] to provide
provide confidentiality and integrity protection. Details of packet confidentiality and integrity protection. Retry packets use an AEAD
protection are found in [QUIC-TLS]; this section includes an overview to provide integrity protection. Details of packet protection are
of the process. found in [QUIC-TLS]; this section includes an overview of the
process.
Initial packets are protected using keys that are statically derived. Initial packets are protected using keys that are statically derived.
This packet protection is not effective confidentiality protection. This packet protection is not effective confidentiality protection.
Initial protection only exists to ensure that the sender of the Initial protection only exists to ensure that the sender of the
packet is on the network path. Any entity that receives the Initial packet is on the network path. Any entity that receives the Initial
packet from a client can recover the keys necessary to remove packet packet from a client can recover the keys necessary to remove packet
protection or to generate packets that will be successfully protection or to generate packets that will be successfully
authenticated. authenticated.
All other packets are protected with keys derived from the All other packets are protected with keys derived from the
skipping to change at page 67, line 12 skipping to change at page 71, line 27
representable in whole in the Largest Acknowledged field of an ACK representable in whole in the Largest Acknowledged field of an ACK
frame (Section 19.3). When present in a long or short header frame (Section 19.3). When present in a long or short header
however, packet numbers are reduced and encoded in 1 to 4 bytes (see however, packet numbers are reduced and encoded in 1 to 4 bytes (see
Section 17.1). Section 17.1).
Version Negotiation (Section 17.2.1) and Retry (Section 17.2.5) Version Negotiation (Section 17.2.1) and Retry (Section 17.2.5)
packets do not include a packet number. packets do not include a packet number.
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 17.2.2) are in this * Initial space: All Initial packets (Section 17.2.2) are in this
space. space.
o Handshake space: All Handshake packets (Section 17.2.4) are in * Handshake space: All Handshake packets (Section 17.2.4) are in
this space. this space.
o Application data space: All 0-RTT and 1-RTT encrypted packets * Application data space: All 0-RTT and 1-RTT encrypted packets
(Section 12.1) are in this space. (Section 12.1) are in this space.
As described in [QUIC-TLS], each packet type uses different As described in [QUIC-TLS], each packet type uses different
protection keys. protection keys.
Conceptually, a packet number space is the context in which a packet Conceptually, a packet number space is the context in which a packet
can be processed and acknowledged. Initial packets can only be sent can be processed and acknowledged. Initial packets can only be sent
with Initial packet protection keys and acknowledged in packets which with Initial packet protection keys and acknowledged in packets which
are also Initial packets. Similarly, Handshake packets are sent at are also Initial packets. Similarly, Handshake packets are sent at
the Handshake encryption level and can only be acknowledged in the Handshake encryption level and can only be acknowledged in
skipping to change at page 68, line 29 skipping to change at page 72, line 45
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Frame 1 (*) ... | Frame 1 (*) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Frame 2 (*) ... | Frame 2 (*) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
... ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Frame N (*) ... | Frame N (*) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 7: QUIC Payload Figure 7: QUIC Payload
The payload of a packet that contains frames MUST contain at least The payload of a packet that contains frames MUST contain at least
one frame, and MAY contain multiple frames and multiple frame types. one frame, and MAY contain multiple frames and multiple frame types.
Frames always fit within a single QUIC packet and cannot span Frames always fit within a single QUIC packet and cannot span
multiple packets. multiple packets.
Each frame begins with a Frame Type, indicating its type, followed by Each frame begins with a Frame Type, indicating its type, followed by
additional type-dependent fields: 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) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type-Dependent Fields (*) ... | Type-Dependent Fields (*) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 8: Generic Frame Layout Figure 8: 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 ACK, STREAM, MAX_STREAMS, STREAMS_BLOCKED, and The Frame Type in ACK, STREAM, MAX_STREAMS, STREAMS_BLOCKED, and
CONNECTION_CLOSE frames is used to carry other frame-specific flags. CONNECTION_CLOSE frames is used to carry other frame-specific flags.
For all other frames, the Frame Type field simply identifies the For all other frames, the Frame Type field simply identifies the
frame. These frames are explained in more detail in Section 19. frame. These frames are explained in more detail in Section 19.
+-------------+----------------------+---------------+ +-------------+----------------------+---------------+---------+
| Type Value | Frame Type Name | Definition | | Type Value | Frame Type Name | Definition | Packets |
+-------------+----------------------+---------------+ +=============+======================+===============+=========+
| 0x00 | PADDING | Section 19.1 | | 0x00 | PADDING | Section 19.1 | IH01 |
| | | | +-------------+----------------------+---------------+---------+
| 0x01 | PING | Section 19.2 | | 0x01 | PING | Section 19.2 | IH01 |
| | | | +-------------+----------------------+---------------+---------+
| 0x02 - 0x03 | ACK | Section 19.3 | | 0x02 - 0x03 | ACK | Section 19.3 | IH_1 |
| | | | +-------------+----------------------+---------------+---------+
| 0x04 | RESET_STREAM | Section 19.4 | | 0x04 | RESET_STREAM | Section 19.4 | __01 |
| | | | +-------------+----------------------+---------------+---------+
| 0x05 | STOP_SENDING | Section 19.5 | | 0x05 | STOP_SENDING | Section 19.5 | __01 |
| | | | +-------------+----------------------+---------------+---------+
| 0x06 | CRYPTO | Section 19.6 | | 0x06 | CRYPTO | Section 19.6 | IH_1 |
| | | | +-------------+----------------------+---------------+---------+
| 0x07 | NEW_TOKEN | Section 19.7 | | 0x07 | NEW_TOKEN | Section 19.7 | ___1 |
| | | | +-------------+----------------------+---------------+---------+
| 0x08 - 0x0f | STREAM | Section 19.8 | | 0x08 - 0x0f | STREAM | Section 19.8 | __01 |
| | | | +-------------+----------------------+---------------+---------+
| 0x10 | MAX_DATA | Section 19.9 | | 0x10 | MAX_DATA | Section 19.9 | __01 |
| | | | +-------------+----------------------+---------------+---------+
| 0x11 | MAX_STREAM_DATA | Section 19.10 | | 0x11 | MAX_STREAM_DATA | Section 19.10 | __01 |
| | | | +-------------+----------------------+---------------+---------+
| 0x12 - 0x13 | MAX_STREAMS | Section 19.11 | | 0x12 - 0x13 | MAX_STREAMS | Section 19.11 | __01 |
| | | | +-------------+----------------------+---------------+---------+
| 0x14 | DATA_BLOCKED | Section 19.12 | | 0x14 | DATA_BLOCKED | Section 19.12 | __01 |
| | | | +-------------+----------------------+---------------+---------+
| 0x15 | STREAM_DATA_BLOCKED | Section 19.13 | | 0x15 | STREAM_DATA_BLOCKED | Section 19.13 | __01 |
| | | | +-------------+----------------------+---------------+---------+
| 0x16 - 0x17 | STREAMS_BLOCKED | Section 19.14 | | 0x16 - 0x17 | STREAMS_BLOCKED | Section 19.14 | __01 |
| | | | +-------------+----------------------+---------------+---------+
| 0x18 | NEW_CONNECTION_ID | Section 19.15 | | 0x18 | NEW_CONNECTION_ID | Section 19.15 | __01 |
| | | | +-------------+----------------------+---------------+---------+
| 0x19 | RETIRE_CONNECTION_ID | Section 19.16 | | 0x19 | RETIRE_CONNECTION_ID | Section 19.16 | __01 |
| | | | +-------------+----------------------+---------------+---------+
| 0x1a | PATH_CHALLENGE | Section 19.17 | | 0x1a | PATH_CHALLENGE | Section 19.17 | __01 |
| | | | +-------------+----------------------+---------------+---------+
| 0x1b | PATH_RESPONSE | Section 19.18 | | 0x1b | PATH_RESPONSE | Section 19.18 | __01 |
| | | | +-------------+----------------------+---------------+---------+
| 0x1c - 0x1d | CONNECTION_CLOSE | Section 19.19 | | 0x1c - 0x1d | CONNECTION_CLOSE | Section 19.19 | IH_1* |
+-------------+----------------------+---------------+ +-------------+----------------------+---------------+---------+
| 0x1e | HANDSHAKE_DONE | Section 19.20 | ___1 |
+-------------+----------------------+---------------+---------+
Table 3: Frame Types Table 3: Frame Types
The "Packets" column in Table 3 does not form part of the IANA
registry (see Section 22.3). This column summarizes the types of
packets that each frame type can appear in, indicated as up to four
characters indicating:
I: Initial (Section 17.2.2)
H: Handshake (Section 17.2.4)
0: 0-RTT (Section 17.2.3)
1: 1-RTT (Section 17.3)
*: A CONNECTION_CLOSE frame of type 0x1c can appear in Initial,
Handshake, and 1-RTT packets, whereas a CONNECTION_CLOSE of type
0x1d can only appear in a 1-RTT packet.
Section 4 of [QUIC-TLS] provides more detail about these
restrictions. Note that all frames can appear in 1-RTT packets.
An endpoint MUST treat the receipt of a frame of unknown type as a An endpoint MUST treat the receipt of a frame of unknown type as a
connection error of type FRAME_ENCODING_ERROR. connection error of type FRAME_ENCODING_ERROR.
All QUIC frames are idempotent in this version of QUIC. That is, a All QUIC frames are idempotent in this version of QUIC. That is, a
valid frame does not cause undesirable side effects or errors when valid frame does not cause undesirable side effects or errors when
received more than once. received more than once.
The Frame Type field uses a variable length integer encoding (see The Frame Type field uses a variable length integer encoding (see
Section 16) with one exception. To ensure simple and efficient Section 16) 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
skipping to change at page 73, line 22 skipping to change at page 78, line 41
When an ACK frame is sent, one or more ranges of acknowledged packets When an ACK frame is sent, one or more ranges of acknowledged packets
are included. Including older packets reduces the chance of spurious are included. Including older packets reduces the chance of spurious
retransmits caused by losing previously sent ACK frames, at the cost retransmits caused by losing previously sent ACK frames, at the cost
of larger ACK frames. of larger ACK frames.
ACK frames SHOULD always acknowledge the most recently received ACK frames SHOULD always acknowledge the most recently received
packets, and the more out-of-order the packets are, the more packets, and the more out-of-order the packets are, the more
important it is to send an updated ACK frame quickly, to prevent the important it is to send an updated ACK frame quickly, to prevent the
peer from declaring a packet as lost and spuriously retransmitting peer from declaring a packet as lost and spuriously retransmitting
the frames it contains. the frames it contains. An ACK frame is expected to fit within a
single QUIC packet. If it does not, then older ranges (those with
the smallest packet numbers) are omitted.
Section 13.2.3 and Section 13.2.4 describe an exemplary approach for Section 13.2.3 and Section 13.2.4 describe an exemplary approach for
determining what packets to acknowledge in each ACK frame. determining what packets to acknowledge in each ACK frame.
13.2.3. Receiver Tracking of ACK Frames 13.2.3. Receiver Tracking of ACK Frames
When a packet containing an ACK frame is sent, the largest When a packet containing an ACK frame is sent, the largest
acknowledged in that frame may be saved. When a packet containing an acknowledged in that frame may be saved. When a packet containing an
ACK frame is acknowledged, the receiver can stop acknowledging ACK frame is acknowledged, the receiver can stop acknowledging
packets less than or equal to the largest acknowledged in the sent packets less than or equal to the largest acknowledged in the sent
skipping to change at page 74, line 23 skipping to change at page 79, line 49
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 algorithms ([QUIC-RECOVERY]) declare some data. Standard QUIC algorithms ([QUIC-RECOVERY]) declare
packets lost after sufficiently newer packets are acknowledged. packets lost after sufficiently newer packets are acknowledged.
Therefore, the receiver SHOULD repeatedly acknowledge newly received Therefore, the receiver SHOULD repeatedly acknowledge newly received
packets in preference to packets received in the past. packets in preference to packets received in the past.
13.2.5. Measuring and Reporting Host Delay 13.2.5. Measuring and Reporting Host Delay
An endpoint measures the delays intentionally introduced between when An endpoint measures the delays intentionally introduced between when
an ack-eliciting packet is received and the corresponding the packet with the largest packet number is received and an
acknowledgment is sent. The endpoint encodes this delay for the acknowledgment is sent. The endpoint encodes this delay in the Ack
largest acknowledged packet in the Ack Delay field of an ACK frame Delay field of an ACK frame (see Section 19.3). This allows the
(see Section 19.3). This allows the receiver of the ACK to adjust receiver of the ACK to adjust for any intentional delays, which is
for any intentional delays, which is important for getting a better important for getting a better estimate of the path RTT when
estimate of the path RTT when acknowledgments are delayed. A packet acknowledgments are delayed. A packet might be held in the OS kernel
might be held in the OS kernel or elsewhere on the host before being or elsewhere on the host before being processed. An endpoint MUST
processed. An endpoint MUST NOT include delays that is does not NOT include delays that it does not control when populating the Ack
control when populating the Ack Delay field in an ACK frame. Delay field in an ACK frame.
13.2.6. ACK Frames and Packet Protection 13.2.6. 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 12.1). For number space as the packet being ACKed (see Section 12.1). 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
skipping to change at page 75, line 13 skipping to change at page 80, line 37
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 is retransmitted according to the rules * Data sent in CRYPTO frames is retransmitted according to the rules
in [QUIC-RECOVERY], until all data has been acknowledged. Data in in [QUIC-RECOVERY], until all data has been acknowledged. Data in
CRYPTO frames for Initial and Handshake packets is discarded when CRYPTO frames for Initial and Handshake packets is discarded when
keys for the corresponding encryption level are discarded. keys for the corresponding encryption level are discarded.
o Application data sent in STREAM frames is retransmitted in new * Application data sent in STREAM frames is retransmitted in new
STREAM frames unless the endpoint has sent a RESET_STREAM for that STREAM frames unless the endpoint has sent a RESET_STREAM for that
stream. Once an endpoint sends a RESET_STREAM frame, no further stream. Once an endpoint sends a RESET_STREAM frame, no further
STREAM frames are needed. STREAM frames are needed.
o ACK frames carry the most recent set of acknowledgements and the * ACK frames carry the most recent set of acknowledgements and the
Ack Delay from the largest acknowledged packet, as described in Ack Delay from the largest acknowledged packet, as described in
Section 13.2.1. Delaying the transmission of packets containing Section 13.2.1. Delaying the transmission of packets containing
ACK frames or sending old ACK frames can cause the peer to ACK frames or sending old ACK frames can cause the peer to
generate an inflated RTT sample or unnecessarily disable ECN. generate an inflated RTT sample or unnecessarily disable ECN.
o Cancellation of stream transmission, as carried in a RESET_STREAM * Cancellation of stream transmission, as carried in a RESET_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 sending part of the stream). "Data Recvd" state is reached on the sending part of the stream).
The content of a RESET_STREAM frame MUST NOT change when it is The content of a RESET_STREAM frame MUST NOT change when it is
sent again. sent again.
o Similarly, a request to cancel stream transmission, as encoded in * Similarly, a request to cancel stream transmission, as encoded in
a STOP_SENDING frame, is sent until the receiving part of the a STOP_SENDING frame, is sent until the receiving part of the
stream enters either a "Data Recvd" or "Reset Recvd" state; see stream enters either a "Data Recvd" or "Reset Recvd" state; see
Section 3.5. Section 3.5.
o Connection close signals, including packets that contain * Connection close signals, including packets that contain
CONNECTION_CLOSE frames, are not sent again when packet loss is CONNECTION_CLOSE frames, are not sent again when packet loss is
detected, but as described in Section 10. detected, but as described in Section 10.
o The current connection maximum data is sent in MAX_DATA frames. * The current connection maximum data is sent in MAX_DATA frames.
An updated value is sent in a MAX_DATA frame if the packet An updated value is sent in a MAX_DATA frame if the packet
containing the most recently sent MAX_DATA frame is declared lost, containing the most recently sent MAX_DATA frame is declared lost,
or when the endpoint decides to update the limit. Care is or when the endpoint decides to update the limit. Care is
necessary to avoid sending this frame too often as the limit can necessary to avoid sending this frame too often as the limit can
increase frequently and cause an unnecessarily large number of increase frequently and cause an unnecessarily large number of
MAX_DATA frames to be sent. MAX_DATA frames to be sent.
o The current maximum stream data offset is sent in MAX_STREAM_DATA * The current maximum stream data offset is sent in MAX_STREAM_DATA
frames. Like MAX_DATA, an updated value is sent when the packet frames. Like MAX_DATA, an updated value is sent when the packet
containing the most recent MAX_STREAM_DATA frame for a stream is containing the most recent MAX_STREAM_DATA frame for a stream is
lost or when the limit is updated, with care taken to prevent the lost or when the limit is updated, with care taken to prevent the
frame from being sent too often. An endpoint SHOULD stop sending frame from being sent too often. An endpoint SHOULD stop sending
MAX_STREAM_DATA frames when the receiving part of the stream MAX_STREAM_DATA frames when the receiving part of the stream
enters a "Size Known" state. enters a "Size Known" state.
o The limit on streams of a given type is sent in MAX_STREAMS * The limit on streams of a given type is sent in MAX_STREAMS
frames. Like MAX_DATA, an updated value is sent when a packet frames. Like MAX_DATA, an updated value is sent when a packet
containing the most recent MAX_STREAMS for a stream type frame is containing the most recent MAX_STREAMS for a stream type frame is
declared lost or when the limit is updated, with care taken to declared lost or when the limit is updated, with care taken to
prevent the frame from being sent too often. prevent the frame from being sent too often.
o Blocked signals are carried in DATA_BLOCKED, STREAM_DATA_BLOCKED, * Blocked signals are carried in DATA_BLOCKED, STREAM_DATA_BLOCKED,
and STREAMS_BLOCKED frames. DATA_BLOCKED frames have connection and STREAMS_BLOCKED frames. DATA_BLOCKED frames have connection
scope, STREAM_DATA_BLOCKED frames have stream scope, and scope, STREAM_DATA_BLOCKED frames have stream scope, and
STREAMS_BLOCKED frames are scoped to a specific stream type. New STREAMS_BLOCKED frames are scoped to a specific stream type. New
frames are sent if packets containing the most recent frame for a frames are sent if packets containing the most recent frame for a
scope is lost, but only while the endpoint is blocked on the scope is lost, but only while the endpoint is blocked on the
corresponding limit. These frames always include the limit that corresponding limit. These frames always include the limit that
is causing blocking at the time that they are transmitted. is causing blocking at the time that they are transmitted.
o A liveness or path validation check using PATH_CHALLENGE frames is * A liveness or path validation check using PATH_CHALLENGE frames is
sent periodically until a matching PATH_RESPONSE frame is received sent periodically until a matching PATH_RESPONSE frame is received
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 * Responses to path validation using PATH_RESPONSE frames are sent
just once. The peer is expected to send more PATH_CHALLENGE just once. The peer is expected to send more PATH_CHALLENGE
frames as necessary to evoke additional PATH_RESPONSE frames. frames as necessary to evoke additional PATH_RESPONSE frames.
o New connection IDs are sent in NEW_CONNECTION_ID frames and * 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 Retransmissions of this frame carry the same sequence number
value. Likewise, retired connection IDs are sent in value. Likewise, retired connection IDs are sent in
RETIRE_CONNECTION_ID frames and retransmitted if the packet RETIRE_CONNECTION_ID frames and retransmitted if the packet
containing them is lost. containing them is lost.
o NEW_TOKEN frames are retransmitted if the packet containing them * NEW_TOKEN frames are retransmitted if the packet containing them
is lost. No special support is made for detecting reordered and is lost. No special support is made for detecting reordered and
duplicated NEW_TOKEN frames other than a direct comparison of the duplicated NEW_TOKEN frames other than a direct comparison of the
frame contents. frame contents.
o PING and PADDING frames contain no information, so lost PING or * PING and PADDING frames contain no information, so lost PING or
PADDING frames do not require repair. PADDING frames do not require repair.
* The HANDSHAKE_DONE frame MUST be retransmitted until it is
acknowledged.
Endpoints SHOULD prioritize retransmission of data over sending new Endpoints SHOULD prioritize retransmission of data over sending new
data, unless priorities specified by the application indicate data, unless priorities specified by the application indicate
otherwise (see Section 2.3). otherwise (see Section 2.3).
Even though a sender is encouraged to assemble frames containing up- Even though a sender is encouraged to assemble frames containing up-
to-date information every time it sends a packet, it is not forbidden to-date information every time it sends a packet, it is not forbidden
to retransmit copies of frames from lost packets. A receiver MUST to retransmit copies of frames from lost packets. A receiver MUST
accept packets containing an outdated frame, such as a MAX_DATA frame accept packets containing an outdated frame, such as a MAX_DATA frame
carrying a smaller maximum data than one found in an older packet. carrying a smaller maximum data than one found in an older packet.
skipping to change at page 78, line 29 skipping to change at page 84, line 15
13.4.2. ECN Validation 13.4.2. ECN Validation
It is possible for faulty network devices to corrupt or erroneously It is possible for faulty network devices to corrupt or erroneously
drop packets with ECN markings. To provide robust connectivity in drop packets with ECN markings. To provide robust connectivity in
the presence of such devices, each endpoint independently validates the presence of such devices, each endpoint independently validates
ECN counts and disables ECN if errors are detected. ECN counts and disables ECN if errors are detected.
Endpoints validate ECN for packets sent on each network path Endpoints validate ECN for packets sent on each network path
independently. An endpoint thus validates ECN on new connection independently. An endpoint thus validates ECN on new connection
establishment, when switching to a new server preferred address, and establishment, when switching to a new server preferred address, and
on active connection migration to a new path. on active connection migration to a new path. Appendix B describes
one possible algorithm for testing paths for ECN support.
Even if an endpoint does not use ECN markings on packets it Even if an endpoint does not use ECN markings on packets it
transmits, the endpoint MUST provide feedback about ECN markings transmits, the endpoint MUST provide feedback about ECN markings
received from the peer if they are accessible. Failing to report ECN received from the peer if they are accessible. Failing to report ECN
counts will cause the peer to disable ECN marking. counts will cause the peer to disable ECN marking.
13.4.2.1. Sending ECN Markings 13.4.2.1. Sending ECN Markings
To start ECN validation, an endpoint SHOULD do the following when To start ECN validation, an endpoint SHOULD do the following when
sending packets on a new path to a peer: sending packets on a new path to a peer:
o Set the ECT(0) codepoint in the IP header of early outgoing * Set the ECT(0) codepoint in the IP header of early outgoing
packets sent on a new path to the peer [RFC8311]. packets sent on a new path to the peer [RFC8311].
o If all packets that were sent with the ECT(0) codepoint are * If all packets that were sent with the ECT(0) codepoint are
eventually deemed lost [QUIC-RECOVERY], validation is deemed to eventually deemed lost [QUIC-RECOVERY], validation is deemed to
have failed. have failed.
To reduce the chances of misinterpreting congestive loss as packets To reduce the chances of misinterpreting congestive loss as packets
dropped by a faulty network element, an endpoint could set the ECT(0) dropped by a faulty network element, an endpoint could set the ECT(0)
codepoint in the first ten outgoing packets on a path, or for a codepoint in the first ten outgoing packets on a path, or for a
period of three RTTs, whichever occurs first. period of three RTTs, whichever occurs first.
Implementations MAY experiment with and use other strategies for use Implementations MAY experiment with and use other strategies for use
of ECN. Other methods of probing paths for ECN support are possible, of ECN. Other methods of probing paths for ECN support are possible,
as are different marking strategies. Implementations can also use as are different marking strategies. Implementations can also use
the ECT(1) codepoint, as specified in [RFC8311]. the ECT(1) codepoint, as specified in [RFC8311].
13.4.2.2. Receiving ACK Frames 13.4.2.2. Receiving ACK Frames
An endpoint that sets ECT(0) or ECT(1) codepoints on packets it An endpoint that sets ECT(0) or ECT(1) codepoints on packets it
transmits MUST use the following steps on receiving an ACK frame to transmits MUST use the following steps on receiving an ACK frame to
validate ECN. validate ECN.
o If this ACK frame newly acknowledges a packet that the endpoint * If this ACK frame newly acknowledges a packet that the endpoint
sent with either ECT(0) or ECT(1) codepoints set, and if no ECN sent with either ECT(0) or ECT(1) codepoints set, and if no ECN
feedback is present in the ACK frame, validation fails. This step feedback is present in the ACK frame, validation fails. This step
protects against both a network element that zeroes out ECN bits protects against both a network element that zeroes out ECN bits
and a peer that is unable to access ECN markings, since the peer and a peer that is unable to access ECN markings, since the peer
could respond without ECN feedback in these cases. could respond without ECN feedback in these cases.
o For validation to succeed, the total increase in ECT(0), ECT(1), * For validation to succeed, the total increase in ECT(0), ECT(1),
and CE counts MUST be no smaller than the total number of QUIC and CE counts MUST be no smaller than the total number of QUIC
packets sent with an ECT codepoint that are newly acknowledged in packets sent with an ECT codepoint that are newly acknowledged in
this ACK frame. This step detects any network remarking from this ACK frame. This step detects any network remarking from
ECT(0), ECT(1), or CE codepoints to Not-ECT. ECT(0), ECT(1), or CE codepoints to Not-ECT.
o Any increase in either ECT(0) or ECT(1) counts, plus any increase * Any increase in either ECT(0) or ECT(1) counts, plus any increase
in the CE count, MUST be no smaller than the number of packets in the CE count, MUST be no smaller than the number of packets
sent with the corresponding ECT codepoint that are newly sent with the corresponding ECT codepoint that are newly
acknowledged in this ACK frame. This step detects any erroneous acknowledged in this ACK frame. This step detects any erroneous
network remarking from ECT(0) to ECT(1) (or vice versa). network remarking from ECT(0) to ECT(1) (or vice versa).
Processing ECN counts out of order can result in validation failure. Processing ECN counts out of order can result in validation failure.
An endpoint SHOULD NOT perform this validation if this ACK frame does An endpoint SHOULD NOT perform this validation if this ACK frame does
not advance the largest packet number acknowledged in this not advance the largest packet number acknowledged in this
connection. connection.
skipping to change at page 80, line 19 skipping to change at page 86, line 5
at any point in the connection. at any point in the connection.
Even if validation fails, an endpoint MAY revalidate ECN on the same Even if validation fails, an endpoint MAY revalidate ECN on the same
path at any later time in the connection. path at any later time in the connection.
14. Packet Size 14. Packet Size
The QUIC packet size includes the QUIC header and protected payload, The QUIC packet size includes the QUIC header and protected payload,
but not the UDP or IP header. but not the UDP or IP header.
Clients MUST ensure they send the first Initial packet in a single IP A client MUST expand the payload of all UDP datagrams carrying
packet. Similarly, the first Initial packet sent after receiving a Initial packets to at least 1200 bytes, by adding PADDING frames to
Retry packet MUST be sent in a single IP packet. the Initial packet or by coalescing the Initial packet (see
The payload of a UDP datagram carrying the first Initial packet MUST
be expanded to at least 1200 bytes, by adding PADDING frames to the
Initial packet and/or by coalescing the Initial packet (see
Section 12.2). Sending a UDP datagram of this size ensures that the Section 12.2). Sending a UDP datagram of this size ensures that the
network path supports a reasonable Maximum Transmission Unit (MTU), network path from the client to the server supports a reasonable
and helps reduce the amplitude of amplification attacks caused by Maximum Transmission Unit (MTU). Padding datagrams also helps reduce
server responses toward an unverified client address; see Section 8. the amplitude of amplification attacks caused by server responses
toward an unverified client address; see Section 8.
The datagram containing the first Initial packet from a client MAY Datagrams containing Initial packets MAY exceed 1200 bytes if the
exceed 1200 bytes if the client believes that the Path Maximum client believes that the Path Maximum Transmission Unit (PMTU)
Transmission Unit (PMTU) supports the size that it chooses. supports the size that it chooses.
UDP datagrams MUST NOT be fragmented at the IP layer. In IPv4
[IPv4], the DF bit MUST be set to prevent fragmentation on the path.
A server MAY send a CONNECTION_CLOSE frame with error code A server MAY send a CONNECTION_CLOSE frame with error code
PROTOCOL_VIOLATION in response to the first Initial packet it PROTOCOL_VIOLATION in response to an Initial packet it receives from
receives from a client if the UDP datagram is smaller than 1200 a client if the UDP datagram is smaller than 1200 bytes. It MUST NOT
bytes. It MUST NOT send any other frame type in response, or send any other frame type in response, or otherwise behave as if any
otherwise behave as if any part of the offending packet was processed part of the offending packet was processed as valid.
as valid.
The server MUST also limit the number of bytes it sends before The server MUST also limit the number of bytes it sends before
validating the address of the client; see Section 8. validating the address of the client; see Section 8.
14.1. Path Maximum Transmission Unit (PMTU) 14.1. Path Maximum Transmission Unit (PMTU)
The PMTU is the maximum size of the entire IP packet including the IP The PMTU is the maximum size of the entire IP packet including the IP
header, UDP header, and UDP payload. The UDP payload includes the header, UDP header, and UDP payload. The UDP payload includes the
QUIC packet header, protected payload, and any authentication fields. QUIC packet header, protected payload, and any authentication fields.
The PMTU can depend upon the current path characteristics. The PMTU can depend upon the current path characteristics.
skipping to change at page 82, line 19 skipping to change at page 88, line 5
This validation SHOULD use the quoted packet supplied in the payload This validation SHOULD use the quoted packet supplied in the payload
of an ICMP message to associate the message with a corresponding of an ICMP message to associate the message with a corresponding
transport connection [DPLPMTUD]. transport connection [DPLPMTUD].
ICMP message validation MUST include matching IP addresses and UDP ICMP message validation MUST include matching IP addresses and UDP
ports [RFC8085] and, when possible, connection IDs to an active QUIC ports [RFC8085] and, when possible, connection IDs to an active QUIC
session. session.
Further validation can also be provided: Further validation can also be provided:
o An IPv4 endpoint could set the Don't Fragment (DF) bit on a small * An IPv4 endpoint could set the Don't Fragment (DF) bit on a small
proportion of packets, so that most invalid ICMP messages arrive proportion of packets, so that most invalid ICMP messages arrive
when there are no DF packets outstanding, and can therefore be when there are no DF packets outstanding, and can therefore be
identified as spurious. identified as spurious.
o An endpoint could store additional information from the IP or UDP * An endpoint could store additional information from the IP or UDP
headers to use for validation (for example, the IP ID or UDP headers to use for validation (for example, the IP ID or UDP
checksum). checksum).
The endpoint SHOULD ignore all ICMP messages that fail validation. The endpoint SHOULD ignore all ICMP messages that fail validation.
An endpoint MUST NOT increase PMTU based on ICMP messages. Any An endpoint MUST NOT increase PMTU based on ICMP messages. Any
reduction in the QUIC maximum packet size MAY be provisional until reduction in the QUIC maximum packet size MAY be provisional until
QUIC's loss detection algorithm determines that the quoted packet has QUIC's loss detection algorithm determines that the quoted packet has
actually been lost. actually been lost.
14.3. Datagram Packetization Layer PMTU Discovery 14.3. Datagram Packetization Layer PMTU Discovery
Section 6.4 of [DPLPMTUD] provides considerations for implementing Section 6.3 of [DPLPMTUD] provides considerations for implementing
Datagram Packetization Layer PMTUD (DPLPMTUD) with QUIC. Datagram Packetization Layer PMTUD (DPLPMTUD) with QUIC.
When implementing the algorithm in Section 5.3 of [DPLPMTUD], the When implementing the algorithm in Section 5 of [DPLPMTUD], the
initial value of BASE_PMTU SHOULD be consistent with the minimum QUIC initial value of BASE_PMTU SHOULD be consistent with the minimum QUIC
packet size (1232 bytes for IPv6 and 1252 bytes for IPv4). packet size (1232 bytes for IPv6 and 1252 bytes for IPv4).
PING and PADDING frames can be used to generate PMTU probe packets. PING and PADDING frames can be used to generate PMTU probe packets.
These frames might not be retransmitted if a probe packet containing These frames might not be retransmitted if a probe packet containing
them is lost. However, these frames do consume congestion window, them is lost. However, these frames do consume congestion window,
which could delay the transmission of subsequent application data. which could delay the transmission of subsequent application data.
A PING frame can be included in a PMTU probe to ensure that a valid A PING frame can be included in a PMTU probe to ensure that a valid
probe is acknowledged. probe is acknowledged.
skipping to change at page 83, line 49 skipping to change at page 89, line 33
Versions with the most significant 16 bits of the version number Versions with the most significant 16 bits of the version number
cleared are reserved for use in future IETF consensus documents. cleared are reserved for use in future IETF consensus documents.
Versions that follow the pattern 0x?a?a?a?a are reserved for use in Versions that follow the pattern 0x?a?a?a?a are reserved for use in
forcing version negotiation to be exercised. That is, any version forcing version negotiation to be exercised. That is, any version
number where the low four bits of all bytes is 1010 (in binary). A number where the low four bits of all bytes is 1010 (in binary). A
client or server MAY advertise support for any of these reserved client or server MAY advertise support for any of these reserved
versions. versions.
Reserved version numbers will probably never represent a real Reserved version numbers will never represent a real protocol; a
protocol; a client MAY use one of these version numbers with the client MAY use one of these version numbers with the expectation that
expectation that the server will initiate version negotiation; a the server will initiate version negotiation; a server MAY advertise
server MAY advertise support for one of these versions and can expect support for one of these versions and can expect that clients ignore
that clients ignore the value. the value.
[[RFC editor: please remove the remainder of this section before [[RFC editor: please remove the remainder of this section before
publication.]] publication.]]
The version number for the final version of this specification The version number for the final version of this specification
(0x00000001), is reserved for the version of the protocol that is (0x00000001), is reserved for the version of the protocol that is
published as an RFC. published as an RFC.
Version numbers used to identify IETF drafts are created by adding Version numbers used to identify IETF drafts are created by adding
the draft number to 0xff000000. For example, draft-ietf-quic- the draft number to 0xff000000. For example, draft-ietf-quic-
skipping to change at page 84, line 39 skipping to change at page 90, line 24
significant bits of the first byte to encode the base 2 logarithm of significant bits of the first byte to encode the base 2 logarithm of
the integer encoding length in bytes. The integer value is encoded the integer encoding length in bytes. The integer value is encoded
on the remaining bits, in network byte order. on the remaining bits, in network byte order.
This means that integers are encoded on 1, 2, 4, or 8 bytes and can This means that integers are encoded on 1, 2, 4, or 8 bytes and can
encode 6, 14, 30, or 62 bit values respectively. Table 4 summarizes encode 6, 14, 30, or 62 bit values respectively. Table 4 summarizes
the encoding properties. the encoding properties.
+------+--------+-------------+-----------------------+ +------+--------+-------------+-----------------------+
| 2Bit | Length | Usable Bits | Range | | 2Bit | Length | Usable Bits | Range |
+------+--------+-------------+-----------------------+ +======+========+=============+=======================+
| 00 | 1 | 6 | 0-63 | | 00 | 1 | 6 | 0-63 |
| | | | | +------+--------+-------------+-----------------------+
| 01 | 2 | 14 | 0-16383 | | 01 | 2 | 14 | 0-16383 |
| | | | | +------+--------+-------------+-----------------------+
| 10 | 4 | 30 | 0-1073741823 | | 10 | 4 | 30 | 0-1073741823 |
| | | | | +------+--------+-------------+-----------------------+
| 11 | 8 | 62 | 0-4611686018427387903 | | 11 | 8 | 62 | 0-4611686018427387903 |
+------+--------+-------------+-----------------------+ +------+--------+-------------+-----------------------+
Table 4: Summary of Integer Encodings Table 4: Summary of Integer Encodings
For example, the eight byte sequence c2 19 7c 5e ff 14 e8 8c (in For example, the eight byte sequence c2 19 7c 5e ff 14 e8 8c (in
hexadecimal) decodes to the decimal value 151288809941952652; the hexadecimal) decodes to the decimal value 151288809941952652; the
four byte sequence 9d 7f 3e 7d decodes to 494878333; the two byte four byte sequence 9d 7f 3e 7d decodes to 494878333; the two byte
sequence 7b bd decodes to 15293; and the single byte 25 decodes to 37 sequence 7b bd decodes to 15293; and the single byte 25 decodes to 37
(as does the two byte sequence 40 25). (as does the two byte sequence 40 25).
skipping to change at page 88, line 7 skipping to change at page 93, line 34
Source Connection ID: The Source Connection ID field follows the Source Connection ID: The Source Connection ID field follows the
SCID Len and is between 0 and 20 bytes in length. Section 7.2 SCID Len and is between 0 and 20 bytes in length. Section 7.2
describes the use of this field in more detail. describes the use of this field in more detail.
In this version of QUIC, the following packet types with the long In this version of QUIC, the following packet types with the long
header are defined: header are defined:
+------+-----------+----------------+ +------+-----------+----------------+
| Type | Name | Section | | Type | Name | Section |
+------+-----------+----------------+ +======+===========+================+
| 0x0 | Initial | Section 17.2.2 | | 0x0 | Initial | Section 17.2.2 |
| | | | +------+-----------+----------------+
| 0x1 | 0-RTT | Section 17.2.3 | | 0x1 | 0-RTT | Section 17.2.3 |
| | | | +------+-----------+----------------+
| 0x2 | Handshake | Section 17.2.4 | | 0x2 | Handshake | Section 17.2.4 |
| | | | +------+-----------+----------------+
| 0x3 | Retry | Section 17.2.5 | | 0x3 | Retry | Section 17.2.5 |
+------+-----------+----------------+ +------+-----------+----------------+
Table 5: Long Header Packet Types Table 5: Long Header Packet Types
The header form bit, connection ID lengths byte, Destination and The header form bit, connection ID lengths byte, Destination and
Source Connection ID fields, and Version fields of a long header Source Connection ID fields, and Version fields of a long header
packet are version-independent. The other fields in the first byte packet are version-independent. The other fields in the first byte
are version-specific. See [QUIC-INVARIANTS] for details on how are version-specific. See [QUIC-INVARIANTS] for details on how
packets from different versions of QUIC are interpreted. packets from different versions of QUIC are interpreted.
skipping to change at page 92, line 18 skipping to change at page 97, line 41
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 Retry packet (Section 17.2.5). a Retry packet (Section 17.2.5).
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 and CONNECTION_CLOSE frames are also permitted. An endpoint PING, PADDING, and CONNECTION_CLOSE frames are also permitted. An
that receives an Initial packet containing other frames can either endpoint that receives an Initial packet containing other frames can
discard the packet as spurious or treat it as a connection error. 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 start or all of the first cryptographic handshake contains the start or all of the first cryptographic handshake
message. The first CRYPTO frame sent always begins at an offset of 0 message. The first CRYPTO frame sent always begins at an offset of 0
(see Section 7). (see Section 7).
Note that if the server sends a HelloRetryRequest, the client will Note that if the server sends a HelloRetryRequest, the client will
send another series of Initial packets. These Initial packets will send another series of Initial packets. These Initial packets will
continue the cryptographic handshake and will contain CRYPTO frames continue the cryptographic handshake and will contain CRYPTO frames
starting at an offset matching the size of the CRYPTO frames sent in starting at an offset matching the size of the CRYPTO frames sent in
the first flight of Initial packets. the first flight of Initial packets.
17.2.2.1. Abandoning Initial Packets 17.2.2.1. Abandoning Initial Packets
A client stops both sending and processing Initial packets when it A client stops both sending and processing Initial packets when it
sends its first Handshake packet. A server stops sending and sends its first Handshake packet. A server stops sending and
processing Initial packets when it receives its first Handshake processing Initial packets when it receives its first Handshake
packet. Though packets might still be in flight or awaiting packet. Though packets might still be in flight or awaiting
acknowledgment, no further Initial packets need to be exchanged acknowledgment, no further Initial packets need to be exchanged
beyond this point. Initial packet protection keys are discarded (see beyond this point. Initial packet protection keys are discarded (see
Section 4.9.1 of [QUIC-TLS]) along with any loss recovery and Section 4.10.1 of [QUIC-TLS]) along with any loss recovery and
congestion control state (see Section 6.5 of [QUIC-RECOVERY]). congestion control state (see Section 6.5 of [QUIC-RECOVERY]).
Any data in CRYPTO frames is discarded - and no longer retransmitted Any data in CRYPTO frames is discarded - and no longer retransmitted
- when Initial keys are discarded. - when Initial keys are discarded.
17.2.3. 0-RTT 17.2.3. 0-RTT
A 0-RTT packet uses long headers with a type value of 0x1, followed A 0-RTT packet uses long headers with a type value of 0x1, followed
by the Length and Packet Number fields. The first byte contains the by the Length and Packet Number fields. The first byte contains the
Reserved and Packet Number Length bits. It is used to carry "early" Reserved and Packet Number Length bits. It is used to carry "early"
skipping to change at page 93, line 30 skipping to change at page 99, line 25
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Connection ID (0..160) ... | Source Connection ID (0..160) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Length (i) ... | Length (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Packet Number (8/16/24/32) ... | Packet Number (8/16/24/32) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Payload (*) ... | Payload (*) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
0-RTT Packet Figure 12: 0-RTT Packet
Packet numbers for 0-RTT protected packets use the same space as Packet numbers for 0-RTT protected packets use the same space as
1-RTT protected packets. 1-RTT protected packets.
After a client receives a Retry packet, 0-RTT packets are likely to After a client receives a Retry packet, 0-RTT packets are likely to
have been lost or discarded by the server. A client SHOULD attempt have been lost or discarded by the server. A client SHOULD attempt
to resend data in 0-RTT packets after it sends a new Initial packet. to resend data in 0-RTT packets after it sends a new Initial packet.
A client MUST NOT reset the packet number it uses for 0-RTT packets, A client MUST NOT reset the packet number it uses for 0-RTT packets,
since the keys used to protect 0-RTT packets will not change as a since the keys used to protect 0-RTT packets will not change as a
skipping to change at page 94, line 47 skipping to change at page 100, line 40
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Connection ID (0..160) ... | Source Connection ID (0..160) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Length (i) ... | Length (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Packet Number (8/16/24/32) ... | Packet Number (8/16/24/32) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Payload (*) ... | Payload (*) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 12: Handshake Protected Packet Figure 13: Handshake Protected Packet
Once a client has received a Handshake packet from a server, it uses Once a client has received a Handshake packet from a server, it uses
Handshake packets to send subsequent cryptographic handshake messages Handshake packets to send subsequent cryptographic handshake messages
and acknowledgments to the server. and acknowledgments to the server.
The Destination Connection ID field in a Handshake packet contains a The Destination Connection ID field in a Handshake packet contains a
connection ID that is chosen by the recipient of the packet; the connection ID that is chosen by the recipient of the packet; the
Source Connection ID includes the connection ID that the sender of Source Connection ID includes the connection ID that the sender of
the packet wishes to use (see Section 7.2). the packet wishes to use (see Section 7.2).
Handshake packets are their own packet number space, and thus the Handshake packets are their own packet number space, and thus the
first Handshake packet sent by a server contains a packet number of first Handshake packet sent by a server contains a packet number of
0. 0.
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 PING, PADDING, or ACK frames. Handshake packets MAY contain
CONNECTION_CLOSE frames. Endpoints MUST treat receipt of Handshake CONNECTION_CLOSE frames. Endpoints MUST treat receipt of Handshake
packets with other frames as a connection error. packets with other frames as a connection error.
Like Initial packets (see Section 17.2.2.1), data in CRYPTO frames at Like Initial packets (see Section 17.2.2.1), data in CRYPTO frames at
the Handshake encryption level is discarded - and no longer the Handshake encryption level is discarded - and no longer
retransmitted - when Handshake protection keys are discarded. retransmitted - when Handshake protection keys are discarded.
17.2.5. Retry Packet 17.2.5. Retry Packet
A Retry packet uses a long packet header with a type value of 0x3. A Retry packet uses a long packet header with a type value of 0x3.
skipping to change at page 95, line 44 skipping to change at page 101, line 39
| Version (32) | | Version (32) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| DCID Len (8) | | DCID Len (8) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Destination Connection ID (0..160) ... | Destination Connection ID (0..160) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SCID Len (8) | | SCID Len (8) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Connection ID (0..160) ... | Source Connection ID (0..160) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ODCID Len (8) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Original Destination Connection ID (0..160) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Retry Token (*) ... | Retry Token (*) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ +
| |
+ Retry Integrity Tag (128) +
| |
+ +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 13: Retry Packet Figure 14: Retry Packet
A Retry packet (shown in Figure 13) does not contain any protected A Retry packet (shown in Figure 14) does not contain any protected
fields. The value in the Unused field is selected randomly by the fields. The value in the Unused field is selected randomly by the
server. In addition to the long header, it contains these additional server. In addition to the long header, it contains these additional
fields: fields:
ODCID Len: The ODCID Len contains the length in bytes of the
Original Destination Connection ID field that follows it. This
length is encoded as a 8-bit unsigned integer. In QUIC version 1,
this value MUST NOT exceed 20 bytes. Clients that receive a
version 1 Retry Packet with a value larger than 20 MUST drop the
packet.
Original Destination Connection ID: The Original Destination
Connection ID contains the value of the Destination Connection ID
from the Initial packet that this Retry is in response to. The
length of this field is given in ODCID Len.
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.
Retry Integrity Tag: See the Retry Packet Integrity section of
[QUIC-TLS].
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. This value MUST not be equal to the Destination Connection ID field. This value MUST not be equal to the Destination
Connection ID field of the packet sent by the client. A client MUST Connection ID field of the packet sent by the client. A client MUST
discard a Retry packet that contains a Source Connection ID field discard a Retry packet that contains a Source Connection ID field
that is identical to the Destination Connection ID field of its that is identical to the Destination Connection ID field of its
Initial packet. The client MUST use the value from the Source Initial packet. The client MUST use the value from the Source
skipping to change at page 96, line 49 skipping to change at page 102, line 40
packets. A server can either discard or buffer 0-RTT packets that it packets. A server can either discard or buffer 0-RTT packets that it
receives. A server can send multiple Retry packets as it receives receives. A server can send multiple Retry packets as it receives
Initial or 0-RTT packets. A server MUST NOT send more than one Retry Initial or 0-RTT packets. A server MUST NOT send more than one Retry
packet in response to a single UDP datagram. packet in response to a single UDP datagram.
A client MUST accept and process at most one Retry packet for each A client MUST accept and process at most one Retry packet for each
connection attempt. After the client has received and processed an connection attempt. After the client has received and processed an
Initial or Retry packet from the server, it MUST discard any Initial or Retry packet from the server, it MUST discard any
subsequent Retry packets that it receives. subsequent Retry packets that it receives.
Clients MUST discard Retry packets that contain an Original Clients MUST discard Retry packets that have a Retry Integrity Tag
Destination Connection ID field that does not match the Destination that cannot be validated, see the Retry Packet Integrity section of
Connection ID from its Initial packet. This prevents an off-path [QUIC-TLS]. This diminishes an off-path attacker's ability to inject
attacker from injecting a Retry packet. a Retry packet and protects against accidental corruption of Retry
packets. A client MUST discard a Retry packet with a zero-length
Retry Token field.
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 A client sets the Destination Connection ID field of this Initial
packet to the value from the Source Connection ID in the Retry packet to the value from the Source Connection ID in the Retry
packet. Changing Destination Connection ID also results in a change packet. Changing Destination Connection ID also results in a change
to the keys used to protect the Initial packet. It also sets the 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 Token field to the token provided in the Retry. The client MUST NOT
change the Source Connection ID because the server could include the change the Source Connection ID because the server could include the
connection ID as part of its token validation logic (see connection ID as part of its token validation logic (see
Section 8.1.3). Section 8.1.4).
The next Initial packet from the client uses the connection ID and The next Initial packet from the client uses the connection ID and
token values from the Retry packet (see Section 7.2). Aside from token values from the Retry packet (see Section 7.2). Aside from
this, the Initial packet sent by the client is subject to the same this, the Initial packet sent by the client is subject to the same
restrictions as the first Initial packet. A client MUST use the same restrictions as the first Initial packet. A client MUST use the same
cryptographic handshake message it includes in this packet. A server cryptographic handshake message it includes in this packet. A server
MAY treat a packet that contains a different cryptographic handshake MAY treat a packet that contains a different cryptographic handshake
message as a connection error or discard it. message as a connection error or discard it.
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
skipping to change at page 97, line 38 skipping to change at page 103, line 31
MUST NOT change the cryptographic handshake message it sends in MUST NOT change the cryptographic handshake message it sends in
response to receiving a Retry. response to receiving a Retry.
A client MUST NOT reset the packet number for any packet number space A client MUST NOT reset the packet number for any packet number space
after processing a Retry packet; Section 17.2.3 contains more after processing a Retry packet; Section 17.2.3 contains more
information on this. information on this.
A server acknowledges the use of a Retry packet for a connection A server acknowledges the use of a Retry packet for a connection
using the original_connection_id transport parameter (see using the original_connection_id transport parameter (see
Section 18.2). If the server sends a Retry packet, it MUST include Section 18.2). If the server sends a Retry packet, it MUST include
the value of the Original Destination Connection ID field of the the Destination Connection ID field from the client's first Initial
Retry packet (that is, the Destination Connection ID field from the packet in the transport parameter.
client's first Initial packet) in the transport parameter.
If the client received and processed a Retry packet, it MUST validate If the client received and processed a Retry packet, it MUST validate
that the original_connection_id transport parameter is present and that the original_connection_id transport parameter is present and
correct; otherwise, it MUST validate that the transport parameter is correct; otherwise, it MUST validate that the transport parameter is
absent. A client MUST treat a failed validation as a connection absent. A client MUST treat a failed validation as a connection
error of type TRANSPORT_PARAMETER_ERROR. error of type TRANSPORT_PARAMETER_ERROR.
A Retry packet does not include a packet number and cannot be A Retry packet does not include a packet number and cannot be
explicitly acknowledged by a client. explicitly acknowledged by a client.
skipping to change at page 98, line 22 skipping to change at page 104, line 17
+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
|0|1|S|R|R|K|P P| |0|1|S|R|R|K|P P|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Destination Connection ID (0..160) ... | Destination Connection ID (0..160) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Packet Number (8/16/24/32) ... | Packet Number (8/16/24/32) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Protected Payload (*) ... | Protected Payload (*) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 14: Short Header Packet Format Figure 15: Short Header Packet Format
The short header can be used after the version and 1-RTT keys are The short header can be used after the version and 1-RTT keys are
negotiated. Packets that use the short header contain the following negotiated. Packets that use the short header contain the following
fields: fields:
Header Form: The most significant bit (0x80) of byte 0 is set to 0 Header Form: The most significant bit (0x80) of byte 0 is set to 0
for the short header. for the short header.
Fixed Bit: The next bit (0x40) of byte 0 is set to 1. Packets Fixed Bit: The next bit (0x40) of byte 0 is set to 1. Packets
containing a zero value for this bit are not valid packets in this containing a zero value for this bit are not valid packets in this
skipping to change at page 99, line 50 skipping to change at page 105, line 45
in [QUIC-MANAGEABILITY]. in [QUIC-MANAGEABILITY].
The spin bit is an OPTIONAL feature of QUIC. A QUIC stack that The spin bit is an OPTIONAL feature of QUIC. A QUIC stack that
chooses to support the spin bit MUST implement it as specified in chooses to support the spin bit MUST implement it as specified in
this section. this section.
Each endpoint unilaterally decides if the spin bit is enabled or Each endpoint unilaterally decides if the spin bit is enabled or
disabled for a connection. Implementations MUST allow administrators disabled for a connection. Implementations MUST allow administrators
of clients and servers to disable the spin bit either globally or on of clients and servers to disable the spin bit either globally or on
a per-connection basis. Even when the spin bit is not disabled by a per-connection basis. Even when the spin bit is not disabled by
the administrator, implementations MUST disable the spin bit for a the administrator, endpoints MUST disable their use of the spin bit
given connection with a certain likelihood. The random selection for a random selection of at least one in every 16 network paths, or
process SHOULD be designed such that on average the spin bit is for one in every 16 connection IDs. As each endpoint disables the
disabled for at least one eighth of network paths. The selection spin bit independently, this ensures that the spin bit signal is
process performed at the beginning of the connection SHOULD be disabled on approximately one in eight network paths.
applied for all paths used by the connection.
When the spin bit is disabled, endpoints MAY set the spin bit to any When the spin bit is disabled, endpoints MAY set the spin bit to any
value, and MUST ignore any incoming value. It is RECOMMENDED that value, and MUST ignore any incoming value. It is RECOMMENDED that
endpoints set the spin bit to a random value either chosen endpoints set the spin bit to a random value either chosen
independently for each packet or chosen independently for each independently for each packet or chosen independently for each
connection ID. connection ID.
If the spin bit is enabled for the connection, the endpoint maintains If the spin bit is enabled for the connection, the endpoint maintains
a spin value and sets the spin bit in the short header to the a spin value and sets the spin bit in the short header to the
currently stored value when a packet with a short header is sent out. currently stored value when a packet with a short header is sent out.
skipping to change at page 100, line 44 skipping to change at page 106, line 41
With this mechanism, the server reflects the spin value received, With this mechanism, the server reflects the spin value received,
while the client 'spins' it after one RTT. On-path observers can while the client 'spins' it after one RTT. On-path observers can
measure the time between two spin bit toggle events to estimate the measure the time between two spin bit toggle events to estimate the
end-to-end RTT of a connection. end-to-end RTT of a connection.
18. Transport Parameter Encoding 18. Transport Parameter Encoding
The "extension_data" field of the quic_transport_parameters extension The "extension_data" field of the quic_transport_parameters extension
defined in [QUIC-TLS] contains the QUIC transport parameters. They defined in [QUIC-TLS] contains the QUIC transport parameters. They
are encoded as a length-prefixed sequence of transport parameters, as are encoded as a length-prefixed sequence of transport parameters, as
shown in Figure 15: shown in Figure 16:
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 Length (16) | | Sequence Length (16) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Transport Parameter 1 (*) ... | Transport Parameter 1 (*) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Transport Parameter 2 (*) ... | Transport Parameter 2 (*) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
... ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Transport Parameter N (*) ... | Transport Parameter N (*) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 15: Sequence of Transport Parameters Figure 16: Sequence of Transport Parameters
The Sequence Length field contains the length of the sequence of The Sequence Length field contains the length of the sequence of
transport parameters, in bytes. Each transport parameter is encoded transport parameters, in bytes. Each transport parameter is encoded
as an (identifier, length, value) tuple, as shown in Figure 16: as an (identifier, length, value) tuple, as shown in Figure 17:
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Transport Parameter ID (16) | Transport Param Length (16) | | Transport Parameter ID (16) | Transport Param Length (16) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Transport Parameter Value (*) ... | Transport Parameter Value (*) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 16: Transport Parameter Encoding Figure 17: Transport Parameter Encoding
The Transport Param Length field contains the length of the Transport The Transport Param Length field contains the length of the Transport
Parameter Value field. Parameter Value field.
QUIC encodes transport parameters into a sequence of bytes, which are QUIC encodes transport parameters into a sequence of bytes, which are
then included in the cryptographic handshake. then included in the cryptographic handshake.
18.1. Reserved Transport Parameters 18.1. Reserved Transport Parameters
Transport parameters with an identifier of the form "31 * N + 27" for Transport parameters with an identifier of the form "31 * N + 27" for
skipping to change at page 102, line 20 skipping to change at page 108, line 20
The following transport parameters are defined: The following transport parameters are defined:
original_connection_id (0x0000): The value of the Destination original_connection_id (0x0000): The value of the Destination
Connection ID field from the first Initial packet sent by the Connection ID field from the first Initial packet sent by the
client. This transport parameter is only sent by a server. This client. This transport parameter is only sent by a server. This
is the same value sent in the "Original Destination Connection ID" is the same value sent in the "Original Destination Connection ID"
field of a Retry packet (see Section 17.2.5). A server MUST field of a Retry packet (see Section 17.2.5). A server MUST
include the original_connection_id transport parameter if it sent include the original_connection_id transport parameter if it sent
a Retry packet. a Retry packet.
idle_timeout (0x0001): The idle timeout is a value in milliseconds max_idle_timeout (0x0001): The max idle timeout is a value in
that is encoded as an integer; see (Section 10.2). If this milliseconds that is encoded as an integer; see (Section 10.2).
parameter is absent or zero then the idle timeout is disabled. Idle timeout is disabled when both endpoints omit this transport
parameteter or specify a value of 0.
stateless_reset_token (0x0002): A stateless reset token is used in stateless_reset_token (0x0002): A stateless reset token is used in
verifying a stateless reset; see Section 10.4. This parameter is verifying a stateless reset; see Section 10.4. This parameter is
a sequence of 16 bytes. This transport parameter MUST NOT be sent a sequence of 16 bytes. This transport parameter MUST NOT be sent
by a client, but MAY be sent by a server. A server that does not by a client, but MAY be sent by a server. A server that does not
send this transport parameter cannot use stateless reset send this transport parameter cannot use stateless reset
(Section 10.4) for the connection ID negotiated during the (Section 10.4) for the connection ID negotiated during the
handshake. handshake.
max_packet_size (0x0003): The maximum packet size parameter is an max_packet_size (0x0003): The maximum packet size parameter is an
skipping to change at page 104, line 19 skipping to change at page 110, line 20
transport parameter is included if the endpoint does not support transport parameter is included if the endpoint does not support
active connection migration (Section 9). Peers of an endpoint active connection migration (Section 9). Peers of an endpoint
that sets this transport parameter MUST NOT send any packets, that sets this transport parameter MUST NOT send any packets,
including probing packets (Section 9.1), from a local address or including probing packets (Section 9.1), from a local address or
port other than that used to perform the handshake. This port other than that used to perform the handshake. This
parameter is a zero-length value. parameter is a zero-length value.
preferred_address (0x000d): The server's preferred address is used preferred_address (0x000d): 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 9.6. The format of this transport as described in Section 9.6. The format of this transport
parameter is shown in Figure 17. This transport parameter is only parameter is shown in Figure 18. This transport parameter is only
sent by a server. Servers MAY choose to only send a preferred sent by a server. Servers MAY choose to only send a preferred
address of one address family by sending an all-zero address and address of one address family by sending an all-zero address and
port (0.0.0.0:0 or ::.0) for the other family. IP addresses are port (0.0.0.0:0 or ::.0) for the other family. IP addresses are
encoded in network byte order. The CID Length field contains the encoded in network byte order. The CID Length field contains the
length of the Connection ID field. length of the Connection ID field.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IPv4 Address (32) | | IPv4 Address (32) |
skipping to change at page 105, line 35 skipping to change at page 111, line 35
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
+ + + +
| | | |
+ Stateless Reset Token (128) + + Stateless Reset Token (128) +
| | | |
+ + + +
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 17: Preferred Address format Figure 18: Preferred Address format
active_connection_id_limit (0x000e): The maximum number of active_connection_id_limit (0x000e): The maximum number of
connection IDs from the peer that an endpoint is willing to store. connection IDs from the peer that an endpoint is willing to store.
This value includes only connection IDs sent in NEW_CONNECTION_ID This value includes the connection ID received during the
frames. If this parameter is absent, a default of 0 is assumed. handshake, that received in the preferred_address transport
parameter, and those received in NEW_CONNECTION_ID frames. Unless
a zero-length connection ID is being used, the value of the
active_connection_id_limit parameter MUST be no less than 2. If
this transport parameter is absent, a default of 2 is assumed.
When a zero-length connection ID is being used, the
active_connection_id_limit parameter MUST NOT be sent.
If present, transport parameters that set initial flow control limits If present, transport parameters that set initial flow control limits
(initial_max_stream_data_bidi_local, (initial_max_stream_data_bidi_local,
initial_max_stream_data_bidi_remote, and initial_max_stream_data_uni) initial_max_stream_data_bidi_remote, and initial_max_stream_data_uni)
are equivalent to sending a MAX_STREAM_DATA frame (Section 19.10) on are equivalent to sending a MAX_STREAM_DATA frame (Section 19.10) on
every stream of the corresponding type immediately after opening. If every stream of the corresponding type immediately after opening. If
the transport parameter is absent, streams of that type start with a the transport parameter is absent, streams of that type start with a
flow control limit of 0. flow control limit of 0.
A client MUST NOT include server-only transport parameters A client MUST NOT include server-only transport parameters
skipping to change at page 106, line 42 skipping to change at page 112, line 48
The PING frame can be used to keep a connection alive when an The PING frame can be used to keep a connection alive when an
application or application protocol wishes to prevent the connection application or application protocol wishes to prevent the connection
from timing out. An application protocol SHOULD provide guidance from timing out. An application protocol SHOULD provide guidance
about the conditions under which generating a PING is recommended. about the conditions under which generating a PING is recommended.
This guidance SHOULD indicate whether it is the client or the server This guidance SHOULD indicate whether it is the client or the server
that is expected to send the PING. Having both endpoints send PING that is expected to send the PING. Having both endpoints send PING
frames without coordination can produce an excessive number of frames without coordination can produce an excessive number of
packets and poor performance. packets and poor performance.
A connection will time out if no packets are sent or received for a A connection will time out if no packets are sent or received for a
period longer than the time specified in the idle_timeout transport period longer than the time negotiated using the max_idle_timeout
parameter (see Section 10). However, state in middleboxes might time transport parameter (see Section 10). However, state in middleboxes
out earlier than that. Though REQ-5 in [RFC4787] recommends a 2 might time out earlier than that. Though REQ-5 in [RFC4787]
minute timeout interval, experience shows that sending packets every recommends a 2 minute timeout interval, experience shows that sending
15 to 30 seconds is necessary to prevent the majority of middleboxes packets every 15 to 30 seconds is necessary to prevent the majority
from losing state for UDP flows. of middleboxes from losing state for UDP flows.
19.3. ACK Frames 19.3. ACK Frames
Receivers send ACK frames (types 0x02 and 0x03) to inform senders of Receivers send ACK frames (types 0x02 and 0x03) to inform senders of
packets they have received and processed. The ACK frame contains one packets they have received and processed. The ACK frame contains one
or more ACK Ranges. ACK Ranges identify acknowledged packets. If or more ACK Ranges. ACK Ranges identify acknowledged packets. If
the frame type is 0x03, ACK frames also contain the sum of QUIC the frame type is 0x03, ACK frames also contain the sum of QUIC
packets with associated ECN marks received on the connection up until packets with associated ECN marks received on the connection up until
this point. QUIC implementations MUST properly handle both types this point. QUIC implementations MUST properly handle both types
and, if they have enabled ECN for packets they send, they SHOULD use and, if they have enabled ECN for packets they send, they SHOULD use
the information in the ECN section to manage their congestion state. the information in the ECN section to manage their congestion state.
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 Packets from different packet number spaces can be identified using
different packet number spaces. ACK frames only acknowledge the the same numeric value. An acknowledgment for a packet needs to
packet numbers that were transmitted by the sender in the same packet indicate both a packet number and a packet number space. This is
number space of the packet that the ACK was received in. accomplished by having each ACK frame only acknowledge packet numbers
in the same space as the packet in which the ACK frame is contained.
Version Negotiation and Retry packets cannot be acknowledged because Version Negotiation and Retry packets cannot be acknowledged because
they do not contain a packet number. Rather than relying on ACK they do not contain a packet number. Rather than relying on ACK
frames, these packets are implicitly acknowledged by the next Initial frames, these packets are implicitly acknowledged by the next Initial
packet sent by the client. packet sent by the client.
An ACK frame is as follows: An ACK frame is shown in Figure 19.
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 Range Count (i) ... | ACK Range Count (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| First ACK Range (i) ... | First ACK Range (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ACK Ranges (*) ... | ACK Ranges (*) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| [ECN Counts] ... | [ECN Counts] ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 18: ACK Frame Format Figure 19: ACK Frame Format
ACK frames contain the following fields: ACK frames contain the following fields:
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 representing the time delta in ACK Delay: A variable-length integer representing the time delta in
skipping to change at page 108, line 47 skipping to change at page 114, line 49
ECN Counts: The three ECN Counts; see Section 19.3.2. ECN Counts: The three ECN Counts; see Section 19.3.2.
19.3.1. ACK Ranges 19.3.1. ACK Ranges
The ACK Ranges field consists of alternating Gap and ACK Range values The ACK Ranges field consists of alternating Gap and ACK Range values
in descending packet number order. The number of Gap and ACK Range in descending packet number order. The number of Gap and ACK Range
values is determined by the ACK Range Count field; one of each value values is determined by the ACK Range Count field; one of each value
is present for each value in the ACK Range Count field. is present for each value in the ACK Range Count field.
ACK Ranges are structured as follows: ACK Ranges are structured as shown in Figure 20.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| [Gap (i)] ... | [Gap (i)] ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| [ACK Range (i)] ... | [ACK Range (i)] ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| [Gap (i)] ... | [Gap (i)] ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| [ACK Range (i)] ... | [ACK Range (i)] ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
... ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| [Gap (i)] ... | [Gap (i)] ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| [ACK Range (i)] ... | [ACK Range (i)] ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 19: ACK Ranges Figure 20: ACK Ranges
The fields that form the ACK Ranges are: The fields that form the ACK Ranges are:
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 Range. lower than the smallest in the preceding ACK Range.
ACK Range (repeated): A variable-length integer indicating the ACK Range (repeated): A variable-length integer indicating the
number of contiguous acknowledged packets preceding the largest number of contiguous acknowledged packets preceding the largest
packet number, as determined by the preceding Gap. packet number, as determined by the preceding Gap.
skipping to change at page 110, line 28 skipping to change at page 116, line 28
a connection error of type FRAME_ENCODING_ERROR. a connection error of type FRAME_ENCODING_ERROR.
19.3.2. ECN Counts 19.3.2. ECN Counts
The ACK frame uses the least significant bit (that is, type 0x03) to The ACK frame uses the least significant bit (that is, type 0x03) to
indicate ECN feedback and report receipt of QUIC packets with indicate ECN feedback and report receipt of QUIC packets with
associated ECN codepoints of ECT(0), ECT(1), or CE in the packet's IP associated ECN codepoints of ECT(0), ECT(1), or CE in the packet's IP
header. ECN Counts are only present when the ACK frame type is 0x03. header. ECN Counts are only present when the ACK frame type is 0x03.
ECN Counts are only parsed when the ACK frame type is 0x03. There ECN Counts are only parsed when the ACK frame type is 0x03. There
are 3 ECN counts, as follows: are 3 ECN counts, as shown in Figure 21.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ECT(0) Count (i) ... | ECT(0) Count (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ECT(1) Count (i) ... | ECT(1) Count (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ECN-CE Count (i) ... | ECN-CE Count (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 21: ECN Count Format
The three ECN Counts are: The three ECN Counts are:
ECT(0) Count: A variable-length integer representing the total ECT(0) Count: A variable-length integer representing the total
number of packets received with the ECT(0) codepoint in the packet number of packets received with the ECT(0) codepoint in the packet
number space of the ACK frame. number space of the ACK frame.
ECT(1) Count: A variable-length integer representing the total ECT(1) Count: A variable-length integer representing the total
number of packets received with the ECT(1) codepoint in the packet number of packets received with the ECT(1) codepoint in the packet
number space of the ACK frame. number space of the ACK frame.
skipping to change at page 111, line 20 skipping to change at page 117, line 24
terminate the sending part of a stream. terminate the sending part of a stream.
After sending a RESET_STREAM, an endpoint ceases transmission and After sending a RESET_STREAM, an endpoint ceases transmission and
retransmission of STREAM frames on the identified stream. A receiver retransmission of STREAM frames on the identified stream. A receiver
of RESET_STREAM can discard any data that it already received on that of RESET_STREAM can discard any data that it already received on that
stream. stream.
An endpoint that receives a RESET_STREAM frame for a send-only stream An endpoint that receives a RESET_STREAM frame for a send-only stream
MUST terminate the connection with error STREAM_STATE_ERROR. MUST terminate the connection with error STREAM_STATE_ERROR.
The RESET_STREAM frame is as follows: The RESET_STREAM frame is shown in Figure 22.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Stream ID (i) ... | Stream ID (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Application Error Code (i) ... | Application Error Code (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Final Size (i) ... | Final Size (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 22: RESET_STREAM Frame Format
RESET_STREAM frames contain the following fields: RESET_STREAM frames contain the following fields:
Stream ID: A variable-length integer encoding of the Stream ID of Stream ID: A variable-length integer encoding of the Stream ID of
the stream being terminated. the stream being terminated.
Application Protocol Error Code: A variable-length integer Application Protocol Error Code: A variable-length integer
containing the application protocol error code (see Section 20.1) containing the application protocol error code (see Section 20.1)
which indicates why the stream is being closed. which indicates why the stream is being closed.
Final Size: A variable-length integer indicating the final size of Final Size: A variable-length integer indicating the final size of
skipping to change at page 112, line 8 skipping to change at page 118, line 18
incoming data is being discarded on receipt at application request. incoming data is being discarded on receipt at application request.
STOP_SENDING requests that a peer cease transmission on a stream. STOP_SENDING requests that a peer cease transmission on a stream.
A STOP_SENDING frame can be sent for streams in the Recv or Size A STOP_SENDING frame can be sent for streams in the Recv or Size
Known states (see Section 3.1). Receiving a STOP_SENDING frame for a Known states (see Section 3.1). Receiving a STOP_SENDING frame for a
locally-initiated stream that has not yet been created MUST be locally-initiated stream that has not yet been created MUST be
treated as a connection error of type STREAM_STATE_ERROR. An treated as a connection error of type STREAM_STATE_ERROR. An
endpoint that receives a STOP_SENDING frame for a receive-only stream endpoint that receives a STOP_SENDING frame for a receive-only stream
MUST terminate the connection with error STREAM_STATE_ERROR. MUST terminate the connection with error STREAM_STATE_ERROR.
The STOP_SENDING frame is as follows: The STOP_SENDING frame is shown in Figure 23.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Stream ID (i) ... | Stream ID (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Application Error Code (i) ... | Application Error Code (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 23: STOP_SENDING Frame Format
STOP_SENDING frames contain the following fields: STOP_SENDING frames contain the following fields:
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 variable-length integer containing the Application Error Code: A variable-length integer containing the
application-specified reason the sender is ignoring the stream application-specified reason the sender is ignoring the stream
(see Section 20.1). (see Section 20.1).
19.6. CRYPTO Frame 19.6. CRYPTO Frame
The CRYPTO frame (type=0x06) is used to transmit cryptographic The CRYPTO frame (type=0x06) is used to transmit cryptographic
handshake messages. It can be sent in all packet types except 0-RTT. handshake messages. It can be sent in all packet types except 0-RTT.
The CRYPTO frame offers the cryptographic protocol an in-order stream The CRYPTO frame offers the cryptographic protocol an in-order stream
of bytes. CRYPTO frames are functionally identical to STREAM frames, of bytes. CRYPTO frames are functionally identical to STREAM frames,
except that they do not bear a stream identifier; they are not flow except that they do not bear a stream identifier; they are not flow
controlled; and they do not carry markers for optional offset, controlled; and they do not carry markers for optional offset,
optional length, and the end of the stream. optional length, and the end of the stream.
The CRYPTO frame is as follows: The CRYPTO frame is shown in Figure 24.
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 20: CRYPTO Frame Format Figure 24: CRYPTO Frame Format
CRYPTO frames contain the following fields: CRYPTO frames contain 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.
There is a separate flow of cryptographic handshake data in each There is a separate flow of cryptographic handshake data in each
encryption level, each of which starts at an offset of 0. This encryption level, each of which starts at an offset of 0. This
implies that each encryption level is treated as a separate CRYPTO implies that each encryption level is treated as a separate CRYPTO
stream of data. stream of data.
The largest offset delivered on a stream - the sum of the offset and The largest offset delivered on a stream - the sum of the offset and
data length - cannot exceed 2^62-1. Receipt of a frame that exceeds data length - cannot exceed 2^62-1. Receipt of a frame that exceeds
this limit MUST be treated as a connection error of type this limit MUST be treated as a connection error of type
FRAME_ENCODING_ERROR. FRAME_ENCODING_ERROR or CRYPTO_BUFFER_EXCEEDED.
Unlike STREAM frames, which include a Stream ID indicating to which Unlike STREAM frames, which include a Stream ID indicating to which
stream the data belongs, the CRYPTO frame carries data for a single stream the data belongs, the CRYPTO frame carries data for a single
stream per encryption level. The stream does not have an explicit stream per encryption level. The stream does not have an explicit
end, so CRYPTO frames do not have a FIN bit. end, so CRYPTO frames do not have a FIN bit.
19.7. NEW_TOKEN Frame 19.7. NEW_TOKEN Frame
A server sends a NEW_TOKEN frame (type=0x07) to provide the client A server sends a NEW_TOKEN frame (type=0x07) to provide the client
with a token to send in the header of an Initial packet for a future with a token to send in the header of an Initial packet for a future
connection. connection.
The NEW_TOKEN frame is as follows: The NEW_TOKEN frame is shown in Figure 25.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Token Length (i) ... | Token Length (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Token (*) ... | Token (*) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 25: NEW_TOKEN Frame Format
NEW_TOKEN frames contain the following fields: NEW_TOKEN frames contain the following fields:
Token Length: A variable-length integer specifying the length of the Token Length: A variable-length integer specifying the length of the
token in bytes. token in bytes.
Token: An opaque blob that the client may use with a future Initial Token: An opaque blob that the client may use with a future Initial
packet. The token MUST NOT be empty. An endpoint MUST treat packet. The token MUST NOT be empty. An endpoint MUST treat
receipt of a NEW_TOKEN frame with an empty Token field as a receipt of a NEW_TOKEN frame with an empty Token field as a
connection error of type FRAME_ENCODING_ERROR. connection error of type FRAME_ENCODING_ERROR.
An endpoint might receive multiple NEW_TOKEN frames that contain the An endpoint might receive multiple NEW_TOKEN frames that contain the
same token value. Endpoints are responsible for discarding duplicate same token value if packets containing the frame are incorrectly
values, which might be used to link connection attempts; see determined to be lost. Endpoints are responsible for discarding
Section 8.1.2. duplicate values, which might be used to link connection attempts;
see Section 8.1.3.
Clients MUST NOT send NEW_TOKEN frames. Servers MUST treat receipt Clients MUST NOT send NEW_TOKEN frames. Servers MUST treat receipt
of a NEW_TOKEN frame as a connection error of type of a NEW_TOKEN frame as a connection error of type
PROTOCOL_VIOLATION. PROTOCOL_VIOLATION.
19.8. STREAM Frames 19.8. STREAM Frames
STREAM frames implicitly create a stream and carry stream data. The STREAM frames implicitly create a stream and carry stream data. The
STREAM frame takes the form 0b00001XXX (or the set of values from STREAM frame takes the form 0b00001XXX (or the set of values from
0x08 to 0x0f). The value of the three low-order bits of the frame 0x08 to 0x0f). The value of the three low-order bits of the frame
type determines the fields that are present in the frame. type determines the fields that are present in the frame.
o The OFF bit (0x04) in the frame type is set to indicate that there * The OFF bit (0x04) in the frame type is set to indicate that there
is an Offset field present. When set to 1, the Offset field is is an Offset field present. When set to 1, the Offset field is
present. When set to 0, the Offset field is absent and the Stream present. When set to 0, the Offset field is absent and the Stream
Data starts at an offset of 0 (that is, the frame contains the Data starts at an offset of 0 (that is, the frame contains the
first bytes of the stream, or the end of a stream that includes no first bytes of the stream, or the end of a stream that includes no
data). data).
o The LEN bit (0x02) in the frame type is set to indicate that there * The LEN bit (0x02) in the frame type is set to indicate that there
is a Length field present. If this bit is set to 0, the Length is a Length field present. If this bit is set to 0, the Length
field is absent and the Stream Data field extends to the end of field is absent and the Stream Data field extends to the end of
the packet. If this bit is set to 1, the Length field is present. the packet. If this bit is set to 1, the Length field is present.
o The FIN bit (0x01) of the frame type is set only on frames that * The FIN bit (0x01) of the frame type is set only on frames that
contain the final size of the stream. Setting this bit indicates contain the final size of the stream. Setting this bit indicates
that the frame marks the end of the stream. that the frame marks the end of the stream.
An endpoint that receives a STREAM frame for a send-only stream MUST An endpoint that receives a STREAM frame for a send-only stream MUST
terminate the connection with error STREAM_STATE_ERROR. terminate the connection with error STREAM_STATE_ERROR.
The STREAM frames are as follows: The STREAM frames are shown in Figure 26.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Stream ID (i) ... | Stream ID (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| [Offset (i)] ... | [Offset (i)] ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| [Length (i)] ... | [Length (i)] ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Stream Data (*) ... | Stream Data (*) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 21: STREAM Frame Format Figure 26: STREAM Frame Format
STREAM frames contain the following fields: STREAM frames contain 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 2.1). stream (see Section 2.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 115, line 52 skipping to change at page 122, line 13
credit for that data. Receipt of a frame that exceeds this limit credit for that data. Receipt of a frame that exceeds this limit
MUST be treated as a connection error of type FRAME_ENCODING_ERROR or MUST be treated as a connection error of type FRAME_ENCODING_ERROR or
FLOW_CONTROL_ERROR. FLOW_CONTROL_ERROR.
19.9. MAX_DATA Frame 19.9. MAX_DATA Frame
The MAX_DATA frame (type=0x10) is used in flow control to inform the The MAX_DATA frame (type=0x10) is used in flow control to inform the
peer of the maximum amount of data that can be sent on the connection peer of the maximum amount of data that can be sent on the connection
as a whole. as a whole.
The MAX_DATA frame is as follows: The MAX_DATA frame is shown in Figure 27.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Maximum Data (i) ... | Maximum Data (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 27: MAX_DATA Frame Format
MAX_DATA frames contain the following fields: MAX_DATA frames contain the following fields:
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 bytes. of bytes.
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 FLOW_CONTROL_ERROR An endpoint MUST terminate a connection with a FLOW_CONTROL_ERROR
skipping to change at page 116, line 38 skipping to change at page 122, line 50
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.
A MAX_STREAM_DATA frame can be sent for streams in the Recv state A MAX_STREAM_DATA frame can be sent for streams in the Recv state
(see Section 3.1). Receiving a MAX_STREAM_DATA frame for a locally- (see Section 3.1). Receiving a MAX_STREAM_DATA frame for a locally-
initiated stream that has not yet been created MUST be treated as a initiated stream that has not yet been created MUST be treated as a
connection error of type STREAM_STATE_ERROR. An endpoint that connection error of type STREAM_STATE_ERROR. An endpoint that
receives a MAX_STREAM_DATA frame for a receive-only stream MUST receives a MAX_STREAM_DATA frame for a receive-only stream MUST
terminate the connection with error STREAM_STATE_ERROR. terminate the connection with error STREAM_STATE_ERROR.
The MAX_STREAM_DATA frame is as follows: The MAX_STREAM_DATA frame is shown in Figure 28.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Stream ID (i) ... | Stream ID (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Maximum Stream Data (i) ... | Maximum Stream Data (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 28: MAX_STREAM_DATA Frame Format
MAX_STREAM_DATA frames contain the following fields: MAX_STREAM_DATA frames contain the following fields:
Stream ID: The stream ID of the stream that is affected encoded as a Stream ID: The stream ID of the stream that is affected encoded as a
variable-length integer. variable-length integer.
Maximum Stream Data: A variable-length integer indicating the Maximum Stream Data: A variable-length integer indicating the
maximum amount of data that can be sent on the identified stream, maximum amount of data that can be sent on the identified stream,
in units of bytes. in units of bytes.
When counting data toward this limit, an endpoint accounts for the When counting data toward this limit, an endpoint accounts for the
skipping to change at page 117, line 31 skipping to change at page 123, line 46
limits (see Section 7.3.1). limits (see Section 7.3.1).
19.11. MAX_STREAMS Frames 19.11. MAX_STREAMS Frames
The MAX_STREAMS frames (type=0x12 and 0x13) inform the peer of the The MAX_STREAMS frames (type=0x12 and 0x13) inform the peer of the
cumulative number of streams of a given type it is permitted to open. cumulative number of streams of a given type it is permitted to open.
A MAX_STREAMS frame with a type of 0x12 applies to bidirectional A MAX_STREAMS frame with a type of 0x12 applies to bidirectional
streams, and a MAX_STREAMS frame with a type of 0x13 applies to streams, and a MAX_STREAMS frame with a type of 0x13 applies to
unidirectional streams. unidirectional streams.
The MAX_STREAMS frames are as follows: The MAX_STREAMS frames are shown in Figure 29;
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Maximum Streams (i) ... | Maximum Streams (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 29: MAX_STREAMS Frame Format
MAX_STREAMS frames contain the following fields: MAX_STREAMS frames contain the following fields:
Maximum Streams: A count of the cumulative number of streams of the Maximum Streams: A count of the cumulative number of streams of the
corresponding type that can be opened over the lifetime of the corresponding type that can be opened over the lifetime of the
connection. Stream IDs cannot exceed 2^62-1, as it is not connection. Stream IDs cannot exceed 2^62-1, as it is not
possible to encode stream IDs larger than this value. Receipt of possible to encode stream IDs larger than this value. Receipt of
a frame that permits opening of a stream larger than this limit a frame that permits opening of a stream larger than this limit
MUST be treated as a FRAME_ENCODING_ERROR. MUST be treated as a FRAME_ENCODING_ERROR.
skipping to change at page 118, line 24 skipping to change at page 124, line 39
concurrently. The limit includes streams that have been closed as concurrently. The limit includes streams that have been closed as
well as those that are open. well as those that are open.
19.12. DATA_BLOCKED Frame 19.12. DATA_BLOCKED Frame
A sender SHOULD send a DATA_BLOCKED frame (type=0x14) when it wishes A sender SHOULD send a DATA_BLOCKED frame (type=0x14) when it wishes
to send data, but is unable to due to connection-level flow control to send data, but is unable to due to connection-level flow control
(see Section 4). DATA_BLOCKED frames can be used as input to tuning (see Section 4). DATA_BLOCKED frames can be used as input to tuning
of flow control algorithms (see Section 4.2). of flow control algorithms (see Section 4.2).
The DATA_BLOCKED frame is as follows: The DATA_BLOCKED frame is shown in Figure 30.
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 Limit (i) ... | Data Limit (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 30: DATA_BLOCKED Frame Format
DATA_BLOCKED frames contain the following fields: DATA_BLOCKED frames contain the following fields:
Data Limit: A variable-length integer indicating the connection- Data Limit: A variable-length integer indicating the connection-
level limit at which blocking occurred. level limit at which blocking occurred.
19.13. STREAM_DATA_BLOCKED Frame 19.13. STREAM_DATA_BLOCKED Frame
A sender SHOULD send a STREAM_DATA_BLOCKED frame (type=0x15) when it A sender SHOULD send a STREAM_DATA_BLOCKED frame (type=0x15) when it
wishes to send data, but is unable to due to stream-level flow wishes to send data, but is unable to due to stream-level flow
control. This frame is analogous to DATA_BLOCKED (Section 19.12). control. This frame is analogous to DATA_BLOCKED (Section 19.12).
An endpoint that receives a STREAM_DATA_BLOCKED frame for a send-only An endpoint that receives a STREAM_DATA_BLOCKED frame for a send-only
stream MUST terminate the connection with error STREAM_STATE_ERROR. stream MUST terminate the connection with error STREAM_STATE_ERROR.
The STREAM_DATA_BLOCKED frame is as follows: The STREAM_DATA_BLOCKED frame is shown in Figure 31.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Stream ID (i) ... | Stream ID (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Stream Data Limit (i) ... | Stream Data Limit (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 31: STREAM_DATA_BLOCKED Frame Format
STREAM_DATA_BLOCKED frames contain the following fields: STREAM_DATA_BLOCKED frames contain the following fields:
Stream ID: A variable-length integer indicating the stream which is Stream ID: A variable-length integer indicating the stream which is
flow control blocked. flow control blocked.
Stream Data Limit: A variable-length integer indicating the offset Stream Data Limit: A variable-length integer indicating the offset
of the stream at which the blocking occurred. of the stream at which the blocking occurred.
19.14. STREAMS_BLOCKED Frames 19.14. STREAMS_BLOCKED Frames
skipping to change at page 119, line 34 skipping to change at page 125, line 50
it wishes to open a stream, but is unable to due to the maximum it wishes to open a stream, but is unable to due to the maximum
stream limit set by its peer (see Section 19.11). A STREAMS_BLOCKED stream limit set by its peer (see Section 19.11). A STREAMS_BLOCKED
frame of type 0x16 is used to indicate reaching the bidirectional frame of type 0x16 is used to indicate reaching the bidirectional
stream limit, and a STREAMS_BLOCKED frame of type 0x17 indicates stream limit, and a STREAMS_BLOCKED frame of type 0x17 indicates
reaching the unidirectional stream limit. reaching the unidirectional stream limit.
A STREAMS_BLOCKED frame does not open the stream, but informs the A STREAMS_BLOCKED frame does not open the stream, but informs the
peer that a new stream was needed and the stream limit prevented the peer that a new stream was needed and the stream limit prevented the
creation of the stream. creation of the stream.
The STREAMS_BLOCKED frames are as follows: The STREAMS_BLOCKED frames are shown in Figure 32.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Stream Limit (i) ... | Stream Limit (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 32: STREAMS_BLOCKED Frame Format
STREAMS_BLOCKED frames contain the following fields: STREAMS_BLOCKED frames contain the following fields:
Stream Limit: A variable-length integer indicating the stream limit Stream Limit: A variable-length integer indicating the stream limit
at the time the frame was sent. Stream IDs cannot exceed 2^62-1, at the time the frame was sent. Stream IDs cannot exceed 2^62-1,
as it is not possible to encode stream IDs larger than this value. as it is not possible to encode stream IDs larger than this value.
Receipt of a frame that encodes a larger stream ID MUST be treated Receipt of a frame that encodes a larger stream ID MUST be treated
as a STREAM_LIMIT_ERROR or a FRAME_ENCODING_ERROR. as a STREAM_LIMIT_ERROR or a FRAME_ENCODING_ERROR.
19.15. NEW_CONNECTION_ID Frame 19.15. NEW_CONNECTION_ID Frame
An endpoint sends a NEW_CONNECTION_ID frame (type=0x18) to provide An endpoint sends a NEW_CONNECTION_ID frame (type=0x18) 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 9.5). linkability when migrating connections (see Section 9.5).
The NEW_CONNECTION_ID frame is as follows: The NEW_CONNECTION_ID frame is shown in Figure 33.
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 Number (i) ... | Sequence Number (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Retire Prior To (i) ... | Retire Prior To (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Length (8) | | | Length (8) | |
+-+-+-+-+-+-+-+-+ Connection ID (8..160) + +-+-+-+-+-+-+-+-+ Connection ID (8..160) +
skipping to change at page 120, line 33 skipping to change at page 126, line 49
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
+ + + +
| | | |
+ Stateless Reset Token (128) + + Stateless Reset Token (128) +
| | | |
+ + + +
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 33: NEW_CONNECTION_ID Frame Format
NEW_CONNECTION_ID frames contain the following fields: NEW_CONNECTION_ID frames contain the following fields:
Sequence Number: The sequence number assigned to the connection ID Sequence Number: The sequence number assigned to the connection ID
by the sender. See Section 5.1.1. by the sender. See Section 5.1.1.
Retire Prior To: A variable-length integer indicating which Retire Prior To: A variable-length integer indicating which
connection IDs should be retired. See Section 5.1.2. connection IDs should be retired. See Section 5.1.2.
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 1 and greater than 20 are invalid connection ID. Values less than 1 and greater than 20 are invalid
skipping to change at page 121, line 25 skipping to change at page 127, line 42
of the same frame multiple times MUST NOT be treated as a connection of the same frame multiple times MUST NOT be treated as a connection
error. A receiver can use the sequence number supplied in the error. A receiver can use the sequence number supplied in the
NEW_CONNECTION_ID frame to identify new connection IDs from old ones. NEW_CONNECTION_ID frame to identify new connection IDs from old ones.
If an endpoint receives a NEW_CONNECTION_ID frame that repeats a If an endpoint receives a NEW_CONNECTION_ID frame that repeats a
previously issued connection ID with a different Stateless Reset previously issued connection ID with a different Stateless Reset
Token or a different sequence number, or if a sequence number is used Token or a different sequence number, or if a sequence number is used
for different connection IDs, the endpoint MAY treat that receipt as for different connection IDs, the endpoint MAY treat that receipt as
a connection error of type PROTOCOL_VIOLATION. a connection error of type PROTOCOL_VIOLATION.
The Retire Prior To field is a request for the peer to retire all The Retire Prior To field counts connection IDs established during
connection IDs with a sequence number less than the specified value. connection setup and the preferred_address transport parameter (see
This includes the initial and preferred_address transport parameter Section 5.1.2). The Retire Prior To field MUST be less than or equal
connection IDs. The peer SHOULD retire the corresponding connection to the Sequence Number field. Receiving a value greater than the
IDs and send the corresponding RETIRE_CONNECTION_ID frames in a Sequence Number MUST be treated as a connection error of type
timely manner. FRAME_ENCODING_ERROR.
The Retire Prior To field MUST be less than or equal to the Sequence
Number field. Receiving a value greater than the Sequence Number
MUST be treated as a connection error of type FRAME_ENCODING_ERROR.
Once a sender indicates a Retire Prior To value, smaller values sent Once a sender indicates a Retire Prior To value, smaller values sent
in subsequent NEW_CONNECTION_ID frames have no effect. A receiver in subsequent NEW_CONNECTION_ID frames have no effect. A receiver
MUST ignore any Retire Prior To fields that do not increase the MUST ignore any Retire Prior To fields that do not increase the
largest received Retire Prior To value. largest received Retire Prior To value.
An endpoint that receives a NEW_CONNECTION_ID frame with a sequence
number smaller than the Retire Prior To field of a previously
received NEW_CONNECTION_ID frame MUST immediately send a
corresponding RETIRE_CONNECTION_ID frame that retires the newly
received connection ID.
19.16. RETIRE_CONNECTION_ID Frame 19.16. RETIRE_CONNECTION_ID Frame
An endpoint sends a RETIRE_CONNECTION_ID frame (type=0x19) to An endpoint sends a RETIRE_CONNECTION_ID frame (type=0x19) to
indicate that it will no longer use a connection ID that was issued 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 by its peer. This may include the connection ID provided during the
handshake. Sending a RETIRE_CONNECTION_ID frame also serves as a handshake. Sending a RETIRE_CONNECTION_ID frame also serves as a
request to the peer to send additional connection IDs for future use request to the peer to send additional connection IDs for future use
(see Section 5.1). New connection IDs can be delivered to a peer (see Section 5.1). New connection IDs can be delivered to a peer
using the NEW_CONNECTION_ID frame (Section 19.15). using the NEW_CONNECTION_ID frame (Section 19.15).
Retiring a connection ID invalidates the stateless reset token Retiring a connection ID invalidates the stateless reset token
associated with that connection ID. associated with that connection ID.
The RETIRE_CONNECTION_ID frame is as follows: The RETIRE_CONNECTION_ID frame is shown in Figure 34.
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 Number (i) ... | Sequence Number (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 34: RETIRE_CONNECTION_ID Frame Format
RETIRE_CONNECTION_ID frames contain the following fields: RETIRE_CONNECTION_ID frames contain the following fields:
Sequence Number: The sequence number of the connection ID being Sequence Number: The sequence number of the connection ID being
retired. See Section 5.1.2. retired. See Section 5.1.2.
Receipt of a RETIRE_CONNECTION_ID frame containing a sequence number Receipt of a RETIRE_CONNECTION_ID frame containing a sequence number
greater than any previously sent to the peer MAY be treated as a greater than any previously sent to the peer MUST be treated as a
connection error of type PROTOCOL_VIOLATION. connection error of type PROTOCOL_VIOLATION.
The sequence number specified in a RETIRE_CONNECTION_ID frame MUST The sequence number specified in a RETIRE_CONNECTION_ID frame MUST
NOT refer to the Destination Connection ID field of the packet in NOT refer to the Destination Connection ID field of the packet in
which the frame is contained. The peer MAY treat this as a which the frame is contained. The peer MAY treat this as a
connection error of type FRAME_ENCODING_ERROR. connection error of type FRAME_ENCODING_ERROR.
An endpoint cannot send this frame if it was provided with a zero- 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 by its peer. An endpoint that provides a zero-
length connection ID MUST treat receipt of a RETIRE_CONNECTION_ID length connection ID MUST treat receipt of a RETIRE_CONNECTION_ID
frame as a connection error of type PROTOCOL_VIOLATION. frame as a connection error of type PROTOCOL_VIOLATION.
19.17. PATH_CHALLENGE Frame 19.17. PATH_CHALLENGE Frame
Endpoints can use PATH_CHALLENGE frames (type=0x1a) to check Endpoints can use PATH_CHALLENGE frames (type=0x1a) to check
reachability to the peer and for path validation during connection reachability to the peer and for path validation during connection
migration. migration.
The PATH_CHALLENGE frames are as follows: The PATH_CHALLENGE frame is shown in Figure 35.
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 (64) + + Data (64) +
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 35: PATH_CHALLENGE Frame Format
PATH_CHALLENGE frames contain the following fields: PATH_CHALLENGE frames contain the following fields:
Data: This 8-byte field contains arbitrary data. Data: This 8-byte field contains arbitrary data.
A PATH_CHALLENGE frame containing 8 bytes that are hard to guess is A PATH_CHALLENGE frame containing 8 bytes that are hard to guess is
sufficient to ensure that it is easier to receive the packet than it sufficient to ensure that it is easier to receive the packet than it
is to guess the value correctly. is to guess the value correctly.
The recipient of this frame MUST generate a PATH_RESPONSE frame The recipient of this frame MUST generate a PATH_RESPONSE frame
(Section 19.18) containing the same Data. (Section 19.18) containing the same Data.
skipping to change at page 123, line 34 skipping to change at page 130, line 8
An endpoint sends a CONNECTION_CLOSE frame (type=0x1c or 0x1d) to An endpoint sends a CONNECTION_CLOSE frame (type=0x1c or 0x1d) to
notify its peer that the connection is being closed. The notify its peer that the connection is being closed. The
CONNECTION_CLOSE with a frame type of 0x1c is used to signal errors CONNECTION_CLOSE with a frame type of 0x1c is used to signal errors
at only the QUIC layer, or the absence of errors (with the NO_ERROR at only the QUIC layer, or the absence of errors (with the NO_ERROR
code). The CONNECTION_CLOSE frame with a type of 0x1d is used to code). The CONNECTION_CLOSE frame with a type of 0x1d is used to
signal an error with the application that uses QUIC. signal an error with the application that uses QUIC.
If there are open streams that haven't been explicitly closed, they If there are open streams that haven't been explicitly closed, they
are implicitly closed when the connection is closed. are implicitly closed when the connection is closed.
The CONNECTION_CLOSE frames are as follows: The CONNECTION_CLOSE frames are shown in Figure 36.
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 (i) ... | Error Code (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| [ Frame Type (i) ] ... | [ Frame Type (i) ] ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reason Phrase Length (i) ... | Reason Phrase Length (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reason Phrase (*) ... | Reason Phrase (*) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 36: CONNECTION_CLOSE Frame Format
CONNECTION_CLOSE frames contain the following fields: CONNECTION_CLOSE frames contain the following fields:
Error Code: A variable length integer error code which indicates the Error Code: A variable length integer error code which indicates the
reason for closing this connection. A CONNECTION_CLOSE frame of reason for closing this connection. A CONNECTION_CLOSE frame of
type 0x1c uses codes from the space defined in Section 20. A type 0x1c uses codes from the space defined in Section 20. A
CONNECTION_CLOSE frame of type 0x1d uses codes from the CONNECTION_CLOSE frame of type 0x1d uses codes from the
application protocol error code space; see Section 20.1 application protocol error code space; see Section 20.1
Frame Type: A variable-length integer encoding the type of frame Frame Type: A variable-length integer encoding the type of frame
that triggered the error. A value of 0 (equivalent to the mention that triggered the error. A value of 0 (equivalent to the mention
skipping to change at page 124, line 23 skipping to change at page 130, line 48
Reason Phrase Length: A variable-length integer specifying the Reason Phrase Length: A variable-length integer specifying the
length of the reason phrase in bytes. Because a CONNECTION_CLOSE length of the reason phrase in bytes. Because a CONNECTION_CLOSE
frame cannot be split between packets, any limits on packet size frame cannot be split between packets, any limits on packet size
will also limit the space available for a reason phrase. will also limit the space available for a reason phrase.
Reason Phrase: A human-readable explanation for why the connection Reason Phrase: A human-readable explanation for why the connection
was closed. This can be zero length if the sender chooses to not was closed. This can be zero length if the sender chooses to not
give details beyond the Error Code. This SHOULD be a UTF-8 give details beyond the Error Code. This SHOULD be a UTF-8
encoded string [RFC3629]. encoded string [RFC3629].
19.20. Extension Frames The application-specific variant of CONNECTION_CLOSE (type 0x1d) can
only be sent using an 1-RTT packet ([QUIC-TLS], Section 4). When an
application wishes to abandon a connection during the handshake, an
endpoint can send a CONNECTION_CLOSE frame (type 0x1c) with an error
code of 0x15a ("user_canceled" alert; see [TLS13]) in an Initial or a
Handshake packet.
19.20. HANDSHAKE_DONE frame
The server uses the HANDSHAKE_DONE frame (type=0x1e) to signal
confirmation of the handshake to the client. The HANDSHAKE_DONE
frame contains no additional fields.
This frame can only be sent by the server. Servers MUST NOT send a
HANDSHAKE_DONE frame before completing the handshake. A server MUST
treat receipt of a HANDSHAKE_DONE frame as a connection error of type
PROTOCOL_VIOLATION.
19.21. 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 Extension frames MUST be congestion controlled and MUST cause an ACK
frame to be sent. The exception is extension frames that replace or frame to be sent. The exception is extension frames that replace or
supplement the ACK frame. Extension frames are not included in flow supplement the ACK frame. Extension frames are not included in flow
control unless specified in the extension. 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 22.2. Section 22.3.
20. Transport Error Codes 20. Transport Error Codes
QUIC error codes are 62-bit unsigned integers. QUIC error codes are 62-bit unsigned integers.
This section lists the defined QUIC transport error codes that may be This section lists the defined QUIC transport error codes that may be
used in a CONNECTION_CLOSE frame. These errors apply to the entire used in a CONNECTION_CLOSE frame. These errors apply to the entire
connection. connection.
NO_ERROR (0x0): An endpoint uses this with CONNECTION_CLOSE to NO_ERROR (0x0): An endpoint uses this with CONNECTION_CLOSE to
skipping to change at page 125, line 43 skipping to change at page 132, line 39
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, a frame of an unknown type, or an badly formatted. For instance, a frame of an unknown type, or an
ACK frame that has more acknowledgment ranges than the remainder ACK frame that has more acknowledgment ranges 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.
CONNECTION_ID_LIMIT_ERROR (0x9): The number of connection IDs
provided by the peer exceeds the advertised
active_connection_id_limit.
PROTOCOL_VIOLATION (0xA): An endpoint detected an error with PROTOCOL_VIOLATION (0xA): An endpoint detected an error with
protocol compliance that was not covered by more specific error protocol compliance that was not covered by more specific error
codes. codes.
INVALID_TOKEN (0xB): A server received a Retry Token in a client
Initial that is invalid.
CRYPTO_BUFFER_EXCEEDED (0xD): An endpoint has received more data in CRYPTO_BUFFER_EXCEEDED (0xD): An endpoint has received more data in
CRYPTO frames than it can buffer. CRYPTO frames than it can buffer.
CRYPTO_ERROR (0x1XX): The cryptographic handshake failed. A range CRYPTO_ERROR (0x1XX): The cryptographic handshake failed. A range
of 256 values is reserved for carrying error codes specific to the of 256 values is reserved for carrying error codes specific to the
cryptographic handshake that is used. Codes for errors occurring cryptographic handshake that is used. Codes for errors occurring
when TLS is used for the crypto handshake are described in when TLS is used for the crypto handshake are described in
Section 4.8 of [QUIC-TLS]. Section 4.8 of [QUIC-TLS].
See Section 22.3 for details of registering new error codes. See Section 22.4 for details of registering new error codes.
In defining these error codes, several principles are applied. Error In defining these error codes, several principles are applied. Error
conditions that might require specific action on the part of a conditions that might require specific action on the part of a
recipient are given unique codes. Errors that represent common recipient are given unique codes. Errors that represent common
conditions are given specific codes. Absent either of these conditions are given specific codes. Absent either of these
conditions, error codes are used to identify a general function of conditions, error codes are used to identify a general function of
the stack, like flow control or transport parameter handling. the stack, like flow control or transport parameter handling.
Finally, generic errors are provided for conditions where Finally, generic errors are provided for conditions where
implementations are unable or unwilling to use more specific codes. implementations are unable or unwilling to use more specific codes.
skipping to change at page 127, line 43 skipping to change at page 134, line 45
An attacker might be able to receive an address validation token An attacker might be able to receive an address validation token
(Section 8) from a server and then release the IP address it used to (Section 8) from a server and then release the IP address it used to
acquire that token. At a later time, the attacker may initiate a acquire that token. At a later time, the attacker may initiate a
0-RTT connection with a server by spoofing this same address, which 0-RTT connection with a server by spoofing this same address, which
might now address a different (victim) endpoint. The attacker can might now address a different (victim) endpoint. The attacker can
thus potentially cause the server to send an initial congestion thus potentially cause the server to send an initial congestion
window's worth of data towards the victim. window's worth of data towards the victim.
Servers SHOULD provide mitigations for this attack by limiting the Servers SHOULD provide mitigations for this attack by limiting the
usage and lifetime of address validation tokens (see Section 8.1.2). usage and lifetime of address validation tokens (see Section 8.1.3).
21.3. Optimistic ACK Attack 21.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 10.3). PROTOCOL_VIOLATION (see Section 10.3).
skipping to change at page 130, line 48 skipping to change at page 137, line 48
while an active instance retains connection state; even if an while an active instance retains connection state; even if an
instance retains connection state, the change in routing and instance retains connection state, the change in routing and
resulting stateless reset will result in the connection being resulting stateless reset will result in the connection being
terminated. If there is no chance in the packet being routed to the terminated. If there is no chance in the packet being routed to the
correct instance, it is better to send a stateless reset than wait correct instance, it is better to send a stateless reset than wait
for connections to time out. However, this is acceptable only if the for connections to time out. However, this is acceptable only if the
routing cannot be influenced by an attacker. routing cannot be influenced by an attacker.
21.10. Version Downgrade 21.10. Version Downgrade
This document defines QUIC Version Negotiation packets Section 6, This document defines QUIC Version Negotiation packets in Section 6,
which can be used to negotiate the QUIC version used between two which can be used to negotiate the QUIC version used between two
endpoints. However, this document does not specify how this endpoints. However, this document does not specify how this
negotiation will be performed between this version and subsequent negotiation will be performed between this version and subsequent
future versions. In particular, Version Negotiation packets do not future versions. In particular, Version Negotiation packets do not
contain any mechanism to prevent version downgrade attacks. Future contain any mechanism to prevent version downgrade attacks. Future
versions of QUIC that use Version Negotiation packets MUST define a versions of QUIC that use Version Negotiation packets MUST define a
mechanism that is robust against version downgrade attacks. mechanism that is robust against version downgrade attacks.
21.11. Targeted Attacks by Routing 21.11. Targeted Attacks by Routing
Deployments should limit the ability of an attacker to target a new Deployments should limit the ability of an attacker to target a new
connection to a particular server instance. This means that client- connection to a particular server instance. This means that client-
controlled fields, such as the initial Destination Connection ID used controlled fields, such as the initial Destination Connection ID used
on Initial and 0-RTT packets SHOULD NOT be used by themselves to make on Initial and 0-RTT packets SHOULD NOT be used by themselves to make
routing decisions. Ideally, routing decisions are made independently routing decisions. Ideally, routing decisions are made independently
of client-selected values; a Source Connection ID can be selected to of client-selected values; a Source Connection ID can be selected to
route later packets to the same server. route later packets to the same server.
21.12. Overview of Security Properties
A complete security analysis of QUIC is outside the scope of this
document. This section provides an informal description of the
desired security properties as an aid to implementors and to help
guide protocol analysis.
QUIC assumes the threat model described in [SEC-CONS] and provides
protections against many of the attacks that arise from that model.
For this purpose, attacks are divided into passive and active
attacks. Passive attackers have the capability to read packets from
the network, while active attackers also have the capability to write
packets into the network. However, a passive attack may involve an
attacker with the ability to cause a routing change or other
modification in the path taken by packets that comprise a connection.
Attackers are additionally categorized as either on-path attackers or
off-path attackers; see Section 3.5 of [SEC-CONS]. An on-path
attacker can read, modify, or remove any packet it observes such that
it no longer reaches its destination, while an off-path attacker
observes the packets, but cannot prevent the original packet from
reaching its intended destination. An off-path attacker can also
transmit arbitrary packets.
Properties of the handshake, protected packets, and connection
migration are considered separately.
21.12.1. Handshake
The QUIC handshake incorporates the TLS 1.3 handshake and enjoys the
cryptographic properties described in Appendix E.1 of [TLS13].
In addition to those properties, the handshake is intended to provide
some defense against DoS attacks on the handshake, as described
below.
21.12.1.1. Anti-Amplification
Address validation (Section 8) is used to verify that an entity that
claims a given address is able to receive packets at that address.
Address validation limits amplification attack targets to addresses
for which an attacker is either on-path or off-path.
Prior to validation, endpoints are limited in what they are able to
send. During the handshake, a server cannot send more than three
times the data it receives; clients that initiate new connections or
migrate to a new network path are limited.
21.12.1.2. Server-Side DoS
Computing the server's first flight for a full handshake is
potentially expensive, requiring both a signature and a key exchange
computation. In order to prevent computational DoS attacks, the
Retry packet provides a cheap token exchange mechanism which allows
servers to validate a client's IP address prior to doing any
expensive computations at the cost of a single round trip. After a
successful handshake, servers can issue new tokens to a client which
will allow new connection establishment without incurring this cost.
21.12.1.3. On-Path Handshake Termination
An on-path or off-path attacker can force a handshake to fail by
replacing or racing Initial packets. Once valid Initial packets have
been exchanged, subsequent Handshake packets are protected with the
handshake keys and an on-path attacker cannot force handshake failure
other than by dropping packets to cause endpoints to abandon the
attempt.
An on-path attacker can also replace the addresses of packets on
either side and therefore cause the client or server to have an
incorrect view of the remote addresses. Such an attack is
indistinguishable from the functions performed by a NAT.
21.12.1.4. Parameter Negotiation
The entire handshake is cryptographically protected, with the Initial
packets being encrypted with per-version keys and the Handshake and
later packets being encrypted with keys derived from the TLS key
exchange. Further, parameter negotiation is folded into the TLS
transcript and thus provides the same security guarantees as ordinary
TLS negotiation. Thus, an attacker can observe the client's
transport parameters (as long as it knows the version-specific salt)
but cannot observe the server's transport parameters and cannot
influence parameter negotiation.
Connection IDs are unencrypted but integrity protected in all
packets.
This version of QUIC does not incorporate a version negotiation
mechanism; implementations of incompatible versions will simply fail
to establish a connection.
21.12.2. Protected Packets
Packet protection (Section 12.1) provides authentication and
encryption of all packets except Version Negotiation packets, though
Initial and Retry packets have limited encryption and authentication
based on version-specific keys; see [QUIC-TLS] for more details.
This section considers passive and active attacks against protected
packets.
Both on-path and off-path attackers can mount a passive attack in
which they save observed packets for an offline attack against packet
protection at a future time; this is true for any observer of any
packet on any network.
A blind attacker, one who injects packets without being able to
observe valid packets for a connection, is unlikely to be successful,
since packet protection ensures that valid packets are only generated
by endpoints which possess the key material established during the
handshake; see Section 7 and Section 21.12.1. Similarly, any active
attacker that observes packets and attempts to insert new data or
modify existing data in those packets should not be able to generate
packets deemed valid by the receiving endpoint.
A spoofing attack, in which an active attacker rewrites unprotected
parts of a packet that it forwards or injects, such as the source or
destination address, is only effective if the attacker can forward
packets to the original endpoint. Packet protection ensures that the
packet payloads can only be processed by the endpoints that completed
the handshake, and invalid packets are ignored by those endpoints.
An attacker can also modify the boundaries between packets and UDP
datagrams, causing multiple packets to be coalesced into a single
datagram, or splitting coalesced packets into multiple datagrams.
Aside from datagrams containing Initial packets, which require
padding, modification of how packets are arranged in datagrams has no
functional effect on a connection, although it might change some
performance characteristics.
21.12.3. Connection Migration
Connection Migration (Section 9) provides endpoints with the ability
to transition between IP addresses and ports on multiple paths, using
one path at a time for transmission and receipt of non-probing
frames. Path validation (Section 8.2) establishes that a peer is
both willing and able to receive packets sent on a particular path.
This helps reduce the effects of address spoofing by limiting the
number of packets sent to a spoofed address.
This section describes the intended security properties of connection
migration when under various types of DoS attacks.
21.12.3.1. On-Path Active Attacks
An attacker that can cause a packet it observes to no longer reach
its intended destination is considered an on-path attacker. When an
attacker is present between a client and server, endpoints are
required to send packets through the attacker to establish
connectivity on a given path.
An on-path attacker can:
* Inspect packets
* Modify IP and UDP packet headers
* Inject new packets
* Delay packets
* Reorder packets
* Drop packets
* Split and merge datagrams along packet boundaries
An on-path attacker cannot:
* Modify an authenticated portion of a packet and cause the
recipient to accept that packet
An on-path attacker has the opportunity to modify the packets that it
observes, however any modifications to an authenticated portion of a
packet will cause it to be dropped by the receiving endpoint as
invalid, as packet payloads are both authenticated and encrypted.
In the presence of an on-path attacker, QUIC aims to provide the
following properties:
1. An on-path attacker can prevent use of a path for a connection,
causing it to fail if it cannot use a different path that does
not contain the attacker. This can be achieved by dropping all
packets, modifying them so that they fail to decrypt, or other
methods.
2. An on-path attacker can prevent migration to a new path for which
the attacker is also on-path by causing path validation to fail
on the new path.
3. An on-path attacker cannot prevent a client from migrating to a
path for which the attacker is not on-path.
4. An on-path attacker can reduce the throughput of a connection by
delaying packets or dropping them.
5. An on-path attacker cannot cause an endpoint to accept a packet
for which it has modified an authenticated portion of that
packet.
21.12.3.2. Off-Path Active Attacks
An off-path attacker is not directly on the path between a client and
server, but could be able to obtain copies of some or all packets
sent between the client and the server. It is also able to send
copies of those packets to either endpoint.
An off-path attacker can:
* Inspect packets
* Inject new packets
* Reorder injected packets
An off-path attacker cannot:
* Modify any part of a packet
* Delay packets
* Drop packets
* Reorder original packets
An off-path attacker can modify packets that it has observed and
inject them back into the network, potentially with spoofed source
and destination addresses.
For the purposes of this discussion, it is assumed that an off-path
attacker has the ability to observe, modify, and re-inject a packet
into the network that will reach the destination endpoint prior to
the arrival of the original packet observed by the attacker. In
other words, an attacker has the ability to consistently "win" a race
with the legitimate packets between the endpoints, potentially
causing the original packet to be ignored by the recipient.
It is also assumed that an attacker has the resources necessary to
affect NAT state, potentially both causing an endpoint to lose its
NAT binding, and an attacker to obtain the same port for use with its
traffic.
In the presence of an off-path attacker, QUIC aims to provide the
following properties:
1. An off-path attacker can race packets and attempt to become a
"limited" on-path attacker.
2. An off-path attacker can cause path validation to succeed for
forwarded packets with the source address listed as the off-path
attacker as long as it can provide improved connectivity between
the client and the server.
3. An off-path attacker cannot cause a connection to close once the
handshake has completed.
4. An off-path attacker cannot cause migration to a new path to fail
if it cannot observe the new path.
5. An off-path attacker can become a limited on-path attacker during
migration to a new path for which it is also an off-path
attacker.
6. An off-path attacker can become a limited on-path attacker by
affecting shared NAT state such that it sends packets to the
server from the same IP address and port that the client
originally used.
21.12.3.3. Limited On-Path Active Attacks
A limited on-path attacker is an off-path attacker that has offered
improved routing of packets by duplicating and forwarding original
packets between the server and the client, causing those packets to
arrive before the original copies such that the original packets are
dropped by the destination endpoint.
A limited on-path attacker differs from an on-path attacker in that
it is not on the original path between endpoints, and therefore the
original packets sent by an endpoint are still reaching their
destination. This means that a future failure to route copied
packets to the destination faster than their original path will not
prevent the original packets from reaching the destination.
A limited on-path attacker can:
* Inspect packets
* Inject new packets
* Modify unencrypted packet headers
* Reorder packets
A limited on-path attacker cannot:
* Delay packets so that they arrive later than packets sent on the
original path
* Drop packets
* Modify the authenticated and encrypted portion of a packet and
cause the recipient to accept that packet
A limited on-path attacker can only delay packets up to the point
that the original packets arrive before the duplicate packets,
meaning that it cannot offer routing with worse latency than the
original path. If a limited on-path attacker drops packets, the
original copy will still arrive at the destination endpoint.
In the presence of a limited on-path attacker, QUIC aims to provide
the following properties:
1. A limited on-path attacker cannot cause a connection to close
once the handshake has completed.
2. A limited on-path attacker cannot cause an idle connection to
close if the client is first to resume activity.
3. A limited on-path attacker can cause an idle connection to be
deemed lost if the server is the first to resume activity.
Note that these guarantees are the same guarantees provided for any
NAT, for the same reasons.
22. IANA Considerations 22. IANA Considerations
22.1. QUIC Transport Parameter Registry This document establishes several registries for the management of
codepoints in QUIC. These registries operate on a common set of
policies as defined in Section 22.1.
IANA [SHALL add/has added] a registry for "QUIC Transport Parameters" 22.1. Registration Policies for QUIC Registries
under a "QUIC Protocol" heading.
The "QUIC Transport Parameters" registry governs a 16-bit space. All QUIC registries allow for both provisional and permanent
This space is split into two spaces that are governed by different registration of codepoints. This section documents policies that are
policies. Values with the first byte in the range 0x00 to 0xfe (in common to these registries.
hexadecimal) are assigned via the Specification Required policy
[RFC8126]. Values with the first byte 0xff are reserved for Private
Use [RFC8126].
Registrations MUST include the following fields: 22.1.1. Provisional Registrations
Value: The numeric value of the assignment (registrations will be Provisional registration of codepoints are intended to allow for
between 0x0000 and 0xfeff). private use and experimentation with extensions to QUIC. Provisional
registrations only require the inclusion of the codepoint value and
contact information. However, provisional registrations could be
reclaimed and reassigned for another purpose.
Parameter Name: A short mnemonic for the parameter. Provisional registrations require Expert Review, as defined in
Section 4.5 of [RFC8126]. Designated expert(s) are advised that only
registrations for an excessive proportion of remaining codepoint
space or the very first unassigned value (see Section 22.1.2) can be
rejected.
Provisional registrations will include a date field that indicates
when the registration was last updated. A request to update the date
on any provisional registration can be made without review from the
designated expert(s).
All QUIC registries include the following fields to support
provisional registration:
Value: The assigned codepoint.
Status: "Permanent" or "Provisional".
Specification: A reference to a publicly available specification for Specification: A reference to a publicly available specification for
the value. the value.
The nominated expert(s) verify that a specification exists and is Date: The date of last update to the registration.
Contact: Contact details for the registrant.
Notes: Supplementary notes about the registration.
Provisional registrations MAY omit the Specification and Notes
fields, plus any additional fields that might be required for a
permanent registration. The Date field is not required as part of
requesting a registration as it is set to the date the registration
is created or updated.
22.1.2. Selecting Codepoints
New uses of codepoints from QUIC registries SHOULD use a randomly
selected codepoint that excludes both existing allocations and the
first unallocated codepoint in the selected space. Requests for
multiple codepoints MAY use a contiguous range. This minimizes the
risk that differing semantics are attributed to the same codepoint by
different implementations. Use of the first codepoint in a range is
intended for use by specifications that are developed through the
standards process [STD] and its allocation MUST be negotiated with
IANA before use.
For codepoints that are encoded in variable-length integers
(Section 16), such as frame types, codepoints that encode to four or
eight bytes (that is, values 2^14 and above) SHOULD be used unless
the usage is especially sensitive to having a longer encoding.
Applications to register codepoints in QUIC registries MAY include a
codepoint as part of the registration. IANA MUST allocate the
selected codepoint unless that codepoint is already assigned or the
codepoint is the first unallocated codepoint in the registry.
22.1.3. Reclaiming Provisional Codepoints
A request might be made to remove an unused provisional registration
from the registry to reclaim space in a registry, or portion of the
registry (such as the 64-16383 range for codepoints that use
variable-length encodings). This SHOULD be done only for the
codepoints with the earliest recorded date and entries that have been
updated less than a year prior SHOULD NOT be reclaimed.
A request to remove a codepoint MUST be reviewed by the designated
expert(s). The expert(s) MUST attempt to determine whether the
codepoint is still in use. Experts are advised to contact the listed
contacts for the registration, plus as wide a set of protocol
implementers as possible in order to determine whether any use of the
codepoint is known. The expert(s) are advised to allow at least four
weeks for responses.
If any use of the codepoints is identified by this search or a
request to update the registration is made, the codepoint MUST NOT be
reclaimed. Instead, the date on the registration is updated. A note
might be added for the registration recording relevant information
that was learned.
If no use of the codepoint was identified and no request was made to
update the registration, the codepoint MAY be removed from the
registry.
This process also applies to requests to change a provisional
registration into a permanent registration, except that the goal is
not to determine whether there is no use of the codepoint, but to
determine that the registration is an accurate representation of any
deployed usage.
22.1.4. Permanent Registrations
Permanent registrations in QUIC registries use the Specification
Required policy [RFC8126], unless otherwise specified. The
designated expert(s) verify that a specification exists and is
readily accessible. Expert(s) are encouraged to be biased towards readily accessible. Expert(s) are encouraged to be biased towards
approving registrations unless they are abusive, frivolous, or approving registrations unless they are abusive, frivolous, or
actively harmful (not merely aesthetically displeasing, or actively harmful (not merely aesthetically displeasing, or
architecturally dubious). architecturally dubious). The creation of a registry MAY specify
additional constraints on permanent registrations.
The creation of a registries MAY identify a range of codepoints where
registrations are governed by a different registration policy. For
instance, the registries for 62-bit codepoints in this document have
stricter policies for codepoints in the range from 0 to 63.
Any stricter requirements for permanent registrations do not prevent
provisional registrations for affected codepoints. For instance, a
provisional registration for a frame type Section 22.3 of 61 could be
requested.
All registrations made by Standards Track publications MUST be
permanent.
All registrations in this document are assigned a permanent status
and list as contact both the IESG (ietf@ietf.org) and the QUIC
working group (quic@ietf.org).
22.2. QUIC Transport Parameter Registry
IANA [SHALL add/has added] a registry for "QUIC Transport Parameters"
under a "QUIC" heading.
The "QUIC Transport Parameters" registry governs a 16-bit space.
This registry follows the registration policy from Section 22.1.
Permanent registrations in this registry are assigned using the
Specification Required policy [RFC8126].
In addition to the fields in Section 22.1.1, permanent registrations
in this registry MUST include the following fields:
Parameter Name: A short mnemonic for the parameter.
The initial contents of this registry are shown in Table 6. The initial contents of this registry are shown in Table 6.
+--------+-------------------------------------+---------------+ +--------+-------------------------------------+---------------+
| Value | Parameter Name | Specification | | Value | Parameter Name | Specification |
+--------+-------------------------------------+---------------+ +========+=====================================+===============+
| 0x0000 | original_connection_id | Section 18.2 | | 0x0000 | original_connection_id | Section 18.2 |
| | | | +--------+-------------------------------------+---------------+
| 0x0001 | idle_timeout | Section 18.2 | | 0x0001 | max_idle_timeout | Section 18.2 |
| | | | +--------+-------------------------------------+---------------+
| 0x0002 | stateless_reset_token | Section 18.2 | | 0x0002 | stateless_reset_token | Section 18.2 |
| | | | +--------+-------------------------------------+---------------+
| 0x0003 | max_packet_size | Section 18.2 | | 0x0003 | max_packet_size | Section 18.2 |
| | | | +--------+-------------------------------------+---------------+
| 0x0004 | initial_max_data | Section 18.2 | | 0x0004 | initial_max_data | Section 18.2 |
| | | | +--------+-------------------------------------+---------------+
| 0x0005 | initial_max_stream_data_bidi_local | Section 18.2 | | 0x0005 | initial_max_stream_data_bidi_local | Section 18.2 |
| | | | +--------+-------------------------------------+---------------+
| 0x0006 | initial_max_stream_data_bidi_remote | Section 18.2 | | 0x0006 | initial_max_stream_data_bidi_remote | Section 18.2 |
| | | | +--------+-------------------------------------+---------------+
| 0x0007 | initial_max_stream_data_uni | Section 18.2 | | 0x0007 | initial_max_stream_data_uni | Section 18.2 |
| | | | +--------+-------------------------------------+---------------+
| 0x0008 | initial_max_streams_bidi | Section 18.2 | | 0x0008 | initial_max_streams_bidi | Section 18.2 |
| | | | +--------+-------------------------------------+---------------+
| 0x0009 | initial_max_streams_uni | Section 18.2 | | 0x0009 | initial_max_streams_uni | Section 18.2 |
| | | | +--------+-------------------------------------+---------------+
| 0x000a | ack_delay_exponent | Section 18.2 | | 0x000a | ack_delay_exponent | Section 18.2 |
| | | | +--------+-------------------------------------+---------------+
| 0x000b | max_ack_delay | Section 18.2 | | 0x000b | max_ack_delay | Section 18.2 |
| | | | +--------+-------------------------------------+---------------+
| 0x000c | disable_active_migration | Section 18.2 | | 0x000c | disable_active_migration | Section 18.2 |
| | | | +--------+-------------------------------------+---------------+
| 0x000d | preferred_address | Section 18.2 | | 0x000d | preferred_address | Section 18.2 |
| | | | +--------+-------------------------------------+---------------+
| 0x000e | active_connection_id_limit | Section 18.2 | | 0x000e | active_connection_id_limit | Section 18.2 |
+--------+-------------------------------------+---------------+ +--------+-------------------------------------+---------------+
Table 6: Initial QUIC Transport Parameters Entries Table 6: Initial QUIC Transport Parameters Entries
Additionally, each value of the format "31 * N + 27" for integer Additionally, each value of the format "31 * N + 27" for integer
values of N (that is, "27", "58", "89", ...) MUST NOT be assigned by values of N (that is, "27", "58", "89", ...) are reserved and MUST
IANA. NOT be assigned by IANA.
22.2. QUIC Frame Type Registry 22.3. 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" heading.
The "QUIC Frame Types" registry governs a 62-bit space. This space
is split into three spaces that are governed by different policies.
Values between 0x00 and 0x3f (in hexadecimal) are assigned via the
Standards Action or IESG Review policies [RFC8126]. Values from 0x40
to 0x3fff operate on the Specification Required policy [RFC8126].
All other values are assigned to Private Use [RFC8126].
Registrations MUST include the following fields: The "QUIC Frame Types" registry governs a 62-bit space. This
registry follows the registration policy from Section 22.1.
Permanent registrations in this registry are assigned using the
Specification Required policy [RFC8126], except for values between
0x00 and 0x3f (in hexadecimal; inclusive), which are assigned using
Standards Action or IESG Approval as defined in Section 4.9 and 4.10
of [RFC8126].
Value: The numeric value of the assignment (registrations will be In addition to the fields in Section 22.1.1, permanent registrations
between 0x00 and 0x3fff). A range of values MAY be assigned. in this registry MUST include the following fields:
Frame Name: A short mnemonic for the frame type. Frame Name: A short mnemonic for the frame type.
Specification: A reference to a publicly available specification for In addition to the advice in Section 22.1, specifications for new
the value. permanent registrations SHOULD describe the means by which an
endpoint might determine that it can send the identified type of
The nominated expert(s) verify that a specification exists and is frame. An accompanying transport parameter registration (see
readily accessible. Specifications for new registrations need to Section 22.2) is expected for most registrations. Specifications for
describe the means by which an endpoint might determine that it can permanent registrations also needs to describe the format and
send the identified type of frame. An accompanying transport
parameter registration (see Section 22.1) is expected for most
registrations. The specification needs to describe the format and
assigned semantics of any fields in the frame. assigned semantics of any fields in the frame.
Expert(s) are encouraged to be biased towards approving registrations
unless they are abusive, frivolous, or actively harmful (not merely
aesthetically displeasing, or architecturally dubious).
The initial contents of this registry are tabulated in Table 3. The initial contents of this registry are tabulated in Table 3.
22.3. QUIC Transport Error Codes Registry 22.4. QUIC Transport Error Codes Registry
IANA [SHALL add/has added] a registry for "QUIC Transport Error IANA [SHALL add/has added] a registry for "QUIC Transport Error
Codes" under a "QUIC Protocol" heading. Codes" under a "QUIC" heading.
The "QUIC Transport Error Codes" registry governs a 62-bit space. The "QUIC Transport Error Codes" registry governs a 62-bit space.
This space is split into three spaces that are governed by different This space is split into three spaces that are governed by different
policies. Values between 0x00 and 0x3f (in hexadecimal) are assigned policies. Permanent registrations in this registry are assigned
via the Standards Action or IESG Review policies [RFC8126]. Values using the Specification Required policy [RFC8126], except for values
from 0x40 to 0x3fff operate on the Specification Required policy between 0x00 and 0x3f (in hexadecimal; inclusive), which are assigned
[RFC8126]. All other values are assigned to Private Use [RFC8126]. using Standards Action or IESG Approval as defined in Section 4.9 and
4.10 of [RFC8126].
Registrations MUST include the following fields:
Value: The numeric value of the assignment (registrations will be In addition to the fields in Section 22.1.1, permanent registrations
between 0x0000 and 0x3fff). in this registry MUST include the following fields:
Code: A short mnemonic for the parameter. Code: A short mnemonic for the parameter.
Description: A brief description of the error code semantics, which Description: A brief description of the error code semantics, which
MAY be a summary if a specification reference is provided. MAY be a summary if a specification reference is provided.
Specification: A reference to a publicly available specification for
the value.
The nominated expert(s) verify that a specification exists and is
readily accessible. Expert(s) are encouraged to be biased towards
approving registrations unless they are abusive, frivolous, or
actively harmful (not merely aesthetically displeasing, or
architecturally dubious).
The initial contents of this registry are shown in Table 7. The initial contents of this registry are shown in Table 7.
+------+---------------------------+----------------+---------------+ +------+---------------------------+----------------+---------------+
| Valu | Error | Description | Specification | |Value | Error | Description | Specification |
| e | | | | +======+===========================+================+===============+
+------+---------------------------+----------------+---------------+
| 0x0 | NO_ERROR | No error | Section 20 | | 0x0 | NO_ERROR | No error | Section 20 |
| | | | | +------+---------------------------+----------------+---------------+
| 0x1 | INTERNAL_ERROR | Implementation | Section 20 | | 0x1 | INTERNAL_ERROR | Implementation | Section 20 |
| | | error | | | | | error | |
| | | | | +------+---------------------------+----------------+---------------+
| 0x2 | SERVER_BUSY | Server | Section 20 | | 0x2 | SERVER_BUSY |Server currently| Section 20 |
| | | currently busy | | | | | busy | |
| | | | | +------+---------------------------+----------------+---------------+
| 0x3 | FLOW_CONTROL_ERROR | Flow control | Section 20 | | 0x3 | FLOW_CONTROL_ERROR | Flow control | Section 20 |
| | | error | | | | | error | |
| | | | | +------+---------------------------+----------------+---------------+
| 0x4 | STREAM_LIMIT_ERROR | Too many | Section 20 | | 0x4 | STREAM_LIMIT_ERROR |Too many streams| Section 20 |
| | | streams opened | | | | | opened | |
| | | | | +------+---------------------------+----------------+---------------+
| 0x5 | STREAM_STATE_ERROR | Frame received | Section 20 | | 0x5 | STREAM_STATE_ERROR | Frame received | Section 20 |
| | | in invalid | | | | | in invalid | |
| | | stream state | | | | | stream state | |
| | | | | +------+---------------------------+----------------+---------------+
| 0x6 | FINAL_SIZE_ERROR | Change to | Section 20 | | 0x6 | FINAL_SIZE_ERROR |Change to final | Section 20 |
| | | final size | | | | | size | |
| | | | | +------+---------------------------+----------------+---------------+
| 0x7 | FRAME_ENCODING_ERROR | Frame encoding | Section 20 | | 0x7 | FRAME_ENCODING_ERROR | Frame encoding | Section 20 |
| | | error | | | | | error | |
| | | | | +------+---------------------------+----------------+---------------+
| 0x8 | TRANSPORT_PARAMETER_ERROR | Error in | Section 20 | | 0x8 | TRANSPORT_PARAMETER_ERROR | Error in | Section 20 |
| | | transport | | | | | transport | |
| | | parameters | | | | | parameters | |
| | | | | +------+---------------------------+----------------+---------------+
| 0xA | PROTOCOL_VIOLATION | Generic | Section 20 | | 0x9 | CONNECTION_ID_LIMIT_ERROR | Too many | Section 20 |
| | | protocol | | | | | connection IDs | |
| | | received | |
+------+---------------------------+----------------+---------------+
| 0xA | PROTOCOL_VIOLATION |Generic protocol| Section 20 |
| | | violation | | | | | violation | |
| | | | | +------+---------------------------+----------------+---------------+
| 0xB | INVALID_TOKEN | Invalid Token | Section 20 |
| | | Received | |
+------+---------------------------+----------------+---------------+
| 0xD | CRYPTO_BUFFER_EXCEEDED | CRYPTO data | Section 20 | | 0xD | CRYPTO_BUFFER_EXCEEDED | CRYPTO data | Section 20 |
| | | buffer | | | | | buffer | |
| | | overflowed | | | | | overflowed | |
+------+---------------------------+----------------+---------------+ +------+---------------------------+----------------+---------------+
Table 7: Initial QUIC Transport Error Codes Entries Table 7: Initial QUIC Transport Error Codes Entries
23. References 23. References
23.1. Normative References 23.1. Normative References
[DPLPMTUD] [DPLPMTUD] Fairhurst, G., Jones, T., Tuexen, M., Ruengeler, I., and
Fairhurst, G., Jones, T., Tuexen, M., Ruengeler, I., and
T. Voelker, "Packetization Layer Path MTU Discovery for T. Voelker, "Packetization Layer Path MTU Discovery for
Datagram Transports", draft-ietf-tsvwg-datagram-plpmtud-08 Datagram Transports", Work in Progress, Internet-Draft,
(work in progress), June 2019. draft-ietf-tsvwg-datagram-plpmtud-08, 5 June 2019,
<http://www.ietf.org/internet-drafts/draft-ietf-tsvwg-
datagram-plpmtud-08.txt>.
[IPv4] Postel, J., "Internet Protocol", STD 5, RFC 791,
DOI 10.17487/RFC0791, September 1981,
<https://www.rfc-editor.org/info/rfc791>.
[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-24 (work and Congestion Control", Work in Progress, Internet-Draft,
in progress), November 2019. draft-ietf-quic-recovery-25, 22 January 2020,
<https://tools.ietf.org/html/draft-ietf-quic-recovery-25>.
[QUIC-TLS] [QUIC-TLS] Thomson, M., Ed. and S. Turner, Ed., "Using Transport
Thomson, M., Ed. and S. Turner, Ed., "Using Transport Layer Security (TLS) to Secure QUIC", Work in Progress,
Layer Security (TLS) to Secure QUIC", draft-ietf-quic- Internet-Draft, draft-ietf-quic-tls-25, 22 January 2020,
tls-24 (work in progress), November 2019. <https://tools.ietf.org/html/draft-ietf-quic-tls-25>.
[RFC1191] Mogul, J. and S. Deering, "Path MTU discovery", RFC 1191, [RFC1191] Mogul, J.C. and S.E. Deering, "Path MTU discovery",
DOI 10.17487/RFC1191, November 1990, RFC 1191, DOI 10.17487/RFC1191, November 1990,
<https://www.rfc-editor.org/info/rfc1191>. <https://www.rfc-editor.org/info/rfc1191>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[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,
skipping to change at page 137, line 40 skipping to change at page 153, line 44
DOI 10.17487/RFC8311, January 2018, DOI 10.17487/RFC8311, January 2018,
<https://www.rfc-editor.org/info/rfc8311>. <https://www.rfc-editor.org/info/rfc8311>.
[TLS13] Rescorla, E., "The Transport Layer Security (TLS) Protocol [TLS13] Rescorla, E., "The Transport Layer Security (TLS) Protocol
Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
<https://www.rfc-editor.org/info/rfc8446>. <https://www.rfc-editor.org/info/rfc8446>.
23.2. Informative References 23.2. Informative References
[EARLY-DESIGN] [EARLY-DESIGN]
Roskind, J., "QUIC: Multiplexed Transport Over UDP", Roskind, J., "QUIC: Multiplexed Transport Over UDP", 2
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-07 (work in progress), November Work in Progress, Internet-Draft, draft-ietf-quic-
2019. invariants-07, 22 January 2020,
<https://tools.ietf.org/html/draft-ietf-quic-invariants-
07>.
[QUIC-MANAGEABILITY] [QUIC-MANAGEABILITY]
Kuehlewind, M. and B. Trammell, "Manageability of the QUIC Kuehlewind, M. and B. Trammell, "Manageability of the QUIC
Transport Protocol", draft-ietf-quic-manageability-05 Transport Protocol", Work in Progress, Internet-Draft,
(work in progress), July 2019. draft-ietf-quic-manageability-05, 5 July 2019,
<http://www.ietf.org/internet-drafts/draft-ietf-quic-
manageability-05.txt>.
[RFC1812] Baker, F., Ed., "Requirements for IP Version 4 Routers", [RFC1812] Baker, F., Ed., "Requirements for IP Version 4 Routers",
RFC 1812, DOI 10.17487/RFC1812, June 1995, RFC 1812, DOI 10.17487/RFC1812, June 1995,
<https://www.rfc-editor.org/info/rfc1812>. <https://www.rfc-editor.org/info/rfc1812>.
[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>.
skipping to change at page 139, line 15 skipping to change at page 155, line 24
[RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan, [RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan,
"Transport Layer Security (TLS) Application-Layer Protocol "Transport Layer Security (TLS) Application-Layer Protocol
Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301,
July 2014, <https://www.rfc-editor.org/info/rfc7301>. July 2014, <https://www.rfc-editor.org/info/rfc7301>.
[RFC8200] Deering, S. and R. Hinden, "Internet Protocol, Version 6 [RFC8200] Deering, S. and R. Hinden, "Internet Protocol, Version 6
(IPv6) Specification", STD 86, RFC 8200, (IPv6) Specification", STD 86, RFC 8200,
DOI 10.17487/RFC8200, July 2017, DOI 10.17487/RFC8200, July 2017,
<https://www.rfc-editor.org/info/rfc8200>. <https://www.rfc-editor.org/info/rfc8200>.
[SEC-CONS] Rescorla, E. and B. Korver, "Guidelines for Writing RFC
Text on Security Considerations", BCP 72, RFC 3552,
DOI 10.17487/RFC3552, July 2003,
<https://www.rfc-editor.org/info/rfc3552>.
[SLOWLORIS] [SLOWLORIS]
RSnake Hansen, R., "Welcome to Slowloris...", June 2009, RSnake Hansen, R., "Welcome to Slowloris...", June 2009,
<https://web.archive.org/web/20150315054838/ <https://web.archive.org/web/20150315054838/
http://ha.ckers.org/slowloris/>. http://ha.ckers.org/slowloris/>.
[STD] Bradner, S., "The Internet Standards Process -- Revision
3", BCP 9, RFC 2026, DOI 10.17487/RFC2026, October 1996,
<https://www.rfc-editor.org/info/rfc2026>.
Appendix A. Sample Packet Number Decoding Algorithm Appendix A. Sample Packet Number Decoding Algorithm
The following pseudo-code shows how an implementation can decode The pseudo-code in Figure 37 shows how an implementation can decode
packet numbers after header protection has been removed. packet numbers after header protection has been removed.
DecodePacketNumber(largest_pn, truncated_pn, pn_nbits): DecodePacketNumber(largest_pn, truncated_pn, pn_nbits):
expected_pn = largest_pn + 1 expected_pn = largest_pn + 1
pn_win = 1 << pn_nbits pn_win = 1 << pn_nbits
pn_hwin = pn_win / 2 pn_hwin = pn_win / 2
pn_mask = pn_win - 1 pn_mask = pn_win - 1
// The incoming packet number should be greater than // The incoming packet number should be greater than
// expected_pn - pn_hwin and less than or equal to // expected_pn - pn_hwin and less than or equal to
// expected_pn + pn_hwin // expected_pn + pn_hwin
// //
// This means we can't just strip the trailing bits from // This means we can't just strip the trailing bits from
// expected_pn and add the truncated_pn because that might // expected_pn and add the truncated_pn because that might
// yield a value outside the window. // yield a value outside the window.
// //
// The following code calculates a candidate value and // The following code calculates a candidate value and
// makes sure it's within the packet number window. // makes sure it's within the packet number window.
// Note the extra checks to prevent overflow and underflow.
candidate_pn = (expected_pn & ~pn_mask) | truncated_pn candidate_pn = (expected_pn & ~pn_mask) | truncated_pn
if candidate_pn <= expected_pn - pn_hwin: if candidate_pn <= expected_pn - pn_hwin and
candidate_pn < (1 << 62) - pn_win:
return candidate_pn + pn_win return candidate_pn + pn_win
// Note the extra check for underflow when candidate_pn
// is near zero.
if candidate_pn > expected_pn + pn_hwin and if candidate_pn > expected_pn + pn_hwin and
candidate_pn > pn_win: candidate_pn >= pn_win:
return candidate_pn - pn_win return candidate_pn - pn_win
return candidate_pn return candidate_pn
Appendix B. Change Log Figure 37: Sample Packet Number Decoding Algorithm
Appendix B. Sample ECN Validation Algorithm
Each time an endpoint commences sending on a new network path, it
determines whether the path supports ECN; see Section 13.4. If the
path supports ECN, the goal is to use ECN. Endpoints might also
periodically reassess a path that was determined to not support ECN.
This section describes one method for testing new paths. This
algorithm is intended to show how a path might be tested for ECN
support. Endpoints can implement different methods.
The path is assigned an ECN state that is one of "testing",
"unknown", "failed", or "capable". On paths with a "testing" or
"capable" state the endpoint sends packets with an ECT marking, by
default ECT(0); otherwise, the endpoint sends unmarked packets.
To start testing a path, the ECN state is set to "testing" and
existing ECN counts are remembered as a baseline.
The testing period runs for a number of packets or round-trip times,
as determined by the endpoint. The goal is not to limit the duration
of the testing period, but to ensure that enough marked packets are
sent for received ECN counts to provide a clear indication of how the
path treats marked packets. Section 13.4.2.2 suggests limiting this
to 10 packets or 3 round-trip times.
After the testing period ends, the ECN state for the path becomes
"unknown". From the "unknown" state, successful validation of the
ECN counts an ACK frame (see Section 13.4.2.2) causes the ECN state
for the path to become "capable", unless no marked packet has been
acknowledged.
If validation of ECN counts fails at any time, the ECN state for the
affected path becomes "failed". An endpoint can also mark the ECN
state for a path as "failed" if marked packets are all declared lost
or if they are all CE marked.
Following this algorithm ensures that ECN is rarely disabled for
paths that properly support ECN. Any path that incorrectly modifies
markings will cause ECN to be disabled. For those rare cases where
marked packets are discarded by the path, the short duration of the
testing period limits the number of losses incurred.
Appendix C. Change Log
*RFC Editor's Note:* Please remove this section prior to *RFC Editor's Note:* Please remove this section prior to
publication of a final version of this document. publication of a final version of this document.
Issue and pull request numbers are listed with a leading octothorp. Issue and pull request numbers are listed with a leading octothorp.
B.1. Since draft-ietf-quic-transport-23 C.1. Since draft-ietf-quic-transport-24
o Client Initial size constraints apply to UDP datagram payload * Added HANDSHAKE_DONE to signal handshake confirmation (#2863,
#3142, #3145)
* Add integrity check to Retry packets (#3014, #3274, #3120)
* Specify handling of reordered NEW_CONNECTION_ID frames (#3194,
#3202)
* Require checking of sequence numbers in RETIRE_CONNECTION_ID
(#3037, #3036)
* active_connection_id_limit is enforced (#3193, #3197, #3200,
#3201)
* Correct overflow in packet number decode algorithm (#3187, #3188)
* Allow use of CRYPTO_BUFFER_EXCEEDED for CRYPTO frame errors
(#3258, #3186)
* Define applicability and scope of NEW_TOKEN (#3150, #3152, #3155,
#3156)
* Tokens from Retry and NEW_TOKEN must be differentiated (#3127,
#3128)
* Allow CONNECTION_CLOSE in response to invalid token (#3168, #3107)
* Treat an invalid CONNECTION_CLOSE as an invalid frame (#2475,
#3230, #3231)
* Throttle when sending CONNECTION_CLOSE after discarding state
(#3095, #3157)
* Application-variant of CONNECTION_CLOSE can only be sent in 0-RTT
or 1-RTT packets (#3158, #3164)
* Advise sending while blocked to avoid idle timeout (#2744, #3266)
* Define error codes for invalid frames (#3027, #3042)
* Idle timeout is symmetric (#2602, #3099)
* Prohibit IP fragmentation (#3243, #3280)
* Define the use of provisional registration for all registries
(#3109, #3020, #3102, #3170)
C.2. Since draft-ietf-quic-transport-23
* Allow ClientHello to span multiple packets (#2928, #3045)
* Client Initial size constraints apply to UDP datagram payload
(#3053, #3051) (#3053, #3051)
o Stateless reset changes (#2152, #2993) * Stateless reset changes (#2152, #2993)
* tokens need to be compared in constant time - tokens need to be compared in constant time
* detection uses UDP datagrams, not packets - detection uses UDP datagrams, not packets
* tokens cannot be reused (#2785, #2968) - tokens cannot be reused (#2785, #2968)
o Clearer rules for sharing of UDP ports and use of connection IDs * Clearer rules for sharing of UDP ports and use of connection IDs
when doing so (#2844, #2851) when doing so (#2844, #2851)
o A new connection ID is necessary when responding to migration * A new connection ID is necessary when responding to migration
(#2778, #2969) (#2778, #2969)
o Stronger requirements for connection ID retirement (#3046, #3096) * Stronger requirements for connection ID retirement (#3046, #3096)
o NEW_TOKEN cannot be empty (#2978, #2977) * NEW_TOKEN cannot be empty (#2978, #2977)
o PING can be sent at any encryption level (#3034, #3035) * PING can be sent at any encryption level (#3034, #3035)
o CONNECTION_CLOSE is not ack-eliciting (#3097, #3098) * CONNECTION_CLOSE is not ack-eliciting (#3097, #3098)
o Frame encoding error conditions updated (#3027, #3042) * Frame encoding error conditions updated (#3027, #3042)
o Non-ack-eliciting packets cannot be sent in response to non-ack- * Non-ack-eliciting packets cannot be sent in response to non-ack-
eliciting packets (#3100, #3104) eliciting packets (#3100, #3104)
B.2. Since draft-ietf-quic-transport-22 * Servers have to change connection IDs in Retry (#2837, #3147)
o Rules for preventing correlation by connection ID tightened C.3. Since draft-ietf-quic-transport-22
* Rules for preventing correlation by connection ID tightened
(#2084, #2929) (#2084, #2929)
o Clarified use of CONNECTION_CLOSE in Handshake packets (#2151, * Clarified use of CONNECTION_CLOSE in Handshake packets (#2151,
#2541, #2688) #2541, #2688)
o Discourage regressions of largest acknowledged in ACK (#2205, * Discourage regressions of largest acknowledged in ACK (#2205,
#2752) #2752)
o Improved robustness of validation process for ECN counts (#2534, * Improved robustness of validation process for ECN counts (#2534,
#2752) #2752)
o Require endpoints to ignore spurious migration attempts (#2342, * Require endpoints to ignore spurious migration attempts (#2342,
#2893) #2893)
o Transport parameter for disabling migration clarified to allow NAT * Transport parameter for disabling migration clarified to allow NAT
rebinding (#2389, #2893) rebinding (#2389, #2893)
o Document principles for defining new error codes (#2388, #2880) * Document principles for defining new error codes (#2388, #2880)
o Reserve transport parameters for greasing (#2550, #2873) * Reserve transport parameters for greasing (#2550, #2873)
o A maximum ACK delay of 0 is used for handshake packet number * A maximum ACK delay of 0 is used for handshake packet number
spaces (#2646, #2638) spaces (#2646, #2638)
o Improved rules for use of congestion control state on new paths * Improved rules for use of congestion control state on new paths
(#2685, #2918) (#2685, #2918)
o Removed recommendation to coordinate spin for multiple connections * Removed recommendation to coordinate spin for multiple connections
that share a path (#2763, #2882) that share a path (#2763, #2882)
o Allow smaller stateless resets and recommend a smaller minimum on * Allow smaller stateless resets and recommend a smaller minimum on
packets that might trigger a stateless reset (#2770, #2869, #2927, packets that might trigger a stateless reset (#2770, #2869, #2927,
#3007). #3007).
o Provide guidance around the interface to QUIC as used by * Provide guidance around the interface to QUIC as used by
application protocols (#2805, #2857) application protocols (#2805, #2857)
o Frames other than STREAM can cause STREAM_LIMIT_ERROR (#2825, * Frames other than STREAM can cause STREAM_LIMIT_ERROR (#2825,
#2826) #2826)
o Tighter rules about processing of rejected 0-RTT packets (#2829, * Tighter rules about processing of rejected 0-RTT packets (#2829,
#2840, #2841) #2840, #2841)
o Explanation of the effect of Retry on 0-RTT packets (#2842, #2852) * Explanation of the effect of Retry on 0-RTT packets (#2842, #2852)
o Cryptographic handshake needs to provide server transport * Cryptographic handshake needs to provide server transport
parameter encryption (#2920, #2921) parameter encryption (#2920, #2921)
o Moved ACK generation guidance from recovery draft to transport * Moved ACK generation guidance from recovery draft to transport
draft (#1860, #2916). draft (#1860, #2916).
B.3. Since draft-ietf-quic-transport-21 C.4. Since draft-ietf-quic-transport-21
o Connection ID lengths are now one octet, but limited in version 1 * Connection ID lengths are now one octet, but limited in version 1
to 20 octets of length (#2736, #2749) to 20 octets of length (#2736, #2749)
B.4. Since draft-ietf-quic-transport-20 C.5. Since draft-ietf-quic-transport-20
o Error codes are encoded as variable-length integers (#2672, #2680) * Error codes are encoded as variable-length integers (#2672, #2680)
o NEW_CONNECTION_ID includes a request to retire old connection IDs * NEW_CONNECTION_ID includes a request to retire old connection IDs
(#2645, #2769) (#2645, #2769)
o Tighter rules for generating and explicitly eliciting ACK frames * Tighter rules for generating and explicitly eliciting ACK frames
(#2546, #2794) (#2546, #2794)
o Recommend having only one packet per encryption level in a * Recommend having only one packet per encryption level in a
datagram (#2308, #2747) datagram (#2308, #2747)
o More normative language about use of stateless reset (#2471, * More normative language about use of stateless reset (#2471,
#2574) #2574)
o Allow reuse of stateless reset tokens (#2732, #2733) * Allow reuse of stateless reset tokens (#2732, #2733)
* Allow, but not require, enforcing non-duplicate transport
o Allow, but not require, enforcing non-duplicate transport
parameters (#2689, #2691) parameters (#2689, #2691)
o Added an active_connection_id_limit transport parameter (#1994, * Added an active_connection_id_limit transport parameter (#1994,
#1998) #1998)
o max_ack_delay transport parameter defaults to 0 (#2638, #2646) * max_ack_delay transport parameter defaults to 0 (#2638, #2646)
o When sending 0-RTT, only remembered transport parameters apply * When sending 0-RTT, only remembered transport parameters apply
(#2458, #2360, #2466, #2461) (#2458, #2360, #2466, #2461)
o Define handshake completion and confirmation; define clearer rules * Define handshake completion and confirmation; define clearer rules
when it encryption keys should be discarded (#2214, #2267, #2673) when it encryption keys should be discarded (#2214, #2267, #2673)
o Prohibit path migration prior to handshake confirmation (#2309, * Prohibit path migration prior to handshake confirmation (#2309,
#2370) #2370)
o PATH_RESPONSE no longer needs to be received on the validated path * PATH_RESPONSE no longer needs to be received on the validated path
(#2582, #2580, #2579, #2637) (#2582, #2580, #2579, #2637)
o PATH_RESPONSE frames are not stored and retransmitted (#2724, * PATH_RESPONSE frames are not stored and retransmitted (#2724,
#2729) #2729)
o Document hack for enabling routing of ICMP when doing PMTU probing * Document hack for enabling routing of ICMP when doing PMTU probing
(#1243, #2402) (#1243, #2402)
B.5. Since draft-ietf-quic-transport-19 C.6. Since draft-ietf-quic-transport-19
o Refine discussion of 0-RTT transport parameters (#2467, #2464) * Refine discussion of 0-RTT transport parameters (#2467, #2464)
o Fewer transport parameters need to be remembered for 0-RTT (#2624, * Fewer transport parameters need to be remembered for 0-RTT (#2624,
#2467) #2467)
o Spin bit text incorporated (#2564) * Spin bit text incorporated (#2564)
o Close the connection when maximum stream ID in MAX_STREAMS exceeds * Close the connection when maximum stream ID in MAX_STREAMS exceeds
2^62 - 1 (#2499, #2487) 2^62 - 1 (#2499, #2487)
o New connection ID required for intentional migration (#2414, * New connection ID required for intentional migration (#2414,
#2413) #2413)
o Connection ID issuance can be rate-limited (#2436, #2428) * Connection ID issuance can be rate-limited (#2436, #2428)
o The "QUIC bit" is ignored in Version Negotiation (#2400, #2561) * The "QUIC bit" is ignored in Version Negotiation (#2400, #2561)
o Initial packets from clients need to be padded to 1200 unless a * Initial packets from clients need to be padded to 1200 unless a
Handshake packet is sent as well (#2522, #2523) Handshake packet is sent as well (#2522, #2523)
o CRYPTO frames can be discarded if too much data is buffered * CRYPTO frames can be discarded if too much data is buffered
(#1834, #2524) (#1834, #2524)
o Stateless reset uses a short header packet (#2599, #2600) * Stateless reset uses a short header packet (#2599, #2600)
B.6. Since draft-ietf-quic-transport-18 C.7. Since draft-ietf-quic-transport-18
o Removed version negotiation; version negotiation, including * Removed version negotiation; version negotiation, including
authentication of the result, will be addressed in the next authentication of the result, will be addressed in the next
version of QUIC (#1773, #2313) version of QUIC (#1773, #2313)
o Added discussion of the use of IPv6 flow labels (#2348, #2399) * Added discussion of the use of IPv6 flow labels (#2348, #2399)
o A connection ID can't be retired in a packet that uses that * A connection ID can't be retired in a packet that uses that
connection ID (#2101, #2420) connection ID (#2101, #2420)
o Idle timeout transport parameter is in milliseconds (from seconds) * Idle timeout transport parameter is in milliseconds (from seconds)
(#2453, #2454) (#2453, #2454)
o Endpoints are required to use new connection IDs when they use new * Endpoints are required to use new connection IDs when they use new
network paths (#2413, #2414) network paths (#2413, #2414)
o Increased the set of permissible frames in 0-RTT (#2344, #2355) * Increased the set of permissible frames in 0-RTT (#2344, #2355)
B.7. Since draft-ietf-quic-transport-17 C.8. Since draft-ietf-quic-transport-17
o Stream-related errors now use STREAM_STATE_ERROR (#2305) * Stream-related errors now use STREAM_STATE_ERROR (#2305)
o Endpoints discard initial keys as soon as handshake keys are * Endpoints discard initial keys as soon as handshake keys are
available (#1951, #2045) available (#1951, #2045)
o Expanded conditions for ignoring ICMP packet too big messages * Expanded conditions for ignoring ICMP packet too big messages
(#2108, #2161) (#2108, #2161)
o Remove rate control from PATH_CHALLENGE/PATH_RESPONSE (#2129, * Remove rate control from PATH_CHALLENGE/PATH_RESPONSE (#2129,
#2241) #2241)
o Endpoints are permitted to discard malformed initial packets * Endpoints are permitted to discard malformed initial packets
(#2141) (#2141)
o Clarified ECN implementation and usage requirements (#2156, #2201) * Clarified ECN implementation and usage requirements (#2156, #2201)
o Disable ECN count verification for packets that arrive out of * Disable ECN count verification for packets that arrive out of
order (#2198, #2215) order (#2198, #2215)
o Use Probe Timeout (PTO) instead of RTO (#2206, #2238) * Use Probe Timeout (PTO) instead of RTO (#2206, #2238)
o Loosen constraints on retransmission of ACK ranges (#2199, #2245)
o Limit Retry and Version Negotiation to once per datagram (#2259, * Loosen constraints on retransmission of ACK ranges (#2199, #2245)
* Limit Retry and Version Negotiation to once per datagram (#2259,
#2303) #2303)
o Set a maximum value for max_ack_delay transport parameter (#2282, * Set a maximum value for max_ack_delay transport parameter (#2282,
#2301) #2301)
o Allow server preferred address for both IPv4 and IPv6 (#2122, * Allow server preferred address for both IPv4 and IPv6 (#2122,
#2296) #2296)
o Corrected requirements for migration to a preferred address * Corrected requirements for migration to a preferred address
(#2146, #2349) (#2146, #2349)
o ACK of non-existent packet is illegal (#2298, #2302) * ACK of non-existent packet is illegal (#2298, #2302)
B.8. Since draft-ietf-quic-transport-16 C.9. Since draft-ietf-quic-transport-16
o Stream limits are defined as counts, not maximums (#1850, #1906) * Stream limits are defined as counts, not maximums (#1850, #1906)
o Require amplification attack defense after closing (#1905, #1911) * Require amplification attack defense after closing (#1905, #1911)
o Remove reservation of application error code 0 for STOPPING * Remove reservation of application error code 0 for STOPPING
(#1804, #1922) (#1804, #1922)
o Renumbered frames (#1945) * Renumbered frames (#1945)
o Renumbered transport parameters (#1946) * Renumbered transport parameters (#1946)
o Numeric transport parameters are expressed as varints (#1608, * Numeric transport parameters are expressed as varints (#1608,
#1947, #1955) #1947, #1955)
o Reorder the NEW_CONNECTION_ID frame (#1952, #1963) * Reorder the NEW_CONNECTION_ID frame (#1952, #1963)
o Rework the first byte (#2006) * Rework the first byte (#2006)
* Fix the 0x40 bit - Fix the 0x40 bit
* Change type values for long header - Change type values for long header
* Add spin bit to short header (#631, #1988) - Add spin bit to short header (#631, #1988)
* Encrypt the remainder of the first byte (#1322) - Encrypt the remainder of the first byte (#1322)
* Move packet number length to first byte - Move packet number length to first byte
* Move ODCIL to first byte of retry packets - Move ODCIL to first byte of retry packets
* Simplify packet number protection (#1575) - Simplify packet number protection (#1575)
o Allow STOP_SENDING to open a remote bidirectional stream (#1797, * Allow STOP_SENDING to open a remote bidirectional stream (#1797,
#2013) #2013)
o Added mitigation for off-path migration attacks (#1278, #1749, * Added mitigation for off-path migration attacks (#1278, #1749,
#2033) #2033)
o Don't let the PMTU to drop below 1280 (#2063, #2069) * Don't let the PMTU to drop below 1280 (#2063, #2069)
o Require peers to replace retired connection IDs (#2085) * Require peers to replace retired connection IDs (#2085)
o Servers are required to ignore Version Negotiation packets (#2088) * Servers are required to ignore Version Negotiation packets (#2088)
o Tokens are repeated in all Initial packets (#2089) * Tokens are repeated in all Initial packets (#2089)
o Clarified how PING frames are sent after loss (#2094) * Clarified how PING frames are sent after loss (#2094)
o Initial keys are discarded once Handshake are available (#1951, * Initial keys are discarded once Handshake are available (#1951,
#2045) #2045)
o ICMP PTB validation clarifications (#2161, #2109, #2108) * ICMP PTB validation clarifications (#2161, #2109, #2108)
B.9. Since draft-ietf-quic-transport-15 C.10. Since draft-ietf-quic-transport-15
Substantial editorial reorganization; no technical changes. Substantial editorial reorganization; no technical changes.
B.10. Since draft-ietf-quic-transport-14 C.11. Since draft-ietf-quic-transport-14
o Merge ACK and ACK_ECN (#1778, #1801) * Merge ACK and ACK_ECN (#1778, #1801)
o Explicitly communicate max_ack_delay (#981, #1781) * Explicitly communicate max_ack_delay (#981, #1781)
o Validate original connection ID after Retry packets (#1710, #1486, * Validate original connection ID after Retry packets (#1710, #1486,
#1793) #1793)
o Idle timeout is optional and has no specified maximum (#1765) * Idle timeout is optional and has no specified maximum (#1765)
o Update connection ID handling; add RETIRE_CONNECTION_ID type * Update connection ID handling; add RETIRE_CONNECTION_ID type
(#1464, #1468, #1483, #1484, #1486, #1495, #1729, #1742, #1799, (#1464, #1468, #1483, #1484, #1486, #1495, #1729, #1742, #1799,
#1821) #1821)
o Include a Token in all Initial packets (#1649, #1794) * Include a Token in all Initial packets (#1649, #1794)
o Prevent handshake deadlock (#1764, #1824) * Prevent handshake deadlock (#1764, #1824)
B.11. Since draft-ietf-quic-transport-13 C.12. Since draft-ietf-quic-transport-13
o Streams open when higher-numbered streams of the same type open * 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 * Split initial stream flow control limit into 3 transport
parameters (#1016, #1542) parameters (#1016, #1542)
o All flow control transport parameters are optional (#1610) * All flow control transport parameters are optional (#1610)
o Removed UNSOLICITED_PATH_RESPONSE error code (#1265, #1539) * Removed UNSOLICITED_PATH_RESPONSE error code (#1265, #1539)
o Permit stateless reset in response to any packet (#1348, #1553) * Permit stateless reset in response to any packet (#1348, #1553)
o Recommended defense against stateless reset spoofing (#1386, * Recommended defense against stateless reset spoofing (#1386,
#1554) #1554)
o Prevent infinite stateless reset exchanges (#1443, #1627) * Prevent infinite stateless reset exchanges (#1443, #1627)
o Forbid processing of the same packet number twice (#1405, #1624) * Forbid processing of the same packet number twice (#1405, #1624)
o Added a packet number decoding example (#1493) * Added a packet number decoding example (#1493)
o More precisely define idle timeout (#1429, #1614, #1652) * More precisely define idle timeout (#1429, #1614, #1652)
o Corrected format of Retry packet and prevented looping (#1492,
* Corrected format of Retry packet and prevented looping (#1492,
#1451, #1448, #1498) #1451, #1448, #1498)
o Permit 0-RTT after receiving Version Negotiation or Retry (#1507, * Permit 0-RTT after receiving Version Negotiation or Retry (#1507,
#1514, #1621) #1514, #1621)
o Permit Retry in response to 0-RTT (#1547, #1552) * Permit Retry in response to 0-RTT (#1547, #1552)
o Looser verification of ECN counters to account for ACK loss * 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) * Remove frame type field from APPLICATION_CLOSE (#1508, #1528)
B.12. Since draft-ietf-quic-transport-12 C.13. Since draft-ietf-quic-transport-12
o Changes to integration of the TLS handshake (#829, #1018, #1094, * 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
* Added NEW_TOKEN frame and Token fields to Initial packet - Changed Retry to be independent of the cryptographic handshake
* Limit the use of HelloRetryRequest to address TLS needs (like - Added NEW_TOKEN frame and Token fields to Initial packet
- Limit the use of HelloRetryRequest to address TLS needs (like
key shares) key shares)
o Enable server to transition connections to a preferred address * Enable server to transition connections to a preferred address
(#560, #1251, #1373) (#560, #1251, #1373)
o Added ECN feedback mechanisms and handling; new ACK_ECN frame * Added ECN feedback mechanisms and handling; new ACK_ECN frame
(#804, #805, #1372) (#804, #805, #1372)
o Changed rules and recommendations for use of new connection IDs * Changed rules and recommendations for use of new connection IDs
(#1258, #1264, #1276, #1280, #1419, #1452, #1453, #1465) (#1258, #1264, #1276, #1280, #1419, #1452, #1453, #1465)
o Added a transport parameter to disable intentional connection * Added a transport parameter to disable intentional connection
migration (#1271, #1447) migration (#1271, #1447)
o Packets from different connection ID can't be coalesced (#1287, * Packets from different connection ID can't be coalesced (#1287,
#1423) #1423)
o Fixed sampling method for packet number encryption; the length * 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 * Stateless Reset is now symmetric and subject to size constraints
(#466, #1346) (#466, #1346)
o Added frame type extension mechanism (#58, #1473) * Added frame type extension mechanism (#58, #1473)
B.13. Since draft-ietf-quic-transport-11 C.14. Since draft-ietf-quic-transport-11
o Enable server to transition connections to a preferred address * Enable server to transition connections to a preferred address
(#560, #1251) (#560, #1251)
o Packet numbers are encrypted (#1174, #1043, #1048, #1034, #850, * 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) * Packet numbers use a variable-length encoding (#989, #1334)
o STREAM frames can now be empty (#1350) * STREAM frames can now be empty (#1350)
B.14. Since draft-ietf-quic-transport-10 C.15. Since draft-ietf-quic-transport-10
o Swap payload length and packed number fields in long header * Swap payload length and packed number fields in long header
(#1294) (#1294)
o Clarified that CONNECTION_CLOSE is allowed in Handshake packet * Clarified that CONNECTION_CLOSE is allowed in Handshake packet
(#1274) (#1274)
o Spin bit reserved (#1283) * Spin bit reserved (#1283)
* 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) * A more complete connection migration (#1249)
o Refine opportunistic ACK defense text (#305, #1030, #1185) * Refine opportunistic ACK defense text (#305, #1030, #1185)
o A Stateless Reset Token isn't mandatory (#818, #1191) * A Stateless Reset Token isn't mandatory (#818, #1191)
o Removed implicit stream opening (#896, #1193) * Removed implicit stream opening (#896, #1193)
o An empty STREAM frame can be used to open a stream without sending * 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 * 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) * STOP_SENDING is now prohibited before streams are used (#1050)
o Recommend including ACK in Retry packets and allow PADDING (#1067,
* Recommend including ACK in Retry packets and allow PADDING (#1067,
#882) #882)
o Endpoints now become closing after an idle timeout (#1178, #1179) * Endpoints now become closing after an idle timeout (#1178, #1179)
o Remove implication that Version Negotiation is sent when a packet * 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.15. Since draft-ietf-quic-transport-09 C.16. Since draft-ietf-quic-transport-09
o Added PATH_CHALLENGE and PATH_RESPONSE frames to replace PING with * 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 * 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 * Delivery order of stream data is no longer strongly specified
(#252, #1070) (#252, #1070)
o Rework of packet handling and version negotiation (#1038) * Rework of packet handling and version negotiation (#1038)
o Stream 0 is now exempt from flow control until the handshake * Stream 0 is now exempt from flow control until the handshake
completes (#1074, #725, #825, #1082) completes (#1074, #725, #825, #1082)
o Improved retransmission rules for all frame types: information is * 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) * Added an error code for server busy signals (#1137)
* 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.16. Since draft-ietf-quic-transport-08 C.17. Since draft-ietf-quic-transport-08
o Clarified requirements for BLOCKED usage (#65, #924) * Clarified requirements for BLOCKED usage (#65, #924)
o BLOCKED frame now includes reason for blocking (#452, #924, #927, * BLOCKED frame now includes reason for blocking (#452, #924, #927,
#928) #928)
o GAP limitation in ACK Frame (#613) * GAP limitation in ACK Frame (#613)
o Improved PMTUD description (#614, #1036) * Improved PMTUD description (#614, #1036)
o Clarified stream state machine (#634, #662, #743, #894) * Clarified stream state machine (#634, #662, #743, #894)
o Reserved versions don't need to be generated deterministically
* Reserved versions don't need to be generated deterministically
(#831, #931) (#831, #931)
o You don't always need the draining period (#871) * You don't always need the draining period (#871)
o Stateless reset clarified as version-specific (#930, #986) * Stateless reset clarified as version-specific (#930, #986)
o initial_max_stream_id_x transport parameters are optional (#970, * initial_max_stream_id_x transport parameters are optional (#970,
#971) #971)
o Ack Delay assumes a default value during the handshake (#1007, * Ack Delay assumes a default value during the handshake (#1007,
#1009) #1009)
o Removed transport parameters from NewSessionTicket (#1015) * Removed transport parameters from NewSessionTicket (#1015)
B.17. Since draft-ietf-quic-transport-07 C.18. Since draft-ietf-quic-transport-07
o The long header now has version before packet number (#926, #939) * The long header now has version before packet number (#926, #939)
o Rename and consolidate packet types (#846, #822, #847) * Rename and consolidate packet types (#846, #822, #847)
o Packet types are assigned new codepoints and the Connection ID * 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, * Removed type for Version Negotiation and use Version 0 (#963,
#968) #968)
o Streams are split into unidirectional and bidirectional (#643, * 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
transport parameters (#909, #958) transport parameters (#909, #958)
* Stream limit transport parameters are now optional and default - Stream limit transport parameters are now optional and default
to 0 (#970, #971) to 0 (#970, #971)
o The stream state machine has been split into read and write (#634, * The stream state machine has been split into read and write (#634,
#894) #894)
o Employ variable-length integer encodings throughout (#595) * Employ variable-length integer encodings throughout (#595)
o Improvements to connection close * Improvements to connection close
* Added distinct closing and draining states (#899, #871) - Added distinct closing and draining states (#899, #871)
* Draining period can terminate early (#869, #870) - Draining period can terminate early (#869, #870)
* Clarifications about stateless reset (#889, #890) - Clarifications about stateless reset (#889, #890)
o Address validation for connection migration (#161, #732, #878) * Address validation for connection migration (#161, #732, #878)
o Clearly defined retransmission rules for BLOCKED (#452, #65, #924) * Clearly defined retransmission rules for BLOCKED (#452, #65, #924)
o negotiated_version is sent in server transport parameters (#710, * negotiated_version is sent in server transport parameters (#710,
#959) #959)
o Increased the range over which packet numbers are randomized * Increased the range over which packet numbers are randomized
(#864, #850, #964) (#864, #850, #964)
B.18. Since draft-ietf-quic-transport-06 C.19. Since draft-ietf-quic-transport-06
o Replaced FNV-1a with AES-GCM for all "Cleartext" packets (#554) * Replaced FNV-1a with AES-GCM for all "Cleartext" packets (#554)
o Split error code space between application and transport (#485) * Split error code space between application and transport (#485)
o Stateless reset token moved to end (#820) * Stateless reset token moved to end (#820)
o 1-RTT-protected long header types removed (#848) * 1-RTT-protected long header types removed (#848)
o No acknowledgments during draining period (#852) * No acknowledgments during draining period (#852)
o Remove "application close" as a separate close type (#854) * Remove "application close" as a separate close type (#854)
o Remove timestamps from the ACK frame (#841) * Remove timestamps from the ACK frame (#841)
o Require transport parameters to only appear once (#792) * Require transport parameters to only appear once (#792)
B.19. Since draft-ietf-quic-transport-05 C.20. Since draft-ietf-quic-transport-05
o Stateless token is server-only (#726) * Stateless token is server-only (#726)
o Refactor section on connection termination (#733, #748, #328, * Refactor section on connection termination (#733, #748, #328,
#177) #177)
o Limit size of Version Negotiation packet (#585) * Limit size of Version Negotiation packet (#585)
o Clarify when and what to ack (#736) * Clarify when and what to ack (#736)
o Renamed STREAM_ID_NEEDED to STREAM_ID_BLOCKED * Renamed STREAM_ID_NEEDED to STREAM_ID_BLOCKED
o Clarify Keep-alive requirements (#729) * Clarify Keep-alive requirements (#729)
B.20. Since draft-ietf-quic-transport-04 C.21. Since draft-ietf-quic-transport-04
o Introduce STOP_SENDING frame, RESET_STREAM only resets in one * Introduce STOP_SENDING frame, RESET_STREAM only resets in one
direction (#165) direction (#165)
o Removed GOAWAY; application protocols are responsible for graceful * Removed GOAWAY; application protocols are responsible for graceful
shutdown (#696) shutdown (#696)
o Reduced the number of error codes (#96, #177, #184, #211) * Reduced the number of error codes (#96, #177, #184, #211)
o Version validation fields can't move or change (#121) * Version validation fields can't move or change (#121)
o Removed versions from the transport parameters in a * Removed versions from the transport parameters in a
NewSessionTicket message (#547) NewSessionTicket message (#547)
o Clarify the meaning of "bytes in flight" (#550) * Clarify the meaning of "bytes in flight" (#550)
o Public reset is now stateless reset and not visible to the path * Public reset is now stateless reset and not visible to the path
(#215) (#215)
o Reordered bits and fields in STREAM frame (#620) * Reordered bits and fields in STREAM frame (#620)
o Clarifications to the stream state machine (#572, #571) * Clarifications to the stream state machine (#572, #571)
o Increased the maximum length of the Largest Acknowledged field in * 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) * truncate_connection_id is renamed to omit_connection_id (#659)
o CONNECTION_CLOSE terminates the connection like TCP RST (#330, * 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) * Update labels used in HKDF-Expand-Label to match TLS 1.3 (#642)
B.21. Since draft-ietf-quic-transport-03 C.22. Since draft-ietf-quic-transport-03
o Change STREAM and RESET_STREAM layout * Change STREAM and RESET_STREAM layout
o Add MAX_STREAM_ID settings * Add MAX_STREAM_ID settings
B.22. Since draft-ietf-quic-transport-02 C.23. Since draft-ietf-quic-transport-02
o The size of the initial packet payload has a fixed minimum (#267, * The size of the initial packet payload has a fixed minimum (#267,
#472) #472)
o Define when Version Negotiation packets are ignored (#284, #294, * 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 * The 64-bit FNV-1a algorithm is used for integrity protection of
unprotected packets (#167, #480, #481, #517) unprotected packets (#167, #480, #481, #517)
o Rework initial packet types to change how the connection ID is * Rework initial packet types to change how the connection ID is
chosen (#482, #442, #493) chosen (#482, #442, #493)
o No timestamps are forbidden in unprotected packets (#542, #429) * No timestamps are forbidden in unprotected packets (#542, #429)
o Cryptographic handshake is now on stream 0 (#456) * Cryptographic handshake is now on stream 0 (#456)
o Remove congestion control exemption for cryptographic handshake * Remove congestion control exemption for cryptographic handshake
(#248, #476) (#248, #476)
o Version 1 of QUIC uses TLS; a new version is needed to use a * Version 1 of QUIC uses TLS; a new version is needed to use a
different handshake protocol (#516) different handshake protocol (#516)
o STREAM frames have a reduced number of offset lengths (#543, #430) * STREAM frames have a reduced number of offset lengths (#543, #430)
o Split some frames into separate connection- and stream- level * 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 * 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 * 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) * Expanded security considerations (#440, #444, #445, #448)
B.23. Since draft-ietf-quic-transport-01 C.24. Since draft-ietf-quic-transport-01
o Defined short and long packet headers (#40, #148, #361) * Defined short and long packet headers (#40, #148, #361)
o Defined a versioning scheme and stable fields (#51, #361) * Defined a versioning scheme and stable fields (#51, #361)
o Define reserved version values for "greasing" negotiation (#112, * Define reserved version values for "greasing" negotiation (#112,
#278) #278)
o The initial packet number is randomized (#35, #283) * The initial packet number is randomized (#35, #283)
o Narrow the packet number encoding range requirement (#67, #286, * Narrow the packet number encoding range requirement (#67, #286,
#299, #323, #356) #299, #323, #356)
o Defined client address validation (#52, #118, #120, #275) * Defined client address validation (#52, #118, #120, #275)
o Define transport parameters as a TLS extension (#49, #122)
o SCUP and COPT parameters are no longer valid (#116, #117) * Define transport parameters as a TLS extension (#49, #122)
o Transport parameters for 0-RTT are either remembered from before, * SCUP and COPT parameters are no longer valid (#116, #117)
* Transport parameters for 0-RTT are either remembered from before,
or assume default values (#126) or assume default values (#126)
o The server chooses connection IDs in its final flight (#119, #349, * The server chooses connection IDs in its final flight (#119, #349,
#361) #361)
o The server echoes the Connection ID and packet number fields when * The server echoes the Connection ID and packet number fields when
sending a Version Negotiation packet (#133, #295, #244) sending a Version Negotiation packet (#133, #295, #244)
o Defined a minimum packet size for the initial handshake packet * Defined a minimum packet size for the initial handshake packet
from the client (#69, #136, #139, #164) from the client (#69, #136, #139, #164)
o Path MTU Discovery (#64, #106) * Path MTU Discovery (#64, #106)
o The initial handshake packet from the client needs to fit in a * The initial handshake packet from the client needs to fit in a
single packet (#338) single packet (#338)
o Forbid acknowledgment of packets containing only ACK and PADDING * Forbid acknowledgment of packets containing only ACK and PADDING
(#291) (#291)
o Require that frames are processed when packets are acknowledged * Require that frames are processed when packets are acknowledged
(#381, #341) (#381, #341)
o Removed the STOP_WAITING frame (#66) * Removed the STOP_WAITING frame (#66)
o Don't require retransmission of old timestamps for lost ACK frames * Don't require retransmission of old timestamps for lost ACK frames
(#308) (#308)
o Clarified that frames are not retransmitted, but the information * Clarified that frames are not retransmitted, but the information
in them can be (#157, #298) in them can be (#157, #298)
o Error handling definitions (#335) * Error handling definitions (#335)
o Split error codes into four sections (#74) * Split error codes into four sections (#74)
o Forbid the use of Public Reset where CONNECTION_CLOSE is possible * Forbid the use of Public Reset where CONNECTION_CLOSE is possible
(#289) (#289)
o Define packet protection rules (#336) * Define packet protection rules (#336)
o Require that stream be entirely delivered or reset, including * Require that stream be entirely delivered or reset, including
acknowledgment of all STREAM frames or the RESET_STREAM, before it acknowledgment of all STREAM frames or the RESET_STREAM, before it
closes (#381) closes (#381)
o Remove stream reservation from state machine (#174, #280) * Remove stream reservation from state machine (#174, #280)
o Only stream 1 does not contribute to connection-level flow control * Only stream 1 does not contribute to connection-level flow control
(#204) (#204)
o Stream 1 counts towards the maximum concurrent stream limit (#201, * Stream 1 counts towards the maximum concurrent stream limit (#201,
#282) #282)
o Remove connection-level flow control exclusion for some streams * Remove connection-level flow control exclusion for some streams
(except 1) (#246) (except 1) (#246)
o RESET_STREAM affects connection-level flow control (#162, #163) * RESET_STREAM affects connection-level flow control (#162, #163)
o Flow control accounting uses the maximum data offset on each * Flow control accounting uses the maximum data offset on each
stream, rather than bytes received (#378) stream, rather than bytes received (#378)
o Moved length-determining fields to the start of STREAM and ACK * Moved length-determining fields to the start of STREAM and ACK
(#168, #277) (#168, #277)
o Added the ability to pad between frames (#158, #276) * Added the ability to pad between frames (#158, #276)
o Remove error code and reason phrase from GOAWAY (#352, #355) * Remove error code and reason phrase from GOAWAY (#352, #355)
o GOAWAY includes a final stream number for both directions (#347) * GOAWAY includes a final stream number for both directions (#347)
o Error codes for RESET_STREAM and CONNECTION_CLOSE are now at a * Error codes for RESET_STREAM and CONNECTION_CLOSE are now at a
consistent offset (#249) consistent offset (#249)
o Defined priority as the responsibility of the application protocol * Defined priority as the responsibility of the application protocol
(#104, #303) (#104, #303)
B.24. Since draft-ietf-quic-transport-00 C.25. Since draft-ietf-quic-transport-00
o Replaced DIVERSIFICATION_NONCE flag with KEY_PHASE flag
o Defined versioning
o Reworked description of packet and frame layout * Replaced DIVERSIFICATION_NONCE flag with KEY_PHASE flag
o Error code space is divided into regions for each component * Defined versioning
o Use big endian for all numeric values * Reworked description of packet and frame layout
B.25. Since draft-hamilton-quic-transport-protocol-01 * Error code space is divided into regions for each component
o Adopted as base for draft-ietf-quic-tls * Use big endian for all numeric values
o Updated authors/editors list C.26. Since draft-hamilton-quic-transport-protocol-01
o Added IANA Considerations section
o Moved Contributors and Acknowledgments to appendices * Adopted as base for draft-ietf-quic-tls
Acknowledgments * Updated authors/editors list
Special thanks are due to the following for helping shape pre-IETF * Added IANA Considerations section
QUIC and its deployment: Chris Bentzel, Misha Efimov, Roberto Peon,
Alistair Riddoch, Siddharth Vijayakrishnan, and Assar Westerlund.
This document has benefited immensely from various private * Moved Contributors and Acknowledgments to appendices
discussions and public ones on the quic@ietf.org and proto-
quic@chromium.org mailing lists. Our thanks to all.
Contributors Contributors
The original authors of this specification were Ryan Hamilton, Jana
Iyengar, Ian Swett, and Alyssa Wilk.
The original design and rationale behind this protocol draw The original design and rationale behind this protocol draw
significantly from work by Jim Roskind [EARLY-DESIGN]. In significantly from work by Jim Roskind [EARLY-DESIGN].
alphabetical order, the contributors to the pre-IETF QUIC project at
Google are: Britt Cyr, Jeremy Dorfman, Ryan Hamilton, Jana Iyengar, The IETF QUIC Working Group received an enormous amount of support
Fedor Kouranov, Charles Krasic, Jo Kulik, Adam Langley, Jim Roskind, from many people. The following people provided substantive
Robbie Shade, Satyam Shekhar, Cherie Shi, Ian Swett, Raman Tenneti, contributions to this document: Alessandro Ghedini, Alyssa Wilk,
Victor Vasiliev, Antonio Vicente, Patrik Westin, Alyssa Wilk, Dale Antoine Delignat-Lavaud, Brian Trammell, Christian Huitema, Colin
Worley, Fan Yang, Dan Zhang, Daniel Ziegler. Perkins, David Schinazi, Dmitri Tikhonov, Eric Kinnear, Eric
Rescorla, Gorry Fairhurst, Ian Swett, Igor Lubashev, 奥 一穂 (Kazuho
Oku), Lucas Pardue, Magnus Westerlund, Marten Seemann, Martin Duke,
Mike Bishop, Mikkel Fahnøe Jørgensen, Mirja Kühlewind, Nick Banks,
Nick Harper, Patrick McManus, Roberto Peon, Ryan Hamilton, Subodh
Iyengar, Tatsuhiro Tsujikawa, Ted Hardie, Tom Jones, and Victor
Vasiliev.
Authors' Addresses Authors' Addresses
Jana Iyengar (editor) Jana Iyengar (editor)
Fastly Fastly
Email: jri.ietf@gmail.com Email: jri.ietf@gmail.com
Martin Thomson (editor) Martin Thomson (editor)
Mozilla Mozilla
Email: mt@lowentropy.net Email: mt@lowentropy.net
 End of changes. 611 change blocks. 
1108 lines changed or deleted 1840 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/