Skip to content

Commit 69870e2

Browse files
Merge pull request #32 from tlswg/auth48
Most of the text edits for AUTH48
2 parents c5127e2 + fe9b494 commit 69870e2

File tree

2 files changed

+75
-82
lines changed

2 files changed

+75
-82
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
LIBDIR := lib
2+
TIDY := true
23
include $(LIBDIR)/main.mk
34

45
$(LIBDIR)/main.mk:

draft-ietf-tls-keylogfile.md

Lines changed: 74 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,16 @@ category: info
55

66
docname: draft-ietf-tls-keylogfile-latest
77
submissiontype: IETF
8-
number:
9-
date:
8+
number: 9850
9+
date: 2025-12
1010
consensus: true
1111
v: 3
12-
area: "Security"
13-
workgroup: "Transport Layer Security"
12+
area: SEC
13+
workgroup: tls
1414
keyword:
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

2619
author:
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
5144
allows diagnostic and logging tools that use this file to decrypt messages
5245
exchanged by TLS endpoints. This format is intended for use in systems where
5346
TLS only protects test data.
@@ -71,19 +64,19 @@ adoption of TLS as the name of the protocol.
7164
This document describes the SSLKEYLOGFILE format. This format can be used for
7265
TLS 1.2 {{!TLS12=RFC5246}} and TLS 1.3 {{!TLS13=I-D.ietf-tls-rfc8446bis}}. The format also
7366
supports 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 use the TLS key
7669
schedule. 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

7972
This document also defines labels that can be used to log information
8073
about exchanges that use Encrypted Client Hello (ECH) {{!ECH=I-D.ietf-tls-esni}}.
8174

8275

8376
## Applicability Statement
8477

85-
The artifact that this document describes - if made available to entities other
86-
than endpoints - completely undermines the core guarantees that TLS provides.
78+
The artifact that this document describes -- if made available to entities other
79+
than endpoints -- completely undermines the core guarantees that TLS provides.
8780
This format is intended for use in systems where TLS only protects test data.
8881
While the access that this information provides to TLS connections can be useful
8982
for diagnosing problems while developing systems, this mechanism MUST NOT be
@@ -95,7 +88,7 @@ configured to enable key logging.
9588
of 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.
108101
Though Unicode is permitted in comments, the file MUST NOT contain a Unicode
109102
byte 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
112105
the file is generated. Tools that process these files MUST accept CRLF (U+13
113106
followed by U+10), CR (U+13), or LF (U+10) as a line terminator. Lines are
114107
ignored if they are empty or if the first character is an octothorpe character
@@ -120,26 +113,28 @@ secrets are generated.
120113
Each secret is described using a single line composed of three values that are
121114
separated by a single space character (U+20). These values are:
122115

123-
label:
116+
`label`:
124117

125-
: 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.
118+
: The `label` identifies the type of secret that is being conveyed;
119+
see Sections {{<labels}}, {{<labels-12}}, and {{<labels-ech}}
120+
for descriptions of the labels that are defined in this document.
127121

128-
client_random:
122+
`client_random`:
129123

130124
: The 32-byte value of the Random field from the ClientHello message that
131125
established the TLS connection. This value is encoded as 64 hexadecimal
132126
characters. In a log that can include secrets from multiple connections, this
133127
field can be used to identify a connection.
134128

135-
secret:
129+
`secret`:
136130

137131
: The value of the identified secret for the identified connection. This value
138132
is encoded in hexadecimal, with a length that depends on the size of the
139133
secret.
134+
{: newline="true"}
140135

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
136+
For the hexadecimal values of `client_random` or `secret`, no convention
137+
exists for the case of characters "a" through "f" (or "A" through "F"). Files
143138
can be generated with either, so either form MUST be accepted when processing a
144139
file.
145140

@@ -148,16 +143,16 @@ that do not conform to this format in the interest of ensuring that secrets can
148143
be obtained from corrupted files.
149144

150145
Logged 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
146+
parameters. Therefore, a record of the TLS handshake might be needed to use the
152147
logged secrets.
153148

154149

155150
## Secret Labels for TLS 1.3 {#labels}
156151

