@@ -5,23 +5,16 @@ category: info
55
66docname : draft-ietf-tls-keylogfile-latest
77submissiontype : IETF
8- number :
9- date :
8+ number : 9850
9+ date : 2025-12
1010consensus : true
1111v : 3
12- area : " Security "
13- workgroup : " Transport Layer Security "
12+ area : SEC
13+ workgroup : tls
1414keyword :
1515 - network transparency
1616 - tls
1717 - blockchain
18- venue :
19- group : " Transport Layer Security"
20- type : " Working Group"
21- mail : " tls@ietf.org"
22- arch : " https://mailarchive.ietf.org/arch/browse/tls/"
23- github : " tlswg/sslkeylogfile"
24- latest : " https://tlswg.github.io/sslkeylogfile/draft-ietf-tls-keylogfile.html"
2518
2619author :
2720 -
@@ -46,8 +39,8 @@ informative:
4639
4740--- abstract
4841
49- A format that supports logging information about the secrets used in a TLS
50- connection is described . Recording secrets to a file in SSLKEYLOGFILE format
42+ This document describes a format that supports logging information about the secrets used in a TLS
43+ connection. Recording secrets to a file in SSLKEYLOGFILE format
5144allows diagnostic and logging tools that use this file to decrypt messages
5245exchanged by TLS endpoints. This format is intended for use in systems where
5346TLS only protects test data.
@@ -71,10 +64,10 @@ adoption of TLS as the name of the protocol.
7164This document describes the SSLKEYLOGFILE format. This format can be used for
7265TLS 1.2 {{!TLS12=RFC5246}} and TLS 1.3 {{!TLS13=I-D.ietf-tls-rfc8446bis}}. The format also
7366supports earlier TLS versions, though use of earlier versions is strongly discouraged
74- {{?RFC8996}}{{?RFC9325}}. This format can also be used with DTLS {{?DTLS13=RFC9147}}, QUIC
75- {{?RFC9000}}{{?RFC9001}}, and other protocols that also use the TLS key
67+ {{?RFC8996}} {{?RFC9325}}. This format can also be used with DTLS {{?DTLS13=RFC9147}}, QUIC
68+ {{?RFC9000}} {{?RFC9001}}, and other protocols that also use the TLS key
7669schedule. Use of this format could complement other protocol-specific logging
77- such as QLOG {{?QLOG=I-D.ietf-quic-qlog-main-schema}}.
70+ such as qlog {{?QLOG=I-D.ietf-quic-qlog-main-schema}}.
7871
7972This document also defines labels that can be used to log information
8073about exchanges that use Encrypted Client Hello (ECH) {{!ECH=I-D.ietf-tls-esni}}.
@@ -95,7 +88,7 @@ configured to enable key logging.
9588of key logging.
9689
9790
98- # # Conventions and Definitions
91+ # # Conventions
9992
10093{::boilerplate bcp14-tagged}
10194
@@ -108,7 +101,7 @@ includes ASCII characters {{?RFC0020}}, comments MAY contain other characters.
108101Though Unicode is permitted in comments, the file MUST NOT contain a Unicode
109102byte order mark (U+FEFF).
110103
111- Lines are terminated using the line ending convention of the platform on which
104+ Lines are terminated using the line- ending convention of the platform on which
112105the file is generated. Tools that process these files MUST accept CRLF (U+13
113106followed by U+10), CR (U+13), or LF (U+10) as a line terminator. Lines are
114107ignored if they are empty or if the first character is an octothorpe character
@@ -123,7 +116,7 @@ separated by a single space character (U+20). These values are:
123116label :
124117
125118: The label identifies the type of secret that is being conveyed; see {{labels}}
126- for a description of the labels that are defined in this document.
119+ for descriptions of the labels that are defined in this document.
127120
128121client_random :
129122
@@ -138,8 +131,8 @@ secret:
138131 is encoded in hexadecimal, with a length that depends on the size of the
139132 secret.
140133
141- For the hexadecimal values of the `client_random` or `secret`, no convention
142- exists for the case of characters 'a' through 'f' (or 'A' through 'F' ). Files
134+ For the hexadecimal values of `client_random` or `secret`, no convention
135+ exists for the case of characters "a" through "f" (or "A" through "F" ). Files
143136can be generated with either, so either form MUST be accepted when processing a
144137file.
145138
@@ -148,16 +141,16 @@ that do not conform to this format in the interest of ensuring that secrets can
148141be obtained from corrupted files.
149142
150143Logged secret values are not annotated with the cipher suite or other connection
151- parameters. A record of the TLS handshake might therefore be needed to use the
144+ parameters. Therefore, a record of the TLS handshake might be needed to use the
152145logged secrets.
153146
154147
155148# # Secret Labels for TLS 1.3 {#labels}
156149
157150An implementation of TLS 1.3 produces a number of values as part of the key
158151schedule (see {{Section 7.1 of !TLS13}}). If ECH was successfully negotiated for a
159- given connection, these labels MUST be followed by the Random from the Inner ClientHello.
160- Otherwise, the Random from the Outer ClientHello MUST be used.
152+ given connection, these labels MUST be followed by the value of the Random field from the Inner ClientHello.
153+ Otherwise, the Random field from the Outer ClientHello MUST be used.
161154
162155Each of the following labels correspond to the equivalent secret produced by the key schedule :
163156
@@ -170,7 +163,7 @@ CLIENT_EARLY_TRAFFIC_SECRET:
170163
171164EARLY_EXPORTER_SECRET :
172165
173- : This secret is used for early exporters. Like the
166+ : This secret is used for early exporters. Like
174167 CLIENT_EARLY_TRAFFIC_SECRET, this is only generated when early data is
175168 attempted and might not be logged by a server if early data is rejected.
176169
@@ -196,7 +189,7 @@ SERVER_TRAFFIC_SECRET_0:
196189
197190EXPORTER_SECRET :
198191
199- : This secret is used in generating exporters {{Section 7.5 of !TLS13}}.
192+ : This secret is used in generating exporters ( {{Section 7.5 of !TLS13}}) .
200193{: newline="true"}
201194
202195These labels all appear in uppercase in the key log, but they correspond to
@@ -218,31 +211,32 @@ label "CLIENT_RANDOM" to identify the "master" secret for the connection.
218211With ECH {{!ECH}}, additional secrets are derived
219212during the handshake to encrypt the Inner ClientHello message using Hybrid Public
220213Key Encryption (HPKE) {{!HPKE=RFC9180}}. A client can log the ECH labels described below
221- if it offered ECH regardless of server acceptance. The server can log the labels only if it
214+ if it offered ECH, regardless of server acceptance. The server can log the labels only if it
222215successfully decrypted the ECH offered by the client, though it could choose to do so
223216only when it accepts ECH.
224217
225218These labels MUST always use the Random from the Outer ClientHello.
226219
227220ECH_SECRET :
228221
229- : This label corresponds to the KEM shared secret used by HPKE
222+ : This label corresponds to the Key Encapsulation Mechanism ( KEM) shared secret used by HPKE
230223 (`shared_secret` in the algorithms in {{Section 5.1.1 of !HPKE=RFC9180}}).
231- Length of the secret is defined by the KEM negotiated for use with ECH.
224+ The length of the secret is defined by the KEM negotiated for use with ECH.
232225
233226ECH_CONFIG :
234227
235228: The ECHConfig used to construct the ECH extension. The value is logged
236229 in hexadecimal representation.
230+ {: newline="true"}
237231
238232
239233# Security Considerations {#security}
240234
241235Access to the content of a file in SSLKEYLOGFILE format allows an attacker to
242236break the confidentiality and integrity protection on any TLS connections that
243237are included in the file. This includes both active connections and connections
244- for which encrypted records were previously stored. Ensuring adequate access
245- control on these files therefore becomes very important.
238+ for which encrypted records were previously stored. Therefore, ensuring adequate access
239+ control on these files becomes very important.
246240
247241Implementations that support logging this data need to ensure that logging can
248242only be enabled by those who are authorized. Allowing logging to be initiated
@@ -273,27 +267,27 @@ authorization to enable logging of exporter secrets.
273267
274268Using an environment variable, such as `SSLKEYLOGFILE`, to enable logging
275269implies that access to the launch context for the application is needed to
276- authorize logging. On systems that support specially- named files, logs might be
277- directed to these names so that logging does not result in storage, but enable
270+ authorize logging. On systems that support specially named files, logs might be
271+ directed to these names so that logging does not result in storage but enables
278272consumption by other programs. In both cases, applications might require
279- special authorization or they might rely on system-level access control to limit
273+ special authorization or might rely on system-level access control to limit
280274access to these capabilities.
281275
282- Forward secrecy guarantees provided in TLS 1.3 (see {{Section 1.2 and Appendix
283- E .1 of ?RFC8446 }}) and some modes of TLS 1.2 (such as those in {{Sections 2.2
284- and 2.4 of ?RFC4492 }}) do not hold if key material is recorded. Access to key
276+ Forward secrecy guarantees provided in TLS 1.3 (see {{Section 1.3 and Appendix
277+ F .1 of ?TLS13 }}) and some modes of TLS 1.2 (such as those in {{Sections 2.1
278+ and 2.2 of ?RFC8422 }}) do not hold if key material is recorded. Access to key
285279material allows an attacker to decrypt data exchanged in any previously logged TLS
286280connections.
287281
288282Logging the TLS 1.2 "master" secret provides the recipient of that secret far
289- greater access to an active connection than TLS 1.3 secrets. In addition to
283+ greater access to an active connection than TLS 1.3 secrets provide . In addition to
290284reading and altering protected messages, the TLS 1.2 "master" secret confers the
291285ability to resume the connection and impersonate either endpoint, insert records
292286that result in renegotiation, and forge Finished messages. Implementations can
293287avoid the risks associated with these capabilities by not logging this secret
294288value.
295289
296- Access to the ECH_SECRET record in the SSLKEYLOGFILE allows the attacker to decrypt
290+ Access to the ECH_SECRET record in SSLKEYLOGFILE allows the attacker to decrypt
297291the ECH extension and thereby reveal the content of the Inner ClientHello message,
298292including the payload of the Server Name Indication (SNI) extension.
299293
@@ -311,9 +305,9 @@ and creates a registry for labels ({{iana-labels-registry}}).
311305# # SSLKEYLOGFILE Media Type {#iana-media}
312306
313307The "`application/sslkeylogfile`" media type can be used to describe content in
314- the SSLKEYLOGFILE format. IANA \[ has added/is requested to add] the following
308+ the SSLKEYLOGFILE format. IANA has added the following
315309information to the "Media Types" registry at
316- <https://www.iana.org/assignments/media-types> :
310+ <https://www.iana.org/assignments/media-types>{:brackets="angle"} :
317311
318312Type name :
319313
@@ -341,11 +335,11 @@ Security considerations:
341335
342336Interoperability considerations :
343337
344- : Line endings might differ from platform convention
338+ : Line endings might differ from platform convention.
345339
346340Published specification :
347341
348- : RFC XXXX (RFC Editor : please update)
342+ : RFC 9850
349343
350344Applications that use this media type :
351345
@@ -367,7 +361,7 @@ Additional information:
367361
368362Person & email address to contact for further information :
369363
370- : TLS WG (tls@ietf.org)
364+ : <br/> TLS WG (tls@ietf.org)
371365
372366Intended usage :
373367
@@ -384,7 +378,7 @@ Author:
384378Change controller :
385379
386380: IETF
387- {: spacing=" compact" }
381+ {:compact}
388382
389383
390384# # SSLKEYLOGFILE Labels Registry {#iana-labels-registry}
@@ -396,30 +390,30 @@ The initial contents of this registry are as follows.
396390
397391| Value | Description | Reference |
398392| --- | --- | --- |
399- | CLIENT_RANDOM | Master secret in TLS 1.2 and earlier | This document |
400- | CLIENT_EARLY_TRAFFIC_SECRET | Secret for client early data records | This document |
401- | EARLY_EXPORTER_SECRET | Early exporters secret | This document |
402- | CLIENT_HANDSHAKE_TRAFFIC_SECRET | Secret protecting client handshake | This document |
403- | SERVER_HANDSHAKE_TRAFFIC_SECRET | Secret protecting server handshake | This document |
404- | CLIENT_TRAFFIC_SECRET_0 | Secret protecting client records post handshake | This document |
405- | SERVER_TRAFFIC_SECRET_0 | Secret protecting server records post handshake | This document |
406- | EXPORTER_SECRET | Exporter secret after handshake | This document |
407- | ECH_SECRET | HPKE KEM shared secret used in the ECH | This document |
408- | ECH_CONFIG | ECHConfig used for construction of the ECH | This document |
409-
410- New assignments in the "SSLKEYLOGFILE Labels" registry will be administered by IANA through
411- Specification Required procedure {{?RFC8126}}. The role of the designated expert is described
412- in {{Section 17 of ?RFC8447}}. The designated expert {{RFC8126}} ensures that the specification is
413- publicly available. It is sufficient to have an Internet-Draft (that is posted and never published
414- as an RFC) or to cite a document from another standards body, industry consortium, or any other location .
415- An expert may provide more in-depth reviews, but their approval should not be taken as an endorsement
393+ | CLIENT_RANDOM | Master secret in TLS 1.2 and earlier | RFC 9850 |
394+ | CLIENT_EARLY_TRAFFIC_SECRET | Secret for client early data records | RFC 9850 |
395+ | EARLY_EXPORTER_SECRET | Early exporter secret | RFC 9850 |
396+ | CLIENT_HANDSHAKE_TRAFFIC_SECRET | Secret protecting client handshake | RFC 9850 |
397+ | SERVER_HANDSHAKE_TRAFFIC_SECRET | Secret protecting server handshake | RFC 9850 |
398+ | CLIENT_TRAFFIC_SECRET_0 | Secret protecting client records post handshake | RFC 9850 |
399+ | SERVER_TRAFFIC_SECRET_0 | Secret protecting server records post handshake | RFC 9850 |
400+ | EXPORTER_SECRET | Exporter secret after handshake | RFC 9850 |
401+ | ECH_SECRET | HPKE KEM shared secret used in the ECH | RFC 9850 |
402+ | ECH_CONFIG | ECHConfig used for construction of the ECH | RFC 9850 |
403+
404+ New assignments in the "TLS SSLKEYLOGFILE Labels" registry will be administered by IANA through
405+ Specification Required procedure {{?RFC8126}}. The role of designated experts for TLS registries is described
406+ in {{Section 17 of ?RFC8447}}. Designated experts for this registry are advised to ensure that the specification is
407+ publicly available. In the Reference column, it is sufficient to cite an Internet-Draft (that is posted but not published
408+ as an RFC) or a document from another standards body, an industry consortium, or any other organization .
409+ Designated experts may provide more in-depth reviews, but their approval should not be taken as an endorsement
416410of the SSLKEYLOGFILE label.
417411
418412--- back
419413
420414# Example
421415
422- The following is a sample of a file in this format, including secrets from two
416+ The following is a sample of a file in SSLKEYLOGFILE format, including secrets from two
423417TLS 1.3 connections.
424418
425419~~~
@@ -505,6 +499,6 @@ EXPORTER_SECRET \
505499# Acknowledgments
506500{:numbered="false"}
507501
508- The SSLKEYLOGFILE format originated in the NSS project, but it has evolved over
502+ The SSLKEYLOGFILE format originated in the Network Security Services ( NSS) project, but it has evolved over
509503time as TLS has changed. Many people contributed to this evolution. The authors
510504are only documenting the format as it is used while extending it to cover ECH.
0 commit comments