draft-ietf-tls-tls13-12.txt   draft-ietf-tls-tls13-13.txt 
Network Working Group E. Rescorla Network Working Group E. Rescorla
Internet-Draft RTFM, Inc. Internet-Draft RTFM, Inc.
Obsoletes: 5077, 5246, 5746 (if March 21, 2016 Obsoletes: 5077, 5246, 5746 (if May 22, 2016
approved) approved)
Updates: 4492 (if approved) Updates: 4492, 6066, 6961 (if approved)
Intended status: Standards Track Intended status: Standards Track
Expires: September 22, 2016 Expires: November 23, 2016
The Transport Layer Security (TLS) Protocol Version 1.3 The Transport Layer Security (TLS) Protocol Version 1.3
draft-ietf-tls-tls13-12 draft-ietf-tls-tls13-13
Abstract Abstract
This document specifies Version 1.3 of the Transport Layer Security This document specifies Version 1.3 of the Transport Layer Security
(TLS) protocol. The TLS protocol allows client/server applications (TLS) protocol. The TLS protocol allows client/server applications
to communicate over the Internet in a way that is designed to prevent to communicate over the Internet in a way that is designed to prevent
eavesdropping, tampering, and message forgery. eavesdropping, tampering, and message forgery.
Status of This Memo Status of This Memo
skipping to change at page 1, line 36 skipping to change at page 1, line 36
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 http://datatracker.ietf.org/drafts/current/. Drafts is at http://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 September 22, 2016. This Internet-Draft will expire on November 23, 2016.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2016 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
(http://trustee.ietf.org/license-info) in effect on the date of (http://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 24 skipping to change at page 2, line 24
outside the IETF Standards Process, and derivative works of it may outside the IETF Standards Process, and derivative works of it may
not be created outside the IETF Standards Process, except to format not be created outside the IETF Standards Process, except to format
it for publication as an RFC or to translate it into languages other it for publication as an RFC or to translate it into languages other
than English. than English.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1. Conventions and Terminology . . . . . . . . . . . . . . . 5 1.1. Conventions and Terminology . . . . . . . . . . . . . . . 5
1.2. Major Differences from TLS 1.2 . . . . . . . . . . . . . 6 1.2. Major Differences from TLS 1.2 . . . . . . . . . . . . . 6
2. Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2. Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3. Goals of This Document . . . . . . . . . . . . . . . . . . . 10 3. Goals of This Document . . . . . . . . . . . . . . . . . . . 10
4. Presentation Language . . . . . . . . . . . . . . . . . . . . 10 4. Presentation Language . . . . . . . . . . . . . . . . . . . . 11
4.1. Basic Block Size . . . . . . . . . . . . . . . . . . . . 10 4.1. Basic Block Size . . . . . . . . . . . . . . . . . . . . 11
4.2. Miscellaneous . . . . . . . . . . . . . . . . . . . . . . 11 4.2. Miscellaneous . . . . . . . . . . . . . . . . . . . . . . 11
4.3. Vectors . . . . . . . . . . . . . . . . . . . . . . . . . 11 4.3. Vectors . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.4. Numbers . . . . . . . . . . . . . . . . . . . . . . . . . 12 4.4. Numbers . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.5. Enumerateds . . . . . . . . . . . . . . . . . . . . . . . 12 4.5. Enumerateds . . . . . . . . . . . . . . . . . . . . . . . 13
4.6. Constructed Types . . . . . . . . . . . . . . . . . . . . 13 4.6. Constructed Types . . . . . . . . . . . . . . . . . . . . 14
4.6.1. Variants . . . . . . . . . . . . . . . . . . . . . . 14 4.6.1. Variants . . . . . . . . . . . . . . . . . . . . . . 14
4.7. Constants . . . . . . . . . . . . . . . . . . . . . . . . 15 4.7. Constants . . . . . . . . . . . . . . . . . . . . . . . . 15
4.8. Cryptographic Attributes . . . . . . . . . . . . . . . . 15 4.8. Cryptographic Attributes . . . . . . . . . . . . . . . . 15
4.8.1. Digital Signing . . . . . . . . . . . . . . . . . . . 16 4.8.1. Digital Signing . . . . . . . . . . . . . . . . . . . 16
4.8.2. Authenticated Encryption with Additional Data (AEAD) 17 4.8.2. Authenticated Encryption with Additional Data (AEAD) 17
5. The TLS Record Protocol . . . . . . . . . . . . . . . . . . . 17 5. The TLS Record Protocol . . . . . . . . . . . . . . . . . . . 17
5.1. Connection States . . . . . . . . . . . . . . . . . . . . 18 5.1. Connection States . . . . . . . . . . . . . . . . . . . . 18
5.2. Record Layer . . . . . . . . . . . . . . . . . . . . . . 20 5.2. Record Layer . . . . . . . . . . . . . . . . . . . . . . 20
5.2.1. Fragmentation . . . . . . . . . . . . . . . . . . . . 20 5.2.1. Fragmentation . . . . . . . . . . . . . . . . . . . . 20
5.2.2. Record Payload Protection . . . . . . . . . . . . . . 21 5.2.2. Record Payload Protection . . . . . . . . . . . . . . 22
5.2.3. Record Padding . . . . . . . . . . . . . . . . . . . 24 5.2.3. Record Padding . . . . . . . . . . . . . . . . . . . 24
6. The TLS Handshaking Protocols . . . . . . . . . . . . . . . . 25 6. The TLS Handshaking Protocols . . . . . . . . . . . . . . . . 25
6.1. Alert Protocol . . . . . . . . . . . . . . . . . . . . . 25 6.1. Alert Protocol . . . . . . . . . . . . . . . . . . . . . 26
6.1.1. Closure Alerts . . . . . . . . . . . . . . . . . . . 26 6.1.1. Closure Alerts . . . . . . . . . . . . . . . . . . . 27
6.1.2. Error Alerts . . . . . . . . . . . . . . . . . . . . 28 6.1.2. Error Alerts . . . . . . . . . . . . . . . . . . . . 29
6.2. Handshake Protocol Overview . . . . . . . . . . . . . . . 31 6.2. Handshake Protocol Overview . . . . . . . . . . . . . . . 32
6.2.1. Incorrect DHE Share . . . . . . . . . . . . . . . . . 35 6.2.1. Incorrect DHE Share . . . . . . . . . . . . . . . . . 35
6.2.2. Zero-RTT Exchange . . . . . . . . . . . . . . . . . . 36 6.2.2. Resumption and Pre-Shared Key (PSK) . . . . . . . . . 36
6.2.3. Resumption and Pre-Shared Key (PSK) . . . . . . . . . 37 6.2.3. Zero-RTT Data . . . . . . . . . . . . . . . . . . . . 38
6.3. Handshake Protocol . . . . . . . . . . . . . . . . . . . 39 6.3. Handshake Protocol . . . . . . . . . . . . . . . . . . . 39
6.3.1. Key Exchange Messages . . . . . . . . . . . . . . . . 40 6.3.1. Key Exchange Messages . . . . . . . . . . . . . . . . 40
6.3.2. Hello Extensions . . . . . . . . . . . . . . . . . . 46 6.3.2. Hello Extensions . . . . . . . . . . . . . . . . . . 46
6.3.3. Server Parameters . . . . . . . . . . . . . . . . . . 59 6.3.3. Server Parameters . . . . . . . . . . . . . . . . . . 60
6.3.4. Authentication Messages . . . . . . . . . . . . . . . 63 6.3.4. Authentication Messages . . . . . . . . . . . . . . . 63
6.3.5. Post-Handshake Messages . . . . . . . . . . . . . . . 71 6.3.5. Post-Handshake Messages . . . . . . . . . . . . . . . 71
7. Cryptographic Computations . . . . . . . . . . . . . . . . . 73 7. Cryptographic Computations . . . . . . . . . . . . . . . . . 74
7.1. Key Schedule . . . . . . . . . . . . . . . . . . . . . . 73 7.1. Key Schedule . . . . . . . . . . . . . . . . . . . . . . 74
7.2. Updating Traffic Keys and IVs . . . . . . . . . . . . . . 76 7.2. Updating Traffic Keys and IVs . . . . . . . . . . . . . . 76
7.3. Traffic Key Calculation . . . . . . . . . . . . . . . . . 76 7.3. Traffic Key Calculation . . . . . . . . . . . . . . . . . 76
7.3.1. The Handshake Hash . . . . . . . . . . . . . . . . . 77 7.3.1. Diffie-Hellman . . . . . . . . . . . . . . . . . . . 77
7.3.2. Diffie-Hellman . . . . . . . . . . . . . . . . . . . 78 7.3.2. Elliptic Curve Diffie-Hellman . . . . . . . . . . . . 78
7.3.3. Elliptic Curve Diffie-Hellman . . . . . . . . . . . . 78 7.3.3. Exporters . . . . . . . . . . . . . . . . . . . . . . 78
7.3.4. Exporters . . . . . . . . . . . . . . . . . . . . . . 78
8. Mandatory Algorithms . . . . . . . . . . . . . . . . . . . . 79 8. Mandatory Algorithms . . . . . . . . . . . . . . . . . . . . 79
8.1. MTI Cipher Suites . . . . . . . . . . . . . . . . . . . . 79 8.1. MTI Cipher Suites . . . . . . . . . . . . . . . . . . . . 79
8.2. MTI Extensions . . . . . . . . . . . . . . . . . . . . . 79 8.2. MTI Extensions . . . . . . . . . . . . . . . . . . . . . 79
9. Application Data Protocol . . . . . . . . . . . . . . . . . . 80 9. Application Data Protocol . . . . . . . . . . . . . . . . . . 80
10. Security Considerations . . . . . . . . . . . . . . . . . . . 80 10. Security Considerations . . . . . . . . . . . . . . . . . . . 80
11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 81 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 80
12. References . . . . . . . . . . . . . . . . . . . . . . . . . 83 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 83
12.1. Normative References . . . . . . . . . . . . . . . . . . 84 12.1. Normative References . . . . . . . . . . . . . . . . . . 83
12.2. Informative References . . . . . . . . . . . . . . . . . 86 12.2. Informative References . . . . . . . . . . . . . . . . . 86
Appendix A. Protocol Data Structures and Constant Values . . . . 92 Appendix A. Protocol Data Structures and Constant Values . . . . 92
A.1. Record Layer . . . . . . . . . . . . . . . . . . . . . . 92 A.1. Record Layer . . . . . . . . . . . . . . . . . . . . . . 92
A.2. Alert Messages . . . . . . . . . . . . . . . . . . . . . 92 A.2. Alert Messages . . . . . . . . . . . . . . . . . . . . . 92
A.3. Handshake Protocol . . . . . . . . . . . . . . . . . . . 94 A.3. Handshake Protocol . . . . . . . . . . . . . . . . . . . 94
A.3.1. Key Exchange Messages . . . . . . . . . . . . . . . . 94 A.3.1. Key Exchange Messages . . . . . . . . . . . . . . . . 94
A.3.2. Server Parameters Messages . . . . . . . . . . . . . 98 A.3.2. Server Parameters Messages . . . . . . . . . . . . . 98
A.3.3. Authentication Messages . . . . . . . . . . . . . . . 99 A.3.3. Authentication Messages . . . . . . . . . . . . . . . 99
A.3.4. Ticket Establishment . . . . . . . . . . . . . . . . 100 A.3.4. Ticket Establishment . . . . . . . . . . . . . . . . 99
A.4. Cipher Suites . . . . . . . . . . . . . . . . . . . . . . 100 A.4. Cipher Suites . . . . . . . . . . . . . . . . . . . . . . 100
A.4.1. Unauthenticated Operation . . . . . . . . . . . . . . 105 A.4.1. Unauthenticated Operation . . . . . . . . . . . . . . 105
A.5. The Security Parameters . . . . . . . . . . . . . . . . . 105 A.5. The Security Parameters . . . . . . . . . . . . . . . . . 105
A.6. Changes to RFC 4492 . . . . . . . . . . . . . . . . . . . 106 A.6. Changes to RFC 4492 . . . . . . . . . . . . . . . . . . . 106
Appendix B. Implementation Notes . . . . . . . . . . . . . . . . 107 Appendix B. Implementation Notes . . . . . . . . . . . . . . . . 107
B.1. Random Number Generation and Seeding . . . . . . . . . . 107 B.1. Random Number Generation and Seeding . . . . . . . . . . 107
B.2. Certificates and Authentication . . . . . . . . . . . . . 107 B.2. Certificates and Authentication . . . . . . . . . . . . . 107
B.3. Cipher Suite Support . . . . . . . . . . . . . . . . . . 107 B.3. Cipher Suite Support . . . . . . . . . . . . . . . . . . 107
B.4. Implementation Pitfalls . . . . . . . . . . . . . . . . . 107 B.4. Implementation Pitfalls . . . . . . . . . . . . . . . . . 107
B.5. Client Tracking Prevention . . . . . . . . . . . . . . . 109
Appendix C. Backward Compatibility . . . . . . . . . . . . . . . 109 Appendix C. Backward Compatibility . . . . . . . . . . . . . . . 109
C.1. Negotiating with an older server . . . . . . . . . . . . 109 C.1. Negotiating with an older server . . . . . . . . . . . . 110
C.2. Negotiating with an older client . . . . . . . . . . . . 110 C.2. Negotiating with an older client . . . . . . . . . . . . 111
C.3. Backwards Compatibility Security Restrictions . . . . . . 110 C.3. Zero-RTT backwards compatibility . . . . . . . . . . . . 111
Appendix D. Security Analysis . . . . . . . . . . . . . . . . . 111 C.4. Backwards Compatibility Security Restrictions . . . . . . 111
D.1. Handshake Protocol . . . . . . . . . . . . . . . . . . . 112 Appendix D. Security Analysis . . . . . . . . . . . . . . . . . 112
D.1.1. Authentication and Key Exchange . . . . . . . . . . . 112 D.1. Handshake Protocol . . . . . . . . . . . . . . . . . . . 113
D.1.2. Version Rollback Attacks . . . . . . . . . . . . . . 113 D.1.1. Authentication and Key Exchange . . . . . . . . . . . 113
D.1.3. Detecting Attacks Against the Handshake Protocol . . 113 D.1.2. Version Rollback Attacks . . . . . . . . . . . . . . 114
D.2. Protecting Application Data . . . . . . . . . . . . . . . 113 D.1.3. Detecting Attacks Against the Handshake Protocol . . 114
D.3. Denial of Service . . . . . . . . . . . . . . . . . . . . 114 D.2. Protecting Application Data . . . . . . . . . . . . . . . 114
D.4. Final Notes . . . . . . . . . . . . . . . . . . . . . . . 114 D.3. Denial of Service . . . . . . . . . . . . . . . . . . . . 115
Appendix E. Working Group Information . . . . . . . . . . . . . 114 D.4. Final Notes . . . . . . . . . . . . . . . . . . . . . . . 115
Appendix F. Contributors . . . . . . . . . . . . . . . . . . . . 114 Appendix E. Working Group Information . . . . . . . . . . . . . 115
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 118 Appendix F. Contributors . . . . . . . . . . . . . . . . . . . . 115
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 119
1. Introduction 1. Introduction
DISCLAIMER: This is a WIP draft of TLS 1.3 and has not yet seen DISCLAIMER: This is a WIP draft of TLS 1.3 and has not yet seen
significant security analysis. significant security analysis.
RFC EDITOR: PLEASE REMOVE THE FOLLOWING PARAGRAPH The source for this RFC EDITOR: PLEASE REMOVE THE FOLLOWING PARAGRAPH The source for this
draft is maintained in GitHub. Suggested changes should be submitted draft is maintained in GitHub. Suggested changes should be submitted
as pull requests at https://github.com/tlswg/tls13-spec. as pull requests at https://github.com/tlswg/tls13-spec.
Instructions are on that page as well. Editorial changes can be Instructions are on that page as well. Editorial changes can be
skipping to change at page 4, line 35 skipping to change at page 4, line 36
integrity between two communicating peers. The TLS protocol is integrity between two communicating peers. The TLS protocol is
composed of two layers: the TLS Record Protocol and the TLS Handshake composed of two layers: the TLS Record Protocol and the TLS Handshake
Protocol. At the lowest level, layered on top of some reliable Protocol. At the lowest level, layered on top of some reliable
transport protocol (e.g., TCP [RFC0793]), is the TLS Record Protocol. transport protocol (e.g., TCP [RFC0793]), is the TLS Record Protocol.
The TLS Record Protocol provides connection security that has two The TLS Record Protocol provides connection security that has two
basic properties: basic properties:
- The connection is private. Symmetric cryptography is used for - The connection is private. Symmetric cryptography is used for
data encryption (e.g., AES [AES]). The keys for this symmetric data encryption (e.g., AES [AES]). The keys for this symmetric
encryption are generated uniquely for each connection and are encryption are generated uniquely for each connection and are
based on a secret negotiated by another protocol (such as the TLS based on a secret negotiated by another the TLS Handshake
Handshake Protocol). Protocol.
- The connection is reliable. Messages include an authentication - The connection is reliable. Messages include an authentication
tag which protects them against modification. tag which protects them against modification.
Note: The TLS Record Protocol can operate in an insecure mode but is Note: The TLS Record Protocol can operate in an insecure mode but is
generally only used in this mode while another protocol is using the generally only used in this mode while another protocol is using the
TLS Record Protocol as a transport for negotiating security TLS Record Protocol as a transport for negotiating security
parameters. parameters.
The TLS Record Protocol is used for encapsulation of various higher- The TLS Record Protocol is used for encapsulation of various higher-
level protocols. One such encapsulated protocol, the TLS Handshake level protocols. One such encapsulated protocol, the TLS Handshake
Protocol, allows the server and client to authenticate each other and Protocol, allows the server and client to authenticate each other and
to negotiate an encryption algorithm and cryptographic keys before to negotiate an encryption algorithm and cryptographic keys before
the application protocol transmits or receives its first byte of the application protocol transmits or receives its first byte of
data. The TLS Handshake Protocol provides connection security that data. The TLS Handshake Protocol provides connection security that
has three basic properties: has three basic properties:
- The peer's identity can be authenticated using asymmetric, or - The peer's identity can be authenticated using asymmetric (public
public key, cryptography (e.g., RSA [RSA], ECDSA [ECDSA]). This key) cryptography (e.g., RSA [RSA], ECDSA [ECDSA]) or a pre-shared
authentication can be made optional, but is generally required for symmetric key. The TLS server is always authenticated; client
at least one of the peers. authentication is optional.
- The negotiation of a shared secret is secure: the negotiated - The negotiation of a shared secret is secure: the negotiated
secret is unavailable to eavesdroppers, and for any authenticated secret is unavailable to eavesdroppers, and for any authenticated
connection the secret cannot be obtained, even by an attacker who connection the secret cannot be obtained, even by an attacker who
can place himself in the middle of the connection. can place himself in the middle of the connection.
- The negotiation is reliable: no attacker can modify the - The negotiation is reliable: no attacker can modify the
negotiation communication without being detected by the parties to negotiation communication without being detected by the parties to
the communication. the communication.
skipping to change at page 6, line 14 skipping to change at page 6, line 14
sender: An endpoint that is transmitting records. sender: An endpoint that is transmitting records.
session: An association between a client and a server resulting from session: An association between a client and a server resulting from
a handshake. a handshake.
server: The endpoint which did not initiate the TLS connection. server: The endpoint which did not initiate the TLS connection.
1.2. Major Differences from TLS 1.2 1.2. Major Differences from TLS 1.2
draft-13
- Allow server to send SupportedGroups.
- Remove 0-RTT client authentication
- Remove (EC)DHE 0-RTT.
- Flesh out 0-RTT PSK mode and shrink EarlyDataIndiation
- Turn PSK-resumption response into an index to save room
- Move CertificateStatus to an extension
- Extra fields in NewSessionTicket.
- Restructure key schedule and add a resumption_context value.
- Require DH public keys and secrets to be zero-padded to the size
of the group.
- Remove the redundant length fields in KeyShareEntry.
- Define a cookie field for HRR.
draft-12 draft-12
- Provide a list of the PSK cipher sutes. - Provide a list of the PSK cipher suites.
- Remove the ability for the ServerHello to have no extensions (this - Remove the ability for the ServerHello to have no extensions (this
aligns the syntax with the text). aligns the syntax with the text).
- Clarify that the server can send application data after its first - Clarify that the server can send application data after its first
flight (0.5 RTT data) flight (0.5 RTT data)
- Revise signature algorithm negotiation to group hash, signature - Revise signature algorithm negotiation to group hash, signature
algorithm, and curve together. This is backwards compatible. algorithm, and curve together. This is backwards compatible.
skipping to change at page 12, line 38 skipping to change at page 13, line 11
uint8 uint24[3]; uint8 uint24[3];
uint8 uint32[4]; uint8 uint32[4];
uint8 uint64[8]; uint8 uint64[8];
All values, here and elsewhere in the specification, are stored in All values, here and elsewhere in the specification, are stored in
network byte (big-endian) order; the uint32 represented by the hex network byte (big-endian) order; the uint32 represented by the hex
bytes 01 02 03 04 is equivalent to the decimal value 16909060. bytes 01 02 03 04 is equivalent to the decimal value 16909060.
Note that in some cases (e.g., DH parameters) it is necessary to Note that in some cases (e.g., DH parameters) it is necessary to
represent integers as opaque vectors. In such cases, they are represent integers as opaque vectors. In such cases, they are
represented as unsigned integers (i.e., leading zero octets are not represented as unsigned integers (i.e., additional leading zero
required even if the most significant bit is set). octets are not used even if the most significant bit is set).
4.5. Enumerateds 4.5. Enumerateds
An additional sparse data type is available called enum. A field of An additional sparse data type is available called enum. A field of
type enum can only assume the values declared in the definition. type enum can only assume the values declared in the definition.
Each definition is a different type. Only enumerateds of the same Each definition is a different type. Only enumerateds of the same
type may be assigned or compared. Every element of an enumerated type may be assigned or compared. Every element of an enumerated
must be assigned a value, as demonstrated in the following example. must be assigned a value, as demonstrated in the following example.
Since the elements of the enumerated are not ordered, they can be Since the elements of the enumerated are not ordered, they can be
assigned any unique value, in any order. assigned any unique value, in any order.
skipping to change at page 16, line 16 skipping to change at page 16, line 17
4.8.1. Digital Signing 4.8.1. Digital Signing
A digitally-signed element is encoded as a struct DigitallySigned: A digitally-signed element is encoded as a struct DigitallySigned:
struct { struct {
SignatureScheme algorithm; SignatureScheme algorithm;
opaque signature<0..2^16-1>; opaque signature<0..2^16-1>;
} DigitallySigned; } DigitallySigned;
The algorithm field specifies the algorithm used (see Section 6.3.2.1 The algorithm field specifies the algorithm used (see Section 6.3.2.2
for the definition of this field). The signature is a digital for the definition of this field). The signature is a digital
signature using those algorithms over the contents of the element. signature using those algorithms over the contents of the element.
The contents themselves do not appear on the wire but are simply The contents themselves do not appear on the wire but are simply
calculated. The length of the signature is specified by the signing calculated. The length of the signature is specified by the signing
algorithm and key. algorithm and key.
In previous versions of TLS, the ServerKeyExchange format meant that In previous versions of TLS, the ServerKeyExchange format meant that
attackers can obtain a signature of a message with a chosen, 32-byte attackers can obtain a signature of a message with a chosen, 32-byte
prefix. Because TLS 1.3 servers are likely to also implement prior prefix. Because TLS 1.3 servers are likely to also implement prior
versions, the contents of the element always start with 64 bytes of versions, the contents of the element always start with 64 bytes of
skipping to change at page 16, line 40 skipping to change at page 16, line 41
signatures for different purposes. The context string will be signatures for different purposes. The context string will be
specified whenever a digitally-signed element is used. A single 0 specified whenever a digitally-signed element is used. A single 0
byte is appended to the context to act as a separator. byte is appended to the context to act as a separator.
Finally, the specified contents of the digitally-signed structure Finally, the specified contents of the digitally-signed structure
follow the 0 byte after the context string. (See the example at the follow the 0 byte after the context string. (See the example at the
end of this section.) end of this section.)
The combined input is then fed into the corresponding signature The combined input is then fed into the corresponding signature
algorithm to produce the signature value on the wire. See algorithm to produce the signature value on the wire. See
Section 6.3.2.1 for algorithms defined in this specification. Section 6.3.2.2 for algorithms defined in this specification.
In the following example In the following example
struct { struct {
uint8 field1; uint8 field1;
uint8 field2; uint8 field2;
digitally-signed opaque { digitally-signed opaque {
uint8 field3<0..255>; uint8 field3<0..255>;
uint8 field4; uint8 field4;
}; };
} UserType; } UserType;
Assume that the context string for the signature was specified as Assume that the context string for the signature was specified as
skipping to change at page 17, line 30 skipping to change at page 17, line 38
4.8.2. Authenticated Encryption with Additional Data (AEAD) 4.8.2. Authenticated Encryption with Additional Data (AEAD)
In AEAD encryption, the plaintext is simultaneously encrypted and In AEAD encryption, the plaintext is simultaneously encrypted and
integrity protected. The input may be of any length, and aead- integrity protected. The input may be of any length, and aead-
ciphered output is generally larger than the input in order to ciphered output is generally larger than the input in order to
accommodate the integrity check value. accommodate the integrity check value.
5. The TLS Record Protocol 5. The TLS Record Protocol
The TLS Record Protocol is a layered protocol. At each layer,
messages may include fields for length, description, and content.
The TLS Record Protocol takes messages to be transmitted, fragments The TLS Record Protocol takes messages to be transmitted, fragments
the data into manageable blocks, protects the records, and transmits the data into manageable blocks, protects the records, and transmits
the result. Received data is decrypted and verified, reassembled, the result. Received data is decrypted and verified, reassembled,
and then delivered to higher-level clients. and then delivered to higher-level clients.
Three protocols that use the TLS Record Protocol are described in Three protocols that use the TLS Record Protocol are described in
this document: the TLS Handshake Protocol, the Alert Protocol, and this document: the TLS Handshake Protocol, the Alert Protocol, and
the application data protocol. In order to allow extension of the the application data protocol. In order to allow extension of the
TLS protocol, additional record content types can be supported by the TLS protocol, additional record content types can be supported by the
TLS Record Protocol. New record content type values are assigned by TLS Record Protocol. New record content type values are assigned by
skipping to change at page 20, line 23 skipping to change at page 20, line 29
either rekey (Section 6.3.5.3) or terminate the connection. either rekey (Section 6.3.5.3) or terminate the connection.
5.2. Record Layer 5.2. Record Layer
The TLS record layer receives uninterpreted data from higher layers The TLS record layer receives uninterpreted data from higher layers
in non-empty blocks of arbitrary size. in non-empty blocks of arbitrary size.
5.2.1. Fragmentation 5.2.1. Fragmentation
The record layer fragments information blocks into TLSPlaintext The record layer fragments information blocks into TLSPlaintext
records carrying data in chunks of 2^14 bytes or less. Client records carrying data in chunks of 2^14 bytes or less. Message
message boundaries are not preserved in the record layer (i.e., boundaries are not preserved in the record layer (i.e., multiple
multiple client messages of the same ContentType MAY be coalesced messages of the same ContentType MAY be coalesced into a single
into a single TLSPlaintext record, or a single message MAY be TLSPlaintext record, or a single message MAY be fragmented across
fragmented across several records). Alert messages Section 6.1 MUST several records). Alert messages (Section 6.1) MUST NOT be
NOT be fragmented across records. fragmented across records.
struct { struct {
uint8 major; uint8 major;
uint8 minor; uint8 minor;
} ProtocolVersion; } ProtocolVersion;
enum { enum {
alert(21), alert(21),
handshake(22), handshake(22),
application_data(23) application_data(23)
skipping to change at page 22, line 19 skipping to change at page 22, line 40
aead-ciphered struct { aead-ciphered struct {
opaque content[TLSPlaintext.length]; opaque content[TLSPlaintext.length];
ContentType type; ContentType type;
uint8 zeros[length_of_padding]; uint8 zeros[length_of_padding];
} fragment; } fragment;
} TLSCiphertext; } TLSCiphertext;
opaque_type opaque_type
The outer opaque_type field of a TLSCiphertext record is always The outer opaque_type field of a TLSCiphertext record is always
set to the value 23 (application_data) for outward compatibility set to the value 23 (application_data) for outward compatibility
with middleboxes used to parsing previous versions of TLS. The with middleboxes accustomed to parsing previous versions of TLS.
actual content type of the record is found in fragment.type after The actual content type of the record is found in fragment.type
decryption. after decryption.
record_version record_version
The record_version field is identical to The record_version field is identical to
TLSPlaintext.record_version and is always { 3, 1 }. Note that the TLSPlaintext.record_version and is always { 3, 1 }. Note that the
handshake protocol including the ClientHello and ServerHello handshake protocol including the ClientHello and ServerHello
messages authenticates the protocol version, so this value is messages authenticates the protocol version, so this value is
redundant. redundant.
length length
The length (in bytes) of the following TLSCiphertext.fragment. The length (in bytes) of the following TLSCiphertext.fragment.
skipping to change at page 24, line 29 skipping to change at page 24, line 50
Application Data records may contain a zero-length fragment.content Application Data records may contain a zero-length fragment.content
if the sender desires. This permits generation of plausibly-sized if the sender desires. This permits generation of plausibly-sized
cover traffic in contexts where the presence or absence of activity cover traffic in contexts where the presence or absence of activity
may be sensitive. Implementations MUST NOT send Handshake or Alert may be sensitive. Implementations MUST NOT send Handshake or Alert
records that have a zero-length fragment.content. records that have a zero-length fragment.content.
The padding sent is automatically verified by the record protection The padding sent is automatically verified by the record protection
mechanism: Upon successful decryption of a TLSCiphertext.fragment, mechanism: Upon successful decryption of a TLSCiphertext.fragment,
the receiving implementation scans the field from the end toward the the receiving implementation scans the field from the end toward the
beginning until it finds a non-zero octet. This non-zero octet is beginning until it finds a non-zero octet. This non-zero octet is
the content type of the message. the content type of the message. This padding scheme was selected
because it allows padding of any encrypted TLS record by an arbitrary
size (from zero up to TLS record size limits) without introducing new
content types. The design also enforces all-zero padding octets,
which allows for quick detection of padding errors.
Implementations MUST limit their scanning to the cleartext returned Implementations MUST limit their scanning to the cleartext returned
from the AEAD decryption. If a receiving implementation does not from the AEAD decryption. If a receiving implementation does not
find a non-zero octet in the cleartext, it should treat the record as find a non-zero octet in the cleartext, it should treat the record as
having an unexpected ContentType, sending an "unexpected_message" having an unexpected ContentType, sending an "unexpected_message"
alert. alert.
The presence of padding does not change the overall record size The presence of padding does not change the overall record size
limitations - the full fragment plaintext may not exceed 2^14 octets. limitations - the full fragment plaintext may not exceed 2^14 octets.
Versions of TLS prior to 1.3 had limited support for padding. This
padding scheme was selected because it allows padding of any
encrypted TLS record by an arbitrary size (from zero up to TLS record
size limits) without introducing new content types. The design also
enforces all-zero padding octets, which allows for quick detection of
padding errors.
Selecting a padding policy that suggests when and how much to pad is Selecting a padding policy that suggests when and how much to pad is
a complex topic, and is beyond the scope of this specification. If a complex topic, and is beyond the scope of this specification. If
the application layer protocol atop TLS permits padding, it may be the application layer protocol atop TLS permits padding, it may be
preferable to pad application_data TLS records within the application preferable to pad application_data TLS records within the application
layer. Padding for encrypted handshake and alert TLS records must layer. Padding for encrypted handshake and alert TLS records must
still be handled at the TLS layer, though. Later documents may still be handled at the TLS layer, though. Later documents may
define padding selection algorithms, or define a padding policy define padding selection algorithms, or define a padding policy
request mechanism through TLS extensions or some other means. request mechanism through TLS extensions or some other means.
6. The TLS Handshaking Protocols 6. The TLS Handshaking Protocols
TLS has three subprotocols that are used to allow peers to agree upon TLS has two subprotocols that are used to allow peers to agree upon
security parameters for the record layer, to authenticate themselves, security parameters for the record layer, to authenticate themselves,
to instantiate negotiated security parameters, and to report error to instantiate negotiated security parameters, and to report error
conditions to each other. conditions to each other.
The TLS Handshake Protocol is responsible for negotiating a session, The TLS Handshake Protocol is responsible for negotiating a session,
which consists of the following items: which consists of the following items:
peer certificate peer certificate
X509v3 [RFC5280] certificate of the peer. This element of the X509v3 [RFC5280] certificate of the peer. This element of the
state may be null. state may be null.
skipping to change at page 31, line 22 skipping to change at page 32, line 22
bad_certificate_hash_value bad_certificate_hash_value
Sent by servers when a retrieved object does not have the correct Sent by servers when a retrieved object does not have the correct
hash provided by the client via the "client_certificate_url" hash provided by the client via the "client_certificate_url"
extension [RFC6066]. This alert is always fatal. extension [RFC6066]. This alert is always fatal.
unknown_psk_identity unknown_psk_identity
Sent by servers when a PSK cipher suite is selected but no Sent by servers when a PSK cipher suite is selected but no
acceptable PSK identity is provided by the client. Sending this acceptable PSK identity is provided by the client. Sending this
alert is OPTIONAL; servers MAY instead choose to send a alert is OPTIONAL; servers MAY instead choose to send a
"decrypt_error" alert to merely indicate an invalid PSK identity. "decrypt_error" alert to merely indicate an invalid PSK identity.
[[TODO: This doesn't really make sense with the current PSK
negotiation scheme where the client provides multiple PSKs in
flight 1. https://github.com/tlswg/tls13-spec/issues/230]]
New Alert values are assigned by IANA as described in Section 11. New Alert values are assigned by IANA as described in Section 11.
6.2. Handshake Protocol Overview 6.2. Handshake Protocol Overview
The cryptographic parameters of the session state are produced by the The cryptographic parameters of the session state are produced by the
TLS Handshake Protocol, which operates on top of the TLS record TLS Handshake Protocol, which operates on top of the TLS record
layer. When a TLS client and server first start communicating, they layer. When a TLS client and server first start communicating, they
agree on a protocol version, select cryptographic algorithms, agree on a protocol version, select cryptographic algorithms,
optionally authenticate each other, and establish shared secret optionally authenticate each other, and establish shared secret
skipping to change at page 31, line 50 skipping to change at page 32, line 47
varieties). varieties).
- A pre-shared symmetric key (PSK) - A pre-shared symmetric key (PSK)
- A combination of a symmetric key and Diffie-Hellman - A combination of a symmetric key and Diffie-Hellman
Which mode is used depends on the negotiated cipher suite. Which mode is used depends on the negotiated cipher suite.
Conceptually, the handshake establishes three secrets which are used Conceptually, the handshake establishes three secrets which are used
to derive all the keys. to derive all the keys.
Ephemeral Secret (ES): A secret which is derived from fresh (EC)DHE Figure 1 below shows the basic full TLS handshake.
shares for this connection. Keying material derived from ES is
intended to be forward secret (with the exception of pre-shared key
only modes).
Static Secret (SS): A secret which may be derived from static or
semi-static keying material, such as a pre-shared key or the server's
semi-static (EC)DH share.
Master Secret (MS): A secret derived from both the static and the
ephemeral secret.
In some cases, as with the DH handshake shown in Figure 1, the
ephemeral and shared secrets are the same, but having both allows for
a uniform key derivation scheme for all cipher modes.
The basic TLS Handshake for DH is shown in Figure 1:
Client Server Client Server
Key / ClientHello Key ^ ClientHello
Exch \ + key_share --------> Exch | + key_share*
ServerHello \ Key v + pre_shared_key* -------->
+ key_share / Exch ServerHello ^ Key
{EncryptedExtensions} ^ + key_share* | Exch
{CertificateRequest*} | Server + pre_shared_key* v
{ServerConfiguration*} v Params {EncryptedExtensions} ^ Server
{CertificateRequest*} v Params
{Certificate*} ^ {Certificate*} ^
{CertificateVerify*} | Auth {CertificateVerify*} | Auth
{Finished} v {Finished} v
<-------- [Application Data*] <-------- [Application Data*]
^ {Certificate*} ^ {Certificate*}
Auth | {CertificateVerify*} Auth | {CertificateVerify*}
v {Finished} --------> v {Finished} -------->
[Application Data] <-------> [Application Data] [Application Data] <-------> [Application Data]
+ Indicates extensions sent in the + Indicates extensions sent in the
previously noted message. previously noted message.
* Indicates optional or situation-dependent * Indicates optional or situation-dependent
messages that are not always sent. messages that are not always sent.
{} Indicates messages protected using keys {} Indicates messages protected using keys
derived from the ephemeral secret. derived from handshake_traffic_secret.
[] Indicates messages protected using keys [] Indicates messages protected using keys
derived from the master secret. derived from traffic_secret_N
Figure 1: Message flow for full TLS Handshake Figure 1: Message flow for full TLS Handshake
The handshake can be thought of as having three phases, indicated in The handshake can be thought of as having three phases, indicated in
the diagram above. the diagram above.
Key Exchange: establish shared keying material and select the Key Exchange: establish shared keying material and select the
cryptographic parameters. Everything after this phase is encrypted. cryptographic parameters. Everything after this phase is encrypted.
Server Parameters: establish other handshake parameters (whether the Server Parameters: establish other handshake parameters (whether the
client is authenticated, support for 0-RTT, etc.) client is authenticated, application layer protocol support, etc.)
Authentication: authenticate the server (and optionally the client) Authentication: authenticate the server (and optionally the client)
and provide key confirmation and handshake integrity. and provide key confirmation and handshake integrity.
In the Key Exchange phase, the client sends the ClientHello In the Key Exchange phase, the client sends the ClientHello
(Section 6.3.1.1) message, which contains a random nonce (Section 6.3.1.1) message, which contains a random nonce
(ClientHello.random), its offered protocol version, cipher suite, and (ClientHello.random), its offered protocol version, cipher suite, and
extensions, and one or more Diffie-Hellman key shares in the extensions, and in general either one or more Diffie-Hellman key
"key_share" extension Section 6.3.2.3. shares (in the "key_share" extension Section 6.3.2.4), one or more
pre-shared key labels (in the "pre_shared_key" extension
Section 6.3.2.5), or both.
The server processes the ClientHello and determines the appropriate The server processes the ClientHello and determines the appropriate
cryptographic parameters for the connection. It then responds with cryptographic parameters for the connection. It then responds with
its own ServerHello which indicates the negotiated connection its own ServerHello which indicates the negotiated connection
parameters. [Section 6.3.1.2] If DH is in use, this will contain a parameters. [Section 6.3.1.2]. The combination of the ClientHello
"key_share" extension with the server's ephemeral Diffie-Hellman and the ServerHello determines the values of ES and SS, as described
share which MUST be in the same group as one of the shares offered by above. If either a pure (EC)DHE or (EC)DHE-PSK cipher suite is in
the client. The server's KeyShare and the client's KeyShare use, then the ServerHello will contain a "key_share" extension with
corresponding to the negotiated key exchange are used together to the server's ephemeral Diffie-Hellman share which MUST be in the same
derive the Static Secret and Ephemeral Secret (in this mode they are group. If a pure PSK or an (EC)DHE-PSK cipher suite is negotiated,
the same). [Section 6.3.2.3] then the ServerHello will contain a "pre_shared_key" extension
indicating which if the client's offered PSKs was selected.
The server then sends three messages to establish the Server The server then sends two messages to establish the Server
Parameters: Parameters:
EncryptedExtensions EncryptedExtensions responses to any extensions which are not
responses to any extensions which are not required in order to required in order to determine the cryptographic parameters.
determine the cryptographic parameters. [Section 6.3.3.1] [Section 6.3.3.1]
CertificateRequest
if certificate-based client authentication is desired, the desired
parameters for that certificate. This message will be omitted if
client authentication is not desired. [[OPEN ISSUE: See
https://github.com/tlswg/tls13-spec/issues/184]].
[Section 6.3.3.2]
ServerConfiguration CertificateRequest if certificate-based client authentication is
supplies a configuration for 0-RTT handshakes (see Section 6.2.2). desired, the desired parameters for that certificate. This
[Section 6.3.3.3] message will be omitted if client authentication is not desired.
Finally, the client and server exchange Authentication messages. TLS Finally, the client and server exchange Authentication messages. TLS
uses the same set of messages every time that authentication is uses the same set of messages every time that authentication is
needed. Specifically: needed. Specifically:
Certificate Certificate
the certificate of the endpoint. This message is omitted if the certificate of the endpoint. This message is omitted if the
certificate authentication is not being used. [Section 6.3.4.1] server is not authenticating with a certificate (i.e., with PSK or
(EC)DHE-PSK cipher suites). Note that if raw public keys
[RFC7250] or the cached information extension
[I-D.ietf-tls-cached-info] are in use, then this message will not
contain a certificate but rather some other value corresponding to
the server's long-term key. [Section 6.3.4.1]
CertificateVerify CertificateVerify
a signature over the entire handshake using the public key in the a signature over the entire handshake using the public key in the
Certificate message. This message will be omitted if the server Certificate message. This message is omitted if the server is not
is not authenticating via a certificate. [Section 6.3.4.2] authenticating via a certificate (i.e., with PSK or (EC)DHE-PSK
cipher suites). [Section 6.3.4.2]
Finished Finished
a MAC over the entire handshake. This message provides key a MAC over the entire handshake. This message provides key
confirmation, binds the endpoint's identity to the exchanged keys, confirmation, binds the endpoint's identity to the exchanged keys,
and in some modes (0-RTT and PSK) also authenticates the handshake and in PSK mode also authenticates the handshake.
using the the Static Secret. [Section 6.3.4.3] [Section 6.3.4.3]
Upon receiving the server's messages, the client responds with its Upon receiving the server's messages, the client responds with its
Authentication messages, namely Certificate and CertificateVerify (if Authentication messages, namely Certificate and CertificateVerify (if
requested), and Finished. requested), and Finished.
At this point, the handshake is complete, and the client and server At this point, the handshake is complete, and the client and server
may exchange application layer data. Application data MUST NOT be may exchange application layer data. Application data MUST NOT be
sent prior to sending the Finished message. Note that while the sent prior to sending the Finished message. Note that while the
server may send application data prior to receiving the client's server may send application data prior to receiving the client's
Authentication messages, any data sent at that point is of course Authentication messages, any data sent at that point is, of course,
being sent to an unauthenticated peer. being sent to an unauthenticated peer.
[[TODO: Move this elsewhere? Note that higher layers should not be [[TODO: Move this elsewhere? Note that higher layers should not be
overly reliant on whether TLS always negotiates the strongest overly reliant on whether TLS always negotiates the strongest
possible connection between two endpoints. There are a number of possible connection between two endpoints. There are a number of
ways in which a man-in-the-middle attacker can attempt to make two ways in which a man-in-the-middle attacker can attempt to make two
entities drop down to the least secure method they support (i.e., entities drop down to the least secure method they support (i.e.,
perform a downgrade attack). The TLS protocol has been designed to perform a downgrade attack). The TLS protocol has been designed to
minimize this risk, but there are still attacks available: for minimize this risk, but there are still attacks available: for
example, an attacker could block access to the port a secure service example, an attacker could block access to the port a secure service
skipping to change at page 35, line 11 skipping to change at page 35, line 44
ECDHE key exchange with a host whose certificate chain you have ECDHE key exchange with a host whose certificate chain you have
verified, you can expect that to be reasonably "secure" against verified, you can expect that to be reasonably "secure" against
algorithmic attacks, at least in the year 2015.]] algorithmic attacks, at least in the year 2015.]]
6.2.1. Incorrect DHE Share 6.2.1. Incorrect DHE Share
If the client has not provided an appropriate "key_share" extension If the client has not provided an appropriate "key_share" extension
(e.g. it includes only DHE or ECDHE groups unacceptable or (e.g. it includes only DHE or ECDHE groups unacceptable or
unsupported by the server), the server corrects the mismatch with a unsupported by the server), the server corrects the mismatch with a
HelloRetryRequest and the client will need to restart the handshake HelloRetryRequest and the client will need to restart the handshake
with an appropriate "key_share" extension, as shown in Figure 2: with an appropriate "key_share" extension, as shown in Figure 2. If
no common cryptographic parameters can be negotiated, the server will
send a "handshake_failure" or "insufficient_security" fatal alert
(see Section 6.1).
Client Server Client Server
ClientHello ClientHello
+ key_share --------> + key_share -------->
<-------- HelloRetryRequest <-------- HelloRetryRequest
ClientHello ClientHello
+ key_share --------> + key_share -------->
ServerHello ServerHello
+ key_share + key_share
{EncryptedExtensions} {EncryptedExtensions}
{CertificateRequest*} {CertificateRequest*}
{ServerConfiguration*}
{Certificate*} {Certificate*}
{CertificateVerify*} {CertificateVerify*}
{Finished} {Finished}
<-------- [Application Data*] <-------- [Application Data*]
{Certificate*} {Certificate*}
{CertificateVerify*} {CertificateVerify*}
{Finished} --------> {Finished} -------->
[Application Data] <-------> [Application Data] [Application Data] <-------> [Application Data]
Figure 2: Message flow for a full handshake with mismatched Figure 2: Message flow for a full handshake with mismatched
parameters parameters
[[OPEN ISSUE: Should we restart the handshake hash? Note: the handshake transcript includes the initial ClientHello/
https://github.com/tlswg/tls13-spec/issues/104.]] [[OPEN ISSUE: We HelloRetryRequest exchange. It is not reset with the new
need to make sure that this flow doesn't introduce downgrade issues. ClientHello.
Potential options include continuing the handshake hashes (as long as
clients don't change their opinion of the server's capabilities with
aborted handshakes) and requiring the client to send the same
ClientHello (as is currently done) and then checking you get the same
negotiated parameters.]]
If no common cryptographic parameters can be negotiated, the server
will send a "handshake_failure" or "insufficient_security" fatal
alert (see Section 6.1).
TLS also allows several optimized variants of the basic handshake, as TLS also allows several optimized variants of the basic handshake, as
described below. described below.
6.2.2. Zero-RTT Exchange 6.2.2. Resumption and Pre-Shared Key (PSK)
TLS 1.3 supports a "0-RTT" mode in which the client can both Although TLS PSKs can be established out of band, PSKs can also be
authenticate and send application on its first flight, thus reducing established in a previous session and then reused ("session
handshake latency. In order to enable this functionality, the server resumption"). Once a handshake has completed, the server can send
provides a ServerConfiguration message containing a long-term (EC)DH the client a PSK identity which corresponds to a key derived from the
share. On future connections to the same server, the client can use initial handshake (See Section 6.3.5.1). The client can then use
that share to protect the first-flight data. that PSK identity in future handshakes to negotiate use of the PSK;
if the server accepts it, then the security context of the original
connection is tied to the new connection. In TLS 1.2 and below, this
functionality was provided by "session resumption" and "session
tickets" [RFC5077]. Both mechanisms are obsoleted in TLS 1.3.
PSK cipher suites can either use PSK in combination with an (EC)DHE
exchange in order to provide forward secrecy in combination with
shared keys, or can use PSKs alone, at the cost of losing forward
secrecy.
Figure 3 shows a pair of handshakes in which the first establishes a
PSK and the second uses it:
Client Server
Initial Handshake:
ClientHello
+ key_share -------->
ServerHello
+ key_share
{EncryptedExtensions}
{CertificateRequest*}
{Certificate*}
{CertificateVerify*}
{Finished}
<-------- [Application Data*]
{Certificate*}
{CertificateVerify*}
{Finished} -------->
<-------- [NewSessionTicket]
[Application Data] <-------> [Application Data]
Subsequent Handshake:
ClientHello
+ key_share
+ pre_shared_key -------->
ServerHello
+ pre_shared_key
+ key_share*
{EncryptedExtensions}
{Finished}
<-------- [Application Data*]
{Finished} -------->
[Application Data] <-------> [Application Data]
Figure 3: Message flow for resumption and PSK
As the server is authenticating via a PSK, it does not send a
Certificate or a CertificateVerify. When a client offers resumption
via PSK it SHOULD also supply a "key_share" extension to the server
as well; this allows server to decline resumption and fall back to a
full handshake. A "key_share" extension MUST also be sent if the
client is attempting to negotiate an (EC)DHE-PSK cipher suite.
6.2.3. Zero-RTT Data
When resuming via a PSK with an appropriate ticket (i.e., one with
the "allow_early_data" flag), clients can also send data on their
first flight ("early data"). This data is encrypted solely under
keys derived using the PSK as the static secret. As shown in
Figure 4, the Zero-RTT data is just added to the 1-RTT handshake in
the first flight, the rest of the handshake uses the same messages.
Client Server Client Server
ClientHello ClientHello
+ key_share
+ early_data + early_data
^ (Certificate*) + key_share*
0-RTT | (CertificateVerify*) (EncryptedExtensions)
Data | (Finished) (Finished)
v (Application Data*) (Application Data*)
(end_of_early_data) --------> (end_of_early_data) -------->
ServerHello ServerHello
+ early_data + early_data
+ key_share + key_share
{EncryptedExtensions} {EncryptedExtensions}
{CertificateRequest*} {CertificateRequest*}
{ServerConfiguration*}
{Certificate*}
{CertificateVerify*}
{Finished} {Finished}
<-------- [Application Data*] <-------- [Application Data*]
{Certificate*} {Certificate*}
{CertificateVerify*} {CertificateVerify*}
{Finished} --------> {Finished} -------->
[Application Data] <-------> [Application Data] [Application Data] <-------> [Application Data]
* Indicates optional or situation-dependent * Indicates optional or situation-dependent
messages that are not always sent. messages that are not always sent.
() Indicates messages protected using keys () Indicates messages protected using keys
derived from the static secret. derived from early_traffic_secret.
{} Indicates messages protected using keys {} Indicates messages protected using keys
derived from the ephemeral secret. derived from handshake_traffic_secret.
[] Indicates messages protected using keys [] Indicates messages protected using keys
derived from the master secret. derived from traffic_secret_N
Figure 3: Message flow for a zero round trip handshake
As shown in Figure 3, the Zero-RTT data is just added to the 1-RTT Figure 4: Message flow for a zero round trip handshake
handshake in the first flight. Specifically, the client sends its
Authentication messages after the ClientHello, followed by any
application data. The rest of the handshake messages are the same as
with Figure 1. This implies that the server can request client
authentication even if the client offers a certificate on its first
flight. This is consistent with the server being able to ask for
client authentication after the handshake is complete (see
Section 6.3.5.2). When offering PSK support, the "pre_shared_key"
extension will be used instead of (or in addition to) the "key_share"
extension as specified above.
[[OPEN ISSUE: Should it be possible to combine 0-RTT with the server
authenticating via a signature https://github.com/tlswg/tls13-spec/
issues/443]]
IMPORTANT NOTE: The security properties for 0-RTT data (regardless of IMPORTANT NOTE: The security properties for 0-RTT data (regardless of
the cipher suite) are weaker than those for other kinds of TLS data. the cipher suite) are weaker than those for other kinds of TLS data.
Specifically: Specifically:
1. This data is not forward secret, because it is encrypted solely 1. This data is not forward secret, because it is encrypted solely
with the server's semi-static (EC)DH share. with the PSK.
2. There are no guarantees of non-replay between connections. 2. There are no guarantees of non-replay between connections.
Unless the server takes special measures outside those provided Unless the server takes special measures outside those provided
by TLS (See Section 6.3.2.5.2), the server has no guarantee that by TLS (See Section 6.3.2.7.2), the server has no guarantee that
the same 0-RTT data was not transmitted on multiple 0-RTT the same 0-RTT data was not transmitted on multiple 0-RTT
connections. This is especially relevant if the data is connections. This is especially relevant if the data is
authenticated either with TLS client authentication or inside the authenticated either with TLS client authentication or inside the
application layer protocol. However, 0-RTT data cannot be application layer protocol. However, 0-RTT data cannot be
duplicated within a connection (i.e., the server will not process duplicated within a connection (i.e., the server will not process
the same data twice for the same connection) and also cannot be the same data twice for the same connection) and an attacker will
sent as if it were ordinary TLS data. not be able to make 0-RTT data appear to be 1-RTT data (because
it is protected with different keys.)
3. If the server key is compromised, then the attacker can tamper
with the 0-RTT data without detection. If the client's ephemeral
share is compromised and client authentication is used, then the
attacker can impersonate the client on subsequent connections.
6.2.3. Resumption and Pre-Shared Key (PSK)
Finally, TLS provides a pre-shared key (PSK) mode which allows a
client and server who share an existing secret (e.g., a key
established out of band) to establish a connection authenticated by
that key. PSKs can also be established in a previous session and
then reused ("session resumption"). Once a handshake has completed,
the server can send the client a PSK identity which corresponds to a
key derived from the initial handshake (See Section 6.3.5.1). The
client can then use that PSK identity in future handshakes to
negotiate use of the PSK; if the server accepts it, then the security
context of the original connection is tied to the new connection. In
TLS 1.2 and below, this functionality was provided by "session
resumption" and "session tickets" [RFC5077]. Both mechanisms are
obsoleted in TLS 1.3.
PSK cipher suites can either use PSK in combination with an (EC)DHE
exchange in order to provide forward secrecy in combination with
shared keys, or can use PSKs alone, at the cost of losing forward
secrecy.
Figure 4 shows a pair of handshakes in which the first establishes a
PSK and the second uses it:
Client Server
Initial Handshake:
ClientHello
+ key_share -------->
ServerHello
+ key_share
{EncryptedExtensions}
{CertificateRequest*}
{ServerConfiguration*}
{Certificate*}
{CertificateVerify*}
{Finished}
<-------- [Application Data*]
{Certificate*}
{CertificateVerify*}
{Finished} -------->
<-------- [NewSessionTicket]
[Application Data] <-------> [Application Data]
Subsequent Handshake:
ClientHello
+ key_share
+ pre_shared_key -------->
ServerHello
+ pre_shared_key
{EncryptedExtensions}
{Finished}
<-------- [Application Data*]
{Finished} -------->
[Application Data] <-------> [Application Data]
Figure 4: Message flow for resumption and PSK
As the server is authenticating via a PSK, it does not send a
Certificate or a CertificateVerify. PSK-based resumption cannot be
used to provide a new ServerConfiguration. Note that the client
supplies a KeyShare to the server as well, which allows the server to
decline resumption and fall back to a full handshake.
The contents and significance of each message will be presented in The contents and significance of each message will be presented in
detail in the following sections. detail in the following sections.
6.3. Handshake Protocol 6.3. Handshake Protocol
The TLS Handshake Protocol is one of the defined higher-level clients The TLS Handshake Protocol is one of the defined higher-level clients
of the TLS Record Protocol. This protocol is used to negotiate the of the TLS Record Protocol. This protocol is used to negotiate the
secure attributes of a session. Handshake messages are supplied to secure attributes of a session. Handshake messages are supplied to
the TLS record layer, where they are encapsulated within one or more the TLS record layer, where they are encapsulated within one or more
skipping to change at page 40, line 14 skipping to change at page 40, line 14
enum { enum {
client_hello(1), client_hello(1),
server_hello(2), server_hello(2),
session_ticket(4), session_ticket(4),
hello_retry_request(6), hello_retry_request(6),
encrypted_extensions(8), encrypted_extensions(8),
certificate(11), certificate(11),
certificate_request(13), certificate_request(13),
certificate_verify(15), certificate_verify(15),
server_configuration(17),
finished(20), finished(20),
key_update(24), key_update(24),
(255) (255)
} HandshakeType; } HandshakeType;
struct { struct {
HandshakeType msg_type; /* handshake type */ HandshakeType msg_type; /* handshake type */
uint24 length; /* bytes in message */ uint24 length; /* bytes in message */
select (HandshakeType) { select (HandshakeType) {
case client_hello: ClientHello; case client_hello: ClientHello;
case server_hello: ServerHello; case server_hello: ServerHello;
case hello_retry_request: HelloRetryRequest; case hello_retry_request: HelloRetryRequest;
case encrypted_extensions: EncryptedExtensions; case encrypted_extensions: EncryptedExtensions;
case certificate_request: CertificateRequest; case certificate_request: CertificateRequest;
case server_configuration: ServerConfiguration;
case certificate: Certificate; case certificate: Certificate;
case certificate_verify: CertificateVerify; case certificate_verify: CertificateVerify;
case finished: Finished; case finished: Finished;
case session_ticket: NewSessionTicket; case session_ticket: NewSessionTicket;
case key_update: KeyUpdate; case key_update: KeyUpdate;
} body; } body;
} Handshake; } Handshake;
The TLS Handshake Protocol messages are presented below in the order The TLS Handshake Protocol messages are presented below in the order
they MUST be sent; sending handshake messages in an unexpected order they MUST be sent; sending handshake messages in an unexpected order
skipping to change at page 41, line 16 skipping to change at page 41, line 16
When this message will be sent: When this message will be sent:
When a client first connects to a server, it is required to send When a client first connects to a server, it is required to send
the ClientHello as its first message. The client will also send a the ClientHello as its first message. The client will also send a
ClientHello when the server has responded to its ClientHello with ClientHello when the server has responded to its ClientHello with
a ServerHello that selects cryptographic parameters that don't a ServerHello that selects cryptographic parameters that don't
match the client's "key_share" extension. In that case, the match the client's "key_share" extension. In that case, the
client MUST send the same ClientHello (without modification) client MUST send the same ClientHello (without modification)
except including a new KeyShareEntry as the lowest priority share except including a new KeyShareEntry as the lowest priority share
(i.e., appended to the list of shares in the KeyShare message). (i.e., appended to the list of shares in the "key_share"
[[OPEN ISSUE: New random values? See: https://github.com/tlswg/ extension). If a server receives a ClientHello at any other time,
tls13-spec/issues/185]] If a server receives a ClientHello at any it MUST send a fatal "unexpected_message" alert and close the
other time, it MUST send a fatal "unexpected_message" alert and connection.
close the connection.
Structure of this message: Structure of this message:
The ClientHello message includes a random structure, which is used The ClientHello message includes a random structure, which is used
later in the protocol. later in the protocol.
struct {
opaque random_bytes[32];
} Random;
random_bytes
32 bytes generated by a secure random number generator. See
Appendix B for additional information.
TLS 1.3 server implementations which respond to a ClientHello with a
client_version indicating TLS 1.2 or below MUST set the first eight
bytes of their Random value to the bytes:
44 4F 57 4E 47 52 44 01
TLS 1.2 server implementations which respond to a ClientHello with a
client_version indicating TLS 1.1 or below SHOULD set the first eight
bytes of their Random value to the bytes:
44 4F 57 4E 47 52 44 00
TLS 1.3 clients receiving a TLS 1.2 or below ServerHello MUST check
that the top eight octets are not equal to either of these values.
TLS 1.2 clients SHOULD also perform this check if the ServerHello
indicates TLS 1.1 or below. If a match is found the client MUST
abort the handshake with a fatal "illegal_parameter" alert. This
mechanism provides limited protection against downgrade attacks over
and above that provided by the Finished exchange: because the
ServerKeyExchange includes a signature over both random values, it is
not possible for an active attacker to modify the randoms without
detection as long as ephemeral ciphers are used. It does not provide
downgrade protection when static RSA is used.
Note: This is an update to TLS 1.2 so in practice many TLS 1.2
clients and servers will not behave as specified above.
Note: Versions of TLS prior to TLS 1.3 used the top 32 bits of the
Random value to encode the time since the UNIX epoch. The sentinel
value above was selected to avoid conflicting with any valid TLS 1.2
Random value and to have a low (2^{-64}) probability of colliding
with randomly selected Random values.
The cipher suite list, passed from the client to the server in the The cipher suite list, passed from the client to the server in the
ClientHello message, contains the combinations of cryptographic ClientHello message, contains the combinations of cryptographic
algorithms supported by the client in order of the client's algorithms supported by the client in order of the client's
preference (favorite choice first). Each cipher suite defines a key preference (favorite choice first). Each cipher suite defines a key
exchange algorithm, a record protection algorithm (including secret exchange algorithm, a record protection algorithm (including secret
key length) and a hash to be used with HKDF. The server will select key length) and a hash to be used with HKDF. The server will select
a cipher suite or, if no acceptable choices are presented, return a a cipher suite or, if no acceptable choices are presented, return a
"handshake_failure" alert and close the connection. If the list "handshake_failure" alert and close the connection. If the list
contains cipher suites the server does not recognize, support, or contains cipher suites the server does not recognize, support, or
wish to use, the server MUST ignore those cipher suites, and process wish to use, the server MUST ignore those cipher suites, and process
the remaining ones as usual. the remaining ones as usual.
struct {
opaque random_bytes[32];
} Random;
uint8 CipherSuite[2]; /* Cryptographic suite selector */ uint8 CipherSuite[2]; /* Cryptographic suite selector */
struct { struct {
ProtocolVersion client_version = { 3, 4 }; /* TLS v1.3 */ ProtocolVersion client_version = { 3, 4 }; /* TLS v1.3 */
Random random; Random random;
opaque legacy_session_id<0..32>; opaque legacy_session_id<0..32>;
CipherSuite cipher_suites<2..2^16-2>; CipherSuite cipher_suites<2..2^16-2>;
opaque legacy_compression_methods<1..2^8-1>; opaque legacy_compression_methods<1..2^8-1>;
Extension extensions<0..2^16-1>; Extension extensions<0..2^16-1>;
} ClientHello; } ClientHello;
skipping to change at page 43, line 13 skipping to change at page 42, line 23
"pre_shared_key"). "pre_shared_key").
client_version client_version
The version of the TLS protocol by which the client wishes to The version of the TLS protocol by which the client wishes to
communicate during this session. This SHOULD be the latest communicate during this session. This SHOULD be the latest
(highest valued) version supported by the client. For this (highest valued) version supported by the client. For this
version of the specification, the version will be { 3, 4 }. (See version of the specification, the version will be { 3, 4 }. (See
Appendix C for details about backward compatibility.) Appendix C for details about backward compatibility.)
random random
A client-generated random structure. 32 bytes generated by a secure random number generator. See
Appendix B for additional information.
legacy_session_id legacy_session_id
Versions of TLS before TLS 1.3 supported a session resumption Versions of TLS before TLS 1.3 supported a session resumption
feature which has been merged with Pre-Shared Keys in this version feature which has been merged with Pre-Shared Keys in this version
(see Section 6.2.3). This field MUST be ignored by a server (see Section 6.2.2). This field MUST be ignored by a server
negotiating TLS 1.3 and SHOULD be set as a zero length vector negotiating TLS 1.3 and SHOULD be set as a zero length vector
(i.e., a single zero byte length field) by clients which do not (i.e., a single zero byte length field) by clients which do not
have a cached session ID set by a pre-TLS 1.3 server. have a cached session ID set by a pre-TLS 1.3 server.
cipher_suites cipher_suites
This is a list of the cryptographic options supported by the This is a list of the cryptographic options supported by the
client, with the client's first preference first. Values are client, with the client's first preference first. Values are
defined in Appendix A.4. defined in Appendix A.4.
legacy_compression_methods legacy_compression_methods
skipping to change at page 43, line 47 skipping to change at page 43, line 10
compression methods and MUST follow the procedures for the compression methods and MUST follow the procedures for the
appropriate prior version of TLS. appropriate prior version of TLS.
extensions extensions
Clients request extended functionality from servers by sending Clients request extended functionality from servers by sending
data in the extensions field. The actual "Extension" format is data in the extensions field. The actual "Extension" format is
defined in Section 6.3.2. defined in Section 6.3.2.
In the event that a client requests additional functionality using In the event that a client requests additional functionality using
extensions, and this functionality is not supplied by the server, the extensions, and this functionality is not supplied by the server, the
client MAY abort the handshake. A server MUST accept ClientHello client MAY abort the handshake. Note: TLS 1.3 ClientHello messages
messages both with and without the extensions field, and (as for all MUST always contain extensions, and a TLS 1.3 server MUST respond to
other messages) it MUST check that the amount of data in the message any TLS 1.3 ClientHello without extensions with a fatal
precisely matches one of these formats; if not, then it MUST send a "decode_error" alert. TLS 1.3 servers may receive TLS 1.2
fatal "decode_error" alert. ClientHello messages without extensions. If negotiating TLS 1.2, a
server MUST check that the amount of data in the message precisely
matches one of these formats; if not, then it MUST send a fatal
"decode_error" alert.
After sending the ClientHello message, the client waits for a After sending the ClientHello message, the client waits for a
ServerHello or HelloRetryRequest message. ServerHello or HelloRetryRequest message.
6.3.1.2. Server Hello 6.3.1.2. Server Hello
When this message will be sent: When this message will be sent:
The server will send this message in response to a ClientHello The server will send this message in response to a ClientHello
message when it was able to find an acceptable set of algorithms message when it was able to find an acceptable set of algorithms
skipping to change at page 45, line 12 skipping to change at page 44, line 28
previous versions of TLS, the server's extensions are split previous versions of TLS, the server's extensions are split
between the ServerHello and the EncryptedExtensions between the ServerHello and the EncryptedExtensions
Section 6.3.3.1 message. The ServerHello MUST only include Section 6.3.3.1 message. The ServerHello MUST only include
extensions which are required to establish the cryptographic extensions which are required to establish the cryptographic
context. Currently the only such extensions are "key_share", context. Currently the only such extensions are "key_share",
"pre_shared_key", and "early_data". Clients MUST check the "pre_shared_key", and "early_data". Clients MUST check the
ServerHello for the presence of any forbidden extensions and if ServerHello for the presence of any forbidden extensions and if
any are found MUST terminate the handshake with a any are found MUST terminate the handshake with a
"illegal_parameter" alert. "illegal_parameter" alert.
TLS 1.3 server implementations which respond to a ClientHello with a
client_version indicating TLS 1.2 or below MUST set the first eight
bytes of their Random value to the bytes:
44 4F 57 4E 47 52 44 01
TLS 1.2 server implementations which respond to a ClientHello with a
client_version indicating TLS 1.1 or below SHOULD set the first eight
bytes of their Random value to the bytes:
44 4F 57 4E 47 52 44 00
TLS 1.3 clients receiving a TLS 1.2 or below ServerHello MUST check
that the top eight octets are not equal to either of these values.
TLS 1.2 clients SHOULD also perform this check if the ServerHello
indicates TLS 1.1 or below. If a match is found, the client MUST
abort the handshake with a fatal "illegal_parameter" alert. This
mechanism provides limited protection against downgrade attacks over
and above that provided by the Finished exchange: because the
ServerKeyExchange includes a signature over both random values, it is
not possible for an active attacker to modify the randoms without
detection as long as ephemeral ciphers are used. It does not provide
downgrade protection when static RSA is used.
Note: This is an update to TLS 1.2 so in practice many TLS 1.2
clients and servers will not behave as specified above.
Note: Versions of TLS prior to TLS 1.3 used the top 32 bits of the
Random value to encode the time since the UNIX epoch. The sentinel
value above was selected to avoid conflicting with any valid TLS 1.2
Random value and to have a low (2^{-64}) probability of colliding
with randomly selected Random values.
6.3.1.3. Hello Retry Request 6.3.1.3. Hello Retry Request
When this message will be sent: When this message will be sent:
Servers send this message in response to a ClientHello message Servers send this message in response to a ClientHello message
when it was able to find an acceptable set of algorithms and when it was able to find an acceptable set of algorithms and
groups that are mutually supported, but the client's KeyShare did groups that are mutually supported, but the client's KeyShare did
not contain an acceptable offer. If it cannot find such a match, not contain an acceptable offer. If it cannot find such a match,
it will respond with a fatal "handshake_failure" alert. it will respond with a fatal "handshake_failure" alert.
Structure of this message: Structure of this message:
struct { struct {
ProtocolVersion server_version; ProtocolVersion server_version;
CipherSuite cipher_suite; CipherSuite cipher_suite;
NamedGroup selected_group; NamedGroup selected_group;
Extension extensions<0..2^16-1>; Extension extensions<0..2^16-1>;
} HelloRetryRequest; } HelloRetryRequest;
[[OPEN ISSUE: Merge in DTLS Cookies?]]
selected_group selected_group
The mutually supported group the server intends to negotiate and The mutually supported group the server intends to negotiate and
is requesting a retried ClientHello/KeyShare for. is requesting a retried ClientHello/KeyShare for.
The server_version, cipher_suite, and extensions fields have the same The server_version, cipher_suite, and extensions fields have the same
meanings as their corresponding values in the ServerHello. The meanings as their corresponding values in the ServerHello. The
server SHOULD send only the extensions necessary for the client to server SHOULD send only the extensions necessary for the client to
generate a correct ClientHello pair. As with ServerHello, a generate a correct ClientHello pair. As with ServerHello, a
HelloRetryRequest MUST NOT contain any extensions that were not first HelloRetryRequest MUST NOT contain any extensions that were not first
offered by the client in its ClientHello. offered by the client in its ClientHello.
skipping to change at page 46, line 19 skipping to change at page 46, line 18
KeyShare extension to the server. The client MUST append a new KeyShare extension to the server. The client MUST append a new
KeyShareEntry for the group indicated in the selected_group field to KeyShareEntry for the group indicated in the selected_group field to
the groups in its original KeyShare. the groups in its original KeyShare.
Upon re-sending the ClientHello and receiving the server's Upon re-sending the ClientHello and receiving the server's
ServerHello/KeyShare, the client MUST verify that the selected ServerHello/KeyShare, the client MUST verify that the selected
CipherSuite and NamedGroup match that supplied in the CipherSuite and NamedGroup match that supplied in the
HelloRetryRequest. If either of these values differ, the client MUST HelloRetryRequest. If either of these values differ, the client MUST
abort the connection with a fatal "handshake_failure" alert. abort the connection with a fatal "handshake_failure" alert.
[[OPEN ISSUE: https://github.com/tlswg/tls13-spec/issues/104]]
6.3.2. Hello Extensions 6.3.2. Hello Extensions
The extension format is: The extension format is:
struct { struct {
ExtensionType extension_type; ExtensionType extension_type;
opaque extension_data<0..2^16-1>; opaque extension_data<0..2^16-1>;
} Extension; } Extension;
enum { enum {
supported_groups(10), supported_groups(10),
signature_algorithms(13), signature_algorithms(13),
key_share(40), key_share(40),
pre_shared_key(41), pre_shared_key(41),
early_data(42), early_data(42),
ticket_age(43),
cookie (44),
(65535) (65535)
} ExtensionType; } ExtensionType;
Here: Here:
- "extension_type" identifies the particular extension type. - "extension_type" identifies the particular extension type.
- "extension_data" contains information specific to the particular - "extension_data" contains information specific to the particular
extension type. extension type.
skipping to change at page 48, line 12 skipping to change at page 48, line 11
followed regardless of whether the feature is believed to cause a followed regardless of whether the feature is believed to cause a
security problem. Often the fact that the extension fields are security problem. Often the fact that the extension fields are
included in the inputs to the Finished message hashes will be included in the inputs to the Finished message hashes will be
sufficient, but extreme care is needed when the extension changes sufficient, but extreme care is needed when the extension changes
the meaning of messages sent in the handshake phase. Designers the meaning of messages sent in the handshake phase. Designers
and implementors should be aware of the fact that until the and implementors should be aware of the fact that until the
handshake has been authenticated, active attackers can modify handshake has been authenticated, active attackers can modify
messages and insert, remove, or replace extensions. messages and insert, remove, or replace extensions.
- It would be technically possible to use extensions to change major - It would be technically possible to use extensions to change major
aspects of the design of TLS; for example the design of cipher aspects of the design of TLS; for example, the design of cipher
suite negotiation. This is not recommended; it would be more suite negotiation. This is not recommended; it would be more
appropriate to define a new version of TLS -- particularly since appropriate to define a new version of TLS -- particularly since
the TLS handshake algorithms have specific protection against the TLS handshake algorithms have specific protection against
version rollback attacks based on the version number, and the version rollback attacks based on the version number, and the
possibility of version rollback should be a significant possibility of version rollback should be a significant
consideration in any major design change. consideration in any major design change.
6.3.2.1. Signature Algorithms 6.3.2.1. Cookie
struct {
opaque cookie<0..255>;
} Cookie;
Cookies serve two primary purposes:
- Allowing the server to force the client to demonstrate
reachability at their apparent network address (thus providing a
measure of DoS protection). This is primarily useful for non-
connection-oriented transports (see [RFC6347] for an example of
this).
- Allowing the server to offload state to the client, thus allowing
it to send a HelloRetryRequest without storing any state. The
server does this by pickling that post-ClientHello hash state into
the cookie (protected with some suitable integrity algorithm).
When sending a HelloRetryRequest, the server MAY provide a "cookie"
extension to the client (this is an exception to the usual rule that
the only extensions that may be sent are those that appear in the
ClientHello). When sending the new ClientHello, the client MUST echo
the value of the extension. Clients MUST NOT use cookies in
subsequent connections.
6.3.2.2. Signature Algorithms
The client uses the "signature_algorithms" extension to indicate to The client uses the "signature_algorithms" extension to indicate to
the server which signature algorithms may be used in digital the server which signature algorithms may be used in digital
signatures. signatures.
Clients which offer one or more cipher suites which use certificate Clients which offer one or more cipher suites which use certificate
authentication (i.e., any non-PSK cipher suite) MUST send the authentication (i.e., any non-PSK cipher suite) MUST send the
"signature_algorithms" extension. If this extension is not provided "signature_algorithms" extension. If this extension is not provided
and no alternative cipher suite is available, the server MUST close and no alternative cipher suite is available, the server MUST close
the connection with a fatal "missing_extension" alert. (see the connection with a fatal "missing_extension" alert. (see
Section 8.2) Section 8.2)
The "extension_data" field of this extension contains a The "extension_data" field of this extension contains a
"supported_signature_algorithms" value: "supported_signature_algorithms" value:
enum { enum {
// RSASSA-PKCS-v1_5 algorithms. /* RSASSA-PKCS-v1_5 algorithms */
rsa_pkcs1_sha1 (0x0201), rsa_pkcs1_sha1 (0x0201),
rsa_pkcs1_sha256 (0x0401), rsa_pkcs1_sha256 (0x0401),
rsa_pkcs1_sha384 (0x0501), rsa_pkcs1_sha384 (0x0501),
rsa_pkcs1_sha512 (0x0601), rsa_pkcs1_sha512 (0x0601),
// DSA algorithms (deprecated). /* ECDSA algorithms */
dsa_sha1 (0x0202),
dsa_sha256 (0x0402),
dsa_sha384 (0x0502),
dsa_sha512 (0x0602),
// ECDSA algorithms.
ecdsa_secp256r1_sha256 (0x0403), ecdsa_secp256r1_sha256 (0x0403),
ecdsa_secp384r1_sha384 (0x0503), ecdsa_secp384r1_sha384 (0x0503),
ecdsa_secp521r1_sha512 (0x0603), ecdsa_secp521r1_sha512 (0x0603),
// RSASSA-PSS algorithms. /* RSASSA-PSS algorithms */
rsa_pss_sha256 (0x0700), rsa_pss_sha256 (0x0700),
rsa_pss_sha384 (0x0701), rsa_pss_sha384 (0x0701),
rsa_pss_sha512 (0x0702), rsa_pss_sha512 (0x0702),
// EdDSA algorithms. /* EdDSA algorithms */
ed25519 (0x0703), ed25519 (0x0703),
ed448 (0x0704), ed448 (0x0704),
// Reserved Code Points. /* Reserved Code Points */
private_use (0xFE00..0xFFFF), private_use (0xFE00..0xFFFF),
(0xFFFF) (0xFFFF)
} SignatureScheme; } SignatureScheme;
SignatureScheme supported_signature_algorithms<2..2^16-2>; SignatureScheme supported_signature_algorithms<2..2^16-2>;
Note: This production is named "SignatureScheme" because there is Note: This production is named "SignatureScheme" because there is
already a SignatureAlgorithm type in TLS 1.2. We use the term already a SignatureAlgorithm type in TLS 1.2. We use the term
"signature algorithm" throughout the text. "signature algorithm" throughout the text.
Each SignatureScheme value lists a single signature algorithm that Each SignatureScheme value lists a single signature algorithm that
the client is willing to verify. The values are indicated in the client is willing to verify. The values are indicated in
descending order of preference. Note that a signature algorithm descending order of preference. Note that a signature algorithm
takes as input an arbitrary-length message, rather than a digest. takes as input an arbitrary-length message, rather than a digest.
Algorithms which traditionally act on a digest should be defined in Algorithms which traditionally act on a digest should be defined in
TLS to first hash the input with a specified hash function and then TLS to first hash the input with a specified hash function and then
proceed as usual. proceed as usual. The code point groups listed above have the
following meanings:
rsa_pkcs1_sha1, etc.
RSASSA-PKCS-v1_5 algorithms
Indicates a signature algorithm using RSASSA-PKCS1-v1_5 [RFC3447] Indicates a signature algorithm using RSASSA-PKCS1-v1_5 [RFC3447]
with the corresponding hash algorithm as defined in [SHS]. These with the corresponding hash algorithm as defined in [SHS]. These
values refer solely to signatures which appear in certificates values refer solely to signatures which appear in certificates
(see Section 6.3.4.1.1) and are not defined for use in signed TLS (see Section 6.3.4.1.1) and are not defined for use in signed TLS
handshake messages (see Section 4.8.1). handshake messages (see Section 4.8.1).
ecdsa_secp256r1_sha256, etc. ECDSA algorithms
Indicates a signature algorithm using ECDSA [ECDSA], the Indicates a signature algorithm using ECDSA [ECDSA], the
corresponding curve as defined in ANSI X9.62 [X962] and FIPS 186-4 corresponding curve as defined in ANSI X9.62 [X962] and FIPS 186-4
[DSS], and the corresponding hash algorithm as defined in [SHS]. [DSS], and the corresponding hash algorithm as defined in [SHS].
The signature is represented as a DER-encoded [X690] ECDSA-Sig- The signature is represented as a DER-encoded [X690] ECDSA-Sig-
Value structure. Value structure.
rsa_pss_sha256, etc. RSASSA-PSS algorithms
Indicates a signature algorithm using RSASSA-PSS [RFC3447] with Indicates a signature algorithm using RSASSA-PSS [RFC3447] with
MGF1. The digest used in the mask generation function and the MGF1. The digest used in the mask generation function and the
digest being signed are both the corresponding hash algorithm as digest being signed are both the corresponding hash algorithm as
defined in [SHS]. When used in signed TLS handshake messages (see defined in [SHS]. When used in signed TLS handshake messages (see
Section 4.8.1), the length of the salt MUST be equal to the length Section 4.8.1), the length of the salt MUST be equal to the length
of the digest output. of the digest output.
ed25519, ed448 EdDSA algorithms
Indicates a signature algorithm using EdDSA as defined in Indicates a signature algorithm using EdDSA as defined in
[I-D.irtf-cfrg-eddsa] or its successors. Note that these [I-D.irtf-cfrg-eddsa] or its successors. Note that these
correspond to the "PureEdDSA" algorithms and not the "prehash" correspond to the "PureEdDSA" algorithms and not the "prehash"
variants. variants.
The semantics of this extension are somewhat complicated because the The semantics of this extension are somewhat complicated because the
cipher suite adds additional constraints on signature algorithms. cipher suite adds additional constraints on signature algorithms.
Section 6.3.4.1.1 describes the appropriate rules. Section 6.3.4.1.1 describes the appropriate rules.
rsa_pkcs1_sha1 and dsa_sha1 SHOULD NOT be offered. Clients offering rsa_pkcs1_sha1 and dsa_sha1 SHOULD NOT be offered. Clients offering
skipping to change at page 51, line 21 skipping to change at page 51, line 24
been allocated to align with TLS 1.2's encoding. Some legacy been allocated to align with TLS 1.2's encoding. Some legacy
pairs are left unallocated. These algorithms are deprecated as of pairs are left unallocated. These algorithms are deprecated as of
TLS 1.3. They MUST NOT be offered or negotiated by any TLS 1.3. They MUST NOT be offered or negotiated by any
implementation. In particular, MD5 [SLOTH] and SHA-224 MUST NOT implementation. In particular, MD5 [SLOTH] and SHA-224 MUST NOT
be used. be used.
- ecdsa_secp256r1_sha256, etc., align with TLS 1.2's ECDSA hash/ - ecdsa_secp256r1_sha256, etc., align with TLS 1.2's ECDSA hash/
signature pairs. However, the old semantics did not constrain the signature pairs. However, the old semantics did not constrain the
signing curve. signing curve.
6.3.2.2. Negotiated Groups 6.3.2.3. Negotiated Groups
When sent by the client, the "supported_groups" extension indicates When sent by the client, the "supported_groups" extension indicates
the named groups which the client supports, ordered from most the named groups which the client supports, ordered from most
preferred to least preferred. preferred to least preferred.
Note: In versions of TLS prior to TLS 1.3, this extension was named Note: In versions of TLS prior to TLS 1.3, this extension was named
"elliptic_curves" and only contained elliptic curve groups. See "elliptic_curves" and only contained elliptic curve groups. See
[RFC4492] and [I-D.ietf-tls-negotiated-ff-dhe]. This extension was [RFC4492] and [I-D.ietf-tls-negotiated-ff-dhe]. This extension was
also used to negotiate ECDSA curves. Signature algorithms are now also used to negotiate ECDSA curves. Signature algorithms are now
negotiated independently (see Section 6.3.2.1). negotiated independently (see Section 6.3.2.2).
Clients which offer one or more (EC)DHE cipher suites MUST send at Clients which offer one or more (EC)DHE cipher suites MUST send at
least one supported NamedGroup value and servers MUST NOT negotiate least one supported NamedGroup value and servers MUST NOT negotiate
any of these cipher suites unless a supported value was provided. If any of these cipher suites unless a supported value was provided. If
this extension is not provided and no alternative cipher suite is this extension is not provided and no alternative cipher suite is
available, the server MUST close the connection with a fatal available, the server MUST close the connection with a fatal
"missing_extension" alert. (see Section 8.2) If the extension is "missing_extension" alert. (see Section 8.2) If the extension is
provided, but no compatible group is offered, the server MUST NOT provided, but no compatible group is offered, the server MUST NOT
negotiate a cipher suite of the relevant type. For instance, if a negotiate a cipher suite of the relevant type. For instance, if a
client supplies only ECDHE groups, the server MUST NOT negotiate client supplies only ECDHE groups, the server MUST NOT negotiate
finite field Diffie-Hellman. If no acceptable group can be selected finite field Diffie-Hellman. If no acceptable group can be selected
across all cipher suites, then the server MUST generate a fatal across all cipher suites, then the server MUST generate a fatal
"handshake_failure" alert. "handshake_failure" alert.
The "extension_data" field of this extension contains a The "extension_data" field of this extension contains a
"NamedGroupList" value: "NamedGroupList" value:
enum { enum {
// Elliptic Curve Groups (ECDHE). /* Elliptic Curve Groups (ECDHE) */
secp256r1 (23), secp384r1 (24), secp521r1 (25), secp256r1 (23), secp384r1 (24), secp521r1 (25),
x25519 (29), x448 (30), x25519 (29), x448 (30),
// Finite Field Groups (DHE). /* Finite Field Groups (DHE) */
ffdhe2048 (256), ffdhe3072 (257), ffdhe4096 (258), ffdhe2048 (256), ffdhe3072 (257), ffdhe4096 (258),
ffdhe6144 (259), ffdhe8192 (260), ffdhe6144 (259), ffdhe8192 (260),
// Reserved Code Points. /* Reserved Code Points */
ffdhe_private_use (0x01FC..0x01FF), ffdhe_private_use (0x01FC..0x01FF),
ecdhe_private_use (0xFE00..0xFEFF), ecdhe_private_use (0xFE00..0xFEFF),
(0xFFFF) (0xFFFF)
} NamedGroup; } NamedGroup;
struct { struct {
NamedGroup named_group_list<1..2^16-1>; NamedGroup named_group_list<1..2^16-1>;
} NamedGroupList; } NamedGroupList;
secp256r1, etc. Elliptic Curve Groups (ECDHE)
Indicates support of the corresponding named curve. Note that Indicates support of the corresponding named curve. Note that
some curves are also recommended in ANSI X9.62 [X962] and FIPS some curves are also recommended in ANSI X9.62 [X962] and FIPS
186-4 [DSS]. Others are recommended in [I-D.irtf-cfrg-curves]. 186-4 [DSS]. Others are recommended in [RFC7748]. Values 0xFE00
Values 0xFE00 through 0xFEFF are reserved for private use. through 0xFEFF are reserved for private use.
ffdhe2048, etc. Finite Field Groups (DHE)
Indicates support of the corresponding finite field group, defined Indicates support of the corresponding finite field group, defined
in [I-D.ietf-tls-negotiated-ff-dhe]. Values 0x01FC through 0x01FF in [I-D.ietf-tls-negotiated-ff-dhe]. Values 0x01FC through 0x01FF
are reserved for private use. are reserved for private use.
Items in named_group_list are ordered according to the client's Items in named_group_list are ordered according to the client's
preferences (most preferred choice first). preferences (most preferred choice first).
As an example, a client that only supports secp256r1 (aka NIST P-256; As of TLS 1.3, servers are permitted to send the "supported_groups"
value 23 = 0x0017) and secp384r1 (aka NIST P-384; value 24 = 0x0018) extension to the client. If the server has a group it prefers to the
and prefers to use secp256r1 would include a TLS extension consisting ones in the "key_share" extension but is still willing to accept the
of the following octets. Note that the first two octets indicate the ClientHello, it SHOULD send "supported_groups" to update the client's
extension type ("supported_groups" extension): view of its preferences. Clients MUST NOT act upon any information
found in "supported_groups" prior to successful completion of the
00 0A 00 06 00 04 00 17 00 18 handshake, but MAY use the information learned from a successfully
completed handshake to change what groups they offer to a server in
subsequent connections.
[[TODO: IANA Considerations.]] [[TODO: IANA Considerations.]]
6.3.2.3. Key Share 6.3.2.4. Key Share
The "key_share" extension contains the endpoint's cryptographic The "key_share" extension contains the endpoint's cryptographic
parameters for non-PSK key establishment methods (currently DHE or parameters for non-PSK key establishment methods (currently DHE or
ECDHE). ECDHE).
Clients which offer one or more (EC)DHE cipher suites MUST send this Clients which offer one or more (EC)DHE cipher suites MUST send this
extension and SHOULD send at least one supported KeyShareEntry value. extension and SHOULD send at least one supported KeyShareEntry value.
Servers MUST NOT negotiate any of these cipher suites unless a Servers MUST NOT negotiate any of these cipher suites unless a
supported value was provided. If this extension is not provided in a supported value was provided. If this extension is not provided in a
ServerHello or ClientHello, and the peer is offering (EC)DHE cipher ServerHello or ClientHello, and the peer is offering (EC)DHE cipher
skipping to change at page 53, line 23 skipping to change at page 53, line 29
the server at the cost of an additional round trip. (see the server at the cost of an additional round trip. (see
Section 6.3.1.3) Section 6.3.1.3)
struct { struct {
NamedGroup group; NamedGroup group;
opaque key_exchange<1..2^16-1>; opaque key_exchange<1..2^16-1>;
} KeyShareEntry; } KeyShareEntry;
group group
The named group for the key being exchanged. Finite Field Diffie- The named group for the key being exchanged. Finite Field Diffie-
Hellman [DH] parameters are described in Section 6.3.2.3.1; Hellman [DH] parameters are described in Section 6.3.2.4.1;
Elliptic Curve Diffie-Hellman parameters are described in Elliptic Curve Diffie-Hellman parameters are described in
Section 6.3.2.3.2. Section 6.3.2.4.2.
key_exchange key_exchange
Key exchange information. The contents of this field are Key exchange information. The contents of this field are
determined by the specified group and its corresponding determined by the specified group and its corresponding
definition. Endpoints MUST NOT send empty or otherwise invalid definition. Endpoints MUST NOT send empty or otherwise invalid
key_exchange values for any reason. key_exchange values for any reason.
The "extension_data" field of this extension contains a "KeyShare" The "extension_data" field of this extension contains a "KeyShare"
value: value:
struct { struct {
select (role) { select (role) {
case client: case client:
KeyShareEntry client_shares<4..2^16-1>; KeyShareEntry client_shares<0..2^16-1>;
case server: case server:
KeyShareEntry server_share; KeyShareEntry server_share;
} }
} KeyShare; } KeyShare;
client_shares client_shares
A list of offered KeyShareEntry values in descending order of A list of offered KeyShareEntry values in descending order of
client preference. This vector MAY be empty if the client is client preference. This vector MAY be empty if the client is
requesting a HelloRetryRequest. The ordering of values here requesting a HelloRetryRequest. The ordering of values here
skipping to change at page 54, line 14 skipping to change at page 54, line 19
server_share server_share
A single KeyShareEntry value for the negotiated cipher suite. A single KeyShareEntry value for the negotiated cipher suite.
Servers offer exactly one KeyShareEntry value, which corresponds to Servers offer exactly one KeyShareEntry value, which corresponds to
the key exchange used for the negotiated cipher suite. the key exchange used for the negotiated cipher suite.
Clients offer an arbitrary number of KeyShareEntry values, each Clients offer an arbitrary number of KeyShareEntry values, each
representing a single set of key exchange parameters. For instance, representing a single set of key exchange parameters. For instance,
a client might offer shares for several elliptic curves or multiple a client might offer shares for several elliptic curves or multiple
integer DH groups. The key_exchange values for each KeyShareEntry FFDHE groups. The key_exchange values for each KeyShareEntry MUST by
MUST by generated independently. Clients MUST NOT offer multiple generated independently. Clients MUST NOT offer multiple
KeyShareEntry values for the same parameters. Clients and servers KeyShareEntry values for the same group and servers receiving
MUST NOT offer any KeyShareEntry values for groups not listed in the multiple KeyShareEntry values for the same group MUST abort the
client's "supported_groups" extension. Servers MUST NOT offer a connection with a fatal "illegal_parameter" alert. Clients and
KeyShareEntry value for a group not offered by the client in its servers MUST NOT offer or accept any KeyShareEntry values for groups
corresponding KeyShare. Implementations receiving any KeyShare not listed in the client's "supported_groups" extension. Servers
containing any of these prohibited values MUST abort the connection MUST NOT offer a KeyShareEntry value for a group not offered by the
with a fatal "illegal_parameter" alert. client in its corresponding KeyShare.
If the server selects an (EC)DHE cipher suite and no mutually If the server selects an (EC)DHE cipher suite and no mutually
supported group is available between the two endpoints' KeyShare supported group is available between the two endpoints' KeyShare
offers, yet there is a mutually supported group that can be found via offers, yet there is a mutually supported group that can be found via
the "supported_groups" extension, then the server MUST reply with a the "supported_groups" extension, then the server MUST reply with a
HelloRetryRequest. If there is no mutually supported group at all, HelloRetryRequest. If there is no mutually supported group at all,
the server MUST NOT negotiate an (EC)DHE cipher suite. the server MUST NOT negotiate an (EC)DHE cipher suite.
[[TODO: Recommendation about what the client offers. Presumably [[TODO: Recommendation about what the client offers. Presumably
which integer DH groups and which curves.]] which integer DH groups and which curves.]]
6.3.2.3.1. Diffie-Hellman Parameters 6.3.2.4.1. Diffie-Hellman Parameters
Diffie-Hellman [DH] parameters for both clients and servers are Diffie-Hellman [DH] parameters for both clients and servers are
encoded in the opaque key_exchange field of a KeyShareEntry in a encoded in the opaque key_exchange field of a KeyShareEntry in a
KeyShare structure. The opaque value contains the Diffie-Hellman KeyShare structure. The opaque value contains the Diffie-Hellman
public value (dh_Y = g^X mod p), encoded as a big-endian integer. public value (Y = g^X mod p), encoded as a big-endian integer, padded
with zeros to the size of p.
opaque dh_Y<1..2^16-1>; Note: For a given Diffie-Hellman group, the padding results in all
public keys having the same length.
6.3.2.3.2. ECDHE Parameters 6.3.2.4.2. ECDHE Parameters
ECDHE parameters for both clients and servers are encoded in the the ECDHE parameters for both clients and servers are encoded in the the
opaque key_exchange field of a KeyShareEntry in a KeyShare structure. opaque key_exchange field of a KeyShareEntry in a KeyShare structure.
The opaque value conveys the Elliptic Curve Diffie-Hellman public
value (ecdh_Y) represented as a byte string ECPoint.point.
opaque point <1..2^8-1>;
point For secp256r1, secp384r1 and secp521r1, the contents are the byte
For secp256r1, secp384r1 and secp521r1, this is the byte string string representation of an elliptic curve public value following the
representation of an elliptic curve point following the conversion conversion routine in Section 4.3.6 of ANSI X9.62 [X962].
routine in Section 4.3.6 of ANSI X9.62 [X962]. For x25519 and
x448, this is raw opaque octet-string representation of point (in
the format those functions use), 32 octets for x25519 and 56
octets for x448.
Although X9.62 supports multiple point formats, any given curve MUST Although X9.62 supports multiple point formats, any given curve MUST
specify only a single point format. All curves currently specified specify only a single point format. All curves currently specified
in this document MUST only be used with the uncompressed point format in this document MUST only be used with the uncompressed point format
(the format for all ECDH functions is considered uncompressed). (the format for all ECDH functions is considered uncompressed).
For x25519 and x448, the contents are the byte string inputs and
outputs of the corresponding functions defined in [RFC7748], 32 bytes
for x25519 and 56 bytes for x448.
Note: Versions of TLS prior to 1.3 permitted point negotiation; TLS Note: Versions of TLS prior to 1.3 permitted point negotiation; TLS
1.3 removes this feature in favor of a single point format for each 1.3 removes this feature in favor of a single point format for each
curve. curve.
6.3.2.4. Pre-Shared Key Extension 6.3.2.5. Pre-Shared Key Extension
The "pre_shared_key" extension is used to indicate the identity of The "pre_shared_key" extension is used to indicate the identity of
the pre-shared key to be used with a given handshake in association the pre-shared key to be used with a given handshake in association
with a PSK or (EC)DHE-PSK cipher suite (see [RFC4279] for with a PSK or (EC)DHE-PSK cipher suite (see [RFC4279] for
background). background).
Clients which offer one or more PSK cipher suites MUST send at least Clients which offer one or more PSK cipher suites MUST send at least
one supported psk_identity value and servers MUST NOT negotiate any one supported psk_identity value and servers MUST NOT negotiate any
of these cipher suites unless a supported value was provided. If of these cipher suites unless a supported value was provided. If
this extension is not provided and no alternative cipher suite is this extension is not provided and no alternative cipher suite is
skipping to change at page 55, line 45 skipping to change at page 56, line 13
"PreSharedKeyExtension" value: "PreSharedKeyExtension" value:
opaque psk_identity<0..2^16-1>; opaque psk_identity<0..2^16-1>;
struct { struct {
select (Role) { select (Role) {
case client: case client:
psk_identity identities<2..2^16-1>; psk_identity identities<2..2^16-1>;
case server: case server:
psk_identity identity; uint16 selected_identity;
} }
} PreSharedKeyExtension; } PreSharedKeyExtension;
identity identities
An opaque label for the pre-shared key. A list of the identities (labels for keys) that the client is
willing to negotiate with the server.
selected_identity
The server's chosen identity expressed as a (0-based) index into
the identies in the client's list.
If no suitable identity is provided, the server MUST NOT negotiate a If no suitable identity is provided, the server MUST NOT negotiate a
PSK cipher suite and MAY respond with an "unknown_psk_identity" alert PSK cipher suite and MAY respond with an "unknown_psk_identity" alert
message. Sending this alert is OPTIONAL; servers MAY instead choose message. Sending this alert is OPTIONAL; servers MAY instead choose
to send a "decrypt_error" alert to merely indicate an invalid PSK to send a "decrypt_error" alert to merely indicate an invalid PSK
identity or instead negotiate use of a non-PSK cipher suite, if identity or instead negotiate use of a non-PSK cipher suite, if
available. available.
If the server selects a PSK cipher suite, it MUST send a If the server selects a PSK cipher suite, it MUST send a
"pre_shared_key" extension with the identity that it selected. The "pre_shared_key" extension with the identity that it selected. The
client MUST verify that the server has selected one of the identities client MUST verify that the server's selected_identity is within the
that the client supplied. If any other identity is returned, the range supplied by the client. If any other value is returned, the
client MUST generate a fatal "unknown_psk_identity" alert and close client MUST generate a fatal "unknown_psk_identity" alert and close
the connection. the connection.
6.3.2.5. Early Data Indication 6.3.2.6. OCSP Status Extensions
In cases where TLS clients have previously interacted with the server [RFC6066] and [RFC6961] provide extensions to negotiate the server
and the server has supplied a ServerConfiguration (Section 6.3.3.3), sending OCSP responses to the client. In TLS 1.2 and below, the
the client can send application data and its Certificate/ server sends an empty extension to indicate negotiation of this
CertificateVerify messages (if client authentication is required). extension and the OCSP information is carried in a CertificateStatus
If the client opts to do so, it MUST supply an "early_data" message. In TLS 1.3, the server's OCSP information is carried in an
extension in EncryptedExtensions. Specifically: The body of the
"status_request" or "status_request_v2" extension from the server
MUST be a CertificateStatus structure as defined in [RFC6066] and
[RFC6961] respectively.
Note: this means that the certificate status appears prior to the
certificates it applies to. This is slightly anomalous but matches
the existing behavior for SignedCertificateTimestamps [RFC6962], and
is more easily extensible in the handshake state machine.
6.3.2.7. Early Data Indication
When PSK resumption is used, the client can send application data in
its first flight of messages. If the client opts to do so, it MUST
supply an "early_data" extension as well as the "pre_shared_key"
extension. extension.
The "extension_data" field of this extension contains an The "extension_data" field of this extension contains an
"EarlyDataIndication" value: "EarlyDataIndication" value:
struct { struct {
select (Role) { select (Role) {
case client: case client:
opaque configuration_id<1..2^16-1>;
CipherSuite cipher_suite;
Extension extensions<0..2^16-1>;
opaque context<0..255>; opaque context<0..255>;
case server: case server:
struct {}; struct {};
} }
} EarlyDataIndication; } EarlyDataIndication;
configuration_id
The label for the configuration in question.
cipher_suite
The cipher suite which the client is using to encrypt the early
data.
extensions
The extensions required to define the cryptographic configuration
for the clients early data (see below for details).
context context
An optional context value that can be used for anti-replay (see An optional context value that can be used for anti-replay (see
below). below).
The client specifies the cryptographic configuration for the 0-RTT All of the parameters for the 0-RTT data (symmetric cipher suite,
data using the "configuration_id", "cipher_suite", and "extensions" ALPN, etc.) MUST be those which were negotiated in the connection
values. For configurations received in-band (in a previous TLS which established the PSK. The PSK used to encrypt the early data
connection) the client MUST: MUST be the first PSK listed in the client's "pre_shared_key"
extension.
- Send the same cryptographic determining parameters
(Section Section 6.3.2.5.1) with the previous connection. If a
0-RTT handshake is being used with a PSK that was negotiated via a
non-PSK handshake, then the client MUST use the same symmetric
cipher parameters as were negotiated on that handshake but with a
PSK cipher suite.
- Indicate the same parameters as the server indicated in that
connection.
0-RTT messages sent in the first flight have the same content types 0-RTT messages sent in the first flight have the same content types
as their corresponding messages sent in other flights (handshake, as their corresponding messages sent in other flights (handshake,
application_data, and alert respectively) but are protected under application_data, and alert respectively) but are protected under
different keys. After all the 0-RTT application data messages (if different keys. After all the 0-RTT application data messages (if
any) have been sent, a "end_of_early_data" alert of type "warning" is any) have been sent, a "end_of_early_data" alert of type "warning" is
sent to indicate the end of the flight. Clients which do 0-RTT MUST sent to indicate the end of the flight. 0-RTT MUST always be
always send "end_of_early_data" even if the ServerConfiguration followed by an "end_of_early_data" alert.
indicates that no application data is allowed (EarlyDataType of
"client_authentication"), though in that case it MUST NOT send any
non-empty data records (i.e., those which consist of anything other
than padding).
A server which receives an "early_data" extension can behave in one A server which receives an "early_data" extension can behave in one
of two ways: of two ways:
- Ignore the extension and return no response. This indicates that - Ignore the extension and return no response. This indicates that
the server has ignored any early data and an ordinary 1-RTT the server has ignored any early data and an ordinary 1-RTT
handshake is required. handshake is required.
- Return an empty extension, indicating that it intends to process - Return an empty extension, indicating that it intends to process
the early data. It is not possible for the server to accept only the early data. It is not possible for the server to accept only
a subset of the early data messages. a subset of the early data messages.
Prior to accepting the "early_data" extension, the server MUST [[OPEN ISSUE: are the rules below correct? https://github.com/tlswg/
perform the following checks: tls13-spec/issues/451]] Prior to accepting the "early_data"
extension, the server MUST validate that the session ticket
parameters are consistent with its current configuration. It MUST
also validate that the extensions negotiated in the previous
connection are identical to those being negotiated in the
ServerHello, with the exception of the following extensions:
- The configuration_id matches a known server configuration. - The use of "signed_certificate_timestamp" [RFC6962] MUST be
identical but the server's SCT extension value may differ.
- The client's cryptographic determining parameters match the - The "padding" extension [RFC7685] MUST be ignored for this
parameters that the server has negotiated based on the rest of the purpose.
ClientHello. If (EC)DHE is selected, this includes verifying that
(1) the ClientHello contains a key from the same group that is - The values of "key_share", "pre_shared_key", and "early_data",
indicated by the server configuration and (2) that the server has which MUST be as defined in this document.
negotiated that group and will therefore include a share from that
group in its own "key_share" extension. In addition, it MUST validate that the ticket_age is within a small
tolerance of the time since the ticket was issued (see
Section 6.3.2.7.2).
If any of these checks fail, the server MUST NOT respond with the If any of these checks fail, the server MUST NOT respond with the
extension and must discard all the remaining first flight data (thus extension and must discard all the remaining first flight data (thus
falling back to 1-RTT). If the client attempts a 0-RTT handshake but falling back to 1-RTT). If the client attempts a 0-RTT handshake but
the server rejects it, it will generally not have the 0-RTT record the server rejects it, it will generally not have the 0-RTT record
protection keys and will instead trial decrypt each record with the protection keys and must instead trial decrypt each record with the
1-RTT handshake keys until it finds one that decrypts properly, and 1-RTT handshake keys until it finds one that decrypts properly, and
then pick up the handshake from that point. then pick up the handshake from that point.
If the server chooses to accept the "early_data" extension, then it If the server chooses to accept the "early_data" extension, then it
MUST comply with the same error handling requirements specified for MUST comply with the same error handling requirements specified for
all records when processing early data records. Specifically, all records when processing early data records. Specifically,
decryption failure of any 0-RTT record following an accepted decryption failure of any 0-RTT record following an accepted
"early_data" extension MUST produce a fatal "bad_record_mac" alert as "early_data" extension MUST produce a fatal "bad_record_mac" alert as
per Section 5.2.2. per Section 5.2.2. Implementations SHOULD determine the security
parameters for the 1-RTT phase of the connection entirely before
processing the EncryptedExtensions and Finished, using those values
solely to determine whether to accept or reject 0-RTT data.
[[TODO: How does the client behave if the indication is rejected.]] [[TODO: How does the client behave if the indication is rejected.]]
[[OPEN ISSUE: This just specifies the signaling for 0-RTT but not the 6.3.2.7.1. Processing Order
the 0-RTT cryptographic transforms, including:
- What is in the handshake hash (including potentially some
speculative data from the server).
- What is signed in the client's CertificateVerify. Clients are permitted to "stream" 0-RTT data until they receive the
server's Finished, only then sending the "end_of_early_data" alert.
In order to avoid deadlock, when accepting "early_data", servers MUST
process the client's Finished and then immediately send the
ServerHello, rather than waiting for the client's "end_of_early_data"
alert.
- Whether we really want the Finished to not include the server's 6.3.2.7.2. Replay Properties
data at all.
What's here now needs a lot of cleanup before it is clear and As noted in Section 6.2.3, TLS provides only a limited inter-
correct.]] connection mechanism for replay protection for data sent by the
client in the first flight.
6.3.2.5.1. Cryptographic Determining Parameters The "ticket_age" extension sent by the client SHOULD be used by
servers to limit the time over which the first flight might be
replayed. A server can store the time at which it sends a server
configuration to a client, or encode the time in a ticket. Then,
each time it receives an early_data extension, it can check to see if
the value used by the client matches its expectations.
In order to allow the server to decrypt 0-RTT data, the client needs The "ticket_age" value provided by the client will be shorter than
to provide enough information to allow the server to decrypt the the actual time elapsed on the server by a single round trip time.
traffic without negotiation. This is accomplished by having the This difference is comprised of the delay in sending the
client indicate the "cryptographic determining parameters" in its NewSessionTicket message to the client, plus the time taken to send
ClientHello, which are necessary to decrypt the client's packets the ClientHello to the server. For this reason, a server SHOULD
(i.e., those present in the ServerHello). This includes the measure the round trip time prior to sending the NewSessionTicket
following values: message and account for that in the value it saves.
- The cipher suite identifier. There are several potential sources of error that make an exact
measurement of time difficult. Variations in client and server
clocks are likely to be minimal, outside of gross time corrections.
Network propagation delays are most likely causes of a mismatch in
legitimate values for elapsed time. Both the NewSessionTicket and
ClientHello messages might be retransmitted and therefore delayed,
which might be hidden by TCP.
- If (EC)DHE is being used, the server's version of the "key_share" A small allowance for errors in clocks and variations in measurements
extension. is advisable. However, any allowance also increases the opportunity
for replay. In this case, it is better to reject early data than to
risk greater exposure to replay attacks.
- If PSK is being used, the server's version of the "pre_shared_key" 6.3.2.8. Ticket Age
extension (indicating the PSK the client is using).
6.3.2.5.2. Replay Properties struct {
uint32 ticket_age;
} TicketAge;
As noted in Section 6.2.2, TLS does not provide any inter-connection When the client sends the "early_data" extension, it MUST also send a
mechanism for replay protection for data sent by the client in the "ticket_age" extension in its EncryptedExtensions block. This value
first flight. As a special case, implementations where the server contains the time elapsed since the client learned about the server
configuration, is delivered out of band (as has been proposed for configuration that it is using, in milliseconds. This value can be
DTLS-SRTP [RFC5763]), MAY use a unique server configuration used by the server to limit the time over which early data can be
identifier for each connection, thus preventing replay. replayed. Note: because ticket lifetimes are restricted to a week,
Implementations are responsible for ensuring uniqueness of the 32 bits is enough to represent any plausible age, even in
identifier in this case. milliseconds.
6.3.3. Server Parameters 6.3.3. Server Parameters
6.3.3.1. Encrypted Extensions 6.3.3.1. Encrypted Extensions
When this message will be sent: When this message will be sent:
The EncryptedExtensions message MUST be sent immediately after the In all handshakes, the server MUST send the EncryptedExtensions
ServerHello message. This is the first message that is encrypted message immediately after the ServerHello message. This is the
under keys derived from ES. first message that is encrypted under keys derived from
handshake_traffic_secret. If the client indicates "early_data" in
its ClientHello, it MUST also send EncryptedExtensions immediately
following the ClientHello and immediately prior to the Finished.
Meaning of this message: Meaning of this message:
The EncryptedExtensions message simply contains any extensions The EncryptedExtensions message contains any extensions which
which should be protected, i.e., any which are not needed to should be protected, i.e., any which are not needed to establish
establish the cryptographic context. The same extension types the cryptographic context.
MUST NOT appear in both the ServerHello and EncryptedExtensions.
If the same extension appears in both locations, the client MUST The same extension types MUST NOT appear in both the ServerHello and
rely only on the value in the EncryptedExtensions block. All EncryptedExtensions. If the same extension appears in both
server-sent extensions other than those explicitly listed in locations, the client MUST rely only on the value in the
Section 6.3.1.2 or designated in the IANA registry MUST only EncryptedExtensions block. All server-sent extensions other than
appear in EncryptedExtensions. Extensions which are designated to those explicitly listed in Section 6.3.1.2 or designated in the IANA
appear in ServerHello MUST NOT appear in EncryptedExtensions. registry MUST only appear in EncryptedExtensions. Extensions which
Clients MUST check EncryptedExtensions for the presence of any are designated to appear in ServerHello MUST NOT appear in
forbidden extensions and if any are found MUST terminate the EncryptedExtensions. Clients MUST check EncryptedExtensions for the
handshake with a "illegal_parameter" alert. presence of any forbidden extensions and if any are found MUST
terminate the handshake with an "illegal_parameter" alert.
The client's EncryptedExtensions apply only to the early data with
which they appear. Servers MUST NOT use them to negotiate the rest
of the handshake. Only those extensions explicitly designated as
being included in 0-RTT Encrypted Extensions in the IANA registry can
be sent in the client's EncryptedExtensions.
Structure of this message: Structure of this message:
struct { struct {
Extension extensions<0..2^16-1>; Extension extensions<0..2^16-1>;
} EncryptedExtensions; } EncryptedExtensions;
extensions extensions
A list of extensions. A list of extensions.
skipping to change at page 62, line 8 skipping to change at page 63, line 5
also found in the Extended Key Usage certificate extension. also found in the Extended Key Usage certificate extension.
The special anyExtendedKeyUsage OID MUST NOT be used in the The special anyExtendedKeyUsage OID MUST NOT be used in the
request. request.
Separate specifications may define matching rules for other Separate specifications may define matching rules for other
certificate extensions. certificate extensions.
Note: It is a fatal "handshake_failure" alert for an anonymous server Note: It is a fatal "handshake_failure" alert for an anonymous server
to request client authentication. to request client authentication.
6.3.3.3. Server Configuration
When this message will be sent:
This message is used to provide a server configuration which the
client can use in the future to skip handshake negotiation and
(optionally) to allow 0-RTT handshakes. The ServerConfiguration
message is sent as the last message before the CertificateVerify.
Structure of this Message:
enum { (65535) } ConfigurationExtensionType;
enum { client_authentication(1), early_data(2),
client_authentication_and_data(3), (255) } EarlyDataType;
struct {
ConfigurationExtensionType extension_type;
opaque extension_data<0..2^16-1>;
} ConfigurationExtension;
struct {
opaque configuration_id<1..2^16-1>;
uint32 expiration_date;
KeyShareEntry static_key_share;
EarlyDataType early_data_type;
ConfigurationExtension extensions<0..2^16-1>;
} ServerConfiguration;
configuration_id
The configuration identifier to be used in 0-RTT mode.
expiration_date
The last time when this configuration is expected to be valid (in
seconds since the Unix epoch). Servers MUST NOT use any value
more than 604800 seconds (7 days) in the future. Clients MUST NOT
cache configurations for longer than 7 days, regardless of the
expiration_date. [[OPEN ISSUE: Is this the right value? The idea
is just to minimize exposure.]]
static_key_share
The long-term DH key that is being established for this
configuration.
early_data_type
The type of 0-RTT handshake that this configuration is to be used
for (see Section 6.3.2.5). If "client_authentication" or
"client_authentication_and_data", then the client MUST select the
certificate for future handshakes based on the CertificateRequest
parameters supplied in this handshake. The server MUST NOT send
either of these two options unless it also requested a certificate
on this handshake. [[OPEN ISSUE: Should we relax this?]]
extensions
This field is a placeholder for future extensions to the
ServerConfiguration format.
The semantics of this message are to establish a shared state between
the client and server for use with the "early_data" extension with
the key specified in "static_key_share" and with the handshake
parameters negotiated by this handshake.
When the ServerConfiguration message is sent, the server MUST also
send a Certificate message and a CertificateVerify message, even if
the "early_data" extension was used for this handshake, thus
requiring a signature over the configuration before it can be used by
the client. Clients MUST NOT rely on the ServerConfiguration message
until successfully receiving and processing the server's Certificate,
CertificateVerify, and Finished. If there is a failure in processing
those messages, the client MUST discard the ServerConfiguration.
6.3.4. Authentication Messages 6.3.4. Authentication Messages
As discussed in Section 6.2, TLS uses a common set of messages for As discussed in Section 6.2, TLS uses a common set of messages for
authentication, key confirmation, and handshake integrity: authentication, key confirmation, and handshake integrity:
Certificate, CertificateVerify, and Finished. These messages are Certificate, CertificateVerify, and Finished. These messages are
always sent as the last messages in their handshake flight. The always sent as the last messages in their handshake flight. The
Certificate and CertificateVerify messages are only sent under Certificate and CertificateVerify messages are only sent under
certain circumstances, as defined below. The Finished message is certain circumstances, as defined below. The Finished message is
always sent as part of the Authentication block. always sent as part of the Authentication block.
The computations for the Authentication messages all uniformly take The computations for the Authentication messages all uniformly take
the following inputs: the following inputs:
- The certificate and signing key to be used. - The certificate and signing key to be used.
- A Handshake Context based on the handshake hash (see - A Handshake Context based on the hash of the handshake messages
Section 7.3.1).
- A base key to be used to compute a MAC key. - A base key to be used to compute a MAC key.
Based on these inputs, the messages then contain: Based on these inputs, the messages then contain:
Certificate Certificate
The certificate to be used for authentication and any supporting The certificate to be used for authentication and any supporting
certificates in the chain. certificates in the chain. Note that certificate-based client
authentication is not available in the 0-RTT case.
CertificateVerify CertificateVerify
A signature over the hash of Handshake Context + Certificate. A signature over the value Hash(Handshake Context + Certificate) +
Hash(resumption_context) See Section 6.3.5.1 for the definition of
resumption_context.
Finished Finished
A MAC over the hash of Handshake Context + Certificate + A MAC over the value Hash(Handshake Context + Certificate +
CertificateVerify using a MAC key derived from the base key. CertificateVerify) + Hash(resumption_context) using a MAC key
derived from the base key.
Because the CertificateVerify signs the Handshake Context + Because the CertificateVerify signs the Handshake Context +
Certificate and the Finished MACs the Handshake Context + Certificate Certificate and the Finished MACs the Handshake Context + Certificate
+ CertificateVerify, this is mostly equivalent to keeping a running + CertificateVerify, this is mostly equivalent to keeping a running
hash of the handshake messages (exactly so in the pure 1-RTT cases). hash of the handshake messages (exactly so in the pure 1-RTT cases).
Note, however, that subsequent post-handshake authentications do not Note, however, that subsequent post-handshake authentications do not
include each other, just the messages through the end of the main include each other, just the messages through the end of the main
handshake. handshake.
The following table defines the Handshake Context and MAC Key for The following table defines the Handshake Context and MAC Base Key
each scenario: for each scenario:
+----------------+-----------------------------------------+--------+
| Mode | Handshake Context | Base |
| | | Key |
+----------------+-----------------------------------------+--------+
| 0-RTT | ClientHello + ServerConfiguration + | xSS |
| | Server Certificate + CertificateRequest | |
| | (where ServerConfiguration, etc. are | |
| | from the previous handshake) | |
| | | |
| 1-RTT (Server) | ClientHello ... ServerConfiguration | master |
| | | secret |
| | | |
| 1-RTT (Client) | ClientHello ... ServerFinished | master |
| | | secret |
| | | |
| Post-Handshake | ClientHello ... ClientFinished + | master |
| | CertificateRequest | secret |
+----------------+-----------------------------------------+--------+
Note 1: The ServerConfiguration, CertificateRequest, and Server +------------+--------------------------------+---------------------+
Certificate in the 0-RTT case are the messages from the handshake | Mode | Handshake Context | Base Key |
where the ServerConfiguration was established. +------------+--------------------------------+---------------------+
| 0-RTT | ClientHello | early_traffic_secre |
| | | t |
| | | |
| 1-RTT | ClientHello ... later of Encry | handshake_traffic_s |
| (Server) | ptedExtensions/CertificateRequ | ecret |
| | est | |
| | | |
| 1-RTT | ClientHello ... ServerFinished | handshake_traffic_s |
| (Client) | | ecret |
| | | |
| Post- | ClientHello ... ClientFinished | traffic_secret_0 |
| Handshake | + CertificateRequest | |
+------------+--------------------------------+---------------------+
Note 2: The Handshake Context for the last three rows does not Note: The Handshake Context for the last three rows does not include
include any 0-RTT handshake messages, regardless of whether 0-RTT any 0-RTT handshake messages, regardless of whether 0-RTT is used.
is used.
6.3.4.1. Certificate 6.3.4.1. Certificate
When this message will be sent: When this message will be sent:
The server MUST send a Certificate message whenever the agreed- The server MUST send a Certificate message whenever the agreed-
upon key exchange method uses certificates for authentication upon key exchange method uses certificates for authentication
(this includes all key exchange methods defined in this document (this includes all key exchange methods defined in this document
except PSK). except PSK).
The client MUST send a Certificate message whenever the server has The client MUST send a Certificate message if and only if server
requested client authentication via a CertificateRequest message has requested client authentication via a CertificateRequest
(Section 6.3.3.2) or when the EarlyDataType provided with the message (Section 6.3.3.2). If the server requests client
server configuration indicates a need for client authentication. authentication but no suitable certificate is available, the
This message is only sent if the server requests a certificate via client MUST send a Certificate message containing no certificates
one of these mechanisms. If no suitable certificate is available, (i.e., with the "certificate_list" field having length 0).
the client MUST send a Certificate message containing no
certificates (i.e., with the "certificate_list" field having
length 0).
Meaning of this message: Meaning of this message:
This message conveys the endpoint's certificate chain to the peer. This message conveys the endpoint's certificate chain to the peer.
The certificate MUST be appropriate for the negotiated cipher The certificate MUST be appropriate for the negotiated cipher
suite's key exchange algorithm and any negotiated extensions. suite's key exchange algorithm and any negotiated extensions.
Structure of this message: Structure of this message:
skipping to change at page 67, line 8 skipping to change at page 66, line 26
"signature_algorithms" extension. "signature_algorithms" extension.
- The "server_name" and "trusted_ca_keys" extensions [RFC6066] are - The "server_name" and "trusted_ca_keys" extensions [RFC6066] are
used to guide certificate selection. As servers MAY require the used to guide certificate selection. As servers MAY require the
presence of the "server_name" extension, clients SHOULD send this presence of the "server_name" extension, clients SHOULD send this
extension. extension.
All certificates provided by the server MUST be signed by a signature All certificates provided by the server MUST be signed by a signature
algorithm that appears in the "signature_algorithms" extension algorithm that appears in the "signature_algorithms" extension
provided by the client, if they are able to provide such a chain (see provided by the client, if they are able to provide such a chain (see
Section 6.3.2.1). Certificates that are self-signed or certificates Section 6.3.2.2). Certificates that are self-signed or certificates
that are expected to be trust anchors are not validated as part of that are expected to be trust anchors are not validated as part of
the chain and therefore MAY be signed with any algorithm. the chain and therefore MAY be signed with any algorithm.
If the server cannot produce a certificate chain that is signed only If the server cannot produce a certificate chain that is signed only
via the indicated supported algorithms, then it SHOULD continue the via the indicated supported algorithms, then it SHOULD continue the
handshake by sending the client a certificate chain of its choice handshake by sending the client a certificate chain of its choice
that may include algorithms that are not known to be supported by the that may include algorithms that are not known to be supported by the
client. This fallback chain MAY use the deprecated SHA-1 hash client. This fallback chain MAY use the deprecated SHA-1 hash
algorithm only if the "signature_algorithms" extension provided by algorithm only if the "signature_algorithms" extension provided by
the client permits it. If the client cannot construct an acceptable the client permits it. If the client cannot construct an acceptable
skipping to change at page 68, line 15 skipping to change at page 67, line 38
Note that, as with the server certificate, there are certificates Note that, as with the server certificate, there are certificates
that use algorithm combinations that cannot be currently used with that use algorithm combinations that cannot be currently used with
TLS. TLS.
6.3.4.1.3. Receiving a Certificate Message 6.3.4.1.3. Receiving a Certificate Message
In general, detailed certificate validation procedures are out of In general, detailed certificate validation procedures are out of
scope for TLS (see [RFC5280]). This section provides TLS-specific scope for TLS (see [RFC5280]). This section provides TLS-specific
requirements. requirements.
If server supplies an empty Certificate message, the client MUST If the server supplies an empty Certificate message, the client MUST
terminate the handshake with a fatal "decode_error" alert. terminate the handshake with a fatal "decode_error" alert.
If the client does not send any certificates, the server MAY at its If the client does not send any certificates, the server MAY at its
discretion either continue the handshake without client discretion either continue the handshake without client
authentication, or respond with a fatal "handshake_failure" alert. authentication, or respond with a fatal "handshake_failure" alert.
Also, if some aspect of the certificate chain was unacceptable (e.g., Also, if some aspect of the certificate chain was unacceptable (e.g.,
it was not signed by a known, trusted CA), the server MAY at its it was not signed by a known, trusted CA), the server MAY at its
discretion either continue the handshake (considering the client discretion either continue the handshake (considering the client
unauthenticated) or send a fatal alert. unauthenticated) or send a fatal alert.
skipping to change at page 68, line 40 skipping to change at page 68, line 15
SHA-1 is deprecated and therefore NOT RECOMMENDED. Endpoints that SHA-1 is deprecated and therefore NOT RECOMMENDED. Endpoints that
reject certification paths due to use of a deprecated hash MUST send reject certification paths due to use of a deprecated hash MUST send
a fatal "bad_certificate" alert message before closing the a fatal "bad_certificate" alert message before closing the
connection. All endpoints are RECOMMENDED to transition to SHA-256 connection. All endpoints are RECOMMENDED to transition to SHA-256
or better as soon as possible to maintain interoperability with or better as soon as possible to maintain interoperability with
implementations currently in the process of phasing out SHA-1 implementations currently in the process of phasing out SHA-1
support. support.
Note that a certificate containing a key for one signature algorithm Note that a certificate containing a key for one signature algorithm
MAY be signed using a different signature algorithm (for instance, an MAY be signed using a different signature algorithm (for instance, an
RSA key signed with a ECDSA key). RSA key signed with an ECDSA key).
6.3.4.2. Certificate Verify 6.3.4.2. Certificate Verify
When this message will be sent: When this message will be sent:
This message is used to provide explicit proof that an endpoint This message is used to provide explicit proof that an endpoint
possesses the private key corresponding to its certificate and possesses the private key corresponding to its certificate and
also provides integrity for the handshake up to this point. also provides integrity for the handshake up to this point.
Servers MUST send this message when using a cipher suite which is Servers MUST send this message when using a cipher suite which is
authenticated via a certificate. Clients MUST send this message authenticated via a certificate. Clients MUST send this message
skipping to change at page 69, line 16 skipping to change at page 68, line 40
Structure of this message: Structure of this message:
struct { struct {
digitally-signed struct { digitally-signed struct {
opaque hashed_data[hash_length]; opaque hashed_data[hash_length];
}; };
} CertificateVerify; } CertificateVerify;
Where hashed_data is the hash output described in Section 6.3.4, Where hashed_data is the hash output described in Section 6.3.4,
namely Hash(Handshake Context + Certificate). For concreteness, namely Hash(Handshake Context + Certificate) +
this means that the value that is signed is: Hash(resumption_context). For concreteness, this means that the
value that is signed is:
padding + context_string + 00 + hashed_data padding + context_string + 00 + hashed_data
The context string for a server signature is "TLS 1.3, server The context string for a server signature is "TLS 1.3, server
CertificateVerify" and for a client signature is "TLS 1.3, client CertificateVerify" and for a client signature is "TLS 1.3, client
CertificateVerify". A hash of the handshake messages is signed CertificateVerify". A hash of the handshake messages is signed
rather than the messages themselves because the digitally-signed rather than the messages themselves because the digitally-signed
format requires padding and context bytes at the beginning of the format requires padding and context bytes at the beginning of the
input. Thus, by signing a digest of the messages, an input. Thus, by signing a digest of the messages, an
implementation need only maintain one running hash per hash type implementation only needs to maintain a single running hash per
for CertificateVerify, Finished and other messages. hash type for CertificateVerify, Finished and other messages.
If sent by a server, the signature algorithm MUST be one offered If sent by a server, the signature algorithm MUST be one offered
in the client's "signature_algorithms" extension unless no valid in the client's "signature_algorithms" extension unless no valid
certificate chain can be produced without unsupported algorithms certificate chain can be produced without unsupported algorithms
(see Section 6.3.2.1). Note that there is a possibility for (see Section 6.3.2.2). Note that there is a possibility for
inconsistencies here. For instance, the client might offer inconsistencies here. For instance, the client might offer
ECDHE_ECDSA key exchange but omit any ECDSA and EdDSA values from ECDHE_ECDSA key exchange but omit any ECDSA and EdDSA values from
its "signature_algorithms" extension. In order to negotiate its "signature_algorithms" extension. In order to negotiate
correctly, the server MUST check any candidate cipher suites correctly, the server MUST check any candidate cipher suites
against the "signature_algorithms" extension before selecting against the "signature_algorithms" extension before selecting
them. This is somewhat inelegant but is a compromise designed to them. This is somewhat inelegant but is a compromise designed to
minimize changes to the original cipher suite design. minimize changes to the original cipher suite design.
If sent by a client, the signature algorithm used in the signature If sent by a client, the signature algorithm used in the signature
MUST be one of those present in the supported_signature_algorithms MUST be one of those present in the supported_signature_algorithms
skipping to change at page 70, line 33 skipping to change at page 70, line 10
The Finished message is the final message in the authentication The Finished message is the final message in the authentication
block. It is essential for providing authentication of the block. It is essential for providing authentication of the
handshake and of the computed keys. handshake and of the computed keys.
Meaning of this message: Meaning of this message:
Recipients of Finished messages MUST verify that the contents are Recipients of Finished messages MUST verify that the contents are
correct. Once a side has sent its Finished message and received correct. Once a side has sent its Finished message and received
and validated the Finished message from its peer, it may begin to and validated the Finished message from its peer, it may begin to
send and receive application data over the connection. This data send and receive application data over the connection.
will be protected under keys derived from the ephemeral secret
(see Section 7).
The key used to compute the finished message is computed from the The key used to compute the finished message is computed from the
Base key defined in Section 6.3.4 using HKDF (see Section 7.1). Base key defined in Section 6.3.4 using HKDF (see Section 7.1).
Specifically: Specifically:
client_finished_key = client_finished_key =
HKDF-Expand-Label(BaseKey, "client finished", "", L) HKDF-Expand-Label(BaseKey, "client finished", "", L)
server_finished_key = server_finished_key =
HKDF-Expand-Label(BaseKey, "server finished", "", L) HKDF-Expand-Label(BaseKey, "server finished", "", L)
skipping to change at page 71, line 10 skipping to change at page 70, line 33
struct { struct {
opaque verify_data[verify_data_length]; opaque verify_data[verify_data_length];
} Finished; } Finished;
The verify_data value is computed as follows: The verify_data value is computed as follows:
verify_data = verify_data =
HMAC(finished_key, Hash( HMAC(finished_key, Hash(
Handshake Context + Certificate* + CertificateVerify* Handshake Context + Certificate* + CertificateVerify*
)) ) + Hash(resumption_context)
)
* Only included if present. * Only included if present.
Where HMAC [RFC2104] uses the Hash algorithm for the handshake. As Where HMAC [RFC2104] uses the Hash algorithm for the handshake. As
noted above: the HMAC input can generally be implemented by a running noted above: the HMAC input can generally be implemented by a running
hash, i.e., just the handshake hash at this point. hash, i.e., just the handshake hash at this point.
In previous versions of TLS, the verify_data was always 12 octets In previous versions of TLS, the verify_data was always 12 octets
long. In the current version of TLS, it is the size of the HMAC long. In the current version of TLS, it is the size of the HMAC
output for the Hash used for the handshake. output for the Hash used for the handshake.
Note: Alerts and any other record types are not handshake messages Note: Alerts and any other record types are not handshake messages
and are not included in the hash computations. and are not included in the hash computations.
6.3.5. Post-Handshake Messages 6.3.5. Post-Handshake Messages
TLS also allows other messages to be sent after the main handshake. TLS also allows other messages to be sent after the main handshake.
These message use a handshake content type and are encrypted under These messages use a handshake content type and are encrypted under
the application traffic key. the application traffic key.
6.3.5.1. New Session Ticket Message 6.3.5.1. New Session Ticket Message
At any time after the server has received the client Finished At any time after the server has received the client Finished
message, it MAY send a NewSessionTicket message. This message message, it MAY send a NewSessionTicket message. This message
creates a pre-shared key (PSK) binding between the resumption master creates a pre-shared key (PSK) binding between the ticket value and
secret and the ticket label. The client MAY use this PSK for future the following two values derived from the resumption master secret:
handshakes by including it in the "pre_shared_key" extension in its
ClientHello (Section 6.3.2.4) and supplying a suitable PSK cipher
suite. Servers may send multiple tickets on a single connection, for
instance after post-handshake authentication.
struct { resumption_psk = HKDF-Expand-Label(resumption_secret,
uint32 ticket_lifetime; "resumption psk", "", L)
opaque ticket<0..2^16-1>;
} NewSessionTicket; resumption_context = HKDF-Expand-Label(resumption_secret,
"resumption context", "", L)
The client MAY use this PSK for future handshakes by including the
ticket value in the "pre_shared_key" extension in its ClientHello
(Section 6.3.2.5) and supplying a suitable PSK cipher suite. Servers
may send multiple tickets on a single connection, for instance after
post-handshake authentication. For handshakes that do not use a
resumption_psk, the resumption_context is a string of L zeroes.
enum { (65535) } TicketExtensionType;
struct {
TicketExtensionType extension_type;
opaque extension_data<0..2^16-1>;
} TicketExtension;
enum {
allow_early_data(1)
allow_dhe_resumption(2),
allow_psk_resumption(4)
} TicketFlags;
struct {
uint32 ticket_lifetime;
uint32 flags;
TicketExtension extensions<2..2^16-2>;
opaque ticket<0..2^16-1>;
} NewSessionTicket;
flags
A 32-bit value indicating the ways in which this ticket may be
used (as an OR of the flags values).
ticket_lifetime ticket_lifetime
Indicates the lifetime in seconds as a 32-bit unsigned integer in Indicates the lifetime in seconds as a 32-bit unsigned integer in
network byte order from the time of ticket issuance. Servers MUST network byte order from the time of ticket issuance. Servers MUST
NOT use any value more than 604800 seconds (7 days). The value of NOT use any value more than 604800 seconds (7 days). The value of
zero indicates that the ticket should be discarded immediately. zero indicates that the ticket should be discarded immediately.
Clients MUST NOT cache session tickets for longer than 7 days, Clients MUST NOT cache session tickets for longer than 7 days,
regardless of the ticket_lifetime. It MAY delete the ticket regardless of the ticket_lifetime. It MAY delete the ticket
earlier based on local policy. A server MAY treat a ticket as earlier based on local policy. A server MAY treat a ticket as
valid for a shorter period of time than what is stated in the valid for a shorter period of time than what is stated in the
ticket_lifetime. ticket_lifetime.
ticket_extensions
A placeholder for extensions in the ticket. Clients MUST ignore
unrecognized extensions.
ticket ticket
The value of the ticket to be used as the PSK identifier. The value of the ticket to be used as the PSK identifier. The
ticket itself is an opaque label. It MAY either be a database
lookup key or a self-encrypted and self-authenticated value.
Section 4 of [RFC5077] describes a recommended ticket construction
mechanism.
The ticket itself is an opaque label. It MAY either be a database The meanings of the flags are as follows:
lookup key or a self-encrypted and self-authenticated value.
Section 4 of [RFC5077] describes a recommended ticket construction
mechanism.
[[TODO: Should we require that tickets be bound to the existing allow_early_data
symmetric cipher suite. See the TODO above about early_data and When resuming with this ticket, the client MAY send data in its
PSK.??] first flight (early data) encrypted under a key derived from this
PSK.
allow_dhe_resumption
This ticket MAY be used with (EC)DHE-PSK cipher suite
allow_psk_resumption
This ticket MAY be used with a pure PSK cipher suite.
In all cases, the PSK or (EC)DHE-PSK cipher suites that the client
offers/uses MUST have the same symmetric parameters (cipher/hash) as
the cipher suite negotiated for this connection. If no flags are set
that the client recognizes, it MUST ignore the ticket.
6.3.5.2. Post-Handshake Authentication 6.3.5.2. Post-Handshake Authentication
The server is permitted to request client authentication at any time The server is permitted to request client authentication at any time
after the handshake has completed by sending a CertificateRequest after the handshake has completed by sending a CertificateRequest
message. The client SHOULD respond with the appropriate message. The client SHOULD respond with the appropriate
Authentication messages. If the client chooses to authenticate, it Authentication messages. If the client chooses to authenticate, it
MUST send Certificate, CertificateVerify, and Finished. If it MUST send Certificate, CertificateVerify, and Finished. If it
declines, it MUST send a Certificate message containing no declines, it MUST send a Certificate message containing no
certificates followed by Finished. certificates followed by Finished.
skipping to change at page 73, line 24 skipping to change at page 73, line 50
and they cross in flight, this only results in an update of one and they cross in flight, this only results in an update of one
generation; when each side receives the other side's update it just generation; when each side receives the other side's update it just
updates its receive keys and notes that the generations match and updates its receive keys and notes that the generations match and
thus no send update is needed. thus no send update is needed.
Note that the side which sends its KeyUpdate first needs to retain Note that the side which sends its KeyUpdate first needs to retain
the traffic keys (though not the traffic secret) for the previous the traffic keys (though not the traffic secret) for the previous
generation of keys until it receives the KeyUpdate from the other generation of keys until it receives the KeyUpdate from the other
side. side.
Both sender and receiver must encrypt their KeyUpdate messages with Both sender and receiver MUST encrypt their KeyUpdate messages with
the old keys. Additionally, both sides MUST enforce that a KeyUpdate the old keys. Additionally, both sides MUST enforce that a KeyUpdate
with the old key is received before accepting any messages encrypted with the old key is received before accepting any messages encrypted
with the new key. Failure to do so may allow message truncation with the new key. Failure to do so may allow message truncation
attacks. attacks.
7. Cryptographic Computations 7. Cryptographic Computations
In order to begin connection protection, the TLS Record Protocol In order to begin connection protection, the TLS Record Protocol
requires specification of a suite of algorithms, a master secret, and requires specification of a suite of algorithms, a master secret, and
the client and server random values. The authentication, key the client and server random values. The authentication, key
exchange, and record protection algorithms are determined by the exchange, and record protection algorithms are determined by the
cipher_suite selected by the server and revealed in the ServerHello cipher_suite selected by the server and revealed in the ServerHello
message. The random values are exchanged in the hello messages. All message. The random values are exchanged in the hello messages. All
that remains is to calculate the key schedule. that remains is to calculate the key schedule.
7.1. Key Schedule 7.1. Key Schedule
The TLS handshake establishes secret keying material which is then The TLS handshake establishes one or more input secrets which are
used to protect traffic. This keying material is derived from the combined to create the actual working keying material, as detailed
two input secret values: Static Secret (SS) and Ephemeral Secret below. The key derivation process makes use of the following
(ES). functions, based on HKDF [RFC5869]:
The exact source of each of these secrets depends on the operational
mode (DHE, ECDHE, PSK, etc.) and is summarized in the table below:
+-----------------+------------------------+------------------------+
| Key Exchange | Static Secret (SS) | Ephemeral Secret (ES) |
+-----------------+------------------------+------------------------+
| (EC)DHE (full | Client ephemeral w/ | Client ephemeral w/ |
| handshake) | server ephemeral | server ephemeral |
| | | |
| (EC)DHE (w/ | Client ephemeral w/ | Client ephemeral w/ |
| 0-RTT) | server static | server ephemeral |
| | | |
| PSK | Pre-Shared Key | Pre-shared key |
| | | |
| PSK + (EC)DHE | Pre-Shared Key | Client ephemeral w/ |
| | | server ephemeral |
+-----------------+------------------------+------------------------+
These shared secret values are used to generate cryptographic keys as
shown below.
The derivation process is as follows, where L denotes the length of
the underlying hash function for HKDF [RFC5869]. SS and ES denote
the sources from the table above.
HKDF-Expand-Label(Secret, Label, HashValue, Length) =
HKDF-Expand(Secret, HkdfLabel, Length)
Where HkdfLabel is specified as: HKDF-Extract(Salt, IKM) as defined in {{RFC5869}}.
struct HkdfLabel { HKDF-Expand-Label(Secret, Label, Messages, Length) =
uint16 length; HKDF-Expand(Secret, HkdfLabel, Length)
opaque label<9..255>;
opaque hash_value<0..255>;
};
Where: Where HkdfLabel is specified as:
- HkdfLabel.length is Length
- HkdfLabel.label is "TLS 1.3, " + Label
- HkdfLabel.hash_value is HashValue.
1. xSS = HKDF-Extract(0, SS). Note that HKDF-Extract always struct HkdfLabel {
produces a value the same length as the underlying hash uint16 length;
function. opaque label<9..255>;
opaque hash_value<0..255>;
};
2. xES = HKDF-Extract(0, ES) - HkdfLabel.length is Length
- HkdfLabel.label is "TLS 1.3, " + Label
- HkdfLabel.hash_value is HashValue.
3. mSS = HKDF-Expand-Label(xSS, "expanded static secret", Derive-Secret(Secret, Label, Messages) =
handshake_hash, L) HKDF-Expand-Label(Secret, Label,
Hash(Messages) + Hash(resumption_context), L))
4. mES = HKDF-Expand-Label(xES, "expanded ephemeral secret", Given a set of n InputSecrets, the final "master secret" is computed
handshake_hash, L) by iteratively invoking HKDF-Extract with InputSecret_1,
InputSecret_2, etc. The initial secret is simply a string of 0s as
long as the size of the Hash that is the basis for the HKDF.
Concretely, for the present version of TLS 1.3, secrets are added in
the following order:
5. master_secret = HKDF-Extract(mSS, mES) - PSK
6. traffic_secret_0 = HKDF-Expand-Label(master_secret, - (EC)DHE shared secret
"traffic secret",
handshake_hash, L)
Where handshake_hash includes all messages up through the This produces a full key derivation schedule shown in the diagram
server CertificateVerify message, but not including any below. In this diagram, the following formatting conventions apply:
0-RTT handshake messages (the server's Finished is not
included because the master_secret is need to compute
the finished key). [[OPEN ISSUE: Should we be including
0-RTT handshake messages here and below?.
https://github.com/tlswg/tls13-spec/issues/351
]] At this point,
SS, ES, xSS, xES, mSS, and mES SHOULD be securely deleted,
along with any ephemeral (EC)DH secrets.
7. resumption_secret = HKDF-Expand-Label(master_secret, - HKDF-Extract is drawn as taking the Salt argument from the top and
"resumption master secret" the IKM argument from the left.
handshake_hash, L)
8. exporter_secret = HKDF-Expand-Label(master_secret, - Derive-Secret's Secret argument is indicated by the arrow coming
"exporter master secret", in from the left. For instance, the Early Secret is the Secret
handshake_hash, L) for generating the early_traffic-secret.
Where handshake_hash contains the entire handshake up to 0
and including the client's Finished, but not including |
any 0-RTT handshake messages or post-handshake messages. v
AT this point master_secret SHOULD be securely deleted. PSK -> HKDF-Extract
|
v
Early Secret --> Derive-Secret(., "early traffic secret",
| ClientHello)
| = early_traffic_secret
v
(EC)DHE -> HKDF-Extract
|
v
Handshake
Secret -----> Derive-Secret(., "handshake traffic secret",
| ClientHello + ServerHello)
| = handshake_traffic_secret
v
0 -> HKDF-Extract
|
v
Master Secret
|
+---------> Derive-Secret(., "application traffic secret",
| ClientHello...Server Finished)
| = traffic_secret_0
|
+---------> Derive-Secret(., "exporter master secret",
| ClientHello...Client Finished)
| = exporter_secret
|
+---------> Derive-Secret(., "resumption master secret",
ClientHello...Client Finished)
= resumption_secret
The traffic keys are computed from xSS, xES, and the traffic_secret The general pattern here is that the secrets shown down the left side
as described in Section 7.3 below. The traffic_secret may be updated of the diagram are just raw entropy without context, whereas the
throughout the connection as described in Section 7.2. secrets down the right side include handshake context and therefore
can be used to derive working keys without additional context. Note
that the different calls to Derive-Secret may take different Messages
arguments, even with the same secret. In a 0-RTT exchange, Derive-
Secret is called with four distinct transcripts; in a 1-RTT only
exchange with three distinct transcripts.
Note: Although the steps above are phrased as individual HKDF-Extract If a given secret is not available, then the 0-value consisting of a
and HKDF-Expand operations, because each HKDF-Expand operation is string of L zeroes is used.
paired with an HKDF-Extract, it is possible to implement this key
schedule with a black-box HKDF API, albeit at some loss of efficiency
as some HKDF-Extract operations will be repeated.
7.2. Updating Traffic Keys and IVs 7.2. Updating Traffic Keys and IVs
Once the handshake is complete, it is possible for either side to Once the handshake is complete, it is possible for either side to
update its sending traffic keys using the KeyUpdate handshake message update its sending traffic keys using the KeyUpdate handshake message
Section 6.3.5.3. The next generation of traffic keys is computed by Section 6.3.5.3. The next generation of traffic keys is computed by
generating traffic_secret_N+1 from traffic_secret_N as described in generating traffic_secret_N+1 from traffic_secret_N as described in
this section then re-deriving the traffic keys as described in this section then re-deriving the traffic keys as described in
Section 7.3. Section 7.3.
The next-generation traffic_secret is computed as: The next-generation traffic_secret is computed as:
traffic_secret_N+1 = HKDF-Expand-Label(traffic_secret_N, "traffic traffic_secret_N+1 = HKDF-Expand-Label(traffic_secret_N, "application
secret", "", L) traffic secret", "", L)
Once traffic_secret_N+1 and its associated traffic keys have been Once traffic_secret_N+1 and its associated traffic keys have been
computed, implementations SHOULD delete traffic_secret_N. Once the computed, implementations SHOULD delete traffic_secret_N. Once the
directional keys are no longer needed, they SHOULD be deleted as directional keys are no longer needed, they SHOULD be deleted as
well. well.
7.3. Traffic Key Calculation 7.3. Traffic Key Calculation
The traffic keying material is generated from the following input The traffic keying material is generated from the following input
values: values:
- A secret value - A secret value
- A phase value indicating the phase of the protocol the keys are - A phase value indicating the phase of the protocol the keys are
being generated for. being generated for.
- A purpose value indicating the specific value being generated - A purpose value indicating the specific value being generated
- The length of the key. - The length of the key.
- The handshake context which is used to generate the keys.
The keying material is computed using: The keying material is computed using:
key = HKDF-Expand-Label(Secret, key = HKDF-Expand-Label(Secret,
phase + ", " + purpose, phase + ", " + purpose, "",
handshake_context,
key_length) key_length)
The following table describes the inputs to the key calculation for The following table describes the inputs to the key calculation for
each class of traffic keys: each class of traffic keys:
+-------------+---------+-----------------+-------------------------+ +-------------+--------------------------+--------------------------+
| Record Type | Secret | Phase | Handshake Context | | Record Type | Secret | Phase |
+-------------+---------+-----------------+-------------------------+ +-------------+--------------------------+--------------------------+
| 0-RTT | xSS | "early | ClientHello + | | 0-RTT | early_traffic_secret | "early handshake key |
| Handshake | | handshake key | ServerConfiguration + | | Handshake | | expansion" |
| | | expansion" | Server Certificate | | | | |
| | | | | | 0-RTT | early_traffic_secret | "early application data |
| 0-RTT | xSS | "early | ClientHello + | | Application | | key expansion" |
| Application | | application | ServerConfiguration + | | | | |
| | | data key | Server Certificate | | Handshake | handshake_traffic_secret | "handshake key |
| | | expansion" | | | | | expansion" |
| | | | | | | | |
| Handshake | xES | "handshake key | ClientHello... | | Application | traffic_secret_N | "application data key |
| | | expansion" | ServerHello | | Data | | expansion" |
| | | | | +-------------+--------------------------+--------------------------+
| Application | traffic | "application | ClientHello... Server |
| Data | secret | data key | Finished |
| | | expansion" | |
+-------------+---------+-----------------+-------------------------+
The following table indicates the purpose values for each type of The following table indicates the purpose values for each type of
key: key:
+------------------+--------------------+ +------------------+--------------------+
| Key Type | Purpose | | Key Type | Purpose |
+------------------+--------------------+ +------------------+--------------------+
| Client Write Key | "client write key" | | Client Write Key | "client write key" |
| | | | | |
| Server Write Key | "server write key" | | Server Write Key | "server write key" |
| | | | | |
| Client Write IV | "client write iv" | | Client Write IV | "client write iv" |
| | | | | |
| Server Write IV | "server write iv" | | Server Write IV | "server write iv" |
+------------------+--------------------+ +------------------+--------------------+
All the traffic keying material is recomputed whenever the underlying All the traffic keying material is recomputed whenever the underlying
Secret changes (e.g., when changing from the handshake to application Secret changes (e.g., when changing from the handshake to application
data keys or upon a key update). data keys or upon a key update).
7.3.1. The Handshake Hash 7.3.1. Diffie-Hellman
The handshake hash ("handshake_hash") is defined as the hash (using
the Hash algorithm for the handshake) of all handshake messages sent
or received, starting at ClientHello up to the present time, with the
exception of the client's 0-RTT authentication messages (Certificate,
CertificateVerify, and Finished) including the type and length fields
of the handshake messages. This is the concatenation of the
exchanged Handshake structures in plaintext form (even if they were
encrypted on the wire). [[OPEN ISSUE: See https://github.com/tlswg/
tls13-spec/issues/351 for the question of whether the 0-RTT handshake
messages are hashed.]]
7.3.2. Diffie-Hellman
A conventional Diffie-Hellman computation is performed. The A conventional Diffie-Hellman computation is performed. The
negotiated key (Z) is used as the shared secret, and is used in the negotiated key (Z) is converted to byte string by encoding in big-
key schedule as specified above. Leading bytes of Z that contain all endian, padded with zeros up to the size of the prime. This byte
zero bits are stripped before it is used as the input to HKDF. string is used as the shared secret, and is used in the key schedule
as specified above.
7.3.3. Elliptic Curve Diffie-Hellman Note that this construction differs from previous versions of TLS
which remove leading zeros.
7.3.2. Elliptic Curve Diffie-Hellman
For secp256r1, secp384r1 and secp521r1, ECDH calculations (including For secp256r1, secp384r1 and secp521r1, ECDH calculations (including
parameter and key generation as well as the shared secret parameter and key generation as well as the shared secret
calculation) are performed according to [IEEE1363] using the ECKAS- calculation) are performed according to [IEEE1363] using the ECKAS-
DH1 scheme with the identity map as key derivation function (KDF), so DH1 scheme with the identity map as key derivation function (KDF), so
that the shared secret is the x-coordinate of the ECDH shared secret that the shared secret is the x-coordinate of the ECDH shared secret
elliptic curve point represented as an octet string. Note that this elliptic curve point represented as an octet string. Note that this
octet string (Z in IEEE 1363 terminology) as output by FE2OSP, the octet string (Z in IEEE 1363 terminology) as output by FE2OSP, the
Field Element to Octet String Conversion Primitive, has constant Field Element to Octet String Conversion Primitive, has constant
length for any given field; leading zeros found in this octet string length for any given field; leading zeros found in this octet string
MUST NOT be truncated. MUST NOT be truncated.
(Note that this use of the identity KDF is a technicality. The (Note that this use of the identity KDF is a technicality. The
complete picture is that ECDH is employed with a non-trivial KDF complete picture is that ECDH is employed with a non-trivial KDF
because TLS does not directly use this secret for anything other than because TLS does not directly use this secret for anything other than
for computing other secrets.) for computing other secrets.)
ECDH functions are used as follows: ECDH functions are used as follows:
- The public key to put into ECPoint.point structure is the result - The public key to put into the KeyShareEntry.key_exchange
of applying the ECDH function to the secret key of appropriate structure is the result of applying the ECDH function to the
length (into scalar input) and the standard public basepoint (into secret key of appropriate length (into scalar input) and the
u-coordinate point input). standard public basepoint (into u-coordinate point input).
- The ECDH shared secret is the result of applying ECDH function to - The ECDH shared secret is the result of applying ECDH function to
the secret key (into scalar input) and the peer's public key (into the secret key (into scalar input) and the peer's public key (into
u-coordinate point input). The output is used raw, with no u-coordinate point input). The output is used raw, with no
processing. processing.
For X25519 and X448, see [RFC7748]. For X25519 and X448, see [RFC7748].
7.3.4. Exporters 7.3.3. Exporters
[RFC5705] defines keying material exporters for TLS in terms of the [RFC5705] defines keying material exporters for TLS in terms of the
TLS PRF. This document replaces the PRF with HKDF, thus requiring a TLS PRF. This document replaces the PRF with HKDF, thus requiring a
new construction. The exporter interface remains the same, however new construction. The exporter interface remains the same, however
the value is computed as: the value is computed as:
HKDF-Expand-Label(HKDF-Extract(0, exporter_secret), HKDF-Expand-Label(exporter_secret,
label, context_value, length) label, context_value, key_length)
Note: the inner HKDF-Extract is strictly unnecessary, but it
maintains the invariant that HKDF Extract and Expand calls are
paired.
8. Mandatory Algorithms 8. Mandatory Algorithms
8.1. MTI Cipher Suites 8.1. MTI Cipher Suites
In the absence of an application profile standard specifying In the absence of an application profile standard specifying
otherwise, a TLS-compliant application MUST implement the following otherwise, a TLS-compliant application MUST implement the following
cipher suites: cipher suites:
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
skipping to change at page 79, line 43 skipping to change at page 79, line 34
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
8.2. MTI Extensions 8.2. MTI Extensions
In the absence of an application profile standard specifying In the absence of an application profile standard specifying
otherwise, a TLS-compliant application MUST implement the following otherwise, a TLS-compliant application MUST implement the following
TLS extensions: TLS extensions:
- Signature Algorithms ("signature_algorithms"; Section 6.3.2.1) - Signature Algorithms ("signature_algorithms"; Section 6.3.2.2)
- Negotiated Groups ("supported_groups"; Section 6.3.2.2) - Negotiated Groups ("supported_groups"; Section 6.3.2.3)
- Key Share ("key_share"; Section 6.3.2.3) - Key Share ("key_share"; Section 6.3.2.4)
- Pre-Shared Key ("pre_shared_key"; Section 6.3.2.4) - Pre-Shared Key ("pre_shared_key"; Section 6.3.2.5)
- Server Name Indication ("server_name"; Section 3 of [RFC6066]) - Server Name Indication ("server_name"; Section 3 of [RFC6066])
- Cookie ("cookie"; Section 6.3.2.1)
All implementations MUST send and use these extensions when offering All implementations MUST send and use these extensions when offering
applicable cipher suites: applicable cipher suites:
- "signature_algorithms" is REQUIRED for certificate authenticated - "signature_algorithms" is REQUIRED for certificate authenticated
cipher suites cipher suites
- "supported_groups" and "key_share" are REQUIRED for DHE or ECDHE - "supported_groups" and "key_share" are REQUIRED for DHE or ECDHE
cipher suites cipher suites
- "pre_shared_key" is REQUIRED for PSK cipher suites - "pre_shared_key" is REQUIRED for PSK cipher suites
- "cookie" is REQUIRED for all cipher suites.
When negotiating use of applicable cipher suites, endpoints MUST When negotiating use of applicable cipher suites, endpoints MUST
abort the connection with a "missing_extension" alert if the required abort the connection with a "missing_extension" alert if the required
extension was not provided. Any endpoint that receives any invalid extension was not provided. Any endpoint that receives any invalid
combination of cipher suites and extensions MAY abort the connection combination of cipher suites and extensions MAY abort the connection
with a "missing_extension" alert, regardless of negotiated with a "missing_extension" alert, regardless of negotiated
parameters. parameters.
Additionally, all implementations MUST support use of the Additionally, all implementations MUST support use of the
"server_name" extension with applications capable of using it. "server_name" extension with applications capable of using it.
Servers MAY require clients to send a valid "server_name" extension. Servers MAY require clients to send a valid "server_name" extension.
Servers requiring this extension SHOULD respond to a ClientHello Servers requiring this extension SHOULD respond to a ClientHello
lacking a "server_name" extension with a fatal "missing_extension" lacking a "server_name" extension with a fatal "missing_extension"
alert. alert.
Some of these extensions exist only for the client to provide Servers MUST NOT send the "signature_algorithms" extension; if a
additional data to the server in a backwards-compatible way and thus client receives this extension it MUST respond with a fatal
have no meaning when sent from a server. The client-only extensions
defined in this document are: "signature_algorithms" &
"supported_groups". Servers MUST NOT send these extensions. Clients
receiving any of these extensions MUST respond with a fatal
"unsupported_extension" alert and close the connection. "unsupported_extension" alert and close the connection.
9. Application Data Protocol 9. Application Data Protocol
Application data messages are carried by the record layer and are Application data messages are carried by the record layer and are
fragmented and encrypted based on the current connection state. The fragmented and encrypted based on the current connection state. The
messages are treated as transparent data to the record layer. messages are treated as transparent data to the record layer.
10. Security Considerations 10. Security Considerations
skipping to change at page 81, line 49 skipping to change at page 81, line 36
range 0-254 (decimal) are assigned via Specification Required range 0-254 (decimal) are assigned via Specification Required
[RFC2434]. Values with the first byte 255 (decimal) are reserved [RFC2434]. Values with the first byte 255 (decimal) are reserved
for Private Use [RFC2434]. IANA [SHALL update/has updated] this for Private Use [RFC2434]. IANA [SHALL update/has updated] this
registry to include the "key_share", "pre_shared_key", and registry to include the "key_share", "pre_shared_key", and
"early_data" extensions as defined in this document. "early_data" extensions as defined in this document.
IANA [shall update/has updated] this registry to include a "TLS IANA [shall update/has updated] this registry to include a "TLS
1.3" column with the following four values: "Client", indicating 1.3" column with the following four values: "Client", indicating
that the server shall not send them. "Clear", indicating that that the server shall not send them. "Clear", indicating that
they shall be in the ServerHello. "Encrypted", indicating that they shall be in the ServerHello. "Encrypted", indicating that
they shall be in the EncryptedExtensions block, and "No" they shall be in the EncryptedExtensions block, "Early",
indicating that they are not used in TLS 1.3. This column [shall indicating that they shall be only in the client's 0-RTT
be/has been] initially populated with the values in this document. EncryptedExtensions block, and "No" indicating that they are not
IANA [shall update/has updated] this registry to add a used in TLS 1.3. This column [shall be/has been] initially
"Recommended" column. IANA [shall/has] initially populated this populated with the values in this document. IANA [shall update/
column with the values in the table below. This table has been has updated] this registry to add a "Recommended" column. IANA
generated by marking Standards Track RFCs as "Yes" and all others [shall/has] initially populated this column with the values in the
as "No". table below. This table has been generated by marking Standards
Track RFCs as "Yes" and all others as "No".
+-----------------------------------------+-------------+-----------+ +-------------------------------+-----------+-----------------------+
| Extension | Recommended | TLS 1.3 | | Extension | Recommend | TLS 1.3 |
+-----------------------------------------+-------------+-----------+ | | ed | |
| server_name [RFC6066] | Yes | Encrypted | +-------------------------------+-----------+-----------------------+
| | | | | server_name [RFC6066] | Yes | Encrypted |
| max_fragment_length [RFC6066] | Yes | Encrypted | | | | |
| | | | | max_fragment_length [RFC6066] | Yes | Encrypted |
| client_certificate_url [RFC6066] | Yes | Encrypted | | | | |
| | | | | client_certificate_url | Yes | Encrypted |
| trusted_ca_keys [RFC6066] | Yes | Encrypted | | [RFC6066] | | |
| | | | | | | |
| truncated_hmac [RFC6066] | Yes | No | | trusted_ca_keys [RFC6066] | Yes | Encrypted |
| | | | | | | |
| status_request [RFC6066] | Yes | No | | truncated_hmac [RFC6066] | Yes | No |
| | | | | | | |
| user_mapping [RFC4681] | Yes | Encrypted | | status_request [RFC6066] | Yes | No |
| | | | | | | |
| client_authz [RFC5878] | No | Encrypted | | user_mapping [RFC4681] | Yes | Encrypted |
| | | | | | | |
| server_authz [RFC5878] | No | Encrypted | | client_authz [RFC5878] | No | Encrypted |
| | | | | | | |
| cert_type [RFC6091] | Yes | Encrypted | | server_authz [RFC5878] | No | Encrypted |
| | | | | | | |
| supported_groups [RFC-ietf-tls- | Yes | Client | | cert_type [RFC6091] | Yes | Encrypted |
| negotiated-ff-dhe] | | | | | | |
| | | | | supported_groups [RFC-ietf- | Yes | Encrypted |
| ec_point_formats [RFC4492] | Yes | No | | tls-negotiated-ff-dhe] | | |
| | | | | | | |
| srp [RFC5054] | No | No | | ec_point_formats [RFC4492] | Yes | No |
| | | | | | | |
| signature_algorithms [RFC5246] | Yes | Client | | srp [RFC5054] | No | No |
| | | | | | | |
| use_srtp [RFC5764] | Yes | Encrypted | | signature_algorithms | Yes | Client |
| | | | | [RFC5246] | | |
| heartbeat [RFC6520] | Yes | Encrypted | | | | |
| | | | | use_srtp [RFC5764] | Yes | Encrypted |
| application_layer_protocol_negotiation | Yes | Encrypted | | | | |
| [RFC7301] | | | | heartbeat [RFC6520] | Yes | Encrypted |
| | | | | | | |
| status_request_v2 [RFC6961] | Yes | Encrypted | | application_layer_protocol_ne | Yes | Encrypted |
| | | | | gotiation [RFC7301] | | |
| signed_certificate_timestamp [RFC6962] | No | Encrypted | | | | |
| | | | | status_request_v2 [RFC6961] | Yes | Encrypted |
| client_certificate_type [RFC7250] | Yes | Encrypted | | | | |
| | | | | signed_certificate_timestamp | No | Encrypted |
| server_certificate_type [RFC7250] | Yes | Encrypted | | [RFC6962] | | |
| | | | | | | |
| padding [RFC7685] | Yes | Client | | client_certificate_type | Yes | Encrypted |
| | | | | [RFC7250] | | |
| encrypt_then_mac [RFC7366] | Yes | No | | | | |
| | | | | server_certificate_type | Yes | Encrypted |
| extended_master_secret [RFC7627] | Yes | No | | [RFC7250] | | |
| | | | | | | |
| SessionTicket TLS [RFC4507] | Yes | No | | padding [RFC7685] | Yes | Client |
| | | | | | | |
| renegotiation_info [RFC5746] | Yes | No | | encrypt_then_mac [RFC7366] | Yes | No |
| | | | | | | |
| key_share [[this document]] | Yes | Clear | | extended_master_secret | Yes | No |
| | | | | [RFC7627] | | |
| pre_shared_key [[this document]] | Yes | Clear | | | | |
| | | | | SessionTicket TLS [RFC4507] | Yes | No |
| early_data [[this document]] | Yes | Clear | | | | |
+-----------------------------------------+-------------+-----------+ | renegotiation_info [RFC5746] | Yes | No |
| | | |
| key_share [[this document]] | Yes | Clear |
| | | |
| pre_shared_key [[this | Yes | Clear |
| document]] | | |
| | | |
| early_data [[this document]] | Yes | Clear |
| | | |
| ticket_age [[this document]] | Yes | Early |
| | | |
| cookie [[this document]] | Yes | Encrypted/HelloRetryR |
| | | equest |
+-------------------------------+-----------+-----------------------+
In addition, this document defines two new registries to be In addition, this document defines two new registries to be
maintained by IANA maintained by IANA
- TLS SignatureScheme Registry: Values with the first byte in the - TLS SignatureScheme Registry: Values with the first byte in the
range 0-254 (decimal) are assigned via Specification Required range 0-254 (decimal) are assigned via Specification Required
[RFC2434]. Values with the first byte 255 (decimal) are reserved [RFC2434]. Values with the first byte 255 (decimal) are reserved
for Private Use [RFC2434]. This registry SHALL have a for Private Use [RFC2434]. This registry SHALL have a
"Recommended" column. The registry [shall be/ has been] initially "Recommended" column. The registry [shall be/ has been] initially
populated with the values described in Section 6.3.2.1. The populated with the values described in Section 6.3.2.2. The
following values SHALL be marked as "Recommended": following values SHALL be marked as "Recommended":
ecdsa_secp256r1_sha256, ecdsa_secp384r1_sha384, rsa_pss_sha256, ecdsa_secp256r1_sha256, ecdsa_secp384r1_sha384, rsa_pss_sha256,
rsa_pss_sha384, rsa_pss_sha512, ed25519. rsa_pss_sha384, rsa_pss_sha512, ed25519.
- TLS ConfigurationExtensionType Registry: Values with the first
byte in the range 0-254 (decimal) are assigned via Specification
Required [RFC2434]. Values with the first byte 255 (decimal) are
reserved for Private Use [RFC2434]. This registry SHALL have a
"Recommended" column. The registry [shall be/ has been] initially
populated with the values described in Section 6.3.3.3, with all
values marked with "Recommended" value "Yes".
12. References 12. References
12.1. Normative References 12.1. Normative References
[AES] National Institute of Standards and Technology, [AES] National Institute of Standards and Technology,
"Specification for the Advanced Encryption Standard "Specification for the Advanced Encryption Standard
(AES)", NIST FIPS 197, November 2001. (AES)", NIST FIPS 197, November 2001.
[DH] Diffie, W. and M. Hellman, "New Directions in [DH] Diffie, W. and M. Hellman, "New Directions in
Cryptography", IEEE Transactions on Information Theory, Cryptography", IEEE Transactions on Information Theory,
V.IT-22 n.6 , June 1977. V.IT-22 n.6 , June 1977.
skipping to change at page 84, line 21 skipping to change at page 84, line 12
Cryptography", IEEE Transactions on Information Theory, Cryptography", IEEE Transactions on Information Theory,
V.IT-22 n.6 , June 1977. V.IT-22 n.6 , June 1977.
[I-D.ietf-tls-chacha20-poly1305] [I-D.ietf-tls-chacha20-poly1305]
Langley, A., Chang, W., Mavrogiannopoulos, N., Langley, A., Chang, W., Mavrogiannopoulos, N.,
Strombergson, J., and S. Josefsson, "ChaCha20-Poly1305 Strombergson, J., and S. Josefsson, "ChaCha20-Poly1305
Cipher Suites for Transport Layer Security (TLS)", draft- Cipher Suites for Transport Layer Security (TLS)", draft-
ietf-tls-chacha20-poly1305-04 (work in progress), December ietf-tls-chacha20-poly1305-04 (work in progress), December
2015. 2015.
[I-D.irtf-cfrg-curves]
Langley, A. and M. Hamburg, "Elliptic Curves for
Security", draft-irtf-cfrg-curves-11 (work in progress),
October 2015.
[I-D.irtf-cfrg-eddsa] [I-D.irtf-cfrg-eddsa]
Josefsson, S. and I. Liusvaara, "Edwards-curve Digital Josefsson, S. and I. Liusvaara, "Edwards-curve Digital
Signature Algorithm (EdDSA)", draft-irtf-cfrg-eddsa-04 Signature Algorithm (EdDSA)", draft-irtf-cfrg-eddsa-05
(work in progress), March 2016. (work in progress), March 2016.
[I-D.mattsson-tls-ecdhe-psk-aead] [I-D.mattsson-tls-ecdhe-psk-aead]
Mattsson, J. and D. Migault, "ECDHE_PSK with AES-GCM and Mattsson, J. and D. Migault, "ECDHE_PSK with AES-GCM and
AES-CCM Cipher Suites for Transport Layer Security (TLS)", AES-CCM Cipher Suites for Transport Layer Security (TLS)",
draft-mattsson-tls-ecdhe-psk-aead-03 (work in progress), draft-mattsson-tls-ecdhe-psk-aead-05 (work in progress),
December 2015. April 2016.
[RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-
Hashing for Message Authentication", RFC 2104, Hashing for Message Authentication", RFC 2104,
DOI 10.17487/RFC2104, February 1997, DOI 10.17487/RFC2104, February 1997,
<http://www.rfc-editor.org/info/rfc2104>. <http://www.rfc-editor.org/info/rfc2104>.
[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,
<http://www.rfc-editor.org/info/rfc2119>. <http://www.rfc-editor.org/info/rfc2119>.
skipping to change at page 86, line 15 skipping to change at page 85, line 44
[RFC6367] Kanno, S. and M. Kanda, "Addition of the Camellia Cipher [RFC6367] Kanno, S. and M. Kanda, "Addition of the Camellia Cipher
Suites to Transport Layer Security (TLS)", RFC 6367, Suites to Transport Layer Security (TLS)", RFC 6367,
DOI 10.17487/RFC6367, September 2011, DOI 10.17487/RFC6367, September 2011,
<http://www.rfc-editor.org/info/rfc6367>. <http://www.rfc-editor.org/info/rfc6367>.
[RFC6655] McGrew, D. and D. Bailey, "AES-CCM Cipher Suites for [RFC6655] McGrew, D. and D. Bailey, "AES-CCM Cipher Suites for
Transport Layer Security (TLS)", RFC 6655, Transport Layer Security (TLS)", RFC 6655,
DOI 10.17487/RFC6655, July 2012, DOI 10.17487/RFC6655, July 2012,
<http://www.rfc-editor.org/info/rfc6655>. <http://www.rfc-editor.org/info/rfc6655>.
[RFC6961] Pettersen, Y., "The Transport Layer Security (TLS)
Multiple Certificate Status Request Extension", RFC 6961,
DOI 10.17487/RFC6961, June 2013,
<http://www.rfc-editor.org/info/rfc6961>.
[RFC6962] Laurie, B., Langley, A., and E. Kasper, "Certificate
Transparency", RFC 6962, DOI 10.17487/RFC6962, June 2013,
<http://www.rfc-editor.org/info/rfc6962>.
[RFC7251] McGrew, D., Bailey, D., Campagna, M., and R. Dugal, "AES- [RFC7251] McGrew, D., Bailey, D., Campagna, M., and R. Dugal, "AES-
CCM Elliptic Curve Cryptography (ECC) Cipher Suites for CCM Elliptic Curve Cryptography (ECC) Cipher Suites for
TLS", RFC 7251, DOI 10.17487/RFC7251, June 2014, TLS", RFC 7251, DOI 10.17487/RFC7251, June 2014,
<http://www.rfc-editor.org/info/rfc7251>. <http://www.rfc-editor.org/info/rfc7251>.
[RFC7748] Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves [RFC7748] Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves
for Security", RFC 7748, DOI 10.17487/RFC7748, January for Security", RFC 7748, DOI 10.17487/RFC7748, January
2016, <http://www.rfc-editor.org/info/rfc7748>. 2016, <http://www.rfc-editor.org/info/rfc7748>.
[SHS] National Institute of Standards and Technology, U.S. [SHS] National Institute of Standards and Technology, U.S.
skipping to change at page 86, line 48 skipping to change at page 86, line 38
[DSS] National Institute of Standards and Technology, U.S. [DSS] National Institute of Standards and Technology, U.S.
Department of Commerce, "Digital Signature Standard, Department of Commerce, "Digital Signature Standard,
version 4", NIST FIPS PUB 186-4, 2013. version 4", NIST FIPS PUB 186-4, 2013.
[ECDSA] American National Standards Institute, "Public Key [ECDSA] American National Standards Institute, "Public Key
Cryptography for the Financial Services Industry: The Cryptography for the Financial Services Industry: The
Elliptic Curve Digital Signature Algorithm (ECDSA)", Elliptic Curve Digital Signature Algorithm (ECDSA)",
ANSI ANS X9.62-2005, November 2005. ANSI ANS X9.62-2005, November 2005.
[FI06] "Bleichenbacher's RSA signature forgery based on [FI06] Finney, H., "Bleichenbacher's RSA signature forgery based
implementation error", August 2006, <https://www.ietf.org/ on implementation error", August 2006,
mail-archive/web/openpgp/current/msg00999.html>. <https://www.ietf.org/mail-archive/web/openpgp/current/
msg00999.html>.
[GCM] Dworkin, M., "Recommendation for Block Cipher Modes of [GCM] Dworkin, M., "Recommendation for Block Cipher Modes of
Operation: Galois/Counter Mode (GCM) and GMAC", Operation: Galois/Counter Mode (GCM) and GMAC",
NIST Special Publication 800-38D, November 2007. NIST Special Publication 800-38D, November 2007.
[I-D.ietf-tls-cached-info]
Santesson, S. and H. Tschofenig, "Transport Layer Security
(TLS) Cached Information Extension", draft-ietf-tls-
cached-info-23 (work in progress), May 2016.
[I-D.ietf-tls-negotiated-ff-dhe] [I-D.ietf-tls-negotiated-ff-dhe]
Gillmor, D., "Negotiated Finite Field Diffie-Hellman Gillmor, D., "Negotiated Finite Field Diffie-Hellman
Ephemeral Parameters for TLS", draft-ietf-tls-negotiated- Ephemeral Parameters for TLS", draft-ietf-tls-negotiated-
ff-dhe-10 (work in progress), June 2015. ff-dhe-10 (work in progress), June 2015.
[IEEE1363] [IEEE1363]
IEEE, "Standard Specifications for Public Key IEEE, "Standard Specifications for Public Key
Cryptography", IEEE 1363 , 2000. Cryptography", IEEE 1363 , 2000.
[PKCS6] RSA Laboratories, "PKCS #6: RSA Extended Certificate [PKCS6] RSA Laboratories, "PKCS #6: RSA Extended Certificate
skipping to change at page 89, line 48 skipping to change at page 89, line 44
[RFC6091] Mavrogiannopoulos, N. and D. Gillmor, "Using OpenPGP Keys [RFC6091] Mavrogiannopoulos, N. and D. Gillmor, "Using OpenPGP Keys
for Transport Layer Security (TLS) Authentication", for Transport Layer Security (TLS) Authentication",
RFC 6091, DOI 10.17487/RFC6091, February 2011, RFC 6091, DOI 10.17487/RFC6091, February 2011,
<http://www.rfc-editor.org/info/rfc6091>. <http://www.rfc-editor.org/info/rfc6091>.
[RFC6176] Turner, S. and T. Polk, "Prohibiting Secure Sockets Layer [RFC6176] Turner, S. and T. Polk, "Prohibiting Secure Sockets Layer
(SSL) Version 2.0", RFC 6176, DOI 10.17487/RFC6176, March (SSL) Version 2.0", RFC 6176, DOI 10.17487/RFC6176, March
2011, <http://www.rfc-editor.org/info/rfc6176>. 2011, <http://www.rfc-editor.org/info/rfc6176>.
[RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer
Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347,
January 2012, <http://www.rfc-editor.org/info/rfc6347>.
[RFC6520] Seggelmann, R., Tuexen, M., and M. Williams, "Transport [RFC6520] Seggelmann, R., Tuexen, M., and M. Williams, "Transport
Layer Security (TLS) and Datagram Transport Layer Security Layer Security (TLS) and Datagram Transport Layer Security
(DTLS) Heartbeat Extension", RFC 6520, (DTLS) Heartbeat Extension", RFC 6520,
DOI 10.17487/RFC6520, February 2012, DOI 10.17487/RFC6520, February 2012,
<http://www.rfc-editor.org/info/rfc6520>. <http://www.rfc-editor.org/info/rfc6520>.
[RFC6961] Pettersen, Y., "The Transport Layer Security (TLS) [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Multiple Certificate Status Request Extension", RFC 6961, Protocol (HTTP/1.1): Message Syntax and Routing",
DOI 10.17487/RFC6961, June 2013, RFC 7230, DOI 10.17487/RFC7230, June 2014,
<http://www.rfc-editor.org/info/rfc6961>. <http://www.rfc-editor.org/info/rfc7230>.
[RFC6962] Laurie, B., Langley, A., and E. Kasper, "Certificate
Transparency", RFC 6962, DOI 10.17487/RFC6962, June 2013,
<http://www.rfc-editor.org/info/rfc6962>.
[RFC7250] Wouters, P., Ed., Tschofenig, H., Ed., Gilmore, J., [RFC7250] Wouters, P., Ed., Tschofenig, H., Ed., Gilmore, J.,
Weiler, S., and T. Kivinen, "Using Raw Public Keys in Weiler, S., and T. Kivinen, "Using Raw Public Keys in
Transport Layer Security (TLS) and Datagram Transport Transport Layer Security (TLS) and Datagram Transport
Layer Security (DTLS)", RFC 7250, DOI 10.17487/RFC7250, Layer Security (DTLS)", RFC 7250, DOI 10.17487/RFC7250,
June 2014, <http://www.rfc-editor.org/info/rfc7250>. June 2014, <http://www.rfc-editor.org/info/rfc7250>.
[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,
skipping to change at page 91, line 10 skipping to change at page 91, line 10
[RSA] Rivest, R., Shamir, A., and L. Adleman, "A Method for [RSA] Rivest, R., Shamir, A., and L. Adleman, "A Method for
Obtaining Digital Signatures and Public-Key Obtaining Digital Signatures and Public-Key
Cryptosystems", Communications of the ACM v. 21, n. 2, pp. Cryptosystems", Communications of the ACM v. 21, n. 2, pp.
120-126., February 1978. 120-126., February 1978.
[SLOTH] Bhargavan, K. and G. Leurent, "Transcript Collision [SLOTH] Bhargavan, K. and G. Leurent, "Transcript Collision
Attacks: Breaking Authentication in TLS, IKE, and SSH", Attacks: Breaking Authentication in TLS, IKE, and SSH",
Network and Distributed System Security Symposium (NDSS Network and Distributed System Security Symposium (NDSS
2016) , 2016. 2016) , 2016.
[SSL2] Netscape Communications Corp., "The SSL Protocol", [SSL2] Hickman, K., "The SSL Protocol", February 1995.
February 1995.
[SSL3] Freier, A., Karlton, P., and P. Kocher, "The SSL 3.0 [SSL3] Freier, A., Karlton, P., and P. Kocher, "The SSL 3.0
Protocol", November 1996. Protocol", November 1996.
[TIMING] Boneh, D. and D. Brumley, "Remote timing attacks are [TIMING] Boneh, D. and D. Brumley, "Remote timing attacks are
practical", USENIX Security Symposium, 2003. practical", USENIX Security Symposium, 2003.
[X501] "Information Technology - Open Systems Interconnection - [X501] "Information Technology - Open Systems Interconnection -
The Directory: Models", ITU-T X.501, 1993. The Directory: Models", ITU-T X.501, 1993.
skipping to change at page 94, line 20 skipping to change at page 94, line 20
server_hello(2), server_hello(2),
session_ticket(4), session_ticket(4),
hello_retry_request(6), hello_retry_request(6),
encrypted_extensions(8), encrypted_extensions(8),
certificate(11), certificate(11),
server_key_exchange_RESERVED(12), server_key_exchange_RESERVED(12),
certificate_request(13), certificate_request(13),
server_hello_done_RESERVED(14), server_hello_done_RESERVED(14),
certificate_verify(15), certificate_verify(15),
client_key_exchange_RESERVED(16), client_key_exchange_RESERVED(16),
server_configuration(17),
finished(20), finished(20),
key_update(24), key_update(24),
(255) (255)
} HandshakeType; } HandshakeType;
struct { struct {
HandshakeType msg_type; /* handshake type */ HandshakeType msg_type; /* handshake type */
uint24 length; /* bytes in message */ uint24 length; /* bytes in message */
select (HandshakeType) { select (HandshakeType) {
case client_hello: ClientHello; case client_hello: ClientHello;
case server_hello: ServerHello; case server_hello: ServerHello;
case hello_retry_request: HelloRetryRequest; case hello_retry_request: HelloRetryRequest;
case encrypted_extensions: EncryptedExtensions; case encrypted_extensions: EncryptedExtensions;
case certificate_request: CertificateRequest; case certificate_request: CertificateRequest;
case server_configuration: ServerConfiguration;
case certificate: Certificate; case certificate: Certificate;
case certificate_verify: CertificateVerify; case certificate_verify: CertificateVerify;
case finished: Finished; case finished: Finished;
case session_ticket: NewSessionTicket; case session_ticket: NewSessionTicket;
case key_update: KeyUpdate; case key_update: KeyUpdate;
} body; } body;
} Handshake; } Handshake;
A.3.1. Key Exchange Messages A.3.1. Key Exchange Messages
skipping to change at page 95, line 37 skipping to change at page 95, line 35
ExtensionType extension_type; ExtensionType extension_type;
opaque extension_data<0..2^16-1>; opaque extension_data<0..2^16-1>;
} Extension; } Extension;
enum { enum {
supported_groups(10), supported_groups(10),
signature_algorithms(13), signature_algorithms(13),
key_share(40), key_share(40),
pre_shared_key(41), pre_shared_key(41),
early_data(42), early_data(42),
ticket_age(43),
cookie (44),
(65535) (65535)
} ExtensionType; } ExtensionType;
struct { struct {
NamedGroup group; NamedGroup group;
opaque key_exchange<1..2^16-1>; opaque key_exchange<1..2^16-1>;
} KeyShareEntry; } KeyShareEntry;
struct { struct {
select (role) { select (role) {
case client: case client:
KeyShareEntry client_shares<4..2^16-1>; KeyShareEntry client_shares<0..2^16-1>;
case server: case server:
KeyShareEntry server_share; KeyShareEntry server_share;
} }
} KeyShare; } KeyShare;
opaque dh_Y<1..2^16-1>;
opaque point <1..2^8-1>;
opaque psk_identity<0..2^16-1>; opaque psk_identity<0..2^16-1>;
struct { struct {
select (Role) { select (Role) {
case client: case client:
psk_identity identities<2..2^16-1>; psk_identity identities<2..2^16-1>;
case server: case server:
psk_identity identity; uint16 selected_identity;
} }
} PreSharedKeyExtension; } PreSharedKeyExtension;
struct { struct {
select (Role) { select (Role) {
case client: case client:
opaque configuration_id<1..2^16-1>;
CipherSuite cipher_suite;
Extension extensions<0..2^16-1>;
opaque context<0..255>; opaque context<0..255>;
case server: case server:
struct {}; struct {};
} }
} EarlyDataIndication; } EarlyDataIndication;
A.3.1.1. Signature Algorithm Extension struct {
uint32 ticket_age;
} TicketAge;
A.3.1.1. Cookie Extension
struct {
opaque cookie<0..255>;
} Cookie;
A.3.1.2. Signature Algorithm Extension
enum { enum {
// RSASSA-PKCS-v1_5 algorithms. /* RSASSA-PKCS-v1_5 algorithms */
rsa_pkcs1_sha1 (0x0201), rsa_pkcs1_sha1 (0x0201),
rsa_pkcs1_sha256 (0x0401), rsa_pkcs1_sha256 (0x0401),
rsa_pkcs1_sha384 (0x0501), rsa_pkcs1_sha384 (0x0501),
rsa_pkcs1_sha512 (0x0601), rsa_pkcs1_sha512 (0x0601),
// DSA algorithms (deprecated). /* ECDSA algorithms */
dsa_sha1 (0x0202),
dsa_sha256 (0x0402),
dsa_sha384 (0x0502),
dsa_sha512 (0x0602),
// ECDSA algorithms.
ecdsa_secp256r1_sha256 (0x0403), ecdsa_secp256r1_sha256 (0x0403),
ecdsa_secp384r1_sha384 (0x0503), ecdsa_secp384r1_sha384 (0x0503),
ecdsa_secp521r1_sha512 (0x0603), ecdsa_secp521r1_sha512 (0x0603),
// RSASSA-PSS algorithms. /* RSASSA-PSS algorithms */
rsa_pss_sha256 (0x0700), rsa_pss_sha256 (0x0700),
rsa_pss_sha384 (0x0701), rsa_pss_sha384 (0x0701),
rsa_pss_sha512 (0x0702), rsa_pss_sha512 (0x0702),
// EdDSA algorithms. /* EdDSA algorithms */
ed25519 (0x0703), ed25519 (0x0703),
ed448 (0x0704), ed448 (0x0704),
// Reserved Code Points. /* Reserved Code Points */
dsa_sha1_RESERVED (0x0202),
dsa_sha256_RESERVED (0x0402),
dsa_sha384_RESERVED (0x0502),
dsa_sha512_RESERVED (0x0602),
obsolete_RESERVED (0x0000..0x0200), obsolete_RESERVED (0x0000..0x0200),
obsolete_RESERVED (0x0203..0x0400), obsolete_RESERVED (0x0203..0x0400),
obsolete_RESERVED (0x0404..0x0500), obsolete_RESERVED (0x0404..0x0500),
obsolete_RESERVED (0x0504..0x0600), obsolete_RESERVED (0x0504..0x0600),
obsolete_RESERVED (0x0604..0x06FF), obsolete_RESERVED (0x0604..0x06FF),
private_use (0xFE00..0xFFFF), private_use (0xFE00..0xFFFF),
(0xFFFF) (0xFFFF)
} SignatureScheme; } SignatureScheme;
SignatureScheme supported_signature_algorithms<2..2^16-2>; SignatureScheme supported_signature_algorithms<2..2^16-2>;
A.3.1.2. Named Group Extension A.3.1.3. Named Group Extension
enum { enum {
// Elliptic Curve Groups (ECDHE). /* Elliptic Curve Groups (ECDHE) */
obsolete_RESERVED (1..22), obsolete_RESERVED (1..22),
secp256r1 (23), secp384r1 (24), secp521r1 (25), secp256r1 (23), secp384r1 (24), secp521r1 (25),
obsolete_RESERVED (26..28), obsolete_RESERVED (26..28),
x25519 (29), x448 (30), x25519 (29), x448 (30),
// Finite Field Groups (DHE). /* Finite Field Groups (DHE) */
ffdhe2048 (256), ffdhe3072 (257), ffdhe4096 (258), ffdhe2048 (256), ffdhe3072 (257), ffdhe4096 (258),
ffdhe6144 (259), ffdhe8192 (260), ffdhe6144 (259), ffdhe8192 (260),
// Reserved Code Points. /* Reserved Code Points */
ffdhe_private_use (0x01FC..0x01FF), ffdhe_private_use (0x01FC..0x01FF),
ecdhe_private_use (0xFE00..0xFEFF), ecdhe_private_use (0xFE00..0xFEFF),
obsolete_RESERVED (0xFF01..0xFF02), obsolete_RESERVED (0xFF01..0xFF02),
(0xFFFF) (0xFFFF)
} NamedGroup; } NamedGroup;
struct { struct {
NamedGroup named_group_list<1..2^16-1>; NamedGroup named_group_list<1..2^16-1>;
} NamedGroupList; } NamedGroupList;
Values within "obsolete_RESERVED" ranges were used in previous Values within "obsolete_RESERVED" ranges were used in previous
versions of TLS and MUST NOT be offered or negotiated by TLS 1.3 versions of TLS and MUST NOT be offered or negotiated by TLS 1.3
implementations. The obsolete curves have various known/theoretical implementations. The obsolete curves have various known/theoretical
weaknesses or have had very little usage, in some cases only due to weaknesses or have had very little usage, in some cases only due to
unintentional server configuration issues. They are no longer unintentional server configuration issues. They are no longer
considered appropriate for general use and should be assumed to be considered appropriate for general use and should be assumed to be
potentially unsafe. The set of curves specified here is sufficient potentially unsafe. The set of curves specified here is sufficient
for interoperability with all currently deployed and properly for interoperability with all currently deployed and properly
configured TLS implementations. configured TLS implementations.
A.3.1.3. Deprecated Extensions A.3.1.4. Deprecated Extensions
The following extensions are no longer applicable to TLS 1.3, The following extensions are no longer applicable to TLS 1.3,
although TLS 1.3 clients MAY send them if they are willing to although TLS 1.3 clients MAY send them if they are willing to
negotiate them with prior versions of TLS. TLS 1.3 servers MUST negotiate them with prior versions of TLS. TLS 1.3 servers MUST
ignore these extensions if they are negotiating TLS 1.3: ignore these extensions if they are negotiating TLS 1.3:
truncated_hmac [RFC6066], srp [RFC5054], encrypt_then_mac [RFC7366], truncated_hmac [RFC6066], srp [RFC5054], encrypt_then_mac [RFC7366],
extended_master_secret [RFC7627], SessionTicket [RFC5077], and extended_master_secret [RFC7627], SessionTicket [RFC5077], and
renegotiation_info [RFC5746]. renegotiation_info [RFC5746].
A.3.2. Server Parameters Messages A.3.2. Server Parameters Messages
struct { struct {
Extension extensions<0..2^16-1>; Extension extensions<0..2^16-1>;
} EncryptedExtensions; } EncryptedExtensions;
opaque DistinguishedName<1..2^16-1>;
struct {
opaque certificate_extension_oid<1..2^8-1>;
opaque certificate_extension_values<0..2^16-1>;
} CertificateExtension;
struct {
opaque certificate_request_context<0..2^8-1>;
SignatureScheme
supported_signature_algorithms<2..2^16-2>;
DistinguishedName certificate_authorities<0..2^16-1>;
CertificateExtension certificate_extensions<0..2^16-1>;
} CertificateRequest;
enum { (65535) } ConfigurationExtensionType;
enum { client_authentication(1), early_data(2), opaque DistinguishedName<1..2^16-1>;
client_authentication_and_data(3), (255) } EarlyDataType;
struct { struct {
ConfigurationExtensionType extension_type; opaque certificate_extension_oid<1..2^8-1>;
opaque extension_data<0..2^16-1>; opaque certificate_extension_values<0..2^16-1>;
} ConfigurationExtension; } CertificateExtension;
struct { struct {
opaque configuration_id<1..2^16-1>; opaque certificate_request_context<0..2^8-1>;
uint32 expiration_date; SignatureScheme
KeyShareEntry static_key_share; supported_signature_algorithms<2..2^16-2>;
EarlyDataType early_data_type; DistinguishedName certificate_authorities<0..2^16-1>;
ConfigurationExtension extensions<0..2^16-1>; CertificateExtension certificate_extensions<0..2^16-1>;
} ServerConfiguration; } CertificateRequest;
A.3.3. Authentication Messages A.3.3. Authentication Messages
opaque ASN1Cert<1..2^24-1>; opaque ASN1Cert<1..2^24-1>;
struct { struct {
opaque certificate_request_context<0..2^8-1>; opaque certificate_request_context<0..2^8-1>;
ASN1Cert certificate_list<0..2^24-1>; ASN1Cert certificate_list<0..2^24-1>;
} Certificate; } Certificate;
struct { struct {
digitally-signed struct { digitally-signed struct {
opaque hashed_data[hash_length]; opaque hashed_data[hash_length];
skipping to change at page 100, line 22 skipping to change at page 100, line 4
digitally-signed struct { digitally-signed struct {
opaque hashed_data[hash_length]; opaque hashed_data[hash_length];
}; };
} CertificateVerify; } CertificateVerify;
struct { struct {
opaque verify_data[verify_data_length]; opaque verify_data[verify_data_length];
} Finished; } Finished;
A.3.4. Ticket Establishment A.3.4. Ticket Establishment
enum { (65535) } TicketExtensionType;
struct { struct {
uint32 ticket_lifetime; TicketExtensionType extension_type;
opaque ticket<0..2^16-1>; opaque extension_data<0..2^16-1>;
} NewSessionTicket; } TicketExtension;
enum {
allow_early_data(1)
allow_dhe_resumption(2),
allow_psk_resumption(4)
} TicketFlags;
struct {
uint32 ticket_lifetime;
uint32 flags;
TicketExtension extensions<2..2^16-2>;
opaque ticket<0..2^16-1>;
} NewSessionTicket;
A.4. Cipher Suites A.4. Cipher Suites
A cipher suite defines a cipher specification supported in TLS and A cipher suite defines a cipher specification supported in TLS and
negotiated via hello messages in the TLS handshake. Cipher suite negotiated via hello messages in the TLS handshake. Cipher suite
names follow a general naming convention composed of a series of names follow a general naming convention composed of a series of
component algorithm names separated by underscores: component algorithm names separated by underscores:
CipherSuite TLS_KEA_AUTH_WITH_CIPHER_HASH = VALUE; CipherSuite TLS_KEA_AUTH_WITH_CIPHER_HASH = VALUE;
skipping to change at page 107, line 44 skipping to change at page 107, line 44
be able to view information about the certificate and root CA. be able to view information about the certificate and root CA.
B.3. Cipher Suite Support B.3. Cipher Suite Support
TLS supports a range of key sizes and security levels, including some TLS supports a range of key sizes and security levels, including some
that provide no or minimal security. A proper implementation will that provide no or minimal security. A proper implementation will
probably not support many cipher suites. Applications SHOULD also probably not support many cipher suites. Applications SHOULD also
enforce minimum and maximum key sizes. For example, certification enforce minimum and maximum key sizes. For example, certification
paths containing keys or signatures weaker than 2048-bit RSA or paths containing keys or signatures weaker than 2048-bit RSA or
224-bit ECDSA are not appropriate for secure applications. See also 224-bit ECDSA are not appropriate for secure applications. See also
Appendix C.3. Appendix C.4.
B.4. Implementation Pitfalls B.4. Implementation Pitfalls
Implementation experience has shown that certain parts of earlier TLS Implementation experience has shown that certain parts of earlier TLS
specifications are not easy to understand, and have been a source of specifications are not easy to understand, and have been a source of
interoperability and security problems. Many of these areas have interoperability and security problems. Many of these areas have
been clarified in this document, but this appendix contains a short been clarified in this document, but this appendix contains a short
list of the most important things that require special attention from list of the most important things that require special attention from
implementors. implementors.
skipping to change at page 108, line 26 skipping to change at page 108, line 26
- Do you ignore the TLS record layer version number in all TLS - Do you ignore the TLS record layer version number in all TLS
records? (see Appendix C) records? (see Appendix C)
- Have you ensured that all support for SSL, RC4, EXPORT ciphers, - Have you ensured that all support for SSL, RC4, EXPORT ciphers,
and MD5 (via the "signature_algorithm" extension) is completely and MD5 (via the "signature_algorithm" extension) is completely
removed from all possible configurations that support TLS 1.3 or removed from all possible configurations that support TLS 1.3 or
later, and that attempts to use these obsolete capabilities fail later, and that attempts to use these obsolete capabilities fail
correctly? (see Appendix C) correctly? (see Appendix C)
- Do you handle TLS extensions in ClientHello correctly, including - Do you handle TLS extensions in ClientHello correctly, including
omitting the extensions field completely? unknown extensions or omitting the extensions field completely?
- When the server has requested a client certificate, but no - When the server has requested a client certificate, but no
suitable certificate is available, do you correctly send an empty suitable certificate is available, do you correctly send an empty
Certificate message, instead of omitting the whole message (see Certificate message, instead of omitting the whole message (see
Section 6.3.4.1.2)? Section 6.3.4.1.2)?
- When processing the plaintext fragment produced by AEAD-Decrypt - When processing the plaintext fragment produced by AEAD-Decrypt
and scanning from the end for the ContentType, do you avoid and scanning from the end for the ContentType, do you avoid
scanning past the start of the cleartext in the event that the scanning past the start of the cleartext in the event that the
peer has sent a malformed plaintext of all-zeros? peer has sent a malformed plaintext of all-zeros?
- When processing a ClientHello containing a version of { 3, 5 } or
higher, do you respond with the highest common version of TLS
rather than requiring an exact match?
- Do you ignore unrecognized cipher suites (see Section 6.3.1.1),
named groups (see Section 6.3.2.3), and signature algorithms (see
Section 6.3.2.2)?
Cryptographic details: Cryptographic details:
- What countermeasures do you use to prevent timing attacks against - What countermeasures do you use to prevent timing attacks against
RSA signing operations [TIMING]? RSA signing operations [TIMING]?
- When verifying RSA signatures, do you accept both NULL and missing - When verifying RSA signatures, do you accept both NULL and missing
parameters (see Section 4.8)? Do you verify that the RSA padding parameters (see Section 4.8)? Do you verify that the RSA padding
doesn't have additional data after the hash value? [FI06] doesn't have additional data after the hash value? [FI06]
- When using Diffie-Hellman key exchange, do you correctly strip - When using Diffie-Hellman key exchange, do you correctly preserve
leading zero bytes from the negotiated key (see Section 7.3.2)? leading zero bytes in the negotiated key (see Section 7.3.1)?
- Does your TLS client check that the Diffie-Hellman parameters sent - Does your TLS client check that the Diffie-Hellman parameters sent
by the server are acceptable (see Appendix D.1.1.1)? by the server are acceptable (see Appendix D.1.1.1)?
- Do you use a strong and, most importantly, properly seeded random - Do you use a strong and, most importantly, properly seeded random
number generator (see Appendix B.1) Diffie-Hellman private values, number generator (see Appendix B.1) Diffie-Hellman private values,
the ECDSA "k" parameter, and other security-critical values? the ECDSA "k" parameter, and other security-critical values?
- Do you zero-pad Diffie-Hellman public key values to the group size
(see Section 6.3.2.4.1)?
B.5. Client Tracking Prevention
Clients SHOULD NOT reuse a session ticket for multiple connections.
Reuse of a session ticket allows passive observers to correlate
different connections. Servers that issue session tickets SHOULD
offer at least as many session tickets as the number of connections
that a client might use; for example, a web browser using HTTP/1.1
[RFC7230] might open six connections to a server. Servers SHOULD
issue new session tickets with every connection. This ensures that
clients are always able to use a new session ticket when creating a
new connection.
Appendix C. Backward Compatibility Appendix C. Backward Compatibility
The TLS protocol provides a built-in mechanism for version The TLS protocol provides a built-in mechanism for version
negotiation between endpoints potentially supporting different negotiation between endpoints potentially supporting different
versions of TLS. versions of TLS.
TLS 1.x and SSL 3.0 use compatible ClientHello messages. Servers can TLS 1.x and SSL 3.0 use compatible ClientHello messages. Servers can
also handle clients trying to use future versions of TLS as long as also handle clients trying to use future versions of TLS as long as
the ClientHello format remains compatible and the client supports the the ClientHello format remains compatible and the client supports the
highest protocol version available in the server. highest protocol version available in the server.
skipping to change at page 110, line 4 skipping to change at page 110, line 29
used. used.
C.1. Negotiating with an older server C.1. Negotiating with an older server
A TLS 1.3 client who wishes to negotiate with such older servers will A TLS 1.3 client who wishes to negotiate with such older servers will
send a normal TLS 1.3 ClientHello containing { 3, 4 } (TLS 1.3) in send a normal TLS 1.3 ClientHello containing { 3, 4 } (TLS 1.3) in
ClientHello.client_version. If the server does not support this ClientHello.client_version. If the server does not support this
version it will respond with a ServerHello containing an older version it will respond with a ServerHello containing an older
version number. If the client agrees to use this version, the version number. If the client agrees to use this version, the
negotiation will proceed as appropriate for the negotiated protocol. negotiation will proceed as appropriate for the negotiated protocol.
A client resuming a session SHOULD initiate the connection using the A client resuming a session SHOULD initiate the connection using the
version that was previously negotiated. version that was previously negotiated.
Note that 0-RTT data is not compatible with older servers. See
Appendix C.3.
If the version chosen by the server is not supported by the client If the version chosen by the server is not supported by the client
(or not acceptable), the client MUST send a "protocol_version" alert (or not acceptable), the client MUST send a "protocol_version" alert
message and close the connection. message and close the connection.
If a TLS server receives a ClientHello containing a version number If a TLS server receives a ClientHello containing a version number
greater than the highest version supported by the server, it MUST greater than the highest version supported by the server, it MUST
reply according to the highest version supported by the server. reply according to the highest version supported by the server.
Some legacy server implementations are known to not implement the TLS Some legacy server implementations are known to not implement the TLS
specification properly and might abort connections upon encountering specification properly and might abort connections upon encountering
skipping to change at page 110, line 41 skipping to change at page 111, line 22
TLS 1.0, 1.1, and 1.2, and client_version is TLS 1.0, the server will TLS 1.0, 1.1, and 1.2, and client_version is TLS 1.0, the server will
proceed with a TLS 1.0 ServerHello. If the server only supports proceed with a TLS 1.0 ServerHello. If the server only supports
versions greater than client_version, it MUST send a versions greater than client_version, it MUST send a
"protocol_version" alert message and close the connection. "protocol_version" alert message and close the connection.
Note that earlier versions of TLS did not clearly specify the record Note that earlier versions of TLS did not clearly specify the record
layer version number value in all cases layer version number value in all cases
(TLSPlaintext.record_version). Servers will receive various TLS 1.x (TLSPlaintext.record_version). Servers will receive various TLS 1.x
versions in this field, however its value MUST always be ignored. versions in this field, however its value MUST always be ignored.
C.3. Backwards Compatibility Security Restrictions C.3. Zero-RTT backwards compatibility
0-RTT data is not compatible with older servers. An older server
will respond to the ClientHello with an older ServerHello, but it
will not correctly skip the 0-RTT data and fail to complete the
handshake. This can cause issues when a client offers 0-RTT,
particularly against multi-server deployments. For example, a
deployment may deploy TLS 1.3 gradually with some servers
implementing TLS 1.3 and some implementing TLS 1.2, or a TLS 1.3
deployment may be downgraded to TLS 1.2.
If a client accepts older versions of TLS and receives an older
ServerHello after sending a ClientHello with 0-RTT data, it MAY retry
the connection without 0-RTT. It is NOT RECOMMENDED to retry the
connection in response to a more generic error or advertise lower
versions of TLS.
Multi-server deployments are RECOMMENDED to ensure a stable
deployment of TLS 1.3 without 0-RTT prior to enabling 0-RTT.
C.4. Backwards Compatibility Security Restrictions
If an implementation negotiates use of TLS 1.2, then negotiation of If an implementation negotiates use of TLS 1.2, then negotiation of
cipher suites also supported by TLS 1.3 SHOULD be preferred, if cipher suites also supported by TLS 1.3 SHOULD be preferred, if
available. available.
The security of RC4 cipher suites is considered insufficient for the The security of RC4 cipher suites is considered insufficient for the
reasons cited in [RFC7465]. Implementations MUST NOT offer or reasons cited in [RFC7465]. Implementations MUST NOT offer or
negotiate RC4 cipher suites for any version of TLS for any reason. negotiate RC4 cipher suites for any version of TLS for any reason.
Old versions of TLS permitted the use of very low strength ciphers. Old versions of TLS permitted the use of very low strength ciphers.
skipping to change at page 112, line 41 skipping to change at page 113, line 41
required to generate the Finished messages and record protection keys required to generate the Finished messages and record protection keys
(see Section 6.3.4.3 and Section 7.3). By sending a correct Finished (see Section 6.3.4.3 and Section 7.3). By sending a correct Finished
message, parties thus prove that they know the correct master_secret. message, parties thus prove that they know the correct master_secret.
D.1.1.1. Diffie-Hellman Key Exchange with Authentication D.1.1.1. Diffie-Hellman Key Exchange with Authentication
When Diffie-Hellman key exchange is used, the client and server use When Diffie-Hellman key exchange is used, the client and server use
the "key_share" extension to send temporary Diffie-Hellman the "key_share" extension to send temporary Diffie-Hellman
parameters. The signature in the certificate verify message (if parameters. The signature in the certificate verify message (if
present) covers the entire handshake up to that point and thus present) covers the entire handshake up to that point and thus
attests the certificate holder's desire to use the the ephemeral DHE attests the certificate holder's desire to use the ephemeral DHE
keys. keys.
Peers SHOULD validate each other's public key Y (dh_Ys offered by the Peers SHOULD validate each other's public key Y by ensuring that 1 <
server or DH_Yc offered by the client) by ensuring that 1 < Y < p-1. Y < p-1. This simple check ensures that the remote peer is properly
This simple check ensures that the remote peer is properly behaved behaved and isn't forcing the local system into a small subgroup.
and isn't forcing the local system into a small subgroup.
Additionally, using a fresh key for each handshake provides Perfect Additionally, using a fresh key for each handshake provides Perfect
Forward Secrecy. Implementations SHOULD generate a new X for each Forward Secrecy. Implementations SHOULD generate a new X for each
handshake when using DHE cipher suites. handshake when using DHE cipher suites.
D.1.2. Version Rollback Attacks D.1.2. Version Rollback Attacks
Because TLS includes substantial improvements over SSL Version 2.0, Because TLS includes substantial improvements over SSL Version 2.0,
attackers may try to make TLS-capable clients and servers fall back attackers may try to make TLS-capable clients and servers fall back
to Version 2.0. This attack can occur if (and only if) two TLS- to Version 2.0. This attack can occur if (and only if) two TLS-
capable parties use an SSL 2.0 handshake. (See also Appendix C.3.) capable parties use an SSL 2.0 handshake. (See also Appendix C.4.)
Although the solution using non-random PKCS #1 block type 2 message Although the solution using non-random PKCS #1 block type 2 message
padding is inelegant, it provides a reasonably secure way for Version padding is inelegant, it provides a reasonably secure way for Version
3.0 servers to detect the attack. This solution is not secure 3.0 servers to detect the attack. This solution is not secure
against attackers who can brute-force the key and substitute a new against attackers who can brute-force the key and substitute a new
ENCRYPTED-KEY-DATA message containing the same key (but with normal ENCRYPTED-KEY-DATA message containing the same key (but with normal
padding) before the application-specified wait threshold has expired. padding) before the application-specified wait threshold has expired.
Altering the padding of the least-significant 8 bytes of the PKCS Altering the padding of the least-significant 8 bytes of the PKCS
padding does not impact security for the size of the signed hashes padding does not impact security for the size of the signed hashes
and RSA key lengths used in the protocol, since this is essentially and RSA key lengths used in the protocol, since this is essentially
 End of changes. 245 change blocks. 
948 lines changed or deleted 972 lines changed or added

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