draft-ietf-tls-tls13-16.txt   draft-ietf-tls-tls13-17.txt 
Network Working Group E. Rescorla Network Working Group E. Rescorla
Internet-Draft RTFM, Inc. Internet-Draft RTFM, Inc.
Obsoletes: 5077, 5246, 5746 (if September 22, 2016 Obsoletes: 5077, 5246, 5746 (if October 20, 2016
approved) approved)
Updates: 4492, 5705, 6066, 6961 (if Updates: 4492, 5705, 6066, 6961 (if
approved) approved)
Intended status: Standards Track Intended status: Standards Track
Expires: March 26, 2017 Expires: April 23, 2017
The Transport Layer Security (TLS) Protocol Version 1.3 The Transport Layer Security (TLS) Protocol Version 1.3
draft-ietf-tls-tls13-16 draft-ietf-tls-tls13-17
Abstract Abstract
This document specifies version 1.3 of the Transport Layer Security This document specifies version 1.3 of the Transport Layer Security
(TLS) protocol. TLS allows client/server applications to communicate (TLS) protocol. TLS allows client/server applications to communicate
over the Internet in a way that is designed to prevent eavesdropping, over the Internet in a way that is designed to prevent eavesdropping,
tampering, and message forgery. tampering, and message forgery.
Status of This Memo Status of This Memo
skipping to change at page 1, line 37 skipping to change at page 1, line 37
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 March 26, 2017. This Internet-Draft will expire on April 23, 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 26 skipping to change at page 2, line 26
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
1.3. Updates Affecting TLS 1.2 . . . . . . . . . . . . . . . . 12 1.3. Updates Affecting TLS 1.2 . . . . . . . . . . . . . . . . 12
2. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 12 2. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 13
2.1. Incorrect DHE Share . . . . . . . . . . . . . . . . . . . 15 2.1. Incorrect DHE Share . . . . . . . . . . . . . . . . . . . 16
2.2. Resumption and Pre-Shared Key (PSK) . . . . . . . . . . . 16 2.2. Resumption and Pre-Shared Key (PSK) . . . . . . . . . . . 17
2.3. Zero-RTT Data . . . . . . . . . . . . . . . . . . . . . . 18 2.3. Zero-RTT Data . . . . . . . . . . . . . . . . . . . . . . 19
3. Presentation Language . . . . . . . . . . . . . . . . . . . . 19 3. Presentation Language . . . . . . . . . . . . . . . . . . . . 21
3.1. Basic Block Size . . . . . . . . . . . . . . . . . . . . 19 3.1. Basic Block Size . . . . . . . . . . . . . . . . . . . . 21
3.2. Miscellaneous . . . . . . . . . . . . . . . . . . . . . . 20 3.2. Miscellaneous . . . . . . . . . . . . . . . . . . . . . . 21
3.3. Vectors . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.3. Vectors . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.4. Numbers . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.4. Numbers . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.5. Enumerateds . . . . . . . . . . . . . . . . . . . . . . . 21 3.5. Enumerateds . . . . . . . . . . . . . . . . . . . . . . . 23
3.6. Constructed Types . . . . . . . . . . . . . . . . . . . . 22 3.6. Constructed Types . . . . . . . . . . . . . . . . . . . . 24
3.6.1. Variants . . . . . . . . . . . . . . . . . . . . . . 22 3.7. Constants . . . . . . . . . . . . . . . . . . . . . . . . 24
3.7. Constants . . . . . . . . . . . . . . . . . . . . . . . . 23 3.7.1. Variants . . . . . . . . . . . . . . . . . . . . . . 25
3.8. Decoding Errors . . . . . . . . . . . . . . . . . . . . . 24 3.8. Decoding Errors . . . . . . . . . . . . . . . . . . . . . 26
4. Handshake Protocol . . . . . . . . . . . . . . . . . . . . . 24 4. Handshake Protocol . . . . . . . . . . . . . . . . . . . . . 26
4.1. Key Exchange Messages . . . . . . . . . . . . . . . . . . 25 4.1. Key Exchange Messages . . . . . . . . . . . . . . . . . . 27
4.1.1. Cryptographic Negotiation . . . . . . . . . . . . . . 26 4.1.1. Cryptographic Negotiation . . . . . . . . . . . . . . 28
4.1.2. Client Hello . . . . . . . . . . . . . . . . . . . . 27 4.1.2. Client Hello . . . . . . . . . . . . . . . . . . . . 29
4.1.3. Server Hello . . . . . . . . . . . . . . . . . . . . 29 4.1.3. Server Hello . . . . . . . . . . . . . . . . . . . . 31
4.1.4. Hello Retry Request . . . . . . . . . . . . . . . . . 31 4.1.4. Hello Retry Request . . . . . . . . . . . . . . . . . 33
4.2. Hello Extensions . . . . . . . . . . . . . . . . . . . . 32 4.2. Extensions . . . . . . . . . . . . . . . . . . . . . . . 34
4.2.1. Supported Versions . . . . . . . . . . . . . . . . . 34 4.2.1. Supported Versions . . . . . . . . . . . . . . . . . 36
4.2.2. Cookie . . . . . . . . . . . . . . . . . . . . . . . 35 4.2.2. Cookie . . . . . . . . . . . . . . . . . . . . . . . 36
4.2.3. Signature Algorithms . . . . . . . . . . . . . . . . 35 4.2.3. Signature Algorithms . . . . . . . . . . . . . . . . 37
4.2.4. Negotiated Groups . . . . . . . . . . . . . . . . . . 38 4.2.4. Negotiated Groups . . . . . . . . . . . . . . . . . . 40
4.2.5. Key Share . . . . . . . . . . . . . . . . . . . . . . 39 4.2.5. Key Share . . . . . . . . . . . . . . . . . . . . . . 41
4.2.6. Pre-Shared Key Extension . . . . . . . . . . . . . . 42 4.2.6. Pre-Shared Key Extension . . . . . . . . . . . . . . 44
4.2.7. Early Data Indication . . . . . . . . . . . . . . . . 43 4.2.7. Pre-Shared Key Exchange Modes . . . . . . . . . . . . 46
4.2.8. OCSP Status Extensions . . . . . . . . . . . . . . . 47 4.2.8. Early Data Indication . . . . . . . . . . . . . . . . 47
4.3. Server Parameters Messages . . . . . . . . . . . . . . . 47 4.3. Server Parameters . . . . . . . . . . . . . . . . . . . . 50
4.3.1. Encrypted Extensions . . . . . . . . . . . . . . . . 47 4.3.1. Encrypted Extensions . . . . . . . . . . . . . . . . 50
4.3.2. Certificate Request . . . . . . . . . . . . . . . . . 48 4.3.2. Certificate Request . . . . . . . . . . . . . . . . . 50
4.4. Authentication Messages . . . . . . . . . . . . . . . . . 50 4.4. Authentication Messages . . . . . . . . . . . . . . . . . 52
4.4.1. Certificate . . . . . . . . . . . . . . . . . . . . . 51 4.4.1. Certificate . . . . . . . . . . . . . . . . . . . . . 54
4.4.2. Certificate Verify . . . . . . . . . . . . . . . . . 54 4.4.2. Certificate Verify . . . . . . . . . . . . . . . . . 57
4.4.3. Finished . . . . . . . . . . . . . . . . . . . . . . 56 4.4.3. Finished . . . . . . . . . . . . . . . . . . . . . . 59
4.5. Post-Handshake Messages . . . . . . . . . . . . . . . . . 58 4.5. Post-Handshake Messages . . . . . . . . . . . . . . . . . 60
4.5.1. New Session Ticket Message . . . . . . . . . . . . . 58 4.5.1. New Session Ticket Message . . . . . . . . . . . . . 61
4.5.2. Post-Handshake Authentication . . . . . . . . . . . . 60 4.5.2. Post-Handshake Authentication . . . . . . . . . . . . 62
4.5.3. Key and IV Update . . . . . . . . . . . . . . . . . . 60 4.5.3. Key and IV Update . . . . . . . . . . . . . . . . . . 63
4.6. Handshake Layer and Key Changes . . . . . . . . . . . . . 61 4.6. Handshake Layer and Key Changes . . . . . . . . . . . . . 64
5. Record Protocol . . . . . . . . . . . . . . . . . . . . . . . 61 5. Record Protocol . . . . . . . . . . . . . . . . . . . . . . . 64
5.1. Record Layer . . . . . . . . . . . . . . . . . . . . . . 62 5.1. Record Layer . . . . . . . . . . . . . . . . . . . . . . 64
5.2. Record Payload Protection . . . . . . . . . . . . . . . . 63 5.2. Record Payload Protection . . . . . . . . . . . . . . . . 66
5.3. Per-Record Nonce . . . . . . . . . . . . . . . . . . . . 65 5.3. Per-Record Nonce . . . . . . . . . . . . . . . . . . . . 68
5.4. Record Padding . . . . . . . . . . . . . . . . . . . . . 66 5.4. Record Padding . . . . . . . . . . . . . . . . . . . . . 68
5.5. Limits on Key Usage . . . . . . . . . . . . . . . . . . . 67 5.5. Limits on Key Usage . . . . . . . . . . . . . . . . . . . 69
6. Alert Protocol . . . . . . . . . . . . . . . . . . . . . . . 67 6. Alert Protocol . . . . . . . . . . . . . . . . . . . . . . . 70
6.1. Closure Alerts . . . . . . . . . . . . . . . . . . . . . 68 6.1. Closure Alerts . . . . . . . . . . . . . . . . . . . . . 71
6.2. Error Alerts . . . . . . . . . . . . . . . . . . . . . . 70 6.2. Error Alerts . . . . . . . . . . . . . . . . . . . . . . 73
7. Cryptographic Computations . . . . . . . . . . . . . . . . . 72 7. Cryptographic Computations . . . . . . . . . . . . . . . . . 75
7.1. Key Schedule . . . . . . . . . . . . . . . . . . . . . . 72 7.1. Key Schedule . . . . . . . . . . . . . . . . . . . . . . 75
7.2. Updating Traffic Keys and IVs . . . . . . . . . . . . . . 75 7.2. Updating Traffic Keys and IVs . . . . . . . . . . . . . . 78
7.3. Traffic Key Calculation . . . . . . . . . . . . . . . . . 75 7.3. Traffic Key Calculation . . . . . . . . . . . . . . . . . 78
7.3.1. Diffie-Hellman . . . . . . . . . . . . . . . . . . . 76 7.3.1. Diffie-Hellman . . . . . . . . . . . . . . . . . . . 79
7.3.2. Elliptic Curve Diffie-Hellman . . . . . . . . . . . . 77 7.3.2. Elliptic Curve Diffie-Hellman . . . . . . . . . . . . 79
7.3.3. Exporters . . . . . . . . . . . . . . . . . . . . . . 77 7.3.3. Exporters . . . . . . . . . . . . . . . . . . . . . . 80
8. Compliance Requirements . . . . . . . . . . . . . . . . . . . 78 8. Compliance Requirements . . . . . . . . . . . . . . . . . . . 81
8.1. MTI Cipher Suites . . . . . . . . . . . . . . . . . . . . 78 8.1. MTI Cipher Suites . . . . . . . . . . . . . . . . . . . . 81
8.2. MTI Extensions . . . . . . . . . . . . . . . . . . . . . 78 8.2. MTI Extensions . . . . . . . . . . . . . . . . . . . . . 81
9. Security Considerations . . . . . . . . . . . . . . . . . . . 79 9. Security Considerations . . . . . . . . . . . . . . . . . . . 82
10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 79 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 82
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 83 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 86
11.1. Normative References . . . . . . . . . . . . . . . . . . 83 11.1. Normative References . . . . . . . . . . . . . . . . . . 86
11.2. Informative References . . . . . . . . . . . . . . . . . 85 11.2. Informative References . . . . . . . . . . . . . . . . . 88
Appendix A. Protocol Data Structures and Constant Values . . . . 93 Appendix A. Protocol Data Structures and Constant Values . . . . 94
A.1. Record Layer . . . . . . . . . . . . . . . . . . . . . . 93 A.1. Record Layer . . . . . . . . . . . . . . . . . . . . . . 94
A.2. Alert Messages . . . . . . . . . . . . . . . . . . . . . 93 A.2. Alert Messages . . . . . . . . . . . . . . . . . . . . . 94
A.3. Handshake Protocol . . . . . . . . . . . . . . . . . . . 95 A.3. Handshake Protocol . . . . . . . . . . . . . . . . . . . 96
A.3.1. Key Exchange Messages . . . . . . . . . . . . . . . . 95 A.3.1. Key Exchange Messages . . . . . . . . . . . . . . . . 96
A.3.2. Server Parameters Messages . . . . . . . . . . . . . 99 A.3.2. Server Parameters Messages . . . . . . . . . . . . . 100
A.3.3. Authentication Messages . . . . . . . . . . . . . . . 100 A.3.3. Authentication Messages . . . . . . . . . . . . . . . 101
A.3.4. Ticket Establishment . . . . . . . . . . . . . . . . 100 A.3.4. Ticket Establishment . . . . . . . . . . . . . . . . 101
A.3.5. Updating Keys . . . . . . . . . . . . . . . . . . . . 101 A.3.5. Updating Keys . . . . . . . . . . . . . . . . . . . . 102
A.4. Cipher Suites . . . . . . . . . . . . . . . . . . . . . . 101 A.4. Cipher Suites . . . . . . . . . . . . . . . . . . . . . . 102
Appendix B. Implementation Notes . . . . . . . . . . . . . . . . 102 Appendix B. Implementation Notes . . . . . . . . . . . . . . . . 103
B.1. API considerations for 0-RTT . . . . . . . . . . . . . . 102 B.1. API considerations for 0-RTT . . . . . . . . . . . . . . 103
B.2. Random Number Generation and Seeding . . . . . . . . . . 102 B.2. Random Number Generation and Seeding . . . . . . . . . . 103
B.3. Certificates and Authentication . . . . . . . . . . . . . 103 B.3. Certificates and Authentication . . . . . . . . . . . . . 104
B.4. Cipher Suite Support . . . . . . . . . . . . . . . . . . 103 B.4. Cipher Suite Support . . . . . . . . . . . . . . . . . . 104
B.5. Implementation Pitfalls . . . . . . . . . . . . . . . . . 103 B.5. Implementation Pitfalls . . . . . . . . . . . . . . . . . 104
B.6. Client Tracking Prevention . . . . . . . . . . . . . . . 105 B.6. Client Tracking Prevention . . . . . . . . . . . . . . . 106
B.7. Unauthenticated Operation . . . . . . . . . . . . . . . . 105 B.7. Unauthenticated Operation . . . . . . . . . . . . . . . . 106
Appendix C. Backward Compatibility . . . . . . . . . . . . . . . 105 Appendix C. Backward Compatibility . . . . . . . . . . . . . . . 106
C.1. Negotiating with an older server . . . . . . . . . . . . 106 C.1. Negotiating with an older server . . . . . . . . . . . . 107
C.2. Negotiating with an older client . . . . . . . . . . . . 107 C.2. Negotiating with an older client . . . . . . . . . . . . 108
C.3. Zero-RTT backwards compatibility . . . . . . . . . . . . 107 C.3. Zero-RTT backwards compatibility . . . . . . . . . . . . 108
C.4. Backwards Compatibility Security Restrictions . . . . . . 108 C.4. Backwards Compatibility Security Restrictions . . . . . . 109
Appendix D. Overview of Security Properties . . . . . . . . . . 109 Appendix D. Overview of Security Properties . . . . . . . . . . 109
D.1. Handshake . . . . . . . . . . . . . . . . . . . . . . . . 109 D.1. Handshake . . . . . . . . . . . . . . . . . . . . . . . . 110
D.2. Record Layer . . . . . . . . . . . . . . . . . . . . . . 111 D.2. Record Layer . . . . . . . . . . . . . . . . . . . . . . 112
Appendix E. Working Group Information . . . . . . . . . . . . . 112 Appendix E. Working Group Information . . . . . . . . . . . . . 114
Appendix F. Contributors . . . . . . . . . . . . . . . . . . . . 113 Appendix F. Contributors . . . . . . . . . . . . . . . . . . . . 114
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 117 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 118
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 26 skipping to change at page 6, line 26
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 (*) indicates changes to the wire protocol which may require
implementations to update. implementations to update.
draft-17
- Remove the 0-RTT Finished, resumption_context, and replace with a
psk_binder field in the PSK itself (*)
- Restructure PSK key exchange negotiation modes (*)
- Add max_early_data_size field to TicketEarlyDataInfo (*)
- Add a 0-RTT exporter and change the transcript for the regular
exporter (*)
- Merge TicketExtensions and Extensions registry. Changes
ticket_early_data_info code point (*)
- Replace Client.key_shares in response to HRR (*)
- Remove redundant labels for traffic key derivation (*)
- Harmonize requirements about cipher suite matching: for resumption
you need to match KDF but for 0-RTT you need whole cipher suite.
This allows PSKs to actually negotiate cipher suites. (*)
- Explicitly allow non-offered extensions in NewSessionTicket
- Explicitly allow predicting ClientFinished for NST
- Clarify conditions for allowing 0-RTT with PSK
draft-16 draft-16
- Revise version negotiation (*)
- Change RSASSA-PSS and EdDSA SignatureScheme codepoints for better - Change RSASSA-PSS and EdDSA SignatureScheme codepoints for better
backwards compatibility (*) backwards compatibility (*)
- Move HelloRetryRequest.selected_group to an extension (*) - Move HelloRetryRequest.selected_group to an extension (*)
- Clarify the behavior of no exporter context and make it the same - Clarify the behavior of no exporter context and make it the same
as an empty context.(*) as an empty context.(*)
- New KeyUpdate format that allows for requesting/not-requesting an - New KeyUpdate format that allows for requesting/not-requesting an
answer (*) answer. This also means changes to the key schedule to support
independent updates (*)
- New certificate_required alert (*) - New certificate_required alert (*)
- Forbid CertificateRequest with 0-RTT and PSK. - Forbid CertificateRequest with 0-RTT and PSK.
- Relax requirement to check SNI for 0-RTT. - Relax requirement to check SNI for 0-RTT.
draft-15 draft-15
- New negotiation syntax as discussed in Berlin (*) - New negotiation syntax as discussed in Berlin (*)
skipping to change at page 7, line 20 skipping to change at page 8, line 5
- Guidance on 0-RTT time windows. - Guidance on 0-RTT time windows.
- Rename a bunch of fields. - Rename a bunch of fields.
- Remove old PRNG text. - Remove old PRNG text.
- Explicitly require checking that handshake records not span key - Explicitly require checking that handshake records not span key
changes. changes.
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 (*). accommodate tlsdate (*).
- Define ecdsa_sha1 (*). - Define ecdsa_sha1 (*).
- Allow resumption even after fatal alerts. This matches current - Allow resumption even after fatal alerts. This matches current
practice. practice.
- Remove non-closure warning alerts. Require treating unknown - Remove non-closure warning alerts. Require treating unknown
alerts as fatal. alerts as fatal.
- Make the rules for accepting 0-RTT less restrictive. - Make the rules for accepting 0-RTT less restrictive.
skipping to change at page 9, line 4 skipping to change at page 9, line 36
algorithm, and curve together. This is backwards compatible. algorithm, and curve together. This is backwards compatible.
- Make ticket lifetime mandatory and limit it to a week. - Make ticket lifetime mandatory and limit it to a week.
- Make the purpose strings lower-case. This matches how people are - Make the purpose strings lower-case. This matches how people are
implementing for interop. implementing for interop.
- Define exporters. - Define exporters.
- Editorial cleanup - Editorial cleanup
draft-11
- Port the CFRG curves & signatures work from RFC4492bis. - Port the CFRG curves & signatures work from RFC4492bis.
- Remove sequence number and version from additional_data, which is - Remove sequence number and version from additional_data, which is
now empty. now empty.
- Reorder values in HkdfLabel. - Reorder values in HkdfLabel.
- Add support for version anti-downgrade mechanism. - Add support for version anti-downgrade mechanism.
- Update IANA considerations section and relax some of the policies. - Update IANA considerations section and relax some of the policies.
skipping to change at page 11, line 5 skipping to change at page 11, line 38
draft-06 draft-06
- Prohibit RC4 negotiation for backwards compatibility. - Prohibit RC4 negotiation for backwards compatibility.
- Freeze & deprecate record layer version field. - Freeze & deprecate record layer version field.
- Update format of signatures with context. - Update format of signatures with context.
- Remove explicit IV. - Remove explicit IV.
draft-05
- Prohibit SSL negotiation for backwards compatibility. - Prohibit SSL negotiation for backwards compatibility.
- Fix which MS is used for exporters. - Fix which MS is used for exporters.
draft-04 draft-04
- Modify key computations to include session hash. - Modify key computations to include session hash.
- Remove ChangeCipherSpec. - Remove ChangeCipherSpec.
skipping to change at page 12, line 39 skipping to change at page 13, line 25
termination of the connection, optionally preceded by an alert termination of the connection, optionally preceded by an alert
message (Section 6). message (Section 6).
TLS supports three basic key exchange modes: TLS supports three basic key exchange modes:
- Diffie-Hellman (both the finite field and elliptic curve - Diffie-Hellman (both the finite field and elliptic curve
varieties), varieties),
- A pre-shared symmetric key (PSK), and - A pre-shared symmetric key (PSK), and
- A combination of a symmetric key and Diffie-Hellman. - A combination of PSK and Diffie-Hellman.
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*
| + pre_shared_key_modes*
v + pre_shared_key* --------> v + pre_shared_key* -------->
ServerHello ^ Key ServerHello ^ Key
+ key_share* | Exch + key_share* | Exch
+ pre_shared_key* v + pre_shared_key* v
{EncryptedExtensions} ^ Server {EncryptedExtensions} ^ Server
{CertificateRequest*} v Params {CertificateRequest*} v Params
{Certificate*} ^ {Certificate*} ^
{CertificateVerify*} | Auth {CertificateVerify*} | Auth
{Finished} v {Finished} v
<-------- [Application Data*] <-------- [Application Data*]
^ {Certificate*} ^ {Certificate*}
Auth | {CertificateVerify*} Auth | {CertificateVerify*}
v {Finished} --------> v {Finished} -------->
[Application Data] <-------> [Application Data] [Application Data] <-------> [Application Data]
+ Indicates extensions sent in the + Indicates extensions sent in the
previously noted message. previously noted message.
* Indicates optional or situation-dependent * Indicates optional or situation-dependent
messages that are not always sent. messages/extensions that are not always sent.
{} Indicates messages protected using keys {} Indicates messages protected using keys
derived from handshake_traffic_secret. derived from handshake_traffic_secret.
[] Indicates messages protected using keys [] Indicates messages protected using keys
derived from traffic_secret_N derived from traffic_secret_N
Figure 1: Message flow for full TLS Handshake Figure 1: Message flow for full TLS Handshake
The handshake can be thought of as having three phases (indicated in The handshake can be thought of as having three phases (indicated in
skipping to change at page 14, line 9 skipping to change at page 15, line 9
the client is authenticated, application layer protocol support, the client is authenticated, application layer protocol support,
etc.). etc.).
- Authentication: Authenticate the server (and optionally the - Authentication: Authenticate the server (and optionally the
client) and provide key confirmation and handshake integrity. client) and provide key confirmation and handshake integrity.
In the Key Exchange phase, the client sends the ClientHello In the Key Exchange phase, the client sends the ClientHello
(Section 4.1.2) message, which contains a random nonce (Section 4.1.2) message, which contains a random nonce
(ClientHello.random); its offered protocol versions; a list of (ClientHello.random); its offered protocol versions; a list of
symmetric cipher/HKDF hash pairs; some set of Diffie-Hellman key symmetric cipher/HKDF hash pairs; some set of Diffie-Hellman key
shares (in the "key_share" extension Section 4.2.5), one or more pre- shares (in the "key_share" extension Section 4.2.5), a set of pre-
shared key labels (in the "pre_shared_key" extension Section 4.2.6), shared key labels (in the "pre_shared_key" extension Section 4.2.6)
or both; and potentially some other extensions. or both; and potentially some other extensions.
The server processes the ClientHello and determines the appropriate The server processes the ClientHello and determines the appropriate
cryptographic parameters for the connection. It then responds with cryptographic parameters for the connection. It then responds with
its own ServerHello, which indicates the negotiated connection its own ServerHello, which indicates the negotiated connection
parameters. [Section 4.1.3]. The combination of the ClientHello and parameters. [Section 4.1.3]. The combination of the ClientHello and
the ServerHello determines the shared keys. If (EC)DHE key the ServerHello determines the shared keys. If (EC)DHE key
establishment is in use, then the ServerHello contains a "key_share" establishment is in use, then the ServerHello contains a "key_share"
extension with the server's ephemeral Diffie-Hellman share which MUST extension with the server's ephemeral Diffie-Hellman share which MUST
be in the same group as one of the client's shares. If PSK key be in the same group as one of the client's shares. If PSK key
establishment is in use, then the ServerHello contains a establishment is in use, then the ServerHello contains a
"pre_shared_key" extension indicating which of the client's offered "pre_shared_key" extension indicating which of the client's offered
PSKs was selected. Note that implementations can use (EC)DHE and PSK PSKs was selected. Note that implementations can use (EC)DHE and PSK
together, in which case both extensions will be supplied. 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 that are not EncryptedExtensions: responses to any extensions that are not
required to determine the cryptographic parameters. required to determine the cryptographic parameters, other than
those that are specific to individual certificates.
[Section 4.3.1] [Section 4.3.1]
CertificateRequest. if certificate-based client authentication is CertificateRequest: if certificate-based client authentication is
desired, the desired parameters for that certificate. This desired, the desired parameters for that certificate. This
message is omitted if client authentication is not desired. message is omitted if client authentication is not desired.
[Section 4.3.2] [Section 4.3.2]
Finally, the client and server exchange Authentication messages. TLS Finally, the client and server exchange Authentication messages. TLS
uses the same set of messages every time that authentication is uses the same set of messages every time that authentication is
needed. Specifically: needed. Specifically:
Certificate. the certificate of the endpoint. This message is Certificate: the certificate of the endpoint and any per-certificate
omitted if the server is not authenticating with a certificate. extensions. This message is omitted by the server if not
Note that if raw public keys [RFC7250] or the cached information authenticating with a certificate and by the client if the server
extension [RFC7924] are in use, then this message will not contain did not send CertificateRequest (thus indicating that the client
a certificate but rather some other value corresponding to the should not authenticate with a certificate). Note that if raw
public keys [RFC7250] or the cached information extension
[RFC7924] are in use, then this message will not contain a
certificate but rather some other value corresponding to the
server's long-term key. [Section 4.4.1] server's long-term key. [Section 4.4.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. the endpoint is not authenticating via a certificate.
[Section 4.4.2] [Section 4.4.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.4.3] authenticates the handshake. [Section 4.4.3]
Upon receiving the server's messages, the client responds with its Upon receiving the server's messages, the client responds with its
Authentication messages, namely Certificate and CertificateVerify (if Authentication messages, namely Certificate and CertificateVerify (if
requested), and Finished. requested), and Finished.
At this point, the handshake is complete, and the client and server At this point, the handshake is complete, and the client and server
may exchange application layer data. Application data MUST NOT be may exchange application layer data. Application data MUST NOT be
skipping to change at page 16, line 8 skipping to change at page 17, line 8
(e.g., it includes only DHE or ECDHE groups unacceptable or (e.g., it includes only DHE or ECDHE groups unacceptable or
unsupported by the server), the server corrects the mismatch with a unsupported by the server), the server corrects the mismatch with a
HelloRetryRequest and the client needs to restart the handshake with HelloRetryRequest and the client needs to restart the handshake with
an appropriate "key_share" extension, as shown in Figure 2. If no an appropriate "key_share" extension, as shown in Figure 2. If no
common cryptographic parameters can be negotiated, the server MUST common cryptographic parameters can be negotiated, the server MUST
abort the handshake with an appropriate alert. abort the handshake with an appropriate alert.
Client Server Client Server
ClientHello ClientHello
+ key_share --------> + key_share -------->
<-------- HelloRetryRequest <-------- HelloRetryRequest
+ key_share
ClientHello ClientHello
+ key_share --------> + key_share -------->
ServerHello ServerHello
+ key_share + key_share
{EncryptedExtensions} {EncryptedExtensions}
{CertificateRequest*} {CertificateRequest*}
{Certificate*} {Certificate*}
{CertificateVerify*} {CertificateVerify*}
{Finished} {Finished}
<-------- [Application Data*] <-------- [Application Data*]
{Certificate*} {Certificate*}
{CertificateVerify*} {CertificateVerify*}
skipping to change at page 17, line 12 skipping to change at page 18, line 12
secrecy in combination with shared keys, or can be used alone, at the secrecy in combination with shared keys, or can be used alone, at the
cost of losing forward secrecy. cost of losing forward 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
+ key_share + key_share
{EncryptedExtensions} {EncryptedExtensions}
{CertificateRequest*} {CertificateRequest*}
{Certificate*} {Certificate*}
{CertificateVerify*} {CertificateVerify*}
{Finished} {Finished}
<-------- [Application Data*] <-------- [Application Data*]
{Certificate*} {Certificate*}
{CertificateVerify*} {CertificateVerify*}
{Finished} --------> {Finished} -------->
<-------- [NewSessionTicket] <-------- [NewSessionTicket]
[Application Data] <-------> [Application Data] [Application Data] <-------> [Application Data]
Subsequent Handshake: Subsequent Handshake:
ClientHello ClientHello
+ pre_shared_key + key_share*
+ key_share* --------> + psk_key_exchange_modes
+ pre_shared_key -------->
ServerHello ServerHello
+ pre_shared_key + pre_shared_key
+ key_share* + key_share*
{EncryptedExtensions} {EncryptedExtensions}
{Finished} {Finished}
<-------- [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 message. When a client offers Certificate or a CertificateVerify message. When a client offers
resumption via PSK, it SHOULD also supply a "key_share" extension to resumption via PSK, it SHOULD also supply a "key_share" extension to
the server as well to allow the server to decline resumption and fall the server as well to allow the server to decline resumption and fall
back to a full handshake, if needed. The server responds with a back to a full handshake, if needed. The server responds with a
"pre_shared_key" extension to negotiate use of PSK key establishment "pre_shared_key" extension to negotiate use of PSK key establishment
and can (as shown here) respond with a "key_share" extension to do and can (as shown here) respond with a "key_share" extension to do
(EC)DHE key establishment, thus providing forward secrecy. (EC)DHE key establishment, thus providing forward secrecy.
When PSKs are provisioned out of band, the PSK identity and the KDF
to be used with the PSK MUST also be provisioned.
2.3. Zero-RTT Data 2.3. Zero-RTT Data
When resuming via a PSK with an appropriate ticket (i.e., one with When clients and servers share a PSK (either obtained out-of-band or
the "early_data_info" extension), clients can also send data on their via a previous handshake), TLS 1.3 allows clients to send data on the
first flight ("early data"). This data is encrypted solely under first flight ("early data"). The client uses the PSK to authenticate
keys derived using the first offered PSK as the static secret. As the server and to encrypt the early data.
shown in Figure 4, the Zero-RTT data is just added to the 1-RTT
When clients use a PSK obtained out-of-band then the following
additional information MUST be provisioned to both parties:
- The cipher suite for use with this PSK
- The Application-Layer Protocol Negotiation (ALPN) protocol, if any
is to be used
- The Server Name Indication (SNI), if any is to be used
As shown in Figure 4, the Zero-RTT data is just added to the 1-RTT
handshake in the first flight. The rest of the handshake uses the handshake in the first flight. The rest of the handshake uses the
same messages as with a 1-RTT handshake with PSK resumption. same messages as with a 1-RTT handshake with PSK resumption.
Client Server Client Server
ClientHello ClientHello
+ early_data + early_data
+ pre_shared_key + key_share*
+ key_share* + pre_shared_key_modes
(Finished) + pre_shared_key
(Application Data*) (Application Data*)
(end_of_early_data) --------> (end_of_early_data) -------->
ServerHello ServerHello
+ early_data + early_data
+ pre_shared_key + pre_shared_key
+ key_share* + key_share*
{EncryptedExtensions} {EncryptedExtensions}
{Finished} {Finished}
<-------- [Application Data*] <-------- [Application Data*]
{Finished} --------> {Finished} -------->
[Application Data] <-------> [Application Data] [Application Data] <-------> [Application Data]
* Indicates optional or situation-dependent * Indicates optional or situation-dependent
messages that are not always sent. messages/extensions that are not always sent.
() Indicates messages protected using keys () Indicates messages protected using keys
derived from client_early_traffic_secret. derived from client_early_traffic_secret.
{} Indicates messages protected using keys {} Indicates messages protected using keys
derived from handshake_traffic_secret. derived from handshake_traffic_secret.
[] 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
authenticating via a signature https://github.com/tlswg/tls13-spec/
issues/443]]
IMPORTANT NOTE: The security properties for 0-RTT data are weaker IMPORTANT NOTE: The security properties for 0-RTT data are weaker
than those for other kinds of TLS data. Specifically: than those for other kinds of TLS data. Specifically:
1. This data is not forward secret, because it is encrypted solely 1. This data is not forward secret, as it is encrypted solely under
with the PSK. keys derived using the offered PSK.
2. There are no guarantees of non-replay between connections. 2. There are no guarantees of non-replay between connections.
Unless the server takes special measures outside those provided Unless the server takes special measures outside those provided
by TLS, the server has no guarantee that the same 0-RTT data was by TLS, the server has no guarantee that the same 0-RTT data was
not transmitted on multiple 0-RTT connections (See not transmitted on multiple 0-RTT connections (See
Section 4.2.7.2 for more details). This is especially relevant Section 4.2.8.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
authentication or inside the application layer protocol. authentication or inside the application layer protocol.
However, 0-RTT data cannot be duplicated within a connection However, 0-RTT data cannot be duplicated within a connection
(i.e., the server will not process the same data twice for the (i.e., the server will not process the same data twice for the
same connection) and an attacker will not be able to make 0-RTT same connection) and an attacker will not be able to make 0-RTT
data appear to be 1-RTT data (because it is protected with data appear to be 1-RTT data (because it is protected with
different keys.) different keys.)
Protocols MUST NOT use 0-RTT data without a profile that defines its
use. That profile needs to identify which messages or interactions
are safe to use with 0-RTT. In addition, to avoid accidental misuse,
implementations SHOULD NOT enable 0-RTT unless specifically
requested. Special functions for 0-RTT data are RECOMMENDED to
ensure that an application is always aware that it is sending or
receiving data that might be replayed.
The same warnings apply to any use of the early exporter secret.
The remainder of this document provides a detailed description of The remainder of this document provides a detailed description of
TLS. TLS.
3. Presentation Language 3. Presentation Language
This document deals with the formatting of data in an external This document deals with the formatting of data in an external
representation. The following very basic and somewhat casually representation. The following very basic and somewhat casually
defined presentation syntax will be used. The syntax draws from defined presentation syntax will be used.
several sources in its structure. Although it resembles the
programming language "C" in its syntax and XDR [RFC4506] in both its
syntax and intent, it would be risky to draw too many parallels. The
purpose of this presentation language is to document TLS only; it has
no general application beyond that particular goal.
3.1. Basic Block Size 3.1. Basic Block Size
The representation of all data items is explicitly specified. The The representation of all data items is explicitly specified. The
basic data block size is one byte (i.e., 8 bits). Multiple byte data basic data block size is one byte (i.e., 8 bits). Multiple byte data
items are concatenations of bytes, from left to right, from top to items are concatenations of bytes, from left to right, from top to
bottom. From the byte stream, a multi-byte item (a numeric in the bottom. From the byte stream, a multi-byte item (a numeric in the
example) is formed (using C notation) by: example) is formed (using C notation) by:
value = (byte[0] << 8*(n-1)) | (byte[1] << 8*(n-2)) | value = (byte[0] << 8*(n-1)) | (byte[1] << 8*(n-2)) |
skipping to change at page 21, line 31 skipping to change at page 23, line 23
uint8 uint24[3]; uint8 uint24[3];
uint8 uint32[4]; uint8 uint32[4];
uint8 uint64[8]; uint8 uint64[8];
All values, here and elsewhere in the specification, are stored in All values, here and elsewhere in the specification, are stored in
network byte (big-endian) order; the uint32 represented by the hex network byte (big-endian) order; the uint32 represented by the hex
bytes 01 02 03 04 is equivalent to the decimal value 16909060. bytes 01 02 03 04 is equivalent to the decimal value 16909060.
3.5. Enumerateds 3.5. Enumerateds
An additional sparse data type is available called enum. A field of An additional sparse data type is available called enum. Each
type enum can only assume the values declared in the definition. definition is a different type. Only enumerateds of the same type
Each definition is a different type. Only enumerateds of the same may be assigned or compared. Every element of an enumerated must be
type may be assigned or compared. Every element of an enumerated assigned a value, as demonstrated in the following example. Since
must be assigned a value, as demonstrated in the following example. the elements of the enumerated are not ordered, they can be assigned
Since the elements of the enumerated are not ordered, they can be any unique value, in any order.
assigned any unique value, in any order.
enum { e1(v1), e2(v2), ... , en(vn) [[, (n)]] } Te; enum { e1(v1), e2(v2), ... , en(vn) [[, (n)]] } Te;
Future extension or additions to the protocol may define new values.
Implementations need to be able to parse and ignore unknown values
unless the definition of the field states otherwise.
An enumerated occupies as much space in the byte stream as would its An enumerated occupies as much space in the byte stream as would its
maximal defined ordinal value. The following definition would cause maximal defined ordinal value. The following definition would cause
one byte to be used to carry fields of type Color. one byte to be used to carry fields of type Color.
enum { red(3), blue(5), white(7) } Color; enum { red(3), blue(5), white(7) } Color;
One may optionally specify a value without its associated tag to One may optionally specify a value without its associated tag to
force the width definition without defining a superfluous element. force the width definition without defining a superfluous element.
In the following example, Taste will consume two bytes in the data In the following example, Taste will consume two bytes in the data
stream but can only assume the values 1, 2, or 4. stream but can only assume the values 1, 2, or 4 in current version
of protocol.
enum { sweet(1), sour(2), bitter(4), (32000) } Taste; enum { sweet(1), sour(2), bitter(4), (32000) } Taste;
The names of the elements of an enumeration are scoped within the The names of the elements of an enumeration are scoped within the
defined type. In the first example, a fully qualified reference to defined type. In the first example, a fully qualified reference to
the second element of the enumeration would be Color.blue. Such the second element of the enumeration would be Color.blue. Such
qualification is not required if the target of the assignment is well qualification is not required if the target of the assignment is well
specified. specified.
Color color = Color.blue; /* overspecified, legal */ Color color = Color.blue; /* overspecified, legal */
Color color = blue; /* correct, type implicit */ Color color = blue; /* correct, type implicit */
For enumerateds that are never converted to external representation, For enumerateds that are never converted to external representation,
the numerical information may be omitted. the numerical information may be omitted.
enum { low, medium, high } Amount; enum { low, medium, high } Amount;
The names assigned to enumerateds do not need to be unique. The
numerical value can describe a range over which the same name
applies. The value includes the minimum and maximum inclusive values
in that range, separated by two period characters. This is
principally useful for reserving regions of the space.
enum { sad(0), meh(1..254), happy (255) } Mood;
3.6. Constructed Types 3.6. Constructed Types
Structure types may be constructed from primitive types for Structure types may be constructed from primitive types for
convenience. Each specification declares a new, unique type. The convenience. Each specification declares a new, unique type. The
syntax for definition is much like that of C. syntax for definition is much like that of C.
struct { struct {
T1 f1; T1 f1;
T2 f2; T2 f2;
... ...
Tn fn; Tn fn;
} [[T]]; } [[T]];
The fields within a structure may be qualified using the type's name, The fields within a structure may be qualified using the type's name,
with a syntax much like that available for enumerateds. For example, with a syntax much like that available for enumerateds. For example,
T.f2 refers to the second field of the previous declaration. T.f2 refers to the second field of the previous declaration.
Structure definitions may be embedded. Structure definitions may be embedded. Anonymous structs may also be
defined inside other structures.
3.6.1. Variants 3.7. Constants
Fields and variables may be assigned a fixed value using "=", as in:
struct {
T1 f1 = 8; /* T.f1 must always be 8 */
T2 f2;
} T;
3.7.1. Variants
Defined structures may have variants based on some knowledge that is Defined structures may have variants based on some knowledge that is
available within the environment. The selector must be an enumerated available within the environment. The selector must be an enumerated
type that defines the possible variants the structure defines. There type that defines the possible variants the structure defines. There
must be a case arm for every element of the enumeration declared in must be a case arm for every element of the enumeration declared in
the select. Case arms have limited fall-through: if two case arms the select. Case arms have limited fall-through: if two case arms
follow in immediate succession with no fields in between, then they follow in immediate succession with no fields in between, then they
both contain the same fields. Thus, in the example below, "orange" both contain the same fields. Thus, in the example below, "orange"
and "banana" both contain V2. Note that this piece of syntax was and "banana" both contain V2. Note that this piece of syntax was
added in TLS 1.2 [RFC5246]. added in TLS 1.2 [RFC5246]. Each case arm can have one or more
fields.
The body of the variant structure may be given a label for reference. The body of the variant structure may be given a label for reference.
The mechanism by which the variant is selected at runtime is not The mechanism by which the variant is selected at runtime is not
prescribed by the presentation language. prescribed by the presentation language.
struct { struct {
T1 f1; T1 f1;
T2 f2; T2 f2;
.... ....
Tn fn; Tn fn;
select (E) { select (E) {
case e1: Te1; case e1: Te1;
case e2: Te2; case e2: Te21;
Te22;
case e3: case e4: Te3; case e3: case e4: Te3;
.... ....
case en: Ten; case en: Ten;
} [[fv]]; } [[fv]];
} [[Tv]]; } [[Tv]];
For example: For example:
enum { apple, orange, banana } VariantTag; enum { apple, orange, banana } VariantTag;
skipping to change at page 23, line 47 skipping to change at page 26, line 27
struct { struct {
select (VariantTag) { /* value of selector is implicit */ select (VariantTag) { /* value of selector is implicit */
case apple: case apple:
V1; /* VariantBody, tag = apple */ V1; /* VariantBody, tag = apple */
case orange: case orange:
case banana: case banana:
V2; /* VariantBody, tag = orange or banana */ V2; /* VariantBody, tag = orange or banana */
} variant_body; /* optional label on variant */ } variant_body; /* optional label on variant */
} VariantRecord; } VariantRecord;
3.7. Constants
Typed constants can be defined for purposes of specification by
declaring a symbol of the desired type and assigning values to it.
Under-specified types (opaque, variable-length vectors, and
structures that contain opaque) cannot be assigned values. No fields
of a multi-element structure or vector may be omitted.
For example:
struct {
uint8 f1;
uint8 f2;
} Example1;
Example1 ex1 = {1, 4}; /* assigns f1 = 1, f2 = 4 */
3.8. Decoding Errors 3.8. Decoding Errors
TLS defines two generic alerts (see Section 6) to use upon failure to TLS defines two generic alerts (see Section 6) to use upon failure to
parse a message. Peers which receive a message which cannot be parse a message. Peers which receive a message which cannot be
parsed according to the syntax (e.g., have a length extending beyond parsed according to the syntax (e.g., have a length extending beyond
the message boundary or contain an out-of-range length) MUST the message boundary or contain an out-of-range length) MUST
terminate the connection with a "decoding_error" alert. Peers which terminate the connection with a "decode_error" alert. Peers which
receive a message which is syntactically correct but semantically receive a message which is syntactically correct but semantically
invalid (e.g., a DHE share of p - 1) MUST terminate the connection invalid (e.g., a DHE share of p - 1, or an invalid enum) MUST
with an "illegal_parameter" alert. terminate the connection with an "illegal_parameter" alert.
4. Handshake Protocol 4. Handshake Protocol
The handshake protocol is used to negotiate the secure attributes of The handshake protocol is used to negotiate the secure attributes of
a session. Handshake messages are supplied to the TLS record layer, a session. Handshake messages are supplied to the TLS record layer,
where they are encapsulated within one or more TLSPlaintext or where they are encapsulated within one or more TLSPlaintext or
TLSCiphertext structures, which are processed and transmitted as TLSCiphertext structures, which are processed and transmitted as
specified by the current active session state. specified by the current active session state.
enum { enum {
skipping to change at page 25, line 39 skipping to change at page 27, line 39
case certificate_verify: CertificateVerify; case certificate_verify: CertificateVerify;
case finished: Finished; case finished: Finished;
case new_session_ticket: NewSessionTicket; case new_session_ticket: NewSessionTicket;
case key_update: KeyUpdate; case key_update: KeyUpdate;
} body; } body;
} Handshake; } Handshake;
Protocol messages MUST be sent in the order defined below (and shown Protocol messages MUST be sent in the order defined below (and shown
in the diagrams in Section 2). A peer which receives a handshake in the diagrams in Section 2). A peer which receives a handshake
message in an unexpected order MUST abort the handshake with an message in an unexpected order MUST abort the handshake with an
"unexpected_message" alert. results in an "unexpected_message" fatal "unexpected_message" alert. Unneeded handshake messages are omitted,
error. Unneeded handshake messages are omitted, however. however.
New handshake message types are assigned by IANA as described in New handshake message types are assigned by IANA as described in
Section 10. Section 10.
4.1. Key Exchange Messages 4.1. Key Exchange Messages
The key exchange messages are used to exchange security capabilities The key exchange messages are used to exchange security capabilities
between the client and server and to establish the traffic keys used between the client and server and to establish the traffic keys used
to protect the handshake and data. to protect the handshake and data.
4.1.1. Cryptographic Negotiation 4.1.1. Cryptographic Negotiation
TLS cryptographic negotiation proceeds by the client offering the TLS cryptographic negotiation proceeds by the client offering the
following four sets of options in its ClientHello: following four sets of options in its ClientHello:
- A list of cipher suites which indicates the AEAD algorithm/HKDF - A list of cipher suites which indicates the AEAD algorithm/HKDF
hash pairs which the client supports. hash pairs which the client supports.
- A "supported_group" (Section 4.2.4) extension which indicates the - A "supported_groups" (Section 4.2.4) extension which indicates the
(EC)DHE groups which the client supports and a "key_share" (EC)DHE groups which the client supports and a "key_share"
(Section 4.2.5) extension which contains (EC)DHE shares for some (Section 4.2.5) extension which contains (EC)DHE shares for some
or all of these groups. or all of these groups.
- A "signature_algorithms" (Section 4.2.3) extension which indicates - A "signature_algorithms" (Section 4.2.3) extension which indicates
the signature algorithms which the client can accept. the signature algorithms which the client can accept.
- A "pre_shared_key" (Section 4.2.6) extension which contains the - A "pre_shared_key" (Section 4.2.6) extension which contains a list
identities of symmetric keys known to the client and the key of symmetric key identities known to the client and a
exchange modes which each PSK supports. "psk_key_exchange_modes" (Section 4.2.7) extension which indicates
the key exchange modes that may be used with PSKs.
If the server does not select a PSK, then the first three of these If the server does not select a PSK, then the first three of these
options are entirely orthogonal: the server independently selects a options are entirely orthogonal: the server independently selects a
cipher suite, an (EC)DHE group and key share for key establishment, cipher suite, an (EC)DHE group and key share for key establishment,
and a signature algorithm/certificate pair to authenticate itself to and a signature algorithm/certificate pair to authenticate itself to
the client. If there is overlap in the "supported_group" extension the client. If there is overlap in the "supported_groups" extension
but the client did not offer a compatible "key_share" extension, then but the client did not offer a compatible "key_share" extension, then
the server will respond with a HelloRetryRequest (Section 4.1.4) the server will respond with a HelloRetryRequest (Section 4.1.4)
message. message. If there is no overlap in "supported_groups" then the
server MUST abort the handshake.
If the server selects a PSK, then the PSK will indicate which key If the server selects a PSK, then it MUST also select a key
establishment modes it can be used with (PSK alone or with (EC)DHE) establishment mode from the set indicated by client's
and which authentication modes it can be used with (PSK alone or PSK "psk_key_exchange_modes extension (PSK alone or with (EC)DHE). Note
with signatures). The server can then select those key establishment that if the PSK can be used without (EC)DHE then non-overlap in the
and authentication parameters to be consistent both with the PSK and "supported_groups" parameters need not be fatal.
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 The server indicates its selected parameters in the ServerHello as
follows: follows:
- If PSK is being used then the server will send a "pre_shared_key" - If PSK is being used then the server will send a "pre_shared_key"
extension indicating the selected key. extension indicating the selected key.
- If PSK is not being used, then (EC)DHE and certificate-based - If PSK is not being used, then (EC)DHE and certificate-based
authentication are always used. authentication are always used.
- When (EC)DHE is in use, the server will also provide a "key_share" - When (EC)DHE is in use, the server will also provide a "key_share"
extension. extension.
- When authenticating via a certificate, the server will send an - When authenticating via a certificate (i.e., when a PSK is not in
empty "signature_algorithms" extension in the ServerHello and will use), the server will send the Certificate (Section 4.4.1) and
subsequently send Certificate (Section 4.4.1) and
CertificateVerify (Section 4.4.2) messages. CertificateVerify (Section 4.4.2) messages.
If the server is unable to negotiate a supported set of parameters If the server is unable to negotiate a supported set of parameters
(i.e., there is no overlap between the client and server parameters), (i.e., there is no overlap between the client and server parameters),
it MUST abort the handshake and and SHOULD send either a it MUST abort the handshake with either a "handshake_failure" or
"handshake_failure" or "insufficient_security" fatal alert (see "insufficient_security" fatal alert (see Section 6).
Section 6).
4.1.2. Client Hello 4.1.2. Client Hello
When this message will be sent: 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
When a client first connects to a server, it is REQUIRED to send ClientHello when the server has responded to its ClientHello with a
the ClientHello as its first message. The client will also send a HelloRetryRequest. In that case, the client MUST send the same
ClientHello when the server has responded to its ClientHello with ClientHello (without modification) except:
a HelloRetryRequest. In that case, the client MUST send the same
ClientHello (without modification) except:
- Including a new KeyShareEntry as the lowest priority share (i.e., - If a "key_share" extension was supplied in the HelloRetryRequest,
appended to the list of shares in the "key_share" extension). replacing the list of shares with a list containing a single
KeyShareEntry from the indicated group.
- Removing the "early_data" extension (Section 4.2.7) if one was - Removing the "early_data" extension (Section 4.2.8) if one was
present. Early data is not permitted after HelloRetryRequest. present. Early data is not permitted after HelloRetryRequest.
- Including a "cookie" extension if one was provided in the - Including a "cookie" extension if one was provided in the
HelloRetryRequest. HelloRetryRequest.
Because TLS 1.3 forbids renegotiation, if a server receives a Because TLS 1.3 forbids renegotiation, if a server receives a
ClientHello at any other time, it MUST terminate the connection. ClientHello at any other time, it MUST terminate the connection.
If a server established a TLS connection with a previous version of If a server established a TLS connection with a previous version of
TLS and receives a TLS 1.3 ClientHello in a renegotiation, it MUST TLS and receives a TLS 1.3 ClientHello in a renegotiation, it MUST
retain the previous protocol version. In particular, it MUST NOT retain the previous protocol version. In particular, it MUST NOT
negotiate TLS 1.3. A client that receives a TLS 1.3 ServerHello negotiate TLS 1.3. A client that receives a TLS 1.3 ServerHello
during renegotiation MUST abort the handshake with a during renegotiation MUST abort the handshake with a
"protocol_version" alert. "protocol_version" alert.
Structure of this message: Structure of this message:
struct { uint16 ProtocolVersion;
uint8 major; opaque Random[32];
uint8 minor;
} ProtocolVersion;
struct {
opaque random_bytes[32];
} Random;
uint8 CipherSuite[2]; /* Cryptographic suite selector */ uint8 CipherSuite[2]; /* Cryptographic suite selector */
struct { struct {
ProtocolVersion legacy_version = { 3, 3 }; /* TLS v1.2 */ ProtocolVersion legacy_version = 0x0303; /* TLS v1.2 */
Random random; Random random;
opaque legacy_session_id<0..32>; opaque legacy_session_id<0..32>;
CipherSuite cipher_suites<2..2^16-2>; CipherSuite cipher_suites<2..2^16-2>;
opaque legacy_compression_methods<1..2^8-1>; opaque legacy_compression_methods<1..2^8-1>;
Extension extensions<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
skipping to change at page 28, line 40 skipping to change at page 30, line 34
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").
legacy_version In previous versions of TLS, this field was used for legacy_version In previous versions of TLS, this field was used for
version negotiation and represented the highest version number version negotiation and represented the highest version number
supported by the client. Experience has shown that many servers supported by the client. Experience has shown that many servers
do not properly implement version negotiation, leading to "version do not properly implement version negotiation, leading to "version
intolerance" in which the server rejects an otherwise acceptable intolerance" in which the server rejects an otherwise acceptable
ClientHello with a version number higher than it supports. ClientHello with a version number higher than it supports. In TLS
In TLS 1.3, the client indicates its version preferences in the 1.3, the client indicates its version preferences in the
"suported_versions" extension (Section 4.2.1) and this field MUST "supported_versions" extension (Section 4.2.1) and this field MUST
be set to {3, 3}, which was the version number for TLS 1.2. (See be set to 0x0303, which was the version number for TLS 1.2. (See
Appendix C for details about backward compatibility.) Appendix C for details about backward compatibility.)
random 32 bytes generated by a secure random number generator. See random 32 bytes generated by a secure random number generator. See
Appendix 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 MUST be set as a zero length vector
vector (i.e., a single zero byte length field) by clients which do (i.e., a single zero byte length field) by clients which do not
not have a cached session ID set by a pre-TLS 1.3 server. have a cached session ID set by a pre-TLS 1.3 server.
cipher_suites This is a list of the symmetric cipher options cipher_suites This is a list of the symmetric cipher options
supported by the client, specifically the record protection supported by the client, specifically the record protection
algorithm (including secret key length) and a hash to be used with algorithm (including secret key length) and a hash to be used with
HKDF, in descending order of client preference. If the list HKDF, in descending order of client preference. If the list
contains cipher suites the server does not recognize, support, or contains cipher suites the server does not recognize, support, or
wish to use, the server MUST ignore those cipher suites, and wish to use, the server MUST ignore those cipher suites, and
process the remaining ones as usual. Values are defined in process the remaining ones as usual. Values are defined in
Appendix A.4. Appendix A.4.
skipping to change at page 29, line 34 skipping to change at page 31, line 28
ClientHellos which contain other compression methods and MUST ClientHellos which contain other compression methods and MUST
follow the procedures for the appropriate prior version of TLS. follow the procedures for the appropriate prior version of TLS.
extensions Clients request extended functionality from servers by extensions Clients request extended functionality from servers by
sending data in the extensions field. The actual "Extension" sending data in the extensions field. The actual "Extension"
format is defined in Section 4.2. format is defined in Section 4.2.
In the event that a client requests additional functionality using In the event that a client requests additional functionality using
extensions, and this functionality is not supplied by the server, the extensions, and this functionality is not supplied by the server, the
client MAY abort the handshake. Note that TLS 1.3 ClientHello client MAY abort the handshake. Note that TLS 1.3 ClientHello
messages MUST always contain extensions, and a TLS 1.3 server MUST messages always contain extensions (minimally they must contain
respond to any TLS 1.3 ClientHello without extensions or with data "supported_versions" or they will be interpreted as TLS 1.2
following the extensions block with a "decode_error" alert. TLS 1.3 ClientHello messages). TLS 1.3 servers may receive TLS 1.2
servers may receive TLS 1.2 ClientHello messages without extensions. ClientHello messages without extensions. If negotiating TLS 1.2, a
If negotiating TLS 1.2, a server MUST check that the message either server MUST check that the message either contains no data after
contains no data after legacy_compression_methods or that it contains legacy_compression_methods or that it contains a valid extensions
a valid extensions block with no data following. If not, then it block with no data following. If not, then it MUST abort the
MUST abort the handshake with a "decode_error" alert. handshake with a "decode_error" alert.
After sending the ClientHello message, the client waits for a After sending the ClientHello message, the client waits for a
ServerHello or HelloRetryRequest message. ServerHello or HelloRetryRequest message.
4.1.3. Server Hello 4.1.3. Server Hello
When this message will be sent: The server will send this message in response to a ClientHello
message when it was able to find an acceptable set of algorithms and
The server will send this message in response to a ClientHello the client's "key_share" extension was acceptable. If it is not able
message when it was able to find an acceptable set of algorithms to find an acceptable set of parameters, the server will respond with
and the client's "key_share" extension was acceptable. If it is a "handshake_failure" fatal alert.
not able to find an acceptable set of parameters, the server will
respond with a "handshake_failure" fatal alert.
Structure of this message: Structure of this message:
struct { struct {
ProtocolVersion version; ProtocolVersion version;
Random random; Random random;
CipherSuite cipher_suite; CipherSuite cipher_suite;
Extension extensions<0..2^16-1>; Extension extensions<0..2^16-1>;
} ServerHello; } ServerHello;
version This field contains the version of TLS negotiated for this version This field contains the version of TLS negotiated for this
session. Servers MUST select the lower of the highest supported session. Servers MUST select a version from the list in
server version and the version offered by the client in the ClientHello.supported_versions extension. A client which receives
ClientHello. In particular, servers MUST accept ClientHello a version that was not offered MUST abort the handshake. For this
messages with versions higher than those supported and negotiate version of the specification, the version is 0x0304. (See
the highest mutually supported version. For this version of the Appendix C for details about backward compatibility.)
specification, the version is { 3, 4 }. (See Appendix C for
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. A client which receives a list in ClientHello.cipher_suites. A client which receives a
cipher suite that was not offered MUST abort the handshake. cipher suite that was not offered MUST abort the handshake.
extensions A list of extensions. Note that only extensions offered extensions A list of extensions. The ServerHello MUST only include
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
split between the ServerHello and the EncryptedExtensions
Section 4.3.1 message. The ServerHello MUST only include
extensions which are required to establish the cryptographic extensions which are required to establish the cryptographic
context. Currently the only such extensions are "key_share", context. Currently the only such extensions are "key_share" and
"pre_shared_key", and "signature_algorithms". Clients MUST check "pre_shared_key".
the ServerHello for the presence of any forbidden extensions and
if any are found MUST abort the handshake with a
"illegal_parameter" alert. In prior versions of TLS, the
extensions field could be omitted entirely if not needed, similar
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").
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 indicating only support for TLS 1.2 or below MUST set the ClientHello indicating only support for TLS 1.2 or below MUST set the
last eight bytes of their Random value to the bytes: 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.3 server implementations which respond to a ClientHello TLS 1.3 server implementations which respond to a ClientHello
indicating only support for TLS 1.1 or below SHOULD set the last indicating only support for TLS 1.1 or below SHOULD set the last
skipping to change at page 31, line 37 skipping to change at page 33, line 19
RFC EDITOR: PLEASE REMOVE THE FOLLOWING PARAGRAPH Implementations of RFC EDITOR: PLEASE REMOVE THE FOLLOWING PARAGRAPH Implementations of
draft versions (see Section 4.2.1.1) of this specification SHOULD NOT draft versions (see Section 4.2.1.1) of this specification SHOULD NOT
implement this mechanism on either client and server. A pre-RFC implement this mechanism on either client and server. A pre-RFC
client connecting to RFC servers, or vice versa, will appear to client connecting to RFC servers, or vice versa, will appear to
downgrade to TLS 1.2. With the mechanism enabled, this will cause an downgrade to TLS 1.2. With the mechanism enabled, this will cause an
interoperability failure. interoperability failure.
4.1.4. Hello Retry Request 4.1.4. Hello Retry Request
When this message will be sent: Servers send this message in response to a ClientHello message if
they were able to find an acceptable set of algorithms and groups
Servers send this message in response to a ClientHello message if that are mutually supported, but the client's ClientHello did not
they were able to find an acceptable set of algorithms and groups contain sufficient information to proceed with the handshake. If a
that are mutually supported, but the client's ClientHello did not server cannot successfully select algorithms, it MUST abort the
contain sufficient information to proceed with the handshake. If handshake with a "handshake_failure" alert.
a server cannot successfully select algorithms, it MUST abort the
handshake with a "handshake_failure" alert.
Structure of this message: Structure of this message:
struct { struct {
ProtocolVersion server_version; ProtocolVersion server_version;
Extension extensions<2..2^16-1>; Extension extensions<2..2^16-1>;
} HelloRetryRequest; } HelloRetryRequest;
The version and extensions fields have the same meanings as their The version and extensions fields have the same meanings as their
corresponding values in the ServerHello. The server SHOULD send only corresponding values in the ServerHello. The server SHOULD send only
the extensions necessary for the client to generate a correct the extensions necessary for the client to generate a correct
ClientHello pair (currently no such extensions exist). As with ClientHello pair (currently no such extensions exist). As with
ServerHello, a HelloRetryRequest MUST NOT contain any extensions that ServerHello, a HelloRetryRequest MUST NOT contain any extensions that
were not first offered by the client in its ClientHello, with the were not first offered by the client in its ClientHello, with the
exception of optionally the "cookie" (see Section 4.2.2) extension. exception of optionally the "cookie" (see Section 4.2.2) extension.
Upon receipt of a HelloRetryRequest, the client MUST verify that the Upon receipt of a HelloRetryRequest, the client MUST verify that the
extensions block is not empty and otherwise MUST abort the handshake extensions block is not empty and otherwise MUST abort the handshake
with a "decode_error" alert. Clients SHOULD also abort the handshake with a "decode_error" alert. Clients MUST abort the handshake with
with an "unexpected_message" alert in response to any second an "illegal_parameter" alert if the HelloRetryRequest would not
HelloRetryRequest which was sent in the same connection (i.e., where result in any change in the ClientHello. If a client receives a
the ClientHello was itself in response to a HelloRetryRequest). second HelloRetryRequest in the same connection (i.e., where the
ClientHello was itself in response to a HelloRetryRequest), it MUST
abort the handshake with an "unexpected_message" alert.
Otherwise, the client MUST process all extensions in the Otherwise, the client MUST process all extensions in the
HelloRetryRequest and send a second updated ClientHello. The HelloRetryRequest and send a second updated ClientHello. The
HelloRetryRequest extensions defined in this specification are: HelloRetryRequest extensions defined in this specification are:
- cookie (see Section 4.2.2) - cookie (see Section 4.2.2)
- key_share (see Section 4.2.5) - key_share (see Section 4.2.5)
Note that HelloRetryRequest extensions are defined such that the 4.2. Extensions
original ClientHello may be computed from the new one, given minimal
state about which HelloRetryRequest extensions were sent. For
example, the key_share extension causes the new KeyShareEntry to be
appended to the client_shares field, rather than replacing it.
4.2. Hello Extensions
The extension format is: A number of TLS messages contain tag-length-value encoded extensions
structures.
struct { struct {
ExtensionType extension_type; ExtensionType extension_type;
opaque extension_data<0..2^16-1>; opaque extension_data<0..2^16-1>;
} Extension; } Extension;
enum { enum {
supported_groups(10), 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),
supported_versions(43), supported_versions(43),
cookie(44), cookie(44),
psk_key_exchange_modes(45),
ticket_early_data_info(46),
(65535) (65535)
} ExtensionType; } ExtensionType;
Here: Here:
- "extension_type" identifies the particular extension type. - "extension_type" identifies the particular extension type.
- "extension_data" contains information specific to the particular - "extension_data" contains information specific to the particular
extension type. extension type.
The initial set of extensions is defined in [RFC6066]. The list of The list of extension types is maintained by IANA as described in
extension types is maintained by IANA as described in Section 10. Section 10.
An extension type MUST NOT appear in the ServerHello or
HelloRetryRequest unless the same extension type appeared in the
corresponding ClientHello. If a client receives an extension type in
ServerHello or HelloRetryRequest that it did not request in the
associated ClientHello, it MUST abort the handshake with an
"unsupported_extension" fatal alert.
Nonetheless, "server-oriented" extensions may be provided within this The client sends its extensions in the ClientHello. The server MAY
framework. Such an extension (say, of type x) would require the send extensions in the ServerHello, EncryptedExtensions, Certificate,
client to first send an extension of type x in a ClientHello with and HelloRetryRequest messages. The NewSessionTicket also allows the
empty extension_data to indicate that it supports the extension type. server to send extensions to the client though these are not directly
In this case, the client is offering the capability to understand the associated with the extensions in the ClientHello. The table in
extension type, and the server is taking the client up on its offer. Section 10 indicates where a given extension may appear. If the
client receives an extension which is not specified for a given
message it MUST abort the handshake with an "illegal_parameter"
alert.
When multiple extensions of different types are present in the The server MUST NOT send any extensions which did not appear in the
ClientHello or ServerHello messages, the extensions MAY appear in any corresponding ClientHello, with the exception of the NewSessionTicket
order. There MUST NOT be more than one extension of the same type. message and the "cookie" extension in the HelloRetryRequest message.
Upon receiving an unexpected extension, it MUST abort the handshake
with an "unsupported_extension" alert. Server-oriented extensions
are supported by having the client send an extension with zero-length
extension_data indicating support for that extension type.
Finally, note that extensions can be sent both when starting a new When multiple extensions of different types are present, the
session and when in resumption-PSK mode. A client that requests extensions MAY appear in any order, with the exception of
session resumption does not in general know whether the server will "pre_shared_key" Section 4.2.6 which MUST be the last extension in
accept this request, and therefore it SHOULD send the same extensions the ClientHello. There MUST NOT be more than one extension of the
as it would send normally. same type.
In general, the specification of each extension type needs to In TLS 1.3, unlike TLS 1.2, extensions are renegotiated with each
describe the effect of the extension both during full handshake and handshake even when in resumption-PSK mode. However, 0-RTT
session resumption. Most current TLS extensions are relevant only parameters are those negotiated in the previous handshake; mismatches
when a session is initiated: when an older session is resumed, the may require rejecting 0-RTT (see Section 4.2.8).
server does not process these extensions in ClientHello, and does not
include them in ServerHello. However, some extensions may specify
different behavior during session resumption. [[TODO: update this
and the previous paragraph to cover PSK-based resumption.]]
There are subtle (and not so subtle) interactions that may occur in There are subtle (and not so subtle) interactions that may occur in
this protocol between new features and existing features which may this protocol between new features and existing features which may
result in a significant reduction in overall security. The following result in a significant reduction in overall security. The following
considerations should be taken into account when designing new considerations should be taken into account when designing new
extensions: extensions:
- Some cases where a server does not agree to an extension are error - Some cases where a server does not agree to an extension are error
conditions, and some are simply refusals to support particular conditions, and some are simply refusals to support particular
features. In general, error alerts should be used for the former, features. In general, error alerts should be used for the former,
skipping to change at page 34, line 33 skipping to change at page 36, line 16
struct { struct {
ProtocolVersion versions<2..254>; ProtocolVersion versions<2..254>;
} SupportedVersions; } SupportedVersions;
The "supported_versions" extension is used by the client to indicate The "supported_versions" extension is used by the client to indicate
which versions of TLS it supports. The extension contains a list of which versions of TLS it supports. The extension contains a list of
supported versions in preference order, with the most preferred supported versions in preference order, with the most preferred
version first. Implementations of this specification MUST send this version first. Implementations of this specification MUST send this
extension containing all versions of TLS which they are prepared to extension containing all versions of TLS which they are prepared to
negotiate (for this specification, that means minimally {3, 4}, but negotiate (for this specification, that means minimally 0x0304, but
if previous versions of TLS are supported, they MUST be present as if previous versions of TLS are supported, they MUST be present as
well). well).
Servers which are compliant with this specification MUST use only the Servers which are compliant with this specification MUST use only the
"supported_versions" extension, if present, to determine client "supported_versions" extension, if present, to determine client
preferences and MUST only select a version of TLS present in that preferences and MUST only select a version of TLS present in that
extension. They MUST ignore any unknown versions. If the extension extension. They MUST ignore any unknown versions. If the extension
is not present, they MUST negotiate TLS 1.2 or prior as specified in is not present, they MUST negotiate TLS 1.2 or prior as specified in
[RFC5246], even if ClientHello.legacy_version is {3, 4} or later. [RFC5246], even if ClientHello.legacy_version is 0x0304 or later.
The server MUST NOT send the "supported_versions" extension. The The server MUST NOT send the "supported_versions" extension. The
server's selected version is contained in the ServerHello.version server's selected version is contained in the ServerHello.version
field as in previous versions of TLS. field as in previous versions of TLS.
4.2.1.1. Draft Version Indicator 4.2.1.1. Draft Version Indicator
RFC EDITOR: PLEASE REMOVE THIS SECTION RFC EDITOR: PLEASE REMOVE THIS SECTION
While the eventual version indicator for the RFC version of TLS 1.3 While the eventual version indicator for the RFC version of TLS 1.3
will be {3, 4}, implementations of draft versions of this will be 0x0304, implementations of draft versions of this
specification SHOULD instead advertise {0x7f, [draft-version]} in specification SHOULD instead advertise 0x7f00 | draft_version in
their "supported_versions" extension, in ServerHello.version, and ServerHello.version, and HelloRetryRequest.server_version. For
HelloRetryRequest.server_version. This allows pre-RFC instance, draft-17 would be encoded as the 0x7f11. This allows pre-
implementations to safely negotiate with each other, even if they RFC implementations to safely negotiate with each other, even if they
would otherwise be incompatible. would otherwise be incompatible.
4.2.2. Cookie 4.2.2. Cookie
struct { struct {
opaque cookie<0..2^16-1>; opaque cookie<1..2^16-1>;
} Cookie; } Cookie;
Cookies serve two primary purposes: Cookies serve two primary purposes:
- Allowing the server to force the client to demonstrate - Allowing the server to force the client to demonstrate
reachability at their apparent network address (thus providing a reachability at their apparent network address (thus providing a
measure of DoS protection). This is primarily useful for non- measure of DoS protection). This is primarily useful for non-
connection-oriented transports (see [RFC6347] for an example of connection-oriented transports (see [RFC6347] for an example of
this). this).
skipping to change at page 35, line 48 skipping to change at page 37, line 30
4.2.3. Signature Algorithms 4.2.3. Signature Algorithms
The client uses the "signature_algorithms" extension to indicate to The client uses the "signature_algorithms" extension to indicate to
the server which signature algorithms may be used in digital the server which signature algorithms may be used in digital
signatures. Clients which desire the server to authenticate via a signatures. Clients which desire the server to authenticate via a
certificate MUST send this extension. If a server is authenticating certificate MUST send this extension. If a server is authenticating
via a certificate and the client has not sent a via a certificate and the client has not sent a
"signature_algorithms" extension then the server MUST abort the "signature_algorithms" extension then the server MUST abort the
handshake with a "missing_extension" alert (see Section 8.2). handshake with a "missing_extension" alert (see Section 8.2).
Servers which are authenticating via a certificate MUST indicate so
by sending the client an empty "signature_algorithms" extension.
The "extension_data" field of this extension in a ClientHello The "extension_data" field of this extension in a ClientHello
contains a "supported_signature_algorithms" value: contains a SignatureSchemeList 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),
/* ECDSA algorithms */ /* ECDSA algorithms */
ecdsa_secp256r1_sha256 (0x0403), ecdsa_secp256r1_sha256 (0x0403),
skipping to change at page 36, line 34 skipping to change at page 38, line 31
/* EdDSA algorithms */ /* EdDSA algorithms */
ed25519 (0x0807), ed25519 (0x0807),
ed448 (0x0808), ed448 (0x0808),
/* Reserved Code Points */ /* Reserved Code Points */
private_use (0xFE00..0xFFFF), private_use (0xFE00..0xFFFF),
(0xFFFF) (0xFFFF)
} SignatureScheme; } SignatureScheme;
SignatureScheme supported_signature_algorithms<2..2^16-2>; struct {
SignatureScheme supported_signature_algorithms<2..2^16-2>;
} SignatureSchemeList;
Note: This enum is named "SignatureScheme" because there is already a Note: This enum is named "SignatureScheme" because there is already a
"SignatureAlgorithm" type in TLS 1.2, which this replaces. We use "SignatureAlgorithm" type in TLS 1.2, which this replaces. We use
the term "signature algorithm" throughout the text. the term "signature algorithm" throughout the text.
Each SignatureScheme value lists a single signature algorithm that Each SignatureScheme value lists a single signature algorithm that
the client is willing to verify. The values are indicated in the client is willing to verify. The values are indicated in
descending order of preference. Note that a signature algorithm descending order of preference. Note that a signature algorithm
takes as input an arbitrary-length message, rather than a digest. takes as input an arbitrary-length message, rather than a digest.
Algorithms which traditionally act on a digest should be defined in Algorithms which traditionally act on a digest should be defined in
TLS to first hash the input with a specified hash algorithm and then TLS to first hash the input with a specified hash algorithm and then
proceed as usual. The code point groups listed above have the proceed as usual. The code point groups listed above have the
following meanings: following meanings:
RSASSA-PKCS1-v1_5 algorithms Indicates a signature algorithm using RSASSA-PKCS1-v1_5 algorithms Indicates a signature algorithm using
RSASSA-PKCS1-v1_5 [RFC3447] with the corresponding hash algorithm RSASSA-PKCS1-v1_5 [RFC3447] with the corresponding hash algorithm
as defined in [SHS]. These values refer solely to signatures as defined in [SHS]. These values refer solely to signatures
which appear in certificates (see Section 4.4.1.1) and are not which appear in certificates (see Section 4.4.1.2) and are not
defined for use in signed TLS handshake messages. defined for use in signed TLS handshake messages.
ECDSA algorithms Indicates a signature algorithm using ECDSA ECDSA algorithms Indicates a signature algorithm using ECDSA
[ECDSA], the corresponding curve as defined in ANSI X9.62 [X962] [ECDSA], the corresponding curve as defined in ANSI X9.62 [X962]
and FIPS 186-4 [DSS], and the corresponding hash algorithm as and FIPS 186-4 [DSS], and the corresponding hash algorithm as
defined in [SHS]. The signature is represented as a DER-encoded defined in [SHS]. The signature is represented as a DER-encoded
[X690] ECDSA-Sig-Value structure. [X690] ECDSA-Sig-Value structure.
RSASSA-PSS algorithms Indicates a signature algorithm using RSASSA- RSASSA-PSS algorithms Indicates a signature algorithm using RSASSA-
PSS [RFC3447] with MGF1. The digest used in the mask generation PSS [RFC3447] with MGF1. The digest used in the mask generation
skipping to change at page 37, line 28 skipping to change at page 39, line 26
length of the digest output. This codepoint is defined for use length of the digest output. This codepoint is defined for use
with TLS 1.2 as well as TLS 1.3. with TLS 1.2 as well as TLS 1.3.
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.
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
supported_signature_algorithms vector). TLS 1.3 servers MUST NOT SignatureSchemeList). TLS 1.3 servers MUST NOT offer a SHA-1 signed
offer a SHA-1 signed certificate unless no valid certificate chain certificate unless no valid certificate chain can be produced without
can be produced without it (see Section 4.4.1.1). it (see Section 4.4.1.2).
The signatures on certificates that are self-signed or certificates The signatures on certificates that are self-signed or certificates
that are trust anchors are not validated since they begin a that are trust anchors are not validated since they begin a
certification path (see [RFC5280], Section 3.2). A certificate that certification path (see [RFC5280], Section 3.2). A certificate that
begins a certification path MAY use a signature algorithm that is not begins a certification path MAY use a signature algorithm that is not
advertised as being supported in the "signature_algorithms" advertised as being supported in the "signature_algorithms"
extension. extension.
Note that TLS 1.2 defines this extension differently. TLS 1.3 Note that TLS 1.2 defines this extension differently. TLS 1.3
implementations willing to negotiate TLS 1.2 MUST behave in implementations willing to negotiate TLS 1.2 MUST behave in
skipping to change at page 39, line 6 skipping to change at page 40, line 51
ffdhe_private_use (0x01FC..0x01FF), ffdhe_private_use (0x01FC..0x01FF),
ecdhe_private_use (0xFE00..0xFEFF), ecdhe_private_use (0xFE00..0xFEFF),
(0xFFFF) (0xFFFF)
} NamedGroup; } NamedGroup;
struct { struct {
NamedGroup named_group_list<2..2^16-1>; NamedGroup named_group_list<2..2^16-1>;
} NamedGroupList; } NamedGroupList;
Elliptic Curve Groups (ECDHE) Indicates support of the corresponding Elliptic Curve Groups (ECDHE) Indicates support of the corresponding
named curve. Note that some curves are also recommended in ANSI named curve, defined either in FIPS 186-4 [DSS] or in [RFC7748].
X9.62 [X962] and FIPS 186-4 [DSS]. Others are recommended in Values 0xFE00 through 0xFEFF are reserved for private use.
[RFC7748]. Values 0xFE00 through 0xFEFF are reserved for private
use.
Finite Field Groups (DHE) Indicates support of the corresponding Finite Field Groups (DHE) Indicates support of the corresponding
finite field group, defined in [RFC7919]. Values 0x01FC through finite field group, defined in [RFC7919]. Values 0x01FC through
0x01FF are reserved for private use. 0x01FF are reserved for private use.
Items in named_group_list are ordered according to the client's Items in named_group_list are ordered according to the client's
preferences (most preferred choice first). preferences (most preferred choice first).
As of TLS 1.3, servers are permitted to send the "supported_groups" As of TLS 1.3, servers are permitted to send the "supported_groups"
extension to the client. If the server has a group it prefers to the extension to the client. If the server has a group it prefers to the
ones in the "key_share" extension but is still willing to accept the ones in the "key_share" extension but is still willing to accept the
ClientHello, it SHOULD send "supported_groups" to update the client's ClientHello, it SHOULD send "supported_groups" to update the client's
view of its preferences; this extension SHOULD contain all groups the view of its preferences; this extension SHOULD contain all groups the
server supports, regardless of whether they are currently supported server supports, regardless of whether they are currently supported
by the client. Clients MUST NOT act upon any information found in by the client. Clients MUST NOT act upon any information found in
"supported_groups" prior to successful completion of the handshake, "supported_groups" prior to successful completion of the handshake,
but MAY use the information learned from a successfully completed but MAY use the information learned from a successfully completed
handshake to change what groups they offer to a server in subsequent handshake to change what groups they use in their "key_share"
connections. extension in subsequent connections.
4.2.5. Key Share 4.2.5. Key Share
The "key_share" extension contains the endpoint's cryptographic The "key_share" extension contains the endpoint's cryptographic
parameters. parameters.
Clients MAY send an empty client_shares vector in order to request Clients MAY send an empty client_shares vector in order to request
group selection from the server at the cost of an additional round group selection from the server at the cost of an additional round
trip. (see Section 4.1.4) trip. (see Section 4.1.4)
skipping to change at page 40, line 41 skipping to change at page 42, line 38
as one of the client's shares. as one of the client's shares.
Clients offer an arbitrary number of KeyShareEntry values, each Clients offer an arbitrary number of KeyShareEntry values, each
representing a single set of key exchange parameters. For instance, representing a single set of key exchange parameters. For instance,
a client might offer shares for several elliptic curves or multiple a client might offer shares for several elliptic curves or multiple
FFDHE groups. The key_exchange values for each KeyShareEntry MUST be FFDHE groups. The key_exchange values for each KeyShareEntry MUST be
generated independently. Clients MUST NOT offer multiple generated independently. Clients MUST NOT offer multiple
KeyShareEntry values for the same group. Clients MUST NOT offer any KeyShareEntry values for the same group. Clients MUST NOT offer any
KeyShareEntry values for groups not listed in the client's KeyShareEntry values for groups not listed in the client's
"supported_groups" extension. Servers MAY check for violations of "supported_groups" extension. Servers MAY check for violations of
these rules and and MAY abort the handshake with an these rules and abort the handshake with an "illegal_parameter" alert
"illegal_parameter" alert if one is violated. if one is violated.
Upon receipt of this extension in a HelloRetryRequest, the client Upon receipt of this extension in a HelloRetryRequest, the client
MUST first verify that the selected_group field corresponds to a MUST verify that (1) the selected_group field corresponds to a group
group which was provided in the "supported_groups" extension in the which was provided in the "supported_groups" extension in the
original ClientHello. It MUST then verify that the selected_group original ClientHello; and (2) the selected_group field does not
field does not correspond to a group which was provided in the correspond to a group which was provided in the "key_share" extension
"key_share" extension in the original ClientHello. If either of in the original ClientHello. If either of these checks fails, then
these checks fails, then the client MUST abort the handshake with an the client MUST abort the handshake with an "illegal_parameter"
"illegal_parameter" alert. Otherwise, when sending the new alert. Otherwise, when sending the new ClientHello, the client MUST
ClientHello, the client MUST append a new KeyShareEntry for the group replace the original "key_share" extension with one containing only a
indicated in the selected_group field to the groups in its original new KeyShareEntry for the group indicated in the selected_group
KeyShare. The remaining KeyShareEntry values MUST be preserved. field.
Note that a HelloRetryRequest might not include the "key_share"
extension if other extensions are sent, such as if the server is only
sending a cookie.
If using (EC)DHE key establishment, servers offer exactly one If using (EC)DHE key establishment, servers offer exactly one
KeyShareEntry in the ServerHello. This value MUST correspond to the KeyShareEntry in the ServerHello. This value MUST correspond to the
KeyShareEntry value offered by the client that the server has KeyShareEntry value offered by the client that the server has
selected for the negotiated key exchange. Servers MUST NOT send a selected for the negotiated key exchange. Servers MUST NOT send a
KeyShareEntry for any group not indicated in the "supported_groups" KeyShareEntry for any group not indicated in the "supported_groups"
extension. If a HelloRetryRequest was received, the client MUST extension. If a HelloRetryRequest was received, the client MUST
verify that the selected NamedGroup matches that supplied in the verify that the selected NamedGroup matches that supplied in the
selected_group field and MUST abort the connection with an selected_group field and MUST abort the handshake with an
"illegal_parameter" alert if it does not. "illegal_parameter" alert if it does not.
[[TODO: Recommendation about what the client offers. Presumably
which integer DH groups and which curves.]]
4.2.5.1. Diffie-Hellman Parameters 4.2.5.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) for the specified group (see [RFC7919]
with zeros to the size of p in bytes. for group definitions) encoded as a big-endian integer, padded with
zeros to the size of p in bytes.
Note: For a given Diffie-Hellman group, the padding results in all Note: For a given Diffie-Hellman group, the padding results in all
public keys having the same length. public keys having the same length.
Peers SHOULD validate each other's public key Y by ensuring that 1 < Peers SHOULD validate each other's public key Y by ensuring that 1 <
Y < p-1. This check ensures that the remote peer is properly behaved Y < p-1. This check ensures that the remote peer is properly behaved
and isn't forcing the local system into a small subgroup. and isn't forcing the local system into a small subgroup.
4.2.5.2. ECDHE Parameters 4.2.5.2. ECDHE Parameters
skipping to change at page 42, line 17 skipping to change at page 44, line 9
for x25519 and 56 bytes for x448. for x25519 and 56 bytes for x448.
Note: Versions of TLS prior to 1.3 permitted point format Note: Versions of TLS prior to 1.3 permitted point format
negotiation; TLS 1.3 removes this feature in favor of a single point negotiation; TLS 1.3 removes this feature in favor of a single point
format for each curve. format for each curve.
4.2.6. Pre-Shared Key Extension 4.2.6. Pre-Shared Key Extension
The "pre_shared_key" extension is used to indicate the identity of The "pre_shared_key" extension is used to indicate the identity of
the pre-shared key to be used with a given handshake in association the pre-shared key to be used with a given handshake in association
with PSK key establishment (see [RFC4279] for background). with PSK key establishment.
The "extension_data" field of this extension contains a The "extension_data" field of this extension contains a
"PreSharedKeyExtension" value: "PreSharedKeyExtension" value:
enum { psk_ke(0), psk_dhe_ke(1), (255) } PskKeyExchangeMode; struct {
enum { psk_auth(0), psk_sign_auth(1), (255) } PskAuthenticationMode; opaque identity<0..2^16-1>;
uint32 obfuscated_ticket_age;
} PskIdentity;
struct { opaque PskBinderEntry<32..255>;
PskKeyExchangeMode ke_modes<1..255>;
PskAuthenticationMode auth_modes<1..255>;
opaque identity<0..2^16-1>;
} PskIdentity;
struct { struct {
select (Handshake.msg_type) { select (Handshake.msg_type) {
case client_hello: case client_hello:
PskIdentity identities<6..2^16-1>; PskIdentity identities<6..2^16-1>;
PskBinderEntry binders<33..2^16-1>;
case server_hello: case server_hello:
uint16 selected_identity; uint16 selected_identity;
}; };
} PreSharedKeyExtension;
} 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.7), the first identity the "early_data" extension (see Section 4.2.8), 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 obfuscated_ticket_age For each ticket, the time since the client
(0-based) index into the identities in the client's list. learned about the server configuration that it is using, in
milliseconds. This value is added modulo 2^32 to with the
Each PSK offered by the client also indicates the authentication and "ticket_age_add" value that was included with the ticket, see
key exchange modes with which the server can use it, with each list Section 4.5.1. This addition prevents passive observers from
being in the order of the client's preference, with most preferred correlating sessions unless tickets are reused. Note: because
first. Any PSK MUST only be used with a single HKDF hash algorithm. ticket lifetimes are restricted to a week, 32 bits is enough to
represent any plausible age, even in milliseconds. External
This restriction is automatically enforced for PSKs established via tickets SHOULD use an obfuscated_ticket_age of 0; servers MUST
NewSessionTicket (Section 4.5.1) but any externally-established PSKs ignore this value for external tickets.
MUST also follow this rule.
PskKeyExchangeMode values have the following meanings:
psk_ke PSK-only key establishment. In this mode, the server MUST binders A series of HMAC values, one for each PSK offered in the
not supply a "key_share" value. "pre_shared_keys" extension and in the same order, computed as
described below.
psk_dhe_ke PSK key establishment with (EC)DHE key establishment. In selected_identity The server's chosen identity expressed as a
this mode, the client and servers MUST supply "key_share" values (0-based) index into the identities in the client's list.
as described in Section 4.2.5.
PskAuthenticationMode values have the following meanings: Each PSK is associated with a single Hash algorithm. For PSKs
established via the ticket mechanism (Section 4.5.1), this is the
Hash used for the KDF. For externally established PSKs, the Hash
algorithm MUST be set when the PSK is established.
psk_auth PSK-only authentication. In this mode, the server MUST NOT Prior to accepting PSK key establishment, the server MUST validate
supply either a Certificate or CertificateVerify message. [TODO: the corresponding binder value (see Section 4.2.6.1 below). If this
Add a signing mode.] value is not present or does not validate, the server MUST abort the
handshake. Servers SHOULD NOT attempt to validate multiple binders;
rather they SHOULD select a single PSK and validate solely the binder
that corresponds to that PSK. In order to accept PSK key
establishment, the server sends a "pre_shared_key" extension
indicating the selected identity.
In order to accept PSK key establishment, the server sends a Clients MUST verify that the server's selected_identity is within the
"pre_shared_key" extension with the selected identity. Clients MUST range supplied by the client, that the server selected the cipher
verify that the server's selected_identity is within the range suite associated with the PSK, and that the "key_share", and
supplied by the client and that the "key_share" and
"signature_algorithms" extensions are consistent with the indicated "signature_algorithms" extensions are consistent with the indicated
ke_modes and auth_modes values. If these values are not consistent, ke_modes and auth_modes values. If these values are not consistent,
the client MUST abort the handshake with an "illegal_parameter" the client MUST abort the handshake with an "illegal_parameter"
alert. alert.
If the server supplies an "early_data" extension, the client MUST If the server supplies an "early_data" extension, the client MUST
verify that the server selected the first offered identity. If any verify that the server's selected_identity is 0. If any other value
other value is returned, the client MUST abort the handshake with an is returned, the client MUST abort the handshake with an
"unknown_psk_identity" alert. "illegal_parameter" alert.
Note that although 0-RTT data is encrypted with the first PSK This extension MUST be the last extension in the ClientHello (this
identity, the server MAY fall back to 1-RTT and select a different facilitates implementation as described below). Servers MUST check
PSK identity if multiple identities are offered. that it is the last extension and otherwise fail the handshake with
an "illegal_parameter" alert.
4.2.7. Early Data Indication 4.2.6.1. PSK Binder
When PSK resumption is used, the client can send application data in The PSK binder value forms a binding between a PSK and the current
its first flight of messages. If the client opts to do so, it MUST handshake, as well as between the session where the PSK was
supply an "early_data" extension as well as the "pre_shared_key" established (if via a NewSessionTicket message) and the session where
extension. it was used. Each entry in the binders list is computed as an HMAC
over the portion of the ClientHello up to and including the
PreSharedKeyExtension.identities field. That is, it includes all of
the ClientHello but not the binder list itself. The length fields
for the message (including the overall length, the length of the
extensions block, and the length of the "pre_shared_key" extension)
are all set as if the binder were present.
The binding_value is computed in the same way as the Finished message
(Section 4.4.3) but with the BaseKey being the binder_key (see
Section 7.1).
If the handshake includes a HelloRetryRequest, the initial
ClientHello and HelloRetryRequest are included in the transcript
along with the new ClientHello. For instance, if the client sends
ClientHello1, its binder will be computed over:
ClientHello1[truncated]
If the server responds with HelloRetryRequest, and the client then
sends ClientHello2, its binder will be computed over:
ClientHello1 + HelloRetryRequest + ClientHello2[truncated]
The full ClientHello is included in all other handshake hash
computations.
4.2.7. Pre-Shared Key Exchange Modes
In order to use PSKs, clients MUST also send a
"psk_key_exchange_modes" extension. The semantics of this extension
are that the client only supports the use of PSKs with these modes,
which restricts both the use of PSKs offered in this ClientHello and
those which the server might supply via NewSessionTicket.
A clients MUST provide a "psk_key_exchange_modes" extension if it
offers a "pre_shared_key" extension. If clients offer
"pre_shared_key" without a "psk_key_exchange_modes" extension,
servers MUST abort the handshake. Servers MUST NOT select a key
exchange mode that is not listed by the client. This extension also
restricts the modes for use with PSK resumption; servers SHOULD NOT
send NewSessionTicket with tickets that are not compatible with the
advertised modes; however if it does so, the impact will just be that
the client's attempts at resumption fail.
The server MUST NOT send a "psk_key_exchange_modes" extension.
enum { psk_ke(0), psk_dhe_ke(1), (255) } PskKeyExchangeMode;
struct {
PskKeyExchangeMode ke_modes<1..255>;
} PskKeyExchangeModes;
psk_ke PSK-only key establishment. In this mode, the server MUST
not supply a "key_share" value.
psk_dhe_ke PSK key establishment with (EC)DHE key establishment. In
this mode, the client and servers MUST supply "key_share" values
as described in Section 4.2.5.
4.2.8. Early Data Indication
When a PSK is used, the client can send application data in its first
flight of messages. If the client opts to do so, it MUST supply an
"early_data" extension as well as the "pre_shared_key" extension.
The "extension_data" field of this extension contains an The "extension_data" field of this extension contains an
"EarlyDataIndication" value: "EarlyDataIndication" value:
struct { struct {
select (Handshake.msg_type) {
case client_hello:
uint32 obfuscated_ticket_age;
case server_hello:
struct {};
};
} EarlyDataIndication; } EarlyDataIndication;
obfuscated_ticket_age The time since the client learned about the For PSKs provisioned via NewSessionTicket, a server MUST validate
server configuration that it is using, in milliseconds. This that the ticket age for the selected PSK identity (computed by un-
value is added modulo 2^32 to with the "ticket_age_add" value that masking PskIdentity.obfuscated_ticket_age) is within a small
was included with the ticket, see Section 4.5.1. This addition
prevents passive observers from correlating sessions unless
tickets are reused. Note: because ticket lifetimes are restricted
to a week, 32 bits is enough to represent any plausible age, even
in milliseconds.
A server MUST validate that the ticket_age is within a small
tolerance of the time since the ticket was issued (see tolerance of the time since the ticket was issued (see
Section 4.2.7.2). If it is not, the server SHOULD proceed with the Section 4.2.8.2). If it is not, the server SHOULD proceed with the
handshake but reject 0-RTT. handshake but reject 0-RTT, and SHOULD NOT take any other action that
assumes that this ClientHello is fresh.
The parameters for the 0-RTT data (symmetric cipher suite, ALPN, The parameters for the 0-RTT data (symmetric cipher suite, ALPN
etc.) are the same as those which were negotiated in the connection protocol, etc.) are the same as those which were negotiated in the
which established the PSK. The PSK used to encrypt the early data connection which established the PSK. The PSK used to encrypt the
MUST be the first PSK listed in the client's "pre_shared_key" early data MUST be the first PSK listed in the client's
extension. "pre_shared_key" extension.
0-RTT messages sent in the first flight have the same content types 0-RTT messages sent in the first flight have the same content types
as their corresponding messages sent in other flights (handshake, as their corresponding messages sent in other flights (handshake,
application_data, and alert respectively) but are protected under application_data, and alert respectively) but are protected under
different keys. After all the 0-RTT application data messages (if different keys. After all the 0-RTT application data messages (if
any) have been sent, an "end_of_early_data" alert of type "warning" any) have been sent, an "end_of_early_data" alert of type "warning"
is sent to indicate the end of the flight. 0-RTT MUST always be is sent to indicate the end of the flight. 0-RTT MUST always be
followed by an "end_of_early_data" alert, which will be encrypted followed by an "end_of_early_data" alert, which will be encrypted
with the 0-RTT traffic keys. with the 0-RTT traffic keys.
skipping to change at page 45, line 13 skipping to change at page 48, line 13
handshake is required. handshake is required.
- Return an empty extension, indicating that it intends to process - Return an empty extension, indicating that it intends to process
the early data. It is not possible for the server to accept only the early data. It is not possible for the server to accept only
a subset of the early data messages. a subset of the early data messages.
- Request that the client send another ClientHello by responding - Request that the client send another ClientHello by responding
with a HelloRetryRequest. A client MUST NOT include the with a HelloRetryRequest. A client MUST NOT include the
"early_data" extension in its followup ClientHello. "early_data" extension in its followup ClientHello.
In order to accept early data, the server server MUST have accepted a In order to accept early data, the server MUST have accepted a PSK
PSK cipher suite and selected the the first key offered in the cipher suite and selected the first key offered in the client's
client's "pre_shared_key" extension. In addition, it MUST verify "pre_shared_key" extension. In addition, it MUST verify that the
that the following values are consistent with those negotiated in the following values are consistent with those negotiated in the
connection during which the ticket was established. connection during which the ticket was established.
- The TLS version number, AEAD algorithm, and the hash for HKDF. - The TLS version number and cipher suite.
- The selected ALPN [RFC7443] value, if any. - The selected ALPN [RFC7301] protocol, if any.
Future extensions MUST define their interaction with 0-RTT. Future extensions MUST define their interaction with 0-RTT.
If any of these checks fail, the server MUST NOT respond with the If any of these checks fail, the server MUST NOT respond with the
extension and must discard all the remaining first flight data (thus extension and must discard all the remaining first flight data (thus
falling back to 1-RTT). If the client attempts a 0-RTT handshake but falling back to 1-RTT). If the client attempts a 0-RTT handshake but
the server rejects it, it will generally not have the 0-RTT record the server rejects it, it will generally not have the 0-RTT record
protection keys and must instead trial decrypt each record with the protection keys and must instead trial decrypt each record with the
1-RTT handshake keys until it finds one that decrypts properly, and 1-RTT handshake keys until it finds one that decrypts properly, and
then pick up the handshake from that point. then pick up the handshake from that point.
skipping to change at page 45, line 44 skipping to change at page 48, line 44
MUST comply with the same error handling requirements specified for MUST comply with the same error handling requirements specified for
all records when processing early data records. Specifically, if the all records when processing early data records. Specifically, if the
server fails to decrypt any 0-RTT record following an accepted server fails to decrypt any 0-RTT record following an accepted
"early_data" extension it MUST terminate the connection with a "early_data" extension it MUST terminate the connection with a
"bad_record_mac" alert as per Section 5.2. "bad_record_mac" alert as per Section 5.2.
If the server rejects the "early_data" extension, the client If the server rejects the "early_data" extension, the client
application MAY opt to retransmit the data once the handshake has application MAY opt to retransmit the data once the handshake has
been completed. TLS stacks SHOULD not do this automatically and been completed. TLS stacks SHOULD not do this automatically and
client applications MUST take care that the negotiated parameters are client applications MUST take care that the negotiated parameters are
consistent with those it expected. For example, if the ALPN value consistent with those it expected. For example, if the selected ALPN
has changed, it is likely unsafe to retransmit the original protocol has changed, it is likely unsafe to retransmit the original
application layer data. application layer data.
4.2.7.1. Processing Order 4.2.8.1. Processing Order
Clients are permitted to "stream" 0-RTT data until they receive the Clients are permitted to "stream" 0-RTT data until they receive the
server's Finished, only then sending the "end_of_early_data" alert. server's Finished, only then sending the "end_of_early_data" alert.
In order to avoid deadlock, when accepting "early_data", servers MUST In order to avoid deadlock, when accepting "early_data", servers MUST
process the client's Finished and then immediately send the process the client's ClientHello and then immediately send the
ServerHello, rather than waiting for the client's "end_of_early_data" ServerHello, rather than waiting for the client's "end_of_early_data"
alert. alert.
4.2.7.2. Replay Properties 4.2.8.2. Replay Properties
As noted in Section 2.3, TLS provides a limited mechanism for replay As noted in Section 2.3, TLS provides a limited mechanism for replay
protection for data sent by the client in the first flight. protection for data sent by the client in the first flight.
The "obfuscated_ticket_age" parameter in the client's "early_data" The "obfuscated_ticket_age" parameter in the client's
extension SHOULD be used by servers to limit the time over which the "pre_shared_key" extension SHOULD be used by servers to limit the
first flight might be replayed. A server can store the time at which time over which the first flight might be replayed. A server can
it sends a session ticket to the client, or encode the time in the store the time at which it sends a session ticket to the client, or
ticket. Then, each time it receives an "early_data" extension, it encode the time in the ticket. Then, each time it receives an
can subtract the base value and check to see if the value used by the "pre_shared_key" extension, it can subtract the base value and check
client matches its expectations. to see if the value used by the client matches its expectations.
The ticket age (the value with "ticket_age_add" subtracted) provided The ticket age (the value with "ticket_age_add" subtracted) provided
by the client will be shorter than the actual time elapsed on the by the client will be shorter than the actual time elapsed on the
server by a single round trip time. This difference is comprised of server by a single round trip time. This difference is comprised of
the delay in sending the NewSessionTicket message to the client, plus the delay in sending the NewSessionTicket message to the client, plus
the time taken to send the ClientHello to the server. For this the time taken to send the ClientHello to the server. For this
reason, a server SHOULD measure the round trip time prior to sending reason, a server SHOULD measure the round trip time prior to sending
the NewSessionTicket message and account for that in the value it the NewSessionTicket message and account for that in the value it
saves. saves.
skipping to change at page 47, line 10 skipping to change at page 50, line 10
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 and fall for replay. In this case, it is better to reject early data and fall
back to a full 1-RTT handshake than to risk greater exposure to back to a full 1-RTT handshake than to risk greater exposure to
replay attacks. In common network topologies for browser clients, replay attacks. In common network topologies for browser clients,
small allowances on the order of ten seconds are reasonable. Clock small allowances on the order of ten seconds are reasonable. Clock
skew distributions are not symmetric, so the optimal tradeoff may skew distributions are not symmetric, so the optimal tradeoff may
involve an asymmetric replay window. involve an asymmetric replay window.
4.2.8. OCSP Status Extensions 4.3. Server Parameters
[RFC6066] and [RFC6961] provide extensions to negotiate the server
sending OCSP responses to the client. In TLS 1.2 and below, the
server sends an empty extension to indicate negotiation of this
extension and the OCSP information is carried in a CertificateStatus
message. In TLS 1.3, the server's OCSP information is carried in an
extension in EncryptedExtensions. Specifically: The body of the
"status_request" or "status_request_v2" extension from the server
MUST be a CertificateStatus structure as defined in [RFC6066] and
[RFC6961] respectively.
Note: This means that the certificate status appears prior to the
certificates it applies to. This is slightly anomalous but matches
the existing behavior for SignedCertificateTimestamps [RFC6962], and
is more easily extensible in the handshake state machine.
4.3. Server Parameters Messages
The next two messages from the server, EncryptedExtensions and The next two messages from the server, EncryptedExtensions and
CertificateRequest, contain encrypted information from the server CertificateRequest, contain encrypted information from the server
that determines the rest of the handshake. that determines the rest of the handshake.
4.3.1. Encrypted Extensions 4.3.1. Encrypted Extensions
When this message will be sent: In all handshakes, the server MUST send the EncryptedExtensions
message immediately after the ServerHello message. This is the first
In all handshakes, the server MUST send the EncryptedExtensions message that is encrypted under keys derived from
message immediately after the ServerHello message. This is the handshake_traffic_secret.
first message that is encrypted under keys derived from
handshake_traffic_secret.
Meaning of this message:
The EncryptedExtensions message contains any extensions which
should be protected, i.e., any which are not needed to establish
the cryptographic context.
The same extension types MUST NOT appear in both the ServerHello and The EncryptedExtensions message contains extensions which should be
EncryptedExtensions. All server-sent extensions other than those protected, i.e., any which are not needed to establish the
explicitly listed in Section 4.1.3 or designated in the IANA registry cryptographic context, but which are not associated with individual
MUST only appear in EncryptedExtensions. Extensions which are certificates. The client MUST check EncryptedExtensions for the
designated to appear in ServerHello MUST NOT appear in
EncryptedExtensions. Clients MUST check EncryptedExtensions for the
presence of any forbidden extensions and if any are found MUST abort presence of any forbidden extensions and if any are found MUST abort
the handshake with an "illegal_parameter" alert. the handshake with an "illegal_parameter" alert.
Structure of this message: Structure of this message:
struct { struct {
Extension extensions<0..2^16-1>; Extension extensions<0..2^16-1>;
} EncryptedExtensions; } EncryptedExtensions;
extensions A list of extensions. extensions A list of extensions.
4.3.2. Certificate Request 4.3.2. Certificate Request
When this message will be sent: A server which is authenticating with a certificate can optionally
request a certificate from the client. This message, if sent, will
A server which is authenticating with a certificate can optionally follow EncryptedExtensions.
request a certificate from the client. This message, if sent,
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 48, line 46 skipping to change at page 51, 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). Within the handshake, this of client CertificateVerify messages). This field SHALL be zero
field MUST be empty. length unless used for the post-handshake authentication exchanges
described in Section 4.5.2.
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 50, line 34 skipping to change at page 53, line 12
- A base key to be used to compute a MAC key. - A base key to be used to compute a MAC key.
Based on these inputs, the messages then contain: Based on these inputs, the messages then contain:
Certificate The certificate to be used for authentication and any Certificate The certificate to be used for authentication and any
supporting certificates in the chain. Note that certificate-based supporting certificates in the chain. Note that certificate-based
client authentication is not available in the 0-RTT case. client authentication is not available in the 0-RTT case.
CertificateVerify A signature over the value Hash(Handshake Context CertificateVerify A signature over the value Hash(Handshake Context
+ Certificate) + Hash(resumption_context) See Section 4.5.1 for + Certificate)
the definition of resumption_context.
Finished A MAC over the value Hash(Handshake Context + Certificate + Finished A MAC over the value Hash(Handshake Context + Certificate +
CertificateVerify) + Hash(resumption_context) using a MAC key CertificateVerify) using a MAC key derived from the base key.
derived from the base key.
Because the CertificateVerify signs the Handshake Context + Because the CertificateVerify signs the Handshake Context +
Certificate and the Finished MACs the Handshake Context + Certificate Certificate and the Finished MACs the Handshake Context + Certificate
+ CertificateVerify, this is mostly equivalent to keeping a running + CertificateVerify, this is mostly equivalent to keeping a running
hash of the handshake messages (exactly so in the pure 1-RTT cases). hash of the handshake messages (exactly so in the pure 1-RTT cases).
Note, however, that subsequent post-handshake authentications do not Note, however, that subsequent post-handshake authentications do not
include each other, just the messages through the end of the main include each other, just the messages through the end of the main
handshake. handshake.
The following table defines the Handshake Context and MAC Base Key The following table defines the Handshake Context and MAC Base Key
for each scenario: for each scenario:
+-----------+-----------------------------+-------------------------+ +-----------+-----------------------------+-------------------------+
| Mode | Handshake Context | Base Key | | Mode | Handshake Context | Base Key |
+-----------+-----------------------------+-------------------------+ +-----------+-----------------------------+-------------------------+
| 0-RTT | ClientHello | client_early_traffic_se |
| | | cret |
| | | |
| 1-RTT | ClientHello ... later of En | [sender]_handshake_traf | | 1-RTT | ClientHello ... later of En | [sender]_handshake_traf |
| (Server) | cryptedExtensions/Certifica | fic_secret | | (Server) | cryptedExtensions/Certifica | fic_secret |
| | teRequest | | | | teRequest | |
| | | | | | | |
| 1-RTT | ClientHello ... | [sender]_handshake_traf | | 1-RTT | ClientHello ... | [sender]_handshake_traf |
| (Client) | ServerFinished | fic_secret | | (Client) | ServerFinished | fic_secret |
| | | | | | | |
| Post- | ClientHello ... | [sender]_traffic_secret | | Post- | ClientHello ... | [sender]_traffic_secret |
| Handshake | ClientFinished + | _N | | Handshake | ClientFinished + | _N |
| | CertificateRequest | | | | CertificateRequest | |
+-----------+-----------------------------+-------------------------+ +-----------+-----------------------------+-------------------------+
The [sender] in this table denotes the sending side. The [sender] in this table denotes the sending side.
Note: The Handshake Context for the last three rows does not include In all cases, the handshake context is formed by concatenating the
any 0-RTT handshake messages, regardless of whether 0-RTT is used. indicated handshake messages, including the handshake message type
and length fields.
4.4.1. Certificate 4.4.1. Certificate
When this message will be sent: The server MUST send a Certificate message whenever the agreed-upon
key exchange method uses certificates for authentication (this
The server MUST send a Certificate message whenever the agreed- includes all key exchange methods defined in this document except
upon key exchange method uses certificates for authentication PSK). This message conveys the endpoint's certificate chain to the
(this includes all key exchange methods defined in this document peer.
except PSK).
The client MUST send a Certificate message if and only if server
has requested client authentication via a CertificateRequest
message (Section 4.3.2). If the server requests client
authentication but no suitable certificate is available, the
client MUST send a Certificate message containing no certificates
(i.e., with the "certificate_list" field having length 0).
Meaning of this message:
This message conveys the endpoint's certificate chain to the peer. The client MUST send a Certificate message if and only if the server
has requested client authentication via a CertificateRequest message
(Section 4.3.2). If the server requests client authentication but no
suitable certificate is available, the client MUST send a Certificate
message containing no certificates (i.e., with the "certificate_list"
field having length 0).
Structure of this message: Structure of this message:
opaque ASN1Cert<1..2^24-1>; opaque ASN1Cert<1..2^24-1>;
struct { struct {
ASN1Cert cert_data;
Extension extensions<0..2^16-1>;
} CertificateEntry;
struct {
opaque certificate_request_context<0..2^8-1>; opaque certificate_request_context<0..2^8-1>;
ASN1Cert certificate_list<0..2^24-1>; CertificateEntry certificate_list<0..2^24-1>;
} Certificate; } Certificate;
certificate_request_context If this message is in response to a certificate_request_context If this message is in response to a
CertificateRequest, the value of certificate_request_context in CertificateRequest, the value of certificate_request_context in
that message. Otherwise, in the case of server authentication that message. Otherwise, in the case of server authentication
this field SHALL be zero length. this field SHALL be zero length.
certificate_list This is a sequence (chain) of certificates. The certificate_list This is a sequence (chain) of CertificateEntry
sender's certificate MUST come first in the list. Each following structures, each containing a single certificate and set of
certificate SHOULD directly certify one preceding it. Because extensions. The sender's certificate MUST come in the first
certificate validation requires that trust anchors be distributed CertificateEntry in the list. Each following certificate SHOULD
independently, a certificate that specifies a trust anchor MAY be directly certify one preceding it. Because certificate validation
omitted from the chain, provided that supported peers are known to requires that trust anchors be distributed independently, a
possess any omitted certificates. certificate that specifies a trust anchor MAY be omitted from the
chain, provided that supported peers are known to possess any
omitted certificates.
extensions: A set of extension values for the CertificateEntry. The
"Extension" format is defined in Section 4.2. Valid extensions
include OCSP Status extensions ([RFC6066] and [RFC6961]) and
SignedCertificateTimestamps ([RFC6962]). Any extension presented
in a Certificate message must only be presented if the
corresponding ClientHello extension was presented in the initial
handshake. If an extension applies the the entire chain, it
SHOULD be included in the first CertificateEntry.
Note: Prior to TLS 1.3, "certificate_list" ordering required each Note: Prior to TLS 1.3, "certificate_list" ordering required each
certificate to certify the one immediately preceding it, however some certificate to certify the one immediately preceding it, however some
implementations allowed some flexibility. Servers sometimes send implementations allowed some flexibility. Servers sometimes send
both a current and deprecated intermediate for transitional purposes, both a current and deprecated intermediate for transitional purposes,
and others are simply configured incorrectly, but these cases can and others are simply configured incorrectly, but these cases can
nonetheless be validated properly. For maximum compatibility, all nonetheless be validated properly. For maximum compatibility, all
implementations SHOULD be prepared to handle potentially extraneous implementations SHOULD be prepared to handle potentially extraneous
certificates and arbitrary orderings from any TLS version, with the certificates and arbitrary orderings from any TLS version, with the
exception of the end-entity certificate which MUST be first. exception of the end-entity certificate which MUST be first.
The server's certificate list MUST always be non-empty. A client The server's certificate list MUST always be non-empty. A client
will send an empty certificate list if it does not have an will send an empty certificate list if it does not have an
appropriate certificate to send in response to the server's appropriate certificate to send in response to the server's
authentication request. authentication request.
4.4.1.1. Server Certificate Selection 4.4.1.1. OCSP Status and SCT Extensions
[RFC6066] and [RFC6961] provide extensions to negotiate the server
sending OCSP responses to the client. In TLS 1.2 and below, the
server sends an empty extension to indicate negotiation of this
extension and the OCSP information is carried in a CertificateStatus
message. In TLS 1.3, the server's OCSP information is carried in an
extension in the CertificateEntry containing the associated
certificate. Specifically: The body of the "status_request" or
"status_request_v2" extension from the server MUST be a
CertificateStatus structure as defined in [RFC6066] and [RFC6961]
respectively.
Similarly, [RFC6962] provides a mechanism for a server to send a
Signed Certificate Timestamp (SCT) as an extension in the
ServerHello. In TLS 1.3, the server's SCT information is carried in
an extension in CertificateEntry.
4.4.1.2. Server Certificate Selection
The following rules apply to the certificates sent by the server: The following rules apply to the certificates sent by the server:
- The certificate type MUST be X.509v3 [RFC5280], unless explicitly - The certificate type MUST be X.509v3 [RFC5280], unless explicitly
negotiated otherwise (e.g., [RFC5081]). negotiated otherwise (e.g., [RFC5081]).
- The server's end-entity certificate's public key (and associated - The server's end-entity certificate's public key (and associated
restrictions) MUST be compatible with the selected authentication restrictions) MUST be compatible with the selected authentication
algorithm (currently RSA or ECDSA). algorithm (currently RSA or ECDSA).
skipping to change at page 53, line 34 skipping to change at page 56, line 37
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 abort the handshake with an handshake, then it MUST abort the handshake with an
"unsupported_certificate" alert. "unsupported_certificate" alert.
If the server has multiple certificates, it chooses one of them based If the server has multiple certificates, it chooses one of them based
on the above-mentioned criteria (in addition to other criteria, such on the above-mentioned criteria (in addition to other criteria, such
as transport layer endpoint, local configuration and preferences). as transport layer endpoint, local configuration and preferences).
4.4.1.2. Client Certificate Selection 4.4.1.3. 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:
- 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
message was non-empty, one of the certificates in the certificate message was non-empty, one of the certificates in the certificate
chain SHOULD be issued by one of the listed CAs. chain SHOULD be issued by one of the listed CAs.
- The certificates MUST be signed using an acceptable signature - The certificates MUST be signed using an acceptable signature
algorithm, as described in Section 4.3.2. Note that this relaxes algorithm, as described in Section 4.3.2. Note that this relaxes
the constraints on certificate-signing algorithms found in prior the constraints on certificate-signing algorithms found in prior
skipping to change at page 54, line 14 skipping to change at page 57, line 14
- If the certificate_extensions list in the certificate request - If the certificate_extensions list in the certificate request
message was non-empty, the end-entity certificate MUST match the message was non-empty, the end-entity certificate MUST match the
extension OIDs recognized by the client, as described in extension OIDs recognized by the client, as described in
Section 4.3.2. Section 4.3.2.
Note that, as with the server certificate, there are certificates Note that, as with the server certificate, there are certificates
that use algorithm combinations that cannot be currently used with that use algorithm combinations that cannot be currently used with
TLS. TLS.
4.4.1.3. Receiving a Certificate Message 4.4.1.4. Receiving a Certificate Message
In general, detailed certificate validation procedures are out of In general, detailed certificate validation procedures are out of
scope for TLS (see [RFC5280]). This section provides TLS-specific scope for TLS (see [RFC5280]). This section provides TLS-specific
requirements. requirements.
If the server supplies an empty Certificate message, the client MUST If the server supplies an empty Certificate message, the client MUST
abort the handshake with a "decode_error" alert. abort the handshake with a "decode_error" alert.
If the client does not send any certificates, the server MAY at its If the client does not send any certificates, the server MAY at its
discretion either continue the handshake without client discretion either continue the handshake without client
skipping to change at page 54, line 47 skipping to change at page 57, line 47
to SHA-256 or better as soon as possible to maintain interoperability to SHA-256 or better as soon as possible to maintain interoperability
with implementations currently in the process of phasing out SHA-1 with implementations currently in the process of phasing out SHA-1
support. support.
Note that a certificate containing a key for one signature algorithm Note that a certificate containing a key for one signature algorithm
MAY be signed using a different signature algorithm (for instance, an MAY be signed using a different signature algorithm (for instance, an
RSA key signed with an ECDSA key). RSA key signed with an ECDSA key).
4.4.2. Certificate Verify 4.4.2. Certificate Verify
When this message will be sent: This message is used to provide explicit proof that an endpoint
possesses the private key corresponding to its certificate and also
This message is used to provide explicit proof that an endpoint provides integrity for the handshake up to this point. Servers MUST
possesses the private key corresponding to its certificate and send this message when authenticating via a certificate. Clients
also provides integrity for the handshake up to this point. MUST send this message whenever authenticating via a Certificate
Servers MUST send this message when authenticating via a (i.e., when the Certificate message is non-empty). When sent, this
certificate. Clients MUST send this message whenever message MUST appear immediately after the Certificate Message and
authenticating via a Certificate (i.e., when the Certificate immediately prior to the Finished message.
message is non-empty). When sent, this message MUST appear
immediately after the Certificate Message and immediately prior to
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.3 for the definition of this field). The signature is a Section 4.2.3 for the definition of this field). The signature is a
digital signature using that algorithm that covers the hash output digital signature using that algorithm that covers the hash output
described in Section 4.4 namely: described in Section 4.4 namely:
Hash(Handshake Context + Certificate) + Hash(resumption_context) Hash(Handshake Context + Certificate)
In TLS 1.3, the digital signature process takes as input: In TLS 1.3, the digital signature process takes as input:
- A signing key - A signing key
- A context string - A context string
- The actual content to be signed - The actual content to be signed
The digital signature is then computed using the signing key over the The digital signature is then computed using the signing key over the
skipping to change at page 56, line 6 skipping to change at page 58, line 50
This structure is intended to prevent an attack on previous versions This structure is intended to prevent an attack on previous versions
of previous versions of TLS in which the ServerKeyExchange format of previous versions of TLS in which the ServerKeyExchange format
meant that attackers could obtain a signature of a message with a meant that attackers could obtain a signature of a message with a
chosen, 32-byte prefix. The initial 64 byte pad clears that prefix. chosen, 32-byte prefix. The initial 64 byte pad clears that prefix.
The context string for a server signature is "TLS 1.3, server The context string for a server signature is "TLS 1.3, server
CertificateVerify" and for a client signature is "TLS 1.3, client CertificateVerify" and for a client signature is "TLS 1.3, client
CertificateVerify". CertificateVerify".
For example, if Hash(Handshake Context + Certificate) was 32 bytes of For example, if Hash(Handshake Context + Certificate) was 32 bytes of
01 and Hash(resumption_context) was 32 bytes of 02 (these lengths 01 (this length would make sense for SHA-256), the input to the final
would make sense for SHA-256, the input to the final signing process signing process for a server CertificateVerify would be:
for a server CertificateVerify would be:
2020202020202020202020202020202020202020202020202020202020202020 2020202020202020202020202020202020202020202020202020202020202020
2020202020202020202020202020202020202020202020202020202020202020 2020202020202020202020202020202020202020202020202020202020202020
544c5320312e332c207365727665722043657274696669636174655665726966 544c5320312e332c207365727665722043657274696669636174655665726966
79 79
00 00
0101010101010101010101010101010101010101010101010101010101010101 0101010101010101010101010101010101010101010101010101010101010101
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.3). Section 4.2.3).
If sent by a client, the signature algorithm used in the signature If sent by a client, the signature algorithm used in the signature
MUST be one of those present in the supported_signature_algorithms MUST be one of those present in the supported_signature_algorithms
field of the CertificateRequest message. field of the CertificateRequest message.
In addition, the signature algorithm MUST be compatible with the key In addition, the signature algorithm MUST be compatible with the key
in the sender's end-entity certificate. RSA signatures MUST use an in the sender's end-entity certificate. RSA signatures MUST use an
RSASSA-PSS algorithm, regardless of whether RSASSA-PKCS1-v1_5 RSASSA-PSS algorithm, regardless of whether RSASSA-PKCS1-v1_5
algorithms appear in "signature_algorithms". SHA-1 MUST NOT be used algorithms appear in "signature_algorithms". SHA-1 MUST NOT be used
in any signatures in CertificateVerify. All SHA-1 signature in any signatures in CertificateVerify. All SHA-1 signature
algorithms in this specification are defined solely for use in legacy algorithms in this specification are defined solely for use in legacy
certificates, and are not valid for CertificateVerify signatures. certificates, and are not valid for CertificateVerify signatures.
Note: When used with non-certificate-based handshakes (e.g., PSK), Note: When used with non-certificate-based handshakes (e.g., PSK),
the client's signature does not cover the server's certificate the client's signature does not cover the server's certificate
directly, although it does cover the server's Finished message, which directly. When the PSK was established through a NewSessionTicket,
transitively includes the server's certificate when the PSK derives the client's signature transitively covers the server's certificate
from a certificate-authenticated handshake. [PSK-FINISHED] describes through the PSK binder. [PSK-FINISHED] describes a concrete attack
a concrete attack on this mode if the Finished is omitted from the on constructions that do not bind to the server's certificate. It is
signature. It is unsafe to use certificate-based client unsafe to use certificate-based client authentication when the client
authentication when the client might potentially share the same PSK/ might potentially share the same PSK/key-id pair with two different
key-id pair with two different endpoints. In order to ensure this, endpoints and implementations MUST NOT combine external PSKs with
implementations MUST NOT mix certificate-based client authentication certificate-based authentication.
with PSK.
4.4.3. Finished 4.4.3. Finished
When this message will be sent: The Finished message is the final message in the authentication
block. It is essential for providing authentication of the handshake
The Finished message is the final message in the authentication and of the computed keys.
block. It is essential for providing authentication of the
handshake and of the computed keys.
Meaning of this message:
Recipients of Finished messages MUST verify that the contents are Recipients of Finished messages MUST verify that the contents are
correct. Once a side has sent its Finished message and received correct. Once a side has sent its Finished message and received and
and validated the Finished message from its peer, it may begin to validated the Finished message from its peer, it may begin to send
send and receive application data over the connection. and receive application data over the connection.
The key used to compute the finished message is computed from the The key used to compute the finished message is computed from the
Base key defined in Section 4.4 using HKDF (see Section 7.1). Base key defined in Section 4.4 using HKDF (see Section 7.1).
Specifically: Specifically:
finished_key = finished_key =
HKDF-Expand-Label(BaseKey, "finished", "", Hash.length) HKDF-Expand-Label(BaseKey, "finished", "", Hash.length)
Structure of this message: Structure of this message:
skipping to change at page 57, line 36 skipping to change at page 60, line 25
opaque verify_data[Hash.length]; opaque verify_data[Hash.length];
} Finished; } Finished;
The verify_data value is computed as follows: The verify_data value is computed as follows:
verify_data = verify_data =
HMAC(finished_key, Hash( HMAC(finished_key, Hash(
Handshake Context + Handshake Context +
Certificate* + Certificate* +
CertificateVerify* CertificateVerify*
) + )
Hash(resumption_context)
) )
* Only included if present. * Only included if present.
Where HMAC [RFC2104] uses the Hash algorithm for the handshake. As Where HMAC [RFC2104] uses the Hash algorithm for the handshake. As
noted above, the HMAC input can generally be implemented by a running noted above, the HMAC input can generally be implemented by a running
hash, i.e., just the handshake hash at this point. hash, i.e., just the handshake hash at this point.
In previous versions of TLS, the verify_data was always 12 octets In previous versions of TLS, the verify_data was always 12 octets
long. In the current version of TLS, it is the size of the HMAC long. In the current version of TLS, it is the size of the HMAC
skipping to change at page 58, line 28 skipping to change at page 61, line 17
more handshake records, there MUST NOT be any other records between more handshake records, there MUST NOT be any other records between
them. them.
4.5.1. New Session Ticket Message 4.5.1. New Session Ticket Message
At any time after the server has received the client Finished At any time after the server has received the client Finished
message, it MAY send a NewSessionTicket message. This message message, it MAY send a NewSessionTicket message. This message
creates a pre-shared key (PSK) binding between the 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_secret,
"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.6). Servers MAY send multiple tickets on a single (Section 4.2.6). Servers MAY send multiple tickets on a single
connection, either immediately after each other or after specific connection, either immediately after each other or after specific
events. For instance, the server might send a new ticket after post- events. For instance, the server might send a new ticket after post-
handshake authentication in order to encapsulate the additional handshake authentication in order to encapsulate the additional
client authentication state. Clients SHOULD attempt to use each client authentication state. Clients SHOULD attempt to use each
ticket no more than once, with more recent tickets being used first. ticket no more than once, with more recent tickets being used first.
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 Any ticket MUST only be resumed with a cipher suite that has the same
to that negotiated connection where the ticket was established. KDF hash as that used to establish the original connection.
enum { ticket_early_data_info(1), (65535) } TicketExtensionType;
struct { Note: Although the resumption_psk depends on the client's second
TicketExtensionType extension_type; flight, servers which do not request client authentication MAY
opaque extension_data<1..2^16-1>; compute the remainder of the transcript independently and then send a
} TicketExtension; NewSessionTicket immediately upon sending its Finished rather than
waiting for the client Finished.
struct { struct {
uint32 ticket_lifetime; uint32 ticket_lifetime;
PskKeyExchangeMode ke_modes<1..255>; uint32 ticket_age_add;
PskAuthenticationMode auth_modes<1..255>;
opaque ticket<1..2^16-1>; opaque ticket<1..2^16-1>;
TicketExtension extensions<0..2^16-2>; Extension extensions<0..2^16-2>;
} NewSessionTicket; } NewSessionTicket;
ke_modes The key exchange modes with which this ticket can be used
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 client-side ticket age is added to
this value modulo 2^32 to obtain the value that is transmitted by
the client.
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.
ticket_extensions A set of extension values for the ticket. Clients extensions A set of extension values for the ticket. The
MUST ignore unrecognized extensions. "Extension" format is defined in Section 4.2. Clients MUST ignore
unrecognized extensions.
This document defines one ticket extension, "ticket_early_data_info" This document defines one ticket extension, "ticket_early_data_info"
struct { struct {
uint32 ticket_age_add; uint32 max_early_data_size;
} TicketEarlyDataInfo; } TicketEarlyDataInfo;
This extension indicates that the ticket may be used to send 0-RTT This extension indicates that the ticket may be used to send 0-RTT
data (Section 4.2.7)). It contains one value: data (Section 4.2.8)). It contains the following value:
ticket_age_add A randomly generated 32-bit value that is used to max_early_data_size The maximum amount of 0-RTT data that the client
obscure the age of the ticket that the client includes in the is allowed to send when using this ticket, in bytes. Only
"early_data" extension. The client-side ticket age is added to Application Data payload is counted. A server receiving more than
this value modulo 2^32 to obtain the value that is transmitted by max_early_data_size bytes of 0-RTT data SHOULD terminate the
the client. connection with an "unexpected_message" alert.
4.5.2. Post-Handshake Authentication 4.5.2. Post-Handshake Authentication
The server is permitted to request client authentication at any time The server is permitted to request client authentication at any time
after the handshake has completed by sending a CertificateRequest after the handshake has completed by sending a CertificateRequest
message. The client SHOULD respond with the appropriate message. The client SHOULD respond with the appropriate
Authentication messages. If the client chooses to authenticate, it Authentication messages. If the client chooses to authenticate, it
MUST send Certificate, CertificateVerify, and Finished. If it MUST send Certificate, CertificateVerify, and Finished. If it
declines, it MUST send a Certificate message containing no declines, it MUST send a Certificate message containing no
certificates followed by Finished. certificates followed by Finished.
skipping to change at page 60, line 32 skipping to change at page 63, line 11
servers MUST be prepared for some delay, including receiving an servers MUST be prepared for some delay, including receiving an
arbitrary number of other messages between sending the arbitrary number of other messages between sending the
CertificateRequest and receiving a response. In addition, clients CertificateRequest and receiving a response. In addition, clients
which receive multiple CertificateRequests in close succession MAY which receive multiple CertificateRequests in close succession MAY
respond to them in a different order than they were received (the respond to them in a different order than they were received (the
certificate_request_context value allows the server to disambiguate certificate_request_context value allows the server to disambiguate
the responses). the responses).
4.5.3. Key and IV Update 4.5.3. Key and IV Update
enum { update_not_requested(0), update_requested(1), (255) enum {
} KeyUpdateRequest; update_not_requested(0), update_requested(1), (255)
} KeyUpdateRequest;
struct { struct {
KeyUpdateRequest request_update; KeyUpdateRequest request_update;
} KeyUpdate; } KeyUpdate;
request_update Indicates that the recipient of the KeyUpdate should request_update Indicates that the recipient of the KeyUpdate should
respond with its own KeyUpdate. If an implementation receives any respond with its own KeyUpdate. If an implementation receives any
other value, it MUST terminate the connection with an other value, it MUST terminate the connection with an
"illegal_parameter" alert. "illegal_parameter" alert.
The KeyUpdate handshake message is used to indicate that the sender The KeyUpdate handshake message is used to indicate that the sender
is updating its sending cryptographic keys. This message can be sent is updating its sending cryptographic keys. This message can be sent
by the server after sending its first flight and the client after by the server after sending its first flight and the client after
sending its second flight. Implementations that receive a KeyUpdate sending its second flight. Implementations that receive a KeyUpdate
skipping to change at page 62, line 8 skipping to change at page 64, line 36
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
alert. Implementations MUST NOT send record types not defined in alert. Implementations MUST NOT send record types not defined in
this document unless negotiated by some extension. If a TLS this document unless negotiated by some extension. If a TLS
implementation receives an unexpected record type, it MUST terminate implementation receives an unexpected record type, it MUST terminate
the connection with an "unexpected_message" alert. New record the connection with an "unexpected_message" alert. New record
content type values are assigned by IANA in the TLS Content Type content type values are assigned by IANA in the TLS Content Type
Registry as described in Section 10. Registry as described in Section 10.
Application data messages are carried by the record layer and are Application Data messages are carried by the record layer and are
fragmented and encrypted as described below. The messages are fragmented and encrypted as described below. The messages are
treated as transparent data to the record layer. treated as transparent data to the record layer.
5.1. Record Layer 5.1. Record Layer
The TLS record layer receives uninterpreted data from higher layers The TLS record layer receives uninterpreted data from higher layers
in non-empty blocks of arbitrary size. in non-empty blocks of arbitrary size.
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
skipping to change at page 62, line 34 skipping to change at page 65, line 14
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 legacy_record_version = { 3, 1 }; /* TLS v1.x */ ProtocolVersion legacy_record_version = 0x0301; /* 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.
legacy_record_version This value MUST be set to { 3, 1 } for all legacy_record_version This value MUST be set to 0x0301 for all
records. This field is deprecated and MUST be ignored for all records. This 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. An endpoint that receives a
record that exceeds this length MUST terminate the connection with
a "record_overflow" alert.
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
4 }. The version value 3.4 is historical, deriving from the use of { 0x0304. This version value is historical, deriving from the use of
3, 1 } for TLS 1.0 and { 3, 0 } for SSL 3.0. In order to maximize 0x0301 for TLS 1.0 and 0x0300 for SSL 3.0. In order to maximize
backwards compatibility, the record layer version identifies as backwards compatibility, the record layer version identifies as
simply TLS 1.0. Endpoints supporting other versions negotiate the simply TLS 1.0. Endpoints supporting other versions negotiate the
version to use by following the procedure and requirements in version to use by following the procedure and requirements in
Appendix C. Appendix C.
Implementations MUST NOT send zero-length fragments of Handshake or Implementations MUST NOT send zero-length fragments of Handshake or
Alert types, even if those fragments contain padding. Zero-length Alert types, even if those fragments contain padding. Zero-length
fragments of Application data MAY be sent as they are potentially fragments of Application Data MAY be sent as they are potentially
useful as a traffic analysis countermeasure. useful as a traffic analysis countermeasure.
When record protection has not yet been engaged, TLSPlaintext When record protection has not yet been engaged, TLSPlaintext
structures are written directly onto the wire. Once record structures are written directly onto the wire. Once record
protection has started, TLSPlaintext records are protected and sent protection has started, TLSPlaintext records are protected and sent
as described in the following section. as described in the following section.
5.2. Record Payload Protection 5.2. Record Payload Protection
The record protection functions translate a TLSPlaintext structure The record protection functions translate a TLSPlaintext structure
into a TLSCiphertext. The deprotection functions reverse the into a TLSCiphertext. The deprotection functions reverse the
process. In TLS 1.3 as opposed to previous versions of TLS, all process. In TLS 1.3 as opposed to previous versions of TLS, all
ciphers are modeled as "Authenticated Encryption with Additional ciphers are modeled as "Authenticated Encryption with Additional
Data" (AEAD) [RFC5116]. AEAD functions provide a unified encryption Data" (AEAD) [RFC5116]. AEAD functions provide a unified encryption
and authentication operation which turns plaintext into authenticated and authentication operation which turns plaintext into authenticated
ciphertext and back again. Each encrypted record consists of a ciphertext and back again. Each encrypted record consists of a
plaintext header followed by an encrypted body, which itself contains plaintext header followed by an encrypted body, which itself contains
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 TLSInnerPlaintext.type */ ContentType opaque_type = 23; /* application_data */
ProtocolVersion legacy_record_version = { 3, 1 }; /* TLS v1.x */ ProtocolVersion legacy_record_version = 0x0301; /* 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 TLSInnerPlaintext.type after decryption. in TLSInnerPlaintext.type after decryption.
legacy_record_version The legacy_record_version field is identical legacy_record_version The legacy_record_version field is identical
to TLSPlaintext.legacy_record_version and is always { 3, 1 }. to TLSPlaintext.legacy_record_version and is always 0x0301. Note
Note that the handshake protocol including the ClientHello and that the handshake protocol including the ClientHello and
ServerHello messages authenticates the protocol version, so this ServerHello messages authenticates the protocol version, so this
value is 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 terminate the connection with record that exceeds this length MUST terminate the connection with
a "record_overflow" alert. a "record_overflow" alert.
skipping to change at page 67, line 30 skipping to change at page 70, line 13
safety limit is reached. safety limit is reached.
6. Alert Protocol 6. Alert Protocol
One of the content types supported by the TLS record layer is the One of the content types supported by the TLS record layer is the
alert type. Like other messages, alert messages are encrypted as alert type. Like other messages, alert messages are encrypted as
specified by the current connection state. specified by the current connection state.
Alert messages convey the severity of the message (warning or fatal) Alert messages convey the severity of the message (warning or fatal)
and a description of the alert. Warning-level messages are used to and a description of the alert. Warning-level messages are used to
indicate orderly closure of the connection (see Section 6.1). Upon indicate orderly closure of the connection or the end of early data
receiving a warning-level alert, the TLS implementation SHOULD (see Section 6.1). Upon receiving a warning-level alert, the TLS
indicate end-of-data to the application and, if appropriate for the implementation SHOULD indicate end-of-data to the application and, if
alert type, send a closure alert in response. appropriate for the alert type, send a closure alert in response.
Fatal-level messages are used to indicate abortive closure of the Fatal-level messages are used to indicate abortive closure of the
connection (See Section 6.2). Upon receiving a fatal-level alert, connection (See Section 6.2). Upon receiving a fatal-level alert,
the TLS implementation SHOULD indicate an error to the application the TLS implementation SHOULD indicate an error to the application
and MUST NOT allow any further data to be sent or received on the and MUST NOT allow any further data to be sent or received on the
connection. Servers and clients MUST forget keys and secrets connection. Servers and clients MUST forget keys and secrets
associated with a failed connection. Stateful implementations of associated with a failed connection. Stateful implementations of
session tickets (as in many clients) SHOULD discard tickets session tickets (as in many clients) SHOULD discard tickets
associated with failed connections. associated with failed connections.
skipping to change at page 71, line 34 skipping to change at page 74, line 34
decode_error A message could not be decoded because some field was decode_error A message could not be decoded because some field was
out of the specified range or the length of the message was out of the specified range or the length of the message was
incorrect. This alert is used for errors where the message does incorrect. This alert is used for errors where the message does
not conform to the formal protocol syntax. This alert should not conform to the formal protocol syntax. This alert should
never be observed in communication between proper implementations, never be observed in communication between proper implementations,
except when messages were corrupted in the network. except when messages were corrupted in the network.
decrypt_error A handshake cryptographic operation failed, including decrypt_error A handshake cryptographic operation failed, including
being unable to correctly verify a signature or validate a being unable to correctly verify a signature or validate a
Finished message. Finished message or a PSK binder.
protocol_version The protocol version the peer has attempted to protocol_version The protocol version the peer has attempted to
negotiate is recognized but not supported. (see Appendix C) negotiate is recognized but not supported. (see Appendix C)
insufficient_security Returned instead of "handshake_failure" when a insufficient_security Returned instead of "handshake_failure" when a
negotiation has failed specifically because the server requires negotiation has failed specifically because the server requires
ciphers more secure than those supported by the client. ciphers more secure than those supported by the client.
internal_error An internal error unrelated to the peer or the internal_error An internal error unrelated to the peer or the
correctness of the protocol (such as a memory allocation failure) correctness of the protocol (such as a memory allocation failure)
makes it impossible to continue. makes it impossible to continue.
inappropriate_fallback Sent by a server in response to an invalid inappropriate_fallback Sent by a server in response to an invalid
connection retry attempt from a client. (see [RFC7507]) connection retry attempt from a client. (see [RFC7507])
missing_extension Sent by endpoints that receive a hello message not missing_extension Sent by endpoints that receive a hello message not
containing an extension that is mandatory to send for the offered containing an extension that is mandatory to send for the offered
TLS version or other negotiated parameters. [[TODO: IANA TLS version or other negotiated parameters.
Considerations.]]
unsupported_extension Sent by endpoints receiving any hello message unsupported_extension Sent by endpoints receiving any hello message
containing an extension known to be prohibited for inclusion in containing an extension known to be prohibited for inclusion in
the given hello message, including any extensions in a ServerHello the given hello message, including any extensions in a ServerHello
not first offered in the corresponding ClientHello. or Certificate not first offered in the corresponding ClientHello.
certificate_unobtainable Sent by servers when unable to obtain a certificate_unobtainable Sent by servers when unable to obtain a
certificate from a URL provided by the client via the certificate from a URL provided by the client via the
"client_certificate_url" extension [RFC6066]. "client_certificate_url" extension [RFC6066].
unrecognized_name Sent by servers when no server exists identified unrecognized_name Sent by servers when no server exists identified
by the name provided by the client via the "server_name" extension by the name provided by the client via the "server_name" extension
[RFC6066]. [RFC6066].
bad_certificate_status_response Sent by clients when an invalid or bad_certificate_status_response Sent by clients when an invalid or
skipping to change at page 72, line 37 skipping to change at page 75, line 35
unknown_psk_identity Sent by servers when PSK key establishment is unknown_psk_identity Sent by servers when PSK key establishment is
desired but no acceptable PSK identity is provided by the client. desired but no acceptable PSK identity is provided by the client.
Sending this alert is OPTIONAL; servers MAY instead choose to send Sending this alert is OPTIONAL; servers MAY instead choose to send
a "decrypt_error" alert to merely indicate an invalid PSK a "decrypt_error" alert to merely indicate an invalid PSK
identity. identity.
certificate_required Sent by servers when a client certificate is certificate_required Sent by servers when a client certificate is
desired but none was provided by the client. desired but none was provided by the client.
[[TODO: IANA Considerations for new alert values.]]
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 client and server random values.
7.1. Key Schedule 7.1. Key Schedule
skipping to change at page 73, line 20 skipping to change at page 76, line 18
Where HkdfLabel is specified as: Where HkdfLabel is specified as:
struct { struct {
uint16 length = Length; uint16 length = Length;
opaque label<9..255> = "TLS 1.3, " + Label; opaque label<9..255> = "TLS 1.3, " + Label;
opaque hash_value<0..255> = HashValue; opaque hash_value<0..255> = HashValue;
} HkdfLabel; } HkdfLabel;
Derive-Secret(Secret, Label, Messages) = Derive-Secret(Secret, Label, Messages) =
HKDF-Expand-Label(Secret, Label, HKDF-Expand-Label(Secret, Label,
Hash(Messages) + Hash(Messages), Hash.Length)
Hash(resumption_context), Hash.length)
The Hash function and the HKDF hash are the cipher suite hash The Hash function and the HKDF hash are the cipher suite hash
algorithm. Hash.length is its output length. algorithm. Hash.length is its output length.
Given a set of n InputSecrets, the final "master secret" is computed Given a set of n InputSecrets, the final "master secret" is computed
by iteratively invoking HKDF-Extract with InputSecret_1, by iteratively invoking HKDF-Extract with InputSecret_1,
InputSecret_2, etc. The initial secret is simply a string of zeroes InputSecret_2, etc. The initial secret is simply a string of zeroes
as long as the size of the Hash that is the basis for the HKDF. as long as the size of the Hash that is the basis for the HKDF.
Concretely, for the present version of TLS 1.3, secrets are added in Concretely, for the present version of TLS 1.3, secrets are added in
the following order: the following order:
skipping to change at page 73, line 47 skipping to change at page 76, line 44
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 client_early_traffic_secret. for generating the client_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(., "client early traffic secret", Early Secret
| ClientHello) |
| = client_early_traffic_secret +------> Derive-Secret(., "client early traffic secret",
| ClientHello)
| = client_early_traffic_secret
|
+------> Derive-Secret(.,
| "external psk binder key" |
| "resumption psk binder key",
| "")
| = binder_key
|
+-----> Derive-Secret(., "early exporter master secret",
| ClientHello)
| = early_exporter_secret
v v
(EC)DHE -> HKDF-Extract (EC)DHE -> HKDF-Extract
| |
v v
Handshake Secret Handshake Secret
| |
+---------> Derive-Secret(., "client handshake traffic secret", +-----> Derive-Secret(., "client handshake traffic secret",
| ClientHello...ServerHello) | ClientHello...ServerHello)
| = client_handshake_traffic_secret | = client_handshake_traffic_secret
| |
+---------> Derive-Secret(., "server handshake traffic secret", +-----> Derive-Secret(., "server handshake traffic secret",
| ClientHello...ServerHello) | ClientHello...ServerHello)
| = server_handshake_traffic_secret | = server_handshake_traffic_secret
| |
v v
0 -> HKDF-Extract 0 -> HKDF-Extract
| |
v v
Master Secret Master Secret
| |
+---------> Derive-Secret(., "client application traffic secret", +-----> Derive-Secret(., "client application traffic secret",
| ClientHello...Server Finished) | ClientHello...Server Finished)
| = client_traffic_secret_0 | = client_traffic_secret_0
| |
+---------> Derive-Secret(., "server application traffic secret", +-----> Derive-Secret(., "server application traffic secret",
| ClientHello...Server Finished) | ClientHello...Server Finished)
| = server_traffic_secret_0 | = server_traffic_secret_0
| |
+---------> Derive-Secret(., "exporter master secret", +-----> Derive-Secret(., "exporter master secret",
| ClientHello...Client Finished) | ClientHello...Server Finished)
| = exporter_secret | = exporter_secret
| |
+---------> Derive-Secret(., "resumption master secret", +-----> Derive-Secret(., "resumption master secret",
ClientHello...Client Finished) ClientHello...Client Finished)
= resumption_secret = resumption_secret
The general pattern here is that the secrets shown down the left side The general pattern here is that the secrets shown down the left side
of the diagram are just raw entropy without context, whereas the of the diagram are just raw entropy without context, whereas the
secrets down the right side include handshake context and therefore secrets down the right side include handshake context and therefore
can be used to derive working keys without additional context. Note can be used to derive working keys without additional context. Note
that the different calls to Derive-Secret may take different Messages that the different calls to Derive-Secret may take different Messages
arguments, even with the same secret. In a 0-RTT exchange, Derive- arguments, even with the same secret. In a 0-RTT exchange, Derive-
Secret is called with four distinct transcripts; in a 1-RTT only Secret is called with four distinct transcripts; in a 1-RTT only
exchange with three distinct transcripts. exchange with three distinct transcripts.
If a given secret is not available, then the 0-value consisting of a If a given secret is not available, then the 0-value consisting of a
string of Hash.length zeroes is used. Note that this does not mean string of Hash.length zeroes is used. Note that this does not mean
skipping rounds, so if PSK is not in use Early Secret will still be skipping rounds, so if PSK is not in use Early Secret will still be
HKDF-Extract(0, 0). HKDF-Extract(0, 0). For the computation of the binder_secret, the
label is "external psk binder key" for external PSKs and "resumption
psk binder key" for resumption PSKs. The different labels prevents
the substitution of one type of PSK for the other.
There are multiple potential Early Secret values depending on which
PSK the server ultimately selects. The client will need to compute
one for each potential PSK; if no PSK is selected, it will then need
to compute the early secret corresponding to the zero PSK.
7.2. Updating Traffic Keys and IVs 7.2. Updating Traffic Keys and IVs
Once the handshake is complete, it is possible for either side to Once the handshake is complete, it is possible for either side to
update its sending traffic keys using the KeyUpdate handshake message update its sending traffic keys using the KeyUpdate handshake message
defined in Section 4.5.3. The next generation of traffic keys is defined in Section 4.5.3. The next generation of traffic keys is
computed by generating client_/server_traffic_secret_N+1 from computed by generating client_/server_traffic_secret_N+1 from
client_/server_traffic_secret_N as described in this section then re- client_/server_traffic_secret_N as described in this section then re-
deriving the traffic keys as described in Section 7.3. deriving the traffic keys as described in Section 7.3.
skipping to change at page 75, line 40 skipping to change at page 79, line 4
Once client/server_traffic_secret_N+1 and its associated traffic keys Once client/server_traffic_secret_N+1 and its associated traffic keys
have been computed, implementations SHOULD delete client_/ have been computed, implementations SHOULD delete client_/
server_traffic_secret_N and its associated traffic keys. server_traffic_secret_N and its associated traffic keys.
7.3. Traffic Key Calculation 7.3. Traffic Key Calculation
The traffic keying material is generated from the following input The traffic keying material is generated from the following input
values: values:
- A secret value - A secret value
- A phase value indicating the phase of the protocol the keys are
being generated for
- A purpose value indicating the specific value being generated - A purpose value indicating the specific value being generated
- The length of the key - The length of the key
The keying material is computed using: The traffic keying material is generated from an input traffic secret
value using:
key = HKDF-Expand-Label(Secret,
phase + ", " + purpose,
"",
key_length)
The following table describes the inputs to the key calculation for
each class of traffic keys:
+-------------+-----------------------------------+-----------------+ [sender]_write_key = HKDF-Expand-Label(Secret, "key", "", key_length)
| Record Type | Secret | Phase | [sender]_write_iv = HKDF-Expand-Label(Secret, "iv", "", iv_length)
+-------------+-----------------------------------+-----------------+
| 0-RTT | client_early_traffic_secret | "early |
| Handshake | | handshake key |
| | | expansion" |
| | | |
| 0-RTT | client_early_traffic_secret | "early |
| Application | | application |
| | | data key |
| | | expansion" |
| | | |
| Handshake | [sender]_handshake_traffic_secret | "handshake key |
| | | expansion" |
| | | |
| Application | [sender]_traffic_secret_N | "application |
| Data | | data key |
| | | expansion" |
+-------------+-----------------------------------+-----------------+
The [sender] in this table denotes the sending side. The following [sender] denotes the sending side. The Secret value for each record
table indicates the purpose values for each type of key: type is shown in the table below.
+----------+---------+ +-------------------+-----------------------------------+
| Key Type | Purpose | | Record Type | Secret |
+----------+---------+ +-------------------+-----------------------------------+
| key | "key" | | 0-RTT Application | client_early_traffic_secret |
| | | | | |
| iv | "iv" | | Handshake | [sender]_handshake_traffic_secret |
+----------+---------+ | | |
| Application Data | [sender]_traffic_secret_N |
+-------------------+-----------------------------------+
All the traffic keying material is recomputed whenever the underlying All the traffic keying material is recomputed whenever the underlying
Secret changes (e.g., when changing from the handshake to application Secret changes (e.g., when changing from the handshake to application
data keys or upon a key update). data keys or upon a key update).
7.3.1. Diffie-Hellman 7.3.1. Diffie-Hellman
A conventional Diffie-Hellman computation is performed. The A conventional Diffie-Hellman computation is performed. The
negotiated key (Z) is converted to byte string by encoding in big- negotiated key (Z) is converted to byte string by encoding in big-
endian, padded with zeros up to the size of the prime. This byte endian, padded with zeros up to the size of the prime. This byte
skipping to change at page 77, line 49 skipping to change at page 80, line 33
For X25519 and X448, see [RFC7748]. For X25519 and X448, see [RFC7748].
7.3.3. Exporters 7.3.3. Exporters
[RFC5705] defines keying material exporters for TLS in terms of the [RFC5705] defines keying material exporters for TLS in terms of the
TLS PRF. This document replaces the PRF with HKDF, thus requiring a TLS PRF. This document replaces the PRF with HKDF, thus requiring a
new construction. The exporter interface remains the same. If new construction. The exporter interface remains the same. If
context is provided, the value is computed as: context is provided, the value is computed as:
HKDF-Expand-Label(exporter_secret, label, context_value, key_length) HKDF-Expand-Label(Secret, label, context_value, key_length)
Where Secret is either the early_exporter_secret or the
exporter_secret. Implementations MUST use the exporter_secret unless
explicitly specified by the application. When adding TLS 1.3 to TLS
1.2 stacks, the exporter_secret MUST be for the existing exporter
interface.
If no context is provided, the value is computed as: If no context is provided, the value is computed as:
HKDF-Expand-Label(exporter_secret, label, "", key_length) HKDF-Expand-Label(Secret, label, "", key_length)
Note that providing no context computes the same value as providing Note that providing no context computes the same value as providing
an empty context. As of this document's publication, no allocated an empty context. As of this document's publication, no allocated
exporter label is used with both modes. Future specifications MUST exporter label is used with both modes. Future specifications MUST
NOT provide an empty context and no context with the same label and NOT provide an empty context and no context with the same label and
SHOULD provide a context, possibly empty, in all exporter SHOULD provide a context, possibly empty, in all exporter
computations. computations.
8. Compliance Requirements 8. Compliance Requirements
skipping to change at page 78, line 46 skipping to change at page 81, line 37
- Supported Versions ("supported_versions"; Section 4.2.1) - Supported Versions ("supported_versions"; Section 4.2.1)
- Signature Algorithms ("signature_algorithms"; Section 4.2.3) - Signature Algorithms ("signature_algorithms"; Section 4.2.3)
- Negotiated Groups ("supported_groups"; Section 4.2.4) - Negotiated Groups ("supported_groups"; Section 4.2.4)
- Key Share ("key_share"; Section 4.2.5) - Key Share ("key_share"; Section 4.2.5)
- Pre-Shared Key ("pre_shared_key"; Section 4.2.6) - Pre-Shared Key ("pre_shared_key"; Section 4.2.6)
- Server Name Indication ("server_name"; Section 3 of [RFC6066])
- Cookie ("cookie"; Section 4.2.2) - Cookie ("cookie"; Section 4.2.2)
- Server Name Indication ("server_name"; Section 3 of [RFC6066])
All implementations MUST send and use these extensions when offering All implementations MUST send and use these extensions when offering
applicable cipher suites: applicable features:
- "supported_versions" is REQUIRED for all ClientHello messages. - "supported_versions" is REQUIRED for all ClientHello messages.
- "signature_algorithms" is REQUIRED for certificate authenticated - "signature_algorithms" is REQUIRED for certificate authentication.
cipher suites.
- "supported_groups" and "key_share" are REQUIRED for DHE or ECDHE - "supported_groups" and "key_share" are REQUIRED for DHE or ECDHE
cipher suites. key exchange.
- "pre_shared_key" is REQUIRED for PSK cipher suites. - "pre_shared_key" is REQUIRED for PSK key agreement.
- "cookie" is REQUIRED for all cipher suites. A client is considered to be attempting to negotiate using this
specification if the ClientHello contains a "supported_versions"
extension with a version indicating TLS 1.3. Such a ClientHello
message MUST meet the following requirements:
When negotiating use of applicable cipher suites, endpoints MUST - If not containing a "pre_shared_key" extension, it MUST contain
abort the handshake with a "missing_extension" alert if the required both a "signature_algorithms" extension and a "supported_groups"
extension was not provided. Any endpoint that receives any invalid extension.
combination of cipher suites and extensions MAY abort the connection
with a "missing_extension" alert, regardless of negotiated - If containing a "supported_groups" extension, it MUST also contain
parameters. a "key_share" extension, and vice versa. (an empty
KeyShare.client_shares vector is permitted)
Servers receiving a ClientHello which does not conform to these
requirements MUST abort the handshake with a "missing_extension"
alert.
Additionally, all implementations MUST support use of the Additionally, all implementations MUST support use of the
"server_name" extension with applications capable of using it. "server_name" extension with applications capable of using it.
Servers MAY require clients to send a valid "server_name" extension. Servers MAY require clients to send a valid "server_name" extension.
Servers requiring this extension SHOULD respond to a ClientHello Servers requiring this extension SHOULD respond to a ClientHello
lacking a "server_name" extension by terminating the connection with lacking a "server_name" extension by terminating the connection with
a "missing_extension" alert. a "missing_extension" alert.
9. Security Considerations 9. Security Considerations
Security issues are discussed throughout this memo, especially in Security issues are discussed throughout this memo, especially in
Appendices B, C, and D. Appendices B, C, and D.
10. IANA Considerations 10. IANA Considerations
This document uses several registries that were originally created in This document uses several registries that were originally created in
[RFC4346]. IANA has updated these to reference this document. The [RFC4346]. IANA has updated these to reference this document. The
registries and their allocation policies are below: registries and their allocation policies are below:
- TLS Cipher Suite Registry: Values with the first byte in the range - TLS Cipher Suite Registry: Values with the first byte in the range
0-254 (decimal) are assigned via Specification Required [RFC2434]. 0-254 (decimal) are assigned via Specification Required [RFC5226].
Values with the first byte 255 (decimal) are reserved for Private Values with the first byte 255 (decimal) are reserved for Private
Use [RFC2434]. Use [RFC5226].
IANA [SHALL add/has added] the cipher suites listed in IANA [SHALL add/has added] the cipher suites listed in
Appendix A.4 to the registry. The "Value" and "Description" Appendix A.4 to the registry. The "Value" and "Description"
columns are taken from the table. The "DTLS-OK" and "Recommended" columns are taken from the table. The "DTLS-OK" and "Recommended"
columns are both marked as "Yes" for each new cipher suite. columns are both marked as "Yes" for each new cipher suite.
[[This assumes [I-D.sandj-tls-iana-registry-updates] has been [[This assumes [I-D.sandj-tls-iana-registry-updates] has been
applied.]] applied.]]
- TLS ContentType Registry: Future values are allocated via - TLS ContentType Registry: Future values are allocated via
Standards Action [RFC2434]. Standards Action [RFC5226].
- TLS Alert Registry: Future values are allocated via Standards - TLS Alert Registry: Future values are allocated via Standards
Action [RFC2434]. Action [RFC5226]. IANA [SHALL update/has updated] this registry
to include values for "end_of_early_data" and "missing_extension".
- TLS HandshakeType Registry: Future values are allocated via - TLS HandshakeType Registry: Future values are allocated via
Standards Action [RFC2434]. IANA [SHALL update/has updated] this Standards Action [RFC5226]. IANA [SHALL update/has updated] this
registry to rename item 4 from "NewSessionTicket" to registry to rename item 4 from "NewSessionTicket" to
"new_session_ticket". "new_session_ticket" and to add the "hello_retry_request",
"encrypted_extensions", and "key_update" values.
This document also uses a registry originally created in [RFC4366]. This document also uses a registry originally created in [RFC4366].
IANA has updated it to reference this document. The registry and its IANA has updated it to reference this document. The registry and its
allocation policy is listed below: allocation policy is listed below:
- TLS ExtensionType Registry: Values with the first byte in the - TLS ExtensionType Registry: Values with the first byte in the
range 0-254 (decimal) are assigned via Specification Required range 0-254 (decimal) are assigned via Specification Required
[RFC2434]. Values with the first byte 255 (decimal) are reserved [RFC5226]. Values with the first byte 255 (decimal) are reserved
for Private Use [RFC2434]. IANA [SHALL update/has updated] this for Private Use [RFC5226]. IANA [SHALL update/has updated] this
registry to include the "key_share", "pre_shared_key", and registry to include the "key_share", "pre_shared_key", and
"early_data" extensions as defined in this document. "early_data" extensions as defined in this document.
IANA [shall update/has updated] this registry to add a IANA [shall update/has updated] this registry to add a
"Recommended" column. IANA [shall/has] initially populated this "Recommended" column. IANA [shall/has] initially populated this
column with the values in the table below. This table has been column with the values in the table below. This table has been
generated by marking Standards Track RFCs as "Yes" and all others generated by marking Standards Track RFCs as "Yes" and all others
as "No". as "No".
IANA [shall update/has updated] this registry to include a "TLS IANA [shall update/has updated] this registry to include a "TLS
1.3" column with the following four values: "Client", indicating 1.3" column with the following six values: "Client", indicating
that the server shall not send them. "Clear", indicating that that the server shall not send them. "Clear", indicating that
they shall be in the ServerHello. "Encrypted", indicating that they shall be in the ServerHello. "Encrypted", indicating that
they shall be in the EncryptedExtensions block, and "No" they shall be in the EncryptedExtensions block, "Certificate"
indicating that they are not used in TLS 1.3. This column [shall indicating that they shall be in the Certificate block, "Ticket"
be/has been] initially populated with the values in this document. indicating that they can appear in the NewSessionTicket message
(only) and "No" indicating that they are not used in TLS 1.3.
This column [shall be/has been] initially populated with the
values in this document.
IANA [shall update/has updated] this registry to include a IANA [shall update/has updated] this registry to include a
"HelloRetryRequest" column with the following two values: "Yes", "HelloRetryRequest" column with the following two values: "Yes",
indicating it may be sent in HelloRetryRequest, and "No", indicating it may be sent in HelloRetryRequest, and "No",
indicating it may not be sent in HelloRetryRequest. This column indicating it may not be sent in HelloRetryRequest. This column
[shall be/has been] initially populated with the values in this [shall be/has been] initially populated with the values in this
document. document.
+------------------------------+----------+---------+---------------+ +-----------------------------+----------+----------+---------------+
| Extension | Recommen | TLS 1.3 | HelloRetryReq | | Extension | Recommen | TLS 1.3 | HelloRetryReq |
| | ded | | uest | | | ded | | uest |
+------------------------------+----------+---------+---------------+ +-----------------------------+----------+----------+---------------+
| server_name [RFC6066] | Yes | Encrypt | No | | server_name [RFC6066] | Yes | Encrypte | No |
| | | ed | | | | | d | |
| | | | | | | | | |
| max_fragment_length | Yes | Encrypt | No | | max_fragment_length | Yes | Encrypte | No |
| [RFC6066] | | ed | | | [RFC6066] | | d | |
| | | | | | | | | |
| client_certificate_url | Yes | Encrypt | No | | client_certificate_url | Yes | Encrypte | No |
| [RFC6066] | | ed | | | [RFC6066] | | d | |
| | | | | | | | | |
| trusted_ca_keys [RFC6066] | Yes | Encrypt | No | | trusted_ca_keys [RFC6066] | Yes | Encrypte | No |
| | | ed | | | | | d | |
| | | | | | | | | |
| truncated_hmac [RFC6066] | Yes | No | No | | truncated_hmac [RFC6066] | Yes | No | No |
| | | | | | | | | |
| status_request [RFC6066] | Yes | Encrypt | No | | status_request [RFC6066] | Yes | Certific | No |
| | | ed | | | | | ate | |
| | | | | | | | | |
| user_mapping [RFC4681] | Yes | Encrypt | No | | user_mapping [RFC4681] | Yes | Encrypte | No |
| | | ed | | | | | d | |
| | | | | | | | | |
| client_authz [RFC5878] | No | No | No | | client_authz [RFC5878] | No | No | No |
| | | | | | | | | |
| server_authz [RFC5878] | No | No | No | | server_authz [RFC5878] | No | No | No |
| | | | | | | | | |
| cert_type [RFC6091] | Yes | Encrypt | No | | cert_type [RFC6091] | Yes | Encrypte | No |
| | | ed | | | | | d | |
| | | | | | | | | |
| supported_groups [RFC7919] | Yes | Encrypt | No | | supported_groups [RFC7919] | Yes | Encrypte | No |
| | | ed | | | | | d | |
| | | | | | | | | |
| ec_point_formats [RFC4492] | Yes | No | No | | ec_point_formats [RFC4492] | Yes | No | No |
| | | | | | | | | |
| srp [RFC5054] | No | No | No | | srp [RFC5054] | No | No | No |
| | | | | | | | | |
| signature_algorithms | Yes | Clear | No | | signature_algorithms | Yes | Clear | No |
| [RFC5246] | | | | | [RFC5246] | | | |
| | | | | | | | | |
| use_srtp [RFC5764] | Yes | Encrypt | No | | use_srtp [RFC5764] | Yes | Encrypte | No |
| | | ed | | | | | d | |
| | | | | | | | | |
| heartbeat [RFC6520] | Yes | Encrypt | No | | heartbeat [RFC6520] | Yes | Encrypte | No |
| | | ed | | | | | d | |
| | | | | | | | | |
| application_layer_protocol_n | Yes | Encrypt | No | | application_layer_protocol_ | Yes | Encrypte | No |
| egotiation [RFC7301] | | ed | | | negotiation [RFC7301] | | d | |
| | | | | | | | | |
| status_request_v2 [RFC6961] | Yes | Encrypt | No | | status_request_v2 [RFC6961] | Yes | Certific | No |
| | | ed | | | | | ate | |
| | | | | | | | | |
| signed_certificate_timestamp | No | Encrypt | No | | signed_certificate_timestam | No | Certific | No |
| [RFC6962] | | ed | | | p [RFC6962] | | ate | |
| | | | | | | | | |
| client_certificate_type | Yes | Encrypt | No | | client_certificate_type | Yes | Encrypte | No |
| [RFC7250] | | ed | | | [RFC7250] | | d | |
| | | | | | | | | |
| server_certificate_type | Yes | Encrypt | No | | server_certificate_type | Yes | Certific | No |
| [RFC7250] | | ed | | | [RFC7250] | | ate | |
| | | | | | | | | |
| padding [RFC7685] | Yes | Client | No | | padding [RFC7685] | Yes | Client | No |
| | | | | | | | | |
| encrypt_then_mac [RFC7366] | Yes | No | No | | encrypt_then_mac [RFC7366] | Yes | No | No |
| | | | | | | | | |
| extended_master_secret | Yes | No | No | | extended_master_secret | Yes | No | No |
| [RFC7627] | | | | | [RFC7627] | | | |
| | | | | | | | | |
| SessionTicket TLS [RFC4507] | Yes | No | No | | SessionTicket TLS [RFC4507] | Yes | No | No |
| | | | | | | | | |
| renegotiation_info [RFC5746] | Yes | No | No | | renegotiation_info | Yes | No | No |
| | | | | | [RFC5746] | | | |
| key_share [[this document]] | Yes | Clear | Yes | | | | | |
| | | | | | key_share [[this document]] | Yes | Clear | Yes |
| pre_shared_key [[this | Yes | Clear | No | | | | | |
| document]] | | | | | pre_shared_key [[this | Yes | Clear | No |
| | | | | | document]] | | | |
| early_data [[this document]] | Yes | Encrypt | No | | | | | |
| | | ed | | | psk_key_exchange_modes | Yes | Client | No |
| | | | | | [[this document]] | | | |
| cookie [[this document]] | Yes | Client | Yes | | | | | |
| | | | | | early_data [[this | Yes | Encrypte | No |
| supported_versions [[this | Yes | Client | No | | document]] | | d | |
| document]] | | | | | | | | |
+------------------------------+----------+---------+---------------+ | cookie [[this document]] | Yes | Client | Yes |
| | | | |
| supported_versions [[this | Yes | Client | No |
| document]] | | | |
| | | | |
| ticket_early_data_info | Yes | Ticket | No |
| [[this document]] | | | |
+-----------------------------+----------+----------+---------------+
IANA [SHALL update/has updated] this registry to include the values
listed above that correspond to this document.
In addition, this document defines two new registries to be In addition, this document defines two new registries to be
maintained by IANA maintained by IANA
- TLS SignatureScheme Registry: Values with the first byte in the - TLS SignatureScheme Registry: Values with the first byte in the
range 0-254 (decimal) are assigned via Specification Required range 0-254 (decimal) are assigned via Specification Required
[RFC2434]. Values with the first byte 255 (decimal) are reserved [RFC5226]. Values with the first byte 255 (decimal) are reserved
for Private Use [RFC2434]. Values with the first byte in the for Private Use [RFC5226]. Values with the first byte in the
range 0-6 or with the second byte in the range 0-3 that are not range 0-6 or with the second byte in the range 0-3 that are not
currently allocated are reserved for backwards compatibility. currently allocated are reserved for backwards compatibility.
This registry SHALL have a "Recommended" column. The registry This registry SHALL have a "Recommended" column. The registry
[shall be/ has been] initially populated with the values described [shall be/ has been] initially populated with the values described
in Section 4.2.3. The following values SHALL be marked as in Section 4.2.3. The following values SHALL be marked as
"Recommended": ecdsa_secp256r1_sha256, ecdsa_secp384r1_sha384, "Recommended": ecdsa_secp256r1_sha256, ecdsa_secp384r1_sha384,
rsa_pss_sha256, rsa_pss_sha384, rsa_pss_sha512, ed25519. rsa_pss_sha256, rsa_pss_sha384, rsa_pss_sha512, ed25519.
Finally, this document obsoletes the TLS HashAlgorithm Registry and Finally, this document obsoletes the TLS HashAlgorithm Registry and
the TLS SignatureAlgorithm Registry, both originally created in the TLS SignatureAlgorithm Registry, both originally created in
skipping to change at page 83, line 38 skipping to change at page 87, line 5
[RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-
Hashing for Message Authentication", RFC 2104, Hashing for Message Authentication", RFC 2104,
DOI 10.17487/RFC2104, February 1997, DOI 10.17487/RFC2104, February 1997,
<http://www.rfc-editor.org/info/rfc2104>. <http://www.rfc-editor.org/info/rfc2104>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>. <http://www.rfc-editor.org/info/rfc2119>.
[RFC2434] Narten, T. and H. Alvestrand, "Guidelines for Writing an
IANA Considerations Section in RFCs", RFC 2434,
DOI 10.17487/RFC2434, October 1998,
<http://www.rfc-editor.org/info/rfc2434>.
[RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography
Standards (PKCS) #1: RSA Cryptography Specifications Standards (PKCS) #1: RSA Cryptography Specifications
Version 2.1", RFC 3447, DOI 10.17487/RFC3447, February Version 2.1", RFC 3447, DOI 10.17487/RFC3447, February
2003, <http://www.rfc-editor.org/info/rfc3447>. 2003, <http://www.rfc-editor.org/info/rfc3447>.
[RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an
IANA Considerations Section in RFCs", BCP 26, RFC 5226,
DOI 10.17487/RFC5226, May 2008,
<http://www.rfc-editor.org/info/rfc5226>.
[RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S.,
Housley, R., and W. Polk, "Internet X.509 Public Key Housley, R., and W. Polk, "Internet X.509 Public Key
Infrastructure Certificate and Certificate Revocation List Infrastructure Certificate and Certificate Revocation List
(CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008,
<http://www.rfc-editor.org/info/rfc5280>. <http://www.rfc-editor.org/info/rfc5280>.
[RFC5288] Salowey, J., Choudhury, A., and D. McGrew, "AES Galois
Counter Mode (GCM) Cipher Suites for TLS", RFC 5288,
DOI 10.17487/RFC5288, August 2008,
<http://www.rfc-editor.org/info/rfc5288>.
[RFC5289] Rescorla, E., "TLS Elliptic Curve Cipher Suites with SHA-
256/384 and AES Galois Counter Mode (GCM)", RFC 5289,
DOI 10.17487/RFC5289, August 2008,
<http://www.rfc-editor.org/info/rfc5289>.
[RFC5487] Badra, M., "Pre-Shared Key Cipher Suites for TLS with SHA-
256/384 and AES Galois Counter Mode", RFC 5487,
DOI 10.17487/RFC5487, March 2009,
<http://www.rfc-editor.org/info/rfc5487>.
[RFC5705] Rescorla, E., "Keying Material Exporters for Transport [RFC5705] Rescorla, E., "Keying Material Exporters for Transport
Layer Security (TLS)", RFC 5705, DOI 10.17487/RFC5705, Layer Security (TLS)", RFC 5705, DOI 10.17487/RFC5705,
March 2010, <http://www.rfc-editor.org/info/rfc5705>. March 2010, <http://www.rfc-editor.org/info/rfc5705>.
[RFC5869] Krawczyk, H. and P. Eronen, "HMAC-based Extract-and-Expand [RFC5869] Krawczyk, H. and P. Eronen, "HMAC-based Extract-and-Expand
Key Derivation Function (HKDF)", RFC 5869, Key Derivation Function (HKDF)", RFC 5869,
DOI 10.17487/RFC5869, May 2010, DOI 10.17487/RFC5869, May 2010,
<http://www.rfc-editor.org/info/rfc5869>. <http://www.rfc-editor.org/info/rfc5869>.
[RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS)
Extensions: Extension Definitions", RFC 6066, Extensions: Extension Definitions", RFC 6066,
DOI 10.17487/RFC6066, January 2011, DOI 10.17487/RFC6066, January 2011,
<http://www.rfc-editor.org/info/rfc6066>. <http://www.rfc-editor.org/info/rfc6066>.
[RFC6209] Kim, W., Lee, J., Park, J., and D. Kwon, "Addition of the
ARIA Cipher Suites to Transport Layer Security (TLS)",
RFC 6209, DOI 10.17487/RFC6209, April 2011,
<http://www.rfc-editor.org/info/rfc6209>.
[RFC6367] Kanno, S. and M. Kanda, "Addition of the Camellia Cipher
Suites to Transport Layer Security (TLS)", RFC 6367,
DOI 10.17487/RFC6367, September 2011,
<http://www.rfc-editor.org/info/rfc6367>.
[RFC6655] McGrew, D. and D. Bailey, "AES-CCM Cipher Suites for [RFC6655] McGrew, D. and D. Bailey, "AES-CCM Cipher Suites for
Transport Layer Security (TLS)", RFC 6655, Transport Layer Security (TLS)", RFC 6655,
DOI 10.17487/RFC6655, July 2012, DOI 10.17487/RFC6655, July 2012,
<http://www.rfc-editor.org/info/rfc6655>. <http://www.rfc-editor.org/info/rfc6655>.
[RFC6961] Pettersen, Y., "The Transport Layer Security (TLS) [RFC6961] Pettersen, Y., "The Transport Layer Security (TLS)
Multiple Certificate Status Request Extension", RFC 6961, Multiple Certificate Status Request Extension", RFC 6961,
DOI 10.17487/RFC6961, June 2013, DOI 10.17487/RFC6961, June 2013,
<http://www.rfc-editor.org/info/rfc6961>. <http://www.rfc-editor.org/info/rfc6961>.
[RFC6962] Laurie, B., Langley, A., and E. Kasper, "Certificate
Transparency", RFC 6962, DOI 10.17487/RFC6962, June 2013,
<http://www.rfc-editor.org/info/rfc6962>.
[RFC6979] Pornin, T., "Deterministic Usage of the Digital Signature [RFC6979] Pornin, T., "Deterministic Usage of the Digital Signature
Algorithm (DSA) and Elliptic Curve Digital Signature Algorithm (DSA) and Elliptic Curve Digital Signature
Algorithm (ECDSA)", RFC 6979, DOI 10.17487/RFC6979, August Algorithm (ECDSA)", RFC 6979, DOI 10.17487/RFC6979, August
2013, <http://www.rfc-editor.org/info/rfc6979>. 2013, <http://www.rfc-editor.org/info/rfc6979>.
[RFC7251] McGrew, D., Bailey, D., Campagna, M., and R. Dugal, "AES-
CCM Elliptic Curve Cryptography (ECC) Cipher Suites for
TLS", RFC 7251, DOI 10.17487/RFC7251, June 2014,
<http://www.rfc-editor.org/info/rfc7251>.
[RFC7443] Patil, P., Reddy, T., Salgueiro, G., and M. Petit-
Huguenin, "Application-Layer Protocol Negotiation (ALPN)
Labels for Session Traversal Utilities for NAT (STUN)
Usages", RFC 7443, DOI 10.17487/RFC7443, January 2015,
<http://www.rfc-editor.org/info/rfc7443>.
[RFC7539] Nir, Y. and A. Langley, "ChaCha20 and Poly1305 for IETF [RFC7539] Nir, Y. and A. Langley, "ChaCha20 and Poly1305 for IETF
Protocols", RFC 7539, DOI 10.17487/RFC7539, May 2015, Protocols", RFC 7539, DOI 10.17487/RFC7539, May 2015,
<http://www.rfc-editor.org/info/rfc7539>. <http://www.rfc-editor.org/info/rfc7539>.
[RFC7748] Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves [RFC7748] Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves
for Security", RFC 7748, DOI 10.17487/RFC7748, January for Security", RFC 7748, DOI 10.17487/RFC7748, January
2016, <http://www.rfc-editor.org/info/rfc7748>. 2016, <http://www.rfc-editor.org/info/rfc7748>.
[RFC7905] Langley, A., Chang, W., Mavrogiannopoulos, N., [RFC7919] Gillmor, D., "Negotiated Finite Field Diffie-Hellman
Strombergson, J., and S. Josefsson, "ChaCha20-Poly1305 Ephemeral Parameters for Transport Layer Security (TLS)",
Cipher Suites for Transport Layer Security (TLS)", RFC 7919, DOI 10.17487/RFC7919, August 2016,
RFC 7905, DOI 10.17487/RFC7905, June 2016, <http://www.rfc-editor.org/info/rfc7919>.
<http://www.rfc-editor.org/info/rfc7905>.
[SHS] National Institute of Standards and Technology, U.S. [SHS] National Institute of Standards and Technology, U.S.
Department of Commerce, "Secure Hash Standard", NIST FIPS Department of Commerce, "Secure Hash Standard", NIST FIPS
PUB 180-4, March 2012. PUB 180-4, March 2012.
[X690] ITU-T, "Information technology - ASN.1 encoding Rules: [X690] ITU-T, "Information technology - ASN.1 encoding Rules:
Specification of Basic Encoding Rules (BER), Canonical Specification of Basic Encoding Rules (BER), Canonical
Encoding Rules (CER) and Distinguished Encoding Rules Encoding Rules (CER) and Distinguished Encoding Rules
(DER)", ISO/IEC 8825-1:2002, 2002. (DER)", ISO/IEC 8825-1:2002, 2002.
skipping to change at page 86, line 49 skipping to change at page 89, line 28
[FGSW16] Fischlin, M., Guenther, F., Schmidt, B., and B. Warinschi, [FGSW16] Fischlin, M., Guenther, F., Schmidt, B., and B. Warinschi,
"Key Confirmation in Key Exchange: A Formal Treatment and "Key Confirmation in Key Exchange: A Formal Treatment and
Implications for TLS 1.3", Proceedings of IEEE Symposium Implications for TLS 1.3", Proceedings of IEEE Symposium
on Security and Privacy (Oakland) 2016 , 2016. on Security and Privacy (Oakland) 2016 , 2016.
[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>.
[FW15] Florian Weimer, ., "Factoring RSA Keys With TLS Perfect
Forward Secrecy", September 2015.
[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.sandj-tls-iana-registry-updates] [I-D.sandj-tls-iana-registry-updates]
Salowey, J. and S. Turner, "D/TLS IANA Registry Updates", Salowey, J. and S. Turner, "D/TLS IANA Registry Updates",
draft-sandj-tls-iana-registry-updates-00 (work in draft-sandj-tls-iana-registry-updates-00 (work in
progress), September 2016. progress), September 2016.
[IEEE1363] [IEEE1363]
skipping to change at page 87, line 31 skipping to change at page 90, line 14
[PKCS7] RSA Laboratories, "PKCS #7: RSA Cryptographic Message [PKCS7] RSA Laboratories, "PKCS #7: RSA Cryptographic Message
Syntax Standard, version 1.5", November 1993. Syntax Standard, version 1.5", November 1993.
[PSK-FINISHED] [PSK-FINISHED]
Cremers, C., Horvat, M., van der Merwe, T., and S. Scott, Cremers, C., Horvat, M., van der Merwe, T., and S. Scott,
"Revision 10: possible attack if client authentication is "Revision 10: possible attack if client authentication is
allowed during PSK", 2015, <https://www.ietf.org/mail- allowed during PSK", 2015, <https://www.ietf.org/mail-
archive/web/tls/current/msg18215.html>. archive/web/tls/current/msg18215.html>.
[RFC0793] Postel, J., "Transmission Control Protocol", STD 7,
RFC 793, DOI 10.17487/RFC0793, September 1981,
<http://www.rfc-editor.org/info/rfc793>.
[RFC1948] Bellovin, S., "Defending Against Sequence Number Attacks",
RFC 1948, DOI 10.17487/RFC1948, May 1996,
<http://www.rfc-editor.org/info/rfc1948>.
[RFC3552] Rescorla, E. and B. Korver, "Guidelines for Writing RFC [RFC3552] Rescorla, E. and B. Korver, "Guidelines for Writing RFC
Text on Security Considerations", BCP 72, RFC 3552, Text on Security Considerations", BCP 72, RFC 3552,
DOI 10.17487/RFC3552, July 2003, DOI 10.17487/RFC3552, July 2003,
<http://www.rfc-editor.org/info/rfc3552>. <http://www.rfc-editor.org/info/rfc3552>.
[RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker,
"Randomness Requirements for Security", BCP 106, RFC 4086, "Randomness Requirements for Security", BCP 106, RFC 4086,
DOI 10.17487/RFC4086, June 2005, DOI 10.17487/RFC4086, June 2005,
<http://www.rfc-editor.org/info/rfc4086>. <http://www.rfc-editor.org/info/rfc4086>.
[RFC4279] Eronen, P., Ed. and H. Tschofenig, Ed., "Pre-Shared Key [RFC4279] Eronen, P., Ed. and H. Tschofenig, Ed., "Pre-Shared Key
Ciphersuites for Transport Layer Security (TLS)", Ciphersuites for Transport Layer Security (TLS)",
RFC 4279, DOI 10.17487/RFC4279, December 2005, RFC 4279, DOI 10.17487/RFC4279, December 2005,
<http://www.rfc-editor.org/info/rfc4279>. <http://www.rfc-editor.org/info/rfc4279>.
[RFC4302] Kent, S., "IP Authentication Header", RFC 4302,
DOI 10.17487/RFC4302, December 2005,
<http://www.rfc-editor.org/info/rfc4302>.
[RFC4303] Kent, S., "IP Encapsulating Security Payload (ESP)",
RFC 4303, DOI 10.17487/RFC4303, December 2005,
<http://www.rfc-editor.org/info/rfc4303>.
[RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security [RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.1", RFC 4346, (TLS) Protocol Version 1.1", RFC 4346,
DOI 10.17487/RFC4346, April 2006, DOI 10.17487/RFC4346, April 2006,
<http://www.rfc-editor.org/info/rfc4346>. <http://www.rfc-editor.org/info/rfc4346>.
[RFC4366] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J., [RFC4366] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J.,
and T. Wright, "Transport Layer Security (TLS) and T. Wright, "Transport Layer Security (TLS)
Extensions", RFC 4366, DOI 10.17487/RFC4366, April 2006, Extensions", RFC 4366, DOI 10.17487/RFC4366, April 2006,
<http://www.rfc-editor.org/info/rfc4366>. <http://www.rfc-editor.org/info/rfc4366>.
[RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B. [RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B.
Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites
for Transport Layer Security (TLS)", RFC 4492, for Transport Layer Security (TLS)", RFC 4492,
DOI 10.17487/RFC4492, May 2006, DOI 10.17487/RFC4492, May 2006,
<http://www.rfc-editor.org/info/rfc4492>. <http://www.rfc-editor.org/info/rfc4492>.
[RFC4506] Eisler, M., Ed., "XDR: External Data Representation
Standard", STD 67, RFC 4506, DOI 10.17487/RFC4506, May
2006, <http://www.rfc-editor.org/info/rfc4506>.
[RFC4507] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig, [RFC4507] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig,
"Transport Layer Security (TLS) Session Resumption without "Transport Layer Security (TLS) Session Resumption without
Server-Side State", RFC 4507, DOI 10.17487/RFC4507, May Server-Side State", RFC 4507, DOI 10.17487/RFC4507, May
2006, <http://www.rfc-editor.org/info/rfc4507>. 2006, <http://www.rfc-editor.org/info/rfc4507>.
[RFC4681] Santesson, S., Medvinsky, A., and J. Ball, "TLS User [RFC4681] Santesson, S., Medvinsky, A., and J. Ball, "TLS User
Mapping Extension", RFC 4681, DOI 10.17487/RFC4681, Mapping Extension", RFC 4681, DOI 10.17487/RFC4681,
October 2006, <http://www.rfc-editor.org/info/rfc4681>. October 2006, <http://www.rfc-editor.org/info/rfc4681>.
[RFC5054] Taylor, D., Wu, T., Mavrogiannopoulos, N., and T. Perrin, [RFC5054] Taylor, D., Wu, T., Mavrogiannopoulos, N., and T. Perrin,
skipping to change at page 89, line 24 skipping to change at page 91, line 34
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", RFC 5246, (TLS) Protocol Version 1.2", RFC 5246,
DOI 10.17487/RFC5246, August 2008, DOI 10.17487/RFC5246, August 2008,
<http://www.rfc-editor.org/info/rfc5246>. <http://www.rfc-editor.org/info/rfc5246>.
[RFC5746] Rescorla, E., Ray, M., Dispensa, S., and N. Oskov, [RFC5746] Rescorla, E., Ray, M., Dispensa, S., and N. Oskov,
"Transport Layer Security (TLS) Renegotiation Indication "Transport Layer Security (TLS) Renegotiation Indication
Extension", RFC 5746, DOI 10.17487/RFC5746, February 2010, Extension", RFC 5746, DOI 10.17487/RFC5746, February 2010,
<http://www.rfc-editor.org/info/rfc5746>. <http://www.rfc-editor.org/info/rfc5746>.
[RFC5763] Fischl, J., Tschofenig, H., and E. Rescorla, "Framework
for Establishing a Secure Real-time Transport Protocol
(SRTP) Security Context Using Datagram Transport Layer
Security (DTLS)", RFC 5763, DOI 10.17487/RFC5763, May
2010, <http://www.rfc-editor.org/info/rfc5763>.
[RFC5764] McGrew, D. and E. Rescorla, "Datagram Transport Layer [RFC5764] McGrew, D. and E. Rescorla, "Datagram Transport Layer
Security (DTLS) Extension to Establish Keys for the Secure Security (DTLS) Extension to Establish Keys for the Secure
Real-time Transport Protocol (SRTP)", RFC 5764, Real-time Transport Protocol (SRTP)", RFC 5764,
DOI 10.17487/RFC5764, May 2010, DOI 10.17487/RFC5764, May 2010,
<http://www.rfc-editor.org/info/rfc5764>. <http://www.rfc-editor.org/info/rfc5764>.
[RFC5878] Brown, M. and R. Housley, "Transport Layer Security (TLS) [RFC5878] Brown, M. and R. Housley, "Transport Layer Security (TLS)
Authorization Extensions", RFC 5878, DOI 10.17487/RFC5878, Authorization Extensions", RFC 5878, DOI 10.17487/RFC5878,
May 2010, <http://www.rfc-editor.org/info/rfc5878>. May 2010, <http://www.rfc-editor.org/info/rfc5878>.
skipping to change at page 90, line 15 skipping to change at page 92, line 19
[RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer
Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347,
January 2012, <http://www.rfc-editor.org/info/rfc6347>. January 2012, <http://www.rfc-editor.org/info/rfc6347>.
[RFC6520] Seggelmann, R., Tuexen, M., and M. Williams, "Transport [RFC6520] Seggelmann, R., Tuexen, M., and M. Williams, "Transport
Layer Security (TLS) and Datagram Transport Layer Security Layer Security (TLS) and Datagram Transport Layer Security
(DTLS) Heartbeat Extension", RFC 6520, (DTLS) Heartbeat Extension", RFC 6520,
DOI 10.17487/RFC6520, February 2012, DOI 10.17487/RFC6520, February 2012,
<http://www.rfc-editor.org/info/rfc6520>. <http://www.rfc-editor.org/info/rfc6520>.
[RFC6962] Laurie, B., Langley, A., and E. Kasper, "Certificate
Transparency", RFC 6962, DOI 10.17487/RFC6962, June 2013,
<http://www.rfc-editor.org/info/rfc6962>.
[RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Message Syntax and Routing", Protocol (HTTP/1.1): Message Syntax and Routing",
RFC 7230, DOI 10.17487/RFC7230, June 2014, RFC 7230, DOI 10.17487/RFC7230, June 2014,
<http://www.rfc-editor.org/info/rfc7230>. <http://www.rfc-editor.org/info/rfc7230>.
[RFC7250] Wouters, P., Ed., Tschofenig, H., Ed., Gilmore, J., [RFC7250] Wouters, P., Ed., Tschofenig, H., Ed., Gilmore, J.,
Weiler, S., and T. Kivinen, "Using Raw Public Keys in Weiler, S., and T. Kivinen, "Using Raw Public Keys in
Transport Layer Security (TLS) and Datagram Transport Transport Layer Security (TLS) and Datagram Transport
Layer Security (DTLS)", RFC 7250, DOI 10.17487/RFC7250, Layer Security (DTLS)", RFC 7250, DOI 10.17487/RFC7250,
June 2014, <http://www.rfc-editor.org/info/rfc7250>. June 2014, <http://www.rfc-editor.org/info/rfc7250>.
skipping to change at page 91, line 15 skipping to change at page 93, line 15
[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>.
[RFC7919] Gillmor, D., "Negotiated Finite Field Diffie-Hellman
Ephemeral Parameters for Transport Layer Security (TLS)",
RFC 7919, DOI 10.17487/RFC7919, August 2016,
<http://www.rfc-editor.org/info/rfc7919>.
[RFC7924] Santesson, S. and H. Tschofenig, "Transport Layer Security [RFC7924] Santesson, S. and H. Tschofenig, "Transport Layer Security
(TLS) Cached Information Extension", RFC 7924, (TLS) Cached Information Extension", RFC 7924,
DOI 10.17487/RFC7924, July 2016, DOI 10.17487/RFC7924, July 2016,
<http://www.rfc-editor.org/info/rfc7924>. <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 Diffie-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
Attacks: Breaking Authentication in TLS, IKE, and SSH", Attacks: Breaking Authentication in TLS, IKE, and SSH",
Network and Distributed System Security Symposium (NDSS Network and Distributed System Security Symposium (NDSS
2016) , 2016. 2016) , 2016.
[SSL2] Hickman, K., "The SSL Protocol", February 1995. [SSL2] Hickman, K., "The SSL Protocol", February 1995.
[SSL3] Freier, A., Karlton, P., and P. Kocher, "The SSL 3.0 [SSL3] Freier, A., Karlton, P., and P. Kocher, "The SSL 3.0
skipping to change at page 93, line 25 skipping to change at page 94, 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 legacy_record_version = { 3, 1 }; /* TLS v1.x */ ProtocolVersion legacy_record_version = 0x0301; /* 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 TLSInnerPlaintext.type */ ContentType opaque_type = 23; /* application_data */
ProtocolVersion legacy_record_version = { 3, 1 }; /* TLS v1.x */ ProtocolVersion legacy_record_version = 0x0301; /* 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 95, line 44 skipping to change at page 96, 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 { uint16 ProtocolVersion;
uint8 major; opaque Random[32];
uint8 minor;
} ProtocolVersion;
struct { uint8 CipherSuite[2]; /* Cryptographic suite selector */
opaque random_bytes[32];
} Random;
uint8 CipherSuite[2]; /* Cryptographic suite selector */
struct { struct {
ProtocolVersion legacy_version = { 3, 3 }; /* TLS v1.2 */ ProtocolVersion legacy_version = 0x0303; /* TLS v1.2 */
Random random; Random random;
opaque legacy_session_id<0..32>; opaque legacy_session_id<0..32>;
CipherSuite cipher_suites<2..2^16-2>; CipherSuite cipher_suites<2..2^16-2>;
opaque legacy_compression_methods<1..2^8-1>; opaque legacy_compression_methods<1..2^8-1>;
Extension extensions<0..2^16-1>; Extension extensions<0..2^16-1>;
} ClientHello; } ClientHello;
struct { struct {
ProtocolVersion 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;
Extension extensions<2..2^16-1>; Extension extensions<2..2^16-1>;
} HelloRetryRequest; } HelloRetryRequest;
struct { struct {
ExtensionType extension_type; ExtensionType extension_type;
opaque extension_data<0..2^16-1>; opaque extension_data<0..2^16-1>;
} Extension; } Extension;
enum { enum {
supported_groups(10), 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),
supported_versions(43), supported_versions(43),
cookie(44), cookie(44),
(65535) psk_key_exchange_modes(45),
} ExtensionType; ticket_early_data_info(46),
(65535)
} ExtensionType;
struct { struct {
NamedGroup group; NamedGroup group;
opaque key_exchange<1..2^16-1>; opaque key_exchange<1..2^16-1>;
} KeyShareEntry; } KeyShareEntry;
struct { struct {
select (Handshake.msg_type) { select (Handshake.msg_type) {
case client_hello: case client_hello:
KeyShareEntry client_shares<0..2^16-1>; KeyShareEntry client_shares<0..2^16-1>;
case hello_retry_request: case hello_retry_request:
NamedGroup selected_group; NamedGroup selected_group;
case server_hello: case server_hello:
KeyShareEntry server_share; KeyShareEntry server_share;
}; };
} KeyShare; } KeyShare;
enum { psk_ke(0), psk_dhe_ke(1), (255) } PskKeyExchangeMode; struct {
enum { psk_auth(0), psk_sign_auth(1), (255) } PskAuthenticationMode; opaque identity<0..2^16-1>;
uint32 obfuscated_ticket_age;
} PskIdentity;
struct { opaque PskBinderEntry<32..255>;
PskKeyExchangeMode ke_modes<1..255>;
PskAuthenticationMode auth_modes<1..255>;
opaque identity<0..2^16-1>;
} PskIdentity;
struct { struct {
select (Handshake.msg_type) { select (Handshake.msg_type) {
case client_hello: case client_hello:
PskIdentity identities<6..2^16-1>; PskIdentity identities<6..2^16-1>;
PskBinderEntry binders<33..2^16-1>;
case server_hello: case server_hello:
uint16 selected_identity; uint16 selected_identity;
}; };
} PreSharedKeyExtension;
struct { } PreSharedKeyExtension;
select (Handshake.msg_type) {
case client_hello:
uint32 obfuscated_ticket_age;
case server_hello: enum { psk_ke(0), psk_dhe_ke(1), (255) } PskKeyExchangeMode;
struct {};
}; struct {
} EarlyDataIndication; PskKeyExchangeMode ke_modes<1..255>;
} PskKeyExchangeModes;
struct {
} EarlyDataIndication;
A.3.1.1. Version Extension A.3.1.1. Version Extension
struct { struct {
ProtocolVersion versions<2..254>; ProtocolVersion versions<2..254>;
} SupportedVersions; } SupportedVersions;
A.3.1.2. Cookie Extension A.3.1.2. Cookie Extension
struct { struct {
opaque cookie<0..2^16-1>; opaque cookie<1..2^16-1>;
} Cookie; } Cookie;
A.3.1.3. Signature Algorithm Extension A.3.1.3. Signature Algorithm Extension
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 98, line 43 skipping to change at page 99, line 43
ecdsa_sha1_RESERVED (0x0203), ecdsa_sha1_RESERVED (0x0203),
obsolete_RESERVED (0x0000..0x0200), obsolete_RESERVED (0x0000..0x0200),
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>; struct {
SignatureScheme supported_signature_algorithms<2..2^16-2>;
} SignatureSchemeList;
A.3.1.4. Supported Groups Extension A.3.1.4. 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) */
skipping to change at page 99, line 36 skipping to change at page 100, line 36
Values within "obsolete_RESERVED" ranges were used in previous Values within "obsolete_RESERVED" ranges were used in previous
versions of TLS and MUST NOT be offered or negotiated by TLS 1.3 versions of TLS and MUST NOT be offered or negotiated by TLS 1.3
implementations. The obsolete curves have various known/theoretical implementations. The obsolete curves have various known/theoretical
weaknesses or have had very little usage, in some cases only due to weaknesses or have had very little usage, in some cases only due to
unintentional server configuration issues. They are no longer unintentional server configuration issues. They are no longer
considered appropriate for general use and should be assumed to be considered appropriate for general use and should be assumed to be
potentially unsafe. The set of curves specified here is sufficient potentially unsafe. The set of curves specified here is sufficient
for interoperability with all currently deployed and properly for interoperability with all currently deployed and properly
configured TLS implementations. configured TLS implementations.
A.3.1.5. Deprecated Extensions
The following extensions are no longer applicable to TLS 1.3,
although TLS 1.3 clients MAY send them if they are willing to
negotiate them with prior versions of TLS. TLS 1.3 servers MUST
ignore these extensions if they are negotiating TLS 1.3:
truncated_hmac [RFC6066], srp [RFC5054], encrypt_then_mac [RFC7366],
extended_master_secret [RFC7627], SessionTicket [RFC5077], and
renegotiation_info [RFC5746].
A.3.2. Server Parameters Messages A.3.2. Server Parameters Messages
struct { struct {
Extension extensions<0..2^16-1>; Extension extensions<0..2^16-1>;
} EncryptedExtensions; } EncryptedExtensions;
opaque DistinguishedName<1..2^16-1>; 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>;
skipping to change at page 100, line 28 skipping to change at page 101, line 28
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;
A.3.3. Authentication Messages A.3.3. Authentication Messages
opaque ASN1Cert<1..2^24-1>; opaque ASN1Cert<1..2^24-1>;
struct { struct {
ASN1Cert cert_data;
Extension extensions<0..2^16-1>;
} CertificateEntry;
struct {
opaque certificate_request_context<0..2^8-1>; opaque certificate_request_context<0..2^8-1>;
ASN1Cert certificate_list<0..2^24-1>; CertificateEntry certificate_list<0..2^24-1>;
} Certificate; } Certificate;
struct { struct {
SignatureScheme algorithm; SignatureScheme algorithm;
opaque signature<0..2^16-1>; opaque signature<0..2^16-1>;
} CertificateVerify; } CertificateVerify;
struct { struct {
opaque verify_data[Hash.length]; opaque verify_data[Hash.length];
} Finished; } Finished;
A.3.4. Ticket Establishment A.3.4. Ticket Establishment
enum { ticket_early_data_info(1), (65535) } TicketExtensionType;
struct {
TicketExtensionType extension_type;
opaque extension_data<1..2^16-1>;
} TicketExtension;
struct { struct {
uint32 ticket_lifetime; uint32 ticket_lifetime;
PskKeyExchangeMode ke_modes<1..255>; uint32 ticket_age_add;
PskAuthenticationMode auth_modes<1..255>;
opaque ticket<1..2^16-1>; opaque ticket<1..2^16-1>;
TicketExtension extensions<0..2^16-2>; Extension extensions<0..2^16-2>;
} NewSessionTicket; } NewSessionTicket;
struct {
uint32 max_early_data_size;
} TicketEarlyDataInfo;
A.3.5. Updating Keys A.3.5. Updating Keys
enum { update_not_requested(0), update_requested(1), (255) enum {
} KeyUpdateRequest; update_not_requested(0), update_requested(1), (255)
} KeyUpdateRequest;
struct { struct {
KeyUpdateRequest request_update; KeyUpdateRequest request_update;
} KeyUpdate; } KeyUpdate;
A.4. Cipher Suites A.4. Cipher Suites
A symmetric cipher suite defines the pair of the AEAD algorithm and A symmetric cipher suite defines the pair of the AEAD algorithm and
hash algorithm to be used with HKDF. Cipher suite names follow the hash algorithm to be used with HKDF. Cipher suite names follow the
naming convention: naming convention:
CipherSuite TLS_AEAD_HASH = VALUE; CipherSuite TLS_AEAD_HASH = VALUE;
+-----------+------------------------------------------------+ +-----------+------------------------------------------------+
skipping to change at page 102, line 27 skipping to change at page 103, line 27
+------------------------------+-------------+ +------------------------------+-------------+
The corresponding AEAD algorithms AEAD_AES_128_GCM, AEAD_AES_256_GCM, The corresponding AEAD algorithms AEAD_AES_128_GCM, AEAD_AES_256_GCM,
and AEAD_AES_128_CCM are defined in [RFC5116]. and AEAD_AES_128_CCM are defined in [RFC5116].
AEAD_CHACHA20_POLY1305 is defined in [RFC7539]. AEAD_AES_128_CCM_8 AEAD_CHACHA20_POLY1305 is defined in [RFC7539]. AEAD_AES_128_CCM_8
is defined in [RFC6655]. The corresponding hash algorithms are is defined in [RFC6655]. The corresponding hash algorithms are
defined in [SHS]. defined in [SHS].
Although TLS 1.3 uses the same cipher suite space as previous Although TLS 1.3 uses the same cipher suite space as previous
versions of TLS, TLS 1.3 cipher suites are defined differently, only versions of TLS, TLS 1.3 cipher suites are defined differently, only
specifying the symmetric ciphers, and cannot it be used for TLS 1.2. specifying the symmetric ciphers, and cannot be used for TLS 1.2.
Similarly, TLS 1.2 and lower cipher suites cannot be used with TLS Similarly, TLS 1.2 and lower cipher suites cannot be used with TLS
1.3. 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.
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.
skipping to change at page 103, line 51 skipping to change at page 104, line 51
multiple TLS records (see Section 5.1)? Including corner cases multiple TLS records (see Section 5.1)? Including corner cases
like a ClientHello that is split to several small fragments? Do like a ClientHello that is split to several small fragments? Do
you fragment handshake messages that exceed the maximum fragment you fragment handshake messages that exceed the maximum fragment
size? In particular, the certificate and certificate request size? In particular, the certificate and certificate request
handshake messages can be large enough to require fragmentation. handshake messages can be large enough to require fragmentation.
- Do you ignore the TLS record layer version number in all TLS - Do you ignore the TLS record layer version number in all TLS
records? (see Appendix C) records? (see Appendix C)
- Have you ensured that all support for SSL, RC4, EXPORT ciphers, - Have you ensured that all support for SSL, RC4, EXPORT ciphers,
and MD5 (via the "signature_algorithm" extension) is completely and MD5 (via the "signature_algorithms" extension) is completely
removed from all possible configurations that support TLS 1.3 or removed from all possible configurations that support TLS 1.3 or
later, and that attempts to use these obsolete capabilities fail later, and that attempts to use these obsolete capabilities fail
correctly? (see Appendix C) correctly? (see Appendix C)
- Do you handle TLS extensions in ClientHello correctly, including - Do you handle TLS extensions in ClientHello correctly, including
unknown extensions. unknown extensions.
- When the server has requested a client certificate, but no - When the server has requested a client certificate, but no
suitable certificate is available, do you correctly send an empty suitable certificate is available, do you correctly send an empty
Certificate message, instead of omitting the whole message (see Certificate message, instead of omitting the whole message (see
Section 4.4.1.2)? Section 4.4.1.3)?
- When processing the plaintext fragment produced by AEAD-Decrypt - When processing the plaintext fragment produced by AEAD-Decrypt
and scanning from the end for the ContentType, do you avoid and scanning from the end for the ContentType, do you avoid
scanning past the start of the cleartext in the event that the scanning past the start of the cleartext in the event that the
peer has sent a malformed plaintext of all-zeros? peer has sent a malformed plaintext of all-zeros?
- When processing a ClientHello containing a version of { 3, 5 } or
higher, do you respond with the highest common version of TLS
rather than requiring an exact match? Have you ensured this
continues to be true with arbitrarily higher version numbers?
(e.g. { 4, 0 }, { 9, 9 }, { 255, 255 })
- Do you properly ignore unrecognized cipher suites (Section 4.1.2), - Do you properly ignore unrecognized cipher suites (Section 4.1.2),
hello extensions (Section 4.2), named groups (Section 4.2.4), and hello extensions (Section 4.2), named groups (Section 4.2.4), and
signature algorithms (Section 4.2.3)? signature algorithms (Section 4.2.3)?
Cryptographic details: Cryptographic details:
- What countermeasures do you use to prevent timing attacks - What countermeasures do you use to prevent timing attacks
[TIMING]? [TIMING]?
- When verifying RSA signatures, do you accept both NULL and missing - When verifying RSA signatures, do you accept both NULL and missing
skipping to change at page 105, line 8 skipping to change at page 105, line 49
- 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.2) 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.5.1)? (see Section 4.2.5.1)?
- Do you verify signatures after making them to protect against RSA-
CRT key leaks? [FW15]
B.6. 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
skipping to change at page 106, line 23 skipping to change at page 107, line 21
extension & ServerHello.version) In order to maximize extension & ServerHello.version) In order to maximize
interoperability with older endpoints, implementations that negotiate interoperability with older endpoints, implementations that negotiate
the use of TLS 1.0-1.2 SHOULD set the record layer version number to the use of TLS 1.0-1.2 SHOULD set the record layer version number to
the negotiated version for the ServerHello and all records the negotiated version for the ServerHello and all records
thereafter. thereafter.
For maximum compatibility with previously non-standard behavior and For maximum compatibility with previously non-standard behavior and
misconfigured deployments, all implementations SHOULD support misconfigured deployments, all implementations SHOULD support
validation of certification paths based on the expectations in this validation of certification paths based on the expectations in this
document, even when handling prior TLS versions' handshakes. (see document, even when handling prior TLS versions' handshakes. (see
Section 4.4.1.1) Section 4.4.1.2)
TLS 1.2 and prior supported an "Extended Master Secret" [RFC7627] TLS 1.2 and prior supported an "Extended Master Secret" [RFC7627]
extension which digested large parts of the handshake transcript into extension which digested large parts of the handshake transcript into
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, 3 } (TLS 1.2) in send a normal TLS 1.3 ClientHello containing 0x0303 (TLS 1.2) in
ClientHello.legacy_version but with the correct version in the ClientHello.legacy_version but with the correct version in the
"supported_versions" extension. If the server does not support TLS "supported_versions" extension. If the server does not support TLS
1.3 it will respond with a ServerHello containing an older version 1.3 it will respond with a ServerHello containing an older version
number. If the client agrees to use this version, the negotiation number. If the client agrees to use this version, the negotiation
will proceed as appropriate for the negotiated protocol. A client will proceed as appropriate for the negotiated protocol. A client
resuming a session SHOULD initiate the connection using the version resuming a session SHOULD initiate the connection using the version
that was previously negotiated. 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 abort the handshake with a (or not acceptable), the client MUST abort the handshake with a
"protocol_version" alert. "protocol_version" alert.
If a TLS server receives a ClientHello containing a version number
greater than the highest version supported by the server, it MUST
reply according to the highest version supported by the server.
Some legacy server implementations are known to not implement the TLS Some legacy server implementations are known to not implement the TLS
specification properly and might abort connections upon encountering specification properly and might abort connections upon encountering
TLS extensions or versions which it is not aware of. TLS extensions or versions which it is not aware of.
Interoperability with buggy servers is a complex topic beyond the Interoperability with buggy servers is a complex topic beyond the
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 indicating a version A TLS server can also receive a ClientHello indicating a version
number smaller than its highest supported version. If the number smaller than its highest supported version. If the
"supported_versions" extension is present, the server MUST negotiate "supported_versions" extension is present, the server MUST negotiate
skipping to change at page 107, line 22 skipping to change at page 108, line 15
Interoperability with buggy servers is a complex topic beyond the Interoperability with buggy servers is a complex topic beyond the
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 indicating a version A TLS server can also receive a ClientHello indicating a version
number smaller than its highest supported version. If the number smaller than its highest supported version. If the
"supported_versions" extension is present, the server MUST negotiate "supported_versions" extension is present, the server MUST negotiate
the highest server-supported version found in that extension. If the using that extension as described in Section 4.2.1. If the
"supported_versions" extension is not present, the server MUST "supported_versions" extension is not present, the server MUST
negotiate the minimum of ClientHello.legacy_version and TLS 1.2.For negotiate the minimum of ClientHello.legacy_version and TLS 1.2. For
example, if the server supports TLS 1.0, 1.1, and 1.2, and example, if the server supports TLS 1.0, 1.1, and 1.2, and
legacy_version is TLS 1.0, the server will proceed with a TLS 1.0 legacy_version is TLS 1.0, the server will proceed with a TLS 1.0
ServerHello. If the server only supports versions greater than ServerHello. If the server only supports versions greater than
ClientHello.legacy_version, it MUST abort the handshake with a ClientHello.legacy_version, it MUST abort the handshake with a
"protocol_version" alert. "protocol_version" alert.
Note that earlier versions of TLS did not clearly specify the record Note that earlier versions of TLS did not clearly specify the record
layer version number value in all cases layer version number value in all cases
(TLSPlaintext.legacy_record_version). Servers will receive various (TLSPlaintext.legacy_record_version). Servers will receive various
TLS 1.x versions in this field, however its value MUST always be TLS 1.x versions in this field, however its value MUST always be
skipping to change at page 108, line 34 skipping to change at page 109, line 30
reasons enumerated in [RFC6176], and MUST NOT be negotiated for any reasons enumerated in [RFC6176], and MUST NOT be negotiated for any
reason. reason.
Implementations MUST NOT send an SSL version 2.0 compatible CLIENT- Implementations MUST NOT send an SSL version 2.0 compatible CLIENT-
HELLO. Implementations MUST NOT negotiate TLS 1.3 or later using an HELLO. Implementations MUST NOT negotiate TLS 1.3 or later using an
SSL version 2.0 compatible CLIENT-HELLO. Implementations are NOT SSL version 2.0 compatible CLIENT-HELLO. Implementations are NOT
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 0x0300.
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.legacy_version or Implementations MUST NOT send a ClientHello.legacy_version or
ServerHello.version set to { 3, 0 } or less. Any endpoint receiving ServerHello.version set to 0x0300 or less. Any endpoint receiving a
a Hello message with ClientHello.legacy_version or Hello message with ClientHello.legacy_version or ServerHello.version
ServerHello.version set to { 3, 0 } MUST abort the handshake with a set to 0x0300 MUST abort the handshake with a "protocol_version"
"protocol_version" alert. alert.
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 algorithms Section 7 of [RFC6066], as it is not applicable to AEAD algorithms
and has been shown to be insecure in some scenarios. and 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.]]
A complete security analysis of TLS is outside the scope of this A complete security analysis of TLS is outside the scope of this
document. In this section, we provide an informal description the document. In this section, we provide an informal description the
desired properties as well as references to more detailed work in the desired properties as well as references to more detailed work in the
research literature which provides more formal definitions. research literature which provides more formal definitions.
We cover properties of the handshake separately from those of the We cover properties of the handshake separately from those of the
record layer. record layer.
D.1. Handshake D.1. Handshake
skipping to change at page 110, line 8 skipping to change at page 110, line 47
authenticated connection, the attacker can establish its own authenticated connection, the attacker can establish its own
session keys with the server, but those session keys are distinct session keys with the server, but those session keys are distinct
from those established by the client. from those established by the client.
Peer Authentication. The client's view of the peer identity should Peer Authentication. The client's view of the peer identity should
reflect the server's identity. If the client is authenticated, reflect the server's identity. If the client is authenticated,
the server's view of the peer identity should match the client's the server's view of the peer identity should match the client's
identity. identity.
Uniqueness of the session key: Any two distinct handshakes should Uniqueness of the session key: Any two distinct handshakes should
produce distinct, unrelated session keys produce distinct, unrelated session keys.
Downgrade protection. The cryptographic parameters should be the Downgrade protection. The cryptographic parameters should be the
same on both sides and should be the same as if the peers had been same on both sides and should be the same as if the peers had been
communicating in the absence of an attack (See [BBFKZG16]; defns 8 communicating in the absence of an attack (See [BBFKZG16]; defns 8
and 9}). and 9}).
Forward secret If the long-term keying material (in this case the Forward secret If the long-term keying material (in this case the
signature keys in certificate-based authentication modes or the signature keys in certificate-based authentication modes or the
PSK in PSK-(EC)DHE modes) are compromised after the handshake is PSK in PSK-(EC)DHE modes) are compromised after the handshake is
complete, this does not compromise the security of the session key complete, this does not compromise the security of the session key
skipping to change at page 110, line 45 skipping to change at page 111, line 35
The PSK and resumption-PSK modes bootstrap from a long-term shared The PSK and resumption-PSK modes bootstrap from a long-term shared
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.
The PSK binder value forms a binding between a PSK and the current
handshake, as well as between the session where the PSK was
established and the session where it was used. This binding
transitively includes the original handshake transcript, because that
transcript is digested into the values which produce the Resumption
Master Secret. This requires that both the KDF used to produce the
RMS and the MAC used to compute the binder be collision resistant.
These are properties of HKDF and HMAC respectively when used with
collision resistant hash functions and producing output of at least
256 bits. Any future replacement of these functions MUST also
provide collision resistance. Note: The binder does not cover the
binder values from other PSKs, though they are included in the
Finished MAC.
If an exporter is used, then it produces values which are unique and If an exporter is used, then it produces values which are unique and
secret (because they are generated from a unique session key). secret (because they are generated from a unique session key).
Exporters computed with different labels and contexts are Exporters computed with different labels and contexts are
computationally independent, so it is not feasible to compute one computationally independent, so it is not feasible to compute one
from another or the session secret from the exported value. Note: from another or the session secret from the exported value. Note:
exporters can produce arbitrary-length values. If exporters are to exporters can produce arbitrary-length values. If exporters are to
be used as channel bindings, the exported value MUST be large enough be used as channel bindings, the exported value MUST be large enough
to provide collision resistance. to provide collision resistance. The exporters provided in TLS 1.3
are derived from the same handshake contexts as the early traffic
keys and the application traffic keys respectively, and thus have
similar security properties. Note that they do not include the
client's certificate; future applications which wish to bind to the
client's certificate may need to define a new exporter that includes
the full handshake transcript.
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.3 certain bytes in the random nonces as described in Section 4.1.3
allows the detection of downgrade to previous TLS versions. allows the detection of downgrade to previous TLS versions.
As soon as the client and the server have exchanged enough As soon as the client and the server have exchanged enough
information to establish shared keys, the remainder of the handshake information to establish shared keys, the remainder of the handshake
is encrypted, thus providing protection against passive attackers. is encrypted, thus providing protection against passive attackers.
Because the server authenticates before the client, the client can Because the server authenticates before the client, the client can
ensure that it only reveals its identity to an authenticated server. ensure that it only reveals its identity to an authenticated server.
Note that implementations must use the provided record padding Note that implementations must use the provided record padding
mechanism during the handshake to avoid leaking information about the mechanism during the handshake to avoid leaking information about the
identities due to length. identities due to length.
The 0-RTT mode of operation generally provides the same security The 0-RTT mode of operation generally provides the same security
properties as 1-RTT data, with the two exceptions that the 0-RTT properties as 1-RTT data, with the two exceptions that the 0-RTT
encryption keys do not provide full forward secrecy and that the the encryption keys do not provide full forward secrecy and that the the
server is not able to guarantee full uniqueness of the handshake server is not able to guarantee full uniqueness of the handshake
(non-replayability) without keeping potentially undue amounts of (non-replayability) without keeping potentially undue amounts of
state. See Section 4.2.7 for one mechanism to limit the exposure to state. See Section 4.2.8 for one mechanism to limit the exposure to
replay. replay.
The reader should refer to the following references for analysis of The reader should refer to the following references for analysis of
the TLS handshake [CHSV16] [FGSW16] [LXZFH16]. the TLS handshake [CHSV16] [FGSW16] [LXZFH16].
D.2. Record Layer D.2. Record Layer
The record layer depends on the handshake producing a strong session The record layer depends on the handshake producing a strong session
key which can be used to derive bidirectional traffic keys and key which can be used to derive bidirectional traffic keys and
nonces. Assuming that is true, and the keys are used for no more nonces. Assuming that is true, and the keys are used for no more
skipping to change at page 111, line 50 skipping to change at page 113, line 12
Confidentiality. An attacker should not be able to determine the Confidentiality. An attacker should not be able to determine the
plaintext contents of a given record. plaintext contents of a given record.
Integrity. An attacker should not be able to craft a new record Integrity. An attacker should not be able to craft a new record
which is different from an existing record which will be accepted which is different from an existing record which will be accepted
by the receiver. by the receiver.
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.
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.5.3 has been used and the mechanism described in Section 4.5.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.
skipping to change at page 112, line 37 skipping to change at page 113, line 46
be able to measure it indirectly by the use of timing channels be able to measure it indirectly by the use of timing channels
exposed during record processing (i.e., seeing how long it takes to exposed during record processing (i.e., seeing how long it takes to
process a record). In general, it is not known how to remove this process a record). In general, it is not known how to remove this
type of channel because even a constant time padding removal function type of channel because even a constant time padding removal function
will then feed the content into data-dependent functions. will then feed the content into data-dependent functions.
Generation N+1 keys are derived from generation N keys via a key Generation N+1 keys are derived from generation N keys via a key
derivation function Section 7.2. As long as this function is truly derivation function Section 7.2. As long as this function is truly
one way, it is not possible to compute the previous keys after a key one way, it is not possible to compute the previous keys after a key
change (forward secrecy). However, TLS does not provide security for change (forward secrecy). However, TLS does not provide security for
data which is sent after the traffic secret is compromised, even afer data which is sent after the traffic secret is compromised, even
a key update (backward secrecy); systems which want backward secrecy after a key update (backward secrecy); systems which want backward
must do a fresh handshake and establish a new session key with an secrecy must do a fresh handshake and establish a new session key
(EC)DHE exchange. with an (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://www.ietf.org/mailman/listinfo/tls https://www.ietf.org/mailman/listinfo/tls
skipping to change at page 114, line 23 skipping to change at page 115, line 30
pasi.eronen@nokia.com pasi.eronen@nokia.com
- Cedric Fournet - Cedric Fournet
Microsoft Microsoft
fournet@microsoft.com fournet@microsoft.com
- Anil Gangolli - Anil Gangolli
anil@busybuddha.org anil@busybuddha.org
- David M. Garrett - David M. Garrett
dave@nulldereference.com
- Vipul Gupta (co-author of [RFC4492]) - Vipul Gupta (co-author of [RFC4492])
Sun Microsystems Laboratories Sun Microsystems Laboratories
vipul.gupta@sun.com vipul.gupta@sun.com
- Chris Hawk (co-author of [RFC4492]) - Chris Hawk (co-author of [RFC4492])
Corriente Networks LLC Corriente Networks LLC
chris@corriente.net chris@corriente.net
- Kipp Hickman - Kipp Hickman
 End of changes. 283 change blocks. 
1058 lines changed or deleted 1067 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/