Re: [webkit-dev] Request for position: Removing 3DES from TLS

2021-04-29 Thread David Benjamin via webkit-dev
Ah yes, that is confusing. Not quite. What's going on here is that we've
moved 3DES (and SHA-1 server signatures) under a fallback connection, so
our first connection won't advertise them, but on error the second one
will. This means that, for compatibility and security purposes, we *do* support
3DES. But when you look at the ClientHellos, it'll look like we don't.
https://groups.google.com/a/chromium.org/g/blink-dev/c/yaJcs4p9LNI/m/haZWzX-UBwAJ

We do for more accurate measurement. In TLS, the client offers lists of
parameters, and then the server selects from that list based on its
negotiation criteria. That means if you simply measure the selected
parameters, you don't account for servers that supported other parameters
but preferentially picked this one, for some reason. This is also why
client tests like SSL Labs are very fast (they just read out the
ClientHello), while the corresponding server tests are very slow (they need
to probe server behavior in response to many ClientHellos and make guesses
about the negotiation criteria).

*Usually* the more straightforward measurement is good enough. It is an
upper bound[*], and everyone agrees TLS 1.1 is better than TLS 1.0, etc.
That AES is better than 3DES is also pretty well-established. However, from
looking at server behavior in the wild, we noticed there were a lot of
servers that had strange preference orders for 3DES and SHA-1 server
signatures. Servers that prefer 3DES but also support AES, while strange
and misconfigured, would *not* be broken by this removal. So, when
prevalent, it is useful to put them under fallback to get a more accurate
measurement.

This also means that, as you all evaluate 3DES for something similar, be
aware that a naive strategy may overcount the impact. So if your current
numbers are low enough, excellent. If they're too high, it is possible that
the true numbers are lower and the change is safer than it looks.

(By the way, it looks like, on my machine, Safari on Big Sur also supports
TLS_RSA_WITH_3DES_EDE_CBC_SHA.)

David

[*] Well, mostly. There's nothing stopping the server from implementing
some ridiculous selection logic like "if 3DES is present in the
ClientHello, pick AES-GCM, else, fail the connection". But that would be
ridiculous. :-)

On Wed, Apr 28, 2021 at 7:14 PM Alex Christensen via webkit-dev <
webkit-dev@lists.webkit.org> wrote:

> They are aware of this thread now, but I can’t comment on any future
> plans.  I do have a few quick questions, though.
>
> A quick glance at the client hellos sent by browsers shows this:
> Safari on Big Sur sends TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA (0xc008) and
> TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA (0xc012) in its supported cipher suites
> section of the client hello.
> Firefox 88 sends TLS_RSA_WITH_3DES_EDE_CBC_SHA (0x000a)
> Chrome 90 sends no cipher suites with 3DES.
>
> This might be why Chrome measures 0.00% use of
> TLS_RSA_WITH_3DES_EDE_CBC_SHA - because it doesn’t advertise that it
> supports it.  It seems to me that you’ve already removed support for 3DES
> in Chrome.  What was the measured use of 3DES cipher suites in the release
> before you removed support?  We have measured slightly above 0.00% use in a
> browser that does send 3DES cipher suites in its client hellos.
>
> If you haven’t already removed support, how would one use it?  I’ll admit
> I haven’t gone through all the possibilities of renegotiation that TLS has.
>
> > On Apr 28, 2021, at 8:21 AM, Alex Christensen via webkit-dev <
> webkit-dev@lists.webkit.org> wrote:
> >
> > Your measurement of 0.00% use in Chrome is exciting.
> >
> > Making this change would almost certainly not be a change in WebKit but
> I’ve reached out to the people who manage our crypto code.
> >
> >> On Apr 28, 2021, at 7:14 AM, Michael Catanzaro via webkit-dev <
> webkit-dev@lists.webkit.org> wrote:
> >>
> >>
> >> Looks like this change is clearly safe.
> >>
> >> I doubt Safari controls its own TLS ciphersuite settings. In WebKitGTK,
> they're controlled by the operating system's TLS backend and crypto policy.
> 3DES has been disabled for a while now on modern systems, and users have
> not reported any compat issues, which is not surprising given your finding
> of 0.00%.
> >>
> >> Michael
> >>
> >>
> >> ___
> >> webkit-dev mailing list
> >> webkit-dev@lists.webkit.org
> >> https://lists.webkit.org/mailman/listinfo/webkit-dev
> >
> > ___
> > webkit-dev mailing list
> > webkit-dev@lists.webkit.org
> > https://lists.webkit.org/mailman/listinfo/webkit-dev
>
> ___
> webkit-dev mailing list
> webkit-dev@lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev
>
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


[webkit-dev] Request for position: Removing 3DES from TLS

2021-04-28 Thread David Benjamin via webkit-dev
Hello WebKit friends,

We're looking at dropping 3DES cipher suites from TLS. For us, this is
just TLS_RSA_WITH_3DES_EDE_CBC_SHA.
Looks like Safari additionally supports TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
and TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, which would also fall under that
category.

