draft-ietf-quic-tls-13.txt   draft-ietf-quic-tls-latest.txt 
QUIC Working Group M. Thomson, Ed. QUIC Working Group M. Thomson, Ed.
Internet-Draft Mozilla Internet-Draft Mozilla
Intended status: Standards Track S. Turner, Ed. Intended status: Standards Track S. Turner, Ed.
Expires: December 30, 2018 sn3rd Expires: February 11, 2019 sn3rd
June 28, 2018 August 10, 2018
Using Transport Layer Security (TLS) to Secure QUIC Using Transport Layer Security (TLS) to Secure QUIC
draft-ietf-quic-tls-13 draft-ietf-quic-tls-latest
Abstract Abstract
This document describes how Transport Layer Security (TLS) is used to This document describes how Transport Layer Security (TLS) is used to
secure QUIC. secure QUIC.
Note to Readers Note to Readers
Discussion of this draft takes place on the QUIC working group Discussion of this draft takes place on the QUIC working group
mailing list (quic@ietf.org), which is archived at mailing list (quic@ietf.org), which is archived at
skipping to change at page 1, line 42 skipping to change at page 1, line 42
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 December 30, 2018. This Internet-Draft will expire on February 11, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 28 skipping to change at page 2, line 28
2. Notational Conventions . . . . . . . . . . . . . . . . . . . 3 2. Notational Conventions . . . . . . . . . . . . . . . . . . . 3
2.1. TLS Overview . . . . . . . . . . . . . . . . . . . . . . 4 2.1. TLS Overview . . . . . . . . . . . . . . . . . . . . . . 4
3. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 6 3. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 6
4. Carrying TLS Messages . . . . . . . . . . . . . . . . . . . . 7 4. Carrying TLS Messages . . . . . . . . . . . . . . . . . . . . 7
4.1. Interface to TLS . . . . . . . . . . . . . . . . . . . . 8 4.1. Interface to TLS . . . . . . . . . . . . . . . . . . . . 8
4.1.1. Sending and Receiving Handshake Messages . . . . . . 9 4.1.1. Sending and Receiving Handshake Messages . . . . . . 9
4.1.2. Encryption Level Changes . . . . . . . . . . . . . . 10 4.1.2. Encryption Level Changes . . . . . . . . . . . . . . 10
4.1.3. TLS Interface Summary . . . . . . . . . . . . . . . . 11 4.1.3. TLS Interface Summary . . . . . . . . . . . . . . . . 11
4.2. TLS Version . . . . . . . . . . . . . . . . . . . . . . . 12 4.2. TLS Version . . . . . . . . . . . . . . . . . . . . . . . 12
4.3. ClientHello Size . . . . . . . . . . . . . . . . . . . . 12 4.3. ClientHello Size . . . . . . . . . . . . . . . . . . . . 12
4.4. Peer Authentication . . . . . . . . . . . . . . . . . . . 12 4.4. Peer Authentication . . . . . . . . . . . . . . . . . . . 13
4.5. Enabling 0-RTT . . . . . . . . . . . . . . . . . . . . . 13 4.5. Enabling 0-RTT . . . . . . . . . . . . . . . . . . . . . 13
4.6. Rejecting 0-RTT . . . . . . . . . . . . . . . . . . . . . 13 4.6. Rejecting 0-RTT . . . . . . . . . . . . . . . . . . . . . 13
4.7. HelloRetryRequest . . . . . . . . . . . . . . . . . . . . 13 4.7. HelloRetryRequest . . . . . . . . . . . . . . . . . . . . 14
4.8. TLS Errors . . . . . . . . . . . . . . . . . . . . . . . 14 4.8. TLS Errors . . . . . . . . . . . . . . . . . . . . . . . 14
5. QUIC Packet Protection . . . . . . . . . . . . . . . . . . . 14 5. QUIC Packet Protection . . . . . . . . . . . . . . . . . . . 14
5.1. QUIC Packet Encryption Keys . . . . . . . . . . . . . . . 14 5.1. QUIC Packet Encryption Keys . . . . . . . . . . . . . . . 14
5.1.1. Initial Secrets . . . . . . . . . . . . . . . . . . . 14 5.1.1. Initial Secrets . . . . . . . . . . . . . . . . . . . 15
5.2. QUIC AEAD Usage . . . . . . . . . . . . . . . . . . . . . 15 5.2. QUIC AEAD Usage . . . . . . . . . . . . . . . . . . . . . 15
5.3. Packet Number Protection . . . . . . . . . . . . . . . . 16 5.3. Packet Number Protection . . . . . . . . . . . . . . . . 16
5.3.1. AES-Based Packet Number Protection . . . . . . . . . 17 5.3.1. AES-Based Packet Number Protection . . . . . . . . . 18
5.3.2. ChaCha20-Based Packet Number Protection . . . . . . . 18 5.3.2. ChaCha20-Based Packet Number Protection . . . . . . . 18
5.4. Receiving Protected Packets . . . . . . . . . . . . . . . 18 5.4. Receiving Protected Packets . . . . . . . . . . . . . . . 18
5.5. Use of 0-RTT Keys . . . . . . . . . . . . . . . . . . . . 18 5.5. Use of 0-RTT Keys . . . . . . . . . . . . . . . . . . . . 19
5.6. Receiving Out-of-Order Protected Frames . . . . . . . . . 19 5.6. Receiving Out-of-Order Protected Frames . . . . . . . . . 19
6. Key Update . . . . . . . . . . . . . . . . . . . . . . . . . 19 6. Key Update . . . . . . . . . . . . . . . . . . . . . . . . . 20
7. Security of Initial Messages . . . . . . . . . . . . . . . . 21 7. Security of Initial Messages . . . . . . . . . . . . . . . . 21
8. QUIC-Specific Additions to the TLS Handshake . . . . . . . . 21 8. QUIC-Specific Additions to the TLS Handshake . . . . . . . . 22
8.1. Protocol and Version Negotiation . . . . . . . . . . . . 22 8.1. Protocol and Version Negotiation . . . . . . . . . . . . 22
8.2. QUIC Transport Parameters Extension . . . . . . . . . . . 22 8.2. QUIC Transport Parameters Extension . . . . . . . . . . . 22
9. Security Considerations . . . . . . . . . . . . . . . . . . . 23 9. Security Considerations . . . . . . . . . . . . . . . . . . . 23
9.1. Packet Reflection Attack Mitigation . . . . . . . . . . . 23 9.1. Packet Reflection Attack Mitigation . . . . . . . . . . . 23
9.2. Peer Denial of Service . . . . . . . . . . . . . . . . . 23 9.2. Peer Denial of Service . . . . . . . . . . . . . . . . . 23
9.3. Packet Number Protection Analysis . . . . . . . . . . . . 24 9.3. Packet Number Protection Analysis . . . . . . . . . . . . 24
10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 25 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 25
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 25 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 25
11.1. Normative References . . . . . . . . . . . . . . . . . . 25 11.1. Normative References . . . . . . . . . . . . . . . . . . 25
11.2. Informative References . . . . . . . . . . . . . . . . . 26 11.2. Informative References . . . . . . . . . . . . . . . . . 26
11.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 26 11.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 27 Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 27
A.1. Since draft-ietf-quic-tls-12 . . . . . . . . . . . . . . 27 A.1. Since draft-ietf-quic-tls-12 . . . . . . . . . . . . . . 27
A.2. Since draft-ietf-quic-tls-11 . . . . . . . . . . . . . . 27 A.2. Since draft-ietf-quic-tls-11 . . . . . . . . . . . . . . 27
A.3. Since draft-ietf-quic-tls-10 . . . . . . . . . . . . . . 27 A.3. Since draft-ietf-quic-tls-10 . . . . . . . . . . . . . . 28
A.4. Since draft-ietf-quic-tls-09 . . . . . . . . . . . . . . 27 A.4. Since draft-ietf-quic-tls-09 . . . . . . . . . . . . . . 28
A.5. Since draft-ietf-quic-tls-08 . . . . . . . . . . . . . . 27 A.5. Since draft-ietf-quic-tls-08 . . . . . . . . . . . . . . 28
A.6. Since draft-ietf-quic-tls-07 . . . . . . . . . . . . . . 28 A.6. Since draft-ietf-quic-tls-07 . . . . . . . . . . . . . . 28
A.7. Since draft-ietf-quic-tls-05 . . . . . . . . . . . . . . 28 A.7. Since draft-ietf-quic-tls-05 . . . . . . . . . . . . . . 28
A.8. Since draft-ietf-quic-tls-04 . . . . . . . . . . . . . . 28 A.8. Since draft-ietf-quic-tls-04 . . . . . . . . . . . . . . 28
A.9. Since draft-ietf-quic-tls-03 . . . . . . . . . . . . . . 28 A.9. Since draft-ietf-quic-tls-03 . . . . . . . . . . . . . . 28
A.10. Since draft-ietf-quic-tls-02 . . . . . . . . . . . . . . 28 A.10. Since draft-ietf-quic-tls-02 . . . . . . . . . . . . . . 28
A.11. Since draft-ietf-quic-tls-01 . . . . . . . . . . . . . . 28 A.11. Since draft-ietf-quic-tls-01 . . . . . . . . . . . . . . 28
A.12. Since draft-ietf-quic-tls-00 . . . . . . . . . . . . . . 29 A.12. Since draft-ietf-quic-tls-00 . . . . . . . . . . . . . . 29
A.13. Since draft-thomson-quic-tls-01 . . . . . . . . . . . . . 29 A.13. Since draft-thomson-quic-tls-01 . . . . . . . . . . . . . 29
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 29 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 29
Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . 29
skipping to change at page 8, line 41 skipping to change at page 8, line 41
| | | | | | | |
| Handshake | Handshake | Handshake | | Handshake | Handshake | Handshake |
| | | | | | | |
| Retry | N/A | N/A | | Retry | N/A | N/A |
| | | | | | | |
| Short Header | 1-RTT | 0/1-RTT | | Short Header | 1-RTT | 0/1-RTT |
+-----------------+------------------+-----------+ +-----------------+------------------+-----------+
Table 1: Encryption Levels by Packet Type Table 1: Encryption Levels by Packet Type
Section 6.3 of [QUIC-TRANSPORT] shows how packets at the various Section 6.5 of [QUIC-TRANSPORT] shows how packets at the various
encryption levels fit into the handshake process. encryption levels fit into the handshake process.
4.1. Interface to TLS 4.1. Interface to TLS
As shown in Figure 2, the interface from QUIC to TLS consists of As shown in Figure 2, the interface from QUIC to TLS consists of
three primary functions: three primary functions:
o Sending and receiving handshake messages o Sending and receiving handshake messages
o Rekeying (both transmit and receive) o Rekeying (both transmit and receive)
skipping to change at page 10, line 37 skipping to change at page 10, line 37
Important: Until the handshake is reported as complete, the Important: Until the handshake is reported as complete, the
connection and key exchange are not properly authenticated at the connection and key exchange are not properly authenticated at the
server. Even though 1-RTT keys are available to a server after server. Even though 1-RTT keys are available to a server after
receiving the first handshake messages from a client, the server receiving the first handshake messages from a client, the server
cannot consider the client to be authenticated until it receives cannot consider the client to be authenticated until it receives
and validates the client's Finished message. and validates the client's Finished message.
The requirement for the server to wait for the client Finished The requirement for the server to wait for the client Finished
message creates a dependency on that message being delivered. A message creates a dependency on that message being delivered. A
client can avoid the potential for head-of-line blocking that this client can avoid the potential for head-of-line blocking that this
implies by sending a copy of the STREAM frame that carries the implies by sending a copy of the CRYPTO frame that carries the
Finished message in multiple packets. This enables immediate Finished message in multiple packets. This enables immediate
server processing for those packets. server processing for those packets.
4.1.2. Encryption Level Changes 4.1.2. Encryption Level Changes
At each change of encryption level in either direction, TLS signals At each change of encryption level in either direction, TLS provides
QUIC, providing the new level and the encryption keys. These events QUIC with the new level and the encryption keys. These events are
are not asynchronous, they always occur immediately after TLS is not asynchronous; they always occur immediately after TLS is provided
provided with new handshake octets, or after TLS produces handshake with new handshake octets, or after TLS produces handshake octets.
octets.
If 0-RTT is possible, it is ready after the client sends a TLS If 0-RTT is possible, it is ready after the client sends a TLS
ClientHello message or the server receives that message. After ClientHello message or the server receives that message. After
providing a QUIC client with the first handshake octets, the TLS providing a QUIC client with the first handshake octets, the TLS
stack might signal the change to 0-RTT keys. On the server, after stack might signal the change to 0-RTT keys. On the server, after
receiving handshake octets that contain a ClientHello message, a TLS receiving handshake octets that contain a ClientHello message, a TLS
server might signal that 0-RTT keys are available. server might signal that 0-RTT keys are available.
Note that although TLS only uses one encryption level at a time, QUIC Note that although TLS only uses one encryption level at a time, QUIC
may use more than one level. For instance, after sending its may use more than one level. For instance, after sending its
skipping to change at page 11, line 23 skipping to change at page 11, line 23
4.1.3. TLS Interface Summary 4.1.3. TLS Interface Summary
Figure 3 summarizes the exchange between QUIC and TLS for both client Figure 3 summarizes the exchange between QUIC and TLS for both client
and server. Each arrow is tagged with the encryption level used for and server. Each arrow is tagged with the encryption level used for
that transmission. that transmission.
Client Server Client Server
Get Handshake Get Handshake
Initial ------------> Initial ------------->
Rekey tx to 0-RTT Keys Rekey tx to 0-RTT Keys
0-RTT --------------> 0-RTT --------------->
Handshake Received Handshake Received
Get Handshake Get Handshake
<------------ Initial <------------- Initial
Rekey rx to 0-RTT keys Rekey rx to 0-RTT keys
Handshake Received Handshake Received
Rekey rx to Handshake keys Rekey rx to Handshake keys
Get Handshake Get Handshake
<----------- Handshake <----------- Handshake
Rekey tx to 1-RTT keys Rekey tx to 1-RTT keys
<--------------- 1-RTT
Handshake Received Handshake Received
Rekey rx to Handshake keys Rekey rx to Handshake keys
Handshake Received Handshake Received
Get Handshake Get Handshake
Handshake Complete Handshake Complete
Handshake ----------->
Rekey tx to 1-RTT keys Rekey tx to 1-RTT keys
Handshake ----------> 1-RTT --------------->
Handshake Received Handshake Received
Rekey rx to 1-RTT keys Rekey rx to 1-RTT keys
Get Handshake Get Handshake
Handshake Complete Handshake Complete
<--------------- 1-RTT <--------------- 1-RTT
Handshake Received Handshake Received
Figure 3: Interaction Summary between QUIC and TLS Figure 3: Interaction Summary between QUIC and TLS
4.2. TLS Version 4.2. TLS Version
skipping to change at page 12, line 21 skipping to change at page 12, line 21
negotiated if both endpoints support that version. This is negotiated if both endpoints support that version. This is
acceptable provided that the features of TLS 1.3 that are used by acceptable provided that the features of TLS 1.3 that are used by
QUIC are supported by the newer version. QUIC are supported by the newer version.
A badly configured TLS implementation could negotiate TLS 1.2 or A badly configured TLS implementation could negotiate TLS 1.2 or
another older version of TLS. An endpoint MUST terminate the another older version of TLS. An endpoint MUST terminate the
connection if a version of TLS older than 1.3 is negotiated. connection if a version of TLS older than 1.3 is negotiated.
4.3. ClientHello Size 4.3. ClientHello Size
QUIC requires that the initial handshake packet from a client fit QUIC requires that the first Initial packet from a client contain an
within the payload of a single packet. The size limits on QUIC entire crytographic handshake message, which for TLS is the
packets mean that a record containing a ClientHello needs to fit ClientHello. Though a packet larger than 1200 octets might be
within 1129 octets, though endpoints can reduce the size of their supported by the path, a client improves the likelihood that a packet
connection ID to increase by up to 22 octets. is accepted if it ensures that the first ClientHello message is small
enough to stay within this limit.
A TLS ClientHello can fit within this limit with ample space QUIC packet and framing add at least 36 octets of overhead to the
remaining. However, there are several variables that could cause ClientHello message. That overhead increases if the client chooses a
this limit to be exceeded. Implementations are reminded that large connection ID without zero length. Overheads also do not include the
session tickets or HelloRetryRequest cookies, multiple or large key token or a connection ID longer than 8 octets, both of which might be
shares, and long lists of supported ciphers, signature algorithms, required if a server sends a Retry packet.
versions, QUIC transport parameters, and other negotiable parameters
and extensions could cause this message to grow.
For servers, the size of the session tickets and HelloRetryRequest A typical TLS ClientHello can easily fit into a 1200 octet packet.
cookie extension can have an effect on a client's ability to connect. However, in addition to the overheads added by QUIC, there are
Choosing a small value increases the probability that these values several variables that could cause this limit to be exceeded. Large
can be successfully used by a client. session tickets, multiple or large key shares, and long lists of
supported ciphers, signature algorithms, versions, QUIC transport
parameters, and other negotiable parameters and extensions could
cause this message to grow.
For servers, in addition to connection ID and tokens, the size of TLS
session tickets can have an effect on a client's ability to connect.
Minimizing the size of these values increases the probability that
they can be successfully used by a client.
A client is not required to fit the ClientHello that it sends in
response to a HelloRetryRequest message into a single UDP datagram.
The TLS implementation does not need to ensure that the ClientHello The TLS implementation does not need to ensure that the ClientHello
is sufficiently large. QUIC PADDING frames are added to increase the is sufficiently large. QUIC PADDING frames are added to increase the
size of the packet as necessary. size of the packet as necessary.
4.4. Peer Authentication 4.4. Peer Authentication
The requirements for authentication depend on the application The requirements for authentication depend on the application
protocol that is in use. TLS provides server authentication and protocol that is in use. TLS provides server authentication and
permits the server to request client authentication. permits the server to request client authentication.
skipping to change at page 13, line 33 skipping to change at page 13, line 42
connection error of type PROTOCOL_VIOLATION. connection error of type PROTOCOL_VIOLATION.
Early data within the TLS connection MUST NOT be used. As it is for Early data within the TLS connection MUST NOT be used. As it is for
other TLS application data, a server MUST treat receiving early data other TLS application data, a server MUST treat receiving early data
on the TLS connection as a connection error of type on the TLS connection as a connection error of type
PROTOCOL_VIOLATION. PROTOCOL_VIOLATION.
4.6. Rejecting 0-RTT 4.6. Rejecting 0-RTT
A server rejects 0-RTT by rejecting 0-RTT at the TLS layer. This A server rejects 0-RTT by rejecting 0-RTT at the TLS layer. This
also prevents QUIC from sending 0-RTT data. A client that attempts also prevents QUIC from sending 0-RTT data. A server will always
0-RTT MUST also consider 0-RTT to be rejected if it receives a reject 0-RTT if it sends a TLS HelloRetryRequest.
Version Negotiation packet.
When 0-RTT is rejected, all connection characteristics that the When 0-RTT is rejected, all connection characteristics that the
client assumed might be incorrect. This includes the choice of client assumed might be incorrect. This includes the choice of
application protocol, transport parameters, and any application application protocol, transport parameters, and any application
configuration. The client therefore MUST reset the state of all configuration. The client therefore MUST reset the state of all
streams, including application state bound to those streams. streams, including application state bound to those streams.
A client MAY attempt to send 0-RTT again if it receives a Retry or
Version Negotiation packet. These packets do not signify rejection
of 0-RTT.
4.7. HelloRetryRequest 4.7. HelloRetryRequest
In TLS over TCP, the HelloRetryRequest feature (see Section 4.1.4 of In TLS over TCP, the HelloRetryRequest feature (see Section 4.1.4 of
[TLS13]) can be used to correct a client's incorrect KeyShare [TLS13]) can be used to correct a client's incorrect KeyShare
extension as well as for a stateless round-trip check. From the extension as well as for a stateless round-trip check. From the
perspective of QUIC, this just looks like additional messages carried perspective of QUIC, this just looks like additional messages carried
in the Initial encryption level. Although it is in principle in the Initial encryption level. Although it is in principle
possible to use this feature for address verification in QUIC, QUIC possible to use this feature for address verification in QUIC, QUIC
implementations SHOULD instead use the Retry feature (see implementations SHOULD instead use the Retry feature (see Section 4.4
Section 4.4.2 of [QUIC-TRANSPORT]). HelloRetryRequest is still used of [QUIC-TRANSPORT]). HelloRetryRequest is still used to request key
to request key shares. shares.
4.8. TLS Errors 4.8. TLS Errors
If TLS experiences an error, it generates an appropriate alert as If TLS experiences an error, it generates an appropriate alert as
defined in Section 6 of [TLS13]. defined in Section 6 of [TLS13].
A TLS alert is turned into a QUIC connection error by converting the A TLS alert is turned into a QUIC connection error by converting the
one-octet alert description into a QUIC error code. The alert one-octet alert description into a QUIC error code. The alert
description is added to 0x100 to produce a QUIC error code from the description is added to 0x100 to produce a QUIC error code from the
range reserved for CRYPTO_ERROR. The resulting value is sent in a range reserved for CRYPTO_ERROR. The resulting value is sent in a
skipping to change at page 14, line 37 skipping to change at page 14, line 51
QUIC derives packet encryption keys in the same way as TLS 1.3: Each QUIC derives packet encryption keys in the same way as TLS 1.3: Each
encryption level/direction pair has a secret value, which is then encryption level/direction pair has a secret value, which is then
used to derive the traffic keys using as described in Section 7.3 of used to derive the traffic keys using as described in Section 7.3 of
[TLS13] [TLS13]
The keys for the Initial encryption level are computed based on the The keys for the Initial encryption level are computed based on the
client's initial Destination Connection ID, as described in client's initial Destination Connection ID, as described in
Section 5.1.1. Section 5.1.1.
The keys for the remaining encryption level are computed in the same The keys for other encryption levels are computed in the same fashion
fashion as the corresponding TLS keys (see Section 7 of [TLS13]), as the corresponding TLS keys (see Section 7 of [TLS13]), except that
except that the label for HKDF-Expand-Label uses the prefix "quic " the label for HKDF-Expand-Label uses the prefix "quic " rather than
rather than "tls13 ". A different label provides key separation "tls13 ". A different label provides key separation between TLS and
between TLS and QUIC. QUIC.
5.1.1. Initial Secrets 5.1.1. Initial Secrets
Initial packets are protected with a secret derived from the Initial packets are protected with a secret derived from the
Destination Connection ID field from the client's first Initial Destination Connection ID field from the client's first Initial
packet of the connection. Specifically: packet of the connection. Specifically:
initial_salt = 0x9c108f98520a5c5c32968e950e8a2c5fe06d6c38 initial_salt = 0x9c108f98520a5c5c32968e950e8a2c5fe06d6c38
initial_secret = initial_secret = HKDF-Extract(initial_salt,
HKDF-Extract(initial_salt, client_dst_connection_id) client_dst_connection_id)
client_initial_secret = client_initial_secret = HKDF-Expand-Label(initial_secret,
HKDF-Expand-Label(initial_secret, "client in", Hash.length) "client in", "",
server_initial_secret = Hash.length)
HKDF-Expand-Label(initial_secret, "server in", Hash.length) server_initial_secret = HKDF-Expand-Label(initial_secret,
"server in", "",
Hash.length)
Note that if the server sends a Retry, the client's Initial will Note that if the server sends a Retry, the client's Initial will
correspond to a new connection and thus use the server provided correspond to a new connection and thus use the server provided
Destination Connection ID. Destination Connection ID.
The hash function for HKDF when deriving handshake secrets and keys The hash function for HKDF when deriving initial secrets and keys is
is SHA-256 [SHA]. The connection ID used with HKDF-Expand-Label is SHA-256 [SHA]. The connection ID used with HKDF-Expand-Label is the
the initial Destination Connection ID. initial Destination Connection ID.
The value of initial_salt is a 20 octet sequence shown in the figure The value of initial_salt is a 20 octet sequence shown in the figure
in hexadecimal notation. Future versions of QUIC SHOULD generate a in hexadecimal notation. Future versions of QUIC SHOULD generate a
new salt value, thus ensuring that the keys are different for each new salt value, thus ensuring that the keys are different for each
version of QUIC. This prevents a middlebox that only recognizes one version of QUIC. This prevents a middlebox that only recognizes one
version of QUIC from seeing or modifying the contents of handshake version of QUIC from seeing or modifying the contents of handshake
packets from future versions. packets from future versions.
Note: The Destination Connection ID is of arbitrary length, and it Note: The Destination Connection ID is of arbitrary length, and it
could be zero length if the server sends a Retry packet with a could be zero length if the server sends a Retry packet with a
skipping to change at page 16, line 21 skipping to change at page 16, line 33
The key and IV for the packet are computed as described in The key and IV for the packet are computed as described in
Section 5.1. The nonce, N, is formed by combining the packet Section 5.1. The nonce, N, is formed by combining the packet
protection IV with the packet number. The 64 bits of the protection IV with the packet number. The 64 bits of the
reconstructed QUIC packet number in network byte order are left- reconstructed QUIC packet number in network byte order are left-
padded with zeros to the size of the IV. The exclusive OR of the padded with zeros to the size of the IV. The exclusive OR of the
padded packet number and the IV forms the AEAD nonce. padded packet number and the IV forms the AEAD nonce.
The associated data, A, for the AEAD is the contents of the QUIC The associated data, A, for the AEAD is the contents of the QUIC
header, starting from the flags octet in either the short or long header, starting from the flags octet in either the short or long
header. header, up to and including the unprotected packet number.
The input plaintext, P, for the AEAD is the content of the QUIC frame The input plaintext, P, for the AEAD is the content of the QUIC frame
following the header, as described in [QUIC-TRANSPORT]. following the header, as described in [QUIC-TRANSPORT].
The output ciphertext, C, of the AEAD is transmitted in place of P. The output ciphertext, C, of the AEAD is transmitted in place of P.
Some AEAD functions have limits for how many packets can be encrypted Some AEAD functions have limits for how many packets can be encrypted
under the same key and IV (see for example [AEBounds]). This might under the same key and IV (see for example [AEBounds]). This might
be lower than the packet number limit. An endpoint MUST initiate a be lower than the packet number limit. An endpoint MUST initiate a
key update (Section 6) prior to exceeding any limit set for the AEAD key update (Section 6) prior to exceeding any limit set for the AEAD
skipping to change at page 17, line 21 skipping to change at page 17, line 33
sample_offset = packet_length - sample_length sample_offset = packet_length - sample_length
sample = packet[sample_offset..sample_offset+sample_length] sample = packet[sample_offset..sample_offset+sample_length]
A packet with a long header is sampled in the same way, noting that A packet with a long header is sampled in the same way, noting that
multiple QUIC packets might be included in the same UDP datagram and multiple QUIC packets might be included in the same UDP datagram and
that each one is handled separately. that each one is handled separately.
sample_offset = 6 + len(destination_connection_id) + sample_offset = 6 + len(destination_connection_id) +
len(source_connection_id) + len(source_connection_id) +
len(payload_length) + 4 len(payload_length) + 4
if packet_type == Initial:
sample_offset += len(token_length) +
len(token)
To ensure that this process does not sample the packet number, packet To ensure that this process does not sample the packet number, packet
number protection algorithms MUST NOT sample more ciphertext than the number protection algorithms MUST NOT sample more ciphertext than the
minimum expansion of the corresponding AEAD. minimum expansion of the corresponding AEAD.
Packet number protection is applied to the packet number encoded as Packet number protection is applied to the packet number encoded as
described in Section 4.8 of [QUIC-TRANSPORT]. Since the length of described in Section 4.11 of [QUIC-TRANSPORT]. Since the length of
the packet number is stored in the first octet of the encoded packet the packet number is stored in the first octet of the encoded packet
number, it may be necessary to progressively decrypt the packet number, it may be necessary to progressively decrypt the packet
number. number.
Before a TLS ciphersuite can be used with QUIC, a packet protection Before a TLS ciphersuite can be used with QUIC, a packet protection
algorithm MUST be specifed for the AEAD used with that ciphersuite. algorithm MUST be specifed for the AEAD used with that ciphersuite.
This document defines algorithms for AEAD_AES_128_GCM, This document defines algorithms for AEAD_AES_128_GCM,
AEAD_AES_128_CCM, AEAD_AES_256_GCM, AEAD_AES_256_CCM (all AES AEADs AEAD_AES_128_CCM, AEAD_AES_256_GCM, AEAD_AES_256_CCM (all AES AEADs
are defined in [AEAD]), and AEAD_CHACHA20_POLY1305 ([CHACHA]). are defined in [AEAD]), and AEAD_CHACHA20_POLY1305 ([CHACHA]).
skipping to change at page 23, line 30 skipping to change at page 23, line 39
9.1. Packet Reflection Attack Mitigation 9.1. Packet Reflection Attack Mitigation
A small ClientHello that results in a large block of handshake A small ClientHello that results in a large block of handshake
messages from a server can be used in packet reflection attacks to messages from a server can be used in packet reflection attacks to
amplify the traffic generated by an attacker. amplify the traffic generated by an attacker.
QUIC includes three defenses against this attack. First, the packet QUIC includes three defenses against this attack. First, the packet
containing a ClientHello MUST be padded to a minimum size. Second, containing a ClientHello MUST be padded to a minimum size. Second,
if responding to an unverified source address, the server is if responding to an unverified source address, the server is
forbidden to send more than three UDP datagrams in its first flight forbidden to send more than three UDP datagrams in its first flight
(see Section 4.4.3 of [QUIC-TRANSPORT]). Finally, because (see Section 4.7 of [QUIC-TRANSPORT]). Finally, because
acknowledgements of Handshake packets are authenticated, a blind acknowledgements of Handshake packets are authenticated, a blind
attacker cannot forge them. Put together, these defenses limit the attacker cannot forge them. Put together, these defenses limit the
level of amplification. level of amplification.
9.2. Peer Denial of Service 9.2. Peer Denial of Service
QUIC, TLS and HTTP/2 all contain a messages that have legitimate uses QUIC, TLS and HTTP/2 all contain a messages that have legitimate uses
in some contexts, but that can be abused to cause a peer to expend in some contexts, but that can be abused to cause a peer to expend
processing resources without having any observable impact on the processing resources without having any observable impact on the
state of the connection. If processing is disproportionately large state of the connection. If processing is disproportionately large
skipping to change at page 25, line 28 skipping to change at page 25, line 36
[AEAD] McGrew, D., "An Interface and Algorithms for Authenticated [AEAD] McGrew, D., "An Interface and Algorithms for Authenticated
Encryption", RFC 5116, DOI 10.17487/RFC5116, January 2008, Encryption", RFC 5116, DOI 10.17487/RFC5116, January 2008,
<https://www.rfc-editor.org/info/rfc5116>. <https://www.rfc-editor.org/info/rfc5116>.
[AES] "Advanced encryption standard (AES)", National Institute [AES] "Advanced encryption standard (AES)", National Institute
of Standards and Technology report, of Standards and Technology report,
DOI 10.6028/nist.fips.197, November 2001. DOI 10.6028/nist.fips.197, November 2001.
[CHACHA] Nir, Y. and A. Langley, "ChaCha20 and Poly1305 for IETF [CHACHA] Nir, Y. and A. Langley, "ChaCha20 and Poly1305 for IETF
Protocols", RFC 7539, DOI 10.17487/RFC7539, May 2015, Protocols", RFC 8439, DOI 10.17487/RFC8439, June 2018,
<https://www.rfc-editor.org/info/rfc7539>. <https://www.rfc-editor.org/info/rfc8439>.
[QUIC-TRANSPORT] [QUIC-TRANSPORT]
Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based
Multiplexed and Secure Transport", draft-ietf-quic- Multiplexed and Secure Transport", draft-ietf-quic-
transport-13 (work in progress). transport-latest (work in progress).
[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>.
[RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan, [RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan,
"Transport Layer Security (TLS) Application-Layer Protocol "Transport Layer Security (TLS) Application-Layer Protocol
Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301,
July 2014, <https://www.rfc-editor.org/info/rfc7301>. July 2014, <https://www.rfc-editor.org/info/rfc7301>.
skipping to change at page 26, line 28 skipping to change at page 26, line 41
Luykx, A. and K. Paterson, "Limits on Authenticated Luykx, A. and K. Paterson, "Limits on Authenticated
Encryption Use in TLS", March 2016, Encryption Use in TLS", March 2016,
<http://www.isg.rhul.ac.uk/~kp/TLS-AEbounds.pdf>. <http://www.isg.rhul.ac.uk/~kp/TLS-AEbounds.pdf>.
[IMC] Katz, J. and Y. Lindell, "Introduction to Modern [IMC] Katz, J. and Y. Lindell, "Introduction to Modern
Cryptography, Second Edition", ISBN 978-1466570269, Cryptography, Second Edition", ISBN 978-1466570269,
November 2014. November 2014.
[QUIC-HTTP] [QUIC-HTTP]
Bishop, M., Ed., "Hypertext Transfer Protocol (HTTP) over Bishop, M., Ed., "Hypertext Transfer Protocol (HTTP) over
QUIC", draft-ietf-quic-http-13 (work in progress). QUIC", draft-ietf-quic-http-latest (work in progress).
[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-13 (work and Congestion Control", draft-ietf-quic-recovery-latest
in progress). (work in progress).
[RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818,
DOI 10.17487/RFC2818, May 2000, DOI 10.17487/RFC2818, May 2000,
<https://www.rfc-editor.org/info/rfc2818>. <https://www.rfc-editor.org/info/rfc2818>.
[RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S.,
Housley, R., and W. Polk, "Internet X.509 Public Key Housley, R., and W. Polk, "Internet X.509 Public Key
Infrastructure Certificate and Certificate Revocation List Infrastructure Certificate and Certificate Revocation List
(CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008,
<https://www.rfc-editor.org/info/rfc5280>. <https://www.rfc-editor.org/info/rfc5280>.
 End of changes. 39 change blocks. 
71 lines changed or deleted 90 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/