Skip to content

Conversation

ekr
Copy link
Contributor

@ekr ekr commented Sep 11, 2025

No description provided.

@ekr ekr requested a review from chris-wood September 11, 2025 18:22
@ekr
Copy link
Contributor Author

ekr commented Sep 11, 2025

@martinthomson @chris-wood PTAQL

@@ -3479,7 +3479,7 @@ ticket_lifetime:
network byte order from the time of ticket issuance.
Servers MUST NOT use any value greater than 604800 seconds (7 days).
The value of zero indicates that the ticket should be discarded
immediately. Clients MUST NOT use tickets for longer than
immediately fater use. Clients MUST NOT use tickets for longer than

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fater ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after.

@@ -3479,7 +3479,7 @@ ticket_lifetime:
network byte order from the time of ticket issuance.
Servers MUST NOT use any value greater than 604800 seconds (7 days).
The value of zero indicates that the ticket should be discarded
immediately. Clients MUST NOT use tickets for longer than
immediately fater use. Clients MUST NOT use tickets for longer than
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
immediately fater use. Clients MUST NOT use tickets for longer than
immediately after use. Clients MUST NOT use tickets for longer than

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixes the spelling, but I don't actually think this is a good change to take -- it seems to change the meaning, suggesting that a ticket received with lifetime of 0 can be held onto for some (unspecified) period of time and then used once, which is rather different from what the semantics of a non-zero-lifetime ticket would be.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to admit I was trying to remember what we originally intended here. But I don't understand what it means to have a 0 lifetime otherwise. Do you think the implications are "this ticket actually cannot be used"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a hazy recollection of something like "might not be usable but you could try it if you open a new connection right away". Other theories would relate to if the server, whether by protocol or implementation, was locked into a codepath of issuing a ticket but later decided it did not want to do so, or if it somehow helped with middlebox compatibility or something similar. But I don't see anything to suggest that either of those theories actually hold. I suspect that trawling the git history and email history would yield something, but did not attempt that (yet?).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Let me pull this out and I'll take it to the WG list for resolution.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found #424 which should be a good place to start looking.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, there are two things bound up in this one:

  1. The time between when the ticket is issued and when it can be used. Or maybe between when the original connection ends and when the tickets issued on it can be used. My sense is that this is solidly ambiguous in that regard. My sense is that there is a floor on the lifetime of tickets that might allow them to be used some time after a reference point, but that time is pretty short. I don't know if the reference point is the issuance/receipt time or whether that time can extend while the connection remains active.
  2. Whether the ticket is single use. That's a matter that we've resolved already: tickets should only be used once, otherwise they allow an observer to correlate activity, even where other signals do not. So this is probably not relevant here.

Adding "after use" is misleading for sure. We already say that about tickets, though with a "SHOULD" (not a "should"). I don't know about the other thing.

@@ -1651,7 +1651,7 @@ a distinct message.

The server's extensions MUST contain "supported_versions".
Additionally, it SHOULD contain the minimal set of extensions necessary for the
client to generate a correct ClientHello pair. As with the ServerHello, a
client to generate a correct ClientHello pair. The ServerHello, a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems backward, a HelloRetryRequest is a ServerHello but not the other way around.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually meant to delete this entire clause, so it should just read "A HRR must not..."

@@ -1900,7 +1900,7 @@ Servers MUST be prepared to receive ClientHellos that include this
extension but do not include 0x0304 in the list of versions.

A server which negotiates a version of TLS prior to TLS 1.3 MUST
set ServerHello.version and MUST NOT send the "supported_versions"
set ServerHello.legacy_version and MUST NOT send the "supported_versions"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually remember thinking about proposing this change prior to the publication of RFC 8446. My reasoning at the time was that once you've negotiated an older version of TLS you're using that version, so ServerHello.version is the proper description of that (no-longer-TLS 1.3) protocol field. Without a reference to a corresponding reference for TLS 1.2 or similar, it's a bit confusing, I admit. But I'd be more inclined to reference RFC 5246 and keep using ServerHello.version than to take this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argh. You're right, this change is a mistake. I'll revert prior to landing

@@ -4111,8 +4112,7 @@ user_canceled:
{:br }

Either party MAY initiate a close of its write side of the connection by
sending a "close_notify" alert. Any data received after a "close_notify" alert has
been received MUST be ignored. If a transport-level close is received prior
sending a "close_notify" alert. If a transport-level close is received prior
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change? If you receive a close_notify and then more data from the peer, shouldn't you be ignoring that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already stated above.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, didn't read enough context. Thanks.

@@ -4476,7 +4476,7 @@ been computed, that secret SHOULD be erased.
## Updating Traffic Secrets {#updating-traffic-keys}

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 key using the KeyUpdate handshake message
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We expand the secret into a traffic key and a traffic IV; I'd keep this one as plural.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An IV isn't a key.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fair. Do you prefer "key" or "key material"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
update its sending traffic key using the KeyUpdate handshake message
update its sending traffic key and IV using the KeyUpdate handshake message

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
update its sending traffic key using the KeyUpdate handshake message
update its application traffic secret using the KeyUpdate handshake message

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is important to be precise about application traffic secret vs. handshake traffic secret. Isn't the intention in this section to talk about the former?

