Re: [TLS] Collisions (Re: Consensus Call: FNV vs SHA1)

Simon Josefsson <simon@josefsson.org> Mon, 10 May 2010 22:19 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 8C2D43A69FC for <tls@core3.amsl.com>; Mon, 10 May 2010 15:19:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.391
X-Spam-Level:
X-Spam-Status: No, score=-2.391 tagged_above=-999 required=5 tests=[AWL=0.208, 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 VENLBIU+MWuC for <tls@core3.amsl.com>; Mon, 10 May 2010 15:19:46 -0700 (PDT)
Received: from yxa-v.extundo.com (yxa-v.extundo.com [83.241.177.39]) by core3.amsl.com (Postfix) with ESMTP id 93B813A6931 for <tls@ietf.org>; Mon, 10 May 2010 15:19:44 -0700 (PDT)
Received: from mocca (c80-216-25-148.bredband.comhem.se [80.216.25.148]) (authenticated bits=0) by yxa-v.extundo.com (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o4AMJTej016091 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 11 May 2010 00:19:31 +0200
From: Simon Josefsson <simon@josefsson.org>
To: Nicolas Williams <Nicolas.Williams@oracle.com>
References: <AC1CFD94F59A264488DC2BEC3E890DE50A43B479@xmb-sjc-225.amer.cisco.com> <20100510190954.GV9429@oracle.com> <87r5lj4eee.fsf@mocca.josefsson.org> <20100510215652.GA9429@oracle.com>
OpenPGP: id=B565716F; url=http://josefsson.org/key.txt
X-Hashcash: 1:22:100510:tls@ietf.org::aDCZWiQ1KG8Rh8gS:2d0l
X-Hashcash: 1:22:100510:nicolas.williams@oracle.com::DT2K0ModQo9dLPpe:FF3r
Date: Tue, 11 May 2010 00:19:29 +0200
In-Reply-To: <20100510215652.GA9429@oracle.com> (Nicolas Williams's message of "Mon, 10 May 2010 16:56:52 -0500")
Message-ID: <87bpcn4cy6.fsf@mocca.josefsson.org>
User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Virus-Scanned: clamav-milter 0.96 at yxa-v
X-Virus-Status: Clean
Cc: tls@ietf.org
Subject: Re: [TLS] Collisions (Re: Consensus Call: FNV vs SHA1)
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: Mon, 10 May 2010 22:19:48 -0000

Nicolas Williams <Nicolas.Williams@oracle.com> writes:

> On Mon, May 10, 2010 at 11:48:09PM +0200, Simon Josefsson wrote:
>> Nicolas Williams <Nicolas.Williams@oracle.com> writes:
>> 
>> >  - Add a description of what happens if cached object checksums collide.
>> >
>> >    No, the current security considerations section doesn't deal with
>> >    this, and rightly so _if_ collisions are not a security problem, but
>> >    what happens when there are collisions?  Do hanshakes fail?
>> 
>> I agree that it is important to explain this.
>> 
>> If collisions happen, it appears that we do get slightly weaker
>> semantics of what it means for a handshake to succeed: we aren't
>> cryptographically certain (in the sense that there is cryptographic
>> reduction) that the client and server agree on the data used during the
>> handshake for cached items (CA cert list, server certificate) after the
>> handshake has concluded.
>
> In the success case I think we are certain that we don't care about
> collisions, if there were any: the cryptographic properties of TLS
> ensure this.

Ensures what?  As far as I can see, it doesn't ensure that the server
knows which server certificate the client saw, or that the client knows
which ca-cert-list the server offered.  Both could influence which
client certificate the client selects, which seems potentially bad.

For example, I looked in the document, and I don't see any requirement
that clients only cache information from a server _after_ having
performed a successful handshake against the server.  Without that, an
attacker could setup a fake server that causes clients to cache some
information (different from what the real server would send), fail the
handshake, and let the client re-try against the real server, and the
client would then use the wrong cached information.

> It's the failure case I'm concerned with.  If failures occur, how do you
> recover?  If failures occur, will users want this?

I also want to see these questions (+ answers) covered in the document.
The answers aren't clear to me.

>> This problem would be solved if the Finished message were computed over
>> the replaced data rather than the digest value.  Then any data
>> mismatches would be detected at the TLS Finished computation, and the
>> handshake fail.  Perhaps this is simpler than introducing a
>> cryptographic digest.
>
> I think modifying the way Finished msgs are computed would make this
> protocol way too complicated.  I'd be happier with the server assigning
> object IDs to cacheable objects.

Doesn't this have the same problem with collisions?

/Simon