draft-ietf-tls-tls13-14.txt   draft-ietf-tls-tls13-15.txt 
Network Working Group E. Rescorla Network Working Group E. Rescorla
Internet-Draft RTFM, Inc. Internet-Draft RTFM, Inc.
Obsoletes: 5077, 5246, 5746 (if July 11, 2016 Obsoletes: 5077, 5246, 5746 (if August 17, 2016
approved) approved)
Updates: 4492, 6066, 6961 (if approved) Updates: 4492, 6066, 6961 (if approved)
Intended status: Standards Track Intended status: Standards Track
Expires: January 12, 2017 Expires: February 18, 2017
The Transport Layer Security (TLS) Protocol Version 1.3 The Transport Layer Security (TLS) Protocol Version 1.3
draft-ietf-tls-tls13-14 draft-ietf-tls-tls13-15
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 36 skipping to change at page 1, line 36
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on January 12, 2017. This Internet-Draft will expire on February 18, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2016 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 24 skipping to change at page 2, line 24
outside the IETF Standards Process, and derivative works of it may outside the IETF Standards Process, and derivative works of it may
not be created outside the IETF Standards Process, except to format not be created outside the IETF Standards Process, except to format
it for publication as an RFC or to translate it into languages other it for publication as an RFC or to translate it into languages other
than English. than English.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1. Conventions and Terminology . . . . . . . . . . . . . . . 5 1.1. Conventions and Terminology . . . . . . . . . . . . . . . 5
1.2. Major Differences from TLS 1.2 . . . . . . . . . . . . . 6 1.2. Major Differences from TLS 1.2 . . . . . . . . . . . . . 6
2. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 10 1.3. Updates Affecting TLS 1.2 . . . . . . . . . . . . . . . . 11
2. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 11
2.1. Incorrect DHE Share . . . . . . . . . . . . . . . . . . . 14 2.1. Incorrect DHE Share . . . . . . . . . . . . . . . . . . . 14
2.2. Resumption and Pre-Shared Key (PSK) . . . . . . . . . . . 15 2.2. Resumption and Pre-Shared Key (PSK) . . . . . . . . . . . 15
2.3. Zero-RTT Data . . . . . . . . . . . . . . . . . . . . . . 17 2.3. Zero-RTT Data . . . . . . . . . . . . . . . . . . . . . . 17
3. Presentation Language . . . . . . . . . . . . . . . . . . . . 18 3. Presentation Language . . . . . . . . . . . . . . . . . . . . 18
3.1. Basic Block Size . . . . . . . . . . . . . . . . . . . . 18 3.1. Basic Block Size . . . . . . . . . . . . . . . . . . . . 18
3.2. Miscellaneous . . . . . . . . . . . . . . . . . . . . . . 19 3.2. Miscellaneous . . . . . . . . . . . . . . . . . . . . . . 19
3.3. Vectors . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.3. Vectors . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.4. Numbers . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.4. Numbers . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.5. Enumerateds . . . . . . . . . . . . . . . . . . . . . . . 20 3.5. Enumerateds . . . . . . . . . . . . . . . . . . . . . . . 20
3.6. Constructed Types . . . . . . . . . . . . . . . . . . . . 21 3.6. Constructed Types . . . . . . . . . . . . . . . . . . . . 21
3.6.1. Variants . . . . . . . . . . . . . . . . . . . . . . 21 3.6.1. Variants . . . . . . . . . . . . . . . . . . . . . . 21
3.7. Constants . . . . . . . . . . . . . . . . . . . . . . . . 23 3.7. Constants . . . . . . . . . . . . . . . . . . . . . . . . 23
4. Handshake Protocol . . . . . . . . . . . . . . . . . . . . . 23 4. Handshake Protocol . . . . . . . . . . . . . . . . . . . . . 23
4.1. Key Exchange Messages . . . . . . . . . . . . . . . . . . 24 4.1. Key Exchange Messages . . . . . . . . . . . . . . . . . . 24
4.1.1. Client Hello . . . . . . . . . . . . . . . . . . . . 25 4.1.1. Cryptographic Negotiation . . . . . . . . . . . . . . 25
4.1.2. Server Hello . . . . . . . . . . . . . . . . . . . . 27 4.1.2. Client Hello . . . . . . . . . . . . . . . . . . . . 26
4.1.3. Hello Retry Request . . . . . . . . . . . . . . . . . 29 4.1.3. Server Hello . . . . . . . . . . . . . . . . . . . . 28
4.2. Hello Extensions . . . . . . . . . . . . . . . . . . . . 30 4.1.4. Hello Retry Request . . . . . . . . . . . . . . . . . 29
4.2.1. Cookie . . . . . . . . . . . . . . . . . . . . . . . 31 4.2. Hello Extensions . . . . . . . . . . . . . . . . . . . . 31
4.2.2. Signature Algorithms . . . . . . . . . . . . . . . . 32 4.2.1. Cookie . . . . . . . . . . . . . . . . . . . . . . . 32
4.2.3. Negotiated Groups . . . . . . . . . . . . . . . . . . 35 4.2.2. Signature Algorithms . . . . . . . . . . . . . . . . 33
4.2.4. Key Share . . . . . . . . . . . . . . . . . . . . . . 36 4.2.3. Negotiated Groups . . . . . . . . . . . . . . . . . . 36
4.2.4. Key Share . . . . . . . . . . . . . . . . . . . . . . 37
4.2.5. Pre-Shared Key Extension . . . . . . . . . . . . . . 39 4.2.5. Pre-Shared Key Extension . . . . . . . . . . . . . . 39
4.2.6. Early Data Indication . . . . . . . . . . . . . . . . 40 4.2.6. Early Data Indication . . . . . . . . . . . . . . . . 41
4.2.7. OCSP Status Extensions . . . . . . . . . . . . . . . 43 4.2.7. OCSP Status Extensions . . . . . . . . . . . . . . . 44
4.2.8. Encrypted Extensions . . . . . . . . . . . . . . . . 44 4.2.8. Encrypted Extensions . . . . . . . . . . . . . . . . 45
4.2.9. Certificate Request . . . . . . . . . . . . . . . . . 44 4.2.9. Certificate Request . . . . . . . . . . . . . . . . . 45
4.3. Authentication Messages . . . . . . . . . . . . . . . . . 47
4.3. Authentication Messages . . . . . . . . . . . . . . . . . 46 4.3.1. Certificate . . . . . . . . . . . . . . . . . . . . . 49
4.3.1. Certificate . . . . . . . . . . . . . . . . . . . . . 47 4.3.2. Certificate Verify . . . . . . . . . . . . . . . . . 52
4.3.2. Certificate Verify . . . . . . . . . . . . . . . . . 51 4.3.3. Finished . . . . . . . . . . . . . . . . . . . . . . 54
4.3.3. Finished . . . . . . . . . . . . . . . . . . . . . . 53 4.4. Post-Handshake Messages . . . . . . . . . . . . . . . . . 55
4.4. Post-Handshake Messages . . . . . . . . . . . . . . . . . 54 4.4.1. New Session Ticket Message . . . . . . . . . . . . . 56
4.4.1. New Session Ticket Message . . . . . . . . . . . . . 54 4.4.2. Post-Handshake Authentication . . . . . . . . . . . . 57
4.4.2. Post-Handshake Authentication . . . . . . . . . . . . 56 4.4.3. Key and IV Update . . . . . . . . . . . . . . . . . . 58
4.4.3. Key and IV Update . . . . . . . . . . . . . . . . . . 57 4.5. Handshake Layer and Key Changes . . . . . . . . . . . . . 59
5. Record Protocol . . . . . . . . . . . . . . . . . . . . . . . 58 5. Record Protocol . . . . . . . . . . . . . . . . . . . . . . . 59
5.1. Record Layer . . . . . . . . . . . . . . . . . . . . . . 58 5.1. Record Layer . . . . . . . . . . . . . . . . . . . . . . 59
5.2. Record Payload Protection . . . . . . . . . . . . . . . . 59 5.2. Record Payload Protection . . . . . . . . . . . . . . . . 61
5.3. Per-Record Nonce . . . . . . . . . . . . . . . . . . . . 61 5.3. Per-Record Nonce . . . . . . . . . . . . . . . . . . . . 63
5.4. Record Padding . . . . . . . . . . . . . . . . . . . . . 62 5.4. Record Padding . . . . . . . . . . . . . . . . . . . . . 63
5.5. Limits on Key Usage . . . . . . . . . . . . . . . . . . . 63 5.5. Limits on Key Usage . . . . . . . . . . . . . . . . . . . 64
6. Alert Protocol . . . . . . . . . . . . . . . . . . . . . . . 63 6. Alert Protocol . . . . . . . . . . . . . . . . . . . . . . . 65
6.1. Closure Alerts . . . . . . . . . . . . . . . . . . . . . 65 6.1. Closure Alerts . . . . . . . . . . . . . . . . . . . . . 66
6.2. Error Alerts . . . . . . . . . . . . . . . . . . . . . . 66 6.2. Error Alerts . . . . . . . . . . . . . . . . . . . . . . 67
7. Cryptographic Computations . . . . . . . . . . . . . . . . . 69 7. Cryptographic Computations . . . . . . . . . . . . . . . . . 70
7.1. Key Schedule . . . . . . . . . . . . . . . . . . . . . . 69 7.1. Key Schedule . . . . . . . . . . . . . . . . . . . . . . 70
7.2. Updating Traffic Keys and IVs . . . . . . . . . . . . . . 72 7.2. Updating Traffic Keys and IVs . . . . . . . . . . . . . . 73
7.3. Traffic Key Calculation . . . . . . . . . . . . . . . . . 72 7.3. Traffic Key Calculation . . . . . . . . . . . . . . . . . 73
7.3.1. Diffie-Hellman . . . . . . . . . . . . . . . . . . . 73 7.3.1. Diffie-Hellman . . . . . . . . . . . . . . . . . . . 74
7.3.2. Elliptic Curve Diffie-Hellman . . . . . . . . . . . . 74 7.3.2. Elliptic Curve Diffie-Hellman . . . . . . . . . . . . 75
7.3.3. Exporters . . . . . . . . . . . . . . . . . . . . . . 74 7.3.3. Exporters . . . . . . . . . . . . . . . . . . . . . . 75
8. Compliance Requirements . . . . . . . . . . . . . . . . . . . 74 8. Compliance Requirements . . . . . . . . . . . . . . . . . . . 75
8.1. MTI Cipher Suites . . . . . . . . . . . . . . . . . . . . 75 8.1. MTI Cipher Suites . . . . . . . . . . . . . . . . . . . . 76
8.2. MTI Extensions . . . . . . . . . . . . . . . . . . . . . 75 8.2. MTI Extensions . . . . . . . . . . . . . . . . . . . . . 76
9. Security Considerations . . . . . . . . . . . . . . . . . . . 76 9. Security Considerations . . . . . . . . . . . . . . . . . . . 77
10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 76 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 77
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 79 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 80
11.1. Normative References . . . . . . . . . . . . . . . . . . 79 11.1. Normative References . . . . . . . . . . . . . . . . . . 80
11.2. Informative References . . . . . . . . . . . . . . . . . 82 11.2. Informative References . . . . . . . . . . . . . . . . . 83
Appendix A. Protocol Data Structures and Constant Values . . . . 89 Appendix A. Protocol Data Structures and Constant Values . . . . 90
A.1. Record Layer . . . . . . . . . . . . . . . . . . . . . . 89 A.1. Record Layer . . . . . . . . . . . . . . . . . . . . . . 90
A.2. Alert Messages . . . . . . . . . . . . . . . . . . . . . 89 A.2. Alert Messages . . . . . . . . . . . . . . . . . . . . . 90
A.3. Handshake Protocol . . . . . . . . . . . . . . . . . . . 91 A.3. Handshake Protocol . . . . . . . . . . . . . . . . . . . 92
A.3.1. Key Exchange Messages . . . . . . . . . . . . . . . . 91 A.3.1. Key Exchange Messages . . . . . . . . . . . . . . . . 92
A.3.2. Server Parameters Messages . . . . . . . . . . . . . 95 A.3.2. Server Parameters Messages . . . . . . . . . . . . . 96
A.3.3. Authentication Messages . . . . . . . . . . . . . . . 96 A.3.3. Authentication Messages . . . . . . . . . . . . . . . 97
A.3.4. Ticket Establishment . . . . . . . . . . . . . . . . 96 A.3.4. Ticket Establishment . . . . . . . . . . . . . . . . 97
A.4. Cipher Suites . . . . . . . . . . . . . . . . . . . . . . 97 A.4. Cipher Suites . . . . . . . . . . . . . . . . . . . . . . 98
A.4.1. Unauthenticated Operation . . . . . . . . . . . . . . 102 A.4.1. Unauthenticated Operation . . . . . . . . . . . . . . 99
Appendix B. Implementation Notes . . . . . . . . . . . . . . . . 102 Appendix B. Implementation Notes . . . . . . . . . . . . . . . . 100
B.1. Random Number Generation and Seeding . . . . . . . . . . 102 B.1. API considerations for 0-RTT . . . . . . . . . . . . . . 100
B.2. Certificates and Authentication . . . . . . . . . . . . . 103 B.2. Random Number Generation and Seeding . . . . . . . . . . 100
B.3. Cipher Suite Support . . . . . . . . . . . . . . . . . . 103 B.3. Certificates and Authentication . . . . . . . . . . . . . 100
B.4. Implementation Pitfalls . . . . . . . . . . . . . . . . . 103 B.4. Cipher Suite Support . . . . . . . . . . . . . . . . . . 100
B.5. Client Tracking Prevention . . . . . . . . . . . . . . . 105 B.5. Implementation Pitfalls . . . . . . . . . . . . . . . . . 101
B.6. Client Tracking Prevention . . . . . . . . . . . . . . . 102
Appendix C. Backward Compatibility . . . . . . . . . . . . . . . 105 Appendix C. Backward Compatibility . . . . . . . . . . . . . . . 102
C.1. Negotiating with an older server . . . . . . . . . . . . 106 C.1. Negotiating with an older server . . . . . . . . . . . . 103
C.2. Negotiating with an older client . . . . . . . . . . . . 106 C.2. Negotiating with an older client . . . . . . . . . . . . 104
C.3. Zero-RTT backwards compatibility . . . . . . . . . . . . 107 C.3. Zero-RTT backwards compatibility . . . . . . . . . . . . 104
C.4. Backwards Compatibility Security Restrictions . . . . . . 107 C.4. Backwards Compatibility Security Restrictions . . . . . . 105
Appendix D. Overview of Security Properties . . . . . . . . . . 108 Appendix D. Overview of Security Properties . . . . . . . . . . 106
D.1. Handshake . . . . . . . . . . . . . . . . . . . . . . . . 108 D.1. Handshake . . . . . . . . . . . . . . . . . . . . . . . . 106
D.2. Record Layer . . . . . . . . . . . . . . . . . . . . . . 110 D.2. Record Layer . . . . . . . . . . . . . . . . . . . . . . 108
Appendix E. Working Group Information . . . . . . . . . . . . . 112 Appendix E. Working Group Information . . . . . . . . . . . . . 109
Appendix F. Contributors . . . . . . . . . . . . . . . . . . . . 112 Appendix F. Contributors . . . . . . . . . . . . . . . . . . . . 109
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 116 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 113
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 6, line 14 skipping to change at page 6, line 20
sender: An endpoint that is transmitting records. sender: An endpoint that is transmitting records.
session: An association between a client and a server resulting from session: An association between a client and a server resulting from
a handshake. a handshake.
server: The endpoint which did not initiate the TLS connection. server: The endpoint which did not initiate the TLS connection.
1.2. Major Differences from TLS 1.2 1.2. Major Differences from TLS 1.2
(*) indicates changes to the wire protocol which may require
implementations to update.
draft-15
- New negotiation syntax as discussed in Berlin (*)
- Require CertificateRequest.context to be empty during handshake
(*)
- Forbid empty tickets (*)
- Forbid application data messages in between post-handshake
messages from the same flight (*)
- Clean up alert guidance (*)
- Clearer guidance on what is needed for TLS 1.2.
- Guidance on 0-RTT time windows.
- Rename a bunch of fields.
- Remove old PRNG text.
- Explicitly require checking that handshake records not span key
changes.
draft-14 draft-14
- Allow cookies to be longer (*) - Allow cookies to be longer (*)
- Remove the "context" from EarlyDataIndication as it was undefined - Remove the "context" from EarlyDataIndication as it was undefined
and nobody used it (*) and nobody used it (*)
- Remove 0-RTT EncryptedExtensions and replace the ticket_age - Remove 0-RTT EncryptedExtensions and replace the ticket_age
extension with an obfuscated version. Also necessitates a change extension with an obfuscated version. Also necessitates a change
to NewSessionTicket (*). to NewSessionTicket (*).
- Move the downgrade sentinel to the end of ServerHello.Random to - Move the downgrade sentinel to the end of ServerHello.Random to
accomodate tlsdate (*). accomodate tlsdate (*).
skipping to change at page 6, line 48 skipping to change at page 7, line 34
- Clarify 0-RTT backward-compatibility rules. - Clarify 0-RTT backward-compatibility rules.
- Clarify how 0-RTT and PSK identities interact. - Clarify how 0-RTT and PSK identities interact.
- Add a section describing the data limits for each cipher. - Add a section describing the data limits for each cipher.
- Major editorial restructuring. - Major editorial restructuring.
- Replace the Security Analysis section with a WIP draft. - Replace the Security Analysis section with a WIP draft.
(*) indicates changes to the wire protocol which may require
implementations to update.
draft-13 draft-13
- Allow server to send SupportedGroups. - Allow server to send SupportedGroups.
- Remove 0-RTT client authentication - Remove 0-RTT client authentication
- Remove (EC)DHE 0-RTT. - Remove (EC)DHE 0-RTT.
- Flesh out 0-RTT PSK mode and shrink EarlyDataIndication - Flesh out 0-RTT PSK mode and shrink EarlyDataIndication
- Turn PSK-resumption response into an index to save room - Turn PSK-resumption response into an index to save room
skipping to change at page 9, line 5 skipping to change at page 9, line 38
- Change HKDF labeling to include protocol version and value - Change HKDF labeling to include protocol version and value
lengths. lengths.
- Shift the final decision to abort a handshake due to incompatible - Shift the final decision to abort a handshake due to incompatible
certificates to the client rather than having servers abort early. certificates to the client rather than having servers abort early.
- Deprecate SHA-1 with signatures. - Deprecate SHA-1 with signatures.
- Add MTI algorithms. - Add MTI algorithms.
draft-08
- Remove support for weak and lesser used named curves. - Remove support for weak and lesser used named curves.
- Remove support for MD5 and SHA-224 hashes with signatures. - Remove support for MD5 and SHA-224 hashes with signatures.
- Update lists of available AEAD cipher suites and error alerts. - Update lists of available AEAD cipher suites and error alerts.
- Reduce maximum permitted record expansion for AEAD from 2048 to - Reduce maximum permitted record expansion for AEAD from 2048 to
256 octets. 256 octets.
- Require digital signatures even when a previous configuration is - Require digital signatures even when a previous configuration is
skipping to change at page 10, line 48 skipping to change at page 11, line 30
- 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
This document defines several changes that optionally affect
implementations of TLS 1.2:
- A version downgrade protection mechanism is described in
Section 4.1.3.
- RSASSA-PSS signature schemes are defined in Section 4.2.2.
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
use. See the referenced sections for more details.
2. Protocol Overview 2. Protocol Overview
The cryptographic parameters of the session state are produced by the The cryptographic parameters of the session state are produced by the
TLS handshake protocol. When a TLS client and server first start TLS handshake protocol. When a TLS client and server first start
communicating, they agree on a protocol version, select cryptographic communicating, they agree on a protocol version, select cryptographic
algorithms, optionally authenticate each other, and establish shared algorithms, optionally authenticate each other, and establish shared
secret keying material. Once the handshake is complete, the peers secret keying material. Once the handshake is complete, the peers
use the established keys to protect application layer traffic. use the established keys to protect application layer traffic.
TLS supports three basic key exchange modes: TLS supports three basic key exchange modes:
- Diffie-Hellman (of both the finite field and elliptic curve - Diffie-Hellman (of both the finite field and elliptic curve
varieties). varieties).
- A pre-shared symmetric key (PSK) - A pre-shared symmetric key (PSK)
- A combination of a symmetric key and Diffie-Hellman - A combination of a symmetric key and Diffie-Hellman
Which mode is used depends on the negotiated cipher suite.
Conceptually, the handshake establishes three secrets which are used
to derive all the keys.
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*
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
skipping to change at page 13, line 6 skipping to change at page 13, line 17
encrypted. encrypted.
- Server Parameters: Establish other handshake parameters. (whether - Server Parameters: Establish other handshake parameters. (whether
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.1) message, which contains a random nonce (Section 4.1.2) message, which contains a random nonce
(ClientHello.random), its offered protocol version, cipher suite, and (ClientHello.random), its offered protocol version, a list of
extensions, and in general either one or more Diffie-Hellman key symmetric cipher/HKDF hash pairs, some set of Diffie-Hellman key
shares (in the "key_share" extension Section 4.2.4), one or more pre- shares (in the "key_share" extension Section 4.2.4), one or more pre-
shared key labels (in the "pre_shared_key" extension Section 4.2.5), shared key labels (in the "pre_shared_key" extension Section 4.2.5),
or both. 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 which indicates the negotiated connection its own ServerHello which indicates the negotiated connection
parameters. [Section 4.1.2]. The combination of the ClientHello and parameters. [Section 4.1.3]. The combination of the ClientHello and
the ServerHello determines the shared keys. If either a pure (EC)DHE the ServerHello determines the shared keys. If (EC)DHE key
or (EC)DHE-PSK cipher suite is in use, then the ServerHello will establishment is in use, then the ServerHello will contain a
contain a "key_share" extension with the server's ephemeral Diffie- "key_share" extension with the server's ephemeral Diffie-Hellman
Hellman share which MUST be in the same group as one of the client's share which MUST be in the same group as one of the client's shares.
shares. If a pure PSK or an (EC)DHE-PSK cipher suite is negotiated, If PSK key establishment is in use, then the ServerHello will contain
then the ServerHello will contain a "pre_shared_key" extension a "pre_shared_key" extension indicating which of the client's offered
indicating which of the client's offered PSKs was selected. PSKs was selected. Note that implementations can use (EC)DHE and PSK
together, in which case 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 which are not EncryptedExtensions. responses to any extensions which are not
required in order to determine the cryptographic parameters. required in order to determine the cryptographic parameters.
[Section 4.2.8] [Section 4.2.8]
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 will be omitted if client authentication is not desired. message will be omitted if client authentication is not desired.
Finally, the client and server exchange Authentication messages. TLS Finally, the client and server exchange Authentication messages. TLS
uses the same set of messages every time that authentication is uses the same set of messages every time that authentication is
needed. Specifically: needed. Specifically:
Certificate. the certificate of the endpoint. This message is Certificate. the certificate of the endpoint. This message is
omitted if the server is not authenticating with a certificate omitted if the server is not authenticating with a certificate.
(i.e., with PSK or (EC)DHE-PSK cipher suites). Note that if raw Note that if raw public keys [RFC7250] or the cached information
public keys [RFC7250] or the cached information extension extension [RFC7924] are in use, then this message will not contain
[I-D.ietf-tls-cached-info] are in use, then this message will not a certificate but rather some other value corresponding to the
contain a certificate but rather some other value corresponding to server's long-term key. [Section 4.3.1]
the server's long-term key. [Section 4.3.1]
CertificateVerify. a signature over the entire handshake using the CertificateVerify. a signature over the entire handshake using the
public key in the Certificate message. This message is omitted if public key in the Certificate message. This message is omitted if
the server is not authenticating via a certificate (i.e., with PSK the server is not authenticating via a certificate.
or (EC)DHE-PSK cipher suites). [Section 4.3.2] [Section 4.3.2]
Finished. a MAC (Message Authentication Code) over the entire Finished. a MAC (Message Authentication Code) over the entire
handshake. This message provides key confirmation, binds the handshake. This message provides key confirmation, binds the
endpoint's identity to the exchanged keys, and in PSK mode also endpoint's identity to the exchanged keys, and in PSK mode also
authenticates the handshake. [Section 4.3.3] authenticates the handshake. [Section 4.3.3]
Upon receiving the server's messages, the client responds with its Upon receiving the server's messages, the client responds with its
Authentication messages, namely Certificate and CertificateVerify (if Authentication messages, namely Certificate and CertificateVerify (if
requested), and Finished. requested), and Finished.
skipping to change at page 15, line 48 skipping to change at page 15, line 48
established in a previous session and then reused ("session established in a previous session and then reused ("session
resumption"). Once a handshake has completed, the server can send resumption"). Once a handshake has completed, the server can send
the client a PSK identity which corresponds to a key derived from the the client a PSK identity which corresponds to a key derived from the
initial handshake (See Section 4.4.1). The client can then use that initial handshake (See Section 4.4.1). The client can then use that
PSK identity in future handshakes to negotiate use of the PSK. If PSK identity in future handshakes to negotiate use of the PSK. If
the server accepts it, then the security context of the new the server accepts it, then the security context of the new
connection is tied to the original connection. In TLS 1.2 and below, connection is tied to the original connection. In TLS 1.2 and below,
this functionality was provided by "session IDs" and "session this functionality was provided by "session IDs" and "session
tickets" [RFC5077]. Both mechanisms are obsoleted in TLS 1.3. tickets" [RFC5077]. Both mechanisms are obsoleted in TLS 1.3.
PSK cipher suites can either use PSK in combination with an (EC)DHE PSKs can be used with (EC)DHE exchange in order to provide forward
exchange in order to provide forward secrecy in combination with secrecy in combination with shared keys, or can be used alone, at the
shared keys, or can use PSKs alone, at the cost of losing forward cost of losing forward secrecy.
secrecy.
Figure 3 shows a pair of handshakes in which the first establishes a Figure 3 shows a pair of handshakes in which the first establishes a
PSK and the second uses it: PSK and the second uses it:
Client Server Client Server
Initial Handshake: Initial Handshake:
ClientHello ClientHello
+ key_share --------> + key_share -------->
ServerHello ServerHello
skipping to change at page 16, line 46 skipping to change at page 16, line 46
<-------- [Application Data*] <-------- [Application Data*]
{Finished} --------> {Finished} -------->
[Application Data] <-------> [Application Data] [Application Data] <-------> [Application Data]
Figure 3: Message flow for resumption and PSK Figure 3: Message flow for resumption and PSK
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. When a client offers resumption Certificate or a CertificateVerify. When a client offers resumption
via PSK it SHOULD also supply a "key_share" extension to the server via PSK it SHOULD also supply a "key_share" extension to the server
as well to allow the server to decline resumption and fall back to a as well to allow the server to decline resumption and fall back to a
full handshake, if needed. A "key_share" extension MUST also be sent full handshake, if needed. The server responds with a
if the client is attempting to negotiate an (EC)DHE-PSK cipher suite. "pre_shared_key" extension to negotiate use of PSK key establishment
and can (as shown here) respond with a "key_share" extension to do
(EC)DHE key establishment, thus providing forward secrecy.
2.3. Zero-RTT Data 2.3. Zero-RTT Data
When resuming via a PSK with an appropriate ticket (i.e., one with When resuming via a PSK with an appropriate ticket (i.e., one with
the "allow_early_data" flag), clients can also send data on their the "allow_early_data" flag), clients can also send data on their
first flight ("early data"). This data is encrypted solely under first flight ("early data"). This data is encrypted solely under
keys derived using the first offered PSK as the static secret. As keys derived using the first offered PSK as the static secret. As
shown in Figure 4, the Zero-RTT data is just added to the 1-RTT shown in Figure 4, the Zero-RTT data is just added to the 1-RTT
handshake in the first flight. The rest of the handshake uses the handshake in the first flight. The rest of the handshake uses the
same messages. same messages.
skipping to change at page 18, line 9 skipping to change at page 18, line 9
[] Indicates messages protected using keys [] Indicates messages protected using keys
derived from traffic_secret_N derived from traffic_secret_N
Figure 4: Message flow for a zero round trip handshake Figure 4: Message flow for a zero round trip handshake
[[OPEN ISSUE: Should it be possible to combine 0-RTT with the server [[OPEN ISSUE: Should it be possible to combine 0-RTT with the server
authenticating via a signature https://github.com/tlswg/tls13-spec/ authenticating via a signature https://github.com/tlswg/tls13-spec/
issues/443]] issues/443]]
IMPORTANT NOTE: The security properties for 0-RTT data (regardless of IMPORTANT NOTE: The security properties for 0-RTT data are weaker
the cipher suite) are weaker than those for other kinds of TLS data. than those for other kinds of TLS data. Specifically:
Specifically:
1. This data is not forward secret, because it is encrypted solely 1. This data is not forward secret, because it is encrypted solely
with the PSK. with the PSK.
2. There are no guarantees of non-replay between connections. 2. There are no guarantees of non-replay between connections.
Unless the server takes special measures outside those provided Unless the server takes special measures outside those provided
by TLS, 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.6.2 for more details). This is especially relevant Section 4.2.6.2 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
skipping to change at page 25, line 5 skipping to change at page 25, line 5
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. Client Hello 4.1.1. Cryptographic Negotiation
TLS cryptographic negotiation proceeds by the client offering the
following four sets of options in its ClientHello.
- A list of cipher suites which indicates the AEAD cipher/HKDF hash
pairs which the client supports
- A "supported_group" (Section 4.2.3) extension which indicates the
(EC)DHE groups which the client supports and a "key_share"
(Section 4.2.4) extension which contains (EC)DHE shares for some
or all of these groups
- A "signature_algorithms" (Section 4.2.2) extension which indicates
the signature algorithms which the client can accept.
- A "pre_shared_key" (Section 4.2.5) extension which contains the
identities of symmetric keys known to the client and the key
exchange modes which each PSK supports.
If the server does not select a PSK, then the first three of these
options are entirely orthogonal: the server independently selects a
cipher suite, an (EC)DHE group and key share for key establishment,
and a signature algorithm/certificate pair to authenticate itself to
the client. If any of these parameters has no overlap between the
client and server parameters, then the handshake will fail. If there
is overlap in the "supported_group" extension but the client did not
offer a compatible "key_share" extension, then the server will
respond with a HelloRetryRequest (Section 4.1.4) message.
If the server selects a PSK, then the PSK will indicate which key
establishment modes it can be used with (PSK alone or with (EC)DHE)
and which authentication modes it can be used with (PSK alone or PSK
with signatures). The server can then select those key establishment
and authentication parameters to be consistent both with the PSK and
the other extensions supplied by the client. Note that if the PSK
can be used without (EC)DHE or without signatures, then non-overlap
in either of these parameters need not be fatal.
The server indicates its selected parameters in the ServerHello as
follows: If PSK is being used then the server will send a
"pre_shared_key" extension indicating the selected key. If PSK is
not being used, then (EC)DHE and certificate-based authentication are
always used. When (EC)DHE is in use, the server will also provide a
"key_share" extension. When authenticating via a certificate, the
server will send an empty "signature_algorithnms" extension in the
ServerHello and will subsequently send Certificate (Section 4.3.1)
and CertificateVerify (Section 4.3.2) messages.
If the server is unable to negotiate a supported set of parameters,
it MUST return a "handshake_failure" alert and close the connection.
4.1.2. Client Hello
When this message will be sent: When this message will be sent:
When a client first connects to a server, it is required to send When a client first connects to a server, it is required to send
the ClientHello as its first message. The client will also send a the ClientHello as its first message. The client will also send a
ClientHello when the server has responded to its ClientHello with ClientHello when the server has responded to its ClientHello with
a ServerHello that selects cryptographic parameters that don't a HelloRetryRequest that selects cryptographic parameters that
match the client's "key_share" extension. In that case, the don't match the client's "key_share" extension. In that case, the
client MUST send the same ClientHello (without modification) client MUST send the same ClientHello (without modification)
except: except:
- Including a new KeyShareEntry as the lowest priority share (i.e., - Including a new KeyShareEntry as the lowest priority share (i.e.,
appended to the list of shares in the "key_share" extension). appended to the list of shares in the "key_share" extension).
- Removing the EarlyDataIndication Section 4.2.6 extension if one - Removing the EarlyDataIndication Section 4.2.6 extension if one
was present. Early data is not permitted after HelloRetryRequest. was present. Early data is not permitted after HelloRetryRequest.
If a server receives a ClientHello at any other time, it MUST send a If a server receives a ClientHello at any other time, it MUST send a
fatal "unexpected_message" alert and close the connection. fatal "unexpected_message" alert and close the connection.
Structure of this message: Structure of this message:
struct { struct {
uint8 major; uint8 major;
uint8 minor; uint8 minor;
} ProtocolVersion; } ProtocolVersion;
struct { struct {
opaque random_bytes[32]; opaque random_bytes[32];
} Random; } Random;
uint8 CipherSuite[2]; /* Cryptographic suite selector */ uint8 CipherSuite[2]; /* Cryptographic suite selector */
struct { struct {
ProtocolVersion client_version = { 3, 4 }; /* TLS v1.3 */ ProtocolVersion max_supported_version = { 3, 4 }; /* TLS v1.3 */
Random random; Random random;
opaque legacy_session_id<0..32>; opaque legacy_session_id<0..32>;
CipherSuite cipher_suites<2..2^16-2>; CipherSuite cipher_suites<2..2^16-2>;
opaque legacy_compression_methods<1..2^8-1>; opaque legacy_compression_methods<1..2^8-1>;
Extension extensions<0..2^16-1>; Extension extensions<0..2^16-1>;
} ClientHello; } ClientHello;
TLS allows extensions to follow the compression_methods field in an TLS allows extensions to follow the compression_methods field in an
extensions block. The presence of extensions can be detected by extensions block. The presence of extensions can be detected by
determining whether there are bytes following the compression_methods determining whether there are bytes following the compression_methods
at the end of the ClientHello. Note that this method of detecting at the end of the ClientHello. Note that this method of detecting
optional data differs from the normal TLS method of having a optional data differs from the normal TLS method of having a
variable-length field, but it is used for compatibility with TLS variable-length field, but it is used for compatibility with TLS
before extensions were defined. As of TLS 1.3, all clients and before extensions were defined. As of TLS 1.3, all clients and
servers will send at least one extension (at least "key_share" or servers will send at least one extension (at least "key_share" or
"pre_shared_key"). "pre_shared_key").
client_version The latest (highest valued) version of the TLS max_supported_version The latest (highest valued) version of the TLS
protocol offered by the client. This SHOULD be the same as the protocol offered by the client. This SHOULD be the same as the
latest version supported. For this version of the specification, latest version supported. For this version of the specification,
the version will be { 3, 4 }. (See Appendix C for details about the version will be { 3, 4 }. (See Appendix C for details about
backward compatibility.) 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 B for additional information. Appendix B for additional information.
legacy_session_id Versions of TLS before TLS 1.3 supported a session legacy_session_id Versions of TLS before TLS 1.3 supported a session
resumption feature which has been merged with Pre-Shared Keys in resumption feature which has been merged with Pre-Shared Keys in
this version (see Section 2.2). This field MUST be ignored by a this version (see Section 2.2). This field MUST be ignored by a
server negotiating TLS 1.3 and SHOULD be set as a zero length server negotiating TLS 1.3 and SHOULD be set as a zero length
vector (i.e., a single zero byte length field) by clients which do 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. not have a cached session ID set by a pre-TLS 1.3 server.
cipher_suites This is a list of the cryptographic options supported cipher_suites This is a list of the symmetric cipher options
by the client, with the client's first preference first. Each supported by the client, specifically the record protection
cipher suite defines a key exchange algorithm, a 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. The server will select a cipher suite or, if no acceptable HKDF, in descending order of client preference. If the list
choices are presented, return a "handshake_failure" alert and contains cipher suites the server does not recognize, support, or
close the connection. If the list contains cipher suites the wish to use, the server MUST ignore those cipher suites, and
server does not recognize, support, or wish to use, the server process the remaining ones as usual. Values are defined in
MUST ignore those cipher suites, and process the remaining ones as Appendix A.4.
usual. Values are defined in Appendix A.4.
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 generate a fatal "illegal_parameter" alert. Note the server MUST generate a fatal "illegal_parameter" alert. Note
that TLS 1.3 servers might receive TLS 1.2 or prior ClientHellos that TLS 1.3 servers might receive TLS 1.2 or prior ClientHellos
which contain other compression methods and MUST follow the which contain other compression methods and MUST follow the
skipping to change at page 27, line 19 skipping to change at page 28, line 19
respond to any TLS 1.3 ClientHello without extensions with a fatal respond to any TLS 1.3 ClientHello without extensions with a fatal
"decode_error" alert. TLS 1.3 servers may receive TLS 1.2 "decode_error" alert. TLS 1.3 servers may receive TLS 1.2
ClientHello messages without extensions. If negotiating TLS 1.2, a ClientHello messages without extensions. If negotiating TLS 1.2, a
server MUST check that the amount of data in the message precisely server MUST check that the amount of data in the message precisely
matches one of these formats; if not, then it MUST send a fatal matches one of these formats; if not, then it MUST send a fatal
"decode_error" alert. "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.
4.1.2. Server Hello 4.1.3. Server Hello
When this message will be sent: When this message will be sent:
The server will send this message in response to a ClientHello The server will send this message in response to a ClientHello
message when it was able to find an acceptable set of algorithms message when it was able to find an acceptable set of algorithms
and the client's "key_share" extension was acceptable. If the and the client's "key_share" extension was acceptable. If it is
client proposed groups are not acceptable by the server, it will not able to find an acceptable set of parameters, the server will
respond with a "handshake_failure" fatal alert. respond with a "handshake_failure" fatal alert.
Structure of this message: Structure of this message:
struct { struct {
ProtocolVersion server_version; ProtocolVersion version;
Random random; Random random;
CipherSuite cipher_suite; CipherSuite cipher_suite;
Extension extensions<0..2^16-1>; Extension extensions<0..2^16-1>;
} ServerHello; } ServerHello;
server_version This field contains the version of TLS negotiated for version This field contains the version of TLS negotiated for this
this session. Servers MUST select the lower of the highest session. Servers MUST select the lower of the highest supported
supported server version and the version offered by the client in server version and the version offered by the client in the
the ClientHello. In particular, servers MUST accept ClientHello ClientHello. In particular, servers MUST accept ClientHello
messages with versions higher than those supported and negotiate messages with versions higher than those supported and negotiate
the highest mutually supported version. For this version of the the highest mutually supported version. For this version of the
specification, the version is { 3, 4 }. (See Appendix C for specification, the version is { 3, 4 }. (See Appendix C for
details about backward compatibility.) details about backward compatibility.)
random This structure is generated by the server and MUST be random 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. For resumed sessions, this list in ClientHello.cipher_suites.
field is the value from the state of the session being resumed.
[[TODO: interaction with PSK.]]
extensions A list of extensions. Note that only extensions offered extensions A list of extensions. Note that only extensions offered
by the client can appear in the server's list. In TLS 1.3, as by the client can appear in the server's list. In TLS 1.3, as
opposed to previous versions of TLS, the server's extensions are opposed to previous versions of TLS, the server's extensions are
split between the ServerHello and the EncryptedExtensions split between the ServerHello and the EncryptedExtensions
Section 4.2.8 message. The ServerHello MUST only include Section 4.2.8 message. The ServerHello MUST only include
extensions which are required to establish the cryptographic extensions which are required to establish the cryptographic
context. Currently the only such extensions are "key_share", context. Currently the only such extensions are "key_share",
"pre_shared_key", and "early_data". Clients MUST check the "pre_shared_key", and "early_data". Clients MUST check the
ServerHello for the presence of any forbidden extensions and if ServerHello for the presence of any forbidden extensions and if
any are found MUST terminate the handshake with a any are found MUST terminate the handshake with a
"illegal_parameter" alert. In prior versions of TLS, the "illegal_parameter" alert. In prior versions of TLS, the
extensions field could be omitted entirely if not needed, similar extensions field could be omitted entirely if not needed, similar
to ClientHello. As of TLS 1.3, all clients and servers will send to ClientHello. As of TLS 1.3, all clients and servers will send
at least one extension (at least "key_share" or "pre_shared_key"). at least one extension (at least "key_share" or "pre_shared_key").
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 server implementations which respond to a random value. TLS 1.3 server implementations which respond to a
ClientHello with a client_version indicating TLS 1.2 or below MUST ClientHello with a max_supported_version indicating TLS 1.2 or below
set the last eight bytes of their Random value to the bytes: MUST set the last eight bytes of their Random value to the bytes:
44 4F 57 4E 47 52 44 01 44 4F 57 4E 47 52 44 01
TLS 1.2 server implementations which respond to a ClientHello with a TLS 1.2 server implementations which respond to a ClientHello with a
client_version indicating TLS 1.1 or below SHOULD set the last eight max_supported_version indicating TLS 1.1 or below SHOULD set the last
bytes of their Random value to the bytes: 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 octets are not equal to either of these values. that the last eight octets are not equal to either of these values.
TLS 1.2 clients SHOULD also perform this check if the ServerHello TLS 1.2 clients SHOULD also perform this check if the ServerHello
indicates TLS 1.1 or below. If a match is found, the client MUST indicates TLS 1.1 or below. If a match is found, the client MUST
abort the handshake with a fatal "illegal_parameter" alert. This abort the handshake with a fatal "illegal_parameter" alert. This
mechanism provides limited protection against downgrade attacks over mechanism provides limited protection against downgrade attacks over
and above that provided by the Finished exchange: because the and above that provided by the Finished exchange: because the
ServerKeyExchange includes a signature over both random values, it is ServerKeyExchange includes a signature over both random values, it is
not possible for an active attacker to modify the randoms without not possible for an active attacker to modify the randoms without
detection as long as ephemeral ciphers are used. It does not provide detection as long as ephemeral ciphers are used. It does not provide
downgrade protection when static RSA is used. downgrade protection when static RSA is used.
Note: This is an update to TLS 1.2 so in practice many TLS 1.2 Note: This is an update to TLS 1.2 so in practice many TLS 1.2
clients and servers will not behave as specified above. clients and servers will not behave as specified above.
4.1.3. Hello Retry Request 4.1.4. Hello Retry Request
When this message will be sent: When this message will be sent:
Servers send this message in response to a ClientHello message if Servers send this message in response to a ClientHello message if
they were able to find an acceptable set of algorithms and groups they were able to find an acceptable set of algorithms and groups
that are mutually supported, but the client's KeyShare did not that are mutually supported, but the client's KeyShare did not
contain an acceptable offer. If it cannot find such a match, it contain an acceptable offer. If it cannot find such a match, it
will respond with a fatal "handshake_failure" alert. will respond with a fatal "handshake_failure" alert.
Structure of this message: Structure of this message:
struct { struct {
ProtocolVersion server_version; ProtocolVersion server_version;
CipherSuite cipher_suite;
NamedGroup selected_group; NamedGroup selected_group;
Extension extensions<0..2^16-1>; Extension extensions<0..2^16-1>;
} HelloRetryRequest; } HelloRetryRequest;
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.
The server_version, cipher_suite, and extensions fields have the same The version and extensions fields have the same meanings as their
meanings as their corresponding values in the ServerHello. [[NOTE: corresponding values in the ServerHello. The server SHOULD send only
cipher_suite may disappear. https://github.com/tlswg/tls13-spec/ the extensions necessary for the client to generate a correct
issues/528]] The server SHOULD send only the extensions necessary for ClientHello pair (currently no such extensions exist). As with
the client to generate a correct ClientHello pair (currently no such ServerHello, a HelloRetryRequest MUST NOT contain any extensions that
extensions exist). As with ServerHello, a HelloRetryRequest MUST NOT were not first offered by the client in its ClientHello.
contain any extensions that were not first offered by the client in
its ClientHello.
Upon receipt of a HelloRetryRequest, the client MUST first verify Upon receipt of a HelloRetryRequest, the client MUST first verify
that the selected_group field corresponds to a group which was that the selected_group field corresponds to a group which was
provided in the "supported_groups" extension in the original provided in the "supported_groups" extension in the original
ClientHello. It MUST then verify that the selected_group field does ClientHello. It MUST then verify that the selected_group field does
not correspond to a group which was provided in the "key_share" not correspond to a group which was provided in the "key_share"
extension in the original ClientHello. If either of these checks extension in the original ClientHello. If either of these checks
fails, then the client MUST abort the handshake with a fatal fails, then the client MUST abort the handshake with a fatal
"handshake_failure" alert. Clients SHOULD also abort with "illegal_parameter" alert. Clients SHOULD also abort with
"handshake_failure" in response to any second HelloRetryRequest which "unexpected_message" in response to any second HelloRetryRequest
was sent in the same connection (i.e., where the ClientHello was which was sent in the same connection (i.e., where the ClientHello
itself in response to a HelloRetryRequest). was itself in response to a HelloRetryRequest).
Otherwise, the client MUST send a ClientHello with an updated Otherwise, the client MUST send a ClientHello with an updated
KeyShare extension to the server. The client MUST append a new KeyShare extension to the server. The client MUST append a new
KeyShareEntry for the group indicated in the selected_group field to KeyShareEntry for the group indicated in the selected_group field to
the groups in its original KeyShare. the groups in its original KeyShare.
Upon re-sending the ClientHello and receiving the server's Upon re-sending the ClientHello and receiving the server's
ServerHello/KeyShare, the client MUST verify that the selected ServerHello/KeyShare, the client MUST verify that the selected
CipherSuite and NamedGroup match that supplied in the NamedGroup matches that supplied in the HelloRetryRequest and MUST
HelloRetryRequest. If either of these values differ, the client MUST abort the connection with a fatal "illegal_parameter" alert if it
abort the connection with a fatal "handshake_failure" alert. does not.
4.2. Hello Extensions 4.2. Hello Extensions
The extension format is: The extension format is:
struct { struct {
ExtensionType extension_type; ExtensionType extension_type;
opaque extension_data<0..2^16-1>; opaque extension_data<0..2^16-1>;
} Extension; } Extension;
skipping to change at page 32, line 29 skipping to change at page 33, line 24
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 echo
the value of the extension. Clients MUST NOT use cookies in the value of the extension. Clients MUST NOT use cookies in
subsequent connections. subsequent connections.
4.2.2. Signature Algorithms 4.2.2. Signature Algorithms
The client uses the "signature_algorithms" extension to indicate to The client uses the "signature_algorithms" extension to indicate to
the server which signature algorithms may be used in digital the server which signature algorithms may be used in digital
signatures. signatures. Clients which desire the server to authenticate via a
certificate MUST send this extension. If a server is authenticating
via a certificate and the client has not sent a
"signature_algorithms" extension then the server MUST close the
connection with a fatal "missing_extension" alert (see Section 8.2).
Clients which offer one or more cipher suites which use certificate Servers which are authenticating via a certificate MUST indicate so
authentication (i.e., any non-PSK cipher suite) MUST send the by sending the client an empty "signature_algorithms" extension.
"signature_algorithms" extension. If this extension is not provided
and no alternative cipher suite is available, the server MUST close
the connection with a fatal "missing_extension" alert. (see
Section 8.2)
The "extension_data" field of this extension contains a The "extension_data" field of this extension contains a
"supported_signature_algorithms" value: "supported_signature_algorithms" value:
enum { enum {
/* RSASSA-PKCS1-v1_5 algorithms */ /* RSASSA-PKCS1-v1_5 algorithms */
rsa_pkcs1_sha1 (0x0201), rsa_pkcs1_sha1 (0x0201),
rsa_pkcs1_sha256 (0x0401), rsa_pkcs1_sha256 (0x0401),
rsa_pkcs1_sha384 (0x0501), rsa_pkcs1_sha384 (0x0501),
rsa_pkcs1_sha512 (0x0601), rsa_pkcs1_sha512 (0x0601),
skipping to change at page 34, line 16 skipping to change at page 35, line 16
[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 MGF1. The digest used in the mask generation PSS [RFC3447] with MGF1. The digest used in the mask generation
function and the digest being signed are both the corresponding function and the digest being signed are both the corresponding
hash algorithm as defined in [SHS]. When used in signed TLS hash algorithm as defined in [SHS]. When used in signed TLS
handshake messages, the length of the salt MUST be equal to the handshake messages, the length of the salt MUST be equal to the
length of the digest output. length of the digest output. This codepoint is defined for use
with TLS 1.2 as well as TLS 1.3. A server uses RSASSA-PSS
signatures with RSA cipher suites.
EdDSA algorithms Indicates a signature algorithm using EdDSA as EdDSA algorithms Indicates a signature algorithm using EdDSA as
defined in [I-D.irtf-cfrg-eddsa] or its successors. Note that defined in [I-D.irtf-cfrg-eddsa] or its successors. Note that
these correspond to the "PureEdDSA" algorithms and not the these correspond to the "PureEdDSA" algorithms and not the
"prehash" variants. "prehash" variants. A server uses EdDSA signatures with ECDSA
cipher suites.
The semantics of this extension are somewhat complicated because the
cipher suite adds additional constraints on signature algorithms.
Section 4.3.1.1 describes the appropriate rules.
rsa_pkcs1_sha1, dsa_sha1, and ecdsa_sha1 SHOULD NOT be offered. rsa_pkcs1_sha1, dsa_sha1, and ecdsa_sha1 SHOULD NOT be offered.
Clients offering these values for backwards compatibility MUST list Clients offering these values for backwards compatibility MUST list
them as the lowest priority (listed after all other algorithms in the them as the lowest priority (listed after all other algorithms in the
supported_signature_algorithms vector). TLS 1.3 servers MUST NOT supported_signature_algorithms vector). TLS 1.3 servers MUST NOT
offer a SHA-1 signed certificate unless no valid certificate chain offer a SHA-1 signed certificate unless no valid certificate chain
can be produced without it (see Section 4.3.1.1). can be produced without it (see Section 4.3.1.1).
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] and SHA-224 MUST NOT
be used. be used.
- ecdsa_secp256r1_sha256, etc., align with TLS 1.2's ECDSA hash/ - ECDSA signature schemes align with TLS 1.2's ECDSA hash/signature
signature pairs. However, the old semantics did not constrain the pairs. However, the old semantics did not constrain the signing
signing curve. curve. If TLS 1.2 is negotiated, implementations MUST be prepared
to accept a signature that uses any curve that they advertised in
the "supported_groups" extension.
- Implementations that advertise support for RSASSA-PSS (which is
mandatory in TLS 1.3), MUST be prepared to accept a signature
using that scheme even when TLS 1.2 is negotiated.
4.2.3. Negotiated Groups 4.2.3. Negotiated Groups
When sent by the client, the "supported_groups" extension indicates When sent by the client, the "supported_groups" extension indicates
the named groups which the client supports 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 [I-D.ietf-tls-negotiated-ff-dhe]. This extension was [RFC4492] and [I-D.ietf-tls-negotiated-ff-dhe]. This extension was
also used to negotiate ECDSA curves. Signature algorithms are now also used to negotiate ECDSA curves. Signature algorithms are now
negotiated independently (see Section 4.2.2). negotiated independently (see Section 4.2.2).
Clients which offer one or more (EC)DHE cipher suites MUST send at
least one supported NamedGroup value and servers MUST NOT negotiate
any of these cipher suites unless a supported value was provided. If
this extension is not provided and no alternative cipher suite is
available, the server MUST close the connection with a fatal
"missing_extension" alert. (see Section 8.2) If the extension is
provided, but no compatible group is offered, the server MUST NOT
negotiate a cipher suite of the relevant type. For instance, if a
client supplies only ECDHE groups, the server MUST NOT negotiate
finite field Diffie-Hellman. If no acceptable group can be selected
across all cipher suites, then the server MUST generate a fatal
"handshake_failure" alert.
The "extension_data" field of this extension contains a The "extension_data" field of this extension contains a
"NamedGroupList" value: "NamedGroupList" value:
enum { enum {
/* Elliptic Curve Groups (ECDHE) */ /* Elliptic Curve Groups (ECDHE) */
secp256r1 (23), secp384r1 (24), secp521r1 (25), secp256r1 (23), secp384r1 (24), secp521r1 (25),
x25519 (29), x448 (30), x25519 (29), x448 (30),
/* Finite Field Groups (DHE) */ /* Finite Field Groups (DHE) */
ffdhe2048 (256), ffdhe3072 (257), ffdhe4096 (258), ffdhe2048 (256), ffdhe3072 (257), ffdhe4096 (258),
skipping to change at page 36, line 50 skipping to change at page 37, line 31
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. Clients MUST NOT act upon any information view of its preferences. Clients MUST NOT act upon any information
found in "supported_groups" prior to successful completion of the found in "supported_groups" prior to successful completion of the
handshake, but MAY use the information learned from a successfully handshake, but MAY use the information learned from a successfully
completed handshake to change what groups they offer to a server in completed handshake to change what groups they offer to a server in
subsequent connections. subsequent connections.
4.2.4. Key Share 4.2.4. Key Share
The "key_share" extension contains the endpoint's cryptographic The "key_share" extension contains the endpoint's cryptographic
parameters for non-PSK key establishment methods (currently DHE or parameters.
ECDHE).
Clients which offer one or more (EC)DHE cipher suites MUST send this Clients MAY send an empty client_shares vector in order to request
extension and SHOULD send at least one supported KeyShareEntry value. group selection from the server at the cost of an additional round
Servers MUST NOT negotiate any of these cipher suites unless a trip. (see Section 4.1.4)
supported value was provided. If this extension is not provided in a
ServerHello or ClientHello, and the peer is offering (EC)DHE cipher
suites, then the endpoint MUST close the connection with a fatal
"missing_extension" alert. (see Section 8.2) Clients MAY send an
empty client_shares vector in order to request group selection from
the server at the cost of an additional round trip. (see
Section 4.1.3)
struct { struct {
NamedGroup group; NamedGroup group;
opaque key_exchange<1..2^16-1>; opaque key_exchange<1..2^16-1>;
} KeyShareEntry; } KeyShareEntry;
group 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.4.1; Diffie-Hellman [DH] parameters are described in Section 4.2.4.1;
Elliptic Curve Diffie-Hellman parameters are described in Elliptic Curve Diffie-Hellman parameters are described in
Section 4.2.4.2. Section 4.2.4.2.
skipping to change at page 37, line 50 skipping to change at page 38, line 24
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. The ordering of values client is requesting a HelloRetryRequest. The ordering of values
here SHOULD match that of the ordering of offered support in the here SHOULD match that of the ordering of offered support in the
"supported_groups" extension. "supported_groups" extension.
server_share A single KeyShareEntry value for the negotiated cipher server_share A single KeyShareEntry value that is in the same group
suite. 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
FFDHE groups. The key_exchange values for each KeyShareEntry MUST by FFDHE groups. The key_exchange values for each KeyShareEntry MUST by
generated independently. Clients MUST NOT offer multiple generated independently. Clients MUST NOT offer multiple
KeyShareEntry values for the same group. Clients and MUST NOT offer KeyShareEntry values for the same group. Clients MUST NOT offer any
any KeyShareEntry values for groups not listed in the client's KeyShareEntry values for groups not listed in the client's
"supported_groups" extension. "supported_groups" extension. Servers MAY check for violations of
these rules and and MAY abort the connection with a fatal
Servers offer exactly one KeyShareEntry value, which corresponds to "illegal_parameter" alert if one is violated.
the key exchange used for the negotiated cipher suite. Servers MUST
NOT offer a KeyShareEntry value for a group not offered by the client
in its corresponding KeyShare or "supported_groups" extension.
Implementations MAY check for violations of these rules and and MAY
abort the connection with a fatal "illegal_parameter" alert if one is
violated.
If the server selects an (EC)DHE cipher suite and no mutually If using (EC)DHE key establishment, servers offer exactly one
supported group is available between the two endpoints' KeyShare KeyShareEntry. This value MUST correspond to the KeyShareEntry value
offers, yet there is a mutually supported group that can be found via offered by the client that the server has selected for the negotiated
the "supported_groups" extension, then the server MUST reply with a key exchange. Servers MUST NOT send a KeyShareEntry for any group
HelloRetryRequest. If there is no mutually supported group at all, not indicated in the "supported_groups" extension.
the server MUST NOT negotiate an (EC)DHE cipher suite.
[[TODO: Recommendation about what the client offers. Presumably [[TODO: Recommendation about what the client offers. Presumably
which integer DH groups and which curves.]] which integer DH groups and which curves.]]
4.2.4.1. Diffie-Hellman Parameters 4.2.4.1. Diffie-Hellman Parameters
Diffie-Hellman [DH] parameters for both clients and servers are Diffie-Hellman [DH] parameters for both clients and servers are
encoded in the opaque key_exchange field of a KeyShareEntry in a encoded in the opaque key_exchange field of a KeyShareEntry in a
KeyShare structure. The opaque value contains the Diffie-Hellman KeyShare structure. The opaque value contains the Diffie-Hellman
public value (Y = g^X mod p), encoded as a big-endian integer, padded public value (Y = g^X mod p), encoded as a big-endian integer, padded
skipping to change at page 39, line 26 skipping to change at page 39, line 40
for x25519 and 56 bytes for x448. for x25519 and 56 bytes for x448.
Note: Versions of TLS prior to 1.3 permitted point negotiation; TLS Note: Versions of TLS prior to 1.3 permitted point negotiation; TLS
1.3 removes this feature in favor of a single point format for each 1.3 removes this feature in favor of a single point format for each
curve. curve.
4.2.5. Pre-Shared Key Extension 4.2.5. Pre-Shared Key Extension
The "pre_shared_key" extension is used to indicate the identity of The "pre_shared_key" extension is used to indicate the identity of
the pre-shared key to be used with a given handshake in association the pre-shared key to be used with a given handshake in association
with a PSK or (EC)DHE-PSK cipher suite (see [RFC4279] for with PSK key establishment (see [RFC4279] for background).
background).
Clients which offer one or more PSK cipher suites MUST send at least
one supported psk_identity value and servers MUST NOT negotiate any
of these cipher suites unless a supported value was provided. If
this extension is not provided and no alternative cipher suite is
available, the server MUST close the connection with a fatal
"missing_extension" alert. (see Section 8.2)
The "extension_data" field of this extension contains a The "extension_data" field of this extension contains a
"PreSharedKeyExtension" value: "PreSharedKeyExtension" value:
opaque psk_identity<0..2^16-1>; enum { psk_ke(0), psk_dhe_ke(1), (255) } PskKeyExchangeModes;
enum { psk_auth(0), psk_sign_auth(1), (255) } PskAuthenticationModes;
struct { opaque psk_identity<0..2^16-1>;
select (Role) {
case client:
psk_identity identities<2..2^16-1>;
case server: struct {
uint16 selected_identity; PskKeMode ke_modes<1..255>;
} PskAuthMode auth_modes<1..255>;
} PreSharedKeyExtension; opaque identity<0..2^16-1>;
} PskIdentity;
struct {
select (Role) {
case client:
psk_identity identities<2..2^16-1>;
case server:
uint16 selected_identity;
}
} PreSharedKeyExtension;
identities A list of the identities (labels for keys) that the identities A list of the identities (labels for keys) that the
client is willing to negotiate with the server. If sent alongside client is willing to negotiate with the server. If sent alongside
the "early_data" extension (see Section 4.2.6), the first identity the "early_data" extension (see Section 4.2.6), the first identity
is the one used for 0-RTT data. is the one used for 0-RTT data.
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 identies in the client's list. (0-based) index into the identies in the client's list.
If no suitable identity is provided, the server MUST NOT negotiate a Each PSK offered by the client also indicates the authentication and
PSK cipher suite and MAY respond with an "unknown_psk_identity" alert key exchange modes with which the server can use it, with each list
message. Sending this alert is OPTIONAL; servers MAY instead choose being in the order of the client's preference, with most preferred
to send a "decrypt_error" alert to merely indicate an invalid PSK first.
identity or instead negotiate use of a non-PSK cipher suite, if
available.
If the server selects a PSK cipher suite, it MUST send a PskKeyExchangeModes have the following meanings:
"pre_shared_key" extension with the identity that it selected. The
client MUST verify that the server's selected_identity is within the psk_ke PSK-only key establishment. In this mode, the server MUST
range supplied by the client. If the server supplies an "early_data" not supply a "key_share" value.
extension, the client MUST verify that the server selected the first
offered identity. If any other value is returned, the client MUST psk_dhe_ke PSK key establishment with (EC)DHE key establishment. In
generate a fatal "unknown_psk_identity" alert and close the this mode, the client and servers MUST supply "key_share" values
as described in Section 4.2.4.
PskAuthenticationModes have the following meanings:
psk_auth PSK-only authentication. In this mode, the server MUST NOT
supply either a Certificate or CertificateVerify message. [TODO:
Add a signing mode.]
In order to accept PSK key establishment, the server sends a
"pre_shared_key" extension with the selected identity. Clients MUST
verify that the server's selected_identity is within the range
supplied by the client and that the "key_share" and
"signature_algorithms" extensions are consistent with the indicated
ke_modes and auth_modes values. If these values are not consistent,
the client MUST generate an "illegal_parameter" alert and close the
connection. connection.
If the server supplies an "early_data" extension, the client MUST
verify that the server selected the first offered identity. If any
other value is returned, the client MUST generate a fatal
"unknown_psk_identity" alert and close the connection.
Note that although 0-RTT data is encrypted with the first PSK Note that although 0-RTT data is encrypted with the first PSK
identity, the server MAY fall back to 1-RTT and select a different identity, the server MAY fall back to 1-RTT and select a different
PSK identity if multiple identities are offered. PSK identity if multiple identities are offered.
4.2.6. Early Data Indication 4.2.6. Early Data Indication
When PSK resumption is used, the client can send application data in When PSK resumption is used, the client can send application data in
its first flight of messages. If the client opts to do so, it MUST its first flight of messages. If the client opts to do so, it MUST
supply an "early_data" extension as well as the "pre_shared_key" supply an "early_data" extension as well as the "pre_shared_key"
extension. extension.
skipping to change at page 41, line 46 skipping to change at page 42, line 40
- Return an empty extension, indicating that it intends to process - Return an empty extension, indicating that it intends to process
the early data. It is not possible for the server to accept only the early data. It is not possible for the server to accept only
a subset of the early data messages. a subset of the early data messages.
In order to accept early data, the server server MUST have accepted a In order to accept early data, the server server MUST have accepted a
PSK cipher suite and selected the the first key offered in the PSK cipher suite and selected the the first key offered in the
client's "pre_shared_key" extension. In addition, it MUST verify client's "pre_shared_key" extension. In addition, it MUST verify
that the following values are consistent with those negotiated in the that 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, symmetric ciphersuite, and the hash for - The TLS version number, AEAD algorithm, and the hash for HKDF.
HKDF.
- The selected ALPN [RFC7443] value, if any. - The selected ALPN [RFC7443] value, if any.
- The server_name [RFC6066] value provided by the client, if any. - The server_name [RFC6066] value provided by the client, 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 remaining first flight data (thus
falling back to 1-RTT). If the client attempts a 0-RTT handshake but falling back to 1-RTT). If the client attempts a 0-RTT handshake but
skipping to change at page 43, line 35 skipping to change at page 44, line 26
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 measurement of time difficult. Variations in client and server
clocks are likely to be minimal, outside of gross time corrections. clocks are likely to be minimal, outside of gross time corrections.
Network propagation delays are most likely causes of a mismatch in Network propagation delays are most likely causes of a mismatch in
legitimate values for elapsed time. Both the NewSessionTicket and legitimate values for elapsed time. Both the NewSessionTicket and
ClientHello messages might be retransmitted and therefore delayed, ClientHello messages might be retransmitted and therefore delayed,
which might be hidden by TCP. which might be hidden by TCP.
A small allowance for errors in clocks and variations in measurements A small allowance for errors in clocks and variations in measurements
is advisable. However, any allowance also increases the opportunity is advisable. However, any allowance also increases the opportunity
for replay. In this case, it is better to reject early data than to for replay. In this case, it is better to reject early data and fall
risk greater exposure to replay attacks. back to a full 1-RTT handshake than to risk greater exposure to
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
involve an asymmetric replay window.
4.2.7. OCSP Status Extensions 4.2.7. OCSP Status 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 sends an empty extension to indicate negotiation of this server sends an empty extension to indicate negotiation of this
extension and the OCSP information is carried in a CertificateStatus extension and the OCSP information is carried in a CertificateStatus
message. In TLS 1.3, the server's OCSP information is carried in an message. In TLS 1.3, the server's OCSP information is carried in an
extension in EncryptedExtensions. Specifically: The body of the extension in EncryptedExtensions. Specifically: The body of the
"status_request" or "status_request_v2" extension from the server "status_request" or "status_request_v2" extension from the server
skipping to change at page 44, line 26 skipping to change at page 45, line 24
Meaning of this message: Meaning of this message:
The EncryptedExtensions message contains any extensions which The EncryptedExtensions message contains any extensions which
should be protected, i.e., any which are not needed to establish should be protected, i.e., any which are not needed to establish
the cryptographic context. the cryptographic context.
The same extension types MUST NOT appear in both the ServerHello and The same extension types MUST NOT appear in both the ServerHello and
EncryptedExtensions. If the same extension appears in both EncryptedExtensions. If the same extension appears in both
locations, the client MUST rely only on the value in the locations, the client MUST rely only on the value in the
EncryptedExtensions block. All server-sent extensions other than EncryptedExtensions block. All server-sent extensions other than
those explicitly listed in Section 4.1.2 or designated in the IANA those explicitly listed in Section 4.1.3 or designated in the IANA
registry MUST only appear in EncryptedExtensions. Extensions which registry MUST only appear in EncryptedExtensions. Extensions which
are designated to appear in ServerHello MUST NOT appear in are designated to appear in ServerHello MUST NOT appear in
EncryptedExtensions. Clients MUST check EncryptedExtensions for the EncryptedExtensions. Clients MUST check EncryptedExtensions for the
presence of any forbidden extensions and if any are found MUST presence of any forbidden extensions and if any are found MUST
terminate the handshake with an "illegal_parameter" alert. terminate 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>;
} EncryptedExtensions; } EncryptedExtensions;
extensions A list of extensions. extensions A list of extensions.
4.2.9. Certificate Request 4.2.9. Certificate Request
When this message will be sent: When this message will be sent:
A non-anonymous server can optionally request a certificate from A server which is authenticating with a certificate can optionally
the client, if appropriate for the selected cipher suite. This request a certificate from the client. This message, if sent,
message, if sent, will follow EncryptedExtensions. will follow EncryptedExtensions.
Structure of this message: Structure of this message:
opaque DistinguishedName<1..2^16-1>; opaque DistinguishedName<1..2^16-1>;
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>;
} CertificateExtension; } CertificateExtension;
skipping to change at page 45, line 24 skipping to change at page 46, line 24
SignatureScheme SignatureScheme
supported_signature_algorithms<2..2^16-2>; supported_signature_algorithms<2..2^16-2>;
DistinguishedName certificate_authorities<0..2^16-1>; DistinguishedName certificate_authorities<0..2^16-1>;
CertificateExtension certificate_extensions<0..2^16-1>; CertificateExtension certificate_extensions<0..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). of client CertificateVerify messages). Within the handshake, this
field MUST be empty.
supported_signature_algorithms A list of the signature algorithms supported_signature_algorithms A list of the signature algorithms
that the server is able to verify, listed in descending order of that the server is able to verify, listed in descending order of
preference. Any certificates provided by the client MUST be preference. Any certificates provided by the client MUST be
signed using a signature algorithm found in signed using a signature algorithm found in
supported_signature_algorithms. supported_signature_algorithms.
certificate_authorities A list of the distinguished names [X501] of certificate_authorities A list of the distinguished names [X501] of
acceptable certificate_authorities, represented in DER-encoded acceptable certificate_authorities, represented in DER-encoded
[X690] format. These distinguished names may specify a desired [X690] format. These distinguished names may specify a desired
skipping to change at page 46, line 29 skipping to change at page 47, line 30
o The Extended Key Usage extension in a certificate matches the o The Extended Key Usage extension in a certificate matches the
request when all key purpose OIDs present in the request are request when all key purpose OIDs present in the request are
also found in the Extended Key Usage certificate extension. also found in the Extended Key Usage certificate extension.
The special anyExtendedKeyUsage OID MUST NOT be used in the The special anyExtendedKeyUsage OID MUST NOT be used in the
request. request.
Separate specifications may define matching rules for other Separate specifications may define matching rules for other
certificate extensions. certificate extensions.
Note: It is a fatal "handshake_failure" alert for an anonymous server Note: It is a fatal "unexpected_message" alert for an anonymous
to request client authentication. server to request client authentication.
4.3. Authentication Messages 4.3. Authentication Messages
As discussed in Section 2, TLS uses a common set of messages for As discussed in Section 2, TLS uses a common set of messages for
authentication, key confirmation, and handshake integrity: authentication, key confirmation, and handshake integrity:
Certificate, CertificateVerify, and Finished. These messages are Certificate, CertificateVerify, and Finished. These messages are
always sent as the last messages in their handshake flight. The always sent as the last messages in their handshake flight. The
Certificate and CertificateVerify messages are only sent under Certificate and CertificateVerify messages are only sent under
certain circumstances, as defined below. The Finished message is certain circumstances, as defined below. The Finished message is
always sent as part of the Authentication block. always sent as part of the Authentication block.
skipping to change at page 48, line 21 skipping to change at page 49, line 25
has requested client authentication via a CertificateRequest has requested client authentication via a CertificateRequest
message (Section 4.2.9). If the server requests client message (Section 4.2.9). If the server requests client
authentication but no suitable certificate is available, the authentication but no suitable certificate is available, the
client MUST send a Certificate message containing no certificates client MUST send a Certificate message containing no certificates
(i.e., with the "certificate_list" field having length 0). (i.e., with the "certificate_list" field having length 0).
Meaning of this message: Meaning of this message:
This message conveys the endpoint's certificate chain to the peer. This message conveys the endpoint's certificate chain to the peer.
The certificate MUST be appropriate for the negotiated cipher
suite's authentication algorithm and any negotiated extensions.
Structure of this message: Structure of this message:
opaque ASN1Cert<1..2^24-1>; opaque ASN1Cert<1..2^24-1>;
struct { struct {
opaque certificate_request_context<0..2^8-1>; opaque certificate_request_context<0..2^8-1>;
ASN1Cert certificate_list<0..2^24-1>; ASN1Cert certificate_list<0..2^24-1>;
} Certificate; } Certificate;
certificate_request_context If this message is in response to a certificate_request_context If this message is in response to a
skipping to change at page 50, line 9 skipping to change at page 51, line 9
algorithm only if the "signature_algorithms" extension provided by algorithm only if the "signature_algorithms" extension provided by
the client permits it. If the client cannot construct an acceptable the client permits it. If the client cannot construct an acceptable
chain using the provided certificates and decides to abort the chain using the provided certificates and decides to abort the
handshake, then it MUST send an "unsupported_certificate" alert handshake, then it MUST send an "unsupported_certificate" alert
message and close the connection. message and close the connection.
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).
As cipher suites that specify new key exchange methods are specified
for the TLS protocol, they will imply the certificate format and the
required encoded keying information.
4.3.1.2. Client Certificate Selection 4.3.1.2. Client Certificate Selection
The following rules apply to certificates sent by the client: The following rules apply to certificates sent by the client:
In particular: In particular:
- 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., [RFC5081]).
- If the certificate_authorities list in the certificate request - If the certificate_authorities list in the certificate request
skipping to change at page 51, line 31 skipping to change at page 52, line 28
hash MUST send a fatal "bad_certificate" alert message before closing hash MUST send a fatal "bad_certificate" alert message before closing
the connection. the connection.
4.3.2. Certificate Verify 4.3.2. Certificate Verify
When this message will be sent: When this message will be sent:
This message is used to provide explicit proof that an endpoint This message is used to provide explicit proof that an endpoint
possesses the private key corresponding to its certificate and possesses the private key corresponding to its certificate and
also provides integrity for the handshake up to this point. also provides integrity for the handshake up to this point.
Servers MUST send this message when using a cipher suite which is Servers MUST send this message when authenticating via a
authenticated via a certificate. Clients MUST send this message certificate. Clients MUST send this message whenever
whenever authenticating via a Certificate (i.e., when the authenticating via a Certificate (i.e., when the Certificate
Certificate message is non-empty). When sent, this message MUST message is non-empty). When sent, this message MUST appear
appear immediately after the Certificate Message and immediately immediately after the Certificate Message and immediately prior to
prior to the Finished message. the Finished message.
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.2 for the definition of this field). The signature is a Section 4.2.2 for the definition of this field). The signature is a
skipping to change at page 52, line 49 skipping to change at page 53, line 44
2020202020202020202020202020202020202020202020202020202020202020 2020202020202020202020202020202020202020202020202020202020202020
544c5320312e332c207365727665722043657274696669636174655665726966 544c5320312e332c207365727665722043657274696669636174655665726966
79 79
00 00
0101010101010101010101010101010101010101010101010101010101010101 0101010101010101010101010101010101010101010101010101010101010101
0202020202020202020202020202020202020202020202020202020202020202 0202020202020202020202020202020202020202020202020202020202020202
If sent by a server, the signature algorithm MUST be one offered in If sent by a server, the signature algorithm MUST be one offered in
the client's "signature_algorithms" extension unless no valid the client's "signature_algorithms" extension unless no valid
certificate chain can be produced without unsupported algorithms (see certificate chain can be produced without unsupported algorithms (see
Section 4.2.2). Note that there is a possibility for inconsistencies Section 4.2.2).
here. For instance, the client might offer an ECDHE_ECDSA cipher
suite but omit any ECDSA and EdDSA values from its
"signature_algorithms" extension. In order to negotiate correctly,
the server MUST check any candidate cipher suites against the
"signature_algorithms" extension before selecting them. This is
somewhat inelegant but is a compromise designed to minimize changes
to the original cipher suite design.
If sent by a client, the signature algorithm used in the signature If sent by a client, the signature algorithm used in the signature
MUST be one of those present in the supported_signature_algorithms MUST be one of those present in the supported_signature_algorithms
field of the CertificateRequest message. field of 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
skipping to change at page 54, line 41 skipping to change at page 55, line 33
noted above, the HMAC input can generally be implemented by a running noted above, the HMAC input can generally be implemented by a running
hash, i.e., just the handshake hash at this point. hash, i.e., just the handshake hash at this point.
In previous versions of TLS, the verify_data was always 12 octets In previous versions of TLS, the verify_data was always 12 octets
long. In the current version of TLS, it is the size of the HMAC long. In the current version of TLS, it is the size of the HMAC
output for the Hash used for the handshake. output for the Hash used for the handshake.
Note: Alerts and any other record types are not handshake messages Note: Alerts and any other record types are not handshake messages
and are not included in the hash computations. and are not included in the hash computations.
Any records following a 1-RTT Finished message MUST be encrypted
under the application traffic key. In particular, this includes any
alerts sent by the server in response to client Certificate and
CertificateVerify messages.
4.4. Post-Handshake Messages 4.4. 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 application traffic key. the application traffic key.
Handshake messages sent after the handshake MUST NOT be interleaved
with other record types. That is, if a message is split over two or
more handshake records, there MUST NOT be any other records between
them.
4.4.1. New Session Ticket Message 4.4.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 following two values derived from the resumption master secret: the following two values derived from the resumption master secret:
resumption_psk = HKDF-Expand-Label( resumption_psk = HKDF-Expand-Label(
resumption_secret, resumption_secret,
"resumption psk", "", Hash.Length) "resumption psk", "", Hash.Length)
resumption_context = HKDF-Expand-Label( resumption_context = HKDF-Expand-Label(
resumption_secret, resumption_secret,
"resumption context", "", Hash.Length) "resumption context", "", Hash.Length)
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.5) and supplying a suitable PSK cipher suite. Servers (Section 4.2.5). Servers MAY send multiple tickets on a single
may send multiple tickets on a single connection, for instance after connection, either immediately after each other or after specific
post-handshake authentication. For handshakes that do not use a events. For instance, the server might send a new ticket after post-
resumption_psk, the resumption_context is a string of Hash.Length handshake authentication in order to encapsulate the additional
zeroes. client authentication state. Clients SHOULD attempt to use each
ticket no more than once, with more recent tickets being used first.
For handshakes that do not use a resumption_psk, the
resumption_context is a string of Hash.Length zeroes. [[Note: this
will not be safe if/when we add additional server signatures with
PSK: OPEN ISSUE https://github.com/tlswg/tls13-spec/issues/558]]
Any ticket MUST only be resumed with a cipher suite that is identical
to that negotiated connection where the ticket was established.
enum { (65535) } TicketExtensionType; enum { (65535) } TicketExtensionType;
struct { struct {
TicketExtensionType extension_type; TicketExtensionType extension_type;
opaque extension_data<1..2^16-1>; opaque extension_data<1..2^16-1>;
} TicketExtension; } TicketExtension;
enum {
allow_early_data(1),
allow_dhe_resumption(2),
allow_psk_resumption(4)
} TicketFlags;
struct { struct {
uint32 ticket_lifetime; uint32 ticket_lifetime;
uint32 flags; PskKeMode ke_modes<1..255>;
uint32 ticket_age_add; PskAuthMode auth_modes<1..255>;
TicketExtension extensions<2..2^16-2>; opaque ticket<1..2^16-1>;
opaque ticket<0..2^16-1>; TicketExtension extensions<0..2^16-2>;
} NewSessionTicket; } NewSessionTicket;
flags A 32-bit value indicating the ways in which this ticket may be ke_modes The key exchange modes with which this ticket can be used
used (as a bitwise OR of the flags values). in descending order of server preference.
auth_modes The authentication modes with which this ticket can be
used in descending order of server preference.
ticket_lifetime Indicates the lifetime in seconds as a 32-bit ticket_lifetime Indicates the lifetime in seconds as a 32-bit
unsigned integer in network byte order from the time of ticket unsigned integer in network byte order from the time of ticket
issuance. Servers MUST NOT use any value more than 604800 seconds issuance. Servers MUST NOT use any value more than 604800 seconds
(7 days). The value of zero indicates that the ticket should be (7 days). The value of zero indicates that the ticket should be
discarded immediately. Clients MUST NOT cache session tickets for discarded immediately. Clients MUST NOT cache session tickets for
longer than 7 days, regardless of the ticket_lifetime. It MAY longer than 7 days, regardless of the ticket_lifetime. It MAY
delete the ticket earlier based on local policy. A server MAY delete the ticket earlier based on local policy. A server MAY
treat a ticket as valid for a shorter period of time than what is treat a ticket as valid for a shorter period of time than what is
stated in the ticket_lifetime. stated in the ticket_lifetime.
ticket_age_add A randomly generated 32-bit value that is used to
obscure the age of the ticket that the client includes in the
"early_data" extension. The actual ticket age is added to this
value modulo 2^32 to obtain the value that is transmitted by the
client.
ticket_extensions A placeholder for extensions in the ticket.
Clients MUST ignore unrecognized extensions.
ticket The value of the ticket to be used as the PSK identifier. ticket The value of the ticket to be used as the PSK identifier.
The ticket itself is an opaque label. It MAY either be a database The 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.
The meanings of the flags are as follows: ticket_extensions A set of extension values for the ticket. Clients
MUST ignore unrecognized extensions.
allow_early_data When resuming with this ticket, the client MAY send This document defines one ticket extension, "ticket_early_data_info"
data in its first flight (early data) encrypted under a key
derived from this PSK.
allow_dhe_resumption This ticket MAY be used with (EC)DHE-PSK cipher struct {
suite. uint32 ticket_age_add;
} TicketEarlyDataInfo;
allow_psk_resumption This ticket MAY be used with a pure PSK cipher This extension indicates that the ticket may be used to send 0-RTT
suite. data (Section 4.2.6)). It contains one value:
In all cases, the PSK or (EC)DHE-PSK cipher suites that the client ticket_age_add A randomly generated 32-bit value that is used to
offers/uses MUST have the same symmetric parameters (cipher/hash) as obscure the age of the ticket that the client includes in the
the cipher suite negotiated for this connection. If no flags are set "early_data" extension. The client-side ticket age is added to
that the client recognizes, it MUST ignore the ticket. this value modulo 2^32 to obtain the value that is transmitted by
the client.
4.4.2. Post-Handshake Authentication 4.4.2. Post-Handshake Authentication
The server is permitted to request client authentication at any time The server is permitted to request client authentication at any time
after the handshake has completed by sending a CertificateRequest after the handshake has completed by sending a CertificateRequest
message. The client SHOULD respond with the appropriate message. The client SHOULD respond with the appropriate
Authentication messages. If the client chooses to authenticate, it Authentication messages. If the client chooses to authenticate, it
MUST send Certificate, CertificateVerify, and Finished. If it MUST send Certificate, CertificateVerify, and Finished. If it
declines, it MUST send a Certificate message containing no declines, it MUST send a Certificate message containing no
certificates followed by Finished. certificates followed by Finished.
skipping to change at page 58, line 5 skipping to change at page 59, line 5
its receive traffic keys (though not the traffic secret) for the its receive traffic keys (though not the traffic secret) for the
previous generation of keys until it receives the KeyUpdate from the previous generation of keys until it receives the KeyUpdate from the
other side. other side.
Both sender and receiver MUST encrypt their KeyUpdate messages with Both sender and receiver MUST encrypt their KeyUpdate messages with
the old keys. Additionally, both sides MUST enforce that a KeyUpdate the old keys. Additionally, both sides MUST enforce that a KeyUpdate
with the old key is received before accepting any messages encrypted with the old key is received before accepting any messages encrypted
with the new key. Failure to do so may allow message truncation with the new key. Failure to do so may allow message truncation
attacks. attacks.
4.5. Handshake Layer and Key Changes
Handshake messages MUST NOT span key changes. Because the
ServerHello, Finished, and KeyUpdate messages signal a key change,
upon receiving these messages a receiver MUST verify that the end of
these messages aligns with a record boundary; if not, then it MUST
send a fatal "unexpected_message" alert.
5. Record Protocol 5. Record Protocol
The TLS record protocol takes messages to be transmitted, fragments The TLS record protocol takes messages to be transmitted, fragments
the data into manageable blocks, protects the records, and transmits the data into manageable blocks, protects the records, and transmits
the result. Received data is decrypted and verified, reassembled, the result. Received data is decrypted and verified, reassembled,
and then delivered to higher-level clients. and then delivered to higher-level clients.
TLS records are typed, which allows multiple higher level protocols TLS records are typed, which allows multiple higher level protocols
to be multiplexed over the same record layer. This document to be multiplexed over the same record layer. This document
specifies three content types: handshake, application data, and specifies three content types: handshake, application data, and
skipping to change at page 58, line 39 skipping to change at page 60, line 5
in non-empty blocks of arbitrary size. in non-empty blocks of arbitrary size.
The record layer fragments information blocks into TLSPlaintext The record layer fragments information blocks into TLSPlaintext
records carrying data in chunks of 2^14 bytes or less. Message records carrying data in chunks of 2^14 bytes or less. Message
boundaries are not preserved in the record layer (i.e., multiple boundaries are not preserved in the record layer (i.e., multiple
messages of the same ContentType MAY be coalesced into a single messages of the same ContentType MAY be coalesced into a single
TLSPlaintext record, or a single message MAY be fragmented across TLSPlaintext record, or a single message MAY be fragmented across
several records). Alert messages (Section 6) MUST NOT be fragmented several records). Alert messages (Section 6) MUST NOT be fragmented
across records. across records.
enum { enum {
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 record_version = { 3, 1 }; /* TLS v1.x */ ProtocolVersion legacy_record_version = { 3, 1 }; /* TLS v1.x */
uint16 length; uint16 length;
opaque fragment[TLSPlaintext.length]; opaque fragment[TLSPlaintext.length];
} TLSPlaintext; } TLSPlaintext;
type The higher-level protocol used to process the enclosed type The higher-level protocol used to process the enclosed
fragment. fragment.
record_version The protocol version the current record is compatible legacy_record_version This value MUST be set to { 3, 1 } for all
with. This value MUST be set to { 3, 1 } for all records. This records. This field is deprecated and MUST be ignored for all
field is deprecated and MUST be ignored for all purposes. purposes.
length The length (in bytes) of the following TLSPlaintext.fragment. length The length (in bytes) of the following TLSPlaintext.fragment.
The length MUST NOT exceed 2^14. The length MUST NOT exceed 2^14.
fragment The data being transmitted. This value transparent and fragment The data being transmitted. This value transparent and
treated as an independent block to be dealt with by the higher- treated as an independent block to be dealt with by the higher-
level protocol specified by the type field. level protocol specified by the type field.
This document describes TLS Version 1.3, which uses the version { 3, This document describes TLS Version 1.3, which uses the version { 3,
4 }. The version value 3.4 is historical, deriving from the use of { 4 }. The version value 3.4 is historical, deriving from the use of {
skipping to change at page 60, line 13 skipping to change at page 61, line 25
a type and optional padding. a type and optional padding.
struct { struct {
opaque content[TLSPlaintext.length]; opaque content[TLSPlaintext.length];
ContentType type; ContentType type;
uint8 zeros[length_of_padding]; uint8 zeros[length_of_padding];
} TLSInnerPlaintext; } TLSInnerPlaintext;
struct { struct {
ContentType opaque_type = application_data(23); /* see fragment.type */ ContentType opaque_type = application_data(23); /* see fragment.type */
ProtocolVersion record_version = { 3, 1 }; /* TLS v1.x */ ProtocolVersion legacy_record_version = { 3, 1 }; /* TLS v1.x */
uint16 length; uint16 length;
opaque encrypted_record[length]; opaque encrypted_record[length];
} TLSCiphertext; } TLSCiphertext;
content The cleartext of TLSPlaintext.fragment. content The cleartext of TLSPlaintext.fragment.
type The content type of the record. type The content type of the record.
zeros An arbitrary-length run of zero-valued bytes may appear in the zeros An arbitrary-length run of zero-valued bytes may appear in the
cleartext after the type field. This provides an opportunity for cleartext after the type field. This provides an opportunity for
senders to pad any TLS record by a chosen amount as long as the senders to pad any TLS record by a chosen amount as long as the
total stays within record size limits. See Section 5.4 for more total stays within record size limits. See Section 5.4 for more
details. details.
opaque_type The outer opaque_type field of a TLSCiphertext record is opaque_type The outer opaque_type field of a TLSCiphertext record is
always set to the value 23 (application_data) for outward always set to the value 23 (application_data) for outward
compatibility with middleboxes accustomed to parsing previous compatibility with middleboxes accustomed to parsing previous
versions of TLS. The actual content type of the record is found versions of TLS. The actual content type of the record is found
in fragment.type after decryption. in fragment.type after decryption.
record_version The record_version field is identical to legacy_record_version The legacy_record_version field is identical
TLSPlaintext.record_version and is always { 3, 1 }. Note that the to TLSPlaintext.legacy_record_version and is always { 3, 1 }.
handshake protocol including the ClientHello and ServerHello Note that the handshake protocol including the ClientHello and
messages authenticates the protocol version, so this value is ServerHello messages authenticates the protocol version, so this
redundant. value is redundant.
length The length (in bytes) of the following length The length (in bytes) of the following
TLSCiphertext.fragment, which is the sum of the lengths of the TLSCiphertext.fragment, which is the sum of the lengths of the
content and the padding, plus one for the inner content type. The content and the padding, plus one for the inner content type. The
length MUST NOT exceed 2^14 + 256. An endpoint that receives a length MUST NOT exceed 2^14 + 256. An endpoint that receives a
record that exceeds this length MUST generate a fatal record that exceeds this length MUST generate a fatal
"record_overflow" alert. "record_overflow" alert.
encrypted_record The AEAD encrypted form of the serialized encrypted_record The AEAD encrypted form of the serialized
TLSInnerPlaintext structure. TLSInnerPlaintext structure.
skipping to change at page 69, line 9 skipping to change at page 70, line 9
[RFC6066]. [RFC6066].
bad_certificate_status_response Sent by clients when an invalid or bad_certificate_status_response Sent by clients when an invalid or
unacceptable OCSP response is provided by the server via the unacceptable OCSP response is provided by the server via the
"status_request" extension [RFC6066]. This alert is always fatal. "status_request" extension [RFC6066]. This alert is always fatal.
bad_certificate_hash_value Sent by servers when a retrieved object bad_certificate_hash_value Sent by servers when a retrieved object
does not have the correct hash provided by the client via the does not have the correct hash provided by the client via the
"client_certificate_url" extension [RFC6066]. "client_certificate_url" extension [RFC6066].
unknown_psk_identity Sent by servers when a PSK cipher suite is unknown_psk_identity Sent by servers when PSK key establishment is
selected 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.
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
In order to begin connection protection, the TLS Record Protocol In order to begin connection protection, the TLS Record Protocol
requires specification of a suite of algorithms, a master secret, and requires specification of a suite of algorithms, a master secret, and
the client and server random values. The authentication, key the client and server random values.
exchange, and record protection algorithms are determined by the
cipher_suite selected by the server and revealed in the ServerHello
message. The random values are exchanged in the hello messages. All
that remains is to calculate the key schedule.
7.1. Key Schedule 7.1. Key Schedule
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 makes use of the HKDF-Extract and below. The key derivation process makes use of the HKDF-Extract and
HKDF-Expand functions as defined for HKDF [RFC5869], as well as the HKDF-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) =
skipping to change at page 70, line 27 skipping to change at page 71, line 21
- (EC)DHE shared secret - (EC)DHE shared secret
This produces a full key derivation schedule shown in the diagram This produces a full key derivation schedule shown in the diagram
below. In this diagram, the following formatting conventions apply: below. In this diagram, the following formatting conventions apply:
- HKDF-Extract is drawn as taking the Salt argument from the top and - HKDF-Extract is drawn as taking the Salt argument from the top and
the IKM argument from the left. the IKM argument from the left.
- Derive-Secret's Secret argument is indicated by the arrow coming - Derive-Secret's Secret argument is indicated by the arrow coming
in from the left. For instance, the Early Secret is the Secret in from the left. For instance, the Early Secret is the Secret
for generating the early_traffic-secret. for generating the early_traffic_secret.
Note that the 0-RTT Finished message is not included in the Derive-
Secret operation.
0 0
| |
v v
PSK -> HKDF-Extract PSK -> HKDF-Extract
| |
v v
Early Secret ---> Derive-Secret(., "early traffic secret", Early Secret ---> Derive-Secret(., "early traffic secret",
| ClientHello) | ClientHello)
| = early_traffic_secret | = early_traffic_secret
v v
(EC)DHE -> HKDF-Extract (EC)DHE -> HKDF-Extract
| |
v v
Handshake Handshake
Secret -----> Derive-Secret(., "handshake traffic secret", Secret -----> Derive-Secret(., "handshake traffic secret",
| ClientHello + ServerHello) | ClientHello...ServerHello)
| = handshake_traffic_secret | = handshake_traffic_secret
v v
0 -> HKDF-Extract 0 -> HKDF-Extract
| |
v v
Master Secret Master Secret
| |
+---------> Derive-Secret(., "application traffic secret", +---------> Derive-Secret(., "application traffic secret",
| ClientHello...Server Finished) | ClientHello...Server Finished)
| = traffic_secret_0 | = traffic_secret_0
skipping to change at page 75, line 7 skipping to change at page 76, line 7
new construction. The exporter interface remains the same, however new construction. The exporter interface remains the same, however
the value is computed as: the value is computed as:
HKDF-Expand-Label(exporter_secret, HKDF-Expand-Label(exporter_secret,
label, context_value, key_length) label, context_value, key_length)
8. Compliance Requirements 8. Compliance Requirements
8.1. MTI Cipher Suites 8.1. MTI Cipher Suites
In the absence of an application profile standard specifying In the absence of an application profile standard specifying
otherwise, a TLS-compliant application MUST implement the following otherwise, a TLS-compliant application MUST implement the
cipher suites: TLS_AES_128_GCM_SHA256 cipher suite and SHOULD implement the
TLS_AES_256_GCM_SHA384 and TLS_CHACHA20_POLY1305_SHA256 cipher
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 suites.
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
These cipher suites MUST support both digital signatures and key
exchange with secp256r1 (NIST P-256) and SHOULD support key exchange
with X25519 [RFC7748].
A TLS-compliant application SHOULD implement the following cipher
suites:
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 A TLS-compliant application MUST support digital signatures with
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 rsa_pkcs1_sha256 (for certificates), rsa_pss_sha256 (for
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 CertificateVerify and certificates), and ecdsa_secp256r1_sha256. A
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 TLS-compliant application MUST support key exchange with secp256r1
(NIST P-256) and SHOULD support key exchange with X25519 [RFC7748].
8.2. MTI Extensions 8.2. MTI Extensions
In the absence of an application profile standard specifying In the absence of an application profile standard specifying
otherwise, a TLS-compliant application MUST implement the following otherwise, a TLS-compliant application MUST implement the following
TLS extensions: TLS extensions:
- Signature Algorithms ("signature_algorithms"; Section 4.2.2) - Signature Algorithms ("signature_algorithms"; Section 4.2.2)
- Negotiated Groups ("supported_groups"; Section 4.2.3) - Negotiated Groups ("supported_groups"; Section 4.2.3)
skipping to change at page 78, line 6 skipping to change at page 78, line 46
| | | | | | | |
| max_fragment_length [RFC6066] | Yes | Encrypted | | max_fragment_length [RFC6066] | Yes | Encrypted |
| | | | | | | |
| client_certificate_url | Yes | Encrypted | | client_certificate_url | Yes | Encrypted |
| [RFC6066] | | | | [RFC6066] | | |
| | | | | | | |
| trusted_ca_keys [RFC6066] | Yes | Encrypted | | trusted_ca_keys [RFC6066] | Yes | Encrypted |
| | | | | | | |
| truncated_hmac [RFC6066] | Yes | No | | truncated_hmac [RFC6066] | Yes | No |
| | | | | | | |
| status_request [RFC6066] | Yes | No | | status_request [RFC6066] | Yes | Encrypted |
| | | | | | | |
| user_mapping [RFC4681] | Yes | Encrypted | | user_mapping [RFC4681] | Yes | Encrypted |
| | | | | | | |
| client_authz [RFC5878] | No | Encrypted | | client_authz [RFC5878] | No | Encrypted |
| | | | | | | |
| server_authz [RFC5878] | No | Encrypted | | server_authz [RFC5878] | No | Encrypted |
| | | | | | | |
| cert_type [RFC6091] | Yes | Encrypted | | cert_type [RFC6091] | Yes | Encrypted |
| | | | | | | |
| supported_groups [RFC-ietf- | Yes | Encrypted | | supported_groups [RFC-ietf- | Yes | Encrypted |
skipping to change at page 79, line 45 skipping to change at page 80, line 37
[AES] National Institute of Standards and Technology, [AES] National Institute of Standards and Technology,
"Specification for the Advanced Encryption Standard "Specification for the Advanced Encryption Standard
(AES)", NIST FIPS 197, November 2001. (AES)", NIST FIPS 197, November 2001.
[DH] Diffie, W. and M. Hellman, "New Directions in [DH] Diffie, W. and M. Hellman, "New Directions in
Cryptography", IEEE Transactions on Information Theory, Cryptography", IEEE Transactions on Information Theory,
V.IT-22 n.6 , June 1977. V.IT-22 n.6 , June 1977.
[I-D.irtf-cfrg-eddsa] [I-D.irtf-cfrg-eddsa]
Josefsson, S. and I. Liusvaara, "Edwards-curve Digital Josefsson, S. and I. Liusvaara, "Edwards-curve Digital
Signature Algorithm (EdDSA)", draft-irtf-cfrg-eddsa-05 Signature Algorithm (EdDSA)", draft-irtf-cfrg-eddsa-06
(work in progress), March 2016. (work in progress), August 2016.
[I-D.mattsson-tls-ecdhe-psk-aead] [I-D.mattsson-tls-ecdhe-psk-aead]
Mattsson, J. and D. Migault, "ECDHE_PSK with AES-GCM and Mattsson, J. and D. Migault, "ECDHE_PSK with AES-GCM and
AES-CCM Cipher Suites for Transport Layer Security (TLS)", AES-CCM Cipher Suites for Transport Layer Security (TLS)",
draft-mattsson-tls-ecdhe-psk-aead-05 (work in progress), draft-mattsson-tls-ecdhe-psk-aead-05 (work in progress),
April 2016. April 2016.
[RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-
Hashing for Message Authentication", RFC 2104, Hashing for Message Authentication", RFC 2104,
DOI 10.17487/RFC2104, February 1997, DOI 10.17487/RFC2104, February 1997,
skipping to change at page 83, line 36 skipping to change at page 84, line 28
[FI06] Finney, H., "Bleichenbacher's RSA signature forgery based [FI06] Finney, H., "Bleichenbacher's RSA signature forgery based
on implementation error", August 2006, on implementation error", August 2006,
<https://www.ietf.org/mail-archive/web/openpgp/current/ <https://www.ietf.org/mail-archive/web/openpgp/current/
msg00999.html>. msg00999.html>.
[GCM] Dworkin, M., "Recommendation for Block Cipher Modes of [GCM] Dworkin, M., "Recommendation for Block Cipher Modes of
Operation: Galois/Counter Mode (GCM) and GMAC", Operation: Galois/Counter Mode (GCM) and GMAC",
NIST Special Publication 800-38D, November 2007. NIST Special Publication 800-38D, November 2007.
[I-D.ietf-tls-cached-info]
Santesson, S. and H. Tschofenig, "Transport Layer Security
(TLS) Cached Information Extension", draft-ietf-tls-
cached-info-23 (work in progress), May 2016.
[I-D.ietf-tls-negotiated-ff-dhe] [I-D.ietf-tls-negotiated-ff-dhe]
Gillmor, D., "Negotiated Finite Field Diffie-Hellman Gillmor, D., "Negotiated Finite Field Diffie-Hellman
Ephemeral Parameters for TLS", draft-ietf-tls-negotiated- Ephemeral Parameters for TLS", draft-ietf-tls-negotiated-
ff-dhe-10 (work in progress), June 2015. ff-dhe-10 (work in progress), June 2015.
[IEEE1363] [IEEE1363]
IEEE, "Standard Specifications for Public Key IEEE, "Standard Specifications for Public Key
Cryptography", IEEE 1363 , 2000. Cryptography", IEEE 1363 , 2000.
[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
skipping to change at page 87, line 49 skipping to change at page 88, line 34
[RFC7627] Bhargavan, K., Ed., Delignat-Lavaud, A., Pironti, A., [RFC7627] Bhargavan, K., Ed., Delignat-Lavaud, A., Pironti, A.,
Langley, A., and M. Ray, "Transport Layer Security (TLS) Langley, A., and M. Ray, "Transport Layer Security (TLS)
Session Hash and Extended Master Secret Extension", Session Hash and Extended Master Secret Extension",
RFC 7627, DOI 10.17487/RFC7627, September 2015, RFC 7627, DOI 10.17487/RFC7627, September 2015,
<http://www.rfc-editor.org/info/rfc7627>. <http://www.rfc-editor.org/info/rfc7627>.
[RFC7685] Langley, A., "A Transport Layer Security (TLS) ClientHello [RFC7685] Langley, A., "A Transport Layer Security (TLS) ClientHello
Padding Extension", RFC 7685, DOI 10.17487/RFC7685, Padding Extension", RFC 7685, DOI 10.17487/RFC7685,
October 2015, <http://www.rfc-editor.org/info/rfc7685>. October 2015, <http://www.rfc-editor.org/info/rfc7685>.
[RFC7924] Santesson, S. and H. Tschofenig, "Transport Layer Security
(TLS) Cached Information Extension", RFC 7924,
DOI 10.17487/RFC7924, July 2016,
<http://www.rfc-editor.org/info/rfc7924>.
[RSA] Rivest, R., Shamir, A., and L. Adleman, "A Method for [RSA] Rivest, R., Shamir, A., and L. Adleman, "A Method for
Obtaining Digital Signatures and Public-Key Obtaining Digital Signatures and Public-Key
Cryptosystems", Communications of the ACM v. 21, n. 2, pp. Cryptosystems", Communications of the ACM v. 21, n. 2, pp.
120-126., February 1978. 120-126., February 1978.
[SIGMA] Krawczyk, H., "SIGMA: the 'SIGn-and-MAc' approach to [SIGMA] Krawczyk, H., "SIGMA: the 'SIGn-and-MAc' approach to
authenticated Di e-Hellman and its use in the IKE authenticated Di e-Hellman and its use in the IKE
protocols", Proceedings of CRYPTO 2003 , 2003. protocols", Proceedings of CRYPTO 2003 , 2003.
[SLOTH] Bhargavan, K. and G. Leurent, "Transcript Collision [SLOTH] Bhargavan, K. and G. Leurent, "Transcript Collision
skipping to change at page 89, line 25 skipping to change at page 90, line 25
invalid_RESERVED(0), invalid_RESERVED(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 record_version = { 3, 1 }; /* TLS v1.x */ ProtocolVersion legacy_record_version = { 3, 1 }; /* TLS v1.x */
uint16 length; uint16 length;
opaque fragment[TLSPlaintext.length]; opaque fragment[TLSPlaintext.length];
} TLSPlaintext; } TLSPlaintext;
struct { struct {
opaque content[TLSPlaintext.length]; opaque content[TLSPlaintext.length];
ContentType type; ContentType type;
uint8 zeros[length_of_padding]; uint8 zeros[length_of_padding];
} TLSInnerPlaintext; } TLSInnerPlaintext;
struct { struct {
ContentType opaque_type = application_data(23); /* see fragment.type */ ContentType opaque_type = application_data(23); /* see fragment.type */
ProtocolVersion record_version = { 3, 1 }; /* TLS v1.x */ ProtocolVersion legacy_record_version = { 3, 1 }; /* TLS v1.x */
uint16 length; uint16 length;
opaque encrypted_record[length]; opaque encrypted_record[length];
} TLSCiphertext; } TLSCiphertext;
A.2. Alert Messages A.2. Alert Messages
enum { warning(1), fatal(2), (255) } AlertLevel; enum { warning(1), fatal(2), (255) } AlertLevel;
enum { enum {
close_notify(0), close_notify(0),
end_of_early_data(1), end_of_early_data(1),
skipping to change at page 91, line 44 skipping to change at page 92, line 44
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;
A.3.1. Key Exchange Messages A.3.1. Key Exchange Messages
struct { struct {
uint8 major; uint8 major;
uint8 minor; uint8 minor;
} ProtocolVersion; } ProtocolVersion;
struct { struct {
opaque random_bytes[32]; opaque random_bytes[32];
} Random; } Random;
uint8 CipherSuite[2]; /* Cryptographic suite selector */ uint8 CipherSuite[2]; /* Cryptographic suite selector */
struct { struct {
ProtocolVersion client_version = { 3, 4 }; /* TLS v1.3 */ ProtocolVersion max_supported_version = { 3, 4 }; /* TLS v1.3 */
Random random; Random random;
opaque legacy_session_id<0..32>; opaque legacy_session_id<0..32>;
CipherSuite cipher_suites<2..2^16-2>; CipherSuite cipher_suites<2..2^16-2>;
opaque legacy_compression_methods<1..2^8-1>; opaque legacy_compression_methods<1..2^8-1>;
Extension extensions<0..2^16-1>; Extension extensions<0..2^16-1>;
} ClientHello; } ClientHello;
struct { struct {
ProtocolVersion server_version; ProtocolVersion version;
Random random; Random random;
CipherSuite cipher_suite; CipherSuite cipher_suite;
Extension extensions<0..2^16-1>; Extension extensions<0..2^16-1>;
} ServerHello; } ServerHello;
struct { struct {
ProtocolVersion server_version; ProtocolVersion server_version;
CipherSuite cipher_suite; NamedGroup selected_group;
NamedGroup selected_group; Extension extensions<0..2^16-1>;
Extension extensions<0..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), supported_groups(10),
signature_algorithms(13), signature_algorithms(13),
key_share(40), key_share(40),
pre_shared_key(41), pre_shared_key(41),
early_data(42), early_data(42),
cookie(44), cookie(44),
(65535) (65535)
} ExtensionType; } ExtensionType;
struct { struct {
NamedGroup group; NamedGroup group;
opaque key_exchange<1..2^16-1>; opaque key_exchange<1..2^16-1>;
} KeyShareEntry; } KeyShareEntry;
struct { struct {
select (role) { select (role) {
case client: case client:
KeyShareEntry client_shares<0..2^16-1>;
KeyShareEntry client_shares<0..2^16-1>; case server:
KeyShareEntry server_share;
}
} KeyShare;
case server: enum { psk_ke(0), psk_dhe_ke(1), (255) } PskKeyExchangeModes;
KeyShareEntry server_share; enum { psk_auth(0), psk_sign_auth(1), (255) } PskAuthenticationModes;
}
} KeyShare;
opaque psk_identity<0..2^16-1>; opaque psk_identity<0..2^16-1>;
struct { struct {
select (Role) { PskKeMode ke_modes<1..255>;
case client: PskAuthMode auth_modes<1..255>;
psk_identity identities<2..2^16-1>; opaque identity<0..2^16-1>;
} PskIdentity;
case server: struct {
uint16 selected_identity; select (Role) {
} case client:
} PreSharedKeyExtension; psk_identity identities<2..2^16-1>;
struct { case server:
select (Role) { uint16 selected_identity;
case client: }
uint32 obfuscated_ticket_age; } PreSharedKeyExtension;
case server: struct {
struct {}; select (Role) {
} case client:
} EarlyDataIndication; uint32 obfuscated_ticket_age;
case server:
struct {};
}
} EarlyDataIndication;
A.3.1.1. Cookie Extension A.3.1.1. Cookie Extension
struct { struct {
opaque cookie<0..2^16-1>; opaque cookie<0..2^16-1>;
} Cookie; } Cookie;
A.3.1.2. Signature Algorithm Extension A.3.1.2. Signature Algorithm Extension
enum { enum {
/* RSASSA-PKCS1-v1_5 algorithms */ /* RSASSA-PKCS1-v1_5 algorithms */
skipping to change at page 94, line 42 skipping to change at page 95, line 42
obsolete_RESERVED (0x0204..0x0400), obsolete_RESERVED (0x0204..0x0400),
obsolete_RESERVED (0x0404..0x0500), obsolete_RESERVED (0x0404..0x0500),
obsolete_RESERVED (0x0504..0x0600), obsolete_RESERVED (0x0504..0x0600),
obsolete_RESERVED (0x0604..0x06FF), obsolete_RESERVED (0x0604..0x06FF),
private_use (0xFE00..0xFFFF), private_use (0xFE00..0xFFFF),
(0xFFFF) (0xFFFF)
} SignatureScheme; } SignatureScheme;
SignatureScheme supported_signature_algorithms<2..2^16-2>; SignatureScheme supported_signature_algorithms<2..2^16-2>;
A.3.1.3. Named Group Extension A.3.1.3. Supported Groups Extension
enum { enum {
/* Elliptic Curve Groups (ECDHE) */ /* Elliptic Curve Groups (ECDHE) */
obsolete_RESERVED (1..22), obsolete_RESERVED (1..22),
secp256r1 (23), secp384r1 (24), secp521r1 (25), secp256r1 (23), secp384r1 (24), secp521r1 (25),
obsolete_RESERVED (26..28), obsolete_RESERVED (26..28),
x25519 (29), x448 (30), x25519 (29), x448 (30),
/* Finite Field Groups (DHE) */ /* Finite Field Groups (DHE) */
ffdhe2048 (256), ffdhe3072 (257), ffdhe4096 (258), ffdhe2048 (256), ffdhe3072 (257), ffdhe4096 (258),
ffdhe6144 (259), ffdhe8192 (260), ffdhe6144 (259), ffdhe8192 (260),
skipping to change at page 97, line 11 skipping to change at page 98, line 11
} Finished; } Finished;
A.3.4. Ticket Establishment A.3.4. Ticket Establishment
enum { (65535) } TicketExtensionType; enum { (65535) } TicketExtensionType;
struct { struct {
TicketExtensionType extension_type; TicketExtensionType extension_type;
opaque extension_data<1..2^16-1>; opaque extension_data<1..2^16-1>;
} TicketExtension; } TicketExtension;
enum {
allow_early_data(1),
allow_dhe_resumption(2),
allow_psk_resumption(4)
} TicketFlags;
struct { struct {
uint32 ticket_lifetime; uint32 ticket_lifetime;
uint32 flags; PskKeMode ke_modes<1..255>;
uint32 ticket_age_add; PskAuthMode auth_modes<1..255>;
TicketExtension extensions<2..2^16-2>; opaque ticket<1..2^16-1>;
opaque ticket<0..2^16-1>; TicketExtension extensions<0..2^16-2>;
} NewSessionTicket; } NewSessionTicket;
A.4. Cipher Suites A.4. Cipher Suites
A cipher suite defines a cipher specification supported in TLS and A symmetric cipher suite defines the pair of the AEAD cipher and hash
negotiated via hello messages in the TLS handshake. Cipher suite function to be used with HKDF. Cipher suites follow the naming
names follow a general naming convention composed of a series of convention: Cipher suite names follow the naming convention:
component algorithm names separated by underscores:
CipherSuite TLS_KEA_AUTH_WITH_CIPHER_HASH = VALUE; CipherSuite TLS13_CIPHER_HASH = VALUE;
+-----------+-------------------------------------------------+
| Component | Contents |
+-----------+-------------------------------------------------+
| TLS | The string "TLS" |
| | |
| CIPHER | The symmetric cipher used for record protection |
| | |
| HASH | The hash algorithm used with HKDF |
| | |
| VALUE | The two byte ID assigned for this cipher suite |
+-----------+-------------------------------------------------+
+-----------+-------------------------------------------------------+
| Component | Contents |
+-----------+-------------------------------------------------------+
| TLS | The string "TLS" |
| | |
| KEA | The key exchange algorithm (e.g. ECDHE, DHE) |
| | |
| AUTH | The authentication algorithm (e.g. certificates, PSK) |
| | |
| WITH | The string "WITH" |
| | |
| CIPHER | The symmetric cipher used for record protection |
| | |
| HASH | The hash algorithm used with HKDF |
| | |
| VALUE | The two byte ID assigned for this cipher suite |
+-----------+-------------------------------------------------------+
The "CIPHER" component commonly has sub-components used to designate The "CIPHER" component commonly has sub-components used to designate
the cipher name, bits, and mode, if applicable. For example, the cipher name, bits, and mode, if applicable. For example,
"AES_256_GCM" represents 256-bit AES in the GCM mode of operation. "AES_256_GCM" represents 256-bit AES in the GCM mode of operation.
Cipher suite names that lack a "HASH" value that are defined for use
with TLS 1.2 or later use the SHA-256 hash algorithm by default.
The primary key exchange algorithm used in TLS is Ephemeral Diffie- +------------------------------+-------------+---------------+
Hellman [DH]. The finite field based version is denoted "DHE" and | Cipher Suite Name | Value | Specification |
the elliptic curve based version is denoted "ECDHE". Prior versions +------------------------------+-------------+---------------+
of TLS supported non-ephemeral key exchanges, however these are not | TLS_AES_128_GCM_SHA256 | {0x13,0x01} | [This RFC] |
supported by TLS 1.3. | | | |
| TLS_AES_256_GCM_SHA384 | {0x13,0x02} | [This RFC] |
See the definitions of each cipher suite in its specification | | | |
document for the full details of each combination of algorithms that | TLS_CHACHA20_POLY1305_SHA256 | {0x13,0x03} | [This RFC] |
is specified. | | | |
| TLS_AES_128_CCM_SHA256 | {0x13,0x04} | [This RFC] |
The following is a list of standards track server-authenticated (and | | | |
optionally client-authenticated) cipher suites which are currently | TLS_AES_128_CCM_8_SHA256 | {0x13,0x05} | [This RFC] |
available in TLS 1.3: +------------------------------+-------------+---------------+
+----------------------------------------+-----------+--------------+
| Cipher Suite Name | Value | Specificatio |
| | | n |
+----------------------------------------+-----------+--------------+
| TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 | {0x00,0x9 | [RFC5288] |
| | E} | |
| | | |
| TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 | {0x00,0x9 | [RFC5288] |
| | F} | |
| | | |
| TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA25 | {0xC0,0x2 | [RFC5289] |
| 6 | B} | |
| | | |
| TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA38 | {0xC0,0x2 | [RFC5289] |
| 4 | C} | |
| | | |
| TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 | {0xC0,0x2 | [RFC5289] |
| | F} | |
| | | |
| TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 | {0xC0,0x3 | [RFC5289] |
| | 0} | |
| | | |
| TLS_DHE_RSA_WITH_AES_128_CCM | {0xC0,0x9 | [RFC6655] |
| | E} | |
| | | |
| TLS_DHE_RSA_WITH_AES_256_CCM | {0xC0,0x9 | [RFC6655] |
| | F} | |
| | | |
| TLS_DHE_RSA_WITH_AES_128_CCM_8 | {0xC0,0xA | [RFC6655] |
| | 2} | |
| | | |
| TLS_DHE_RSA_WITH_AES_256_CCM_8 | {0xC0,0xA | [RFC6655] |
| | 3} | |
| | | |
| TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_S | {0xCC,0xA | [RFC7905] |
| HA256 | 8} | |
| | | |
| TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 | {0xCC,0xA | [RFC7905] |
| _SHA256 | 9} | |
| | | |
| TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA | {0xCC,0xA | [RFC7905] |
| 256 | A} | |
+----------------------------------------+-----------+--------------+
Note: The values listed for ChaCha/Poly are preliminary but are being
or will be used for interop testing and therefore are likely to be
assigned.
Note: ECDHE AES GCM was not yet standards track prior to the
publication of this specification. This document promotes the above-
listed ciphers to standards track.
The following is a list of standards track ephemeral pre-shared key
cipher suites which are currently available in TLS 1.3:
+------------------------------+----------+-------------------------+
| Cipher Suite Name | Value | Specification |
+------------------------------+----------+-------------------------+
| TLS_DHE_PSK_WITH_AES_128_GCM | {0x00,0x | [RFC5487] |
| _SHA256 | AA} | |
| | | |
| TLS_DHE_PSK_WITH_AES_256_GCM | {0x00,0x | [RFC5487] |
| _SHA384 | AB} | |
| | | |
| TLS_DHE_PSK_WITH_AES_128_CCM | {0xC0,0x | [RFC6655] |
| | A6} | |
| | | |
| TLS_DHE_PSK_WITH_AES_256_CCM | {0xC0,0x | [RFC6655] |
| | A7} | |
| | | |
| TLS_PSK_DHE_WITH_AES_128_CCM | {0xC0,0x | [RFC6655] |
| _8 | AA} | |
| | | |
| TLS_PSK_DHE_WITH_AES_256_CCM | {0xC0,0x | [RFC6655] |
| _8 | AB} | |
| | | |
| TLS_ECDHE_PSK_WITH_AES_128_G | {0xD0,0x | [I-D.mattsson-tls-ecdhe |
| CM_SHA256 | 01} | -psk-aead] |
| | | |
| TLS_ECDHE_PSK_WITH_AES_256_G | {0xD0,0x | [I-D.mattsson-tls-ecdhe |
| CM_SHA384 | 02} | -psk-aead] |
| | | |
| TLS_ECDHE_PSK_WITH_AES_128_C | {0xD0,0x | [I-D.mattsson-tls-ecdhe |
| CM_8_SHA256 | 03} | -psk-aead] |
| | | |
| TLS_ECDHE_PSK_WITH_AES_128_C | {0xD0,0x | [I-D.mattsson-tls-ecdhe |
| CM_SHA256 | 04} | -psk-aead] |
| | | |
| TLS_ECDHE_PSK_WITH_AES_256_C | {0xD0,0x | [I-D.mattsson-tls-ecdhe |
| CM_SHA384 | 05} | -psk-aead] |
| | | |
| TLS_ECDHE_PSK_WITH_CHACHA20_ | {0xCC,0x | [RFC7905] |
| POLY1305_SHA256 | AC} | |
| | | |
| TLS_DHE_PSK_WITH_CHACHA20_PO | {0xCC,0x | [RFC7905] |
| LY1305_SHA256 | AD} | |
+------------------------------+----------+-------------------------+
Note: The values listed for ECDHE and ChaCha/Poly are preliminary but
are being or will be used for interop testing and therefore are
likely to be assigned.
Note: [RFC6655] is inconsistent with respect to the ordering of
components within PSK AES CCM cipher suite names. The names above
are as defined.
All cipher suites in this section are specified for use with both TLS Although TLS 1.3 uses the same cipher suite space as previous
1.2 and TLS 1.3, as well as the corresponding versions of DTLS. (see versions of TLS, TLS 1.3 cipher suites are defined differently, only
Appendix C) specifying the symmetric ciphers, and cannot it be used for TLS 1.2.
Similarly, TLS 1.2 and lower cipher suites cannot be used with TLS
1.3.
New cipher suite values are assigned by IANA as described in New cipher suite values are assigned by IANA as described in
Section 10. Section 10.
A.4.1. Unauthenticated Operation A.4.1. Unauthenticated Operation
Previous versions of TLS offered explicitly unauthenticated cipher Previous versions of TLS offered explicitly unauthenticated cipher
suites based on anonymous Diffie-Hellman. These cipher suites have suites based on anonymous Diffie-Hellman. These cipher suites have
been deprecated in TLS 1.3. However, it is still possible to been deprecated in TLS 1.3. However, it is still possible to
negotiate cipher suites that do not provide verifiable server negotiate cipher suites that do not provide verifiable server
skipping to change at page 102, line 45 skipping to change at page 100, line 10
defined.]] If no such mechanism is used, then the connection has no defined.]] 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 B. Implementation Notes Appendix B. Implementation Notes
The TLS protocol cannot prevent many common security mistakes. This The TLS protocol cannot prevent many common security mistakes. This
section provides several recommendations to assist implementors. section provides several recommendations to assist implementors.
B.1. Random Number Generation and Seeding B.1. API considerations for 0-RTT
TLS requires a cryptographically secure pseudorandom number generator 0-RTT data has very different security properties from data
(PRNG). Care must be taken in designing and seeding PRNGs. PRNGs transmitted after a completed handshake: it can be replayed.
based on secure hash operations, most notably SHA-256, are Implementations SHOULD provide different functions for reading and
acceptable, but cannot provide more security than the size of the writing 0-RTT data and data transmitted after the handshake, and
random number generator state. SHOULD NOT automatically resend 0-RTT data if it is rejected by the
server.
To estimate the amount of seed material being produced, add the B.2. Random Number Generation and Seeding
number of bits of unpredictable information in each seed byte. For
example, keystroke timing values taken from a PC compatible 18.2 Hz
timer provide 1 or 2 secure bits each, even though the total size of
the counter value is 16 bits or more. Seeding a 128-bit PRNG would
thus require approximately 100 such timer values.
TLS requires a cryptographically secure pseudorandom number generator
(PRNG). In most cases, the operating system provides an appropriate
facility such as /dev/urandom, which should be used absent other
(performance) concerns. It is generally preferrable to use an
existing PRNG implementation in preference to crafting a new one, and
many adequate cryptographic libraries are already available under
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.
B.2. Certificates and Authentication B.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. Certificates should always be verified to ensure proper
signing by a trusted Certificate Authority (CA). The selection and signing by a trusted Certificate Authority (CA). The selection and
addition of trusted CAs should be done very carefully. Users should addition of trusted CAs should be done very carefully. Users should
be able to view information about the certificate and root CA. be able to view information about the certificate and root CA.
B.3. Cipher Suite Support B.4. Cipher Suite Support
TLS supports a range of key sizes and security levels, including some TLS supports a range of key sizes and security levels, including some
that provide no or minimal security. A proper implementation will that provide no or minimal security. A proper implementation will
probably not support many cipher suites. Applications SHOULD also probably not support many cipher suites. Applications SHOULD also
enforce minimum and maximum key sizes. For example, certification enforce minimum and maximum key sizes. For example, certification
paths containing keys or signatures weaker than 2048-bit RSA or paths containing keys or signatures weaker than 2048-bit RSA or
224-bit ECDSA are not appropriate for secure applications. See also 224-bit ECDSA are not appropriate for secure applications. See also
Appendix C.4. Appendix C.4.
B.4. Implementation Pitfalls B.5. 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.
TLS protocol issues: TLS protocol issues:
skipping to change at page 104, line 30 skipping to change at page 102, line 5
and scanning from the end for the ContentType, do you avoid and scanning from the end for the ContentType, do you avoid
scanning past the start of the cleartext in the event that the scanning past the start of the cleartext in the event that the
peer has sent a malformed plaintext of all-zeros? peer has sent a malformed plaintext of all-zeros?
- When processing a ClientHello containing a version of { 3, 5 } or - When processing a ClientHello containing a version of { 3, 5 } or
higher, do you respond with the highest common version of TLS higher, do you respond with the highest common version of TLS
rather than requiring an exact match? Have you ensured this rather than requiring an exact match? Have you ensured this
continues to be true with arbitrarily higher version numbers? continues to be true with arbitrarily higher version numbers?
(e.g. { 4, 0 }, { 9, 9 }, { 255, 255 }) (e.g. { 4, 0 }, { 9, 9 }, { 255, 255 })
- Do you properly ignore unrecognized cipher suites (Section 4.1.1), - Do you properly ignore unrecognized cipher suites (Section 4.1.2),
hello extensions (Section 4.2), named groups (Section 4.2.3), and hello extensions (Section 4.2), named groups (Section 4.2.3), and
signature algorithms (Section 4.2.2)? signature algorithms (Section 4.2.2)?
Cryptographic details: Cryptographic details:
- What countermeasures do you use to prevent timing attacks against - What countermeasures do you use to prevent timing attacks against
RSA signing operations [TIMING]? RSA signing operations [TIMING]?
- When verifying RSA signatures, do you accept both NULL and missing - When verifying RSA signatures, do you accept both NULL and missing
parameters? Do you verify that the RSA padding doesn't have parameters? Do you verify that the RSA padding doesn't have
additional data after the hash value? [FI06] additional data after the hash value? [FI06]
- 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.3.1)? leading zero bytes in the negotiated key (see Section 7.3.1)?
- Does your TLS client check that the Diffie-Hellman parameters sent - Does your TLS client check that the Diffie-Hellman parameters sent
by the server are acceptable, (see Section 4.2.4.1)? by the server are acceptable, (see Section 4.2.4.1)?
- Do you use a strong and, most importantly, properly seeded random - Do you use a strong and, most importantly, properly seeded random
number generator (see Appendix B.1) when generating Diffie-Hellman number generator (see Appendix B.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.4.1)? (see Section 4.2.4.1)?
B.5. Client Tracking Prevention B.6. Client Tracking Prevention
Clients SHOULD NOT reuse a session ticket for multiple connections. Clients SHOULD NOT reuse a session ticket for multiple connections.
Reuse of a session ticket allows passive observers to correlate Reuse of a session ticket allows passive observers to correlate
different connections. Servers that issue session tickets SHOULD different connections. Servers that issue session tickets SHOULD
offer at least as many session tickets as the number of connections offer at least as many session tickets as the number of connections
that a client might use; for example, a web browser using HTTP/1.1 that a client might use; for example, a web browser using HTTP/1.1
[RFC7230] might open six connections to a server. Servers SHOULD [RFC7230] might open six connections to a server. Servers SHOULD
issue new session tickets with every connection. This ensures that issue new session tickets with every connection. This ensures that
clients are always able to use a new session ticket when creating a clients are always able to use a new session ticket when creating a
new connection. new connection.
skipping to change at page 105, line 34 skipping to change at page 103, line 8
The TLS protocol provides a built-in mechanism for version The TLS protocol provides a built-in mechanism for version
negotiation between endpoints potentially supporting different negotiation between endpoints potentially supporting different
versions of TLS. versions of TLS.
TLS 1.x and SSL 3.0 use compatible ClientHello messages. Servers can TLS 1.x and SSL 3.0 use compatible ClientHello messages. Servers can
also handle clients trying to use future versions of TLS as long as also handle clients trying to use future versions of TLS as long as
the ClientHello format remains compatible and the client supports the the ClientHello format remains compatible and the client supports the
highest protocol version available in the server. highest protocol version available in the server.
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.record_version & various purposes. (TLSPlaintext.legacy_record_version &
TLSCiphertext.record_version) As of TLS 1.3, this field is deprecated TLSCiphertext.legacy_record_version) As of TLS 1.3, this field is
and its value MUST be ignored by all implementations. Version deprecated and its value MUST be ignored by all implementations.
negotiation is performed using only the handshake versions. Version negotiation is performed using only the handshake versions.
(ClientHello.client_version & ServerHello.server_version) In order to (ClientHello.max_supported_version & ServerHello.version) In order to
maximize interoperability with older endpoints, implementations that maximize interoperability with older endpoints, implementations that
negotiate the use of TLS 1.0-1.2 SHOULD set the record layer version negotiate 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 number to 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.3.1.1) Section 4.3.1.1)
skipping to change at page 106, line 14 skipping to change at page 103, line 36
the master secret. Because TLS 1.3 always hashes in the transcript the master secret. Because TLS 1.3 always hashes in the transcript
up to the server CertificateVerify, implementations which support up to the server CertificateVerify, implementations which support
both TLS 1.3 and earlier versions SHOULD indicate the use of the both TLS 1.3 and earlier versions SHOULD indicate the use of the
Extended Master Secret extension in their APIs whenever TLS 1.3 is Extended Master Secret extension in their APIs whenever TLS 1.3 is
used. used.
C.1. Negotiating with an older server C.1. Negotiating with an older server
A TLS 1.3 client who wishes to negotiate with such older servers will A TLS 1.3 client who wishes to negotiate with such older servers will
send a normal TLS 1.3 ClientHello containing { 3, 4 } (TLS 1.3) in send a normal TLS 1.3 ClientHello containing { 3, 4 } (TLS 1.3) in
ClientHello.client_version. If the server does not support this ClientHello.max_supported_version. If the server does not support
version it will respond with a ServerHello containing an older this version it will respond with a ServerHello containing an older
version number. If the client agrees to use this version, the version number. If the client agrees to use this version, the
negotiation will proceed as appropriate for the negotiated protocol. negotiation will proceed as appropriate for the negotiated protocol.
A client resuming a session SHOULD initiate the connection using the A client resuming a session SHOULD initiate the connection using the
version that was previously negotiated. version that was previously negotiated.
Note that 0-RTT data is not compatible with older servers. See Note that 0-RTT data is not compatible with older servers. See
Appendix C.3. Appendix C.3.
If the version chosen by the server is not supported by the client If the version chosen by the server is not supported by the client
(or not acceptable), the client MUST send a "protocol_version" alert (or not acceptable), the client MUST send a "protocol_version" alert
skipping to change at page 106, line 46 skipping to change at page 104, line 23
scope of this document. Multiple connection attempts may be required scope of this document. Multiple connection attempts may be required
in order to negotiate a backwards compatible connection, however this in order to negotiate a backwards compatible connection, however this
practice is vulnerable to downgrade attacks and is NOT RECOMMENDED. practice is vulnerable to downgrade attacks and is NOT RECOMMENDED.
C.2. Negotiating with an older client C.2. Negotiating with an older client
A TLS server can also receive a ClientHello containing a version A TLS server can also receive a ClientHello containing a version
number smaller than the highest supported version. If the server number smaller than the highest supported version. If the server
wishes to negotiate with old clients, it will proceed as appropriate wishes to negotiate with old clients, it will proceed as appropriate
for the highest version supported by the server that is not greater for the highest version supported by the server that is not greater
than ClientHello.client_version. For example, if the server supports than ClientHello.max_supported_version. For example, if the server
TLS 1.0, 1.1, and 1.2, and client_version is TLS 1.0, the server will supports TLS 1.0, 1.1, and 1.2, and max_supported_version is TLS 1.0,
proceed with a TLS 1.0 ServerHello. If the server only supports the server will proceed with a TLS 1.0 ServerHello. If the server
versions greater than client_version, it MUST send a only supports versions greater than max_supported_version, it MUST
"protocol_version" alert message and close the connection. send a "protocol_version" alert message and close the connection.
Note that earlier versions of TLS did not clearly specify the record Note that earlier versions of TLS did not clearly specify the record
layer version number value in all cases layer version number value in all cases
(TLSPlaintext.record_version). Servers will receive various TLS 1.x (TLSPlaintext.legacy_record_version). Servers will receive various
versions in this field, however its value MUST always be ignored. TLS 1.x versions in this field, however its value MUST always be
ignored.
C.3. Zero-RTT backwards compatibility C.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
will not correctly skip the 0-RTT data and fail to complete the will not correctly skip the 0-RTT data and fail to complete the
handshake. This can cause issues when a client attempts to use handshake. This can cause issues when a client attempts to use
0-RTT, particularly against multi-server deployments. For example, a 0-RTT, particularly against multi-server deployments. For example, a
deployment could deploy TLS 1.3 gradually with some servers deployment could deploy TLS 1.3 gradually with some servers
implementing TLS 1.3 and some implementing TLS 1.2, or a TLS 1.3 implementing TLS 1.3 and some implementing TLS 1.2, or a TLS 1.3
skipping to change at page 108, line 12 skipping to change at page 105, line 40
RECOMMENDED to accept an SSL version 2.0 compatible CLIENT-HELLO in RECOMMENDED to accept an SSL version 2.0 compatible CLIENT-HELLO in
order to negotiate older versions of TLS. order to negotiate older versions of TLS.
Implementations MUST NOT send or accept any records with a version Implementations MUST NOT send or accept any records with a version
less than { 3, 0 }. less than { 3, 0 }.
The security of SSL 3.0 [SSL3] is considered insufficient for the The security of SSL 3.0 [SSL3] is considered insufficient for the
reasons enumerated in [RFC7568], and MUST NOT be negotiated for any reasons enumerated in [RFC7568], and MUST NOT be negotiated for any
reason. reason.
Implementations MUST NOT send a ClientHello.client_version or Implementations MUST NOT send a ClientHello.max_supported_version or
ServerHello.server_version set to { 3, 0 } or less. Any endpoint ServerHello.version set to { 3, 0 } or less. Any endpoint receiving
receiving a Hello message with ClientHello.client_version or a Hello message with ClientHello.max_supported_version or
ServerHello.server_version set to { 3, 0 } MUST respond with a ServerHello.version set to { 3, 0 } MUST respond with a
"protocol_version" alert message and close the connection. "protocol_version" alert message and close the connection.
Implementations MUST NOT use the Truncated HMAC extension, defined in Implementations MUST NOT use the Truncated HMAC extension, defined in
Section 7 of [RFC6066], as it is not applicable to AEAD ciphers and Section 7 of [RFC6066], as it is not applicable to AEAD ciphers and
has been shown to be insecure in some scenarios. has been shown to be insecure in some scenarios.
Appendix D. Overview of Security Properties Appendix D. Overview of Security Properties
[[TODO: This section is still a WIP and needs a bunch more work.]] [[TODO: This section is still a WIP and needs a bunch more work.]]
skipping to change at page 110, line 16 skipping to change at page 107, line 47
secret into a unique per-connection short-term session key. This secret into a unique per-connection short-term session key. This
secret may have been established in a previous handshake. If secret may have been established in a previous handshake. If
PSK-(EC)DHE modes are used, this session key will also be forward PSK-(EC)DHE modes are used, this session key will also be forward
secret. The resumption-PSK mode has been designed so that the secret. The resumption-PSK mode has been designed so that the
resumption master secret computed by connection N and needed to form resumption master secret computed by connection N and needed to form
connection N+1 is separate from the traffic keys used by connection connection N+1 is separate from the traffic keys used by connection
N, thus providing forward secrecy between the connections. N, thus providing forward secrecy between the connections.
For all handshake modes, the Finished MAC (and where present, the For all handshake modes, the Finished MAC (and where present, the
signature), prevents downgrade attacks. In addition, the use of signature), prevents downgrade attacks. In addition, the use of
certain bytes in the random nonces as described in Section 4.1.2 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.
skipping to change at page 111, line 15 skipping to change at page 108, line 47
Order protection/non-replayability An attacker should not be able to Order protection/non-replayability An attacker should not be able to
cause the receiver to accept a record which it has already cause the receiver to accept a record which it has already
accepted or cause the receiver to accept record N+1 without having accepted or cause the receiver to accept record N+1 without having
first processed record N. [[TODO: If we merge in DTLS to this first processed record N. [[TODO: If we merge in DTLS to this
document, we will need to update this guarantee.]] document, we will need to update this guarantee.]]
Length concealment. Given a record with a given external length, the Length concealment. Given a record with a given external length, the
attacker should not be able to determine the amount of the record attacker should not be able to determine the amount of the record
that is content versus padding. that is content versus padding.
Forward security after key change. If the traffic key update Forward security after key change. If the traffic key update
mechanism described in Section 4.4.3 has been used and the mechanism described in Section 4.4.3 has been used and the
previous generation key is deleted, an attacker who compromises previous generation key is deleted, an attacker who compromises
the endpoint should not be able to decrypt traffic encrypted with the endpoint should not be able to decrypt traffic encrypted with
the old key. the old key.
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
skipping to change at page 112, line 10 skipping to change at page 109, line 40
(EC)DHE exchange. (EC)DHE exchange.
The reader should refer to the following references for analysis of The reader should refer to the following references for analysis of
the TLS record layer. the TLS record layer.
Appendix E. Working Group Information Appendix E. 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://www1.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
Appendix F. Contributors Appendix F. Contributors
- Martin Abadi - Martin Abadi
University of California, Santa Cruz University of California, Santa Cruz
abadi@cs.ucsc.edu abadi@cs.ucsc.edu
 End of changes. 145 change blocks. 
661 lines changed or deleted 630 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/