Re: [TLS] RFC4492bis - Removing ECDH

Ilari Liusvaara <ilari.liusvaara@elisanet.fi> Wed, 14 January 2015 13:38 UTC

Return-Path: <ilari.liusvaara@elisanet.fi>
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 DAC401A8AB4 for <tls@ietfa.amsl.com>; Wed, 14 Jan 2015 05:38:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] 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 bFMhSIINpHdt for <tls@ietfa.amsl.com>; Wed, 14 Jan 2015 05:38:42 -0800 (PST)
Received: from emh01.mail.saunalahti.fi (emh01.mail.saunalahti.fi [62.142.5.107]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 71A561B2CA9 for <tls@ietf.org>; Wed, 14 Jan 2015 05:38:40 -0800 (PST)
Received: from LK-Perkele-VII (a88-112-44-140.elisa-laajakaista.fi [88.112.44.140]) by emh01.mail.saunalahti.fi (Postfix) with ESMTP id AD6D39003E; Wed, 14 Jan 2015 15:38:37 +0200 (EET)
Date: Wed, 14 Jan 2015 15:38:37 +0200
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
To: Michael Clark <michael@metaparadigm.com>
Message-ID: <20150114133837.GA32171@LK-Perkele-VII>
References: <274716D0-EC91-4131-A8F7-CD13A9B42CE7@gmail.com> <CA5F50E8-9FEE-481D-85B5-9DEAB333F4A8@gmail.com> <54ADE9B6.4080700@metaparadigm.com> <702F318A-FE04-45F7-8CA1-30256D628CF7@gmail.com> <54B1DD25.8090305@metaparadigm.com> <20150111051421.GA32295@LK-Perkele-VII> <54B65ADF.5020506@metaparadigm.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
In-Reply-To: <54B65ADF.5020506@metaparadigm.com>
User-Agent: Mutt/1.5.23 (2014-03-12)
Sender: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/6ecJURw_O4CvdurhEcIHKHFTBqw>
Cc: "TLS@ietf.org (tls@ietf.org)" <tls@ietf.org>
Subject: Re: [TLS] RFC4492bis - Removing ECDH
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: <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: Wed, 14 Jan 2015 13:38:47 -0000

On Wed, Jan 14, 2015 at 08:02:39PM +0800, Michael Clark wrote:
> On 11/1/15 1:14 pm, Ilari Liusvaara wrote:
> > On Sun, Jan 11, 2015 at 10:17:09AM +0800, Michael Clark wrote:
> >>
> >> There is a more subtle pass through case where handshake messages can be
> >> tampered with (without access to a CA, just an Internet coffee bucks
> >> WiFi tap). Allows attacks such as editing cipher lists and any other
> >> associated handshake metadata (curve format extensions, switching on
> >> compression) that are not properly authenticated. Until I am certain
> >> they are completely mitigated I remain skeptical.
> > 
> > This attack won't work.
> > 
> > - TLS 1.3: The messages are hashed into hMS, so you can't decrypt the
> >   rest of the handshake due to having wrong keys.
> 
> This was my thinking however I could not read this clearly in the text
> as the record protection for handshake was stated as NULL NULL AEAD.
> 
> I am still looking for clear text in {{key-calculation}} that describes
> that a strong authenticator of all sent handshake messages are returned
> to each end signed in the Finished message.

The first message keying includes hashes of all previous messages, so
those have to match for the keys to match.

For messages after the first keying, those are protected by the MAC built
into AEAD cipher.

> Anyway it offers no protection against the yellow patch cable to the
> grey box. There are many CA certs in the vendor trust stores. If you
> sent 3 certs from CAs with no relationships then you could eliminate
> this kind of tampering. multi-rooted. Verify is only a cost for 24H
> (given session caching and ticket timeout is sorted).

Yeah, certificates are another kettle of fish (made lots worse by
actual implementations that just plain don't work).

> > - TLS 1.0-1.2 w/o false start: The Finished values will fail to verify.
> > - TLS 1.0-1.2 /w false start: The selected crypto must be strong, or
> >   endpoints won't enage in false start.
> 
> OK In TLS 1.2 the spec states there is no record protection for
> handshake messages. I see verify_data field in Finished. It is vaguely
> specified in RFC5426 and RFC5288 (AES-GCM) makes no reference to it.

RFC5246 (TLS 1.2) you mean? And it does specify how Finished is computed,
and yes, it does include a hash of handshake messages in the computations.

Of course, if endpoint does not check the Finished message, things go
badly wrong (TLS 1.3 just blows up due to mismatched keys).

> However I am still skeptical as there is no record protection for
> handshake messages so I don't know what is preventing the proxy from
> returning illegal_parameter to the client hello until the client does a
> TLS1.0 ClientHello and then edit the cipher list remove SCSV and cause
> client to negotiate TLS_WITH_RSA_RC4_128_SHA with Windows XP.

Not having client ever fall back (of course, browsers have historically
been pretty bad at this, which made POODLE more than just a curiosity).

> I'm trying to find where the 12 octect verify_data is specified. If
> *all* of the the handshake payload is in a MAC in verify data then you
> could generate still generated ignored extensions to get a 96-bit hash
> collision. Still reasoning about it...

It is specified in base TLS spec (Section 7.4.9 for TLS1.2 / RFC5246).

And given the realtime requirements, even ~2^48 work to collide a 96-
bit hash is a lot of work. And looks like one would need a preimage
to do anything interesting, which is ~2^96 work (regarded infeasible
even with lots of resource).


-Ilari