Copy link
Contributor Author

@ekr ekr Sep 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per Paul's instructions to do the minimal changes I'm going to revert this change. We use "keys" plural all over the place in this section.

Copy link
Contributor Author

@ekr ekr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK so this PR could still use some work.... Thanks for catching some issues @kaduk. Responses below.

@@ -1651,7 +1651,7 @@ a distinct message.

The server's extensions MUST contain "supported_versions".
Additionally, it SHOULD contain the minimal set of extensions necessary for the
client to generate a correct ClientHello pair. As with the ServerHello, a
client to generate a correct ClientHello pair. The ServerHello, a
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually meant to delete this entire clause, so it should just read "A HRR must not..."

@@ -1900,7 +1900,7 @@ Servers MUST be prepared to receive ClientHellos that include this
extension but do not include 0x0304 in the list of versions.

A server which negotiates a version of TLS prior to TLS 1.3 MUST
set ServerHello.version and MUST NOT send the "supported_versions"
set ServerHello.legacy_version and MUST NOT send the "supported_versions"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argh. You're right, this change is a mistake. I'll revert prior to landing

@@ -4111,8 +4112,7 @@ user_canceled:
{:br }

Either party MAY initiate a close of its write side of the connection by
sending a "close_notify" alert. Any data received after a "close_notify" alert has
been received MUST be ignored. If a transport-level close is received prior
sending a "close_notify" alert. If a transport-level close is received prior
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already stated above.

@@ -1651,7 +1651,7 @@ a distinct message.

The server's extensions MUST contain "supported_versions".
Additionally, it SHOULD contain the minimal set of extensions necessary for the
client to generate a correct ClientHello pair. As with the ServerHello, a
client to generate a correct ClientHello pair. A
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original text was harmless, but this is fine.

@@ -3479,7 +3479,7 @@ ticket_lifetime:
network byte order from the time of ticket issuance.
Servers MUST NOT use any value greater than 604800 seconds (7 days).
The value of zero indicates that the ticket should be discarded
immediately. Clients MUST NOT use tickets for longer than
immediately fater use. Clients MUST NOT use tickets for longer than
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, there are two things bound up in this one:

  1. The time between when the ticket is issued and when it can be used. Or maybe between when the original connection ends and when the tickets issued on it can be used. My sense is that this is solidly ambiguous in that regard. My sense is that there is a floor on the lifetime of tickets that might allow them to be used some time after a reference point, but that time is pretty short. I don't know if the reference point is the issuance/receipt time or whether that time can extend while the connection remains active.
  2. Whether the ticket is single use. That's a matter that we've resolved already: tickets should only be used once, otherwise they allow an observer to correlate activity, even where other signals do not. So this is probably not relevant here.

Adding "after use" is misleading for sure. We already say that about tickets, though with a "SHOULD" (not a "should"). I don't know about the other thing.

@@ -4476,7 +4476,7 @@ been computed, that secret SHOULD be erased.
## Updating Traffic Secrets {#updating-traffic-keys}

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 key using the KeyUpdate handshake message
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
update its sending traffic key using the KeyUpdate handshake message
update its sending traffic key and IV using the KeyUpdate handshake message

@agievich
Copy link

Again about ServerHello.version vs ServerHello.legacy_version.

Maybe

A server which negotiates a version of TLS prior to TLS 1.3 MUST
set ServerHello.legacy_version (formerly ServerHello.version) and 
MUST NOT send the "supported_versions"

@paulwouters
Copy link

As these comments are coming in at the last possible moment in the process, please limit changes to the absolute minimum required and avoid "it would be nice" items.

@ekr
Copy link
Contributor Author

ekr commented Sep 12, 2025

Again about ServerHello.version vs ServerHello.legacy_version.

Maybe

A server which negotiates a version of TLS prior to TLS 1.3 MUST
set ServerHello.legacy_version (formerly ServerHello.version) and 
MUST NOT send the "supported_versions"

The point is that in the previous version (which is what is happening here) it is called ".version"

slightly more technically correct to talk about "key" rather
than "keys".

This reverts commit 31a02ac.
@ekr
Copy link
Contributor Author

ekr commented Sep 12, 2025

OK, after doing the archaeology on this ticket_lifetime issue (thanks, Ben), the original PR from @grittygrease just seems to introduce this "discarded immediately" text with no explanation. I agree that this isn't great, but IMO the conservative thing here is to leave the text as it originally was:

  1. Because the lifetime is from receipt, if you just don't do anything special for 0 you'll mostly get the immediate discard semantics (so arguably this text is redundant).
  2. The "at most once" semantics are redundant, as suggested by MT.
  3. Any other new semantics would clearly be us trying to invent something new at this point.

So I suggest we just leave this text as it is in the draft, which I plan to do unless someone objects ASAP. Sorry for the false alarm.

@ekr ekr merged commit 46b909e into tlswg:main Sep 13, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants