Re: [TLS] First TLS cached information draft posted

Simon Josefsson <simon@josefsson.org> Tue, 09 June 2009 14:00 UTC

Return-Path: <simon@josefsson.org>
X-Original-To: tls@core3.amsl.com
Delivered-To: tls@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id C2E8D3A691E for <tls@core3.amsl.com>; Tue, 9 Jun 2009 07:00:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dn56oh9cRaqY for <tls@core3.amsl.com>; Tue, 9 Jun 2009 07:00:20 -0700 (PDT)
Received: from yxa-v.extundo.com (yxa-v.extundo.com [83.241.177.39]) by core3.amsl.com (Postfix) with ESMTP id 9D8FA3A6819 for <TLS@ietf.org>; Tue, 9 Jun 2009 07:00:19 -0700 (PDT)
Received: from mocca.josefsson.org (c80-216-24-60.bredband.comhem.se [80.216.24.60]) (authenticated bits=0) by yxa-v.extundo.com (8.14.3/8.14.3/Debian-5) with ESMTP id n59E0Lmp004450 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 9 Jun 2009 16:00:23 +0200
From: Simon Josefsson <simon@josefsson.org>
To: martin.rex@sap.com
References: <200906091352.n59DqX3N004203@fs4113.wdf.sap.corp>
OpenPGP: id=B565716F; url=http://josefsson.org/key.txt
X-Hashcash: 1:22:090609:martin.rex@sap.com::+7R75t5+g2Ih0qJR:34+I
X-Hashcash: 1:22:090609:tls@ietf.org::ZPTaZxk2qZthTQbd:DvQ1
Date: Tue, 09 Jun 2009 16:00:21 +0200
In-Reply-To: <200906091352.n59DqX3N004203@fs4113.wdf.sap.corp> (Martin Rex's message of "Tue, 9 Jun 2009 15:52:33 +0200 (MEST)")
Message-ID: <87bpoxh5hm.fsf@mocca.josefsson.org>
User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.94 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Cc: TLS@ietf.org
Subject: Re: [TLS] First TLS cached information draft posted
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.9
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/listinfo/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/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: Tue, 09 Jun 2009 14:00:20 -0000

Martin Rex <Martin.Rex@sap.com> writes:

> Simon Josefsson wrote:
>> >
>> > Not quite.
>> >
>> > The caching extension is supposed to be generic, and the to-be-cached
>> > real data may in some situations be quite short or even the same size
>> > than the hash value (probably not for the server certificate caching,
>> > but maybe for the list of certification authorities in the certificate
>> > request message, which consists of distinguished names only, and
>> > there could be just one very short DName (or none at all with TLS v1.1+)
>> 
>> Then why use the extension?  The point of the extension, as I understood
>> it, is to replace large data with a small hash of the same data.  If the
>> data is small, the extension doesn't serve any purpose and should not be
>> used.  That is why I liked your suggestion to limit the use of the
>> extension when the data is larger than 3x hash size.
>
> Look at this:
>
> Server supports caching of certificate_authorities list and runs with
> a large list
>
> Client connects, caches the long list and announces the hash of the
> cached information on future reconnects
>
> Server configuration is updated, certificate_authorities list
> is cut down and now only contains one very short name.
>
> Client connects again (having still cached the previous long list),
> server indicates to support caching of that value in principle,
> but returns the real data since the hash proposed by the client
> no longer matches.
>
> Client should now realize that the short data is the new real
> data, should probably drop the cached value, and refrain from
> further caching of the short value.

Right.  That is how I think it should work as well.

I believe that adding a limit of 4x hash size (or similar) is still
useful, though, since it would be pointless for the client in your
example to update its cached hash with a hash of the new string, and
send that hash in the future.  Doing so would result in a handshake that
is potentially _larger_ than if the cached data were sent.

/Simon