Re: [TLS] Merkle Tree Certificates

"Kampanakis, Panos" <kpanos@amazon.com> Thu, 23 March 2023 02:01 UTC

Return-Path: <prvs=43946281e=kpanos@amazon.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6B2A3C14CE3B for <tls@ietfa.amsl.com>; Wed, 22 Mar 2023 19:01:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.594
X-Spam-Level:
X-Spam-Status: No, score=-9.594 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=amazon.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yya8dT-ehtSy for <tls@ietfa.amsl.com>; Wed, 22 Mar 2023 19:01:01 -0700 (PDT)
Received: from smtp-fw-2101.amazon.com (smtp-fw-2101.amazon.com [72.21.196.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E769AC14CE25 for <tls@ietf.org>; Wed, 22 Mar 2023 19:01:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1679536862; x=1711072862; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=TPFBRYPM0LRDWRqDLrLUXF9agDhqTArCYtkuQrgpADY=; b=WNSvoE0zQ9GH+SgrZ7j/j8Z1sCXBQgwNqs/N6Ofa3+Tx1LQB4rzNL/ax SQvQLX/IZwwh0FltZiD7eY2vuKes9YKx4jJ5KRHMal9sLyZ4+KvqyOPnY QNfD/Me+B8EkkaDOEe2Dnis0UNTisj56wiqDtPzD2Il3hxxrVJbll67Tm E=;
X-IronPort-AV: E=Sophos;i="5.98,283,1673913600"; d="scan'208";a="306146884"
Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-pdx-2b-m6i4x-ed19f671.us-west-2.amazon.com) ([10.43.8.6]) by smtp-border-fw-2101.iad2.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2023 02:00:58 +0000
Received: from EX19MTAUWA002.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-pdx-2b-m6i4x-ed19f671.us-west-2.amazon.com (Postfix) with ESMTPS id 50C4C8199F; Thu, 23 Mar 2023 02:00:55 +0000 (UTC)
Received: from EX19D001ANA004.ant.amazon.com (10.37.240.187) by EX19MTAUWA002.ant.amazon.com (10.250.64.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.22; Thu, 23 Mar 2023 02:00:54 +0000
Received: from EX19D001ANA001.ant.amazon.com (10.37.240.156) by EX19D001ANA004.ant.amazon.com (10.37.240.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1118.24; Thu, 23 Mar 2023 02:00:53 +0000
Received: from EX19D001ANA001.ant.amazon.com ([fe80::4f78:75cd:3117:8055]) by EX19D001ANA001.ant.amazon.com ([fe80::4f78:75cd:3117:8055%5]) with mapi id 15.02.1118.024; Thu, 23 Mar 2023 02:00:53 +0000
From: "Kampanakis, Panos" <kpanos@amazon.com>
To: Hubert Kario <hkario@redhat.com>
CC: "<tls@ietf.org>" <tls@ietf.org>, Devon O'Brien <asymmetric@google.com>, David Benjamin <davidben@chromium.org>
Thread-Topic: [TLS] Merkle Tree Certificates
Thread-Index: AdldKxD5a8NBqqKbTp+qwe39+5GWJA==
Date: Thu, 23 Mar 2023 02:00:53 +0000
Message-ID: <24da25b217fe4e398cf08a53655c1ccb@amazon.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.95.228.64]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/GROVU3SkBUechOWMkyw8pcz-Ab4>
Subject: Re: [TLS] Merkle Tree Certificates
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Mar 2023 02:01:05 -0000

Hi Hubert, 

I totally agree on your points about time-to-first-byte vs time-to-last-byte. We (some of my previous work too) have been focusing on time-to-first byte which makes some of these handshakes look bad for the tails of the 80-95th percentiles. But in reality, the time-to-last-byte or time-to-some-byte-that-makes-the-user-think-there-is-progress would be the more accurate measurement to assess these connections.

> Neither cached data nor Merkle tree certificates reduce round-trips

Why is that? Assuming Dilithium WebPKI and excluding CDNs, QUIC sees 2 extra round-trips (amplification, initcwnd) and TLS sees 1 (initcwnd). Trimming down the "auth data" will at least get rid of the initcwnd extra round-trip. I think the Merkle tree cert approach fits in the default QUIC amplification window too so it would get rid of that round-trip in QUIC as well.  



-----Original Message-----
From: Hubert Kario <hkario@redhat.com> 
Sent: Wednesday, March 22, 2023 8:46 AM
To: David Benjamin <davidben@chromium.org>
Cc: Kampanakis, Panos <kpanos@amazon.com>; <tls@ietf.org> <tls@ietf.org>; Devon O'Brien <asymmetric@google.com>
Subject: RE: [EXTERNAL][TLS] Merkle Tree Certificates

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.



On Tuesday, 21 March 2023 17:06:54 CET, David Benjamin wrote:
> On Tue, Mar 21, 2023 at 8:01 AM Hubert Kario <hkario@redhat.com> wrote:
>
>> On Monday, 20 March 2023 19:54:24 CET, David Benjamin wrote:
>>> I don't think flattening is the right way to look at it. See my 
>>> other reply for a discussion about flattening, and how this does a 
>>> bit more than that. (It also handles SCTs.)
>>>
>>> As for RFC 7924, in this context you should think of it as a funny 
>>> kind of TLS resumption. In clients that talk to many ...
>> https://github.com/MattMenke2/Explainer---Partition-Network-State/blo
>> b/main/README.md
>>> and https://github.com/privacycg/storage-partitioning.
>>
>> Sorry, but as long as the browsers are willing to perform session 
>> resumption I'm not buying the "cached info is a privacy problem".
>>
>
> I'm not seeing where this quote comes from. I said it had analogous
> properties to resumption, not that it was a privacy problem in the absolute.

I meant it as a summary not as a quote.

> The privacy properties of resumption and cached info on the situation. If
> you were okay correlating the two connections, both are okay in this
> regard. If not, then no. rfc8446bis discusses this:
> https://tlswg.org/tls13-spec/draft-ietf-tls-rfc8446bis.html#appendix-C.4
>
> In browsers, the correlation boundaries (across *all* state, not just TLS)
> were once browsing-profile-wide, but they're shifting to this notion of
> "site". I won't bore the list with the web's security model, but roughly
> the domain part of the top-level (not the same as destination!) URL. See
> the links above for details.
>
> That equally impacts resumption and any hypothetical deployment of cached
> info. So, yes, within those same bounds, a browser could deploy cached
> info. Whether it's useful depends on whether there are many cases where
> resumption wouldn't work, but cached info would. (E.g. because resumption
> has different security properties than cached info.)

The big difference is that tickets generally should be valid only for
a day or two, while cached info, just like cookies, can be valid for many
months if not years.

Now, a privacy focused user may decide to clear the cookies and cached
info daily, while others may prefer the slightly improved performance
on first visit after a week or month break.

>
>> It also completely ignores the encrypted client hello
>>
>
> ECH helps with outside observers correlating your connections, but it
> doesn't do anything about the server correlating connections. In the
> context of correlation boundaries within a web browser, we care about the
> latter too.

How's that different from cookies? Which don't correlate, but
cryptographically
prove previous visit?

>> Browser doesn't have to cache the certs since the beginning of time to be
>> of benefit, a few hours or even just current boot would be enough:
>>
>> 1. if it's a page visited once then all the tracking cookies
>> and javascript
>>    will be an order of magnitude larger download anyway
>> 2. if it's a page visited many times, then optimising for the subsequent
>>    connections is of higher benefit anyway
>>
>
> I don't think that's quite the right dichotomy. There are plenty of reasons
> to optimize for the first connection, time to first bytes, etc. Indeed,
> this WG did just that with False Start and TLS 1.3 itself. (Prior to those,
> TLS 1.2 was 2-RTT for the first connection and 1-RTT for resumption.)

In my opinion time to first byte is a metric that's popular because it's
easy
to measure, not because it's representative. Feel free to point me to
double blind studies with representative sample sizes showing otherwise.

Yes, reducing round-trips is important as latency of connection is not
correlated with bandwidth available. But when a simple page is a megabyte
of
data, and anything non trivial is multiple megabytes, looking at when the
first
byte arrives it is completely missing the bigger picture.

Especially when users are trained to not interact with the page until it
fully
loads (2018 Hawaii missile alert joke explanation):
https://gfycat.com/queasygrandiriomotecat

Neither cached data nor Merkle tree certificates reduce round-trips

> I suspect a caching for a few hours would not justify cached info because
> you may as well use resumption at that point.
>
>> In comparison, this design doesn't depend on this sort of
>>> per-destination state and can apply to the first time you talk
>>> to a server.
>>
>> it does depend on complex code instead, that effectively duplicates the
>> functionality of existing code
>>
>>> David
>>>
>>> [0] If you're a client that only talks to one or two servers,
>>> you could imagine getting this cached information pushed
>>> out-of-band, similar to how this document pushes some valid tree
>>> heads out-of-band. But that doesn't apply to most clients, ...
>>
>> web browser could get a list of most commonly accessed pages/cert pairs,
>> randomised to some degree by addition of not commonly accessed pages to
>> hide if
>> the connection is new or not, and make inference about previous visits
>> worthless
>>
>
> True, we could preload cached info for a global list of common
> certificates. I'm personally much more interested in mechanisms that
> benefit popular and unpopular pages alike.

Unpopular pages are much more likely to deploy a solution that doesn't
require
a parallel CA infrastructure and a cryptographer on staff.

--
Regards,
Hubert Kario
Principal Quality Engineer, RHEL Crypto team
Web: www.cz.redhat.com
Red Hat Czech s.r.o., Purkyňova 99/71, 612 45, Brno, Czech Republic