After TLS 1.0 and 1.1 were removed, our metrics report a whole 0.00% of TLS
connections using TLS_RSA_WITH_3DES_EDE_CBC_SHA. (And, of course, no sites
use the other two in Chrome, since we don't support them in the first
place.)

For additionally background and motivation, see the blink-dev posting here.
https://groups.google.com/a/chromium.org/g/blink-dev/c/RShdgyaDoX4/m/JikQYHPuBQAJ

David
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Request for position: ALPS and ACCEPT_CH HTTP/2 and HTTP/3 frames

2021-04-06 Thread David Benjamin via webkit-dev
On Tue, Apr 6, 2021 at 2:37 PM Alex Christensen 
wrote:

> I’m also wondering why
> https://github.com/WICG/client-hints-infrastructure/blob/main/reliability.md#retry-limits
> says it should only retry GET requests.  Is that just to avoid re-uploading
> large POST requests?
>

POST requests are not safe
 or idempotent
, so the client
shouldn't automatically resend them. Though, yes, large POST bodies would
also be a nuisance.

> On Apr 6, 2021, at 10:02 AM, David Benjamin  wrote:
>
> Hi Alex, thanks for the comments! Responses inline.
>
> On Mon, Apr 5, 2021 at 9:04 PM Alex Christensen 
> wrote:
>
>> I’m glad to see ALPS and bytes sent over the network used instead of
>> additional reliance on state on the client.  We don’t want to introduce a
>> super cookie on the client, and we want to minimize breakage when a user
>> agent decides to remove state to prevent tracking.
>>
>
> Well, with regards to cross-site tracking, I'll note that Accept-CH cache
> is already naturally partitioned because it only applies to top-level
> loads. Subresources follow a delegation model. But, yeah, one of the nice
> outcomes of Client Hint Reliability is it makes the Accept-CH cache
> *actually* a cache, so the UA can scope or clear it with less worry. I
> think reducing the performance and functionality gap between new and
> returning clients is generally valuable for this sort of thing. I hope
> Client Hint Reliability is useful in this regard.
>
> I can’t say I’ve followed this development closely or even thought through
>> it all completely, but here are some initial thoughts:
>>
>> My first thought is that it seems excessive to have a way to specify
>> support of client hints both in the TLS handshake and in HTTP/{2,3}
>> frames.  I guess that’s why you wrote
>> https://github.com/WICG/client-hints-infrastructure/blob/main/reliability.md#why-two-mechanisms
>
>
> I think you may have misunderstood the reference to two mechanisms. The
> TLS ALPS extension and h2/h3 frames are part of the same mechanism. It's a
> layering thing. TLS provides a generic spot to stick protocol-specific
> settings early enough in the handshake, and then HTTP/{2,3} define how to
> use it. (We don't want every new feature like this to require an update to
> the TLS server.)
>
> Rather, the reference is to (1) Critical-CH HTTP response *header* and
> (2) TLS ALPS + h2/h3 frames. I'd love to avoid the redundancy, but I think
> this is the best option given all the design constraints. And yeah the
> explainer discusses why.
>
>
>> I don’t think that requiring a site to be running software that supports
>> client hints is a good prerequisite to using client hints, so I don’t think
>> that’s a good reason to have two mechanisms.
>>
>
> I'm not sure I'm parsing this sentence right. It sounds like you both
> don't think server software changes are a good requisite, but also don't
> think it's good to have a mechanism with lower server software requirements?
>
> Oops!  Remove the first “don’t” in my sentence.
>

Ah. :-)

I think the other constraints are more fundamental. I view this more as a
nice bonus. Especially given how slowly TLS sadly moves in much of the
ecosystem. Features in TLS libraries, software releases, those releases
making their way into Linux distros, and then to LTS versions of those
distros, etc.

In particular, the rest of Client Hints works with just headers, so having
Critical-CH makes it easier for sites to get reliability. That, in turn,
reduces the functionality gap when the UA needs to clear or scope some
state, as we talked about above. (Though the connection-level optimization
is still needed to close the performance gap.)

> Sites can change with open connections, but if a site changes its client
>> hints acceptance, wouldn’t that be a good reason to terminate all the open
>> connections and require renegotiation?
>>
>
> Sites don't really work that way architecturally. You may have, for
> instance, a CDN frontend handling TLS and H2/H3, but it contacts the origin
> server that developers actually upload content to. In such deployments,
> there usually isn't a way to signal an update to all connections like that.
> Moreover, there's a race condition here. The client may request the
> resource at the same time as the server signaling the new preferences.
>
>
>> Wildcard subdomains in the certificate is an interesting problem.
>>
>
> I'll add that cross-name pooling further complicates any hope of signaling
> existing connections above.
>
>
>> If it is decided that multiple mechanisms are necessary, their
>> interaction should be well defined.  What if the server said one thing in
>> ALPS but said something different in an HTTP/{2,3} frame?  What if I have
>> multiple connections open to the same server and get different client hint
>> headers?
>>
>
> Agreed it should be well-defined. I touched on this briefly
> in 

