draft-ietf-quic-transport-24.txt   draft-ietf-quic-transport-latest.txt 
QUIC Working Group J. Iyengar, Ed. QUIC Working Group 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: June 7, 2020 Mozilla
November 4, 2019 December 5, 2019
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-latest
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 June 7, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2019 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 27 skipping to change at page 2, line 27
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 . . . . . . . . . . . . . . . . . 8
2. Streams . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2. Streams . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1. Stream Types and Identifiers . . . . . . . . . . . . . . 9 2.1. Stream Types and Identifiers . . . . . . . . . . . . . . 9
2.2. Sending and Receiving Data . . . . . . . . . . . . . . . 10 2.2. Sending and Receiving Data . . . . . . . . . . . . . . . 10
2.3. Stream Prioritization . . . . . . . . . . . . . . . . . . 11 2.3. Stream Prioritization . . . . . . . . . . . . . . . . . . 11
2.4. Required Operations on Streams . . . . . . . . . . . . . 11 2.4. Required Operations on Streams . . . . . . . . . . . . . 11
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 . . . . . . . . . . . . . . . . . 15
3.3. Permitted Frame Types . . . . . . . . . . . . . . . . . . 17 3.3. Permitted Frame Types . . . . . . . . . . . . . . . . . . 17
3.4. Bidirectional Stream States . . . . . . . . . . . . . . . 17 3.4. Bidirectional Stream States . . . . . . . . . . . . . . . 18
3.5. Solicited State Transitions . . . . . . . . . . . . . . . 19 3.5. Solicited State Transitions . . . . . . . . . . . . . . . 19
4. Flow Control . . . . . . . . . . . . . . . . . . . . . . . . 20 4. Flow Control . . . . . . . . . . . . . . . . . . . . . . . . 20
4.1. Data Flow Control . . . . . . . . . . . . . . . . . . . . 20 4.1. Data Flow Control . . . . . . . . . . . . . . . . . . . . 21
4.2. Flow Credit Increments . . . . . . . . . . . . . . . . . 21 4.2. Flow Credit Increments . . . . . . . . . . . . . . . . . 22
4.3. Handling Stream Cancellation . . . . . . . . . . . . . . 22 4.3. Handling Stream Cancellation . . . . . . . . . . . . . . 23
4.4. Stream Final Size . . . . . . . . . . . . . . . . . . . . 23 4.4. Stream Final Size . . . . . . . . . . . . . . . . . . . . 23
4.5. Controlling Concurrency . . . . . . . . . . . . . . . . . 23 4.5. Controlling Concurrency . . . . . . . . . . . . . . . . . 24
5. Connections . . . . . . . . . . . . . . . . . . . . . . . . . 24 5. Connections . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.1. Connection ID . . . . . . . . . . . . . . . . . . . . . . 24 5.1. Connection ID . . . . . . . . . . . . . . . . . . . . . . 25
5.1.1. Issuing Connection IDs . . . . . . . . . . . . . . . 25 5.1.1. Issuing Connection IDs . . . . . . . . . . . . . . . 26
5.1.2. Consuming and Retiring Connection IDs . . . . . . . . 26 5.1.2. Consuming and Retiring Connection IDs . . . . . . . . 27
5.2. Matching Packets to Connections . . . . . . . . . . . . . 27 5.2. Matching Packets to Connections . . . . . . . . . . . . . 28
5.2.1. Client Packet Handling . . . . . . . . . . . . . . . 28 5.2.1. Client Packet Handling . . . . . . . . . . . . . . . 29
5.2.2. Server Packet Handling . . . . . . . . . . . . . . . 28 5.2.2. Server Packet Handling . . . . . . . . . . . . . . . 29
5.3. Life of a QUIC Connection . . . . . . . . . . . . . . . . 29 5.3. Life of a QUIC Connection . . . . . . . . . . . . . . . . 30
5.4. Required Operations on Connections . . . . . . . . . . . 29 5.4. Required Operations on Connections . . . . . . . . . . . 30
6. Version Negotiation . . . . . . . . . . . . . . . . . . . . . 30 6. Version Negotiation . . . . . . . . . . . . . . . . . . . . . 31
6.1. Sending Version Negotiation Packets . . . . . . . . . . . 30 6.1. Sending Version Negotiation Packets . . . . . . . . . . . 32
6.2. Handling Version Negotiation Packets . . . . . . . . . . 31 6.2. Handling Version Negotiation Packets . . . . . . . . . . 32
6.2.1. Version Negotiation Between Draft Versions . . . . . 31 6.2.1. Version Negotiation Between Draft Versions . . . . . 33
6.3. Using Reserved Versions . . . . . . . . . . . . . . . . . 31 6.3. Using Reserved Versions . . . . . . . . . . . . . . . . . 33
7. Cryptographic and Transport Handshake . . . . . . . . . . . . 32 7. Cryptographic and Transport Handshake . . . . . . . . . . . . 33
7.1. Example Handshake Flows . . . . . . . . . . . . . . . . . 33 7.1. Example Handshake Flows . . . . . . . . . . . . . . . . . 34
7.2. Negotiating Connection IDs . . . . . . . . . . . . . . . 34 7.2. Negotiating Connection IDs . . . . . . . . . . . . . . . 36
7.3. Transport Parameters . . . . . . . . . . . . . . . . . . 36 7.3. Transport Parameters . . . . . . . . . . . . . . . . . . 37
7.3.1. Values of Transport Parameters for 0-RTT . . . . . . 36 7.3.1. Values of Transport Parameters for 0-RTT . . . . . . 38
7.3.2. New Transport Parameters . . . . . . . . . . . . . . 38 7.3.2. New Transport Parameters . . . . . . . . . . . . . . 39
7.4. Cryptographic Message Buffering . . . . . . . . . . . . . 38 7.4. Cryptographic Message Buffering . . . . . . . . . . . . . 39
8. Address Validation . . . . . . . . . . . . . . . . . . . . . 38 8. Address Validation . . . . . . . . . . . . . . . . . . . . . 40
8.1. Address Validation During Connection Establishment . . . 39 8.1. Address Validation During Connection Establishment . . . 40
8.1.1. Address Validation using Retry Packets . . . . . . . 40 8.1.1. Token Construction . . . . . . . . . . . . . . . . . 41
8.1.2. Address Validation for Future Connections . . . . . . 41 8.1.2. Address Validation using Retry Packets . . . . . . . 41
8.1.3. Address Validation Token Integrity . . . . . . . . . 43 8.1.3. Address Validation for Future Connections . . . . . . 42
8.2. Path Validation . . . . . . . . . . . . . . . . . . . . . 43 8.1.4. Address Validation Token Integrity . . . . . . . . . 45
8.3. Initiating Path Validation . . . . . . . . . . . . . . . 44 8.2. Path Validation . . . . . . . . . . . . . . . . . . . . . 45
8.4. Path Validation Responses . . . . . . . . . . . . . . . . 44 8.3. Initiating Path Validation . . . . . . . . . . . . . . . 46
8.5. Successful Path Validation . . . . . . . . . . . . . . . 44 8.4. Path Validation Responses . . . . . . . . . . . . . . . . 46
8.6. Failed Path Validation . . . . . . . . . . . . . . . . . 45 8.5. Successful Path Validation . . . . . . . . . . . . . . . 46
9. Connection Migration . . . . . . . . . . . . . . . . . . . . 45 8.6. Failed Path Validation . . . . . . . . . . . . . . . . . 47
9.1. Probing a New Path . . . . . . . . . . . . . . . . . . . 46 9. Connection Migration . . . . . . . . . . . . . . . . . . . . 47
9.2. Initiating Connection Migration . . . . . . . . . . . . . 47 9.1. Probing a New Path . . . . . . . . . . . . . . . . . . . 48
9.3. Responding to Connection Migration . . . . . . . . . . . 47 9.2. Initiating Connection Migration . . . . . . . . . . . . . 49
9.3.1. Peer Address Spoofing . . . . . . . . . . . . . . . . 48 9.3. Responding to Connection Migration . . . . . . . . . . . 49
9.3.2. On-Path Address Spoofing . . . . . . . . . . . . . . 48 9.3.1. Peer Address Spoofing . . . . . . . . . . . . . . . . 50
9.3.3. Off-Path Packet Forwarding . . . . . . . . . . . . . 49 9.3.2. On-Path Address Spoofing . . . . . . . . . . . . . . 50
9.4. Loss Detection and Congestion Control . . . . . . . . . . 50 9.3.3. Off-Path Packet Forwarding . . . . . . . . . . . . . 51
9.5. Privacy Implications of Connection Migration . . . . . . 51 9.4. Loss Detection and Congestion Control . . . . . . . . . . 52
9.6. Server's Preferred Address . . . . . . . . . . . . . . . 52 9.5. Privacy Implications of Connection Migration . . . . . . 53
9.6.1. Communicating a Preferred Address . . . . . . . . . . 52 9.6. Server's Preferred Address . . . . . . . . . . . . . . . 54
9.6.2. Responding to Connection Migration . . . . . . . . . 53 9.6.1. Communicating a Preferred Address . . . . . . . . . . 54
9.6.3. Interaction of Client Migration and Preferred Address 53 9.6.2. Responding to Connection Migration . . . . . . . . . 55
9.7. Use of IPv6 Flow-Label and Migration . . . . . . . . . . 54 9.6.3. Interaction of Client Migration and Preferred Address 55
10. Connection Termination . . . . . . . . . . . . . . . . . . . 54 9.7. Use of IPv6 Flow-Label and Migration . . . . . . . . . . 56
10.1. Closing and Draining Connection States . . . . . . . . . 54 10. Connection Termination . . . . . . . . . . . . . . . . . . . 56
10.2. Idle Timeout . . . . . . . . . . . . . . . . . . . . . . 56 10.1. Closing and Draining Connection States . . . . . . . . . 56
10.3. Immediate Close . . . . . . . . . . . . . . . . . . . . 56 10.2. Idle Timeout . . . . . . . . . . . . . . . . . . . . . . 58
10.4. Stateless Reset . . . . . . . . . . . . . . . . . . . . 58 10.3. Immediate Close . . . . . . . . . . . . . . . . . . . . 58
10.4.1. Detecting a Stateless Reset . . . . . . . . . . . . 60 10.4. Stateless Reset . . . . . . . . . . . . . . . . . . . . 60
10.4.2. Calculating a Stateless Reset Token . . . . . . . . 61 10.4.1. Detecting a Stateless Reset . . . . . . . . . . . . 63
10.4.3. Looping . . . . . . . . . . . . . . . . . . . . . . 62 10.4.2. Calculating a Stateless Reset Token . . . . . . . . 64
11. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 63 10.4.3. Looping . . . . . . . . . . . . . . . . . . . . . . 65
11.1. Connection Errors . . . . . . . . . . . . . . . . . . . 63 11. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 65
11.2. Stream Errors . . . . . . . . . . . . . . . . . . . . . 64 11.1. Connection Errors . . . . . . . . . . . . . . . . . . . 66
12. Packets and Frames . . . . . . . . . . . . . . . . . . . . . 64 11.2. Stream Errors . . . . . . . . . . . . . . . . . . . . . 66
12.1. Protected Packets . . . . . . . . . . . . . . . . . . . 65 12. Packets and Frames . . . . . . . . . . . . . . . . . . . . . 67
12.2. Coalescing Packets . . . . . . . . . . . . . . . . . . . 65 12.1. Protected Packets . . . . . . . . . . . . . . . . . . . 67
12.3. Packet Numbers . . . . . . . . . . . . . . . . . . . . . 66 12.2. Coalescing Packets . . . . . . . . . . . . . . . . . . . 68
12.4. Frames and Frame Types . . . . . . . . . . . . . . . . . 68 12.3. Packet Numbers . . . . . . . . . . . . . . . . . . . . . 69
13. Packetization and Reliability . . . . . . . . . . . . . . . . 70 12.4. Frames and Frame Types . . . . . . . . . . . . . . . . . 70
13.1. Packet Processing . . . . . . . . . . . . . . . . . . . 71 13. Packetization and Reliability . . . . . . . . . . . . . . . . 73
13.2. Generating Acknowledgements . . . . . . . . . . . . . . 71 13.1. Packet Processing . . . . . . . . . . . . . . . . . . . 74
13.2.1. Sending ACK Frames . . . . . . . . . . . . . . . . . 71 13.2. Generating Acknowledgements . . . . . . . . . . . . . . 74
13.2.2. Managing ACK Ranges . . . . . . . . . . . . . . . . 73 13.2.1. Sending ACK Frames . . . . . . . . . . . . . . . . . 74
13.2.3. Receiver Tracking of ACK Frames . . . . . . . . . . 73 13.2.2. Managing ACK Ranges . . . . . . . . . . . . . . . . 76
13.2.4. Limiting ACK Ranges . . . . . . . . . . . . . . . . 73 13.2.3. Receiver Tracking of ACK Frames . . . . . . . . . . 76
13.2.5. Measuring and Reporting Host Delay . . . . . . . . . 74 13.2.4. Limiting ACK Ranges . . . . . . . . . . . . . . . . 76
13.2.6. ACK Frames and Packet Protection . . . . . . . . . . 74 13.2.5. Measuring and Reporting Host Delay . . . . . . . . . 77
13.3. Retransmission of Information . . . . . . . . . . . . . 74 13.2.6. ACK Frames and Packet Protection . . . . . . . . . . 77
13.4. Explicit Congestion Notification . . . . . . . . . . . . 77 13.3. Retransmission of Information . . . . . . . . . . . . . 77
13.4.1. ECN Counts . . . . . . . . . . . . . . . . . . . . . 77 13.4. Explicit Congestion Notification . . . . . . . . . . . . 80
13.4.2. ECN Validation . . . . . . . . . . . . . . . . . . . 78 13.4.1. ECN Counts . . . . . . . . . . . . . . . . . . . . . 80
14. Packet Size . . . . . . . . . . . . . . . . . . . . . . . . . 80 13.4.2. ECN Validation . . . . . . . . . . . . . . . . . . . 81
14.1. Path Maximum Transmission Unit (PMTU) . . . . . . . . . 80 14. Packet Size . . . . . . . . . . . . . . . . . . . . . . . . . 83
14.2. ICMP Packet Too Big Messages . . . . . . . . . . . . . . 81 14.1. Path Maximum Transmission Unit (PMTU) . . . . . . . . . 83
14.3. Datagram Packetization Layer PMTU Discovery . . . . . . 82 14.2. ICMP Packet Too Big Messages . . . . . . . . . . . . . . 84
14.3.1. PMTU Probes Containing Source Connection ID . . . . 83 14.3. Datagram Packetization Layer PMTU Discovery . . . . . . 85
15. Versions . . . . . . . . . . . . . . . . . . . . . . . . . . 83 14.3.1. PMTU Probes Containing Source Connection ID . . . . 86
16. Variable-Length Integer Encoding . . . . . . . . . . . . . . 84 15. Versions . . . . . . . . . . . . . . . . . . . . . . . . . . 86
17. Packet Formats . . . . . . . . . . . . . . . . . . . . . . . 85 16. Variable-Length Integer Encoding . . . . . . . . . . . . . . 87
17.1. Packet Number Encoding and Decoding . . . . . . . . . . 85 17. Packet Formats . . . . . . . . . . . . . . . . . . . . . . . 88
17.2. Long Header Packets . . . . . . . . . . . . . . . . . . 86 17.1. Packet Number Encoding and Decoding . . . . . . . . . . 88
17.2.1. Version Negotiation Packet . . . . . . . . . . . . . 89 17.2. Long Header Packets . . . . . . . . . . . . . . . . . . 89
17.2.2. Initial Packet . . . . . . . . . . . . . . . . . . . 90 17.2.1. Version Negotiation Packet . . . . . . . . . . . . . 92
17.2.3. 0-RTT . . . . . . . . . . . . . . . . . . . . . . . 92 17.2.2. Initial Packet . . . . . . . . . . . . . . . . . . . 93
17.2.4. Handshake Packet . . . . . . . . . . . . . . . . . . 94 17.2.3. 0-RTT . . . . . . . . . . . . . . . . . . . . . . . 95
17.2.5. Retry Packet . . . . . . . . . . . . . . . . . . . . 95 17.2.4. Handshake Packet . . . . . . . . . . . . . . . . . . 97
17.3. Short Header Packets . . . . . . . . . . . . . . . . . . 98 17.2.5. Retry Packet . . . . . . . . . . . . . . . . . . . . 98
17.3.1. Latency Spin Bit . . . . . . . . . . . . . . . . . . 99 17.3. Short Header Packets . . . . . . . . . . . . . . . . . . 101
18. Transport Parameter Encoding . . . . . . . . . . . . . . . . 100 17.3.1. Latency Spin Bit . . . . . . . . . . . . . . . . . . 102
18.1. Reserved Transport Parameters . . . . . . . . . . . . . 101 18. Transport Parameter Encoding . . . . . . . . . . . . . . . . 103
18.2. Transport Parameter Definitions . . . . . . . . . . . . 101 18.1. Reserved Transport Parameters . . . . . . . . . . . . . 104
19. Frame Types and Formats . . . . . . . . . . . . . . . . . . . 106 18.2. Transport Parameter Definitions . . . . . . . . . . . . 104
19.1. PADDING Frame . . . . . . . . . . . . . . . . . . . . . 106 19. Frame Types and Formats . . . . . . . . . . . . . . . . . . . 109
19.2. PING Frame . . . . . . . . . . . . . . . . . . . . . . . 106 19.1. PADDING Frame . . . . . . . . . . . . . . . . . . . . . 109
19.3. ACK Frames . . . . . . . . . . . . . . . . . . . . . . . 107 19.2. PING Frame . . . . . . . . . . . . . . . . . . . . . . . 109
19.3.1. ACK Ranges . . . . . . . . . . . . . . . . . . . . . 108 19.3. ACK Frames . . . . . . . . . . . . . . . . . . . . . . . 110
19.3.2. ECN Counts . . . . . . . . . . . . . . . . . . . . . 110 19.3.1. ACK Ranges . . . . . . . . . . . . . . . . . . . . . 111
19.4. RESET_STREAM Frame . . . . . . . . . . . . . . . . . . . 111 19.3.2. ECN Counts . . . . . . . . . . . . . . . . . . . . . 113
19.5. STOP_SENDING Frame . . . . . . . . . . . . . . . . . . . 111 19.4. RESET_STREAM Frame . . . . . . . . . . . . . . . . . . . 114
19.6. CRYPTO Frame . . . . . . . . . . . . . . . . . . . . . . 112 19.5. STOP_SENDING Frame . . . . . . . . . . . . . . . . . . . 114
19.7. NEW_TOKEN Frame . . . . . . . . . . . . . . . . . . . . 113 19.6. CRYPTO Frame . . . . . . . . . . . . . . . . . . . . . . 115
19.8. STREAM Frames . . . . . . . . . . . . . . . . . . . . . 114 19.7. NEW_TOKEN Frame . . . . . . . . . . . . . . . . . . . . 116
19.9. MAX_DATA Frame . . . . . . . . . . . . . . . . . . . . . 115 19.8. STREAM Frames . . . . . . . . . . . . . . . . . . . . . 117
19.10. MAX_STREAM_DATA Frame . . . . . . . . . . . . . . . . . 116 19.9. MAX_DATA Frame . . . . . . . . . . . . . . . . . . . . . 118
19.11. MAX_STREAMS Frames . . . . . . . . . . . . . . . . . . . 117 19.10. MAX_STREAM_DATA Frame . . . . . . . . . . . . . . . . . 119
19.12. DATA_BLOCKED Frame . . . . . . . . . . . . . . . . . . . 118 19.11. MAX_STREAMS Frames . . . . . . . . . . . . . . . . . . . 120
19.13. STREAM_DATA_BLOCKED Frame . . . . . . . . . . . . . . . 118 19.12. DATA_BLOCKED Frame . . . . . . . . . . . . . . . . . . . 121
19.14. STREAMS_BLOCKED Frames . . . . . . . . . . . . . . . . . 119 19.13. STREAM_DATA_BLOCKED Frame . . . . . . . . . . . . . . . 121
19.15. NEW_CONNECTION_ID Frame . . . . . . . . . . . . . . . . 120 19.14. STREAMS_BLOCKED Frames . . . . . . . . . . . . . . . . . 122
19.16. RETIRE_CONNECTION_ID Frame . . . . . . . . . . . . . . . 121 19.15. NEW_CONNECTION_ID Frame . . . . . . . . . . . . . . . . 123
19.17. PATH_CHALLENGE Frame . . . . . . . . . . . . . . . . . . 122 19.16. RETIRE_CONNECTION_ID Frame . . . . . . . . . . . . . . . 124
19.18. PATH_RESPONSE Frame . . . . . . . . . . . . . . . . . . 123 19.17. PATH_CHALLENGE Frame . . . . . . . . . . . . . . . . . . 125
19.19. CONNECTION_CLOSE Frames . . . . . . . . . . . . . . . . 123 19.18. PATH_RESPONSE Frame . . . . . . . . . . . . . . . . . . 126
19.20. Extension Frames . . . . . . . . . . . . . . . . . . . . 124 19.19. CONNECTION_CLOSE Frames . . . . . . . . . . . . . . . . 126
20. Transport Error Codes . . . . . . . . . . . . . . . . . . . . 124 19.20. Extension Frames . . . . . . . . . . . . . . . . . . . . 127
20.1. Application Protocol Error Codes . . . . . . . . . . . . 126 20. Transport Error Codes . . . . . . . . . . . . . . . . . . . . 128
21. Security Considerations . . . . . . . . . . . . . . . . . . . 126 20.1. Application Protocol Error Codes . . . . . . . . . . . . 129
21.1. Handshake Denial of Service . . . . . . . . . . . . . . 126 21. Security Considerations . . . . . . . . . . . . . . . . . . . 129
21.2. Amplification Attack . . . . . . . . . . . . . . . . . . 127 21.1. Handshake Denial of Service . . . . . . . . . . . . . . 129
21.3. Optimistic ACK Attack . . . . . . . . . . . . . . . . . 127 21.2. Amplification Attack . . . . . . . . . . . . . . . . . . 130
21.4. Slowloris Attacks . . . . . . . . . . . . . . . . . . . 128 21.3. Optimistic ACK Attack . . . . . . . . . . . . . . . . . 131
21.5. Stream Fragmentation and Reassembly Attacks . . . . . . 128 21.4. Slowloris Attacks . . . . . . . . . . . . . . . . . . . 131
21.6. Stream Commitment Attack . . . . . . . . . . . . . . . . 129 21.5. Stream Fragmentation and Reassembly Attacks . . . . . . 131
21.7. Peer Denial of Service . . . . . . . . . . . . . . . . . 129 21.6. Stream Commitment Attack . . . . . . . . . . . . . . . . 132
21.8. Explicit Congestion Notification Attacks . . . . . . . . 130 21.7. Peer Denial of Service . . . . . . . . . . . . . . . . . 132
21.9. Stateless Reset Oracle . . . . . . . . . . . . . . . . . 130 21.8. Explicit Congestion Notification Attacks . . . . . . . . 133
21.10. Version Downgrade . . . . . . . . . . . . . . . . . . . 130 21.9. Stateless Reset Oracle . . . . . . . . . . . . . . . . . 133
21.11. Targeted Attacks by Routing . . . . . . . . . . . . . . 131 21.10. Version Downgrade . . . . . . . . . . . . . . . . . . . 134
22. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 131 21.11. Targeted Attacks by Routing . . . . . . . . . . . . . . 134
22.1. QUIC Transport Parameter Registry . . . . . . . . . . . 131 22. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 134
22.2. QUIC Frame Type Registry . . . . . . . . . . . . . . . . 132 22.1. QUIC Transport Parameter Registry . . . . . . . . . . . 134
22.3. QUIC Transport Error Codes Registry . . . . . . . . . . 133 22.2. QUIC Frame Type Registry . . . . . . . . . . . . . . . . 136
23. References . . . . . . . . . . . . . . . . . . . . . . . . . 135 22.3. QUIC Transport Error Codes Registry . . . . . . . . . . 136
23.1. Normative References . . . . . . . . . . . . . . . . . . 136 23. References . . . . . . . . . . . . . . . . . . . . . . . . . 139
23.2. Informative References . . . . . . . . . . . . . . . . . 137 23.1. Normative References . . . . . . . . . . . . . . . . . . 139
Appendix A. Sample Packet Number Decoding Algorithm . . . . . . 139 23.2. Informative References . . . . . . . . . . . . . . . . . 140
Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 140 Appendix A. Sample Packet Number Decoding Algorithm . . . . . . 142
B.1. Since draft-ietf-quic-transport-23 . . . . . . . . . . . 140 Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 143
B.2. Since draft-ietf-quic-transport-22 . . . . . . . . . . . 140 B.1. Since draft-ietf-quic-transport-23 . . . . . . . . . . . 143
B.3. Since draft-ietf-quic-transport-21 . . . . . . . . . . . 141 B.2. Since draft-ietf-quic-transport-22 . . . . . . . . . . . 143
B.4. Since draft-ietf-quic-transport-20 . . . . . . . . . . . 142 B.3. Since draft-ietf-quic-transport-21 . . . . . . . . . . . 145
B.5. Since draft-ietf-quic-transport-19 . . . . . . . . . . . 143 B.4. Since draft-ietf-quic-transport-20 . . . . . . . . . . . 145
B.6. Since draft-ietf-quic-transport-18 . . . . . . . . . . . 143 B.5. Since draft-ietf-quic-transport-19 . . . . . . . . . . . 146
B.7. Since draft-ietf-quic-transport-17 . . . . . . . . . . . 144 B.6. Since draft-ietf-quic-transport-18 . . . . . . . . . . . 146
B.8. Since draft-ietf-quic-transport-16 . . . . . . . . . . . 144 B.7. Since draft-ietf-quic-transport-17 . . . . . . . . . . . 147
B.9. Since draft-ietf-quic-transport-15 . . . . . . . . . . . 146 B.8. Since draft-ietf-quic-transport-16 . . . . . . . . . . . 147
B.10. Since draft-ietf-quic-transport-14 . . . . . . . . . . . 146 B.9. Since draft-ietf-quic-transport-15 . . . . . . . . . . . 149
B.11. Since draft-ietf-quic-transport-13 . . . . . . . . . . . 146 B.10. Since draft-ietf-quic-transport-14 . . . . . . . . . . . 149
B.12. Since draft-ietf-quic-transport-12 . . . . . . . . . . . 147 B.11. Since draft-ietf-quic-transport-13 . . . . . . . . . . . 149
B.13. Since draft-ietf-quic-transport-11 . . . . . . . . . . . 148 B.12. Since draft-ietf-quic-transport-12 . . . . . . . . . . . 150
B.14. Since draft-ietf-quic-transport-10 . . . . . . . . . . . 148 B.13. Since draft-ietf-quic-transport-11 . . . . . . . . . . . 151
B.15. Since draft-ietf-quic-transport-09 . . . . . . . . . . . 149 B.14. Since draft-ietf-quic-transport-10 . . . . . . . . . . . 151
B.16. Since draft-ietf-quic-transport-08 . . . . . . . . . . . 149 B.15. Since draft-ietf-quic-transport-09 . . . . . . . . . . . 152
B.17. Since draft-ietf-quic-transport-07 . . . . . . . . . . . 150 B.16. Since draft-ietf-quic-transport-08 . . . . . . . . . . . 152
B.18. Since draft-ietf-quic-transport-06 . . . . . . . . . . . 151 B.17. Since draft-ietf-quic-transport-07 . . . . . . . . . . . 153
B.19. Since draft-ietf-quic-transport-05 . . . . . . . . . . . 151 B.18. Since draft-ietf-quic-transport-06 . . . . . . . . . . . 154
B.20. Since draft-ietf-quic-transport-04 . . . . . . . . . . . 151 B.19. Since draft-ietf-quic-transport-05 . . . . . . . . . . . 154
B.21. Since draft-ietf-quic-transport-03 . . . . . . . . . . . 152 B.20. Since draft-ietf-quic-transport-04 . . . . . . . . . . . 154
B.22. Since draft-ietf-quic-transport-02 . . . . . . . . . . . 152 B.21. Since draft-ietf-quic-transport-03 . . . . . . . . . . . 155
B.23. Since draft-ietf-quic-transport-01 . . . . . . . . . . . 153 B.22. Since draft-ietf-quic-transport-02 . . . . . . . . . . . 155
B.24. Since draft-ietf-quic-transport-00 . . . . . . . . . . . 155 B.23. Since draft-ietf-quic-transport-01 . . . . . . . . . . . 156
B.25. Since draft-hamilton-quic-transport-protocol-01 . . . . . 155 B.24. Since draft-ietf-quic-transport-00 . . . . . . . . . . . 158
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 156 B.25. Since draft-hamilton-quic-transport-protocol-01 . . . . . 158
Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . 156 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 159
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 156 Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 159
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 o Stream multiplexing
o Stream and connection-level flow control o Stream and connection-level flow control
skipping to change at page 8, line 34 skipping to change at page 8, line 34
send an acknowledgment (see Section 13.2.1). send an acknowledgment (see Section 13.2.1).
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 25, line 37 skipping to change at page 26, line 27
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 27, line 13 skipping to change at page 27, line 51
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 retire the corresponding connection IDs
and send corresponding RETIRE_CONNECTION_ID frames. Failing to using RETIRE_CONNECTION_ID frames. Failure to retire the connection
retire the connection IDs within approximately one PTO can cause IDs within approximately one PTO can cause packets to be delayed,
packets to be delayed, lost, or cause the original endpoint to send a lost, or cause the original endpoint to send a stateless reset in
stateless reset in response to a connection ID it can no longer route 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 packet
matches the local address and port of a connection where the host matches the local address and port of a connection where the endpoint
used zero-length connection IDs, QUIC processes the packet as part of used zero-length connection IDs, QUIC processes the packet as part of
that connection. that connection.
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
skipping to change at page 29, line 23 skipping to change at page 30, line 15
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:
skipping to change at page 31, line 22 skipping to change at page 32, line 47
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 33, line 19 skipping to change at page 34, line 47
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 39, line 49 skipping to change at page 41, line 27
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. 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 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 13 skipping to change at page 45, line 13
client addresses. client addresses.
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 48, line 46
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 49, line 52
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 52, line 30
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 56, line 38 skipping to change at page 58, line 45
that it is likely that only applications or application protocols that it is likely that only applications or application protocols
will know what information can be retried. 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 64, line 24 skipping to change at page 66, 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 80, line 19 skipping to change at page 83, line 19
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.
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 83, line 49 skipping to change at page 86, line 46
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 92, line 18 skipping to change at page 95, line 18
message needs to be created, such as the packets sent after receiving message needs to be created, such as the packets sent after receiving
a 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
skipping to change at page 95, line 15 skipping to change at page 98, line 15
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 96, line 52 skipping to change at page 100, line 4
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 contain an Original
Destination Connection ID field that does not match the Destination Destination Connection ID field that does not match the Destination
Connection ID from its Initial packet. This prevents an off-path Connection ID from its Initial packet. This prevents an off-path
attacker from injecting a Retry packet. attacker from injecting a Retry packet. 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 114, line 8 skipping to change at page 117, line 8
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. Endpoints are responsible for discarding duplicate
values, which might be used to link connection attempts; see values, which might be used to link connection attempts; see
Section 8.1.2. 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
skipping to change at page 121, line 25 skipping to change at page 124, line 25
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).
skipping to change at page 122, line 19 skipping to change at page 125, line 22
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sequence Number (i) ... | Sequence Number (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
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
skipping to change at page 124, line 23 skipping to change at page 127, line 27
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].
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. Extension Frames 19.20. 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
skipping to change at page 125, line 47 skipping to change at page 129, line 9
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.
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.3 for details of registering new error codes.
skipping to change at page 127, line 43 skipping to change at page 131, line 8
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 135, line 41 skipping to change at page 138, line 41
| | | 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 | | 0xA | PROTOCOL_VIOLATION | Generic | Section 20 |
| | | protocol | | | | | protocol | |
| | | 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", draft-ietf-tsvwg-datagram-plpmtud-11
(work in progress), June 2019. (work in progress), November 2019.
[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", draft-ietf-quic-recovery-latest
in progress). (work in progress).
[QUIC-TLS] [QUIC-TLS]
Thomson, M., Ed. and S. Turner, Ed., "Using Transport Thomson, M., Ed. and S. Turner, Ed., "Using Transport
Layer Security (TLS) to Secure QUIC", draft-ietf-quic- Layer Security (TLS) to Secure QUIC", draft-ietf-quic-tls-
tls-24 (work in progress). latest (work in progress).
[RFC1191] Mogul, J. and S. Deering, "Path MTU discovery", RFC 1191, [RFC1191] Mogul, J. and S. Deering, "Path MTU discovery", RFC 1191,
DOI 10.17487/RFC1191, November 1990, DOI 10.17487/RFC1191, November 1990,
<https://www.rfc-editor.org/info/rfc1191>. <https://www.rfc-editor.org/info/rfc1191>.
[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>.
skipping to change at page 137, line 50 skipping to change at page 140, line 50
Roskind, J., "QUIC: Multiplexed Transport Over UDP", Roskind, J., "QUIC: Multiplexed Transport Over UDP",
December 2013, <https://goo.gl/dMVtFi>. December 2013, <https://goo.gl/dMVtFi>.
[HTTP2] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext [HTTP2] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext
Transfer Protocol Version 2 (HTTP/2)", RFC 7540, Transfer Protocol Version 2 (HTTP/2)", RFC 7540,
DOI 10.17487/RFC7540, May 2015, DOI 10.17487/RFC7540, May 2015,
<https://www.rfc-editor.org/info/rfc7540>. <https://www.rfc-editor.org/info/rfc7540>.
[QUIC-INVARIANTS] [QUIC-INVARIANTS]
Thomson, M., "Version-Independent Properties of QUIC", Thomson, M., "Version-Independent Properties of QUIC",
draft-ietf-quic-invariants-07 (work in progress). draft-ietf-quic-invariants-latest (work in progress).
[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", draft-ietf-quic-manageability-05
(work in progress), July 2019. (work in progress), July 2019.
[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>.
skipping to change at page 139, line 40 skipping to change at page 142, line 40
// 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 Appendix B. Change Log
*RFC Editor's Note:* Please remove this section prior to *RFC Editor's Note:* Please remove this section prior to
publication of a final version of this document. publication of a final version of this document.
Issue and pull request numbers are listed with a leading octothorp. Issue and pull request numbers are listed with a leading octothorp.
B.1. Since draft-ietf-quic-transport-23 B.1. Since draft-ietf-quic-transport-23
o Allow ClientHello to span multiple packets (#2928, #3045)
o Client Initial size constraints apply to UDP datagram payload o Client Initial size constraints apply to UDP datagram payload
(#3053, #3051) (#3053, #3051)
o Stateless reset changes (#2152, #2993) o 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)
skipping to change at page 140, line 39 skipping to change at page 143, line 41
(#2778, #2969) (#2778, #2969)
o Stronger requirements for connection ID retirement (#3046, #3096) o Stronger requirements for connection ID retirement (#3046, #3096)
o NEW_TOKEN cannot be empty (#2978, #2977) o NEW_TOKEN cannot be empty (#2978, #2977)
o PING can be sent at any encryption level (#3034, #3035) o PING can be sent at any encryption level (#3034, #3035)
o CONNECTION_CLOSE is not ack-eliciting (#3097, #3098) o CONNECTION_CLOSE is not ack-eliciting (#3097, #3098)
o Frame encoding error conditions updated (#3027, #3042)
o Non-ack-eliciting packets cannot be sent in response to non-ack- o Non-ack-eliciting packets cannot be sent in response to non-ack-
eliciting packets (#3100, #3104) eliciting packets (#3100, #3104)
o Servers have to change connection IDs in Retry (#2837, #3147)
B.2. Since draft-ietf-quic-transport-22 B.2. Since draft-ietf-quic-transport-22
o Rules for preventing correlation by connection ID tightened o Rules for preventing correlation by connection ID tightened
(#2084, #2929) (#2084, #2929)
o Clarified use of CONNECTION_CLOSE in Handshake packets (#2151, o Clarified use of CONNECTION_CLOSE in Handshake packets (#2151,
#2541, #2688) #2541, #2688)
o Discourage regressions of largest acknowledged in ACK (#2205, o Discourage regressions of largest acknowledged in ACK (#2205,
#2752) #2752)
 End of changes. 64 change blocks. 
306 lines changed or deleted 398 lines changed or added

This html diff was produced by rfcdiff 1.44jr. The latest version is available from http://tools.ietf.org/tools/rfcdiff/