157152
An implementation of TLS 1.3 produces a number of values as part of the key
158153
schedule (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.
154+
given connection, these labels MUST be followed by the value of the Random field from the Inner ClientHello.
155+
Otherwise, the Random field from the Outer ClientHello MUST be used.
161156

162157
Each of the following labels correspond to the equivalent secret produced by the key schedule:
163158

@@ -170,7 +165,7 @@ CLIENT_EARLY_TRAFFIC_SECRET:
170165

171166
EARLY_EXPORTER_SECRET:
172167

173-
: This secret is used for early exporters. Like the
168+
: This secret is used for early exporters. Like
174169
CLIENT_EARLY_TRAFFIC_SECRET, this is only generated when early data is
175170
attempted and might not be logged by a server if early data is rejected.
176171

@@ -196,7 +191,7 @@ SERVER_TRAFFIC_SECRET_0:
196191

197192
EXPORTER_SECRET:
198193

199-
: This secret is used in generating exporters {{Section 7.5 of !TLS13}}.
194+
: This secret is used in generating exporters ({{Section 7.5 of !TLS13}}).
200195
{: newline="true"}
201196

202197
These labels all appear in uppercase in the key log, but they correspond to
@@ -208,41 +203,42 @@ Note that the order that labels appear here corresponds to the order in which
208203
they are presented in {{?TLS13}}, but there is no guarantee that implementations
209204
will log secrets strictly in this order.
210205

211-
## Secret Labels for TLS 1.2
206+
## Secret Labels for TLS 1.2 {#labels-12}
212207

213208
Implementations of TLS 1.2 {{!TLS12}} (and also earlier versions) use the
214209
label "CLIENT_RANDOM" to identify the "master" secret for the connection.
215210

216-
## Secret Labels for ECH
211+
## Secret Labels for ECH {#labels-ech}
217212

218213
With ECH {{!ECH}}, additional secrets are derived
219214
during the handshake to encrypt the Inner ClientHello message using Hybrid Public
220215
Key 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
216+
if it offered ECH, regardless of server acceptance. The server can log the labels only if it
222217
successfully decrypted the ECH offered by the client, though it could choose to do so
223218
only when it accepts ECH.
224219

225220
These labels MUST always use the Random from the Outer ClientHello.
226221

227222
ECH_SECRET:
228223

229-
: This label corresponds to the KEM shared secret used by HPKE
224+
: This label corresponds to the Key Encapsulation Mechanism (KEM) shared secret used by HPKE
230225
(`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.
226+
The length of the secret is defined by the KEM negotiated for use with ECH.
232227

233228
ECH_CONFIG:
234229

235230
: The ECHConfig used to construct the ECH extension. The value is logged
236231
in hexadecimal representation.
232+
{: newline="true"}
237233

238234

239235
# Security Considerations {#security}
240236

241237
Access to the content of a file in SSLKEYLOGFILE format allows an attacker to
242238
break the confidentiality and integrity protection on any TLS connections that
243239
are 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.
240+
for which encrypted records were previously stored. Therefore, ensuring adequate access
241+
control on these files becomes very important.
246242

247243
Implementations that support logging this data need to ensure that logging can
248244
only be enabled by those who are authorized. Allowing logging to be initiated
@@ -273,27 +269,27 @@ authorization to enable logging of exporter secrets.
273269

274270
Using an environment variable, such as `SSLKEYLOGFILE`, to enable logging
275271
implies 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
272+
authorize logging. On systems that support specially named files, logs might be
273+
directed to these names so that logging does not result in storage but enables
278274
consumption by other programs. In both cases, applications might require
279-
special authorization or they might rely on system-level access control to limit
275+
special authorization or might rely on system-level access control to limit
280276
access to these capabilities.
281277

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
278+
Forward secrecy guarantees provided in TLS 1.3 (see {{Section 1.3 and Appendix
279+
F.1 of ?TLS13}}) and some modes of TLS 1.2 (such as those in {{Sections 2.1
280+
and 2.2 of ?RFC8422}}) do not hold if key material is recorded. Access to key
285281
material allows an attacker to decrypt data exchanged in any previously logged TLS
286282
connections.
287283

288284
Logging 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
285+
greater access to an active connection than TLS 1.3 secrets provide. In addition to
290286
reading and altering protected messages, the TLS 1.2 "master" secret confers the
291287
ability to resume the connection and impersonate either endpoint, insert records
292288
that result in renegotiation, and forge Finished messages. Implementations can
293289
avoid the risks associated with these capabilities by not logging this secret
294290
value.
295291

296-
Access to the ECH_SECRET record in the SSLKEYLOGFILE allows the attacker to decrypt
292+
Access to the ECH_SECRET record in SSLKEYLOGFILE allows the attacker to decrypt
297293
the ECH extension and thereby reveal the content of the Inner ClientHello message,
298294
including the payload of the Server Name Indication (SNI) extension.
299295

@@ -311,9 +307,9 @@ and creates a registry for labels ({{iana-labels-registry}}).
311307
## SSLKEYLOGFILE Media Type {#iana-media}
312308

313309
The "`application/sslkeylogfile`" media type can be used to describe content in
314-
the SSLKEYLOGFILE format. IANA \[has added/is requested to add] the following
310+
the SSLKEYLOGFILE format. IANA has added the following
315311
information to the "Media Types" registry at
316-
<https://www.iana.org/assignments/media-types>:
312+
[](https://www.iana.org/assignments/media-types){:brackets="angle"}:
317313

318314
Type name:
319315

@@ -341,11 +337,11 @@ Security considerations:
341337

342338
Interoperability considerations:
343339

344-
: Line endings might differ from platform convention
340+
: Line endings might differ from platform convention.
345341

346342
Published specification:
347343

348-
: RFC XXXX (RFC Editor: please update)
344+
: RFC 9850
349345

350346
Applications that use this media type:
351347

@@ -367,7 +363,7 @@ Additional information:
367363

368364
Person & email address to contact for further information:
369365

370-
: TLS WG (tls@ietf.org)
366+
: <br/>TLS WG (tls@ietf.org)
371367

372368
Intended usage:
373369

@@ -384,47 +380,47 @@ Author:
384380
Change controller:
385381

386382
: IETF
387-
{: spacing="compact"}
383+
{:compact}
388384

389385

390-
## SSLKEYLOGFILE Labels Registry {#iana-labels-registry}
386+
## TLS SSLKEYLOGFILE Labels Registry {#iana-labels-registry}
391387

392-
IANA is requested to create a new registry "TLS SSLKEYLOGFILE Labels", within the
388+
IANA has created a new registry "TLS SSLKEYLOGFILE Labels", within the
393389
existing "Transport Layer Security (TLS) Parameters" registry page.
394390
This new registry reserves labels used for SSLKEYLOGFILE entries.
395391
The initial contents of this registry are as follows.
396392

397393
| Value | Description | Reference |
398394
| --- | --- | --- |
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
395+
| CLIENT_RANDOM | Master secret in TLS 1.2 and earlier | RFC 9850 |
396+
| CLIENT_EARLY_TRAFFIC_SECRET | Secret for client early data records | RFC 9850 |
397+
| EARLY_EXPORTER_SECRET | Early exporter secret | RFC 9850 |
398+
| CLIENT_HANDSHAKE_TRAFFIC_SECRET | Secret protecting client handshake | RFC 9850 |
399+
| SERVER_HANDSHAKE_TRAFFIC_SECRET | Secret protecting server handshake | RFC 9850 |
400+
| CLIENT_TRAFFIC_SECRET_0 | Secret protecting client records post handshake | RFC 9850 |
401+
| SERVER_TRAFFIC_SECRET_0 | Secret protecting server records post handshake | RFC 9850 |
402+
| EXPORTER_SECRET | Exporter secret after handshake | RFC 9850 |
403+
| ECH_SECRET | HPKE KEM shared secret used in the ECH | RFC 9850 |
404+
| ECH_CONFIG | ECHConfig used for construction of the ECH | RFC 9850 |
405+
406+
New assignments in the "TLS SSLKEYLOGFILE Labels" registry will be administered by IANA through the
407+
Specification Required procedure {{?RFC8126}}. The role of designated experts for TLS registries is described
408+
in {{Section 17 of ?RFC8447}}. Designated experts for this registry are advised to ensure that the specification is
409+
publicly available. In the Reference column, it is sufficient to cite an Internet-Draft (that is posted but not published
410+
as an RFC) or a document from another standards body, an industry consortium, or any other organization.
411+
Designated experts may provide more in-depth reviews, but their approval should not be taken as an endorsement
416412
of the SSLKEYLOGFILE label.
417413

418414
--- back
419415

420416
# Example
421417

422-
The following is a sample of a file in this format, including secrets from two
418+
The following is a sample of a file in SSLKEYLOGFILE format, including secrets from two
423419
TLS 1.3 connections.
424420

425-
~~~
426-
# NOTE: '\' line wrapping per RFC 8792
421+
The following examples use wrapping per {{RFC8792}}.
427422

423+
~~~ application/sslkeylogfile
428424
CLIENT_HANDSHAKE_TRAFFIC_SECRET \
429425
cf34899b3dcb8c9fe7160ceaf95d354a294793b67a2e49cb9cca4d69b43593a0 \
430426
be4a28d81ce41242ff31c6d8a6615852178f2cd75eaca2ee8768f9ed51282b38
@@ -462,9 +458,7 @@ because secrets could be logged as they are generated.
462458

463459
The following shows a log entry for a TLS 1.2 connection.
464460

465-
~~~
466-
# NOTE: '\' line wrapping per RFC 8792
467-
461+
~~~ application/sslkeylogfile
468462
CLIENT_RANDOM \
469463
ad52329fcadd34ee3aa07092680287f09954823e26d7b5ae25c0d47714152a6a \
470464
97af4c8618cfdc0b2326e590114c2ec04b43b08b7e2c3f8124cc61a3b068ba966\
@@ -474,9 +468,7 @@ CLIENT_RANDOM \
474468
The following shows a log entry for a TLS 1.3 connection that successfully
475469
negotiated ECH.
476470

477-
~~~
478-
# NOTE: '\' line wrapping per RFC 8792
479-
471+
~~~ application/sslkeylogfile
480472
ECH_SECRET \
481473
0ba587ee6b65ce21a726630efb881206a7cd995611095b5f4c244bb2b23f1ee1 \
482474
e8828ec09909cc9363179dc13b62498550c8637129345263011a1678370ca52a
@@ -505,6 +497,6 @@ EXPORTER_SECRET \
505497
# Acknowledgments
506498
{:numbered="false"}
507499

508-
The SSLKEYLOGFILE format originated in the NSS project, but it has evolved over
500+
The SSLKEYLOGFILE format originated in the Network Security Services (NSS) project, but it has evolved over
509501
time as TLS has changed. Many people contributed to this evolution. The authors
510502
are only documenting the format as it is used while extending it to cover ECH.

0 commit comments

Comments
 (0)