Re: [webkit-dev] Request for position: ALPS and ACCEPT_CH HTTP/2 and HTTP/3 frames

2021-04-06 Thread David Benjamin via webkit-dev
(Oops, couldn't post to the list without being subscribed. Apologies for
the duplicate mail to anyone who got both!)

On Tue, Apr 6, 2021 at 1:02 PM David Benjamin  wrote:

> Hi Alex, thanks for the comments! Responses inline.
>
> On Mon, Apr 5, 2021 at 9:04 PM Alex Christensen 
> wrote:
>
>> I’m glad to see ALPS and bytes sent over the network used instead of
>> additional reliance on state on the client.  We don’t want to introduce a
>> super cookie on the client, and we want to minimize breakage when a user
>> agent decides to remove state to prevent tracking.
>>
>
> Well, with regards to cross-site tracking, I'll note that Accept-CH cache
> is already naturally partitioned because it only applies to top-level
> loads. Subresources follow a delegation model. But, yeah, one of the nice
> outcomes of Client Hint Reliability is it makes the Accept-CH cache
> *actually* a cache, so the UA can scope or clear it with less worry. I
> think reducing the performance and functionality gap between new and
> returning clients is generally valuable for this sort of thing. I hope
> Client Hint Reliability is useful in this regard.
>
> I can’t say I’ve followed this development closely or even thought through
>> it all completely, but here are some initial thoughts:
>>
>> My first thought is that it seems excessive to have a way to specify
>> support of client hints both in the TLS handshake and in HTTP/{2,3}
>> frames.  I guess that’s why you wrote
>> https://github.com/WICG/client-hints-infrastructure/blob/main/reliability.md#why-two-mechanisms
>
>
> I think you may have misunderstood the reference to two mechanisms. The
> TLS ALPS extension and h2/h3 frames are part of the same mechanism. It's a
> layering thing. TLS provides a generic spot to stick protocol-specific
> settings early enough in the handshake, and then HTTP/{2,3} define how to
> use it. (We don't want every new feature like this to require an update to
> the TLS server.)
>
> Rather, the reference is to (1) Critical-CH HTTP response *header* and
> (2) TLS ALPS + h2/h3 frames. I'd love to avoid the redundancy, but I think
> this is the best option given all the design constraints. And yeah the
> explainer discusses why.
>
>
>> I don’t think that requiring a site to be running software that supports
>> client hints is a good prerequisite to using client hints, so I don’t think
>> that’s a good reason to have two mechanisms.
>>
>
> I'm not sure I'm parsing this sentence right. It sounds like you both
> don't think server software changes are a good requisite, but also don't
> think it's good to have a mechanism with lower server software requirements?
>
>
>> Sites can change with open connections, but if a site changes its client
>> hints acceptance, wouldn’t that be a good reason to terminate all the open
>> connections and require renegotiation?
>>
>
> Sites don't really work that way architecturally. You may have, for
> instance, a CDN frontend handling TLS and H2/H3, but it contacts the origin
> server that developers actually upload content to. In such deployments,
> there usually isn't a way to signal an update to all connections like that.
> Moreover, there's a race condition here. The client may request the
> resource at the same time as the server signaling the new preferences.
>
>
>> Wildcard subdomains in the certificate is an interesting problem.
>>
>
> I'll add that cross-name pooling further complicates any hope of signaling
> existing connections above.
>
>
>> If it is decided that multiple mechanisms are necessary, their
>> interaction should be well defined.  What if the server said one thing in
>> ALPS but said something different in an HTTP/{2,3} frame?  What if I have
>> multiple connections open to the same server and get different client hint
>> headers?
>>
>
> Agreed it should be well-defined. I touched on this briefly
> in draft-davidben-http-client-hint-reliability-02, but not in full detail.
> The IETF and W3C/WHATWG split is a bit fun at the boundaries of the web
> platform and network protocols. :-) I think we'll probably put the full
> Fetch integration in https://github.com/WICG/client-hints-infrastructure,
> alongside the other Client Hints bits.
>
> The interaction we think works best is that ALPS/frames and
> Accept-CH/Critical-CH are conceptually two separate sources of hint
> requests, with the expectation that the former is an optimization for the
> latter. You end up roughly unioning them. This avoids weird behaviors when
> they mismatch and meshes well with the constraints that led to two
> mechanisms in the first place.
>
>
>> In
>> https://github.com/WICG/client-hints-infrastructure/blob/main/reliability.md#retry-limits
>> you specify that a client should not retry more than once per request to
>> avoid infinite loops, but in
>> https://github.com/WICG/client-hints-infrastructure/blob/main/reliability.md#server-triggered-retry
>> you use the possibility of infinite loops as a reason that a
>> server-triggered