Re: [TLS] TLS and KCI vulnerable handshakes

Clemens Hlauschek <clemens.hlauschek@rise-world.com> Wed, 12 August 2015 00:25 UTC

Return-Path: <clemens.hlauschek@rise-world.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 84AAA1A0A85 for <tls@ietfa.amsl.com>; Tue, 11 Aug 2015 17:25:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UV1pj3BPKT3R for <tls@ietfa.amsl.com>; Tue, 11 Aug 2015 17:25:18 -0700 (PDT)
Received: from mail01.rise-w.com (mail01.rise-w.com [88.116.105.226]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 48C391A070E for <tls@ietf.org>; Tue, 11 Aug 2015 17:25:18 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by mail01.rise-w.com (Postfix) with ESMTP id 1254040E431; Wed, 12 Aug 2015 02:25:16 +0200 (CEST)
Received: from [192.168.43.233] (unknown [172.56.2.230]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.rise-world.com (Postfix) with ESMTPSA id 3234240E062; Wed, 12 Aug 2015 02:25:13 +0200 (CEST)
Message-ID: <55CA9264.7040606@rise-world.com>
Date: Tue, 11 Aug 2015 20:25:08 -0400
From: Clemens Hlauschek <clemens.hlauschek@rise-world.com>
User-Agent: mutt 1.5.23 (Plan 9)
MIME-Version: 1.0
To: Martin Thomson <martin.thomson@gmail.com>
References: <55C8CD7A.7030309@rise-world.com> <9A043F3CF02CD34C8E74AC1594475C73F4AD80F3@uxcn10-5.UoA.auckland.ac.nz> <9690882F-B794-4D1D-973F-DE7F90120CC3@gmail.com> <CABkgnnXruou6BbgZK8vWUeyb-gW5OTSZKPwPVPwZ826usNz9RA@mail.gmail.com> <20150811190544.GA13734@LK-Perkele-VII> <CABkgnnXnx7Fvt8oXNwMC3oLtXD4A4gFw6j-LWWuSkS3BasWqrg@mail.gmail.com> <55CA8783.8060201@rise-world.com> <CABkgnnX9pGxwPFvPw5VUUst7-DX7fAbPC90bAz1EztxZ7K9KpA@mail.gmail.com>
In-Reply-To: <CABkgnnX9pGxwPFvPw5VUUst7-DX7fAbPC90bAz1EztxZ7K9KpA@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/yfhdcjXmles1VAtj3_sqkXTPRhQ>
Cc: Karthikeyan Bhargavan <karthik.bhargavan@gmail.com>, "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] TLS and KCI vulnerable handshakes
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
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: Wed, 12 Aug 2015 00:25:20 -0000

On 08/11/2015 07:59 PM, Martin Thomson wrote:
> On 11 August 2015 at 16:38, Clemens Hlauschek
> <clemens.hlauschek@rise-world.com> wrote:
>>> Maybe I should have been clearer.  The certificate might not include a
>>> (strong) signal that allows the client to distinguish between ECDSA
>>> and fixed ECDH, but the client might be configured with that
>>> knowledge.
>>
>> There is no difference between an ECDH and an ECDSA, apart from
>> (possibly) the KeyUsage Extension.
> 
> I'l try again.  Even if the certificate does not include that signal,
> the software that accepts that signal might make assumptions or have
> configuration that cause it to only be used in one way or another.
> See NSS.

NSS does not support

rsa_fixed_ecdh
ecdsa_fixed_ecdh
rsa_fixed_dh
dh_fixed_dh,

although it supports ECDH_ECDSA and ECDH_RSA (if I remember correctly)

so your point is moot. Anyway, the only client implementations we found
that were actually vulnerable to the attack (Safari/Mac OS X --
supporting (EC)DH_* key exchange and *fixed_(ec)dh client
authentication) did not make these assumption you are talking about, and
I can not see why they should.

We are currently working on  a video showcasing an actual attack (Safari
-- Facebook).


> 
>>> NSS (incorrectly) adopts the posture that _ECDH_ suites are
>>> half-static: the server share is in the certificate, but the client
>>> side is fully ephemeral.  This is clearly in violation of RFC 5246,
>>> Section 7.4.7 and RFC 4492, Section 3.2. I'm not going to worry about
>>> that right now :)
>>
>> Please elaborate. I do not see how this half-static behaviour
>> constitutes any violations of the mentioned RFCs.
> 
> Both the above cited sections say very clearly that for fixed (EC)DH
> cipher suites the client where the client has a fixed (EC)DH
> certificate, the client MUST send an empty ClientKeyExchange.


Yes, that is correct. But for fixed (EC)DH client authentication.


> 
> Of course, you might say that this is simply a consequence of not
> supporting fixed (EC)DH for client authentication, and then it's not
> technically in violation.  The value of the ClientCertificateType from
> the CertificateRequest is likely important here, but that field is
> systematically ignored in practice (NSS ignores it).


I could find nowhere in the spec that a (non-ephemeral)
 (EC)DH key agreement necessary implies fixed (EC)DH client
authentication to be used. The other direction (fixed (EC)DH client
authentication requires a (EC)DH key agreement, is insinuated by the
spec, but still left ambiguous (a conclusion I came to after discussing
exactly that with the OpenSSL developers).

Regards,
Clemens