SSLKEYLOGFILE Extension for Encrypted Client Hello (ECH)
draft-ietf-tls-ech-keylogfile-01
Document | Type | Active Internet-Draft (tls WG) | |
---|---|---|---|
Authors | Yaroslav Rosomakho , Hannes Tschofenig | ||
Last updated | 2024-10-21 | ||
Replaces | draft-rosomakho-tls-ech-keylogfile | ||
RFC stream | Internet Engineering Task Force (IETF) | ||
Intended RFC status | Informational | ||
Formats | |||
Additional resources | Mailing list discussion | ||
Stream | WG state | WG Document | |
Document shepherd | (None) | ||
IESG | IESG state | I-D Exists | |
Consensus boilerplate | Unknown | ||
Telechat date | (None) | ||
Responsible AD | (None) | ||
Send notices to | (None) |
draft-ietf-tls-ech-keylogfile-01
Transport Layer Security Y. Rosomakho Internet-Draft Zscaler Intended status: Informational H. Tschofenig Expires: 24 April 2025 H-BRS 21 October 2024 SSLKEYLOGFILE Extension for Encrypted Client Hello (ECH) draft-ietf-tls-ech-keylogfile-01 Abstract This document specifies an extension to the SSLKEYLOGFILE format to support the logging of information about Encrypted Client Hello (ECH) related secrets. Two new labels are introduced, namely ECH_SECRET and ECH_CONFIG, which log the Hybrid Public Key Encryption (HPKE)- derived shared secret and the ECHConfig used for the ECH, respectively. This extension aims to facilitate debugging of TLS connections employing ECH. About This Document This note is to be removed before publishing as an RFC. The latest revision of this draft can be found at https://tlswg.github.io/draft-ietf-tls-ech-keylogfile/draft-ietf-tls- ech-keylogfile.html. Status information for this document may be found at https://datatracker.ietf.org/doc/draft-ietf-tls-ech- keylogfile/. Discussion of this document takes place on the Transport Layer Security Working Group mailing list (mailto:tls@ietf.org), which is archived at https://mailarchive.ietf.org/arch/browse/tls/. Subscribe at https://www.ietf.org/mailman/listinfo/tls/. Source for this draft and an issue tracker can be found at https://github.com/tlswg/draft-ietf-tls-ech-keylogfile. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Rosomakho & Tschofenig Expires 24 April 2025 [Page 1] Internet-Draft SSLKEYLOGFILE Extension for Encrypted Cl October 2024 Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on 24 April 2025. Copyright Notice Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/ license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Conventions and Definitions . . . . . . . . . . . . . . . . . 3 3. SSLKEYLOGFILE Labels for ECH . . . . . . . . . . . . . . . . 3 3.1. ECH_SECRET . . . . . . . . . . . . . . . . . . . . . . . 3 3.2. ECH_CONFIG . . . . . . . . . . . . . . . . . . . . . . . 4 4. Client_random for other TLS 1.3 SSLKEYLOGFILE Entries . . . . 4 5. Security Considerations . . . . . . . . . . . . . . . . . . . 4 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 6 7.1. Normative References . . . . . . . . . . . . . . . . . . 6 7.2. Informative References . . . . . . . . . . . . . . . . . 7 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 8 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 8 Rosomakho & Tschofenig Expires 24 April 2025 [Page 2] Internet-Draft SSLKEYLOGFILE Extension for Encrypted Cl October 2024 1. Introduction Debugging protocols with TLS can be difficult due to encrypted communications. Analyzing these messages in diagnostic and debug tools requires inspecting the encrypted content. Various TLS implementations have informally adopted a file format to log the secret values generated by the TLS key schedule, aiding in this analysis. In many implementations, the file that the secrets are logged to is specified in an environment variable named "SSLKEYLOGFILE". [I-D.ietf-tls-keylogfile] standardizes this format. With the introduction of [I-D.ietf-tls-esni] additional secrets are derived during the handshake to encrypt the ClientHello message using Hybrid Public Key Encryption (HPKE) [RFC9180]. This document extends the SSLKEYLOGFILE format to also offer support for the ECH extension to enable debugging of ECH-enabled connections. The proposed extension can also be used with all protocols that support ECH, including TLS 1.3 [RFC8446], DTLS 1.3 [RFC9147] and QUIC [RFC9000][RFC9001]. 2. Conventions and Definitions The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. 3. SSLKEYLOGFILE Labels for ECH This document defines two new labels for SSLKEYLOGFILE format: ECH_SECRET and ECH_CONFIG. The client SHOULD log the labels if it offered ECH regardless of server acceptance. The server MAY log the labels only if it successfully decrypted and accepted ECH offered by the client. The 32-byte random value from the Outer ClientHello message is used as the client_random value for these log records. The client MUST NOT log the labels for connections that use the GREASE ECH extension (see Section 6.2 of [I-D.ietf-tls-esni]). 3.1. ECH_SECRET This label corresponds to the KEM shared secret derived during the HPKE key schedule process. Length of the secret is defined by the KEM negotiated for use with ECH. Rosomakho & Tschofenig Expires 24 April 2025 [Page 3] Internet-Draft SSLKEYLOGFILE Extension for Encrypted Cl October 2024 3.2. ECH_CONFIG This label is used to log the ECHConfig used for construction of the ECH extension. Note that the value is logged in hexadecimal representation, similarly to other entries in the SSLKEYLOGFILE. 4. Client_random for other TLS 1.3 SSLKEYLOGFILE Entries The SSLKEYLOGFILE uses the random value from the ClientHello message as a "connection identifier". This creates ambiguity since the TLS handshake with ECH contains two different random values, one in the Outer ClientHello structure and the second one in the Inner ClientHello. The SSLKEYLOGFILE entries corresponding to TLS 1.3 secrets for connections that successfully negotiated ECH MUST use the random from the Inner ClientHello structure. In all other cases the random value from the Outer ClientHello structure MUST be used. 5. Security Considerations The applicability statement of [I-D.ietf-tls-keylogfile] also applies to this document: if unauthorized entities gain access to the logged secrets then the core guarantees that TLS provides are completely undermined. This specification extends the SSLKEYLOGFILE specification [I-D.ietf-tls-keylogfile] and therefore introduces the following threats: * Access to the ECH_SECRET record in the SSLKEYLOGFILE allows the attacker to decrypt the ECH extension and thereby reveal the content of the ClientHello message, including the payload of the Server Name Indication (SNI) extension. * Access to the HPKE-established shared secret introduces a potential attack surface against the HPKE library since access to this keying material is normally not available otherwise. Implementers MUST take measures to prevent unauthorized access to the SSLKEYLOGFILE text file. Rosomakho & Tschofenig Expires 24 April 2025 [Page 4] Internet-Draft SSLKEYLOGFILE Extension for Encrypted Cl October 2024 As per the SSLKEYLOGFILE specification [I-D.ietf-tls-keylogfile], this extension is intended for use in environments where TLS protects only test data. While the access it provides to TLS connections can be valuable for debugging during development, this mechanism MUST NOT be used in production environments. To minimize the risk of accidental activation in production, implementers SHOULD incorporate appropriate compile-time controls. 6. IANA Considerations IANA is requested to create a new registry "SSLKEYLOGFILE Labels", within the existing "Transport Layer Security (TLS) Parameters" registry page. This new registry reserves labels used for SSLKEYLOGFILE entries. The initial contents of this registry are as follows. +===============================+===========+=========================+ |Value |Description|Reference | +===============================+===========+=========================+ |CLIENT_RANDOM |Master |[I-D.ietf-tls-keylogfile]| | |secret in | | | |TLS 1.2 and| | | |earlier | | +-------------------------------+-----------+-------------------------+ |CLIENT_EARLY_TRAFFIC_SECRET |Secret for |[I-D.ietf-tls-keylogfile]| | |client | | | |early data | | | |records | | +-------------------------------+-----------+-------------------------+ |EARLY_EXPORTER_MASTER_SECRET |Early |[I-D.ietf-tls-keylogfile]| | |exporters | | | |secret | | +-------------------------------+-----------+-------------------------+ |CLIENT_HANDSHAKE_TRAFFIC_SECRET|Secret |[I-D.ietf-tls-keylogfile]| | |protecting | | | |client | | | |handshake | | +-------------------------------+-----------+-------------------------+ |SERVER_HANDSHAKE_TRAFFIC_SECRET|Secret |[I-D.ietf-tls-keylogfile]| | |protecting | | | |server | | | |handshake | | +-------------------------------+-----------+-------------------------+ |CLIENT_TRAFFIC_SECRET_0 |Secret |[I-D.ietf-tls-keylogfile]| | |protecting | | | |client | | | |records | | | |post | | Rosomakho & Tschofenig Expires 24 April 2025 [Page 5] Internet-Draft SSLKEYLOGFILE Extension for Encrypted Cl October 2024 | |handshake | | +-------------------------------+-----------+-------------------------+ |SERVER_TRAFFIC_SECRET_0 |Secret |[I-D.ietf-tls-keylogfile]| | |protecting | | | |server | | | |records | | | |post | | | |handshake | | +-------------------------------+-----------+-------------------------+ |EXPORTER_SECRET |Exporter |[I-D.ietf-tls-keylogfile]| | |secret | | | |after | | | |handshake | | +-------------------------------+-----------+-------------------------+ Table 1 This documents defines two additional labels in Section 3: * ECH_SECRET, which contains KEM shared secret for the ECH * ECH_CONFIG, which contains ECHConfig used for construction of the ECH New assignments in the "SSLKEYLOGFILE Labels" registry will be administered by IANA through Expert Review [RFC8126]. Designated Experts are requested to ensure that defined labels do not overlap in names or semantics, and have clear definitions. Registration requests must be sent to the tls@ietf.org mailing list for review and comment, with an appropriate subject (e.g., "Request for SSLKEYLOGFILE Label: example"). Within the review period of two weeks, the Designated Experts will either approve or deny the registration request, communicating this decision to the review list and IANA. Denials should include an explanation and, if applicable, suggestions as to how to make the request successful. IANA must only accept registry updates from the Designated Experts and should direct all requests for registration to the TLS mailing list. 7. References 7.1. Normative References Rosomakho & Tschofenig Expires 24 April 2025 [Page 6] Internet-Draft SSLKEYLOGFILE Extension for Encrypted Cl October 2024 [I-D.ietf-tls-esni] Rescorla, E., Oku, K., Sullivan, N., and C. A. Wood, "TLS Encrypted Client Hello", Work in Progress, Internet-Draft, draft-ietf-tls-esni-22, 15 September 2024, <https://datatracker.ietf.org/doc/html/draft-ietf-tls- esni-22>. [I-D.ietf-tls-keylogfile] Thomson, M., "The SSLKEYLOGFILE Format for TLS", Work in Progress, Internet-Draft, draft-ietf-tls-keylogfile-02, 29 April 2024, <https://datatracker.ietf.org/doc/html/draft- ietf-tls-keylogfile-02>. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-editor.org/rfc/rfc2119>. [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 8126, DOI 10.17487/RFC8126, June 2017, <https://www.rfc-editor.org/rfc/rfc8126>. [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/rfc/rfc8174>. 7.2. Informative References [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, <https://www.rfc-editor.org/rfc/rfc8446>. [RFC9000] Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based Multiplexed and Secure Transport", RFC 9000, DOI 10.17487/RFC9000, May 2021, <https://www.rfc-editor.org/rfc/rfc9000>. [RFC9001] Thomson, M., Ed. and S. Turner, Ed., "Using TLS to Secure QUIC", RFC 9001, DOI 10.17487/RFC9001, May 2021, <https://www.rfc-editor.org/rfc/rfc9001>. [RFC9147] Rescorla, E., Tschofenig, H., and N. Modadugu, "The Datagram Transport Layer Security (DTLS) Protocol Version 1.3", RFC 9147, DOI 10.17487/RFC9147, April 2022, <https://www.rfc-editor.org/rfc/rfc9147>. Rosomakho & Tschofenig Expires 24 April 2025 [Page 7] Internet-Draft SSLKEYLOGFILE Extension for Encrypted Cl October 2024 [RFC9180] Barnes, R., Bhargavan, K., Lipp, B., and C. Wood, "Hybrid Public Key Encryption", RFC 9180, DOI 10.17487/RFC9180, February 2022, <https://www.rfc-editor.org/rfc/rfc9180>. Acknowledgments We would like to thank Stephen Farrell, Rich Salz, Martin Thomson and Peter Wu for their review comments. Authors' Addresses Yaroslav Rosomakho Zscaler Email: yrosomakho@zscaler.com Hannes Tschofenig University of Applied Sciences Bonn-Rhein-Sieg Email: Hannes.Tschofenig@gmx.net Rosomakho & Tschofenig Expires 24 April 2025 [Page 8]