draft-ietf-tls-tls13-19.txt   draft-ietf-tls-tls13-20.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 10, 2017 Obsoletes: 5077, 5246 (if approved) April 28, 2017
approved)
Updates: 4492, 5705, 6066, 6961 (if Updates: 4492, 5705, 6066, 6961 (if
approved) approved)
Intended status: Standards Track Intended status: Standards Track
Expires: September 11, 2017 Expires: October 30, 2017
The Transport Layer Security (TLS) Protocol Version 1.3 The Transport Layer Security (TLS) Protocol Version 1.3
draft-ietf-tls-tls13-19 draft-ietf-tls-tls13-20
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. TLS allows client/server applications to communicate (TLS) protocol. TLS allows client/server applications to communicate
over the Internet in a way that is designed to prevent eavesdropping, over the Internet in a way that is designed to prevent eavesdropping,
tampering, and message forgery. tampering, and message forgery.
Status of This Memo Status of This Memo
skipping to change at page 1, line 37 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 11, 2017. This Internet-Draft will expire on October 30, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2017 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 23 skipping to change at page 2, line 22
Without obtaining an adequate license from the person(s) controlling Without obtaining an adequate license from the person(s) controlling
the copyright in such materials, this document may not be modified the copyright in such materials, this document may not be modified
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 . . . . . . . . . . . . . . . 6
1.2. Major Differences from TLS 1.2 . . . . . . . . . . . . . 6 1.2. Change Log . . . . . . . . . . . . . . . . . . . . . . . 6
1.3. Updates Affecting TLS 1.2 . . . . . . . . . . . . . . . . 13 1.3. Major Differences from TLS 1.2 . . . . . . . . . . . . . 14
2. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 14 1.4. Updates Affecting TLS 1.2 . . . . . . . . . . . . . . . . 15
2.1. Incorrect DHE Share . . . . . . . . . . . . . . . . . . . 17 2. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 16
2.2. Resumption and Pre-Shared Key (PSK) . . . . . . . . . . . 18 2.1. Incorrect DHE Share . . . . . . . . . . . . . . . . . . . 19
2.3. Zero-RTT Data . . . . . . . . . . . . . . . . . . . . . . 20 2.2. Resumption and Pre-Shared Key (PSK) . . . . . . . . . . . 20
3. Presentation Language . . . . . . . . . . . . . . . . . . . . 22 2.3. Zero-RTT Data . . . . . . . . . . . . . . . . . . . . . . 22
3.1. Basic Block Size . . . . . . . . . . . . . . . . . . . . 22 3. Presentation Language . . . . . . . . . . . . . . . . . . . . 24
3.2. Miscellaneous . . . . . . . . . . . . . . . . . . . . . . 22 3.1. Basic Block Size . . . . . . . . . . . . . . . . . . . . 24
3.3. Vectors . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.2. Miscellaneous . . . . . . . . . . . . . . . . . . . . . . 24
3.4. Numbers . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.3. Vectors . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.5. Enumerateds . . . . . . . . . . . . . . . . . . . . . . . 24 3.4. Numbers . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.6. Constructed Types . . . . . . . . . . . . . . . . . . . . 25 3.5. Enumerateds . . . . . . . . . . . . . . . . . . . . . . . 26
3.7. Constants . . . . . . . . . . . . . . . . . . . . . . . . 25 3.6. Constructed Types . . . . . . . . . . . . . . . . . . . . 27
3.8. Variants . . . . . . . . . . . . . . . . . . . . . . . . 25 3.7. Constants . . . . . . . . . . . . . . . . . . . . . . . . 27
3.9. Decoding Errors . . . . . . . . . . . . . . . . . . . . . 26 3.8. Variants . . . . . . . . . . . . . . . . . . . . . . . . 28
4. Handshake Protocol . . . . . . . . . . . . . . . . . . . . . 27 4. Handshake Protocol . . . . . . . . . . . . . . . . . . . . . 29
4.1. Key Exchange Messages . . . . . . . . . . . . . . . . . . 28 4.1. Key Exchange Messages . . . . . . . . . . . . . . . . . . 30
4.1.1. Cryptographic Negotiation . . . . . . . . . . . . . . 28 4.1.1. Cryptographic Negotiation . . . . . . . . . . . . . . 30
4.1.2. Client Hello . . . . . . . . . . . . . . . . . . . . 29 4.1.2. Client Hello . . . . . . . . . . . . . . . . . . . . 31
4.1.3. Server Hello . . . . . . . . . . . . . . . . . . . . 32 4.1.3. Server Hello . . . . . . . . . . . . . . . . . . . . 34
4.1.4. Hello Retry Request . . . . . . . . . . . . . . . . . 34 4.1.4. Hello Retry Request . . . . . . . . . . . . . . . . . 36
4.2. Extensions . . . . . . . . . . . . . . . . . . . . . . . 35 4.2. Extensions . . . . . . . . . . . . . . . . . . . . . . . 37
4.2.1. Supported Versions . . . . . . . . . . . . . . . . . 38 4.2.1. Supported Versions . . . . . . . . . . . . . . . . . 40
4.2.2. Cookie . . . . . . . . . . . . . . . . . . . . . . . 39 4.2.2. Cookie . . . . . . . . . . . . . . . . . . . . . . . 41
4.2.3. Signature Algorithms . . . . . . . . . . . . . . . . 39 4.2.3. Signature Algorithms . . . . . . . . . . . . . . . . 42
4.2.4. Negotiated Groups . . . . . . . . . . . . . . . . . . 42 4.2.4. Certificate Authorities . . . . . . . . . . . . . . . 45
4.2.5. Key Share . . . . . . . . . . . . . . . . . . . . . . 44 4.2.5. Post-Handshake Client Authentication . . . . . . . . 46
4.2.6. Pre-Shared Key Exchange Modes . . . . . . . . . . . . 47 4.2.6. Negotiated Groups . . . . . . . . . . . . . . . . . . 46
4.2.7. Early Data Indication . . . . . . . . . . . . . . . . 47 4.2.7. Key Share . . . . . . . . . . . . . . . . . . . . . . 47
4.2.8. Pre-Shared Key Extension . . . . . . . . . . . . . . 50 4.2.8. Pre-Shared Key Exchange Modes . . . . . . . . . . . . 51
4.3. Server Parameters . . . . . . . . . . . . . . . . . . . . 54 4.2.9. Early Data Indication . . . . . . . . . . . . . . . . 51
4.3.1. Encrypted Extensions . . . . . . . . . . . . . . . . 54 4.2.10. Pre-Shared Key Extension . . . . . . . . . . . . . . 54
4.3.2. Certificate Request . . . . . . . . . . . . . . . . . 54 4.3. Server Parameters . . . . . . . . . . . . . . . . . . . . 58
4.4. Authentication Messages . . . . . . . . . . . . . . . . . 56 4.3.1. Encrypted Extensions . . . . . . . . . . . . . . . . 58
4.4.1. The Transcript Hash . . . . . . . . . . . . . . . . . 57 4.3.2. Certificate Request . . . . . . . . . . . . . . . . . 59
4.4.2. Certificate . . . . . . . . . . . . . . . . . . . . . 58 4.4. Authentication Messages . . . . . . . . . . . . . . . . . 61
4.4.3. Certificate Verify . . . . . . . . . . . . . . . . . 62 4.4.1. The Transcript Hash . . . . . . . . . . . . . . . . . 62
4.4.4. Finished . . . . . . . . . . . . . . . . . . . . . . 64 4.4.2. Certificate . . . . . . . . . . . . . . . . . . . . . 63
4.5. End of Early Data . . . . . . . . . . . . . . . . . . . . 65 4.4.3. Certificate Verify . . . . . . . . . . . . . . . . . 67
4.6. Post-Handshake Messages . . . . . . . . . . . . . . . . . 66 4.4.4. Finished . . . . . . . . . . . . . . . . . . . . . . 69
4.6.1. New Session Ticket Message . . . . . . . . . . . . . 66 4.5. End of Early Data . . . . . . . . . . . . . . . . . . . . 70
4.6.2. Post-Handshake Authentication . . . . . . . . . . . . 67 4.6. Post-Handshake Messages . . . . . . . . . . . . . . . . . 71
4.6.3. Key and IV Update . . . . . . . . . . . . . . . . . . 68 4.6.1. New Session Ticket Message . . . . . . . . . . . . . 71
5. Record Protocol . . . . . . . . . . . . . . . . . . . . . . . 69 4.6.2. Post-Handshake Authentication . . . . . . . . . . . . 73
5.1. Record Layer . . . . . . . . . . . . . . . . . . . . . . 69 4.6.3. Key and IV Update . . . . . . . . . . . . . . . . . . 73
5.2. Record Payload Protection . . . . . . . . . . . . . . . . 71 5. Record Protocol . . . . . . . . . . . . . . . . . . . . . . . 74
5.3. Per-Record Nonce . . . . . . . . . . . . . . . . . . . . 73 5.1. Record Layer . . . . . . . . . . . . . . . . . . . . . . 75
5.4. Record Padding . . . . . . . . . . . . . . . . . . . . . 74 5.2. Record Payload Protection . . . . . . . . . . . . . . . . 77
5.5. Limits on Key Usage . . . . . . . . . . . . . . . . . . . 75 5.3. Per-Record Nonce . . . . . . . . . . . . . . . . . . . . 79
6. Alert Protocol . . . . . . . . . . . . . . . . . . . . . . . 75 5.4. Record Padding . . . . . . . . . . . . . . . . . . . . . 79
6.1. Closure Alerts . . . . . . . . . . . . . . . . . . . . . 76 5.5. Limits on Key Usage . . . . . . . . . . . . . . . . . . . 81
6.2. Error Alerts . . . . . . . . . . . . . . . . . . . . . . 77 6. Alert Protocol . . . . . . . . . . . . . . . . . . . . . . . 81
7. Cryptographic Computations . . . . . . . . . . . . . . . . . 80 6.1. Closure Alerts . . . . . . . . . . . . . . . . . . . . . 82
7.1. Key Schedule . . . . . . . . . . . . . . . . . . . . . . 80 6.2. Error Alerts . . . . . . . . . . . . . . . . . . . . . . 83
7.2. Updating Traffic Keys and IVs . . . . . . . . . . . . . . 83 7. Cryptographic Computations . . . . . . . . . . . . . . . . . 86
7.3. Traffic Key Calculation . . . . . . . . . . . . . . . . . 84 7.1. Key Schedule . . . . . . . . . . . . . . . . . . . . . . 86
7.4. (EC)DHE Shared Secret Calculation . . . . . . . . . . . . 84 7.2. Updating Traffic Keys and IVs . . . . . . . . . . . . . . 89
7.4.1. Finite Field Diffie-Hellman . . . . . . . . . . . . . 84 7.3. Traffic Key Calculation . . . . . . . . . . . . . . . . . 90
7.4.2. Elliptic Curve Diffie-Hellman . . . . . . . . . . . . 85 7.4. (EC)DHE Shared Secret Calculation . . . . . . . . . . . . 90
7.5. Exporters . . . . . . . . . . . . . . . . . . . . . . . . 85 7.4.1. Finite Field Diffie-Hellman . . . . . . . . . . . . . 90
8. Compliance Requirements . . . . . . . . . . . . . . . . . . . 86 7.4.2. Elliptic Curve Diffie-Hellman . . . . . . . . . . . . 91
8.1. Mandatory-to-Implement Cipher Suites . . . . . . . . . . 86 7.5. Exporters . . . . . . . . . . . . . . . . . . . . . . . . 91
8.2. Mandatory-to-Implement Extensions . . . . . . . . . . . . 86 8. Compliance Requirements . . . . . . . . . . . . . . . . . . . 92
9. Security Considerations . . . . . . . . . . . . . . . . . . . 88 8.1. Mandatory-to-Implement Cipher Suites . . . . . . . . . . 92
10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 88 8.2. Mandatory-to-Implement Extensions . . . . . . . . . . . . 92
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 89 9. Security Considerations . . . . . . . . . . . . . . . . . . . 94
11.1. Normative References . . . . . . . . . . . . . . . . . . 89 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 94
11.2. Informative References . . . . . . . . . . . . . . . . . 91 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 95
Appendix A. State Machine . . . . . . . . . . . . . . . . . . . 98 11.1. Normative References . . . . . . . . . . . . . . . . . . 95
A.1. Client . . . . . . . . . . . . . . . . . . . . . . . . . 98 11.2. Informative References . . . . . . . . . . . . . . . . . 97
A.2. Server . . . . . . . . . . . . . . . . . . . . . . . . . 98 Appendix A. State Machine . . . . . . . . . . . . . . . . . . . 105
Appendix B. Protocol Data Structures and Constant Values . . . . 99 A.1. Client . . . . . . . . . . . . . . . . . . . . . . . . . 105
B.1. Record Layer . . . . . . . . . . . . . . . . . . . . . . 99 A.2. Server . . . . . . . . . . . . . . . . . . . . . . . . . 105
B.2. Alert Messages . . . . . . . . . . . . . . . . . . . . . 100 Appendix B. Protocol Data Structures and Constant Values . . . . 106
B.3. Handshake Protocol . . . . . . . . . . . . . . . . . . . 102 B.1. Record Layer . . . . . . . . . . . . . . . . . . . . . . 106
B.3.1. Key Exchange Messages . . . . . . . . . . . . . . . . 102 B.2. Alert Messages . . . . . . . . . . . . . . . . . . . . . 107
B.3.2. Server Parameters Messages . . . . . . . . . . . . . 107 B.3. Handshake Protocol . . . . . . . . . . . . . . . . . . . 109
B.3.3. Authentication Messages . . . . . . . . . . . . . . . 108 B.3.1. Key Exchange Messages . . . . . . . . . . . . . . . . 109
B.3.4. Ticket Establishment . . . . . . . . . . . . . . . . 109 B.3.2. Server Parameters Messages . . . . . . . . . . . . . 114
B.3.5. Updating Keys . . . . . . . . . . . . . . . . . . . . 109 B.3.3. Authentication Messages . . . . . . . . . . . . . . . 115
B.4. Cipher Suites . . . . . . . . . . . . . . . . . . . . . . 109 B.3.4. Ticket Establishment . . . . . . . . . . . . . . . . 116
Appendix C. Implementation Notes . . . . . . . . . . . . . . . . 110 B.3.5. Updating Keys . . . . . . . . . . . . . . . . . . . . 116
C.1. API considerations for 0-RTT . . . . . . . . . . . . . . 110 B.4. Cipher Suites . . . . . . . . . . . . . . . . . . . . . . 117
C.2. Random Number Generation and Seeding . . . . . . . . . . 111 Appendix C. Implementation Notes . . . . . . . . . . . . . . . . 118
C.3. Certificates and Authentication . . . . . . . . . . . . . 111 C.1. API considerations for 0-RTT . . . . . . . . . . . . . . 118
C.4. Implementation Pitfalls . . . . . . . . . . . . . . . . . 111 C.2. Random Number Generation and Seeding . . . . . . . . . . 118
C.5. Client Tracking Prevention . . . . . . . . . . . . . . . 113 C.3. Certificates and Authentication . . . . . . . . . . . . . 118
C.6. Unauthenticated Operation . . . . . . . . . . . . . . . . 113 C.4. Implementation Pitfalls . . . . . . . . . . . . . . . . . 119
Appendix D. Backward Compatibility . . . . . . . . . . . . . . . 113 C.5. Client Tracking Prevention . . . . . . . . . . . . . . . 120
D.1. Negotiating with an older server . . . . . . . . . . . . 114 C.6. Unauthenticated Operation . . . . . . . . . . . . . . . . 120
D.2. Negotiating with an older client . . . . . . . . . . . . 115 Appendix D. Backward Compatibility . . . . . . . . . . . . . . . 121
D.3. Zero-RTT backwards compatibility . . . . . . . . . . . . 115 D.1. Negotiating with an older server . . . . . . . . . . . . 122
D.4. Backwards Compatibility Security Restrictions . . . . . . 116 D.2. Negotiating with an older client . . . . . . . . . . . . 122
Appendix E. Overview of Security Properties . . . . . . . . . . 116 D.3. Zero-RTT backwards compatibility . . . . . . . . . . . . 123
E.1. Handshake . . . . . . . . . . . . . . . . . . . . . . . . 117 D.4. Backwards Compatibility Security Restrictions . . . . . . 123
E.2. Record Layer . . . . . . . . . . . . . . . . . . . . . . 120 Appendix E. Overview of Security Properties . . . . . . . . . . 124
Appendix F. Working Group Information . . . . . . . . . . . . . 121 E.1. Handshake . . . . . . . . . . . . . . . . . . . . . . . . 124
Appendix G. Contributors . . . . . . . . . . . . . . . . . . . . 122 E.1.1. Key Derivation and HKDF . . . . . . . . . . . . . . . 127
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 127 E.1.2. Client Authentication . . . . . . . . . . . . . . . . 128
E.1.3. 0-RTT . . . . . . . . . . . . . . . . . . . . . . . . 128
E.1.4. Post-Compromise Security . . . . . . . . . . . . . . 128
E.1.5. External References . . . . . . . . . . . . . . . . . 128
E.2. Record Layer . . . . . . . . . . . . . . . . . . . . . . 129
E.2.1. External References . . . . . . . . . . . . . . . . . 130
E.3. Traffic Analysis . . . . . . . . . . . . . . . . . . . . 130
E.4. Side Channel Attacks . . . . . . . . . . . . . . . . . . 130
Appendix F. Working Group Information . . . . . . . . . . . . . 131
Appendix G. Contributors . . . . . . . . . . . . . . . . . . . . 131
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 137
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 5, line 45 skipping to change at page 6, line 5
not specify how protocols add security with TLS; how to initiate TLS not specify how protocols add security with TLS; how to initiate TLS
handshaking and how to interpret the authentication certificates handshaking and how to interpret the authentication certificates
exchanged are left to the judgment of the designers and implementors exchanged are left to the judgment of the designers and implementors
of protocols that run on top of TLS. of protocols that run on top of TLS.
This document defines TLS version 1.3. While TLS 1.3 is not directly This document defines TLS version 1.3. While TLS 1.3 is not directly
compatible with previous versions, all versions of TLS incorporate a compatible with previous versions, all versions of TLS incorporate a
versioning mechanism which allows clients and servers to versioning mechanism which allows clients and servers to
interoperably negotiate a common version if one is supported. interoperably negotiate a common version if one is supported.
This document supersedes and obsoletes previous versions of TLS
including version 1.2 [RFC5246]. It also obsoletes the TLS ticket
mechanism defined in [RFC5077] and replaces it with the mechanism
defined in Section 2.2. Section 4.2.6 updates [RFC4492] by modifying
the protocol attributes used to negotiate Elliptic Curves. Because
TLS 1.3 changes the way keys are derived it updates [RFC5705] as
described in Section 7.5 it also changes how OCSP messages are
carried and therefore updates [RFC6066] and obsoletes [RFC6961] as
described in section Section 4.4.2.1.
1.1. Conventions and Terminology 1.1. Conventions and Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in RFC "OPTIONAL" in this document are to be interpreted as described in RFC
2119 [RFC2119]. 2119 [RFC2119].
The following terms are used: The following terms are used:
client: The endpoint initiating the TLS connection. client: The endpoint initiating the TLS connection.
skipping to change at page 6, line 23 skipping to change at page 6, line 42
peer: An endpoint. When discussing a particular endpoint, "peer" peer: An endpoint. When discussing a particular endpoint, "peer"
refers to the endpoint that is not the primary subject of discussion. refers to the endpoint that is not the primary subject of discussion.
receiver: An endpoint that is receiving records. receiver: An endpoint that is receiving records.
sender: An endpoint that is transmitting records. sender: An endpoint that is transmitting records.
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. Change Log
RFC EDITOR PLEASE DELETE THIS SECTION.
(*) indicates changes to the wire protocol which may require (*) indicates changes to the wire protocol which may require
implementations to update. implementations to update.
draft-20
- Add "post_handshake_auth" extension to negotiate post-handshake
authentication (*).
- Shorten labels for HKDF-Expand-Label so that we can fit within one
compression block (*).
- Define how RFC 7250 works (*).
- Re-enable post-handshake client authentication even when you do
PSK. The previous prohibition was editorial error.
- Remove cert_type and user_mapping, which don't work on TLS 1.3
anyway.
- Added the no_application_protocol alert from [RFC7301] to the list
of extensions.
- Added discussion of traffic analysis and side channel attacks.
draft-19 draft-19
- Hash context_value input to Exporters (*) - Hash context_value input to Exporters (*)
- Add an additional Derive-Secret stage to Exporters (*). - Add an additional Derive-Secret stage to Exporters (*).
- Hash ClientHello1 in the transcript when HRR is used. This - Hash ClientHello1 in the transcript when HRR is used. This
reduces the state that needs to be carried in cookies. (*) reduces the state that needs to be carried in cookies. (*)
- Restructure CertificateRequest to have the selectors in - Restructure CertificateRequest to have the selectors in
skipping to change at page 7, line 12 skipping to change at page 8, line 5
- Remove spurious requirement to implement "pre_shared_key". - Remove spurious requirement to implement "pre_shared_key".
- Clarify location of "early_data" from server (it goes in EE, as - Clarify location of "early_data" from server (it goes in EE, as
indicated by the table in S 10). indicated by the table in S 10).
- Require peer public key validation - Require peer public key validation
- Add state machine diagram. - Add state machine diagram.
draft-18
- Remove unnecessary resumption_psk which is the only thing expanded - Remove unnecessary resumption_psk which is the only thing expanded
from the resumption master secret. (*). from the resumption master secret. (*).
- Fix signature_algorithms entry in extensions table. - Fix signature_algorithms entry in extensions table.
- Restate rule from RFC 6066 that you can't resume unless SNI is the - Restate rule from RFC 6066 that you can't resume unless SNI is the
same. same.
draft-17 draft-17
skipping to change at page 7, line 49 skipping to change at page 8, line 40
- Remove redundant labels for traffic key derivation (*) - Remove redundant labels for traffic key derivation (*)
- Harmonize requirements about cipher suite matching: for resumption - Harmonize requirements about cipher suite matching: for resumption
you need to match KDF but for 0-RTT you need whole cipher suite. you need to match KDF but for 0-RTT you need whole cipher suite.
This allows PSKs to actually negotiate cipher suites. (*) This allows PSKs to actually negotiate cipher suites. (*)
- Move SCT and OCSP into Certificate.extensions (*) - Move SCT and OCSP into Certificate.extensions (*)
- Explicitly allow non-offered extensions in NewSessionTicket - Explicitly allow non-offered extensions in NewSessionTicket
- Explicitly allow predicting ClientFinished for NST - Explicitly allow predicting client Finished for NST
- Clarify conditions for allowing 0-RTT with PSK - Clarify conditions for allowing 0-RTT with PSK
draft-16
- Revise version negotiation (*) - Revise version negotiation (*)
- Change RSASSA-PSS and EdDSA SignatureScheme codepoints for better - Change RSASSA-PSS and EdDSA SignatureScheme codepoints for better
backwards compatibility (*) backwards compatibility (*)
- Move HelloRetryRequest.selected_group to an extension (*) - Move HelloRetryRequest.selected_group to an extension (*)
- Clarify the behavior of no exporter context and make it the same - Clarify the behavior of no exporter context and make it the same
as an empty context.(*) as an empty context.(*)
skipping to change at page 11, line 11 skipping to change at page 12, line 5
- Unify authentication modes. Add post-handshake client - Unify authentication modes. Add post-handshake client
authentication. authentication.
- Remove early_handshake content type. Terminate 0-RTT data with an - Remove early_handshake content type. Terminate 0-RTT data with an
alert. alert.
- Reset sequence number upon key change (as proposed by Fournet et - Reset sequence number upon key change (as proposed by Fournet et
al.) al.)
draft-10
- Remove ClientCertificateTypes field from CertificateRequest and - Remove ClientCertificateTypes field from CertificateRequest and
add extensions. add extensions.
- Merge client and server key shares into a single extension. - Merge client and server key shares into a single extension.
draft-09 draft-09
- Change to RSA-PSS signatures for handshake messages. - Change to RSA-PSS signatures for handshake messages.
- Remove support for DSA. - Remove support for DSA.
skipping to change at page 13, line 37 skipping to change at page 14, line 29
- Rework handshake to provide 1-RTT mode. - Rework handshake to provide 1-RTT mode.
- Remove custom DHE groups. - Remove custom DHE groups.
- Remove support for compression. - Remove support for compression.
- Remove support for static RSA and DH key exchange. - Remove support for static RSA and DH key exchange.
- Remove support for non-AEAD ciphers. - Remove support for non-AEAD ciphers.
1.3. Updates Affecting TLS 1.2 1.3. Major Differences from TLS 1.2
The following is a list of the major functional differences between
TLS 1.2 and TLS 1.3. It is not intended to be exhaustive and there
are many minor differences.
- The list of supported symmetric algorithms has been pruned of all
algorithms that are considered legacy. Those that remain all use
Authenticated Encryption with Associated Data (AEAD) algorithms.
The ciphersuite concept has been changed to separate the
authentication and key exchange mechanisms from the record
protection algorithm (including secret key length) and a hash to
be used with the key derivation function and HMAC.
- A Zero-RTT mode was added, saving a round-trip at connection setup
for some application data, at the cost of certain security
properties.
- All handshake messages after the ServerHello are now encrypted.
The newly introduced EncryptedExtension message allows various
extensions previously sent in clear in the ServerHello to also
enjoy confidentiality protection.
- The key derivation functions have been re-designed. The new
design allows easier analysis by cryptographers due to their
improved key separation properties. The HMAC-based Extract-and-
Expand Key Derivation Function (HKDF) is used as an underlying
primitive.
- The handshake state machine has been significantly restructured to
be more consistent and to remove superfluous messages such as
ChangeCipherSpec.
- ECC is now in the base spec and includes new signature algorithms,
such as ed25519 and ed448. TLS 1.3 removed point format
negotiation in favor of a single point format for each curve.
- Other cryptographic improvements including the removal of
compression and custom DHE groups, changing the RSA padding to use
PSS, and the removal of DSA.
- The TLS 1.2 version negotiation mechanism has been deprecated in
favor of a version list in an extension. This increases
compatibility with servers which incorrectly implemented version
negotiation.
- Session resumption with and without server-side state as well as
the PSK-based ciphersuites of earlier TLS versions have been
replaced by a single new PSK exchange.
1.4. Updates Affecting TLS 1.2
This document defines several changes that optionally affect This document defines several changes that optionally affect
implementations of TLS 1.2: implementations of TLS 1.2:
- A version downgrade protection mechanism is described in - A version downgrade protection mechanism is described in
Section 4.1.3. Section 4.1.3.
- RSASSA-PSS signature schemes are defined in Section 4.2.3. - RSASSA-PSS signature schemes are defined in Section 4.2.3.
- The "supported_versions" ClientHello extension can be used to
negotiate the version of TLS to use, in preference to the
legacy_version field of the ClientHello.
An implementation of TLS 1.3 that also supports TLS 1.2 might need to An implementation of TLS 1.3 that also supports TLS 1.2 might need to
include changes to support these changes even when TLS 1.3 is not in include changes to support these changes even when TLS 1.3 is not in
use. See the referenced sections for more details. use. See the referenced sections for more details.
2. Protocol Overview 2. Protocol Overview
The cryptographic parameters of the connection state are produced by The cryptographic parameters of the connection state are produced by
the TLS handshake protocol, which a TLS client and server use when the TLS handshake protocol, which a TLS client and server use when
first communicating to agree on a protocol version, select first communicating to agree on a protocol version, select
cryptographic algorithms, optionally authenticate each other, and cryptographic algorithms, optionally authenticate each other, and
establish shared secret keying material. Once the handshake is establish shared secret keying material. Once the handshake is
complete, the peers use the established keys to protect application complete, the peers use the established keys to protect application
layer traffic. layer traffic.
A failure of the handshake or other protocol error triggers the A failure of the handshake or other protocol error triggers the
termination of the connection, optionally preceded by an alert termination of the connection, optionally preceded by an alert
message (Section 6). message (Section 6).
TLS supports three basic key exchange modes: TLS supports three basic key exchange modes:
- (EC)DHE (Diffie-Hellman both the finite field and elliptic curve - (EC)DHE (Diffie-Hellman, both the finite field and elliptic curve
varieties), varieties),
- PSK-only, and - PSK-only, and
- PSK with (EC)DHE - PSK with (EC)DHE
Figure 1 below shows the basic full TLS handshake: Figure 1 below shows the basic full TLS handshake:
Client Server Client Server
Key ^ ClientHello Key ^ ClientHello
Exch | + key_share* Exch | + key_share*
| + signature_algorithms*
| + psk_key_exchange_modes* | + psk_key_exchange_modes*
v + pre_shared_key* --------> v + pre_shared_key* -------->
ServerHello ^ Key ServerHello ^ Key
+ key_share* | Exch + key_share* | Exch
+ pre_shared_key* v + pre_shared_key* v
{EncryptedExtensions} ^ Server {EncryptedExtensions} ^ Server
{CertificateRequest*} v Params {CertificateRequest*} v Params
{Certificate*} ^ {Certificate*} ^
{CertificateVerify*} | Auth {CertificateVerify*} | Auth
{Finished} v {Finished} v
skipping to change at page 15, line 35 skipping to change at page 17, line 36
+ Indicates noteworthy extensions sent in the + Indicates noteworthy extensions sent in the
previously noted message. previously noted message.
* Indicates optional or situation-dependent * Indicates optional or situation-dependent
messages/extensions that are not always sent. messages/extensions that are not always sent.
{} Indicates messages protected using keys {} Indicates messages protected using keys
derived from a [sender]_handshake_traffic_secret. derived from a [sender]_handshake_traffic_secret.
[] Indicates messages protected using keys [] Indicates messages protected using keys
derived from traffic_secret_N derived from [sender]_application_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 cryptographic parameters. Everything after this phase is
encrypted. encrypted.
skipping to change at page 16, line 9 skipping to change at page 18, line 9
the client is authenticated, application layer protocol support, the client is authenticated, application layer protocol support,
etc.). etc.).
- Authentication: Authenticate the server (and optionally the - Authentication: Authenticate the server (and optionally the
client) and provide key confirmation and handshake integrity. client) 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 4.1.2) message, which contains a random nonce (Section 4.1.2) message, which contains a random nonce
(ClientHello.random); its offered protocol versions; a list of (ClientHello.random); its offered protocol versions; a list of
symmetric cipher/HKDF hash pairs; some set of Diffie-Hellman key symmetric cipher/HKDF hash pairs; some set of Diffie-Hellman key
shares (in the "key_share" extension Section 4.2.5), a set of pre- shares (in the "key_share" extension Section 4.2.7), a set of pre-
shared key labels (in the "pre_shared_key" extension Section 4.2.8) shared key labels (in the "pre_shared_key" extension Section 4.2.10)
or both; and potentially some other extensions. or both; and potentially some other extensions.
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 (Section 4.1.3), which indicates the negotiated its own ServerHello (Section 4.1.3), which indicates the negotiated
connection parameters. The combination of the ClientHello and the connection parameters. The combination of the ClientHello and the
ServerHello determines the shared keys. If (EC)DHE key establishment ServerHello determines the shared keys. If (EC)DHE key establishment
is in use, then the ServerHello contains a "key_share" extension with is in use, then the ServerHello contains a "key_share" extension with
the server's ephemeral Diffie-Hellman share which MUST be in the same the server's ephemeral Diffie-Hellman share which MUST be in the same
group as one of the client's shares. If PSK key establishment is in group as one of the client's shares. If PSK key establishment is in
use, then the ServerHello contains a "pre_shared_key" extension use, then the ServerHello contains a "pre_shared_key" extension
indicating which of the client's offered PSKs was selected. Note indicating which of the client's offered PSKs was selected. Note
that implementations can use (EC)DHE and PSK together, in which case that implementations can use (EC)DHE and PSK together, in which case
both extensions will be supplied. both extensions will be supplied.
The server then sends two messages to establish the Server The server then sends two messages to establish the Server
Parameters: Parameters:
EncryptedExtensions: responses to any extensions that are not EncryptedExtensions: responses to ClientHello extensions that are
required to determine the cryptographic parameters, other than not required to determine the cryptographic parameters, other than
those that are specific to individual certificates. those that are specific to individual certificates.
[Section 4.3.1] [Section 4.3.1]
CertificateRequest: if certificate-based client authentication is CertificateRequest: if certificate-based client authentication is
desired, the desired parameters for that certificate. This desired, the desired parameters for that certificate. This
message is omitted if client authentication is not desired. message is omitted if client authentication is not desired.
[Section 4.3.2] [Section 4.3.2]
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
skipping to change at page 20, line 9 skipping to change at page 22, line 9
As the server is authenticating via a PSK, it does not send a As the server is authenticating via a PSK, it does not send a
Certificate or a CertificateVerify message. When a client offers Certificate or a CertificateVerify message. When a client offers
resumption via PSK, it SHOULD also supply a "key_share" extension to resumption via PSK, it SHOULD also supply a "key_share" extension to
the server to allow the server to decline resumption and fall back to the server to allow the server to decline resumption and fall back to
a full handshake, if needed. The server responds with a a full handshake, if needed. The server responds with a
"pre_shared_key" extension to negotiate use of PSK key establishment "pre_shared_key" extension to negotiate use of PSK key establishment
and can (as shown here) respond with a "key_share" extension to do and can (as shown here) respond with a "key_share" extension to do
(EC)DHE key establishment, thus providing forward secrecy. (EC)DHE key establishment, thus providing forward secrecy.
When PSKs are provisioned out of band, the PSK identity and the KDF When PSKs are provisioned out of band, the PSK identity and the KDF
to be used with the PSK MUST also be provisioned. to be used with the PSK MUST also be provisioned. Note: When using
an out-of-band provisioned pre-shared secret, a critical
consideration is using sufficient entropy during the key generation,
as discussed in [RFC4086]. Deriving a shared secret from a password
or other low-entropy sources is not secure. A low-entropy secret, or
password, is subject to dictionary attacks based on the PSK binder.
The specified PSK authentication is not a strong password-based
authenticated key exchange even when used with Diffie-Hellman key
establishment.
2.3. Zero-RTT Data 2.3. Zero-RTT Data
When clients and servers share a PSK (either obtained externally or When clients and servers share a PSK (either obtained externally or
via a previous handshake), TLS 1.3 allows clients to send data on the via a previous handshake), TLS 1.3 allows clients to send data on the
first flight ("early data"). The client uses the PSK to authenticate first flight ("early data"). The client uses the PSK to authenticate
the server and to encrypt the early data. the server and to encrypt the early data.
When clients use a PSK obtained externally then the following When clients use a PSK obtained externally to send early data, then
additional information MUST be provisioned to both parties: the following additional information MUST be provisioned to both
parties:
- The cipher suite for use with this PSK - The cipher suite for use with this PSK
- The Application-Layer Protocol Negotiation (ALPN) protocol, if any - The Application-Layer Protocol Negotiation (ALPN) protocol, if any
is to be used is to be used
- The Server Name Indication (SNI), if any is to be used - The Server Name Indication (SNI), if any is to be used
As shown in Figure 4, the 0-RTT data is just added to the 1-RTT As shown in Figure 4, the 0-RTT data is just added to the 1-RTT
handshake in the first flight. The rest of the handshake uses the handshake in the first flight. The rest of the handshake uses the
skipping to change at page 21, line 17 skipping to change at page 23, line 17
ClientHello ClientHello
+ early_data + early_data
+ key_share* + key_share*
+ psk_key_exchange_modes + psk_key_exchange_modes
+ pre_shared_key + pre_shared_key
(Application Data*) --------> (Application Data*) -------->
ServerHello ServerHello
+ pre_shared_key + pre_shared_key
+ key_share* + key_share*
{EncryptedExtensions} {EncryptedExtensions}
+ early_data*
{Finished} {Finished}
<-------- [Application Data*] <-------- [Application Data*]
(EndOfEarlyData) (EndOfEarlyData)
{Finished} --------> {Finished} -------->
[Application Data] <-------> [Application Data] [Application Data] <-------> [Application Data]
+ Indicates noteworthy extensions sent in the
previously noted message.
* Indicates optional or situation-dependent * Indicates optional or situation-dependent
messages/extensions that are not always sent. messages/extensions that are not always sent.
() Indicates messages protected using keys () Indicates messages protected using keys
derived from client_early_traffic_secret. derived from client_early_traffic_secret.
{} Indicates messages protected using keys {} Indicates messages protected using keys
derived from a [sender]_handshake_traffic_secret. derived from a [sender]_handshake_traffic_secret.
[] Indicates messages protected using keys [] Indicates messages protected using keys
derived from traffic_secret_N derived from [sender]_application_traffic_secret_N
Figure 4: Message flow for a zero round trip handshake Figure 4: Message flow for a zero round trip handshake
IMPORTANT NOTE: The security properties for 0-RTT data are weaker IMPORTANT NOTE: The security properties for 0-RTT data are weaker
than those for other kinds of TLS data. Specifically: than those for other kinds of TLS data. Specifically:
1. This data is not forward secret, as it is encrypted solely under 1. This data is not forward secret, as it is encrypted solely under
keys derived using the offered PSK. keys derived using the offered 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, the server has no guarantee that the same 0-RTT data was by TLS, the server has no guarantee that the same 0-RTT data was
not transmitted on multiple 0-RTT connections (see not transmitted on multiple 0-RTT connections (see
Section 4.2.8.3 for more details). This is especially relevant Section 4.2.10.4 for more details). This is especially relevant
if the data is authenticated either with TLS client if the data is authenticated either with TLS client
authentication or inside the application layer protocol. authentication or inside the application layer protocol.
However, 0-RTT data cannot be duplicated within a connection However, 0-RTT data cannot be duplicated within a connection
(i.e., the server will not process the same data twice for the (i.e., the server will not process the same data twice for the
same connection) and an attacker will not be able to make 0-RTT same connection) and an attacker will not be able to make 0-RTT
data appear to be 1-RTT data (because it is protected with data appear to be 1-RTT data (because it is protected with
different keys.) different keys.)
Protocols MUST NOT use 0-RTT data without a profile that defines its Protocols MUST NOT use 0-RTT data without a profile that defines its
use. That profile needs to identify which messages or interactions use. That profile needs to identify which messages or interactions
are safe to use with 0-RTT. In addition, to avoid accidental misuse, are safe to use with 0-RTT. In addition, to avoid accidental misuse,
implementations SHOULD NOT enable 0-RTT unless specifically implementations SHOULD NOT enable 0-RTT unless specifically
requested. Implementations SHOULD provide special functions for requested. Implementations SHOULD provide special functions for
0-RTT data to ensure that an application is always aware that it is 0-RTT data to ensure that an application is always aware that it is
sending or receiving data that might be replayed. sending or receiving data that might be replayed.
The same warnings apply to any use of the early_exporter_secret. The same warnings apply to any use of the
early_exporter_master_secret.
The remainder of this document provides a detailed description of The remainder of this document provides a detailed description of
TLS. TLS.
3. Presentation Language 3. Presentation Language
This document deals with the formatting of data in an external This document deals with the formatting of data in an external
representation. The following very basic and somewhat casually representation. The following very basic and somewhat casually
defined presentation syntax will be used. defined presentation syntax will be used.
skipping to change at page 23, line 40 skipping to change at page 25, line 43
in the byte stream. The length will be in the form of a number in the byte stream. The length will be in the form of a number
consuming as many bytes as required to hold the vector's specified consuming as many bytes as required to hold the vector's specified
maximum (ceiling) length. A variable-length vector with an actual maximum (ceiling) length. A variable-length vector with an actual
length field of zero is referred to as an empty vector. length field of zero is referred to as an empty vector.
T T'<floor..ceiling>; T T'<floor..ceiling>;
In the following example, mandatory is a vector that must contain In the following example, mandatory is a vector that must contain
between 300 and 400 bytes of type opaque. It can never be empty. between 300 and 400 bytes of type opaque. It can never be empty.
The actual length field consumes two bytes, a uint16, which is The actual length field consumes two bytes, a uint16, which is
sufficient to represent the value 400 (see Section 3.4). On the sufficient to represent the value 400 (see Section 3.4). Similarly,
other hand, longer can represent up to 800 bytes of data, or 400 longer can represent up to 800 bytes of data, or 400 uint16 elements,
uint16 elements, and it may be empty. Its encoding will include a and it may be empty. Its encoding will include a two-byte actual
two-byte actual length field prepended to the vector. The length of length field prepended to the vector. The length of an encoded
an encoded vector must be an exact multiple of the length of a single vector must be an exact multiple of the length of a single element
element (e.g., a 17-byte vector of uint16 would be illegal). (e.g., a 17-byte vector of uint16 would be illegal).
opaque mandatory<300..400>; opaque mandatory<300..400>;
/* length field is 2 bytes, cannot be empty */ /* length field is 2 bytes, cannot be empty */
uint16 longer<0..800>; uint16 longer<0..800>;
/* zero to 400 16-bit unsigned integers */ /* zero to 400 16-bit unsigned integers */
3.4. Numbers 3.4. Numbers
The basic numeric data type is an unsigned byte (uint8). All larger The basic numeric data type is an unsigned byte (uint8). All larger
numeric data types are formed from fixed-length series of bytes numeric data types are formed from fixed-length series of bytes
skipping to change at page 26, line 43 skipping to change at page 29, line 5
} V2; } V2;
struct { struct {
VariantTag type; VariantTag type;
select (VariantRecord.type) { select (VariantRecord.type) {
case apple: V1; case apple: V1;
case orange: V2; case orange: V2;
}; };
} VariantRecord; } VariantRecord;
3.9. Decoding Errors
TLS defines two generic alerts (see Section 6) to use upon failure to
parse a message. Peers which receive a message which cannot be
parsed according to the syntax (e.g., have a length extending beyond
the message boundary or contain an out-of-range length) MUST
terminate the connection with a "decode_error" alert. Peers which
receive a message which is syntactically correct but semantically
invalid (e.g., a DHE share of p - 1, or an invalid enum) MUST
terminate the connection with an "illegal_parameter" alert.
4. Handshake Protocol 4. Handshake Protocol
The handshake protocol is used to negotiate the secure attributes of The handshake protocol is used to negotiate the secure attributes of
a connection. Handshake messages are supplied to the TLS record a connection. Handshake messages are supplied to the TLS record
layer, where they are encapsulated within one or more TLSPlaintext or layer, where they are encapsulated within one or more TLSPlaintext or
TLSCiphertext structures, which are processed and transmitted as TLSCiphertext structures, which are processed and transmitted as
specified by the current active connection state. specified by the current active connection state.
enum { enum {
client_hello(1), client_hello(1),
skipping to change at page 27, line 49 skipping to change at page 29, line 47
case encrypted_extensions: EncryptedExtensions; case encrypted_extensions: EncryptedExtensions;
case certificate_request: CertificateRequest; case certificate_request: CertificateRequest;
case certificate: Certificate; case certificate: Certificate;
case certificate_verify: CertificateVerify; case certificate_verify: CertificateVerify;
case finished: Finished; case finished: Finished;
case new_session_ticket: NewSessionTicket; case new_session_ticket: NewSessionTicket;
case key_update: KeyUpdate; case key_update: KeyUpdate;
} body; } body;
} Handshake; } Handshake;
Protocol messages MUST be sent in the order defined below (and shown Protocol messages MUST be sent in the order defined in Section 4.4.1
in the diagrams in Section 2). A peer which receives a handshake and shown in the diagrams in Section 2. A peer which receives a
message in an unexpected order MUST abort the handshake with an handshake message in an unexpected order MUST abort the handshake
"unexpected_message" alert. Unneeded handshake messages are omitted, with an "unexpected_message" alert. However, unneeded handshake
however. messages are omitted.
New handshake message types are assigned by IANA as described in New handshake message types are assigned by IANA as described in
Section 10. Section 10.
4.1. Key Exchange Messages 4.1. Key Exchange Messages
The key exchange messages are used to exchange security capabilities The key exchange messages are used to exchange security capabilities
between the client and server and to establish the traffic keys used between the client and server and to establish the traffic keys used
to protect the handshake and data. to protect the handshake and data.
4.1.1. Cryptographic Negotiation 4.1.1. Cryptographic Negotiation
TLS cryptographic negotiation proceeds by the client offering the TLS cryptographic negotiation proceeds by the client offering the
following four sets of options in its ClientHello: following four sets of options in its ClientHello:
- A list of cipher suites which indicates the AEAD algorithm/HKDF - A list of cipher suites which indicates the AEAD algorithm/HKDF
hash pairs which the client supports. hash pairs which the client supports.
- A "supported_groups" (Section 4.2.4) extension which indicates the - A "supported_groups" (Section 4.2.6) extension which indicates the
(EC)DHE groups which the client supports and a "key_share" (EC)DHE groups which the client supports and a "key_share"
(Section 4.2.5) extension which contains (EC)DHE shares for some (Section 4.2.7) extension which contains (EC)DHE shares for some
or all of these groups. or all of these groups.
- A "signature_algorithms" (Section 4.2.3) extension which indicates - A "signature_algorithms" (Section 4.2.3) extension which indicates
the signature algorithms which the client can accept. the signature algorithms which the client can accept.
- A "pre_shared_key" (Section 4.2.8) extension which contains a list - A "pre_shared_key" (Section 4.2.10) extension which contains a
of symmetric key identities known to the client and a list of symmetric key identities known to the client and a
"psk_key_exchange_modes" (Section 4.2.6) extension which indicates "psk_key_exchange_modes" (Section 4.2.8) extension which indicates
the key exchange modes that may be used with PSKs. the key exchange modes that may be used with PSKs.
If the server does not select a PSK, then the first three of these If the server does not select a PSK, then the first three of these
options are entirely orthogonal: the server independently selects a options are entirely orthogonal: the server independently selects a
cipher suite, an (EC)DHE group and key share for key establishment, cipher suite, an (EC)DHE group and key share for key establishment,
and a signature algorithm/certificate pair to authenticate itself to and a signature algorithm/certificate pair to authenticate itself to
the client. If there is no overlap in "supported_groups" then the the client. If there is no overlap between the received
"supported_groups" and the groups supported by the server then the
server MUST abort the handshake. server MUST abort the handshake.
If the server selects a PSK, then it MUST also select a key If the server selects a PSK, then it MUST also select a key
establishment mode from the set indicated by client's establishment mode from the set indicated by client's
"psk_key_exchange_modes" extension (PSK alone or with (EC)DHE). Note "psk_key_exchange_modes" extension (at present, PSK alone or with
that if the PSK can be used without (EC)DHE then non-overlap in the (EC)DHE). Note that if the PSK can be used without (EC)DHE then non-
"supported_groups" parameters need not be fatal, as it is in the non- overlap in the "supported_groups" parameters need not be fatal, as it
PSK case discussed in the previous paragraph. is in the non-PSK case discussed in the previous paragraph.
If the server selects an (EC)DHE group and the client did not offer a If the server selects an (EC)DHE group and the client did not offer a
compatible "key_share" extension in the initial ClientHello, the compatible "key_share" extension in the initial ClientHello, the
server MUST respond with a HelloRetryRequest (Section 4.1.4) message. server MUST respond with a HelloRetryRequest (Section 4.1.4) message.
If the server successfully selects parameters and does not require a If the server successfully selects parameters and does not require a
HelloRetryRequest, it indicates the selected parameters in the HelloRetryRequest, it indicates the selected parameters in the
ServerHello as follows: ServerHello as follows:
- If PSK is being used, then the server will send a "pre_shared_key" - If PSK is being used, then the server will send a "pre_shared_key"
skipping to change at page 29, line 45 skipping to change at page 31, line 41
When a client first connects to a server, it is REQUIRED to send the 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 ClientHello as its first message. The client will also send a
ClientHello when the server has responded to its ClientHello with a ClientHello when the server has responded to its ClientHello with a
HelloRetryRequest. In that case, the client MUST send the same HelloRetryRequest. In that case, the client MUST send the same
ClientHello (without modification) except: ClientHello (without modification) except:
- If a "key_share" extension was supplied in the HelloRetryRequest, - If a "key_share" extension was supplied in the HelloRetryRequest,
replacing the list of shares with a list containing a single replacing the list of shares with a list containing a single
KeyShareEntry from the indicated group. KeyShareEntry from the indicated group.
- Removing the "early_data" extension (Section 4.2.7) if one was - Removing the "early_data" extension (Section 4.2.9) if one was
present. Early data is not permitted after HelloRetryRequest. present. Early data is not permitted after HelloRetryRequest.
- Including a "cookie" extension if one was provided in the - Including a "cookie" extension if one was provided in the
HelloRetryRequest. HelloRetryRequest.
- Updating the "pre_shared_key" extension if present by recomputing - Updating the "pre_shared_key" extension if present by recomputing
the "obfuscated_ticket_age" and binder values and (optionally) the "obfuscated_ticket_age" and binder values and (optionally)
removing any PSKs which are incompatible with the server's removing any PSKs which are incompatible with the server's
indicated cipher suite. indicated cipher suite.
Because TLS 1.3 forbids renegotiation, if a server receives a Because TLS 1.3 forbids renegotiation, if a server has negotiated TLS
ClientHello at any other time, it MUST terminate the connection. 1.3 and receives a ClientHello at any other time, it MUST terminate
the connection.
If a server established a TLS connection with a previous version of If a server established a TLS connection with a previous version of
TLS and receives a TLS 1.3 ClientHello in a renegotiation, it MUST TLS and receives a TLS 1.3 ClientHello in a renegotiation, it MUST
retain the previous protocol version. In particular, it MUST NOT retain the previous protocol version. In particular, it MUST NOT
negotiate TLS 1.3. negotiate TLS 1.3.
Structure of this message: Structure of this message:
uint16 ProtocolVersion; uint16 ProtocolVersion;
opaque Random[32]; opaque Random[32];
skipping to change at page 30, line 31 skipping to change at page 32, line 30
struct { struct {
ProtocolVersion legacy_version = 0x0303; /* TLS v1.2 */ ProtocolVersion legacy_version = 0x0303; /* TLS v1.2 */
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<8..2^16-1>; Extension extensions<8..2^16-1>;
} ClientHello; } ClientHello;
All versions of TLS allow extensions to optionally follow the
compression_methods field as an extensions field. TLS 1.3
ClientHellos will contain at least two extensions,
"supported_versions" and either "key_share" or "pre_shared_key". The
presence of extensions can be detected by determining whether there
are bytes following the compression_methods at the end of the
ClientHello. Note that this method of detecting optional data
differs from the normal TLS method of having a variable-length field,
but it is used for compatibility with TLS before extensions were
defined. TLS 1.3 servers will need to perform this check first and
only attempt to negotiate TLS 1.3 if a "supported_version" extension
is present.
legacy_version In previous versions of TLS, this field was used for legacy_version In previous versions of TLS, this field was used for
version negotiation and represented the highest version number version negotiation and represented the highest version number
supported by the client. Experience has shown that many servers supported by the client. Experience has shown that many servers
do not properly implement version negotiation, leading to "version do not properly implement version negotiation, leading to "version
intolerance" in which the server rejects an otherwise acceptable intolerance" in which the server rejects an otherwise acceptable
ClientHello with a version number higher than it supports. In TLS ClientHello with a version number higher than it supports. In TLS
1.3, the client indicates its version preferences in the 1.3, the client indicates its version preferences in the
"supported_versions" extension (Section 4.2.1) and the "supported_versions" extension (Section 4.2.1) and the
legacy_version field MUST be set to 0x0303, which was the version legacy_version field MUST be set to 0x0303, which is the version
number for TLS 1.2. (See Appendix D for details about backward number for TLS 1.2. (See Appendix D for details about backward
compatibility.) compatibility.)
random 32 bytes generated by a secure random number generator. See random 32 bytes generated by a secure random number generator. See
Appendix C for additional information. Appendix C for additional information.
legacy_session_id Versions of TLS before TLS 1.3 supported a legacy_session_id Versions of TLS before TLS 1.3 supported a
"session resumption" feature which has been merged with Pre-Shared "session resumption" feature which has been merged with Pre-Shared
Keys in this version (see Section 2.2). This field MUST be Keys in this version (see Section 2.2). This field MUST be
ignored by a server negotiating TLS 1.3 and MUST be set as a zero ignored by a server negotiating TLS 1.3 and MUST be set as a zero
length vector (i.e., a single zero byte length field) by clients length vector (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. that do not have a cached session ID set by a pre-TLS 1.3 server.
cipher_suites This is a list of the symmetric cipher options cipher_suites This is a list of the symmetric cipher options
supported by the client, specifically the record protection supported by the client, specifically the record protection
algorithm (including secret key length) and a hash to be used with algorithm (including secret key length) and a hash to be used with
HKDF, in descending order of client preference. If the list HKDF, in descending order of client preference. 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 wish to use, the server MUST ignore those cipher suites, and
process the remaining ones as usual. Values are defined in process the remaining ones as usual. Values are defined in
Appendix B.4. If the client is attempting a PSK key Appendix B.4. If the client is attempting a PSK key
establishment, it SHOULD advertise at least one cipher suite establishment, it SHOULD advertise at least one cipher suite
containing a Hash associated with the PSK. indicating a Hash associated with the PSK.
legacy_compression_methods Versions of TLS before 1.3 supported legacy_compression_methods Versions of TLS before 1.3 supported
compression with the list of supported compression methods being compression with the list of supported compression methods being
sent in this field. For every TLS 1.3 ClientHello, this vector sent in this field. For every TLS 1.3 ClientHello, this vector
MUST contain exactly one byte set to zero, which corresponds to MUST contain exactly one byte set to zero, which corresponds to
the "null" compression method in prior versions of TLS. If a TLS the "null" compression method in prior versions of TLS. If a TLS
1.3 ClientHello is received with any other value in this field, 1.3 ClientHello is received with any other value in this field,
the server MUST abort the handshake with an "illegal_parameter" the server MUST abort the handshake with an "illegal_parameter"
alert. Note that TLS 1.3 servers might receive TLS 1.2 or prior alert. Note that TLS 1.3 servers might receive TLS 1.2 or prior
ClientHellos which contain other compression methods and MUST ClientHellos which contain other compression methods and MUST
follow the procedures for the appropriate prior version of TLS. follow the procedures for the appropriate prior version of TLS.
TLS 1.3 ClientHellos are identified as having a legacy_version of
0x0303 and a supported_versions extension present with 0x0304 as
the highest version indicated therein.
extensions Clients request extended functionality from servers by extensions Clients request extended functionality from servers by
sending data in the extensions field. The actual "Extension" sending data in the extensions field. The actual "Extension"
format is defined in Section 4.2. In TLS 1.3, use of certain format is defined in Section 4.2. In TLS 1.3, use of certain
extensions is mandatory, as functionality is moved into extensions extensions is mandatory, as functionality is moved into extensions
to preserve ClientHello compatibility with previous versions of to preserve ClientHello compatibility with previous versions of
TLS. Servers MUST ignore unrecognized extensions. TLS. Servers MUST ignore unrecognized extensions.
All versions of TLS allow extensions to optionally follow the
compression_methods field as an extensions field. TLS 1.3
ClientHello messages always contain extensions (minimally,
"supported_versions", or they will be interpreted as TLS 1.2
ClientHello messages), however TLS 1.3 servers might receive
ClientHello messages without an extensions field from prior versions
of TLS. The presence of extensions can be detected by determining
whether there are bytes following the compression_methods field at
the end of the ClientHello. Note that this method of detecting
optional data differs from the normal TLS method of having a
variable-length field, but it is used for compatibility with TLS
before extensions were defined. TLS 1.3 servers will need to perform
this check first and only attempt to negotiate TLS 1.3 if a
"supported_version" extension is present. If negotiating a version
of TLS prior to 1.3, a server MUST check that the message either
contains no data after legacy_compression_methods or that it contains
a valid extensions block with no data following. If not, then it
MUST abort the handshake with a "decode_error" alert.
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. Note that TLS 1.3 ClientHello client MAY abort the handshake.
messages always contain extensions (minimally they must contain
"supported_versions" or they will be interpreted as TLS 1.2
ClientHello messages). TLS 1.3 servers might receive ClientHello
messages from versions of TLS prior to 1.3 that do not contain
extensions. If negotiating a version of TLS prior to 1.3, a server
MUST check that the message either contains no data after
legacy_compression_methods or that it contains a valid extensions
block with no data following. If not, then it MUST abort the
handshake with a "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. If early data is in use,
the client may transmit early application data Section 2.3 while
waiting for the next handshake message.
4.1.3. Server Hello 4.1.3. Server Hello
The server will send this message in response to a ClientHello The server will send this message in response to a ClientHello
message if it is able to find an acceptable set of parameters and the message if it is able to find an acceptable set of parameters and the
ClientHello contains sufficient information to proceed with the ClientHello contains sufficient information to proceed with the
handshake. handshake.
Structure of this message: Structure of this message:
struct { struct {
ProtocolVersion version; ProtocolVersion version;
Random random; Random random;
CipherSuite cipher_suite; CipherSuite cipher_suite;
Extension extensions<6..2^16-1>; Extension extensions<6..2^16-1>;
} ServerHello; } ServerHello;
version This field contains the version of TLS negotiated for this version This field contains the version of TLS negotiated for this
connection. Servers MUST select a version from the list in connection. Servers MUST select a version from the list in
ClientHello.supported_versions extension. A client which receives ClientHello's supported_versions extension, or otherwise negotiate
a version that was not offered MUST abort the handshake. For this TLS 1.2 or previous. A client that receives a version that was
version of the specification, the version is 0x0304. (See not offered MUST abort the handshake. For this version of the
Appendix D for details about backward compatibility.) specification, the version is 0x0304. (See Appendix D for details
about backward compatibility.)
random 32 bytes generated by a secure random number generator. See random 32 bytes generated by a secure random number generator. See
Appendix C for additional information. The last eight bytes MUST Appendix C for additional information. The last eight bytes MUST
be overwritten as described below if negotiating TLS 1.2 or TLS be overwritten as described below if negotiating TLS 1.2 or TLS
1.1. This structure is generated by the server and MUST be 1.1. This structure is generated by the server and MUST be
generated independently of the ClientHello.random. generated independently of the ClientHello.random.
cipher_suite The single cipher suite selected by the server from the cipher_suite The single cipher suite selected by the server from the
list in ClientHello.cipher_suites. A client which receives a list in ClientHello.cipher_suites. A client which receives a
cipher suite that was not offered MUST abort the handshake. cipher suite that was not offered MUST abort the handshake.
skipping to change at page 33, line 17 skipping to change at page 35, line 19
TLS 1.3 has a downgrade protection mechanism embedded in the server's TLS 1.3 has a downgrade protection mechanism embedded in the server's
random value. TLS 1.3 servers which negotiate TLS 1.2 or below in random value. TLS 1.3 servers which negotiate TLS 1.2 or below in
response to a ClientHello MUST set the last eight bytes of their response to a ClientHello MUST set the last eight bytes of their
Random value specially. Random value specially.
If negotiating TLS 1.2, TLS 1.3 servers MUST set the last eight bytes If negotiating TLS 1.2, TLS 1.3 servers MUST set the last eight bytes
of their Random value to the bytes: of their Random value to the bytes:
44 4F 57 4E 47 52 44 01 44 4F 57 4E 47 52 44 01
If negotiating TLS 1.1, TLS 1.3 servers MUST and TLS 1.2 servers If negotiating TLS 1.1 or below, TLS 1.3 servers MUST and TLS 1.2
SHOULD set the last eight bytes of their Random value to the bytes: servers SHOULD set the last eight bytes of their Random value to the
bytes:
44 4F 57 4E 47 52 44 00 44 4F 57 4E 47 52 44 00
TLS 1.3 clients receiving a TLS 1.2 or below ServerHello MUST check TLS 1.3 clients receiving a TLS 1.2 or below ServerHello MUST check
that the last eight bytes are not equal to either of these values. that the last eight bytes are not equal to either of these values.
TLS 1.2 clients SHOULD also check that the last eight bytes are not TLS 1.2 clients SHOULD also check that the last eight bytes are not
equal to the second value if the ServerHello indicates TLS 1.1 or equal to the second value if the ServerHello indicates TLS 1.1 or
below. If a match is found, the client MUST abort the handshake with below. If a match is found, the client MUST abort the handshake with
an "illegal_parameter" alert. This mechanism provides limited an "illegal_parameter" alert. This mechanism provides limited
protection against downgrade attacks over and above that provided by protection against downgrade attacks over and above that provided by
skipping to change at page 33, line 40 skipping to change at page 35, line 43
present in TLS 1.2 and below, includes a signature over both random present in TLS 1.2 and below, includes a signature over both random
values, it is not possible for an active attacker to modify the values, it is not possible for an active attacker to modify the
random values without detection as long as ephemeral ciphers are random values without detection as long as ephemeral ciphers are
used. It does not provide downgrade protection when static RSA is used. It does not provide downgrade protection when static RSA is
used. used.
Note: This is a change from [RFC5246], so in practice many TLS 1.2 Note: This is a change from [RFC5246], so in practice many TLS 1.2
clients and servers will not behave as specified above. clients and servers will not behave as specified above.
A client that receives a TLS 1.3 ServerHello during renegotiation A client that receives a TLS 1.3 ServerHello during renegotiation
MUST abort the handshake with a "protocol_version" alert. MUST abort the handshake with a "protocol_version" alert. Note that
renegotiation is only possible when a version of TLS prior to 1.3 has
been negotiated.
RFC EDITOR: PLEASE REMOVE THE FOLLOWING PARAGRAPH Implementations of RFC EDITOR: PLEASE REMOVE THE FOLLOWING PARAGRAPH Implementations of
draft versions (see Section 4.2.1.1) of this specification SHOULD NOT draft versions (see Section 4.2.1.1) of this specification SHOULD NOT
implement this mechanism on either client and server. A pre-RFC implement this mechanism on either client and server. A pre-RFC
client connecting to RFC servers, or vice versa, will appear to client connecting to RFC servers, or vice versa, will appear to
downgrade to TLS 1.2. With the mechanism enabled, this will cause an downgrade to TLS 1.2. With the mechanism enabled, this will cause an
interoperability failure. interoperability failure.
4.1.4. Hello Retry Request 4.1.4. Hello Retry Request
skipping to change at page 34, line 43 skipping to change at page 36, line 45
second HelloRetryRequest in the same connection (i.e., where the second HelloRetryRequest in the same connection (i.e., where the
ClientHello was itself in response to a HelloRetryRequest), it MUST ClientHello was itself in response to a HelloRetryRequest), it MUST
abort the handshake with an "unexpected_message" alert. abort the handshake with an "unexpected_message" alert.
Otherwise, the client MUST process all extensions in the Otherwise, the client MUST process all extensions in the
HelloRetryRequest and send a second updated ClientHello. The HelloRetryRequest and send a second updated ClientHello. The
HelloRetryRequest extensions defined in this specification are: HelloRetryRequest extensions defined in this specification are:
- cookie (see Section 4.2.2) - cookie (see Section 4.2.2)
- key_share (see Section 4.2.5) - key_share (see Section 4.2.7)
In addition, in its updated ClientHello, the client SHOULD NOT offer In addition, in its updated ClientHello, the client SHOULD NOT offer
any pre-shared keys associated with a hash other than that of the any pre-shared keys associated with a hash other than that of the
selected cipher suite. This allows the client to avoid having to selected cipher suite. This allows the client to avoid having to
compute partial hash transcripts for multiple hashes in the second compute partial hash transcripts for multiple hashes in the second
ClientHello. A client which receives a cipher suite that was not ClientHello. A client which receives a cipher suite that was not
offered MUST abort the handshake. Servers MUST ensure that they offered MUST abort the handshake. Servers MUST ensure that they
negotiate the same cipher suite when receiving a conformant updated negotiate the same cipher suite when receiving a conformant updated
ClientHello (if the server selects the cipher suite as the first step ClientHello (if the server selects the cipher suite as the first step
in the negotiation, then this will happen automatically). Upon in the negotiation, then this will happen automatically). Upon
receiving the ServerHello, clients MUST check that the cipher suite receiving the ServerHello, clients MUST check that the cipher suite
supplied in the ServerHello is the same as that in the supplied in the ServerHello is the same as that in the
HelloRetryRequest and otherwise abort the handshake with an HelloRetryRequest and otherwise abort the handshake with an
"illegal_parameter" alert. "illegal_parameter" alert.
4.2. Extensions 4.2. Extensions
A number of TLS messages contain tag-length-value encoded extensions A number of TLS messages contain tag-length-value encoded extensions
structures. structures.
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), server_name(0), /* RFC 6066 */
signature_algorithms(13), max_fragment_length(1), /* RFC 6066 */
key_share(40), status_request(5), /* RFC 6066 */
pre_shared_key(41), supported_groups(10), /* RFC 4492, 7919 */
early_data(42), signature_algorithms(13), /* RFC 5246 */
supported_versions(43), use_srtp(14), /* RFC 5764 */
cookie(44), heartbeat(15), /* RFC 6520 */
psk_key_exchange_modes(45), application_layer_protocol_negotiation(16), /* RFC 7301 */
certificate_authorities(47), signed_certificate_timestamp(18), /* RFC 6962 */
oid_filters(48), client_certificate_type(19), /* RFC 7250 */
(65535) server_certificate_type(20) /* RFC 7250 */
} ExtensionType; padding(21), /* RFC 7685 */
key_share(40), /* [[this document]] */
pre_shared_key(41), /* [[this document]] */
early_data(42), /* [[this document]] */
supported_versions(43), /* [[this document]] */
cookie(44), /* [[this document]] */
psk_key_exchange_modes(45), /* [[this document]] */
certificate_authorities(47), /* [[this document]] */
oid_filters(48), /* [[this document]] */
post_handshake_auth(49), /* [[this document]] */
(65535)
} 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.
The list of extension types is maintained by IANA as described in The list of extension types is maintained by IANA as described in
Section 10. Section 10.
skipping to change at page 36, line 29 skipping to change at page 39, line 12
which it appears it MUST abort the handshake with an which it appears it MUST abort the handshake with an
"illegal_parameter" alert. "illegal_parameter" alert.
+--------------------------------------------------+-------------+ +--------------------------------------------------+-------------+
| Extension | TLS 1.3 | | Extension | TLS 1.3 |
+--------------------------------------------------+-------------+ +--------------------------------------------------+-------------+
| server_name [RFC6066] | CH, EE | | server_name [RFC6066] | CH, EE |
| | | | | |
| max_fragment_length [RFC6066] | CH, EE | | max_fragment_length [RFC6066] | CH, EE |
| | | | | |
| client_certificate_url [RFC6066] | CH, EE |
| | |
| status_request [RFC6066] | CH, CR, CT | | status_request [RFC6066] | CH, CR, CT |
| | | | | |
| user_mapping [RFC4681] | CH, EE |
| | |
| cert_type [RFC6091] | CH, EE |
| | |
| supported_groups [RFC7919] | CH, EE | | supported_groups [RFC7919] | CH, EE |
| | | | | |
| signature_algorithms [RFC5246] | CH, CR | | signature_algorithms [RFC5246] | CH, CR |
| | | | | |
| use_srtp [RFC5764] | CH, EE | | use_srtp [RFC5764] | CH, EE |
| | | | | |
| heartbeat [RFC6520] | CH, EE | | heartbeat [RFC6520] | CH, EE |
| | | | | |
| application_layer_protocol_negotiation [RFC7301] | CH, EE | | application_layer_protocol_negotiation [RFC7301] | CH, EE |
| | | | | |
skipping to change at page 37, line 22 skipping to change at page 39, line 47
| | | | | |
| early_data [[this document]] | CH, EE, NST | | early_data [[this document]] | CH, EE, NST |
| | | | | |
| cookie [[this document]] | CH, HRR | | cookie [[this document]] | CH, HRR |
| | | | | |
| supported_versions [[this document]] | CH | | supported_versions [[this document]] | CH |
| | | | | |
| certificate_authorities [[this document]] | CH, CR | | certificate_authorities [[this document]] | CH, CR |
| | | | | |
| oid_filters [[this document]] | CR | | oid_filters [[this document]] | CR |
| | |
| post_handshake_auth [[this document]] | CH |
+--------------------------------------------------+-------------+ +--------------------------------------------------+-------------+
When multiple extensions of different types are present, the When multiple extensions of different types are present, the
extensions MAY appear in any order, with the exception of extensions MAY appear in any order, with the exception of
"pre_shared_key" Section 4.2.8 which MUST be the last extension in "pre_shared_key" Section 4.2.10 which MUST be the last extension in
the ClientHello. There MUST NOT be more than one extension of the the ClientHello. There MUST NOT be more than one extension of the
same type. same type in a given extension block.
In TLS 1.3, unlike TLS 1.2, extensions are renegotiated with each In TLS 1.3, unlike TLS 1.2, extensions are renegotiated with each
handshake even when in resumption-PSK mode. However, 0-RTT handshake even when in resumption-PSK mode. However, 0-RTT
parameters are those negotiated in the previous handshake; mismatches parameters are those negotiated in the previous handshake; mismatches
may require rejecting 0-RTT (see Section 4.2.7). may require rejecting 0-RTT (see Section 4.2.9).
There are subtle (and not so subtle) interactions that may occur in There are subtle (and not so subtle) interactions that may occur in
this protocol between new features and existing features which may this protocol between new features and existing features which may
result in a significant reduction in overall security. The following result in a significant reduction in overall security. The following
considerations should be taken into account when designing new considerations should be taken into account when designing new
extensions: extensions:
- Some cases where a server does not agree to an extension are error - Some cases where a server does not agree to an extension are error
conditions, and some are simply refusals to support particular conditions, and some are simply refusals to support particular
features. In general, error alerts should be used for the former, features. In general, error alerts should be used for the former,
skipping to change at page 38, line 28 skipping to change at page 41, line 8
supported versions in preference order, with the most preferred supported versions in preference order, with the most preferred
version first. Implementations of this specification MUST send this version first. Implementations of this specification MUST send this
extension containing all versions of TLS which they are prepared to extension containing all versions of TLS which they are prepared to
negotiate (for this specification, that means minimally 0x0304, but negotiate (for this specification, that means minimally 0x0304, but
if previous versions of TLS are supported, they MUST be present as if previous versions of TLS are supported, they MUST be present as
well). well).
If this extension is not present, servers which are compliant with If this extension is not present, servers which are compliant with
this specification MUST negotiate TLS 1.2 or prior as specified in this specification MUST negotiate TLS 1.2 or prior as specified in
[RFC5246], even if ClientHello.legacy_version is 0x0304 or later. [RFC5246], even if ClientHello.legacy_version is 0x0304 or later.
Servers MAY abort the handshake upon receiving a ClientHello with
legacy_version 0x0304 or later.
If this extension is present, servers MUST ignore the If this extension is present, servers MUST ignore the
ClientHello.legacy_version value and MUST use only the ClientHello.legacy_version value and MUST use only the
"supported_versions" extension to determine client preferences. "supported_versions" extension to determine client preferences.
Servers MUST only select a version of TLS present in that extension Servers MUST only select a version of TLS present in that extension
and MUST ignore any unknown versions. Note that this mechanism makes and MUST ignore any unknown versions that are present in that
it possible to negotiate a version prior to TLS 1.2 if one side extension. Note that this mechanism makes it possible to negotiate a
supports a sparse range. Implementations of TLS 1.3 which choose to version prior to TLS 1.2 if one side supports a sparse range.
support prior versions of TLS SHOULD support TLS 1.2. Implementations of TLS 1.3 which choose to support prior versions of
TLS SHOULD support TLS 1.2. Servers should be prepared to receive
ClientHellos that include this extension but do not include 0x0304 in
the list of versions.
The server MUST NOT send the "supported_versions" extension. The The server MUST NOT send the "supported_versions" extension. The
server's selected version is contained in the ServerHello.version server's selected version is contained in the ServerHello.version
field as in previous versions of TLS. field as in previous versions of TLS.
4.2.1.1. Draft Version Indicator 4.2.1.1. Draft Version Indicator
RFC EDITOR: PLEASE REMOVE THIS SECTION RFC EDITOR: PLEASE REMOVE THIS SECTION
While the eventual version indicator for the RFC version of TLS 1.3 While the eventual version indicator for the RFC version of TLS 1.3
skipping to change at page 39, line 23 skipping to change at page 42, line 7
Cookies serve two primary purposes: Cookies serve two primary purposes:
- Allowing the server to force the client to demonstrate - Allowing the server to force the client to demonstrate
reachability at their apparent network address (thus providing a reachability at their apparent network address (thus providing a
measure of DoS protection). This is primarily useful for non- measure of DoS protection). This is primarily useful for non-
connection-oriented transports (see [RFC6347] for an example of connection-oriented transports (see [RFC6347] for an example of
this). this).
- Allowing the server to offload state to the client, thus allowing - Allowing the server to offload state to the client, thus allowing
it to send a HelloRetryRequest without storing any state. The it to send a HelloRetryRequest without storing any state. The
server does this by storing the hash of the ClientHello in the server can do this by storing the hash of the ClientHello in the
HelloRetryRequest cookie (protected with some suitable integrity HelloRetryRequest cookie (protected with some suitable integrity
algorithm). algorithm).
When sending a HelloRetryRequest, the server MAY provide a "cookie" When sending a HelloRetryRequest, the server MAY provide a "cookie"
extension to the client (this is an exception to the usual rule that 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 the only extensions that may be sent are those that appear in the
ClientHello). When sending the new ClientHello, the client MUST echo ClientHello). When sending the new ClientHello, the client MUST copy
the value of the extension. Clients MUST NOT use cookies in the contents of the extension received in the HelloRetryRequest into
subsequent connections. a "cookie" extension in the new ClientHello. Clients MUST NOT use
cookies in subsequent connections.
4.2.3. Signature Algorithms 4.2.3. 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. Clients which desire the server to authenticate itself signatures. Clients which desire the server to authenticate itself
via a certificate MUST send this extension. If a server is via a certificate MUST send this extension. If a server is
authenticating via a certificate and the client has not sent a authenticating via a certificate and the client has not sent a
"signature_algorithms" extension, then the server MUST abort the "signature_algorithms" extension, then the server MUST abort the
handshake with a "missing_extension" alert (see Section 8.2). handshake with a "missing_extension" alert (see Section 8.2).
The "extension_data" field of this extension in a ClientHello The "extension_data" field of this extension in a ClientHello
contains a SignatureSchemeList value: contains a SignatureSchemeList value:
enum { enum {
/* RSASSA-PKCS1-v1_5 algorithms */ /* RSASSA-PKCS1-v1_5 algorithms */
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),
/* ECDSA algorithms */ /* 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(0x0804), rsa_pss_sha256(0x0804),
rsa_pss_sha384(0x0805), rsa_pss_sha384(0x0805),
rsa_pss_sha512(0x0806), rsa_pss_sha512(0x0806),
/* EdDSA algorithms */ /* EdDSA algorithms */
ed25519(0x0807), ed25519(0x0807),
ed448(0x0808), ed448(0x0808),
/* Legacy algorithms */
rsa_pkcs1_sha1(0x0201),
ecdsa_sha1(0x0203),
/* Reserved Code Points */ /* Reserved Code Points */
private_use(0xFE00..0xFFFF), private_use(0xFE00..0xFFFF),
(0xFFFF) (0xFFFF)
} SignatureScheme; } SignatureScheme;
struct { struct {
SignatureScheme supported_signature_algorithms<2..2^16-2>; SignatureScheme supported_signature_algorithms<2..2^16-2>;
} SignatureSchemeList; } SignatureSchemeList;
Note: This enum is named "SignatureScheme" because there is already a Note: This enum is named "SignatureScheme" because there is already a
skipping to change at page 40, line 49 skipping to change at page 43, line 52
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 algorithm and then TLS to first hash the input with a specified hash algorithm and then
proceed as usual. The code point groups listed above have the proceed as usual. The code point groups listed above have the
following meanings: following meanings:
RSASSA-PKCS1-v1_5 algorithms Indicates a signature algorithm using RSASSA-PKCS1-v1_5 algorithms Indicates a signature algorithm using
RSASSA-PKCS1-v1_5 [RFC3447] with the corresponding hash algorithm RSASSA-PKCS1-v1_5 [RFC8017] with the corresponding hash algorithm
as defined in [SHS]. These values refer solely to signatures as defined in [SHS]. These values refer solely to signatures
which appear in certificates (see Section 4.4.2.2) and are not which appear in certificates (see Section 4.4.2.2) and are not
defined for use in signed TLS handshake messages. defined for use in signed TLS handshake messages.
ECDSA algorithms Indicates a signature algorithm using ECDSA ECDSA algorithms Indicates a signature algorithm using ECDSA
[ECDSA], the corresponding curve as defined in ANSI X9.62 [X962] [ECDSA], the corresponding curve as defined in ANSI X9.62 [X962]
and FIPS 186-4 [DSS], and the corresponding hash algorithm as and FIPS 186-4 [DSS], and the corresponding hash algorithm as
defined in [SHS]. The signature is represented as a DER-encoded defined in [SHS]. The signature is represented as a DER-encoded
[X690] ECDSA-Sig-Value structure. [X690] ECDSA-Sig-Value structure.
RSASSA-PSS algorithms Indicates a signature algorithm using RSASSA- RSASSA-PSS algorithms Indicates a signature algorithm using RSASSA-
PSS [RFC3447] with mask generation function 1. The digest used in PSS [RFC8017] with mask generation function 1. The digest used in
the mask generation function and the digest being signed are both the mask generation function and the digest being signed are both
the corresponding hash algorithm as defined in [SHS]. When used the corresponding hash algorithm as defined in [SHS]. When used
in signed TLS handshake messages, the length of the salt MUST be in signed TLS handshake messages, the length of the salt MUST be
equal to the length of the digest output. This codepoint is also equal to the length of the digest output. This codepoint is new
defined for use with TLS 1.2. in this document and is also defined for use with TLS 1.2.
EdDSA algorithms Indicates a signature algorithm using EdDSA as EdDSA algorithms Indicates a signature algorithm using EdDSA as
defined in [RFC8032] or its successors. Note that these defined in [RFC8032] 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.
rsa_pkcs1_sha1, dsa_sha1, and ecdsa_sha1 SHOULD NOT be offered. Legacy algorithms Indicates algorithms which are being deprecated
Clients offering these values for backwards compatibility MUST list because they use algorithms with known weaknesses, specifically
them as the lowest priority (listed after all other algorithms in SHA-1 which is used in this context with either with RSA using
SignatureSchemeList). TLS 1.3 servers MUST NOT offer a SHA-1 signed RSASSA-PKCS1-v1_5 or ECDSA. These values refer solely to
certificate unless no valid certificate chain can be produced without signatures which appear in certificates (see Section 4.4.2.2) and
it (see Section 4.4.2.2). are not defined for use in signed TLS handshake messages.
Endpoints SHOULD NOT negotiate these algorithms but are permitted
to do so solely for backward compatibility. Clients offering
these values MUST list them as the lowest priority (listed after
all other algorithms in SignatureSchemeList). TLS 1.3 servers
MUST NOT offer a SHA-1 signed certificate unless no valid
certificate chain can be produced without it (see
Section 4.4.2.2).
The signatures on certificates that are self-signed or certificates The signatures on certificates that are self-signed or certificates
that are trust anchors are not validated since they begin a that are trust anchors are not validated since they begin a
certification path (see [RFC5280], Section 3.2). A certificate that certification path (see [RFC5280], Section 3.2). A certificate that
begins a certification path MAY use a signature algorithm that is not begins a certification path MAY use a signature algorithm that is not
advertised as being supported in the "signature_algorithms" advertised as being supported in the "signature_algorithms"
extension. extension.
Note that TLS 1.2 defines this extension differently. TLS 1.3 Note that TLS 1.2 defines this extension differently. TLS 1.3
implementations willing to negotiate TLS 1.2 MUST behave in implementations willing to negotiate TLS 1.2 MUST behave in
accordance with the requirements of [RFC5246] when negotiating that accordance with the requirements of [RFC5246] when negotiating that
version. In particular: version. In particular:
- TLS 1.2 ClientHellos MAY omit this extension. - TLS 1.2 ClientHellos MAY omit this extension.
- In TLS 1.2, the extension contained hash/signature pairs. The - In TLS 1.2, the extension contained hash/signature pairs. The
pairs are encoded in two octets, so SignatureScheme values have pairs are encoded in two octets, so SignatureScheme values have
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], SHA-224, and DSA MUST
be used. NOT be used.
- ECDSA signature schemes align with TLS 1.2's ECDSA hash/signature - ECDSA signature schemes align with TLS 1.2's ECDSA hash/signature
pairs. However, the old semantics did not constrain the signing pairs. However, the old semantics did not constrain the signing
curve. If TLS 1.2 is negotiated, implementations MUST be prepared curve. If TLS 1.2 is negotiated, implementations MUST be prepared
to accept a signature that uses any curve that they advertised in to accept a signature that uses any curve that they advertised in
the "supported_groups" extension. the "supported_groups" extension.
- Implementations that advertise support for RSASSA-PSS (which is - Implementations that advertise support for RSASSA-PSS (which is
mandatory in TLS 1.3), MUST be prepared to accept a signature mandatory in TLS 1.3), MUST be prepared to accept a signature
using that scheme even when TLS 1.2 is negotiated. In TLS 1.2, using that scheme even when TLS 1.2 is negotiated. In TLS 1.2,
RSASSA-PSS is used with RSA cipher suites. RSASSA-PSS is used with RSA cipher suites.
4.2.3.1. Certificate Authorities 4.2.4. Certificate Authorities
The "certificate_authorities" extension is used to indicate the The "certificate_authorities" extension is used to indicate the
certificate authorities which an endpoint supports and which SHOULD certificate authorities which an endpoint supports and which SHOULD
be used by the receiving endpoint to guide certificate selection. be used by the receiving endpoint to guide certificate selection.
The body of the "certificate_authorities" extension consists of a The body of the "certificate_authorities" extension consists of a
CertificateAuthoritiesExtension structure. CertificateAuthoritiesExtension structure.
opaque DistinguishedName<1..2^16-1>; opaque DistinguishedName<1..2^16-1>;
skipping to change at page 42, line 47 skipping to change at page 46, line 10
The client MAY send the "certificate_authorities" extension in the The client MAY send the "certificate_authorities" extension in the
ClientHello message. The server MAY send it in the ClientHello message. The server MAY send it in the
CertificateRequest message. CertificateRequest message.
The "trusted_ca_keys" extension, which serves a similar purpose The "trusted_ca_keys" extension, which serves a similar purpose
[RFC6066], but is more complicated, is not used in TLS 1.3 (although [RFC6066], but is more complicated, is not used in TLS 1.3 (although
it may appear in ClientHello messages from clients which are offering it may appear in ClientHello messages from clients which are offering
prior versions of TLS). prior versions of TLS).
4.2.4. Negotiated Groups 4.2.5. Post-Handshake Client Authentication
The "post_handshake_auth" extension is used to indicate that a client
is willing to perform post-handshake authentication Section 4.6.2.
Servers MUST not send a post-handshake CertificateRequest to clients
which do not offer this extension. Servers MUST NOT send this
extension.
The "extension_data" field of the "post_handshake_auth" extension is
zero length.
4.2.6. 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 for key exchange, ordered the named groups which the client supports for key exchange, ordered
from most preferred to least preferred. from most 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 [RFC7919]. This extension was also used to negotiate [RFC4492] and [RFC7919]. This extension was also used to negotiate
ECDSA curves. Signature algorithms are now negotiated independently ECDSA curves. Signature algorithms are now negotiated independently
(see Section 4.2.3). (see Section 4.2.3).
skipping to change at page 44, line 8 skipping to change at page 47, line 48
ones in the "key_share" extension but is still willing to accept the ones in the "key_share" extension but is still willing to accept the
ClientHello, it SHOULD send "supported_groups" to update the client's ClientHello, it SHOULD send "supported_groups" to update the client's
view of its preferences; this extension SHOULD contain all groups the view of its preferences; this extension SHOULD contain all groups the
server supports, regardless of whether they are currently supported server supports, regardless of whether they are currently supported
by the client. Clients MUST NOT act upon any information found in by the client. Clients MUST NOT act upon any information found in
"supported_groups" prior to successful completion of the handshake, "supported_groups" prior to successful completion of the handshake,
but MAY use the information learned from a successfully completed but MAY use the information learned from a successfully completed
handshake to change what groups they use in their "key_share" handshake to change what groups they use in their "key_share"
extension in subsequent connections. extension in subsequent connections.
4.2.5. Key Share 4.2.7. Key Share
The "key_share" extension contains the endpoint's cryptographic The "key_share" extension contains the endpoint's cryptographic
parameters. parameters.
Clients MAY send an empty client_shares vector in order to request Clients MAY send an empty client_shares vector in order to request
group selection from the server at the cost of an additional round group selection from the server at the cost of an additional round
trip. (see Section 4.1.4) trip. (see Section 4.1.4)
struct { struct {
NamedGroup group; NamedGroup group;
opaque key_exchange<1..2^16-1>; opaque key_exchange<1..2^16-1>;
} KeyShareEntry; } KeyShareEntry;
group The named group for the key being exchanged. Finite Field group The named group for the key being exchanged. Finite Field
Diffie-Hellman [DH] parameters are described in Section 4.2.5.1; Diffie-Hellman [DH] parameters are described in Section 4.2.7.1;
Elliptic Curve Diffie-Hellman parameters are described in Elliptic Curve Diffie-Hellman parameters are described in
Section 4.2.5.2. Section 4.2.7.2.
key_exchange Key exchange information. The contents of this field key_exchange Key exchange information. The contents of this field
are determined by the specified group and its corresponding are determined by the specified group and its corresponding
definition. definition.
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 (Handshake.msg_type) { select (Handshake.msg_type) {
skipping to change at page 45, line 5 skipping to change at page 48, line 45
KeyShareEntry server_share; KeyShareEntry server_share;
}; };
} KeyShare; } KeyShare;
client_shares A list of offered KeyShareEntry values in descending client_shares A list of offered KeyShareEntry values in descending
order of client preference. This vector MAY be empty if the order of client preference. This vector MAY be empty if the
client is requesting a HelloRetryRequest. Each KeyShareEntry client is requesting a HelloRetryRequest. Each KeyShareEntry
value MUST correspond to a group offered in the "supported_groups" value MUST correspond to a group offered in the "supported_groups"
extension and MUST appear in the same order. However, the values extension and MUST appear in the same order. However, the values
MAY be a non-contiguous subset of the "supported_groups" extension MAY be a non-contiguous subset of the "supported_groups" extension
and MAY omit the most preferred groups. and MAY omit the most preferred groups. Such a situation could
arise if the most preferred groups are new and unlikely to be
supported in enough places to make pregenerating key shares for
them efficient.
selected_group The mutually supported group the server intends to selected_group The mutually supported group the server intends to
negotiate and is requesting a retried ClientHello/KeyShare for. negotiate and is requesting a retried ClientHello/KeyShare for.
server_share A single KeyShareEntry value that is in the same group server_share A single KeyShareEntry value that is in the same group
as one of the client's shares. as one of the client's shares.
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
skipping to change at page 45, line 37 skipping to change at page 49, line 32
original ClientHello; and (2) the selected_group field does not original ClientHello; and (2) the selected_group field does not
correspond to a group which was provided in the "key_share" extension correspond to a group which was provided in the "key_share" extension
in the original ClientHello. If either of these checks fails, then in the original ClientHello. If either of these checks fails, then
the client MUST abort the handshake with an "illegal_parameter" the client MUST abort the handshake with an "illegal_parameter"
alert. Otherwise, when sending the new ClientHello, the client MUST alert. Otherwise, when sending the new ClientHello, the client MUST
replace the original "key_share" extension with one containing only a replace the original "key_share" extension with one containing only a
new KeyShareEntry for the group indicated in the selected_group field new KeyShareEntry for the group indicated in the selected_group field
of the triggering HelloRetryRequest. of the triggering HelloRetryRequest.
If using (EC)DHE key establishment, servers offer exactly one If using (EC)DHE key establishment, servers offer exactly one
KeyShareEntry in the ServerHello. This value MUST correspond to the KeyShareEntry in the ServerHello. This value MUST be in the same
KeyShareEntry value offered by the client that the server has group as the KeyShareEntry value offered by the client that the
selected for the negotiated key exchange. Servers MUST NOT send a server has selected for the negotiated key exchange. Servers MUST
KeyShareEntry for any group not indicated in the "supported_groups" NOT send a KeyShareEntry for any group not indicated in the
extension and MUST NOT send a KeyShareEntry when using the "psk_ke" "supported_groups" extension and MUST NOT send a KeyShareEntry when
PskKeyExchangeMode. If a HelloRetryRequest was received by the using the "psk_ke" PskKeyExchangeMode. If a HelloRetryRequest was
client, the client MUST verify that the selected NamedGroup in the received by the client, the client MUST verify that the selected
ServerHello is the same as that in the HelloRetryRequest. If this NamedGroup in the ServerHello is the same as that in the
check fails, the client MUST abort the handshake with an HelloRetryRequest. If this check fails, the client MUST abort the
"illegal_parameter" alert. handshake with an "illegal_parameter" alert.
4.2.5.1. Diffie-Hellman Parameters 4.2.7.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 (Y = g^X mod p) for the specified group (see [RFC7919] public value (Y = g^X mod p) for the specified group (see [RFC7919]
for group definitions) encoded as a big-endian integer and padded for group definitions) encoded as a big-endian integer and padded to
with zeros to the size of p in bytes. the left with zeros to the size of p in bytes.
Note: For a given Diffie-Hellman group, the padding results in all Note: For a given Diffie-Hellman group, the padding results in all
public keys having the same length. public keys having the same length.
Peers MUST validate each other's public key Y by ensuring that 1 < Y Peers MUST validate each other's public key Y by ensuring that 1 < Y
< p-1. This check ensures that the remote peer is properly behaved < p-1. This check ensures that the remote peer is properly behaved
and isn't forcing the local system into a small subgroup. and isn't forcing the local system into a small subgroup.
4.2.5.2. ECDHE Parameters 4.2.7.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.
For secp256r1, secp384r1 and secp521r1, the contents are the byte For secp256r1, secp384r1 and secp521r1, the contents are the
string representation of an elliptic curve public value following the serialized value of the following struct:
conversion routine in Section 4.3.6 of ANSI X9.62 [X962].
Although X9.62 supports multiple point formats, any given curve MUST struct {
specify only a single point format. All curves currently specified uint8 legacy_form = 4;
in this document MUST only be used with the uncompressed point format opaque X[coordinate_length];
(the format for all ECDH functions is considered uncompressed). opaque Y[coordinate_length];
Peers MUST validate each other's public value Y by ensuring that the } UncompressedPointRepresentation;
point is a valid point on the elliptic curve.
For the curves secp256r1, secp384r1 and secp521r1, the appropriate X and Y respectively are the binary representations of the X and Y
validation procedures are defined in Section 4.3.7 of [X962] and values in network byte order. There are no internal length markers,
alternatively in Section 5.6.2.6 of [KEYAGREEMENT]. This process so each number representation occupies as many octets as implied by
consists of three steps: (1) verify that Y is not the point at the curve parameters. For P-256 this means that each of X and Y use
infinity (O), (2) verify that for Y = (x, y) both integers are in the 32 octets, padded on the left by zeros if necessary. For P-384 they
correct interval, (3) ensure that (x, y) is a correct solution to the take 48 octets each, and for P-521 they take 66 octets each.
elliptic curve equation. For these curves, implementers do not need
to verify membership in the correct subgroup. For the curves secp256r1, secp384r1 and secp521r1, peers MUST
validate each other's public value Y by ensuring that the point is a
valid point on the elliptic curve. The appropriate validation
procedures are defined in Section 4.3.7 of [X962] and alternatively
in Section 5.6.2.6 of [KEYAGREEMENT]. This process consists of three
steps: (1) verify that Y is not the point at infinity (O), (2) verify
that for Y = (x, y) both integers are in the correct interval, (3)
ensure that (x, y) is a correct solution to the elliptic curve
equation. For these curves, implementers do not need to verify
membership in the correct subgroup.
For X25519 and X448, the contents of the public value are the byte For X25519 and X448, the contents of the public value are the byte
string inputs and outputs of the corresponding functions defined in string inputs and outputs of the corresponding functions defined in
[RFC7748], 32 bytes for X25519 and 56 bytes for X448. [RFC7748], 32 bytes for X25519 and 56 bytes for X448.
Note: Versions of TLS prior to 1.3 permitted point format Note: Versions of TLS prior to 1.3 permitted point format
negotiation; TLS 1.3 removes this feature in favor of a single point negotiation; TLS 1.3 removes this feature in favor of a single point
format for each curve. format for each curve.
4.2.6. Pre-Shared Key Exchange Modes 4.2.8. Pre-Shared Key Exchange Modes
In order to use PSKs, clients MUST also send a In order to use PSKs, clients MUST also send a
"psk_key_exchange_modes" extension. The semantics of this extension "psk_key_exchange_modes" extension. The semantics of this extension
are that the client only supports the use of PSKs with these modes, are that the client only supports the use of PSKs with these modes,
which restricts both the use of PSKs offered in this ClientHello and which restricts both the use of PSKs offered in this ClientHello and
those which the server might supply via NewSessionTicket. those which the server might supply via NewSessionTicket.
A client MUST provide a "psk_key_exchange_modes" extension if it A client MUST provide a "psk_key_exchange_modes" extension if it
offers a "pre_shared_key" extension. If clients offer offers a "pre_shared_key" extension. If clients offer
"pre_shared_key" without a "psk_key_exchange_modes" extension, "pre_shared_key" without a "psk_key_exchange_modes" extension,
skipping to change at page 47, line 36 skipping to change at page 51, line 36
struct { struct {
PskKeyExchangeMode ke_modes<1..255>; PskKeyExchangeMode ke_modes<1..255>;
} PskKeyExchangeModes; } PskKeyExchangeModes;
psk_ke PSK-only key establishment. In this mode, the server MUST psk_ke PSK-only key establishment. In this mode, the server MUST
NOT supply a "key_share" value. NOT supply a "key_share" value.
psk_dhe_ke PSK with (EC)DHE key establishment. In this mode, the psk_dhe_ke PSK with (EC)DHE key establishment. In this mode, the
client and servers MUST supply "key_share" values as described in client and servers MUST supply "key_share" values as described in
Section 4.2.5. Section 4.2.7.
4.2.7. Early Data Indication 4.2.9. Early Data Indication
When a PSK is used, the client can send application data in its first When a PSK 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 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. "early_data" extension as well as the "pre_shared_key" extension.
The "extension_data" field of this extension contains an The "extension_data" field of this extension contains an
"EarlyDataIndication" value. "EarlyDataIndication" value.
struct {} Empty; struct {} Empty;
struct { struct {
select (Handshake.msg_type) { select (Handshake.msg_type) {
case new_session_ticket: uint32 max_early_data_size; case new_session_ticket: uint32 max_early_data_size;
case client_hello: Empty; case client_hello: Empty;
case encrypted_extensions: Empty; case encrypted_extensions: Empty;
}; };
} EarlyDataIndication; } EarlyDataIndication;
See Appendix B.3.4 for the use of the max_early_data_size field. See Section 4.6.1 for the use of the max_early_data_size field.
The parameters for the 0-RTT data (symmetric cipher suite, ALPN
protocol, etc.) are the same as those which were negotiated in the
connection which established the PSK. The PSK used to encrypt the
early data MUST be the first PSK listed in the client's
"pre_shared_key" extension.
For PSKs provisioned via NewSessionTicket, a server MUST validate For PSKs provisioned via NewSessionTicket, a server MUST validate
that the ticket age for the selected PSK identity (computed by that the ticket age for the selected PSK identity (computed by
subtracting ticket_age_add from PskIdentity.obfuscated_ticket_age subtracting ticket_age_add from PskIdentity.obfuscated_ticket_age
modulo 2^32) is within a small tolerance of the time since the ticket modulo 2^32) is within a small tolerance of the time since the ticket
was issued (see Section 4.2.8.3). If it is not, the server SHOULD was issued (see Section 4.2.10.4). If it is not, the server SHOULD
proceed with the handshake but reject 0-RTT, and SHOULD NOT take any proceed with the handshake but reject 0-RTT, and SHOULD NOT take any
other action that assumes that this ClientHello is fresh. other action that assumes that this ClientHello is fresh.
The parameters for the 0-RTT data (symmetric cipher suite, ALPN
protocol, etc.) are the same as those which were negotiated in the
connection which established the PSK. The PSK used to encrypt the
early data MUST be the first PSK listed in the client's
"pre_shared_key" extension.
0-RTT messages sent in the first flight have the same (encrypted) 0-RTT messages sent in the first flight have the same (encrypted)
content types as their corresponding messages sent in other flights content types as their corresponding messages sent in other flights
(handshake, application_data, and alert respectively) but are (handshake and application_data) but are protected under different
protected under different keys. After receiving the server's keys. After receiving the server's Finished message, if the server
Finished message, if the server has accepted early data, an has accepted early data, an EndOfEarlyData message will be sent to
EndOfEarlyData message will be sent to indicate the key change. This indicate the key change. This message will be encrypted with the
message will be encrypted with the 0-RTT traffic keys. 0-RTT traffic keys.
A server which receives an "early_data" extension MUST behave in one A server which receives an "early_data" extension MUST behave in one
of three ways: of three ways:
- Ignore the extension and return a regular 1-RTT response. The - Ignore the extension and return a regular 1-RTT response. The
server then ignores early data using trial decryption until it is server then ignores early data by attempting to decrypt received
able to receive the client's second flight and complete an records in the handshake traffic keys until it is able to receive
ordinary 1-RTT handshake. the client's second flight and complete an ordinary 1-RTT
handshake, skipping records that fail to decrypt, up to the
configured max_early_data_size.
- Request that the client send another ClientHello by responding - Request that the client send another ClientHello by responding
with a HelloRetryRequest. A client MUST NOT include the with a HelloRetryRequest. A client MUST NOT include the
"early_data" extension in its followup ClientHello. The server "early_data" extension in its followup ClientHello. The server
then ignores early data by skipping all records with external then ignores early data by skipping all records with external
content type of "application_data" (indicating that they are content type of "application_data" (indicating that they are
encrypted). encrypted).
- Return its own extension in EncryptedExtensions, indicating that - Return its own extension in EncryptedExtensions, indicating that
it intends to process the early data. It is not possible for the it intends to process the early data. It is not possible for the
server to accept only a subset of the early data messages. server to accept only a subset of the early data messages. Even
though the server sends a message accepting early data, the actual
early data itself may already be in flight by the time the server
generates this message.
In order to accept early data, the server MUST have accepted a PSK In order to accept early data, the server MUST have accepted a PSK
cipher suite and selected the first key offered in the client's cipher suite and selected the first key offered in the client's
"pre_shared_key" extension. In addition, it MUST verify that the "pre_shared_key" extension. In addition, it MUST verify that the
following values are consistent with those negotiated in the following values are consistent with those negotiated in the
connection during which the ticket was established. connection during which the ticket was established.
- The TLS version number and cipher suite. - The TLS version number and cipher suite.
- The selected ALPN [RFC7301] protocol, if any. - The selected ALPN [RFC7301] protocol, if any.
Future extensions MUST define their interaction with 0-RTT. Future extensions MUST define their interaction with 0-RTT.
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 first flight data using one of the
falling back to 1-RTT). If the client attempts a 0-RTT handshake but first two mechanisms listed above (thus falling back to 1-RTT or
the server rejects it, the server will generally not have the 0-RTT 2-RTT). If the client attempts a 0-RTT handshake but the server
record protection keys and must instead trial decrypt each record rejects it, the server will generally not have the 0-RTT record
with the 1-RTT handshake keys until it finds one that decrypts protection keys and must instead use trial decryption (either with
properly, and then pick up the handshake from that point. the 1-RTT handshake keys or by looking for a cleartext ClientHello in
the case of HelloRetryRequest) to find the first non-0RTT message.
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, if the all records when processing early data records. Specifically, if the
server fails to decrypt any 0-RTT record following an accepted server fails to decrypt any 0-RTT record following an accepted
"early_data" extension it MUST terminate the connection with a "early_data" extension it MUST terminate the connection with a
"bad_record_mac" alert as per Section 5.2. "bad_record_mac" alert as per Section 5.2.
If the server rejects the "early_data" extension, the client If the server rejects the "early_data" extension, the client
application MAY opt to retransmit early data once the handshake has application MAY opt to retransmit early data once the handshake has
been completed. A TLS implementation SHOULD NOT automatically re- been completed. Note that automatic re-transmission of early data
send early data; applications are in a better position to decide when could result in assumptions about the status of the connection being
re-transmission is appropriate. Automatic re-transmission of early incorrect. For instance, when the negotiated connection selects a
data could result in assumptions about the status of the connection different ALPN protocol from what was used for the early data, an
being incorrect. In particular, a TLS implementation MUST NOT application might need to construct different messages. Similarly,
automatically re-send early data unless the negotiated connection if early data assumes anything about the connection state, it might
selects the same ALPN protocol. An application might need to be sent in error after the handshake completes.
construct different messages if a different protocol is selected.
Similarly, if early data assumes anything about the connection state,
it might be sent in error after the handshake completes.
4.2.8. Pre-Shared Key Extension A TLS implementation SHOULD NOT automatically re-send early data;
applications are in a better position to decide when re-transmission
is appropriate. A TLS implementation MUST NOT automatically re-send
early data unless the negotiated connection selects the same ALPN
protocol.
4.2.10. 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 PSK key establishment. with PSK key establishment.
The "extension_data" field of this extension contains a The "extension_data" field of this extension contains a
"PreSharedKeyExtension" value: "PreSharedKeyExtension" value:
struct { struct {
opaque identity<1..2^16-1>; opaque identity<1..2^16-1>;
skipping to change at page 50, line 37 skipping to change at page 54, line 43
case server_hello: case server_hello:
uint16 selected_identity; uint16 selected_identity;
}; };
} PreSharedKeyExtension; } PreSharedKeyExtension;
identity A label for a key. For instance, a ticket defined in identity A label for a key. For instance, a ticket defined in
Appendix B.3.4, or a label for a pre-shared key established Appendix B.3.4, or a label for a pre-shared key established
externally. externally.
obfuscated_ticket_age For each ticket, the time since the client obfuscated_ticket_age An obfuscated version of the age of the key.
learned about the server configuration that it is using, in Section 4.2.10.1 describes how to form this value for identities
milliseconds. This value is added modulo 2^32 to the established via the NewSessionTicket message. For identities
"ticket_age_add" value that was included with the ticket, see
Section 4.6.1. This addition prevents passive observers from
correlating connections unless tickets are reused. Note: because
ticket lifetimes are restricted to a week, 32 bits is enough to
represent any plausible age, even in milliseconds. For identities
established externally an obfuscated_ticket_age of 0 SHOULD be established externally an obfuscated_ticket_age of 0 SHOULD be
used, and servers MUST ignore the value. used, and servers MUST ignore the value.
identities A list of the identities that the client is willing to identities A list of the identities that the client is willing to
negotiate with the server. If sent alongside the "early_data" negotiate with the server. If sent alongside the "early_data"
extension (see Section 4.2.7), the first identity is the one used extension (see Section 4.2.9), the first identity is the one used
for 0-RTT data. for 0-RTT data.
binders A series of HMAC values, one for each PSK offered in the binders A series of HMAC values, one for each PSK offered in the
"pre_shared_keys" extension and in the same order, computed as "pre_shared_keys" extension and in the same order, computed as
described below. described below.
selected_identity The server's chosen identity expressed as a selected_identity The server's chosen identity expressed as a
(0-based) index into the identities in the client's list. (0-based) index into the identities in the client's list.
Each PSK is associated with a single Hash algorithm. For PSKs Each PSK is associated with a single Hash algorithm. For PSKs
established via the ticket mechanism (Section 4.6.1), this is the established via the ticket mechanism (Section 4.6.1), this is the
Hash used for the KDF. For externally established PSKs, the Hash Hash used for the KDF on the connection where the ticket was
algorithm MUST be set when the PSK is established. The server must established. For externally established PSKs, the Hash algorithm
ensure that it selects a compatible PSK (if any) and cipher suites. MUST be set when the PSK is established, or default to SHA-256 if no
such algorithm is defined. The server must ensure that it selects a
compatible PSK (if any) and cipher suite.
Implementor's note: the most straightforward way to implement the Implementor's note: the most straightforward way to implement the
PSK/cipher suite matching requirements is to negotiate the cipher PSK/cipher suite matching requirements is to negotiate the cipher
suite first and then exclude any incompatible PSKs. Any unknown PSKs suite first and then exclude any incompatible PSKs. Any unknown PSKs
(e.g., they are not in the PSK database or are encrypted with an (e.g., they are not in the PSK database or are encrypted with an
unknown key) SHOULD simply be ignored. If no acceptable PSKs are unknown key) SHOULD simply be ignored. If no acceptable PSKs are
found, the server SHOULD perform a non-PSK handshake if possible. found, the server SHOULD perform a non-PSK handshake if possible.
Prior to accepting PSK key establishment, the server MUST validate Prior to accepting PSK key establishment, the server MUST validate
the corresponding binder value (see Section 4.2.8.1 below). If this the corresponding binder value (see Section 4.2.10.2 below). If this
value is not present or does not validate, the server MUST abort the value is not present or does not validate, the server MUST abort the
handshake. Servers SHOULD NOT attempt to validate multiple binders; handshake. Servers SHOULD NOT attempt to validate multiple binders;
rather they SHOULD select a single PSK and validate solely the binder rather they SHOULD select a single PSK and validate solely the binder
that corresponds to that PSK. In order to accept PSK key that corresponds to that PSK. In order to accept PSK key
establishment, the server sends a "pre_shared_key" extension establishment, the server sends a "pre_shared_key" extension
indicating the selected identity. indicating the selected identity.
Clients MUST verify that the server's selected_identity is within the Clients MUST verify that the server's selected_identity is within the
range supplied by the client, that the server selected a cipher suite range supplied by the client, that the server selected a cipher suite
containing a Hash associated with the PSK and that a server indicating a Hash associated with the PSK and that a server
"key_share" extension is present if required by the ClientHello "key_share" extension is present if required by the ClientHello
"psk_key_exchange_modes". If these values are not consistent the "psk_key_exchange_modes". If these values are not consistent the
client MUST abort the handshake with an "illegal_parameter" alert. client MUST abort the handshake with an "illegal_parameter" alert.
If the server supplies an "early_data" extension, the client MUST If the server supplies an "early_data" extension, the client MUST
verify that the server's selected_identity is 0. If any other value verify that the server's selected_identity is 0. If any other value
is returned, the client MUST abort the handshake with an is returned, the client MUST abort the handshake with an
"illegal_parameter" alert. "illegal_parameter" alert.
This extension MUST be the last extension in the ClientHello (this This extension MUST be the last extension in the ClientHello (this
facilitates implementation as described below). Servers MUST check facilitates implementation as described below). Servers MUST check
that it is the last extension and otherwise fail the handshake with that it is the last extension and otherwise fail the handshake with
an "illegal_parameter" alert. an "illegal_parameter" alert.
4.2.8.1. PSK Binder 4.2.10.1. Ticket Age
The client's view of the age of a ticket is the time since the
receipt of the NewSessionTicket message. Clients MUST NOT attempt to
use tickets which have ages greater than the "ticket_lifetime" value
which was provided with the ticket. The "obfuscated_ticket_age"
field of each PskIdentity contains an obfuscated version of the
ticket age formed by taking the age in milliseconds and adding the
"ticket_age_add" value that was included with the ticket, see
Section 4.6.1 modulo 2^32. This addition prevents passive observers
from correlating connections unless tickets are reused. Note that
the "ticket_lifetime" field in the NewSessionTicket message is in
seconds but the "obfuscated_ticket_age" is in milliseconds. Because
ticket lifetimes are restricted to a week, 32 bits is enough to
represent any plausible age, even in milliseconds.
4.2.10.2. PSK Binder
The PSK binder value forms a binding between a PSK and the current The PSK binder value forms a binding between a PSK and the current
handshake, as well as between the handshake in which the PSK was handshake, as well as between the handshake in which the PSK was
generated (if via a NewSessionTicket message) and the handshake where generated (if via a NewSessionTicket message) and the handshake where
it was used. Each entry in the binders list is computed as an HMAC it was used. Each entry in the binders list is computed as an HMAC
over a transcript hash (see Section 4.4.1) containing a partial over a transcript hash (see Section 4.4.1) containing a partial
ClientHello up to and including the PreSharedKeyExtension.identities ClientHello up to and including the PreSharedKeyExtension.identities
field. That is, it includes all of the ClientHello but not the field. That is, it includes all of the ClientHello but not the
binders list itself. The length fields for the message (including binders list itself. The length fields for the message (including
the overall length, the length of the extensions block, and the the overall length, the length of the extensions block, and the
length of the "pre_shared_key" extension) are all set as if binders length of the "pre_shared_key" extension) are all set as if binders
of the correct lengths were present. of the correct lengths were present.
The binding_value is computed in the same way as the Finished message The PskBinderEntry is computed in the same way as the Finished
(Section 4.4.4) but with the BaseKey being the binder_key derived via message (Section 4.4.4) but with the BaseKey being the binder_key
the key schedule from the corresponding PSK which is being offered derived via the key schedule from the corresponding PSK which is
(see Section 7.1). being offered (see Section 7.1).
If the handshake includes a HelloRetryRequest, the initial If the handshake includes a HelloRetryRequest, the initial
ClientHello and HelloRetryRequest are included in the transcript ClientHello and HelloRetryRequest are included in the transcript
along with the new ClientHello. For instance, if the client sends along with the new ClientHello. For instance, if the client sends
ClientHello1, its binder will be computed over: ClientHello1, its binder will be computed over:
Transcript-Hash(ClientHello1[truncated]) Transcript-Hash(ClientHello1[truncated])
If the server responds with HelloRetryRequest, and the client then If the server responds with HelloRetryRequest, and the client then
sends ClientHello2, its binder will be computed over: sends ClientHello2, its binder will be computed over:
Transcript-Hash(ClientHello1, Transcript-Hash(ClientHello1,
HelloRetryRequest, HelloRetryRequest,
ClientHello2[truncated]) ClientHello2[truncated])
The full ClientHello is included in all other handshake hash The full ClientHello1 is included in all other handshake hash
computations. Note that in the first flight, ClientHello1[truncated] computations. Note that in the first flight, ClientHello1[truncated]
is hashed directly, but in the second flight, it is hashed and then is hashed directly, but in the second flight, ClientHello1 is hashed
reinjected as a "handshake_hash" message, as described in and then reinjected as a "handshake_hash" message, as described in
Section 4.4.1. Section 4.4.1.
4.2.8.2. Processing Order 4.2.10.3. Processing Order
Clients are permitted to "stream" 0-RTT data until they receive the Clients are permitted to "stream" 0-RTT data until they receive the
server's Finished, only then sending the EndOfEarlyData message. In server's Finished, only then sending the EndOfEarlyData message. In
order to avoid deadlocks, when accepting "early_data", servers MUST order to avoid deadlocks, when accepting "early_data", servers MUST
process the client's ClientHello and then immediately send the process the client's ClientHello and then immediately send the
ServerHello, rather than waiting for the client's EndOfEarlyData ServerHello, rather than waiting for the client's EndOfEarlyData
message. message.
4.2.8.3. Replay Properties 4.2.10.4. Replay Properties
As noted in Section 2.3, TLS provides a limited mechanism for replay As noted in Section 2.3, TLS provides a limited mechanism for replay
protection for data sent by the client in the first flight. protection for data sent by the client in the first flight. This
mechanism is intended to ensure that attackers cannot replay
ClientHello messages at a time substantially after the original
ClientHello was sent.
The "obfuscated_ticket_age" parameter in the client's To properly validate the ticket age, a server needs to store the
"pre_shared_key" extension SHOULD be used by servers to limit the following values, either locally or by encoding them in the ticket:
time over which the first flight might be replayed. A server can
store the time at which it sends a ticket to the client, or encode
the time in the ticket. Then, each time it receives an
"pre_shared_key" extension, it can subtract the base value and check
to see if the value used by the client matches its expectations.
The ticket age (the value with "ticket_age_add" subtracted) provided - The time that the server generated the session ticket.
by the client will be shorter than the actual time elapsed on the
server by a single round trip time. This difference is comprised of
the delay in sending the NewSessionTicket message to the client, plus
the time taken to send the ClientHello to the server. For this
reason, a server SHOULD measure the round trip time prior to sending
the NewSessionTicket message and account for that in the value it
saves.
To properly validate the ticket age, a server needs to save at least - The estimated round trip time between the client and server; this
two items: can be estimated by measuring the time between sending the
Finished message and receiving the first message in the client's
second flight, or potentially using information from the operating
system.
- The time that the server generated the session ticket and the - The "ticket_age_add" parameter from the NewSessionTicket message
estimated round trip time can be added together to form a baseline in which the ticket was established.
time.
- The "ticket_age_add" parameter from the NewSessionTicket is needed The server can determine the client's view of the age of the ticket
to recover the ticket age from the "obfuscated_ticket_age" by subtracting the ticket's "ticket_age_add value" from the
parameter. "obfuscated_ticket_age" parameter in the client's "pre_shared_key"
extension. The server can independently determine its view of the
age of the ticket by subtracting the the time the ticket was issued
from the current time. If the client and server clocks were running
at the same rate, the client's view of would be shorter than the
actual time elapsed on the server by a single round trip time. This
difference is comprised of the delay in sending the NewSessionTicket
message to the client, plus the time taken to send the ClientHello to
the server.
The mismatch between the client's and server's views of age is thus
given by:
mismatch = (client's view + RTT estimate) - (server's view)
There are several potential sources of error that make an exact There are several potential sources of error that make an exact
measurement of time difficult. Variations in client and server clock measurement of time difficult. Variations in client and server clock
rates are likely to be minimal, though potentially with gross time rates are likely to be minimal, though potentially with gross time
corrections. Network propagation delays are most likely causes of a corrections. Network propagation delays are the most likely causes
mismatch in legitimate values for elapsed time. Both the of a mismatch in legitimate values for elapsed time. Both the
NewSessionTicket and ClientHello messages might be retransmitted and NewSessionTicket and ClientHello messages might be retransmitted and
therefore delayed, which might be hidden by TCP. therefore delayed, which might be hidden by TCP. For browser clients
on the Internet, this implies that an allowance on the order of ten
A small allowance for errors in clocks and variations in measurements seconds to account for errors in clocks and variations in
is advisable. However, any allowance also increases the opportunity measurements is advisable; other deployment scenarios may have
for replay. In this case, it is better to reject early data and fall different needs. Outside the selected range, the server SHOULD
back to a full 1-RTT handshake than to risk greater exposure to reject early data and fall back to a full 1-RTT handshake. Clock
replay attacks. In common network topologies for browser clients,
small allowances on the order of ten seconds are reasonable. Clock
skew distributions are not symmetric, so the optimal tradeoff may skew distributions are not symmetric, so the optimal tradeoff may
involve an asymmetric replay window. involve an asymmetric range of permissible mismatch values.
4.3. Server Parameters 4.3. Server Parameters
The next two messages from the server, EncryptedExtensions and The next two messages from the server, EncryptedExtensions and
CertificateRequest, contain information from the server that CertificateRequest, contain information from the server that
determines the rest of the handshake. These messages are encrypted determines the rest of the handshake. These messages are encrypted
with keys derived from the server_handshake_traffic_secret. with keys derived from the server_handshake_traffic_secret.
4.3.1. Encrypted Extensions 4.3.1. Encrypted Extensions
In all handshakes, the server MUST send the EncryptedExtensions In all handshakes, the server MUST send the EncryptedExtensions
message immediately after the ServerHello message. This is the first message immediately after the ServerHello message. This is the first
message that is encrypted under keys derived from the message that is encrypted under keys derived from the
server_handshake_traffic_secret. server_handshake_traffic_secret.
The EncryptedExtensions message contains extensions which should be The EncryptedExtensions message contains extensions that can be
protected, i.e., any which are not needed to establish the protected, i.e., any which are not needed to establish the
cryptographic context, but which are not associated with individual cryptographic context, but which are not associated with individual
certificates. The client MUST check EncryptedExtensions for the certificates. The client MUST check EncryptedExtensions for the
presence of any forbidden extensions and if any are found MUST abort presence of any forbidden extensions and if any are found MUST abort
the handshake with an "illegal_parameter" alert. the handshake with an "illegal_parameter" alert.
Structure of this message: Structure of this message:
struct { struct {
Extension extensions<0..2^16-1>; Extension extensions<0..2^16-1>;
skipping to change at page 55, line 8 skipping to change at page 59, line 27
opaque certificate_request_context<0..2^8-1>; opaque certificate_request_context<0..2^8-1>;
Extension extensions<2..2^16-1>; Extension extensions<2..2^16-1>;
} CertificateRequest; } CertificateRequest;
certificate_request_context An opaque string which identifies the certificate_request_context An opaque string which identifies the
certificate request and which will be echoed in the client's certificate request and which will be echoed in the client's
Certificate message. The certificate_request_context MUST be Certificate message. The certificate_request_context MUST be
unique within the scope of this connection (thus preventing replay unique within the scope of this connection (thus preventing replay
of client CertificateVerify messages). This field SHALL be zero of client CertificateVerify messages). This field SHALL be zero
length unless used for the post-handshake authentication exchanges length unless used for the post-handshake authentication exchanges
described in Section 4.6.2. described in Section 4.6.2. When requesting post-handshake
authentication, the server SHOULD make the context unpredictable
to the client (e.g., by randomly generating it) in order to
prevent an attacker who has temporary access to the client's
private key from pre-computing valid CertificateVerify messages.
extensions An optional set of extensions describing the parameters extensions A set of extensions describing the parameters of the
of the certificate being requested. The "signature_algorithms" certificate being requested. The "signature_algorithms" extension
extension MUST be specified. Clients MUST ignore unrecognized MUST be specified, and other extensions may optionally be included
if defined for this message. Clients MUST ignore unrecognized
extensions. extensions.
In prior versions of TLS, the CertificateRequest message carried a In prior versions of TLS, the CertificateRequest message carried a
list of signature algorithms and certificate authorities which the list of signature algorithms and certificate authorities which the
server would accept. In TLS 1.3 the former is expressed by sending server would accept. In TLS 1.3 the former is expressed by sending
the "signature_algorithms" extension. The latter is expressed by the "signature_algorithms" extension. The latter is expressed by
sending the "certificate_authorities" extension (see sending the "certificate_authorities" extension (see Section 4.2.4).
Section 4.2.3.1).
Servers which are authenticating with a PSK MUST NOT send the Servers which are authenticating with a PSK MUST NOT send the
CertificateRequest message. CertificateRequest message in the main handshake, though they MAY
send it in post-handshake authentication (see Section 4.6.2) provided
that the client has sent the "post_handshake_auth" extension (see
Section 4.2.5).
4.3.2.1. OID Filters 4.3.2.1. OID Filters
The "oid_filters" extension allows servers to provide a set of OID/ The "oid_filters" extension allows servers to provide a set of OID/
value pairs which it would like the client's certificate to match. value pairs which it would like the client's certificate to match.
This extension MUST only be sent in the CertificateRequest message. This extension MUST only be sent in the CertificateRequest message.
struct { struct {
opaque certificate_extension_oid<1..2^8-1>; opaque certificate_extension_oid<1..2^8-1>;
opaque certificate_extension_values<0..2^16-1>; opaque certificate_extension_values<0..2^16-1>;
skipping to change at page 57, line 7 skipping to change at page 61, line 33
- The certificate and signing key to be used. - The certificate and signing key to be used.
- A Handshake Context consisting of the set of messages to be - A Handshake Context consisting of the set of messages to be
included in the transcript hash. included in the transcript hash.
- 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 The certificate to be used for authentication and any Certificate The certificate to be used for authentication, and any
supporting certificates in the chain. Note that certificate-based supporting certificates in the chain. Note that certificate-based
client authentication is not available in the 0-RTT case. client authentication is not available in the 0-RTT case.
CertificateVerify A signature over the value Transcript- CertificateVerify A signature over the value Transcript-
Hash(Handshake Context, Certificate) Hash(Handshake Context, Certificate)
Finished A MAC over the value Transcript-Hash(Handshake Context, Finished A MAC over the value Transcript-Hash(Handshake Context,
Certificate, CertificateVerify) using a MAC key derived from the Certificate, CertificateVerify) using a MAC key derived from the
base key. base key.
The following table defines the Handshake Context and MAC Base Key The following table defines the Handshake Context and MAC Base Key
for each scenario: for each scenario:
+------------+-----------------------------+------------------------+ +-----------+----------------------------+--------------------------+
| Mode | Handshake Context | Base Key | | Mode | Handshake Context | Base Key |
+------------+-----------------------------+------------------------+ +-----------+----------------------------+--------------------------+
| Server | ClientHello ... later of En | server_handshake_traff | | Server | ClientHello ... later of E | server_handshake_traffic |
| | cryptedExtensions/Certifica | ic_secret | | | ncryptedExtensions/Certifi | _secret |
| | teRequest | | | | cateRequest | |
| | | | | | | |
| Client | ClientHello ... | client_handshake_traff | | Client | ClientHello ... later of | client_handshake_traffic |
| | ServerFinished | ic_secret | | | server | _secret |
| | | | | | Finished/EndOfEarlyData | |
| Post- | ClientHello ... | client_traffic_secret_ | | | | |
| Handshake | ClientFinished + | N | | Post- | ClientHello ... client | client_application_traff |
| | CertificateRequest | | | Handshake | Finished + | ic_secret_N |
+------------+-----------------------------+------------------------+ | | CertificateRequest | |
+-----------+----------------------------+--------------------------+
4.4.1. The Transcript Hash 4.4.1. The Transcript Hash
Many of the cryptographic computations in TLS make use of a Many of the cryptographic computations in TLS make use of a
transcript hash. This value is computed by hashing the concatenation transcript hash. This value is computed by hashing the concatenation
of each included handshake message, including the handshake message of each included handshake message, including the handshake message
header carrying the handshake message type and length fields, but not header carrying the handshake message type and length fields, but not
including record layer headers. I.e., including record layer headers. I.e.,
Transcript-Hash(M1, M2, ... MN) = Hash(M1 || M2 ... MN) Transcript-Hash(M1, M2, ... MN) = Hash(M1 || M2 ... MN)
skipping to change at page 58, line 15 skipping to change at page 62, line 47
Hash(message_hash || // Handshake Type Hash(message_hash || // Handshake Type
00 00 Hash.length || // Handshake message length 00 00 Hash.length || // Handshake message length
Hash(ClientHello1) || // Hash of ClientHello1 Hash(ClientHello1) || // Hash of ClientHello1
HelloRetryRequest ... MN) HelloRetryRequest ... MN)
The reason for this construction is to allow the server to do a The reason for this construction is to allow the server to do a
stateless HelloRetryRequest by storing just the hash of ClientHello1 stateless HelloRetryRequest by storing just the hash of ClientHello1
in the cookie, rather than requiring it to export the entire in the cookie, rather than requiring it to export the entire
intermediate hash state (see Section 4.2.2). intermediate hash state (see Section 4.2.2).
For concreteness, the transcript hash is always taken from the
following sequence of handshake messages, starting at the first
ClientHello and including only those messages that were sent:
ClientHello, HelloRetryRequest, ClientHello, ServerHello,
EncryptedExtensions, server CertificateRequest, server Certificate,
server CertificateVerify, server Finished, EndOfEarlyData, client
Certificate, client CertificateVerify, client Finished.
In general, implementations can implement the transcript by keeping a In general, implementations can implement the transcript by keeping a
running transcript hash value based on the negotiated hash. Note, running transcript hash value based on the negotiated hash. Note,
however, that subsequent post-handshake authentications do not 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.
4.4.2. Certificate 4.4.2. Certificate
This message conveys the endpoint's certificate chain to the peer.
The server MUST send a Certificate message whenever the agreed-upon The server MUST send a Certificate message whenever the agreed-upon
key exchange method uses certificates for authentication (this key exchange method uses certificates for authentication (this
includes all key exchange methods defined in this document except includes all key exchange methods defined in this document except
PSK). This message conveys the endpoint's certificate chain to the PSK).
peer.
The client MUST send a Certificate message if and only if the server The client MUST send a Certificate message if and only if the server
has requested client authentication via a CertificateRequest message has requested client authentication via a CertificateRequest message
(Section 4.3.2). If the server requests client authentication but no (Section 4.3.2). If the server requests client authentication but no
suitable certificate is available, the client MUST send a Certificate suitable certificate is available, the client MUST send a Certificate
message containing no certificates (i.e., with the "certificate_list" message containing no certificates (i.e., with the "certificate_list"
field having length 0). field having length 0).
Structure of this message: Structure of this message:
opaque ASN1Cert<1..2^24-1>;
struct { struct {
ASN1Cert cert_data; select(certificate_type){
case RawPublicKey:
// From RFC 7250 ASN.1_subjectPublicKeyInfo
opaque ASN1_subjectPublicKeyInfo<1..2^24-1>;
case X.509:
opaque cert_data<1..2^24-1>;
}
Extension extensions<0..2^16-1>; Extension extensions<0..2^16-1>;
} CertificateEntry; } CertificateEntry;
struct { struct {
opaque certificate_request_context<0..2^8-1>; opaque certificate_request_context<0..2^8-1>;
CertificateEntry certificate_list<0..2^24-1>; CertificateEntry certificate_list<0..2^24-1>;
} Certificate; } Certificate;
certificate_request_context If this message is in response to a certificate_request_context If this message is in response to a
CertificateRequest, the value of certificate_request_context in CertificateRequest, the value of certificate_request_context in
that message. Otherwise (in the case of server authentication), that message. Otherwise (in the case of server authentication),
this field SHALL be zero length. this field SHALL be zero length.
certificate_list This is a sequence (chain) of CertificateEntry certificate_list This is a sequence (chain) of CertificateEntry
structures, each containing a single certificate and set of structures, each containing a single certificate and set of
extensions. The sender's certificate MUST come in the first extensions.
CertificateEntry in the list. Each following certificate SHOULD
directly certify one preceding it. Because certificate validation
requires that trust anchors be distributed independently, a
certificate that specifies a trust anchor MAY be omitted from the
chain, provided that supported peers are known to possess any
omitted certificates.
extensions: A set of extension values for the CertificateEntry. The extensions: A set of extension values for the CertificateEntry. The
"Extension" format is defined in Section 4.2. Valid extensions "Extension" format is defined in Section 4.2. Valid extensions
include OCSP Status extensions ([RFC6066] and [RFC6961]) and include OCSP Status extensions ([RFC6066] and [RFC6961]) and
SignedCertificateTimestamps ([RFC6962]). An extension MUST only SignedCertificateTimestamps ([RFC6962]). An extension MUST only
be present in a Certificate message if the corresponding be present in a Certificate message if the corresponding
ClientHello extension was presented in the initial handshake. If ClientHello extension was presented in the initial handshake. If
an extension applies to the entire chain, it SHOULD be included in an extension applies to the entire chain, it SHOULD be included in
the first CertificateEntry. the first CertificateEntry.
If the corresponding certificate type extension
("server_certificate_type" or "client_certificate_type") was not used
or the X.509 certificate type was negotiated, then each
CertificateEntry contains an X.509 certificate. The sender's
certificate MUST come in the first CertificateEntry in the list.
Each following certificate SHOULD directly certify one preceding it.
Because certificate validation requires that trust anchors be
distributed independently, a certificate that specifies a trust
anchor MAY be omitted from the chain, provided that supported peers
are known to possess any omitted certificates.
Note: Prior to TLS 1.3, "certificate_list" ordering required each Note: Prior to TLS 1.3, "certificate_list" ordering required each
certificate to certify the one immediately preceding it; however, certificate to certify the one immediately preceding it; however,
some implementations allowed some flexibility. Servers sometimes some implementations allowed some flexibility. Servers sometimes
send both a current and deprecated intermediate for transitional send both a current and deprecated intermediate for transitional
purposes, and others are simply configured incorrectly, but these purposes, and others are simply configured incorrectly, but these
cases can nonetheless be validated properly. For maximum cases can nonetheless be validated properly. For maximum
compatibility, all implementations SHOULD be prepared to handle compatibility, all implementations SHOULD be prepared to handle
potentially extraneous certificates and arbitrary orderings from any potentially extraneous certificates and arbitrary orderings from any
TLS version, with the exception of the end-entity certificate which TLS version, with the exception of the end-entity certificate which
MUST be first. MUST be first.
If the RawPublicKey certificate type was negotiated, then the
certificate_list MUST contain no more than one CertificateEntry,
which contains an ASN1_subjectPublicKeyInfo value as defined in
[RFC7250], Section 3.
The OpenPGP certificate type [RFC6091] MUST NOT be used with TLS 1.3.
The server's certificate_list MUST always be non-empty. A client The server's certificate_list MUST always be non-empty. A client
will send an empty certificate_list if it does not have an will send an empty certificate_list if it does not have an
appropriate certificate to send in response to the server's appropriate certificate to send in response to the server's
authentication request. authentication request.
4.4.2.1. OCSP Status and SCT Extensions 4.4.2.1. OCSP Status and SCT Extensions
[RFC6066] and [RFC6961] provide extensions to negotiate the server [RFC6066] and [RFC6961] provide extensions to negotiate the server
sending OCSP responses to the client. In TLS 1.2 and below, the sending OCSP responses to the client. In TLS 1.2 and below, the
server replies with an empty extension to indicate negotiation of server replies with an empty extension to indicate negotiation of
this extension and the OCSP information is carried in a this extension and the OCSP information is carried in a
CertificateStatus message. In TLS 1.3, the server's OCSP information CertificateStatus message. In TLS 1.3, the server's OCSP information
is carried in an extension in the CertificateEntry containing the is carried in an extension in the CertificateEntry containing the
associated certificate. Specifically: The body of the associated certificate. Specifically: The body of the
"status_request" extension from the server MUST be a "status_request" extension from the server MUST be a
CertificateStatus structure as defined in [RFC6066]. CertificateStatus structure as defined in [RFC6066], which is
interpreted as defined in [RFC6960].
A server MAY request that a client present an OCSP response with its A server MAY request that a client present an OCSP response with its
certificate by sending a "status_request" extension in its certificate by sending an empty "status_request" extension in its
CertificateRequest message. If the client opts to send an OCSP CertificateRequest message. If the client opts to send an OCSP
response, the body of its "status_request" extension MUST be a response, the body of its "status_request" extension MUST be a
CertificateStatus structure as defined in [RFC6066]. CertificateStatus structure as defined in [RFC6066].
Similarly, [RFC6962] provides a mechanism for a server to send a Similarly, [RFC6962] provides a mechanism for a server to send a
Signed Certificate Timestamp (SCT) as an extension in the Signed Certificate Timestamp (SCT) as an extension in the ServerHello
ServerHello. In TLS 1.3, the server's SCT information is carried in in TLS 1.2 and below. In TLS 1.3, the server's SCT information is
an extension in CertificateEntry. carried in an extension in CertificateEntry.
4.4.2.2. Server Certificate Selection 4.4.2.2. Server Certificate Selection
The following rules apply to the certificates sent by the server: The following rules apply to the certificates sent by the server:
- The certificate type MUST be X.509v3 [RFC5280], unless explicitly - The certificate type MUST be X.509v3 [RFC5280], unless explicitly
negotiated otherwise (e.g., [RFC5081]). negotiated otherwise (e.g., [RFC7250]).
- The server's end-entity certificate's public key (and associated - The server's end-entity certificate's public key (and associated
restrictions) MUST be compatible with the selected authentication restrictions) MUST be compatible with the selected authentication
algorithm (currently RSA or ECDSA). algorithm (currently RSA or ECDSA).
- The certificate MUST allow the key to be used for signing (i.e., - The certificate MUST allow the key to be used for signing (i.e.,
the digitalSignature bit MUST be set if the Key Usage extension is the digitalSignature bit MUST be set if the Key Usage extension is
present) with a signature scheme indicated in the client's present) with a signature scheme indicated in the client's
"signature_algorithms" extension. "signature_algorithms" extension.
skipping to change at page 61, line 18 skipping to change at page 66, line 28
If the server has multiple certificates, it chooses one of them based If the server has multiple certificates, it chooses one of them based
on the above-mentioned criteria (in addition to other criteria, such on the above-mentioned criteria (in addition to other criteria, such
as transport layer endpoint, local configuration and preferences). as transport layer endpoint, local configuration and preferences).
4.4.2.3. Client Certificate Selection 4.4.2.3. Client Certificate Selection
The following rules apply to certificates sent by the client: The following rules apply to certificates sent by the client:
- The certificate type MUST be X.509v3 [RFC5280], unless explicitly - The certificate type MUST be X.509v3 [RFC5280], unless explicitly
negotiated otherwise (e.g., [RFC5081]). negotiated otherwise (e.g., [RFC7250]).
- If the certificate_authorities list in the CertificateRequest - If the "certificate_authorities" extension in the
message was non-empty, at least one of the certificates in the CertificateRequest message was present, at least one of the
certificate chain SHOULD be issued by one of the listed CAs. certificates in the certificate chain SHOULD be issued by one of
the listed CAs.
- The certificates MUST be signed using an acceptable signature - The certificates MUST be signed using an acceptable signature
algorithm, as described in Section 4.3.2. Note that this relaxes algorithm, as described in Section 4.3.2. Note that this relaxes
the constraints on certificate-signing algorithms found in prior the constraints on certificate-signing algorithms found in prior
versions of TLS. versions of TLS.
- If the certificate_extensions list in the CertificateRequest - If the certificate_extensions list in the CertificateRequest
message was non-empty, the end-entity certificate MUST match the message was non-empty, the end-entity certificate MUST match the
extension OIDs recognized by the client, as described in extension OIDs recognized by the client, as described in
Section 4.3.2. Section 4.3.2.
skipping to change at page 62, line 41 skipping to change at page 68, line 7
Structure of this message: Structure of this message:
struct { struct {
SignatureScheme algorithm; SignatureScheme algorithm;
opaque signature<0..2^16-1>; opaque signature<0..2^16-1>;
} CertificateVerify; } CertificateVerify;
The algorithm field specifies the signature algorithm used (see The algorithm field specifies the signature algorithm used (see
Section 4.2.3 for the definition of this field). The signature is a Section 4.2.3 for the definition of this field). The signature is a
digital signature using that algorithm. The content to be signed is digital signature using that algorithm. The content that is covered
the hash output as described in Section 4.4 namely: under the signature is the hash output as described in Section 4.4,
namely:
Transcript-Hash(Handshake Context, Certificate) Transcript-Hash(Handshake Context, Certificate)
The digital signature is then computed over the concatenation of: The digital signature is then computed over the concatenation of:
- A string that consists of octet 32 (0x20) repeated 64 times - A string that consists of octet 32 (0x20) repeated 64 times
- The context string - The context string
- A single 0 byte which serves as the separator - A single 0 byte which serves as the separator
- The content to be signed - The content to be signed
This structure is intended to prevent an attack on previous versions This structure is intended to prevent an attack on previous versions
of TLS in which the ServerKeyExchange format meant that attackers of TLS in which the ServerKeyExchange format meant that attackers
could obtain a signature of a message with a chosen 32-byte prefix could obtain a signature of a message with a chosen 32-byte prefix
(ClientHello.random). The initial 64-byte pad clears that prefix (ClientHello.random). The initial 64-byte pad clears that prefix
along with the server-controlled ServerHello.random. along with the server-controlled ServerHello.random.
skipping to change at page 63, line 46 skipping to change at page 69, line 12
- The private signing key corresponding to the certificate sent in - The private signing key corresponding to the certificate sent in
the previous message the previous message
If the CertificateVerify message is sent by a server, the signature If the CertificateVerify message is sent by a server, the signature
algorithm MUST be one offered in the client's "signature_algorithms" algorithm MUST be one offered in the client's "signature_algorithms"
extension unless no valid certificate chain can be produced without extension unless no valid certificate chain can be produced without
unsupported algorithms (see Section 4.2.3). unsupported algorithms (see Section 4.2.3).
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
field of the CertificateRequest message. field of the "signature_algorithms" extension in the
CertificateRequest message.
In addition, the signature algorithm MUST be compatible with the key In addition, the signature algorithm MUST be compatible with the key
in the sender's end-entity certificate. RSA signatures MUST use an in the sender's end-entity certificate. RSA signatures MUST use an
RSASSA-PSS algorithm, regardless of whether RSASSA-PKCS1-v1_5 RSASSA-PSS algorithm, regardless of whether RSASSA-PKCS1-v1_5
algorithms appear in "signature_algorithms". SHA-1 MUST NOT be used algorithms appear in "signature_algorithms". SHA-1 MUST NOT be used
in any signatures in CertificateVerify. All SHA-1 signature in any signatures in CertificateVerify. All SHA-1 signature
algorithms in this specification are defined solely for use in legacy algorithms in this specification are defined solely for use in legacy
certificates, and are not valid for CertificateVerify signatures. certificates, and are not valid for CertificateVerify signatures.
The receiver of a CertificateVerify MUST verify the signature field. The receiver of a CertificateVerify message MUST verify the signature
The verification process takes as input: field. The verification process takes as input:
- The content covered by the digital signature - The content covered by the digital signature
- The public key contained in the end-entity certificate found in - The public key contained in the end-entity certificate found in
the associated Certificate message. the associated Certificate message.
- The digital signature received in the signature field of the - The digital signature received in the signature field of the
CertificateVerify message CertificateVerify message
If the verification fails, the receiver MUST terminate the handshake If the verification fails, the receiver MUST terminate the handshake
with a "decrypt_error" alert. with a "decrypt_error" alert.
Note: When used with non-certificate-based handshakes (e.g., PSK),
the client's signature does not cover the server's certificate
directly. When the PSK was established through a NewSessionTicket,
the client's signature transitively covers the server's certificate
through the PSK binder. [PSK-FINISHED] describes a concrete attack
on constructions that do not bind to the server's certificate. It is
unsafe to use certificate-based client authentication when the client
might potentially share the same PSK/key-id pair with two different
endpoints and implementations MUST NOT combine external PSKs with
certificate-based authentication.
4.4.4. Finished 4.4.4. Finished
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 handshake block. It is essential for providing authentication of the handshake
and of the computed keys. and of the computed keys.
Recipients of Finished messages MUST verify that the contents are Recipients of Finished messages MUST verify that the contents are
correct and if incorrect MUST terminate the connection with a correct and if incorrect MUST terminate the connection with a
"decrypt_error" alert. "decrypt_error" alert.
Once a side has sent its Finished message and received and validated Once a side has sent its Finished message and received and validated
the Finished message from its peer, it may begin to send and receive the Finished message from its peer, it may begin to send and receive
application data over the connection. Early data may be sent prior application data over the connection. Early data may be sent prior
to the receipt of the peer's Finished message, per Section 4.2.7. to the receipt of the peer's Finished message, per Section 4.2.9.
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 4.4 using HKDF (see Section 7.1). Base key defined in Section 4.4 using HKDF (see Section 7.1).
Specifically: Specifically:
finished_key = finished_key =
HKDF-Expand-Label(BaseKey, "finished", "", Hash.length) HKDF-Expand-Label(BaseKey, "finished", "", Hash.length)
Structure of this message: Structure of this message:
skipping to change at page 65, line 44 skipping to change at page 70, line 48
Any records following a 1-RTT Finished message MUST be encrypted Any records following a 1-RTT Finished message MUST be encrypted
under the appropriate application traffic key as described in under the appropriate application traffic key as described in
Section 7.2. In particular, this includes any alerts sent by the Section 7.2. In particular, this includes any alerts sent by the
server in response to client Certificate and CertificateVerify server in response to client Certificate and CertificateVerify
messages. messages.
4.5. End of Early Data 4.5. End of Early Data
struct {} EndOfEarlyData; struct {} EndOfEarlyData;
The EndOfEarlyData message is sent by the client to indicate that all If the server sent an "early_data" extension, the client MUST send an
0-RTT application_data messages have been transmitted (or none will EndOfEarlyData after receiving the server Finished. This indicates
be sent at all) and that the following records are protected under that all 0-RTT application_data messages, if any, have been
transmitted and that the following records are protected under
handshake traffic keys. Servers MUST NOT send this message and handshake traffic keys. Servers MUST NOT send this message and
clients receiving it MUST terminate the connection with an clients receiving it MUST terminate the connection with an
"unexpected_message" alert. This message is encrypted under keys "unexpected_message" alert. This message is encrypted under keys
derived from the client_early_traffic_secret. derived from the client_early_traffic_secret.
4.6. Post-Handshake Messages 4.6. 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 messages use a handshake content type and are encrypted under These messages use a handshake content type and are encrypted under
the appropriate application traffic key. the appropriate application traffic key.
4.6.1. New Session Ticket Message 4.6.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 ticket value and creates a pre-shared key (PSK) binding between the ticket value and
the resumption master secret. the resumption master secret.
The client MAY use this PSK for future handshakes by including the The client MAY use this PSK for future handshakes by including the
ticket value in the "pre_shared_key" extension in its ClientHello ticket value in the "pre_shared_key" extension in its ClientHello
(Section 4.2.8). Servers MAY send multiple tickets on a single (Section 4.2.10). Servers MAY send multiple tickets on a single
connection, either immediately after each other or after specific connection, either immediately after each other or after specific
events. For instance, the server might send a new ticket after post- events. For instance, the server might send a new ticket after post-
handshake authentication in order to encapsulate the additional handshake authentication in order to encapsulate the additional
client authentication state. Clients SHOULD attempt to use each client authentication state. Clients SHOULD attempt to use each
ticket no more than once, with more recent tickets being used first. ticket no more than once, with more recent tickets being used first.
Any ticket MUST only be resumed with a cipher suite that has the same Any ticket MUST only be resumed with a cipher suite that has the same
KDF hash as that used to establish the original connection, and only KDF hash as that used to establish the original connection, and only
if the client provides the same SNI value as in the original if the client provides the same SNI value as in the original
connection, as described in Section 3 of [RFC6066]. connection, as described in Section 3 of [RFC6066].
skipping to change at page 67, line 13 skipping to change at page 72, line 19
discarded immediately. Clients MUST NOT cache tickets for longer discarded immediately. Clients MUST NOT cache tickets for longer
than 7 days, regardless of the ticket_lifetime, and MAY delete the than 7 days, regardless of the ticket_lifetime, and MAY delete the
ticket earlier based on local policy. A server MAY treat a ticket ticket 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 as valid for a shorter period of time than what is stated in the
ticket_lifetime. ticket_lifetime.
ticket_age_add A securely generated, random 32-bit value that is ticket_age_add A securely generated, random 32-bit value that is
used to obscure the age of the ticket that the client includes in used to obscure the age of the ticket that the client includes in
the "pre_shared_key" extension. The client-side ticket age is the "pre_shared_key" extension. The client-side ticket age is
added to this value modulo 2^32 to obtain the value that is added to this value modulo 2^32 to obtain the value that is
transmitted by the client. transmitted by the client. The server MUST generate a fresh value
for each ticket it sends.
ticket The value of the ticket to be used as the PSK identity. The ticket The value of the ticket to be used as the PSK identity. The
ticket itself is an opaque label. It MAY either be a database ticket itself is an opaque label. It MAY either be a database
lookup key or a self-encrypted and self-authenticated value. lookup key or a self-encrypted and self-authenticated value.
Section 4 of [RFC5077] describes a recommended ticket construction Section 4 of [RFC5077] describes a recommended ticket construction
mechanism. mechanism.
extensions A set of extension values for the ticket. The extensions A set of extension values for the ticket. The
"Extension" format is defined in Section 4.2. Clients MUST ignore "Extension" format is defined in Section 4.2. Clients MUST ignore
unrecognized extensions. unrecognized extensions.
The sole extension currently defined for NewSessionTicket is The sole extension currently defined for NewSessionTicket is
"early_data", indicating that the ticket may be used to send 0-RTT "early_data", indicating that the ticket may be used to send 0-RTT
data (Section 4.2.7)). It contains the following value: data (Section 4.2.9)). It contains the following value:
max_early_data_size The maximum amount of 0-RTT data that the client max_early_data_size The maximum amount of 0-RTT data that the client
is allowed to send when using this ticket, in bytes. Only is allowed to send when using this ticket, in bytes. Only
Application Data payload (i.e., plaintext but not padding or the Application Data payload (i.e., plaintext but not padding or the
inner content type byte) is counted. A server receiving more than inner content type byte) is counted. A server receiving more than
max_early_data_size bytes of 0-RTT data SHOULD terminate the max_early_data_size bytes of 0-RTT data SHOULD terminate the
connection with an "unexpected_message" alert. connection with an "unexpected_message" alert. Note that servers
that reject early data due to lack of cryptographic material will
be unable to differentiate padding from content, so clients SHOULD
NOT depend on being able to send large quantities of padding in
early data records.
Note that in principle it is possible to continue issuing new tickets Note that in principle it is possible to continue issuing new tickets
which continue to indefinitely extend the lifetime of the keying which indefinitely extend the lifetime of the keying material
material originally derived from an initial non-PSK handshake (which originally derived from an initial non-PSK handshake (which was most
was most likely tied to the peer's certificate). It is RECOMMENDED likely tied to the peer's certificate). It is RECOMMENDED that
that implementations place limits on the total lifetime of such implementations place limits on the total lifetime of such keying
keying material; these limits should take into account the lifetime material; these limits should take into account the lifetime of the
of the peer's certificate, the likelihood of intervening revocation, peer's certificate, the likelihood of intervening revocation, and the
and the time since the peer's online CertificateVerify signature. time since the peer's online CertificateVerify signature.
4.6.2. Post-Handshake Authentication 4.6.2. Post-Handshake Authentication
The server is permitted to request client authentication at any time When the client has sent the "post_handshake_auth" extension (see
after the handshake has completed by sending a CertificateRequest Section 4.2.5), a server MAY request client authentication at any
message. The client SHOULD respond with the appropriate time after the handshake has completed by sending a
Authentication messages. If the client chooses to authenticate, it CertificateRequest message. The client MUST respond with the
MUST send Certificate, CertificateVerify, and Finished. If it appropriate Authentication messages (see Section 4.4). If the client
declines, it MUST send a Certificate message containing no chooses to authenticate, it MUST send Certificate, CertificateVerify,
certificates followed by Finished. and Finished. If it declines, it MUST send a Certificate message
containing no certificates followed by Finished. All of the client's
messages for a given response MUST appear consecutively on the wire
with no intervening messages of other types.
Note: Because client authentication may require prompting the user, A client that receives a CertificateRequest message without having
sent the "post_handshake_auth" extension MUST send an
"unexpected_message" fatal alert.
Note: Because client authentication could involve prompting the user,
servers MUST be prepared for some delay, including receiving an servers MUST be prepared for some delay, including receiving an
arbitrary number of other messages between sending the arbitrary number of other messages between sending the
CertificateRequest and receiving a response. In addition, clients CertificateRequest and receiving a response. In addition, clients
which receive multiple CertificateRequests in close succession MAY which receive multiple CertificateRequests in close succession MAY
respond to them in a different order than they were received (the respond to them in a different order than they were received (the
certificate_request_context value allows the server to disambiguate certificate_request_context value allows the server to disambiguate
the responses). the responses).
4.6.3. Key and IV Update 4.6.3. Key and IV Update
skipping to change at page 70, line 5 skipping to change at page 75, line 21
rules. Note that these rules are stricter than what was enforced in rules. Note that these rules are stricter than what was enforced in
TLS 1.2. TLS 1.2.
Handshake messages MAY be coalesced into a single TLSPlaintext record Handshake messages MAY be coalesced into a single TLSPlaintext record
or fragmented across several records, provided that: or fragmented across several records, provided that:
- Handshake messages MUST NOT be interleaved with other record - Handshake messages MUST NOT be interleaved with other record
types. That is, if a handshake message is split over two or more types. That is, if a handshake message is split over two or more
records, there MUST NOT be any other records between them. records, there MUST NOT be any other records between them.
- Handshake messages MUST NOT span key changes. Because the - Handshake messages MUST NOT span key changes. Implementations
MUST verify that all messages immediately preceding a key change
align with a record boundary; if not, then they MUST terminate the
connection with an "unexpected_message" alert. Because the
ClientHello, EndOfEarlyData, ServerHello, Finished, and KeyUpdate ClientHello, EndOfEarlyData, ServerHello, Finished, and KeyUpdate
messages can arrive immediately prior to a key change, upon messages can immediately precede a key change, implementations
receiving these messages a receiver MUST verify that the end of MUST send these messages in alignment with a record boundary.
these messages aligns with a record boundary; if not, then it MUST
terminate the connection with an "unexpected_message" alert.
Implementations MUST NOT send zero-length fragments of Handshake Implementations MUST NOT send zero-length fragments of Handshake
types, even if those fragments contain padding. types, even if those fragments contain padding.
Alert messages (Section 6) MUST NOT be fragmented across records and Alert messages (Section 6) MUST NOT be fragmented across records and
multiple Alert messages MUST NOT be coalesced into a single multiple Alert messages MUST NOT be coalesced into a single
TLSPlaintext record. In other words, a record with an Alert type TLSPlaintext record. In other words, a record with an Alert type
MUST contain exactly one message. MUST contain exactly one message.
Application Data messages contain data that is opaque to TLS. Application Data messages contain data that is opaque to TLS.
Application Data messages are always protected. Zero-length Application Data messages are always protected. Zero-length
fragments of Application Data MAY be sent as they are potentially fragments of Application Data MAY be sent as they are potentially
useful as a traffic analysis countermeasure. useful as a traffic analysis countermeasure.
enum { enum {
invalid(0),
alert(21), alert(21),
handshake(22), handshake(22),
application_data(23), application_data(23),
(255) (255)
} ContentType; } ContentType;
struct { struct {
ContentType type; ContentType type;
ProtocolVersion legacy_record_version; ProtocolVersion legacy_record_version;
uint16 length; uint16 length;
skipping to change at page 72, line 42 skipping to change at page 78, line 26
TLSInnerPlaintext structure. TLSInnerPlaintext structure.
AEAD algorithms take as input a single key, a nonce, a plaintext, and AEAD algorithms take as input a single key, a nonce, a plaintext, and
"additional data" to be included in the authentication check, as "additional data" to be included in the authentication check, as
described in Section 2.1 of [RFC5116]. The key is either the described in Section 2.1 of [RFC5116]. The key is either the
client_write_key or the server_write_key, the nonce is derived from client_write_key or the server_write_key, the nonce is derived from
the sequence number (see Section 5.3) and the client_write_iv or the sequence number (see Section 5.3) and the client_write_iv or
server_write_iv, and the additional data input is empty (zero server_write_iv, and the additional data input is empty (zero
length). Derivation of traffic keys is defined in Section 7.3. length). Derivation of traffic keys is defined in Section 7.3.
The plaintext is the concatenation of TLSInnerPlaintext.fragment, The plaintext input to the AEAD is the the encoded TLSInnerPlaintext
TLSInnerPlaintext.type, and any padding bytes (zeros). structure.
The AEAD output consists of the ciphertext output from the AEAD The AEAD output consists of the ciphertext output from the AEAD
encryption operation. The length of the plaintext is greater than encryption operation. The length of the plaintext is greater than
TLSInnerPlaintext.length due to the inclusion of the corresponding TLSPlaintext.length due to the inclusion of
TLSInnerPlaintext.type and any padding supplied by the sender. The TLSInnerPlaintext.type and any padding supplied by the sender. The
length of the AEAD output will generally be larger than the length of the AEAD output will generally be larger than the
plaintext, but by an amount that varies with the AEAD algorithm. plaintext, but by an amount that varies with the AEAD algorithm.
Since the ciphers might incorporate padding, the amount of overhead Since the ciphers might incorporate padding, the amount of overhead
could vary with different lengths of plaintext. Symbolically, could vary with different lengths of plaintext. Symbolically,
AEADEncrypted = AEADEncrypted =
AEAD-Encrypt(write_key, nonce, plaintext of fragment) AEAD-Encrypt(write_key, nonce, plaintext)
In order to decrypt and verify, the cipher takes as input the key, In order to decrypt and verify, the cipher takes as input the key,
nonce, and the AEADEncrypted value. The output is either the nonce, and the AEADEncrypted value. The output is either the
plaintext or an error indicating that the decryption failed. There plaintext or an error indicating that the decryption failed. There
is no separate integrity check. That is: is no separate integrity check. That is:
plaintext of encrypted_record = plaintext of encrypted_record =
AEAD-Decrypt(write_key, nonce, AEADEncrypted) AEAD-Decrypt(peer_write_key, nonce, AEADEncrypted)
If the decryption fails, the receiver MUST terminate the connection If the decryption fails, the receiver MUST terminate the connection
with a "bad_record_mac" alert. with a "bad_record_mac" alert.
An AEAD algorithm used in TLS 1.3 MUST NOT produce an expansion An AEAD algorithm used in TLS 1.3 MUST NOT produce an expansion
greater than 255 octets. An endpoint that receives a record from its greater than 255 octets. An endpoint that receives a record from its
peer with TLSCipherText.length larger than 2^14 + 256 octets MUST peer with TLSCiphertext.length larger than 2^14 + 256 octets MUST
terminate the connection with a "record_overflow" alert. This limit terminate the connection with a "record_overflow" alert. This limit
is derived from the maximum TLSPlaintext length of 2^14 octets + 1 is derived from the maximum TLSPlaintext length of 2^14 octets + 1
octet for ContentType + the maximum AEAD expansion of 255 octets. octet for ContentType + the maximum AEAD expansion of 255 octets.
5.3. Per-Record Nonce 5.3. Per-Record Nonce
A 64-bit sequence number is maintained separately for reading and A 64-bit sequence number is maintained separately for reading and
writing records. Each sequence number is set to zero at the writing records. Each sequence number is set to zero at the
beginning of a connection and whenever the key is changed. beginning of a connection and whenever the key is changed.
The sequence number is incremented by one after reading or writing The appropriate sequence number is incremented by one after reading
each record. The first record transmitted under a particular set of or writing each record. The first record transmitted under a
traffic keys MUST use sequence number 0. particular set of traffic keys MUST use sequence number 0.
Because the size of sequence numbers is 64-bit, they should not wrap. Because the size of sequence numbers is 64-bit, they should not wrap.
If a TLS implementation would need to wrap a sequence number, it MUST If a TLS implementation would need to wrap a sequence number, it MUST
either re-key (Section 4.6.3) or terminate the connection. either re-key (Section 4.6.3) or terminate the connection.
Each AEAD algorithm will specify a range of possible lengths for the Each AEAD algorithm will specify a range of possible lengths for the
per-record nonce, from N_MIN bytes to N_MAX bytes of input per-record nonce, from N_MIN bytes to N_MAX bytes of input
([RFC5116]). The length of the TLS per-record nonce (iv_length) is ([RFC5116]). The length of the TLS per-record nonce (iv_length) is
set to the larger of 8 bytes and N_MIN for the AEAD algorithm (see set to the larger of 8 bytes and N_MIN for the AEAD algorithm (see
[RFC5116] Section 4). An AEAD algorithm where N_MAX is less than 8 [RFC5116] Section 4). An AEAD algorithm where N_MAX is less than 8
skipping to change at page 74, line 17 skipping to change at page 79, line 49
The resulting quantity (of length iv_length) is used as the per- The resulting quantity (of length iv_length) is used as the per-
record nonce. record nonce.
Note: This is a different construction from that in TLS 1.2, which Note: This is a different construction from that in TLS 1.2, which
specified a partially explicit nonce. specified a partially explicit nonce.
5.4. Record Padding 5.4. Record Padding
All encrypted TLS records can be padded to inflate the size of the All encrypted TLS records can be padded to inflate the size of the
TLSCipherText. This allows the sender to hide the size of the TLSCiphertext. This allows the sender to hide the size of the
traffic from an observer. traffic from an observer.
When generating a TLSCiphertext record, implementations MAY choose to When generating a TLSCiphertext record, implementations MAY choose to
pad. An unpadded record is just a record with a padding length of pad. An unpadded record is just a record with a padding length of
zero. Padding is a string of zero-valued bytes appended to the zero. Padding is a string of zero-valued bytes appended to the
ContentType field before encryption. Implementations MUST set the ContentType field before encryption. Implementations MUST set the
padding octets to all zeros before encrypting. padding octets to all zeros before encrypting.
Application Data records may contain a zero-length Application Data records may contain a zero-length
TLSInnerPlaintext.content if the sender desires. This permits TLSInnerPlaintext.content if the sender desires. This permits
skipping to change at page 74, line 52 skipping to change at page 80, line 37
size limits) without introducing new content types. The design also size limits) without introducing new content types. The design also
enforces all-zero padding octets, which allows for quick detection of enforces all-zero padding octets, which allows for quick detection of
padding errors. 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 MUST terminate the find a non-zero octet in the cleartext, it MUST terminate the
connection with an "unexpected_message" alert. connection with an "unexpected_message" 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 encoded TLSInnerPlaintext MUST not exceed 2^14
octets. If the maximum fragment length is reduced, such as by the
max_fragment_length extension from [RFC6066], then the reduced limit
applies to the full plaintext, including the padding.
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 has its own padding, it may the application layer protocol atop TLS has its own padding, it may
be preferable to pad application_data TLS records within the be preferable to pad application_data TLS records within the
application layer. Padding for encrypted handshake and alert TLS application layer. Padding for encrypted handshake and alert TLS
records must still be handled at the TLS layer, though. Later records must still be handled at the TLS layer, though. Later
documents may define padding selection algorithms, or define a documents may define padding selection algorithms, or define a
padding policy request mechanism through TLS extensions or some other padding policy request mechanism through TLS extensions or some other
means. means.
skipping to change at page 75, line 39 skipping to change at page 81, line 29
6. Alert Protocol 6. Alert Protocol
One of the content types supported by the TLS record layer is the One of the content types supported by the TLS record layer is the
alert type. Like other messages, alert messages are encrypted as alert type. Like other messages, alert messages are encrypted as
specified by the current connection state. specified by the current connection state.
Alert messages convey a description of the alert and a legacy field Alert messages convey a description of the alert and a legacy field
that conveyed the severity of the message in previous versions of that conveyed the severity of the message in previous versions of
TLS. In TLS 1.3, the severity is implicit in the type of alert being TLS. In TLS 1.3, the severity is implicit in the type of alert being
sent, and can safely be ignored. Some alerts are sent to indicate sent, and the 'level' field can safely be ignored. The
orderly closure of the connection or the end of early data (see "close_notify" alert is used to indicate orderly closure of the
Section 6.1). Upon receiving such an alert, the TLS implementation connection. Upon receiving such an alert, the TLS implementation
SHOULD indicate end-of-data to the application, and if appropriate SHOULD indicate end-of-data to the application.
for the alert type, send a closure alert in response.
Error alerts indicate abortive closure of the connection (see Error alerts indicate abortive closure of the connection (see
Section 6.2). Upon receiving an error alert, the TLS implementation Section 6.2). Upon receiving an error alert, the TLS implementation
SHOULD indicate an error to the application and MUST NOT allow any SHOULD indicate an error to the application and MUST NOT allow any
further data to be sent or received on the connection. Servers and further data to be sent or received on the connection. Servers and
clients MUST forget keys and secrets associated with a failed clients MUST forget keys and secrets associated with a failed
connection. Stateful implementations of tickets (as in many clients) connection. Stateful implementations of tickets (as in many clients)
SHOULD discard tickets associated with failed connections. SHOULD discard tickets associated with failed connections.
All the alerts listed in Section 6.2 MUST be sent as fatal and MUST All the alerts listed in Section 6.2 MUST be sent as fatal and MUST
be treated as fatal regardless of the AlertLevel in the message. be treated as fatal regardless of the AlertLevel in the message.
Unknown alert types MUST be treated as fatal. Unknown alert types MUST be treated as fatal.
Note: TLS defines two generic alerts (see Section 6) to use upon
failure to parse a message. Peers which receive a message which
cannot be parsed according to the syntax (e.g., have a length
extending beyond the message boundary or contain an out-of-range
length) MUST terminate the connection with a "decode_error" alert.
Peers which receive a message which is syntactically correct but
semantically invalid (e.g., a DHE share of p - 1, or an invalid enum)
MUST terminate the connection with an "illegal_parameter" alert.
enum { warning(1), fatal(2), (255) } AlertLevel; enum { warning(1), fatal(2), (255) } AlertLevel;
enum { enum {
close_notify(0), close_notify(0),
unexpected_message(10), unexpected_message(10),
bad_record_mac(20), bad_record_mac(20),
record_overflow(22), record_overflow(22),
handshake_failure(40), handshake_failure(40),
bad_certificate(42), bad_certificate(42),
unsupported_certificate(43), unsupported_certificate(43),
skipping to change at page 76, line 40 skipping to change at page 82, line 38
inappropriate_fallback(86), inappropriate_fallback(86),
user_canceled(90), user_canceled(90),
missing_extension(109), missing_extension(109),
unsupported_extension(110), unsupported_extension(110),
certificate_unobtainable(111), certificate_unobtainable(111),
unrecognized_name(112), unrecognized_name(112),
bad_certificate_status_response(113), bad_certificate_status_response(113),
bad_certificate_hash_value(114), bad_certificate_hash_value(114),
unknown_psk_identity(115), unknown_psk_identity(115),
certificate_required(116), certificate_required(116),
no_application_protocol(120),
(255) (255)
} AlertDescription; } AlertDescription;
struct { struct {
AlertLevel level; AlertLevel level;
AlertDescription description; AlertDescription description;
} Alert; } Alert;
6.1. Closure Alerts 6.1. Closure Alerts
skipping to change at page 78, line 37 skipping to change at page 84, line 37
alert is used for all deprotection failures. This alert should alert is used for all deprotection failures. This alert should
never be observed in communication between proper implementations, never be observed in communication between proper implementations,
except when messages were corrupted in the network. except when messages were corrupted in the network.
record_overflow A TLSCiphertext record was received that had a record_overflow A TLSCiphertext record was received that had a
length more than 2^14 + 256 bytes, or a record decrypted to a length more than 2^14 + 256 bytes, or a record decrypted to a
TLSPlaintext record with more than 2^14 bytes. This alert should TLSPlaintext record with more than 2^14 bytes. This alert should
never be observed in communication between proper implementations, never be observed in communication between proper implementations,
except when messages were corrupted in the network. except when messages were corrupted in the network.
handshake_failure Reception of a "handshake_failure" alert message handshake_failure Receipt of a "handshake_failure" alert message
indicates that the sender was unable to negotiate an acceptable indicates that the sender was unable to negotiate an acceptable
set of security parameters given the options available. set of security parameters given the options available.
bad_certificate A certificate was corrupt, contained signatures that bad_certificate A certificate was corrupt, contained signatures that
did not verify correctly, etc. did not verify correctly, etc.
unsupported_certificate A certificate was of an unsupported type. unsupported_certificate A certificate was of an unsupported type.
certificate_revoked A certificate was revoked by its signer. certificate_revoked A certificate was revoked by its signer.
skipping to change at page 79, line 26 skipping to change at page 85, line 26
access control was applied, the sender decided not to proceed with access control was applied, the sender decided not to proceed with
negotiation. negotiation.
decode_error A message could not be decoded because some field was decode_error A message could not be decoded because some field was
out of the specified range or the length of the message was out of the specified range or the length of the message was
incorrect. This alert is used for errors where the message does incorrect. This alert is used for errors where the message does
not conform to the formal protocol syntax. This alert should not conform to the formal protocol syntax. This alert should
never be observed in communication between proper implementations, never be observed in communication between proper implementations,
except when messages were corrupted in the network. except when messages were corrupted in the network.
decrypt_error A handshake cryptographic operation failed, including decrypt_error A handshake (not record-layer) cryptographic operation
being unable to correctly verify a signature or validate a failed, including being unable to correctly verify a signature or
Finished message or a PSK binder. validate a Finished message or a PSK binder.
protocol_version The protocol version the peer has attempted to protocol_version The protocol version the peer has attempted to
negotiate is recognized but not supported. (see Appendix D) negotiate is recognized but not supported. (see Appendix D)
insufficient_security Returned instead of "handshake_failure" when a insufficient_security Returned instead of "handshake_failure" when a
negotiation has failed specifically because the server requires negotiation has failed specifically because the server requires
parameters more secure than those supported by the client. parameters more secure than those supported by the client.
internal_error An internal error unrelated to the peer or the internal_error An internal error unrelated to the peer or the
correctness of the protocol (such as a memory allocation failure) correctness of the protocol (such as a memory allocation failure)
skipping to change at page 79, line 50 skipping to change at page 85, line 50
inappropriate_fallback Sent by a server in response to an invalid inappropriate_fallback Sent by a server in response to an invalid
connection retry attempt from a client (see [RFC7507]). connection retry attempt from a client (see [RFC7507]).
missing_extension Sent by endpoints that receive a hello message not missing_extension Sent by endpoints that receive a hello message not
containing an extension that is mandatory to send for the offered containing an extension that is mandatory to send for the offered
TLS version or other negotiated parameters. TLS version or other negotiated parameters.
unsupported_extension Sent by endpoints receiving any hello message unsupported_extension Sent by endpoints receiving any hello message
containing an extension known to be prohibited for inclusion in containing an extension known to be prohibited for inclusion in
the given hello message, including any extensions in a ServerHello the given hello message, or including any extensions in a
or Certificate not first offered in the corresponding ClientHello. ServerHello or Certificate not first offered in the corresponding
ClientHello.
certificate_unobtainable Sent by servers when unable to obtain a certificate_unobtainable Sent by servers when unable to obtain a
certificate from a URL provided by the client via the certificate from a URL provided by the client via the
"client_certificate_url" extension (see [RFC6066]). "client_certificate_url" extension (see [RFC6066]).
unrecognized_name Sent by servers when no server exists identified unrecognized_name Sent by servers when no server exists identified
by the name provided by the client via the "server_name" extension by the name provided by the client via the "server_name" extension
(see [RFC6066]). (see [RFC6066]).
bad_certificate_status_response Sent by clients when an invalid or bad_certificate_status_response Sent by clients when an invalid or
skipping to change at page 80, line 30 skipping to change at page 86, line 30
unknown_psk_identity Sent by servers when PSK key establishment is unknown_psk_identity Sent by servers when PSK key establishment is
desired but no acceptable PSK identity is provided by the client. desired but no acceptable PSK identity is provided by the client.
Sending this alert is OPTIONAL; servers MAY instead choose to send Sending this alert is OPTIONAL; servers MAY instead choose to send
a "decrypt_error" alert to merely indicate an invalid PSK a "decrypt_error" alert to merely indicate an invalid PSK
identity. identity.
certificate_required Sent by servers when a client certificate is certificate_required Sent by servers when a client certificate is
desired but none was provided by the client. desired but none was provided by the client.
no_application_protocol Sent by servers when a client
"application_layer_protocol_negotiation" extension advertises
protocols that the server does not support.
New Alert values are assigned by IANA as described in Section 10. New Alert values are assigned by IANA as described in Section 10.
7. Cryptographic Computations 7. Cryptographic Computations
The TLS handshake establishes one or more input secrets which are The TLS handshake establishes one or more input secrets which are
combined to create the actual working keying material, as detailed combined to create the actual working keying material, as detailed
below. The key derivation process incorporates both the input below. The key derivation process incorporates both the input
secrets and the handshake transcript. Note that because the secrets and the handshake transcript. Note that because the
handshake transcript includes the random values in the Hello handshake transcript includes the random values in the Hello
messages, any given handshake will have different traffic secrets, messages, any given handshake will have different traffic secrets,
skipping to change at page 81, line 12 skipping to change at page 87, line 12
Expand functions as defined for HKDF [RFC5869], as well as the Expand functions as defined for HKDF [RFC5869], as well as the
functions defined below: functions defined below:
HKDF-Expand-Label(Secret, Label, HashValue, Length) = HKDF-Expand-Label(Secret, Label, HashValue, Length) =
HKDF-Expand(Secret, HkdfLabel, Length) HKDF-Expand(Secret, HkdfLabel, Length)
Where HkdfLabel is specified as: Where HkdfLabel is specified as:
struct { struct {
uint16 length = Length; uint16 length = Length;
opaque label<10..255> = "TLS 1.3, " + Label; opaque label<7..255> = "tls13 " + Label;
opaque hash_value<0..255> = HashValue; opaque hash_value<0..255> = HashValue;
} HkdfLabel; } HkdfLabel;
Derive-Secret(Secret, Label, Messages) = Derive-Secret(Secret, Label, Messages) =
HKDF-Expand-Label(Secret, Label, HKDF-Expand-Label(Secret, Label,
Transcript-Hash(Messages), Hash.length) Transcript-Hash(Messages), Hash.length)
The Hash function and the HKDF hash are the cipher suite hash The Hash function and the HKDF hash are the cipher suite hash
algorithm. Hash.length is its output length in bytes. Messages are algorithm. Hash.length is its output length in bytes. Messages are
the concatenation of the indicated handshake messages, including the the concatenation of the indicated handshake messages, including the
handshake message type and length fields, but not including record handshake message type and length fields, but not including record
layer headers. Note that in some cases a zero-length HashValue layer headers. Note that in some cases a zero-length HashValue
(indicated by "") is passed to HKDF-Expand-Label. (indicated by "") is passed to HKDF-Expand-Label.
Note: with common hash functions, any label longer than 12 characters
requires an additional iteration of the hash function to compute.
The labels in this specification have all been chosen to fit within
this limit.
Given a set of n InputSecrets, the final "master secret" is computed Given a set of n InputSecrets, the final "master secret" is computed
by iteratively invoking HKDF-Extract with InputSecret_1, by iteratively invoking HKDF-Extract with InputSecret_1,
InputSecret_2, etc. The initial secret is simply a string of InputSecret_2, etc. The initial secret is simply a string of
Hash.length zero bytes. Concretely, for the present version of TLS Hash.length zero bytes. Concretely, for the present version of TLS
1.3, secrets are added in the following order: 1.3, secrets are added in the following order:
- PSK (a pre-shared key established externally or a - PSK (a pre-shared key established externally or a
resumption_master_secret value from a previous connection) resumption_master_secret value from a previous connection)
- (EC)DHE shared secret (Section 7.4) - (EC)DHE shared secret (Section 7.4)
skipping to change at page 82, line 5 skipping to change at page 88, line 11
- Derive-Secret's Secret argument is indicated by the incoming - Derive-Secret's Secret argument is indicated by the incoming
arrow. For instance, the Early Secret is the Secret for arrow. For instance, the Early Secret is the Secret for
generating the client_early_traffic_secret. generating the client_early_traffic_secret.
0 0
| |
v v
PSK -> HKDF-Extract = Early Secret PSK -> HKDF-Extract = Early Secret
| |
+-----> Derive-Secret(., +-----> Derive-Secret(.,
| "external psk binder key" | | "ext binder" |
| "resumption psk binder key", | "res binder",
| "") | "")
| = binder_key | = binder_key
| |
+-----> Derive-Secret(., "client early traffic secret", +-----> Derive-Secret(., "c e traffic",
| ClientHello) | ClientHello)
| = client_early_traffic_secret | = client_early_traffic_secret
| |
+-----> Derive-Secret(., "early exporter master secret", +-----> Derive-Secret(., "e exp master",
| ClientHello) | ClientHello)
| = early_exporter_secret | = early_exporter_master_secret
v v
Derive-Secret(., "derived secret", "") Derive-Secret(., "derived", "")
| |
v v
(EC)DHE -> HKDF-Extract = Handshake Secret (EC)DHE -> HKDF-Extract = Handshake Secret
| |
+-----> Derive-Secret(., "client handshake traffic secret", +-----> Derive-Secret(., "c hs traffic",
| ClientHello...ServerHello) | ClientHello...ServerHello)
| = client_handshake_traffic_secret | = client_handshake_traffic_secret
| |
+-----> Derive-Secret(., "server handshake traffic secret", +-----> Derive-Secret(., "s hs traffic",
| ClientHello...ServerHello) | ClientHello...ServerHello)
| = server_handshake_traffic_secret | = server_handshake_traffic_secret
v v
Derive-Secret(., "derived secret", "") Derive-Secret(., "derived", "")
| |
v v
0 -> HKDF-Extract = Master Secret 0 -> HKDF-Extract = Master Secret
| |
+-----> Derive-Secret(., "client application traffic secret", +-----> Derive-Secret(., "c ap traffic",
| ClientHello...Server Finished) | ClientHello...server Finished)
| = client_traffic_secret_0 | = client_application_traffic_secret_0
| |
+-----> Derive-Secret(., "server application traffic secret", +-----> Derive-Secret(., "s ap traffic",
| ClientHello...Server Finished) | ClientHello...server Finished)
| = server_traffic_secret_0 | = server_application_traffic_secret_0
| |
+-----> Derive-Secret(., "exporter master secret", +-----> Derive-Secret(., "exp master",
| ClientHello...Server Finished) | ClientHello...server Finished)
| = exporter_secret | = exporter_master_secret
| |
+-----> Derive-Secret(., "resumption master secret", +-----> Derive-Secret(., "res master",
ClientHello...Client Finished) ClientHello...client Finished)
= resumption_master_secret = resumption_master_secret
The general pattern here is that the secrets shown down the left side The general pattern here is that the secrets shown down the left side
of the diagram are just raw entropy without context, whereas the of the diagram are just raw entropy without context, whereas the
secrets down the right side include handshake context and therefore secrets down the right side include handshake context and therefore
can be used to derive working keys without additional context. Note can be used to derive working keys without additional context. Note
that the different calls to Derive-Secret may take different Messages that the different calls to Derive-Secret may take different Messages
arguments, even with the same secret. In a 0-RTT exchange, Derive- arguments, even with the same secret. In a 0-RTT exchange, Derive-
Secret is called with four distinct transcripts; in a 1-RTT-only Secret is called with four distinct transcripts; in a 1-RTT-only
exchange with three distinct transcripts. exchange with three distinct transcripts.
The complete transcript passed to Derive-Secret is always taken from
the following sequence of handshake messages, starting at the first
ClientHello and including only those messages that were sent:
ClientHello, HelloRetryRequest, ClientHello, ServerHello,
EncryptedExtensions, Server CertificateRequest, Server Certificate,
Server CertificateVerify, Server Finished, EndOfEarlyData, Client
Certificate, Client CertificateVerify, Client Finished.
If a given secret is not available, then the 0-value consisting of a If a given secret is not available, then the 0-value consisting of a
string of Hash.length zero bytes is used. Note that this does not string of Hash.length zero bytes is used. Note that this does not
mean skipping rounds, so if PSK is not in use Early Secret will still mean skipping rounds, so if PSK is not in use Early Secret will still
be HKDF-Extract(0, 0). For the computation of the binder_secret, the be HKDF-Extract(0, 0). For the computation of the binder_secret, the
label is "external psk binder key" for external PSKs (those label is "ext binder" for external PSKs (those provisioned outside of
provisioned outside of TLS) and "resumption psk binder key" for TLS) and "res binder" for resumption PSKs (those provisioned as the
resumption PSKs (those provisioned as the resumption master secret of resumption master secret of a previous handshake). The different
a previous handshake). The different labels prevent the substitution labels prevent the substitution of one type of PSK for the other.
of one type of PSK for the other.
There are multiple potential Early Secret values depending on which There are multiple potential Early Secret values depending on which
PSK the server ultimately selects. The client will need to compute PSK the server ultimately selects. The client will need to compute
one for each potential PSK; if no PSK is selected, it will then need one for each potential PSK; if no PSK is selected, it will then need
to compute the early secret corresponding to the zero PSK. to compute the early secret corresponding to the zero PSK.
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
defined in Section 4.6.3. The next generation of traffic keys is defined in Section 4.6.3. The next generation of traffic keys is
computed by generating client_/server_traffic_secret_N+1 from computed by generating client_/server_application_traffic_secret_N+1
client_/server_traffic_secret_N as described in this section then re- from client_/server_application_traffic_secret_N as described in this
deriving the traffic keys as described in Section 7.3. section then re-deriving the traffic keys as described in
Section 7.3.
The next-generation traffic_secret is computed as: The next-generation application_traffic_secret is computed as:
traffic_secret_N+1 = HKDF-Expand-Label( application_traffic_secret_N+1 =
traffic_secret_N, HKDF-Expand-Label(application_traffic_secret_N,
"application traffic secret", "", Hash.length) "traffic upd", "", Hash.length)
Once client/server_traffic_secret_N+1 and its associated traffic keys Once client/server_application_traffic_secret_N+1 and its associated
have been computed, implementations SHOULD delete client_/ traffic keys have been computed, implementations SHOULD delete
server_traffic_secret_N and its associated traffic keys. client_/server_application_traffic_secret_N and its associated
traffic keys.
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 purpose value indicating the specific value being generated - A purpose value indicating the specific value being generated
skipping to change at page 84, line 29 skipping to change at page 90, line 25
The traffic keying material is generated from an input traffic secret The traffic keying material is generated from an input traffic secret
value using: value using:
[sender]_write_key = HKDF-Expand-Label(Secret, "key", "", key_length) [sender]_write_key = HKDF-Expand-Label(Secret, "key", "", key_length)
[sender]_write_iv = HKDF-Expand-Label(Secret, "iv", "", iv_length) [sender]_write_iv = HKDF-Expand-Label(Secret, "iv", "", iv_length)
[sender] denotes the sending side. The Secret value for each record [sender] denotes the sending side. The Secret value for each record
type is shown in the table below. type is shown in the table below.
+-------------------+-----------------------------------+ +-------------------+---------------------------------------+
| Record Type | Secret | | Record Type | Secret |
+-------------------+-----------------------------------+ +-------------------+---------------------------------------+
| 0-RTT Application | client_early_traffic_secret | | 0-RTT Application | client_early_traffic_secret |
| | | | | |
| Handshake | [sender]_handshake_traffic_secret | | Handshake | [sender]_handshake_traffic_secret |
| | | | | |
| Application Data | [sender]_traffic_secret_N | | Application Data | [sender]_application_traffic_secret_N |
+-------------------+-----------------------------------+ +-------------------+---------------------------------------+
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.4. (EC)DHE Shared Secret Calculation 7.4. (EC)DHE Shared Secret Calculation
7.4.1. Finite Field Diffie-Hellman 7.4.1. Finite Field Diffie-Hellman
For finite field groups, a conventional Diffie-Hellman computation is For finite field groups, a conventional Diffie-Hellman computation is
skipping to change at page 86, line 10 skipping to change at page 92, line 8
[RFC5705] defines keying material exporters for TLS in terms of the [RFC5705] defines keying material exporters for TLS in terms of the
TLS pseudorandom function (PRF). This document replaces the PRF with TLS pseudorandom function (PRF). This document replaces the PRF with
HKDF, thus requiring a new construction. The exporter interface HKDF, thus requiring a new construction. The exporter interface
remains the same. remains the same.
The exporter value is computed as: The exporter value is computed as:
HKDF-Expand-Label(Derive-Secret(Secret, label, ""), HKDF-Expand-Label(Derive-Secret(Secret, label, ""),
"exporter", Hash(context_value), key_length) "exporter", Hash(context_value), key_length)
Where Secret is either the early_exporter_secret or the Where Secret is either the early_exporter_master_secret or the
exporter_secret. Implementations MUST use the exporter_secret unless exporter_master_secret. Implementations MUST use the
explicitly specified by the application. A separate interface for exporter_master_secret unless explicitly specified by the
the early exporter is RECOMMENDED, especially on a server where a application. The early_exporter_master_secret is define for use in
single interface can make the early exporter inaccessible. settings where an exporter is needed for 0-RTT data. A separate
interface for the early exporter is RECOMMENDED, especially on a
server where a single interface can make the early exporter
inaccessible.
If no context is provided, the context_value is zero-length. If no context is provided, the context_value is zero-length.
Consequently, providing no context computes the same value as Consequently, providing no context computes the same value as
providing an empty context. This is a change from previous versions providing an empty context. This is a change from previous versions
of TLS where an empty context produced a different output to an of TLS where an empty context produced a different output to an
absent context. As of this document's publication, no allocated absent context. As of this document's publication, no allocated
exporter label is used both with and without a context. Future exporter label is used both with and without a context. Future
specifications MUST NOT define a use of exporters that permit both an specifications MUST NOT define a use of exporters that permit both an
empty context and no context with the same label. New uses of empty context and no context with the same label. New uses of
exporters SHOULD provide a context in all exporter computations, exporters SHOULD provide a context in all exporter computations,
skipping to change at page 86, line 36 skipping to change at page 92, line 37
Requirements for the format of exporter labels are defined in section Requirements for the format of exporter labels are defined in section
4 of [RFC5705]. 4 of [RFC5705].
8. Compliance Requirements 8. Compliance Requirements
8.1. Mandatory-to-Implement Cipher Suites 8.1. Mandatory-to-Implement 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 otherwise, a TLS-compliant application MUST implement the
TLS_AES_128_GCM_SHA256 cipher suite and SHOULD implement the TLS_AES_128_GCM_SHA256 [GCM] cipher suite and SHOULD implement the
TLS_AES_256_GCM_SHA384 and TLS_CHACHA20_POLY1305_SHA256 cipher TLS_AES_256_GCM_SHA384 [GCM] and TLS_CHACHA20_POLY1305_SHA256
suites. (see Appendix B.4) [RFC7539] cipher suites. (see Appendix B.4)
A TLS-compliant application MUST support digital signatures with A TLS-compliant application MUST support digital signatures with
rsa_pkcs1_sha256 (for certificates), rsa_pss_sha256 (for rsa_pkcs1_sha256 (for certificates), rsa_pss_sha256 (for
CertificateVerify and certificates), and ecdsa_secp256r1_sha256. A CertificateVerify and certificates), and ecdsa_secp256r1_sha256. A
TLS-compliant application MUST support key exchange with secp256r1 TLS-compliant application MUST support key exchange with secp256r1
(NIST P-256) and SHOULD support key exchange with X25519 [RFC7748]. (NIST P-256) and SHOULD support key exchange with X25519 [RFC7748].
8.2. Mandatory-to-Implement Extensions 8.2. Mandatory-to-Implement Extensions
In the absence of an application profile standard specifying In the absence of an application profile standard specifying
skipping to change at page 87, line 4 skipping to change at page 93, line 6
TLS-compliant application MUST support key exchange with secp256r1 TLS-compliant application MUST support key exchange with secp256r1
(NIST P-256) and SHOULD support key exchange with X25519 [RFC7748]. (NIST P-256) and SHOULD support key exchange with X25519 [RFC7748].
8.2. Mandatory-to-Implement Extensions 8.2. Mandatory-to-Implement 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:
- Supported Versions ("supported_versions"; Section 4.2.1) - Supported Versions ("supported_versions"; Section 4.2.1)
- Cookie ("cookie"; Section 4.2.2) - Cookie ("cookie"; Section 4.2.2)
- Signature Algorithms ("signature_algorithms"; Section 4.2.3) - Signature Algorithms ("signature_algorithms"; Section 4.2.3)
- Negotiated Groups ("supported_groups"; Section 4.2.4) - Negotiated Groups ("supported_groups"; Section 4.2.6)
- Key Share ("key_share"; Section 4.2.5) - Key Share ("key_share"; Section 4.2.7)
- Server Name Indication ("server_name"; Section 3 of [RFC6066]) - Server Name Indication ("server_name"; Section 3 of [RFC6066])
All implementations MUST send and use these extensions when offering All implementations MUST send and use these extensions when offering
applicable features: applicable features:
- "supported_versions" is REQUIRED for all ClientHello messages. - "supported_versions" is REQUIRED for all ClientHello messages.
- "signature_algorithms" is REQUIRED for certificate authentication. - "signature_algorithms" is REQUIRED for certificate authentication.
- "supported_groups" and "key_share" are REQUIRED for DHE or ECDHE - "supported_groups" and "key_share" are REQUIRED for DHE or ECDHE
key exchange. key exchange.
- "pre_shared_key" is REQUIRED for PSK key agreement. - "pre_shared_key" is REQUIRED for PSK key agreement.
A client is considered to be attempting to negotiate using this A client is considered to be attempting to negotiate using this
specification if the ClientHello contains a "supported_versions" specification if the ClientHello contains a "supported_versions"
extension with a version indicating TLS 1.3. Such a ClientHello extension 0x0304 the highest version number contained in its body.
message MUST meet the following requirements: Such a ClientHello message MUST meet the following requirements:
- If not containing a "pre_shared_key" extension, it MUST contain - If not containing a "pre_shared_key" extension, it MUST contain
both a "signature_algorithms" extension and a "supported_groups" both a "signature_algorithms" extension and a "supported_groups"
extension. extension.
- If containing a "supported_groups" extension, it MUST also contain - If containing a "supported_groups" extension, it MUST also contain
a "key_share" extension, and vice versa. An empty a "key_share" extension, and vice versa. An empty
KeyShare.client_shares vector is permitted. KeyShare.client_shares vector is permitted.
Servers receiving a ClientHello which does not conform to these Servers receiving a ClientHello which does not conform to these
skipping to change at page 88, line 43 skipping to change at page 94, line 43
to include values for "missing_extension" and to include values for "missing_extension" and
"certificate_required". "certificate_required".
- TLS HandshakeType Registry: Future values are allocated via - TLS HandshakeType Registry: Future values are allocated via
Standards Action [RFC5226]. IANA [SHALL update/has updated] this Standards Action [RFC5226]. IANA [SHALL update/has updated] this
registry to rename item 4 from "NewSessionTicket" to registry to rename item 4 from "NewSessionTicket" to
"new_session_ticket" and to add the "hello_retry_request", "new_session_ticket" and to add the "hello_retry_request",
"encrypted_extensions", "end_of_early_data", "key_update", and "encrypted_extensions", "end_of_early_data", "key_update", and
"handshake_hash" values. "handshake_hash" values.
This document also uses a registry originally created in [RFC4366]. This document also uses the TLS ExtensionType Registry originally
IANA has updated it to reference this document. The registry and its created in [RFC4366]. IANA has updated it to reference this
allocation policy is listed below: document. The registry and its allocation policy is listed below:
- IANA [SHALL update/has updated] this registry to include the - IANA [SHALL update/has updated] this registry to include the
"key_share", "pre_shared_key", "psk_key_exchange_modes", "key_share", "pre_shared_key", "psk_key_exchange_modes",
"early_data", "cookie", "supported_versions", "early_data", "cookie", "supported_versions",
"certificate_authorities", and "oid_filters" extensions with the "certificate_authorities", "oid_filters", and
values defined in this document and the Recommended value of "post_handshake_auth" extensions with the values defined in this
"Yes". document and the Recommended value of "Yes".
- 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 which lists the messages in which the extension may 1.3" column which lists the messages in which the extension may
appear. This column [SHALL be/has been] initially populated from appear. This column [SHALL be/has been] initially populated from
the table in Section 4.2 with any extension not listed there the table in Section 4.2 with any extension not listed there
marked as "-" to indicate that it is not used by TLS 1.3. marked as "-" to indicate that it is not used by TLS 1.3.
In addition, this document defines a new registry to be maintained by In addition, this document defines a new registry to be maintained by
IANA: IANA:
skipping to change at page 89, line 26 skipping to change at page 95, line 26
[RFC5226]. Values with the first byte 255 (decimal) are reserved [RFC5226]. Values with the first byte 255 (decimal) are reserved
for Private Use [RFC5226]. Values with the first byte in the for Private Use [RFC5226]. Values with the first byte in the
range 0-6 or with the second byte in the range 0-3 that are not range 0-6 or with the second byte in the range 0-3 that are not
currently allocated are reserved for backwards compatibility. currently allocated are reserved for backwards compatibility.
This registry SHALL have a "Recommended" column. The registry This registry SHALL have a "Recommended" column. The registry
[shall be/ has been] initially populated with the values described [shall be/ has been] initially populated with the values described
in Section 4.2.3. The following values SHALL be marked as in Section 4.2.3. The following values SHALL be marked as
"Recommended": ecdsa_secp256r1_sha256, ecdsa_secp384r1_sha384, "Recommended": ecdsa_secp256r1_sha256, ecdsa_secp384r1_sha384,
rsa_pss_sha256, rsa_pss_sha384, rsa_pss_sha512, ed25519. rsa_pss_sha256, rsa_pss_sha384, rsa_pss_sha512, ed25519.
Finally, this document obsoletes the TLS HashAlgorithm Registry and
the TLS SignatureAlgorithm Registry, both originally created in
[RFC5246]. IANA [SHALL update/has updated] the TLS HashAlgorithm
Registry to list values 7-223 as "Reserved" and the TLS
SignatureAlgorithm Registry to list values 4-223 as "Reserved".
11. References 11. References
11.1. Normative References 11.1. Normative References
[AES] National Institute of Standards and Technology,
"Specification for the Advanced Encryption Standard
(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.
[GCM] Dworkin, M., "Recommendation for Block Cipher Modes of
Operation: Galois/Counter Mode (GCM) and GMAC",
NIST Special Publication 800-38D, November 2007.
[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>.
[RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography
Standards (PKCS) #1: RSA Cryptography Specifications
Version 2.1", RFC 3447, DOI 10.17487/RFC3447, February
2003, <http://www.rfc-editor.org/info/rfc3447>.
[RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an
IANA Considerations Section in RFCs", BCP 26, RFC 5226, IANA Considerations Section in RFCs", BCP 26, RFC 5226,
DOI 10.17487/RFC5226, May 2008, DOI 10.17487/RFC5226, May 2008,
<http://www.rfc-editor.org/info/rfc5226>. <http://www.rfc-editor.org/info/rfc5226>.
[RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S.,
Housley, R., and W. Polk, "Internet X.509 Public Key Housley, R., and W. Polk, "Internet X.509 Public Key
Infrastructure Certificate and Certificate Revocation List Infrastructure Certificate and Certificate Revocation List
(CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008,
<http://www.rfc-editor.org/info/rfc5280>. <http://www.rfc-editor.org/info/rfc5280>.
skipping to change at page 90, line 40 skipping to change at page 96, line 30
[RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS)
Extensions: Extension Definitions", RFC 6066, Extensions: Extension Definitions", RFC 6066,
DOI 10.17487/RFC6066, January 2011, DOI 10.17487/RFC6066, January 2011,
<http://www.rfc-editor.org/info/rfc6066>. <http://www.rfc-editor.org/info/rfc6066>.
[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>.
[RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A.,
Galperin, S., and C. Adams, "X.509 Internet Public Key
Infrastructure Online Certificate Status Protocol - OCSP",
RFC 6960, DOI 10.17487/RFC6960, June 2013,
<http://www.rfc-editor.org/info/rfc6960>.
[RFC6961] Pettersen, Y., "The Transport Layer Security (TLS) [RFC6961] Pettersen, Y., "The Transport Layer Security (TLS)
Multiple Certificate Status Request Extension", RFC 6961, Multiple Certificate Status Request Extension", RFC 6961,
DOI 10.17487/RFC6961, June 2013, DOI 10.17487/RFC6961, June 2013,
<http://www.rfc-editor.org/info/rfc6961>. <http://www.rfc-editor.org/info/rfc6961>.
[RFC6962] Laurie, B., Langley, A., and E. Kasper, "Certificate [RFC6962] Laurie, B., Langley, A., and E. Kasper, "Certificate
Transparency", RFC 6962, DOI 10.17487/RFC6962, June 2013, Transparency", RFC 6962, DOI 10.17487/RFC6962, June 2013,
<http://www.rfc-editor.org/info/rfc6962>. <http://www.rfc-editor.org/info/rfc6962>.
[RFC6979] Pornin, T., "Deterministic Usage of the Digital Signature [RFC6979] Pornin, T., "Deterministic Usage of the Digital Signature
skipping to change at page 91, line 23 skipping to change at page 97, line 23
[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>.
[RFC7919] Gillmor, D., "Negotiated Finite Field Diffie-Hellman [RFC7919] Gillmor, D., "Negotiated Finite Field Diffie-Hellman
Ephemeral Parameters for Transport Layer Security (TLS)", Ephemeral Parameters for Transport Layer Security (TLS)",
RFC 7919, DOI 10.17487/RFC7919, August 2016, RFC 7919, DOI 10.17487/RFC7919, August 2016,
<http://www.rfc-editor.org/info/rfc7919>. <http://www.rfc-editor.org/info/rfc7919>.
[RFC8017] Moriarty, K., Ed., Kaliski, B., Jonsson, J., and A. Rusch,
"PKCS #1: RSA Cryptography Specifications Version 2.2",
RFC 8017, DOI 10.17487/RFC8017, November 2016,
<http://www.rfc-editor.org/info/rfc8017>.
[RFC8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital [RFC8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital
Signature Algorithm (EdDSA)", RFC 8032, Signature Algorithm (EdDSA)", RFC 8032,
DOI 10.17487/RFC8032, January 2017, DOI 10.17487/RFC8032, January 2017,
<http://www.rfc-editor.org/info/rfc8032>. <http://www.rfc-editor.org/info/rfc8032>.
[SHS] National Institute of Standards and Technology, U.S. [SHS] National Institute of Standards and Technology, U.S.
Department of Commerce, "Secure Hash Standard", NIST FIPS Department of Commerce, "Secure Hash Standard", NIST FIPS
PUB 180-4, March 2012. PUB 180-4, March 2012.
[X690] ITU-T, "Information technology - ASN.1 encoding Rules: [X690] ITU-T, "Information technology - ASN.1 encoding Rules:
skipping to change at page 92, line 5 skipping to change at page 98, line 11
Luykx, A. and K. Paterson, "Limits on Authenticated Luykx, A. and K. Paterson, "Limits on Authenticated
Encryption Use in TLS", 2016, Encryption Use in TLS", 2016,
<http://www.isg.rhul.ac.uk/~kp/TLS-AEbounds.pdf>. <http://www.isg.rhul.ac.uk/~kp/TLS-AEbounds.pdf>.
[BBFKZG16] [BBFKZG16]
Bhargavan, K., Brzuska, C., Fournet, C., Kohlweiss, M., Bhargavan, K., Brzuska, C., Fournet, C., Kohlweiss, M.,
Zanella-Beguelin, S., and M. Green, "Downgrade Resilience Zanella-Beguelin, S., and M. Green, "Downgrade Resilience
in Key-Exchange Protocols", Proceedings of IEEE Symposium in Key-Exchange Protocols", Proceedings of IEEE Symposium
on Security and Privacy (Oakland) 2016 , 2016. on Security and Privacy (Oakland) 2016 , 2016.
[BBK17] Bhargavan, K., Blanchet, B., and N. Kobeissi, "Verified
Models and Reference Implementations for the TLS 1.3
Standard Candidate", Proceedings of IEEE Symposium on
Security and Privacy (Oakland) 2017 , 2017.
[BDFKPPRSZZ16]
Bhargavan, K., Delignat-Lavaud, A., Fournet, C.,
Kohlweiss, M., Pan, J., Protzenko, J., Rastogi, A., Swamy,
N., Zanella-Beguelin, S., and J. Zinzindohoue,
"Implementing and Proving the TLS 1.3 Record Layer",
Proceedings of IEEE Symposium on Security and Privacy
(Oakland) 2017 , December 2016,
<https://eprint.iacr.org/2016/1178>.
[BMMT15] Badertscher, C., Matt, C., Maurer, U., and B. Tackmann,
"Augmented Secure Channels and the Goal of the TLS 1.3
Record Layer", ProvSec 2015 , September 2015,
<https://eprint.iacr.org/2015/394>.
[BT16] Bellare, M. and B. Tackmann, "The Multi-User Security of
Authenticated Encryption: AES-GCM in TLS 1.3", Proceedings
of CRYPTO 2016 , 2016, <https://eprint.iacr.org/2016/564>.
[CCG16] Cohn-Gordon, K., Cremers, C., and L. Garratt, "On Post- [CCG16] Cohn-Gordon, K., Cremers, C., and L. Garratt, "On Post-
Compromise Security", IEEE Computer Security Foundations Compromise Security", IEEE Computer Security Foundations
Symposium , 2015. Symposium , 2015.
[CHHSV17] Cremers, C., Horvat, M., Hoyland, J., van der Merwe, T., [CHHSV17] Cremers, C., Horvat, M., Hoyland, J., van der Merwe, T.,
and S. Scott, "Awkward Handshake: Possible mismatch of and S. Scott, "Awkward Handshake: Possible mismatch of
client/server view on client authentication in post- client/server view on client authentication in post-
handshake mode in Revision 18", 2017, handshake mode in Revision 18", 2017,
<https://www.ietf.org/mail-archive/web/tls/current/ <https://www.ietf.org/mail-archive/web/tls/current/
msg22382.html>. msg22382.html>.
[CHSV16] Cremers, C., Horvat, M., Scott, S., and T. van der Merwe, [CHSV16] Cremers, C., Horvat, M., Scott, S., and T. van der Merwe,
"Automated Analysis and Verification of TLS 1.3: 0-RTT, "Automated Analysis and Verification of TLS 1.3: 0-RTT,
Resumption and Delayed Authentication", Proceedings of Resumption and Delayed Authentication", Proceedings of
IEEE Symposium on Security and Privacy (Oakland) 2016 , IEEE Symposium on Security and Privacy (Oakland) 2016 ,
2016. 2016, <http://ieeexplore.ieee.org/document/7546518/>.
[CK01] Canetti, R. and H. Krawczyk, "Analysis of Key-Exchange [CK01] Canetti, R. and H. Krawczyk, "Analysis of Key-Exchange
Protocols and Their Use for Building Secure Channels", Protocols and Their Use for Building Secure Channels",
Proceedings of Eurocrypt 2001 , 2001. Proceedings of Eurocrypt 2001 , 2001.
[CLINIC] Miller, B., Huang, L., Joseph, A., and J. Tygar, "I Know
Why You Went to the Clinic: Risks and Realization of HTTPS
Traffic Analysis", Privacy Enhancing Technologies pp.
143-163, DOI 10.1007/978-3-319-08506-7_8, 2014.
[DFGS15] Dowling, B., Fischlin, M., Guenther, F., and D. Stebila,
"A Cryptographic Analysis of the TLS 1.3 draft-10 Full and
Pre-shared Key Handshake Protocol", Proceedings of ACM CCS
2015 , 2015, <https://eprint.iacr.org/2015/914>.
[DFGS16] Dowling, B., Fischlin, M., Guenther, F., and D. Stebila,
"A Cryptographic Analysis of the TLS 1.3 draft-10 Full and
Pre-shared Key Handshake Protocol", TRON 2016 , 2016,
<https://eprint.iacr.org/2016/081>.
[DOW92] Diffie, W., van Oorschot, P., and M. Wiener, [DOW92] Diffie, W., van Oorschot, P., and M. Wiener,
""Authentication and authenticated key exchanges"", ""Authentication and authenticated key exchanges"",
Designs, Codes and Cryptography , 1992. Designs, Codes and Cryptography , 1992.
[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.
[FG17] Fischlin, M. and F. Guenther, "Replay Attacks on Zero
Round-Trip Time: The Case of the TLS 1.3 Handshake
Candidates", Proceedings of Euro S"P 2017 , 2017,
<https://eprint.iacr.org/2017/082>.
[FGSW16] Fischlin, M., Guenther, F., Schmidt, B., and B. Warinschi, [FGSW16] Fischlin, M., Guenther, F., Schmidt, B., and B. Warinschi,
"Key Confirmation in Key Exchange: A Formal Treatment and "Key Confirmation in Key Exchange: A Formal Treatment and
Implications for TLS 1.3", Proceedings of IEEE Symposium Implications for TLS 1.3", Proceedings of IEEE Symposium
on Security and Privacy (Oakland) 2016 , 2016. on Security and Privacy (Oakland) 2016 , 2016,
<http://ieeexplore.ieee.org/document/7546517/>.
[FW15] Florian Weimer, ., "Factoring RSA Keys With TLS Perfect [FW15] Florian Weimer, ., "Factoring RSA Keys With TLS Perfect
Forward Secrecy", September 2015. Forward Secrecy", September 2015.
[GCM] Dworkin, M., "Recommendation for Block Cipher Modes of [HCJ16] Husak, M., &#268;ermak, M., Jirsik, T., and P.
Operation: Galois/Counter Mode (GCM) and GMAC", &#268;eleda, "HTTPS traffic analysis and client
NIST Special Publication 800-38D, November 2007. identification using passive SSL/TLS fingerprinting",
EURASIP Journal on Information Security Vol. 2016,
DOI 10.1186/s13635-016-0030-7, February 2016.
[HGFS15] Hlauschek, C., Gruber, M., Fankhauser, F., and C. Schanes, [HGFS15] Hlauschek, C., Gruber, M., Fankhauser, F., and C. Schanes,
"Prying Open Pandora's Box: KCI Attacks against TLS", "Prying Open Pandora's Box: KCI Attacks against TLS",
Proceedings of USENIX Workshop on Offensive Technologies , Proceedings of USENIX Workshop on Offensive Technologies ,
2015. 2015.
[I-D.ietf-tls-iana-registry-updates] [I-D.ietf-tls-iana-registry-updates]
Salowey, J. and S. Turner, "D/TLS IANA Registry Updates", Salowey, J. and S. Turner, "D/TLS IANA Registry Updates",
draft-ietf-tls-iana-registry-updates-00 (work in draft-ietf-tls-iana-registry-updates-01 (work in
progress), January 2017. progress), April 2017.
[I-D.ietf-tls-tls13-vectors] [I-D.ietf-tls-tls13-vectors]
Thomson, M., "Example Handshake Traces for TLS 1.3", Thomson, M., "Example Handshake Traces for TLS 1.3",
draft-ietf-tls-tls13-vectors-00 (work in progress), draft-ietf-tls-tls13-vectors-00 (work in progress),
January 2017. January 2017.
[IEEE1363] [IEEE1363]
IEEE, "Standard Specifications for Public Key IEEE, "Standard Specifications for Public Key
Cryptography", IEEE 1363 , 2000. Cryptography", IEEE 1363 , 2000.
[KEYAGREEMENT] [KEYAGREEMENT]
Barker, E., Lily Chen, ., Roginsky, A., and M. Smid, Barker, E., Lily Chen, ., Roginsky, A., and M. Smid,
"Recommendation for Pair-Wise Key Establishment Schemes "Recommendation for Pair-Wise Key Establishment Schemes
Using Discrete Logarithm Cryptography", NIST Special Using Discrete Logarithm Cryptography", NIST Special
Publication 800-38D, May 2013. Publication 800-38D, May 2013.
[Kraw10] Krawczyk, H., "Cryptographic Extraction and Key
Derivation: The HKDF Scheme", Proceedings of CRYPTO 2010 ,
2010, <https://eprint.iacr.org/2010/264>.
[Kraw16] Krawczyk, H., "A Unilateral-to-Mutual Authentication
Compiler for Key Exchange (with Applications to Client
Authentication in TLS 1.3", Proceedings of ACM CCS 2016 ,
2016, <https://eprint.iacr.org/2016/711>.
[KW16] Krawczyk, H. and H. Wee, "The OPTLS Protocol and TLS 1.3",
Proceedings of Euro S"P 2016 , 2016,
<https://eprint.iacr.org/2015/978>.
[LXZFH16] Li, X., Xu, J., Feng, D., Zhang, Z., and H. Hu, "Multiple [LXZFH16] Li, X., Xu, J., Feng, D., Zhang, Z., and H. Hu, "Multiple
Handshakes Security of TLS 1.3 Candidates", Proceedings of Handshakes Security of TLS 1.3 Candidates", Proceedings of
IEEE Symposium on Security and Privacy (Oakland) 2016 , IEEE Symposium on Security and Privacy (Oakland) 2016 ,
2016. 2016, <http://ieeexplore.ieee.org/document/7546519/>.
[PKCS6] RSA Laboratories, "PKCS #6: RSA Extended Certificate
Syntax Standard, version 1.5", November 1993.
[PKCS7] RSA Laboratories, "PKCS #7: RSA Cryptographic Message
Syntax Standard, version 1.5", November 1993.
[PSK-FINISHED] [PSK-FINISHED]
Cremers, C., Horvat, M., van der Merwe, T., and S. Scott, Cremers, C., Horvat, M., van der Merwe, T., and S. Scott,
"Revision 10: possible attack if client authentication is "Revision 10: possible attack if client authentication is
allowed during PSK", 2015, <https://www.ietf.org/mail- allowed during PSK", 2015, <https://www.ietf.org/mail-
archive/web/tls/current/msg18215.html>. archive/web/tls/current/msg18215.html>.
[RECORD] Bhargavan, K., Delignat-Lavaud, A., Fournet, C.,
Kohlweiss, M., Pan, J., Protzenko, J., Rastogi, A., Swamy,
N., Zanella-Beguelin, S., and J. Zinzindohoue,
"Implementing and Proving the TLS 1.3 Record Layer",
December 2016, <http://eprint.iacr.org/2016/1178>.
[REKEY] Abdalla, M. and M. Bellare, "Increasing the Lifetime of a [REKEY] Abdalla, M. and M. Bellare, "Increasing the Lifetime of a
Key: A Comparative Analysis of the Security of Re-keying Key: A Comparative Analysis of the Security of Re-keying
Techniques", ASIACRYPT2000 , October 2000. Techniques", ASIACRYPT2000 , October 2000.
[RFC3552] Rescorla, E. and B. Korver, "Guidelines for Writing RFC [RFC3552] Rescorla, E. and B. Korver, "Guidelines for Writing RFC
Text on Security Considerations", BCP 72, RFC 3552, Text on Security Considerations", BCP 72, RFC 3552,
DOI 10.17487/RFC3552, July 2003, DOI 10.17487/RFC3552, July 2003,
<http://www.rfc-editor.org/info/rfc3552>. <http://www.rfc-editor.org/info/rfc3552>.
[RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker,
"Randomness Requirements for Security", BCP 106, RFC 4086, "Randomness Requirements for Security", BCP 106, RFC 4086,
DOI 10.17487/RFC4086, June 2005, DOI 10.17487/RFC4086, June 2005,
<http://www.rfc-editor.org/info/rfc4086>. <http://www.rfc-editor.org/info/rfc4086>.
[RFC4279] Eronen, P., Ed. and H. Tschofenig, Ed., "Pre-Shared Key
Ciphersuites for Transport Layer Security (TLS)",
RFC 4279, DOI 10.17487/RFC4279, December 2005,
<http://www.rfc-editor.org/info/rfc4279>.
[RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security [RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.1", RFC 4346, (TLS) Protocol Version 1.1", RFC 4346,
DOI 10.17487/RFC4346, April 2006, DOI 10.17487/RFC4346, April 2006,
<http://www.rfc-editor.org/info/rfc4346>. <http://www.rfc-editor.org/info/rfc4346>.
[RFC4366] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J., [RFC4366] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J.,
and T. Wright, "Transport Layer Security (TLS) and T. Wright, "Transport Layer Security (TLS)
Extensions", RFC 4366, DOI 10.17487/RFC4366, April 2006, Extensions", RFC 4366, DOI 10.17487/RFC4366, April 2006,
<http://www.rfc-editor.org/info/rfc4366>. <http://www.rfc-editor.org/info/rfc4366>.
[RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B. [RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B.
Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites
for Transport Layer Security (TLS)", RFC 4492, for Transport Layer Security (TLS)", RFC 4492,
DOI 10.17487/RFC4492, May 2006, DOI 10.17487/RFC4492, May 2006,
<http://www.rfc-editor.org/info/rfc4492>. <http://www.rfc-editor.org/info/rfc4492>.
[RFC4507] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig,
"Transport Layer Security (TLS) Session Resumption without
Server-Side State", RFC 4507, DOI 10.17487/RFC4507, May
2006, <http://www.rfc-editor.org/info/rfc4507>.
[RFC4681] Santesson, S., Medvinsky, A., and J. Ball, "TLS User [RFC4681] Santesson, S., Medvinsky, A., and J. Ball, "TLS User
Mapping Extension", RFC 4681, DOI 10.17487/RFC4681, Mapping Extension", RFC 4681, DOI 10.17487/RFC4681,
October 2006, <http://www.rfc-editor.org/info/rfc4681>. October 2006, <http://www.rfc-editor.org/info/rfc4681>.
[RFC5054] Taylor, D., Wu, T., Mavrogiannopoulos, N., and T. Perrin,
"Using the Secure Remote Password (SRP) Protocol for TLS
Authentication", RFC 5054, DOI 10.17487/RFC5054, November
2007, <http://www.rfc-editor.org/info/rfc5054>.
[RFC5077] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig, [RFC5077] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig,
"Transport Layer Security (TLS) Session Resumption without "Transport Layer Security (TLS) Session Resumption without
Server-Side State", RFC 5077, DOI 10.17487/RFC5077, Server-Side State", RFC 5077, DOI 10.17487/RFC5077,
January 2008, <http://www.rfc-editor.org/info/rfc5077>. January 2008, <http://www.rfc-editor.org/info/rfc5077>.
[RFC5081] Mavrogiannopoulos, N., "Using OpenPGP Keys for Transport
Layer Security (TLS) Authentication", RFC 5081,
DOI 10.17487/RFC5081, November 2007,
<http://www.rfc-editor.org/info/rfc5081>.
[RFC5116] McGrew, D., "An Interface and Algorithms for Authenticated [RFC5116] McGrew, D., "An Interface and Algorithms for Authenticated
Encryption", RFC 5116, DOI 10.17487/RFC5116, January 2008, Encryption", RFC 5116, DOI 10.17487/RFC5116, January 2008,
<http://www.rfc-editor.org/info/rfc5116>. <http://www.rfc-editor.org/info/rfc5116>.
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", RFC 5246, (TLS) Protocol Version 1.2", RFC 5246,
DOI 10.17487/RFC5246, August 2008, DOI 10.17487/RFC5246, August 2008,
<http://www.rfc-editor.org/info/rfc5246>. <http://www.rfc-editor.org/info/rfc5246>.
[RFC5746] Rescorla, E., Ray, M., Dispensa, S., and N. Oskov,
"Transport Layer Security (TLS) Renegotiation Indication
Extension", RFC 5746, DOI 10.17487/RFC5746, February 2010,
<http://www.rfc-editor.org/info/rfc5746>.
[RFC5764] McGrew, D. and E. Rescorla, "Datagram Transport Layer [RFC5764] McGrew, D. and E. Rescorla, "Datagram Transport Layer
Security (DTLS) Extension to Establish Keys for the Secure Security (DTLS) Extension to Establish Keys for the Secure
Real-time Transport Protocol (SRTP)", RFC 5764, Real-time Transport Protocol (SRTP)", RFC 5764,
DOI 10.17487/RFC5764, May 2010, DOI 10.17487/RFC5764, May 2010,
<http://www.rfc-editor.org/info/rfc5764>. <http://www.rfc-editor.org/info/rfc5764>.
[RFC5878] Brown, M. and R. Housley, "Transport Layer Security (TLS)
Authorization Extensions", RFC 5878, DOI 10.17487/RFC5878,
May 2010, <http://www.rfc-editor.org/info/rfc5878>.
[RFC5929] Altman, J., Williams, N., and L. Zhu, "Channel Bindings [RFC5929] Altman, J., Williams, N., and L. Zhu, "Channel Bindings
for TLS", RFC 5929, DOI 10.17487/RFC5929, July 2010, for TLS", RFC 5929, DOI 10.17487/RFC5929, July 2010,
<http://www.rfc-editor.org/info/rfc5929>. <http://www.rfc-editor.org/info/rfc5929>.
[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
skipping to change at page 96, line 31 skipping to change at page 103, line 10
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,
July 2014, <http://www.rfc-editor.org/info/rfc7301>. July 2014, <http://www.rfc-editor.org/info/rfc7301>.
[RFC7366] Gutmann, P., "Encrypt-then-MAC for Transport Layer
Security (TLS) and Datagram Transport Layer Security
(DTLS)", RFC 7366, DOI 10.17487/RFC7366, September 2014,
<http://www.rfc-editor.org/info/rfc7366>.
[RFC7465] Popov, A., "Prohibiting RC4 Cipher Suites", RFC 7465, [RFC7465] Popov, A., "Prohibiting RC4 Cipher Suites", RFC 7465,
DOI 10.17487/RFC7465, February 2015, DOI 10.17487/RFC7465, February 2015,
<http://www.rfc-editor.org/info/rfc7465>. <http://www.rfc-editor.org/info/rfc7465>.
[RFC7568] Barnes, R., Thomson, M., Pironti, A., and A. Langley, [RFC7568] Barnes, R., Thomson, M., Pironti, A., and A. Langley,
"Deprecating Secure Sockets Layer Version 3.0", RFC 7568, "Deprecating Secure Sockets Layer Version 3.0", RFC 7568,
DOI 10.17487/RFC7568, June 2015, DOI 10.17487/RFC7568, June 2015,
<http://www.rfc-editor.org/info/rfc7568>. <http://www.rfc-editor.org/info/rfc7568>.
[RFC7627] Bhargavan, K., Ed., Delignat-Lavaud, A., Pironti, A., [RFC7627] Bhargavan, K., Ed., Delignat-Lavaud, A., Pironti, A.,
skipping to change at page 100, line 5 skipping to change at page 107, line 5
Appendix B. Protocol Data Structures and Constant Values Appendix B. Protocol Data Structures and Constant Values
This section describes protocol types and constants. Values listed This section describes protocol types and constants. Values listed
as _RESERVED were used in previous versions of TLS and are listed as _RESERVED were used in previous versions of TLS and are listed
here for completeness. TLS 1.3 implementations MUST NOT send them here for completeness. TLS 1.3 implementations MUST NOT send them
but might receive them from older TLS implementations. but might receive them from older TLS implementations.
B.1. Record Layer B.1. Record Layer
enum { enum {
invalid_RESERVED(0), invalid(0),
change_cipher_spec_RESERVED(20), change_cipher_spec_RESERVED(20),
alert(21), alert(21),
handshake(22), handshake(22),
application_data(23), application_data(23),
(255) (255)
} ContentType; } ContentType;
struct { struct {
ContentType type; ContentType type;
ProtocolVersion legacy_record_version; ProtocolVersion legacy_record_version;
skipping to change at page 101, line 40 skipping to change at page 108, line 40
user_canceled(90), user_canceled(90),
no_renegotiation_RESERVED(100), no_renegotiation_RESERVED(100),
missing_extension(109), missing_extension(109),
unsupported_extension(110), unsupported_extension(110),
certificate_unobtainable(111), certificate_unobtainable(111),
unrecognized_name(112), unrecognized_name(112),
bad_certificate_status_response(113), bad_certificate_status_response(113),
bad_certificate_hash_value(114), bad_certificate_hash_value(114),
unknown_psk_identity(115), unknown_psk_identity(115),
certificate_required(116), certificate_required(116),
no_application_protocol(120),
(255) (255)
} AlertDescription; } AlertDescription;
struct { struct {
AlertLevel level; AlertLevel level;
AlertDescription description; AlertDescription description;
} Alert; } Alert;
B.3. Handshake Protocol B.3. Handshake Protocol
skipping to change at page 102, line 48 skipping to change at page 109, line 48
case certificate: Certificate; case certificate: Certificate;
case certificate_verify: CertificateVerify; case certificate_verify: CertificateVerify;
case finished: Finished; case finished: Finished;
case new_session_ticket: NewSessionTicket; case new_session_ticket: NewSessionTicket;
case key_update: KeyUpdate; case key_update: KeyUpdate;
} body; } body;
} Handshake; } Handshake;
B.3.1. Key Exchange Messages B.3.1. Key Exchange Messages
uint16 ProtocolVersion; uint16 ProtocolVersion;
opaque Random[32]; opaque Random[32];
uint8 CipherSuite[2]; /* Cryptographic suite selector */ uint8 CipherSuite[2]; /* Cryptographic suite selector */
struct { struct {
ProtocolVersion legacy_version = 0x0303; /* TLS v1.2 */ ProtocolVersion legacy_version = 0x0303; /* TLS v1.2 */
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<8..2^16-1>; Extension extensions<8..2^16-1>;
} ClientHello; } ClientHello;
struct { struct {
ProtocolVersion version; ProtocolVersion version;
Random random; Random random;
CipherSuite cipher_suite; CipherSuite cipher_suite;
Extension extensions<6..2^16-1>; Extension extensions<6..2^16-1>;
} ServerHello; } ServerHello;
struct { struct {
ProtocolVersion server_version; ProtocolVersion server_version;
CipherSuite cipher_suite; CipherSuite cipher_suite;
Extension extensions<2..2^16-1>; Extension extensions<2..2^16-1>;
} HelloRetryRequest; } HelloRetryRequest;
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), server_name(0), /* RFC 6066 */
signature_algorithms(13), max_fragment_length(1), /* RFC 6066 */
key_share(40), status_request(5), /* RFC 6066 */
pre_shared_key(41), supported_groups(10), /* RFC 4492, 7919 */
early_data(42), signature_algorithms(13), /* RFC 5246 */
supported_versions(43), use_srtp(14), /* RFC 5764 */
cookie(44), heartbeat(15), /* RFC 6520 */
psk_key_exchange_modes(45), application_layer_protocol_negotiation(16), /* RFC 7301 */
certificate_authorities(47), signed_certificate_timestamp(18), /* RFC 6962 */
oid_filters(48), client_certificate_type(19), /* RFC 7250 */
(65535) server_certificate_type(20) /* RFC 7250 */
} ExtensionType; padding(21), /* RFC 7685 */
key_share(40), /* [[this document]] */
pre_shared_key(41), /* [[this document]] */
early_data(42), /* [[this document]] */
supported_versions(43), /* [[this document]] */
cookie(44), /* [[this document]] */
psk_key_exchange_modes(45), /* [[this document]] */
certificate_authorities(47), /* [[this document]] */
oid_filters(48), /* [[this document]] */
post_handshake_auth(49), /* [[this document]] */
(65535)
} 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 (Handshake.msg_type) { select (Handshake.msg_type) {
case client_hello: case client_hello:
KeyShareEntry client_shares<0..2^16-1>; KeyShareEntry client_shares<0..2^16-1>;
case hello_retry_request: case hello_retry_request:
NamedGroup selected_group; NamedGroup selected_group;
case server_hello: case server_hello:
KeyShareEntry server_share; KeyShareEntry server_share;
}; };
} KeyShare; } KeyShare;
enum { psk_ke(0), psk_dhe_ke(1), (255) } PskKeyExchangeMode; enum { psk_ke(0), psk_dhe_ke(1), (255) } PskKeyExchangeMode;
struct { struct {
PskKeyExchangeMode ke_modes<1..255>; PskKeyExchangeMode ke_modes<1..255>;
} PskKeyExchangeModes; } PskKeyExchangeModes;
struct {} Empty; struct {} Empty;
struct { struct {
select (Handshake.msg_type) { select (Handshake.msg_type) {
case new_session_ticket: uint32 max_early_data_size; case new_session_ticket: uint32 max_early_data_size;
case client_hello: Empty; case client_hello: Empty;
case encrypted_extensions: Empty; case encrypted_extensions: Empty;
}; };
} EarlyDataIndication; } EarlyDataIndication;
struct { struct {
opaque identity<1..2^16-1>; opaque identity<1..2^16-1>;
uint32 obfuscated_ticket_age; uint32 obfuscated_ticket_age;
} PskIdentity; } PskIdentity;
opaque PskBinderEntry<32..255>; opaque PskBinderEntry<32..255>;
struct { struct {
select (Handshake.msg_type) { select (Handshake.msg_type) {
case client_hello: case client_hello:
PskIdentity identities<7..2^16-1>;
PskBinderEntry binders<33..2^16-1>;
case server_hello: PskIdentity identities<7..2^16-1>;
uint16 selected_identity; PskBinderEntry binders<33..2^16-1>;
};
} PreSharedKeyExtension; case server_hello:
uint16 selected_identity;
};
} PreSharedKeyExtension;
B.3.1.1. Version Extension B.3.1.1. Version Extension
struct { struct {
ProtocolVersion versions<2..254>; ProtocolVersion versions<2..254>;
} SupportedVersions; } SupportedVersions;
B.3.1.2. Cookie Extension B.3.1.2. Cookie Extension
struct { struct {
opaque cookie<1..2^16-1>; opaque cookie<1..2^16-1>;
} Cookie; } Cookie;
B.3.1.3. Signature Algorithm Extension B.3.1.3. Signature Algorithm Extension
enum { enum {
/* RSASSA-PKCS1-v1_5 algorithms */ /* RSASSA-PKCS1-v1_5 algorithms */
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),
/* ECDSA algorithms */ /* 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(0x0804), rsa_pss_sha256(0x0804),
rsa_pss_sha384(0x0805), rsa_pss_sha384(0x0805),
rsa_pss_sha512(0x0806), rsa_pss_sha512(0x0806),
/* EdDSA algorithms */ /* EdDSA algorithms */
ed25519(0x0807), ed25519(0x0807),
ed448(0x0808), ed448(0x0808),
/* Legacy algorithms */
rsa_pkcs1_sha1(0x0201),
ecdsa_sha1(0x0203),
/* Reserved Code Points */ /* Reserved Code Points */
dsa_sha1_RESERVED(0x0202),
dsa_sha256_RESERVED(0x0402),
dsa_sha384_RESERVED(0x0502),
dsa_sha512_RESERVED(0x0602),
ecdsa_sha1_RESERVED(0x0203),
obsolete_RESERVED(0x0000..0x0200), obsolete_RESERVED(0x0000..0x0200),
dsa_sha1_RESERVED(0x0202),
obsolete_RESERVED(0x0204..0x0400), obsolete_RESERVED(0x0204..0x0400),
dsa_sha256_RESERVED(0x0402),
obsolete_RESERVED(0x0404..0x0500), obsolete_RESERVED(0x0404..0x0500),
dsa_sha384_RESERVED(0x0502),
obsolete_RESERVED(0x0504..0x0600), obsolete_RESERVED(0x0504..0x0600),
dsa_sha512_RESERVED(0x0602),
obsolete_RESERVED(0x0604..0x06FF), obsolete_RESERVED(0x0604..0x06FF),
private_use(0xFE00..0xFFFF), private_use(0xFE00..0xFFFF),
(0xFFFF) (0xFFFF)
} SignatureScheme; } SignatureScheme;
struct { struct {
SignatureScheme supported_signature_algorithms<2..2^16-2>; SignatureScheme supported_signature_algorithms<2..2^16-2>;
} SignatureSchemeList; } SignatureSchemeList;
B.3.1.4. Supported Groups Extension B.3.1.4. Supported Groups Extension
skipping to change at page 107, line 26 skipping to change at page 114, line 26
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<2..2^16-1>; NamedGroup named_group_list<2..2^16-1>;
} NamedGroupList; } NamedGroupList;
Values within "obsolete_RESERVED" ranges were used in previous Values within "obsolete_RESERVED" ranges are 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.
B.3.2. Server Parameters Messages B.3.2. Server Parameters Messages
skipping to change at page 108, line 29 skipping to change at page 116, line 4
struct { struct {
opaque certificate_extension_oid<1..2^8-1>; opaque certificate_extension_oid<1..2^8-1>;
opaque certificate_extension_values<0..2^16-1>; opaque certificate_extension_values<0..2^16-1>;
} OIDFilter; } OIDFilter;
struct { struct {
OIDFilter filters<0..2^16-1>; OIDFilter filters<0..2^16-1>;
} OIDFilterExtension; } OIDFilterExtension;
B.3.3. Authentication Messages B.3.3. Authentication Messages
opaque ASN1Cert<1..2^24-1>;
struct { struct {
ASN1Cert cert_data; select(certificate_type){
case RawPublicKey:
// From RFC 7250 ASN.1_subjectPublicKeyInfo
opaque ASN1_subjectPublicKeyInfo<1..2^24-1>;
case X.509:
opaque cert_data<1..2^24-1>;
}
Extension extensions<0..2^16-1>; Extension extensions<0..2^16-1>;
} CertificateEntry; } CertificateEntry;
struct { struct {
opaque certificate_request_context<0..2^8-1>; opaque certificate_request_context<0..2^8-1>;
CertificateEntry certificate_list<0..2^24-1>; CertificateEntry certificate_list<0..2^24-1>;
} Certificate; } Certificate;
struct { struct {
SignatureScheme algorithm; SignatureScheme algorithm;
skipping to change at page 111, line 20 skipping to change at page 118, line 39
(performance) concerns. It is generally preferable to use an (performance) concerns. It is generally preferable to use an
existing PRNG implementation in preference to crafting a new one, and existing PRNG implementation in preference to crafting a new one, and
many adequate cryptographic libraries are already available under many adequate cryptographic libraries are already available under
favorable license terms. Should those prove unsatisfactory, favorable license terms. Should those prove unsatisfactory,
[RFC4086] provides guidance on the generation of random values. [RFC4086] provides guidance on the generation of random values.
C.3. Certificates and Authentication C.3. Certificates and Authentication
Implementations are responsible for verifying the integrity of Implementations are responsible for verifying the integrity of
certificates and should generally support certificate revocation certificates and should generally support certificate revocation
messages. Certificates should always be verified to ensure proper messages. Absent a specific indication from an application profile,
signing by a trusted Certificate Authority (CA). The selection and Certificates should always be verified to ensure proper signing by a
addition of trust anchors should be done very carefully. Users trusted Certificate Authority (CA). The selection and addition of
should be able to view information about the certificate and trust trust anchors should be done very carefully. Users should be able to
anchor. Applications SHOULD also enforce minimum and maximum key view information about the certificate and trust anchor.
sizes. For example, certification paths containing keys or Applications SHOULD also enforce minimum and maximum key sizes. For
signatures weaker than 2048-bit RSA or 224-bit ECDSA are not example, certification paths containing keys or signatures weaker
appropriate for secure applications. than 2048-bit RSA or 224-bit ECDSA are not appropriate for secure
applications.
C.4. Implementation Pitfalls C.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 112, line 21 skipping to change at page 119, line 46
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 4.4.2.3)? Section 4.4.2.3)?
- 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?
- Do you properly ignore unrecognized cipher suites (Section 4.1.2), - Do you properly ignore unrecognized cipher suites (Section 4.1.2),
hello extensions (Section 4.2), named groups (Section 4.2.4), and hello extensions (Section 4.2), named groups (Section 4.2.6), key
signature algorithms (Section 4.2.3)? shares Section 4.2.7, supported versions Section 4.2.1, and
signature algorithms (Section 4.2.3) in the ClientHello?
- As a server, do you send a HelloRetryRequest to clients which - As a server, do you send a HelloRetryRequest to clients which
support a compatible (EC)DHE group but do not predict it in the support a compatible (EC)DHE group but do not predict it in the
"key_share" extension? As a client, do you correctly handle a "key_share" extension? As a client, do you correctly handle a
HelloRetryRequest from the server? HelloRetryRequest from the server?
Cryptographic details: Cryptographic details:
- What countermeasures do you use to prevent timing attacks - What countermeasures do you use to prevent timing attacks
[TIMING]? [TIMING]?
- When using Diffie-Hellman key exchange, do you correctly preserve - When using Diffie-Hellman key exchange, do you correctly preserve
leading zero bytes in the negotiated key (see Section 7.4.1)? leading zero bytes in the negotiated key (see Section 7.4.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 Section 4.2.5.1)? by the server are acceptable, (see Section 4.2.7.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 C.2) when generating Diffie-Hellman number generator (see Appendix C.2) when generating Diffie-Hellman
private values, the ECDSA "k" parameter, and other security- private values, the ECDSA "k" parameter, and other security-
critical values? It is RECOMMENDED that implementations implement critical values? It is RECOMMENDED that implementations implement
"deterministic ECDSA" as specified in [RFC6979]. "deterministic ECDSA" as specified in [RFC6979].
- Do you zero-pad Diffie-Hellman public key values to the group size - Do you zero-pad Diffie-Hellman public key values to the group size
(see Section 4.2.5.1)? (see Section 4.2.7.1)?
- Do you verify signatures after making them to protect against RSA- - Do you verify signatures after making them to protect against RSA-
CRT key leaks? [FW15] CRT key leaks? [FW15]
C.5. Client Tracking Prevention C.5. Client Tracking Prevention
Clients SHOULD NOT reuse a ticket for multiple connections. Reuse of Clients SHOULD NOT reuse a ticket for multiple connections. Reuse of
a ticket allows passive observers to correlate different connections. a ticket allows passive observers to correlate different connections.
Servers that issue tickets SHOULD offer at least as many tickets as Servers that issue tickets SHOULD offer at least as many tickets as
the number of connections that a client might use; for example, a web the number of connections that a client might use; for example, a web
skipping to change at page 113, line 33 skipping to change at page 121, line 12
- Raw public keys [RFC7250]. - Raw public keys [RFC7250].
- Using a public key contained in a certificate but without - Using a public key contained in a certificate but without
validation of the certificate chain or any of its contents. validation of the certificate chain or any of its contents.
Either technique used alone is vulnerable to man-in-the-middle Either technique used alone is vulnerable to man-in-the-middle
attacks and therefore unsafe for general use. However, it is also attacks and therefore unsafe for general use. However, it is also
possible to bind such connections to an external authentication possible to bind such connections to an external authentication
mechanism via out-of-band validation of the server's public key, mechanism via out-of-band validation of the server's public key,
trust on first use, or channel bindings [RFC5929]. [[NOTE: TLS 1.3 trust on first use, or a mechanism such as channel bindings (though
needs a new channel binding definition that has not yet been the channel bindings described in [RFC5929] are not defined for TLS
defined.]] If no such mechanism is used, then the connection has no 1.3). If no such mechanism is used, then the connection has no
protection against active man-in-the-middle attack; applications MUST protection against active man-in-the-middle attack; applications MUST
NOT use TLS in such a way absent explicit configuration or a specific NOT use TLS in such a way absent explicit configuration or a specific
application profile. application profile.
Appendix D. Backward Compatibility Appendix D. 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.
skipping to change at page 114, line 9 skipping to change at page 121, line 37
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.
Prior versions of TLS used the record layer version number for Prior versions of TLS used the record layer version number for
various purposes. (TLSPlaintext.legacy_record_version and various purposes. (TLSPlaintext.legacy_record_version and
TLSCiphertext.legacy_record_version) As of TLS 1.3, this field is TLSCiphertext.legacy_record_version) As of TLS 1.3, this field is
deprecated. The value of TLSPlaintext.legacy_record_version MUST be deprecated. The value of TLSPlaintext.legacy_record_version MUST be
ignored by all implementations. The value of ignored by all implementations. The value of
TLSCiphertext.legacy_record_version MAY be ignored, or MAY be TLSCiphertext.legacy_record_version MAY be ignored, or MAY be
validated to match the fixed constant value. Version negotiation is validated to match the fixed constant value. Version negotiation is
performed using only the handshake versions. performed using only the handshake versions
(ClientHello.legacy_version, ClientHello "supported_versions" (ClientHello.legacy_version, ClientHello "supported_versions"
extension, and ServerHello.version) In order to maximize extension, and ServerHello.version). In order to maximize
interoperability with older endpoints, implementations that negotiate interoperability with older endpoints, implementations that negotiate
the use of TLS 1.0-1.2 SHOULD set the record layer version number to the use of TLS 1.0-1.2 SHOULD set the record layer version number to
the negotiated version for the ServerHello and all records the negotiated version for the ServerHello and all records
thereafter. thereafter.
For maximum compatibility with previously non-standard behavior and For maximum compatibility with previously non-standard behavior and
misconfigured deployments, all implementations SHOULD support misconfigured deployments, all implementations SHOULD support
validation of certification paths based on the expectations in this validation of certification paths based on the expectations in this
document, even when handling prior TLS versions' handshakes. (see document, even when handling prior TLS versions' handshakes. (see
Section 4.4.2.2) Section 4.4.2.2)
skipping to change at page 115, line 24 skipping to change at page 122, line 49
D.2. Negotiating with an older client D.2. Negotiating with an older client
A TLS server can also receive a ClientHello indicating a version A TLS server can also receive a ClientHello indicating a version
number smaller than its highest supported version. If the number smaller than its highest supported version. If the
"supported_versions" extension is present, the server MUST negotiate "supported_versions" extension is present, the server MUST negotiate
using that extension as described in Section 4.2.1. If the using that extension as described in Section 4.2.1. If the
"supported_versions" extension is not present, the server MUST "supported_versions" extension is not present, the server MUST
negotiate the minimum of ClientHello.legacy_version and TLS 1.2. For negotiate the minimum of ClientHello.legacy_version and TLS 1.2. For
example, if the server supports TLS 1.0, 1.1, and 1.2, and example, if the server supports TLS 1.0, 1.1, and 1.2, and
legacy_version is TLS 1.0, the server will proceed with a TLS 1.0 legacy_version is TLS 1.0, the server will proceed with a TLS 1.0
ServerHello. If the server only supports versions greater than ServerHello. If the "supported_versions" extension is absent and the
ClientHello.legacy_version, it MUST abort the handshake with a server only supports versions greater than
"protocol_version" alert. ClientHello.legacy_version, the server MUST abort the handshake with
a "protocol_version" alert.
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.legacy_record_version). Servers will receive various (TLSPlaintext.legacy_record_version). Servers will receive various
TLS 1.x versions in this field, but its value MUST always be ignored. TLS 1.x versions in this field, but its value MUST always be ignored.
D.3. Zero-RTT backwards compatibility D.3. Zero-RTT backwards compatibility
0-RTT data is not compatible with older servers. An older server 0-RTT data is not compatible with older servers. An older server
will respond to the ClientHello with an older ServerHello, but it will respond to the ClientHello with an older ServerHello, but it
skipping to change at page 118, line 10 skipping to change at page 125, line 37
produced by a handshake should also be distinct and unrelated. produced by a handshake should also be distinct and unrelated.
Downgrade protection. The cryptographic parameters should be the Downgrade protection. The cryptographic parameters should be the
same on both sides and should be the same as if the peers had been same on both sides and should be the same as if the peers had been
communicating in the absence of an attack (See [BBFKZG16]; defns 8 communicating in the absence of an attack (See [BBFKZG16]; defns 8
and 9}). and 9}).
Forward secret with respect to long-term keys If the long-term Forward secret with respect to long-term keys If the long-term
keying material (in this case the signature keys in certificate- keying material (in this case the signature keys in certificate-
based authentication modes or the external/resumption PSK in PSK based authentication modes or the external/resumption PSK in PSK
with (EC)DHE modes) are compromised after the handshake is with (EC)DHE modes) is compromised after the handshake is
complete, this does not compromise the security of the session key complete, this does not compromise the security of the session key
(See [DOW92]). The forward secrecy property is not satisfied when (See [DOW92]). The forward secrecy property is not satisfied when
PSK is used in the "psk_ke" PskKeyExchangeMode. PSK is used in the "psk_ke" PskKeyExchangeMode.
Key Compromise Impersonation (KCI) resistance In a mutually- Key Compromise Impersonation (KCI) resistance In a mutually-
authenticated connection with certificates, peer authentication authenticated connection with certificates, peer authentication
should hold even if the local long-term secret was compromised should hold even if the local long-term secret was compromised
before the connection was established (see [HGFS15]). For before the connection was established (see [HGFS15]). For
example, if a client's signature key is compromised, it should not example, if a client's signature key is compromised, it should not
be possible to impersonate arbitrary servers to that client in be possible to impersonate arbitrary servers to that client in
skipping to change at page 119, line 6 skipping to change at page 126, line 33
form connection N+1 is separate from the traffic keys used by form connection N+1 is separate from the traffic keys used by
connection N, thus providing forward secrecy between the connections. connection N, thus providing forward secrecy between the connections.
The PSK binder value forms a binding between a PSK and the current The PSK binder value forms a binding between a PSK and the current
handshake, as well as between the session where the PSK was handshake, as well as between the session where the PSK was
established and the session where it was used. This binding established and the session where it was used. This binding
transitively includes the original handshake transcript, because that transitively includes the original handshake transcript, because that
transcript is digested into the values which produce the Resumption transcript is digested into the values which produce the Resumption
Master Secret. This requires that both the KDF used to produce the Master Secret. This requires that both the KDF used to produce the
resumption master secret and the MAC used to compute the binder be resumption master secret and the MAC used to compute the binder be
collision resistant. These are properties of HKDF and HMAC collision resistant. See Appendix E.1.1 for more on this. Note: The
respectively when used with collision resistant hash functions and
producing output of at least 256 bits. Any future replacement of
these functions MUST also provide collision resistance. Note: The
binder does not cover the binder values from other PSKs, though they binder does not cover the binder values from other PSKs, though they
are included in the Finished MAC. are included in the Finished MAC.
Note: TLS does not currently permit the server to send a
certificate_request message in non-certificate-based handshakes
(e.g., PSK). If this restriction were to be relaxed in future, the
client's signature would not cover the server's certificate directly.
However, if the PSK was established through a NewSessionTicket, the
client's signature would transitively cover the server's certificate
through the PSK binder. [PSK-FINISHED] describes a concrete attack
on constructions that do not bind to the server's certificate. It is
unsafe to use certificate-based client authentication when the client
might potentially share the same PSK/key-id pair with two different
endpoints. Implementations MUST NOT combine external PSKs with
certificate-based authentication of either the client or the server.
If an exporter is used, then it produces values which are unique and If an exporter is used, then it produces values which are unique and
secret (because they are generated from a unique session key). secret (because they are generated from a unique session key).
Exporters computed with different labels and contexts are Exporters computed with different labels and contexts are
computationally independent, so it is not feasible to compute one computationally independent, so it is not feasible to compute one
from another or the session secret from the exported value. Note: from another or the session secret from the exported value. Note:
exporters can produce arbitrary-length values. If exporters are to exporters can produce arbitrary-length values. If exporters are to
be used as channel bindings, the exported value MUST be large enough be used as channel bindings, the exported value MUST be large enough
to provide collision resistance. The exporters provided in TLS 1.3 to provide collision resistance. The exporters provided in TLS 1.3
are derived from the same handshake contexts as the early traffic are derived from the same handshake contexts as the early traffic
keys and the application traffic keys respectively, and thus have keys and the application traffic keys respectively, and thus have
similar security properties. Note that they do not include the similar security properties. Note that they do not include the
client's certificate; future applications which wish to bind to the client's certificate; future applications which wish to bind to the
skipping to change at page 119, line 40 skipping to change at page 127, line 30
certain bytes in the random nonces as described in Section 4.1.3 certain bytes in the random nonces as described in Section 4.1.3
allows the detection of downgrade to previous TLS versions. allows the detection of downgrade to previous TLS versions.
As soon as the client and the server have exchanged enough As soon as the client and the server have exchanged enough
information to establish shared keys, the remainder of the handshake information to establish shared keys, the remainder of the handshake
is encrypted, thus providing protection against passive attackers. is encrypted, thus providing protection against passive attackers.
Because the server authenticates before the client, the client can Because the server authenticates before the client, the client can
ensure that it only reveals its identity to an authenticated server. ensure that it only reveals its identity to an authenticated server.
Note that implementations must use the provided record padding Note that implementations must use the provided record padding
mechanism during the handshake to avoid leaking information about the mechanism during the handshake to avoid leaking information about the
identities due to length. identities due to length. The client's proposed PSK identities are
not encrypted, nor is the one that the server selects.
A client that has sent authentication data to a server, either in the E.1.1. Key Derivation and HKDF
main handshake or in post-handshake authentication, cannot be sure if
Key derivation in TLS 1.3 uses the HKDF function defined in [RFC5869]
and its two components, HKDF-Extract and HKDF-Expand. The full
rationale for the HKDF construction can be found in [Kraw10] and the
rationale for the way it is used in TLS 1.3 in [KW16]. Throughout
this document, each application of HKDF-Extract is followed by one or
more invocations of HKDF-Expand. This ordering should always be
followed (including in future revisions of this document), in
particular, one SHOULD NOT use an output of HKDF-Extract as an input
to another application of HKDF-Extract without an HKDF-Expand in
between. Consecutive applications of HKDF-Expand are allowed as long
as these are differentiated via the key and/or the labels.
Note that HKDF-Expand implements a pseudorandom function (PRF) with
both inputs and outputs of variable length. In some of the uses of
HKDF in this document (e.g., for generating exporters and the
resumption_master_secret), it is necessary that the application of
HKDF-Expand be collision-resistant, namely, it should be infeasible
to find two different inputs to HKDF-Expand that output the same
value. This requires the underlying hash function to be collision
resistant and the output length from HKDF-Expand to be of size at
least 256 bits (or as much as needed for the hash function to prevent
finding collisions).
E.1.2. Client Authentication
A client that has sent authentication data to a server, either during
the handshake or in post-handshake authentication, cannot be sure if
the server afterwards considers the client to be authenticated or the server afterwards considers the client to be authenticated or
not. If the client needs to determine if the server considers the not. If the client needs to determine if the server considers the
connection to be unilaterally or mutually authenticated, this has to connection to be unilaterally or mutually authenticated, this has to
be provisioned by the application layer. See [CHHSV17] for details. be provisioned by the application layer. See [CHHSV17] for details.
In addition, the analysis of post-handshake authentication from
[Kraw16] shows that the client identified by the certificate sent in
the post-handshake phase possesses the traffic key. This party is
therefore the client that participated in the original handshake or
one to whom the original client delegated the traffic key (assuming
that the traffic key has not been compromised).
E.1.3. 0-RTT
The 0-RTT mode of operation generally provides the same security The 0-RTT mode of operation generally provides the same security
properties as 1-RTT data, with the two exceptions that the 0-RTT properties as 1-RTT data, with the two exceptions that the 0-RTT
encryption keys do not provide full forward secrecy and that the encryption keys do not provide full forward secrecy and that the
server is not able to guarantee full uniqueness of the handshake server is not able to guarantee full uniqueness of the handshake
(non-replayability) without keeping potentially undue amounts of (non-replayability) without keeping potentially undue amounts of
state. See Section 4.2.7 for one mechanism to limit the exposure to state. See Section 4.2.9 for one mechanism to limit the exposure to
replay. replay.
E.1.4. Post-Compromise Security
TLS does not provide security for handshakes which take place after TLS does not provide security for handshakes which take place after
the peer's long-term secret (signature key or external PSK) is the peer's long-term secret (signature key or external PSK) is
compromised. It therefore does not provide post-compromise security compromised. It therefore does not provide post-compromise security
[CCG16], sometimes also referred to as backwards or future security. [CCG16], sometimes also referred to as backwards or future security.
This is in contrast to KCI resistance, which describes the security This is in contrast to KCI resistance, which describes the security
guarantees that a party has after its own long-term secret has been guarantees that a party has after its own long-term secret has been
compromised. compromised.
E.1.5. External References
The reader should refer to the following references for analysis of The reader should refer to the following references for analysis of
the TLS handshake [CHSV16] [FGSW16] [LXZFH16]. the TLS handshake: [DFGS15] [CHSV16] [DFGS16] [KW16] [Kraw16]
[FGSW16] [LXZFH16] [FG17] [BBK17].
E.2. Record Layer E.2. Record Layer
The record layer depends on the handshake producing strong traffic The record layer depends on the handshake producing strong traffic
secrets which can be used to derive bidirectional encryption keys and secrets which can be used to derive bidirectional encryption keys and
nonces. Assuming that is true, and the keys are used for no more nonces. Assuming that is true, and the keys are used for no more
data than indicated in Section 5.5 then the record layer should data than indicated in Section 5.5 then the record layer should
provide the following guarantees: provide the following guarantees:
Confidentiality. An attacker should not be able to determine the Confidentiality. An attacker should not be able to determine the
skipping to change at page 121, line 11 skipping to change at page 129, line 44
Informally, TLS 1.3 provides these properties by AEAD-protecting the Informally, TLS 1.3 provides these properties by AEAD-protecting the
plaintext with a strong key. AEAD encryption [RFC5116] provides plaintext with a strong key. AEAD encryption [RFC5116] provides
confidentiality and integrity for the data. Non-replayability is confidentiality and integrity for the data. Non-replayability is
provided by using a separate nonce for each record, with the nonce provided by using a separate nonce for each record, with the nonce
being derived from the record sequence number (Section 5.3), with the being derived from the record sequence number (Section 5.3), with the
sequence number being maintained independently at both sides thus sequence number being maintained independently at both sides thus
records which are delivered out of order result in AEAD deprotection records which are delivered out of order result in AEAD deprotection
failures. failures.
The plaintext protected by the AEAD function consists of content plus
variable-length padding. Because the padding is also encrypted, the
attacker cannot directly determine the length of the padding, but may
be able to measure it indirectly by the use of timing channels
exposed during record processing (i.e., seeing how long it takes to
process a record). In general, it is not known how to remove this
type of channel because even a constant time padding removal function
will then feed the content into data-dependent functions.
The re-keying technique in TLS 1.3 (see Section 7.2) follows the The re-keying technique in TLS 1.3 (see Section 7.2) follows the
construction of the serial generator in [REKEY], which shows that re- construction of the serial generator in [REKEY], which shows that re-
keying can allow keys to be used for a larger number of encryptions keying can allow keys to be used for a larger number of encryptions
than without re-keying. This relies on the security of the HKDF- than without re-keying. This relies on the security of the HKDF-
Expand-Label function as a pseudorandom function (PRF). In addition, Expand-Label function as a pseudorandom function (PRF). In addition,
as long as this function is truly one way, it is not possible to as long as this function is truly one way, it is not possible to
compute traffic keys from prior to a key change (forward secrecy). compute traffic keys from prior to a key change (forward secrecy).
TLS does not provide security for data which is communicated on a TLS does not provide security for data which is communicated on a
connection after a traffic secret of that connection is compromised. connection after a traffic secret of that connection is compromised.
That is, TLS does not provide post-compromise security/future That is, TLS does not provide post-compromise security/future
secrecy/backward secrecy with respect to the traffic secret. Indeed, secrecy/backward secrecy with respect to the traffic secret. Indeed,
an attacker who learns a traffic secret can compute all future an attacker who learns a traffic secret can compute all future
traffic secrets on that connection. Systems which want such traffic secrets on that connection. Systems which want such
guarantees need to do a fresh handshake and establish a new guarantees need to do a fresh handshake and establish a new
connection with an (EC)DHE exchange. connection with an (EC)DHE exchange.
The reader should refer to [RECORD] for analysis of the TLS record E.2.1. External References
layer.
The reader should refer to the following references for analysis of
the TLS record layer: [BMMT15] [BT16] [BDFKPPRSZZ16] [BBK17].
E.3. Traffic Analysis
TLS is susceptible to a variety of traffic analysis attacks based on
observing the length and timing of encrypted packets [CLINIC]
[HCJ16]. This is particularly easy when there is a small set of
possible messages to be distinguished, such as for a video server
hosting a fixed corpus of content, but still provides usable
information even in more complicated scenarios.
TLS does not provide any specific defenses against this form of
attack but does include a padding mechanism for use by applications:
The plaintext protected by the AEAD function consists of content plus
variable-length padding, which allows the application to produce
arbitrary length encrypted records as well as padding-only cover
traffic to conceal the difference between periods of transmission and
periods of silence. Because the padding is encrypted alongside the
actual content, an attacker cannot directly determine the length of
the padding, but may be able to measure it indirectly by the use of
timing channels exposed during record processing (i.e., seeing how
long it takes to process a record or trickling in records to see
which ones elicit a response from the server). In general, it is not
known how to remove all of these channels because even a constant
time padding removal function will then feed the content into data-
dependent functions.
Note: Robust traffic analysis defences will likely lead to inferior
performance due to delay in transmitting packets and increased
traffic volume.
E.4. Side Channel Attacks
In general, TLS does not have specific defenses against side-channel
attacks (i.e., those which attack the communications via secondary
channels such as timing) leaving those to the implementation of the
relevant cryptographic primitives. However, certain features of TLS
are designed to make it easier to write side-channel resistant code:
- Unlike previous versions of TLS which used a composite MAC-then-
encrypt structure, TLS 1.3 only uses AEAD algorithms, allowing
implementations to use self-contained constant-time
implementations of those primitives.
- TLS uses a uniform "bad_record_mac" alert for all decryption
errors, which is intended to prevent an attacker from gaining
piecewise insight into portions of the message. Additional
resistance is provided by terminating the connection on such
errors; a new connection will have different cryptographic
material, preventing attacks against the cryptographic primitives
that require multiple trials.
Information leakage through side channels can occur at layers above
TLS, in application protocols and the applications that use them.
Resistance to side-channel attacks depends on applications and
application protocols separately ensuring that confidential
information is not inadvertently leaked.
Appendix F. Working Group Information Appendix F. Working Group Information
The discussion list for the IETF TLS working group is located at the The discussion list for the IETF TLS working group is located at the
e-mail address tls@ietf.org [1]. Information on the group and e-mail address tls@ietf.org [1]. Information on the group and
information on how to subscribe to the list is at information on how to subscribe to the list is at
https://www.ietf.org/mailman/listinfo/tls https://www.ietf.org/mailman/listinfo/tls
Archives of the list can be found at: https://www.ietf.org/mail- Archives of the list can be found at: https://www.ietf.org/mail-
archive/web/tls/current/index.html archive/web/tls/current/index.html
skipping to change at page 123, line 36 skipping to change at page 133, line 20
- Anil Gangolli - Anil Gangolli
anil@busybuddha.org anil@busybuddha.org
- David M. Garrett - David M. Garrett
dave@nulldereference.com dave@nulldereference.com
- Alessandro Ghedini - Alessandro Ghedini
Cloudflare Inc. Cloudflare Inc.
alessandro@cloudflare.com alessandro@cloudflare.com
- Daniel Kahn Gillmor
ACLU
dkg@fifthhorseman.net
- Matthew Green
Johns Hopkins University
mgreen@cs.jhu.edu
- Jens Guballa - Jens Guballa
ETAS ETAS
jens.guballa@etas.com jens.guballa@etas.com
- Felix Guenther
TU Darmstadt
mail@felixguenther.info
- Vipul Gupta (co-author of [RFC4492]) - Vipul Gupta (co-author of [RFC4492])
Sun Microsystems Laboratories Sun Microsystems Laboratories
vipul.gupta@sun.com vipul.gupta@sun.com
- Chris Hawk (co-author of [RFC4492]) - Chris Hawk (co-author of [RFC4492])
Corriente Networks LLC Corriente Networks LLC
chris@corriente.net chris@corriente.net
- Kipp Hickman - Kipp Hickman
skipping to change at page 124, line 23 skipping to change at page 134, line 20
Royal Holloway, University of London Royal Holloway, University of London
- Subodh Iyengar - Subodh Iyengar
Facebook Facebook
subodh@fb.com subodh@fb.com
- Benjamin Kaduk - Benjamin Kaduk
Akamai Akamai
kaduk@mit.edu kaduk@mit.edu
- Daniel Kahn Gillmor
ACLU
dkg@fifthhorseman.net
- Hubert Kario - Hubert Kario
Red Hat Inc. Red Hat Inc.
hkario@redhat.com hkario@redhat.com
- Phil Karlton (co-author of SSL 3.0) - Phil Karlton (co-author of SSL 3.0)
- Leon Klingele - Leon Klingele
Independent Independent
mail@leonklingele.de mail@leonklingele.de
skipping to change at page 125, line 29 skipping to change at page 135, line 21
carl.mehner@usaa.com carl.mehner@usaa.com
- Jan Mikkelsen - Jan Mikkelsen
Transactionware Transactionware
janm@transactionware.com janm@transactionware.com
- Bodo Moeller (co-author of [RFC4492]) - Bodo Moeller (co-author of [RFC4492])
Google Google
bodo@openssl.org bodo@openssl.org
- Kyle Nekritz
Facebook
knekritz@fb.com
- Erik Nygren - Erik Nygren
Akamai Technologies Akamai Technologies
erik+ietf@nygren.org erik+ietf@nygren.org
- Magnus Nystrom - Magnus Nystrom
Microsoft Microsoft
mnystrom@microsoft.com mnystrom@microsoft.com
- Kazuho Oku - Kazuho Oku
DeNA Co., Ltd. DeNA Co., Ltd.
skipping to change at page 126, line 18 skipping to change at page 136, line 14
- Robert Relyea - Robert Relyea
Netscape Communications Netscape Communications
relyea@netscape.com relyea@netscape.com
- Kyle Rose - Kyle Rose
Akamai Technologies Akamai Technologies
krose@krose.org krose@krose.org
- Jim Roskind - Jim Roskind
Netscape Communications Amazon
jar@netscape.com jroskind@amazon.com
- Michael Sabin - Michael Sabin
- Joe Salowey
Tableau Software
joe@salowey.net
- Rich Salz - Rich Salz
Akamai Akamai
rsalz@akamai.com rsalz@akamai.com
- Sam Scott - Sam Scott
Royal Holloway, University of London Royal Holloway, University of London
me@samjs.co.uk me@samjs.co.uk
- Dan Simon - Dan Simon
Microsoft, Inc. Microsoft, Inc.
dansimon@microsoft.com dansimon@microsoft.com
- Brian Sniffen
Akamai Technologies
ietf@bts.evenmere.org
- Nick Sullivan - Nick Sullivan
Cloudflare Inc. Cloudflare Inc.
nick@cloudflare.com nick@cloudflare.com
- Bjoern Tackmann - Bjoern Tackmann
University of California, San Diego University of California, San Diego
btackmann@eng.ucsd.edu btackmann@eng.ucsd.edu
- Tim Taubert - Tim Taubert
Mozilla Mozilla
ttaubert@mozilla.com ttaubert@mozilla.com
- Martin Thomson - Martin Thomson
Mozilla Mozilla
mt@mozilla.com mt@mozilla.com
- Sean Turner
sn3rd
sean@sn3rd.com
- Filippo Valsorda - Filippo Valsorda
Cloudflare Inc. Cloudflare Inc.
filippo@cloudflare.com filippo@cloudflare.com
- Thyla van der Merwe - Thyla van der Merwe
Royal Holloway, University of London Royal Holloway, University of London
tjvdmerwe@gmail.com tjvdmerwe@gmail.com
- Tom Weinstein - Tom Weinstein
- Hoeteck Wee - Hoeteck Wee
Ecole Normale Superieure, Paris Ecole Normale Superieure, Paris
 End of changes. 279 change blocks. 
766 lines changed or deleted 1163 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/