Re: [Cfrg] TLS PRF security proof?

Jakob Breier <Jakob.Breier@rwth-aachen.de> Thu, 10 July 2014 11:16 UTC

Return-Path: <Jakob.Breier@rwth-aachen.de>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4A5FB1B2884 for <cfrg@ietfa.amsl.com>; Thu, 10 Jul 2014 04:16:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.501
X-Spam-Level:
X-Spam-Status: No, score=-4.501 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.651] 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 E1MVODCJSMg3 for <cfrg@ietfa.amsl.com>; Thu, 10 Jul 2014 04:16:46 -0700 (PDT)
Received: from mx-out-2.rwth-aachen.de (mx-out-2.rwth-aachen.de [134.130.5.187]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2BBCD1B287F for <cfrg@irtf.org>; Thu, 10 Jul 2014 04:16:45 -0700 (PDT)
X-IronPort-AV: E=Sophos;i="5.01,637,1400018400"; d="scan'208";a="251474876"
Received: from hub1.rwth-ad.de (HELO mail.rwth-aachen.de) ([134.130.26.142]) by mx-2.rz.rwth-aachen.de with ESMTP; 10 Jul 2014 13:16:43 +0200
Received: from localhost.localdomain (78.49.84.152) by mail.rwth-aachen.de (134.130.26.142) with Microsoft SMTP Server (TLS) id 14.3.181.6; Thu, 10 Jul 2014 13:16:42 +0200
Message-ID: <53BE761A.9000709@rwth-aachen.de>
Date: Thu, 10 Jul 2014 13:16:42 +0200
From: Jakob Breier <Jakob.Breier@rwth-aachen.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
MIME-Version: 1.0
To: Andy Lutomirski <luto@amacapital.net>, Watson Ladd <watsonbladd@gmail.com>
References: <20140709125829.22319253.16811.16396@certicom.com> <CALCETrVG9Ltf=9x64mOScorLCUPZNtr1XF6rkfpgzT2GDiwi+g@mail.gmail.com> <6A60ED12-70B4-4CBF-B31E-3D5DDA7DC7EA@vpnc.org> <CALCETrXMZZVbF3tzZm0PfuKQ0h8mUoj7XcWgcJMNMgTuEp1+dg@mail.gmail.com> <CALCETrW7JUbJTJAY3UWf6EpXWc5ij+xy3fzWXE8+-xtpsLG7CQ@mail.gmail.com> <CACsn0c=9PuGD8p0hM6LUJKFMN_eP=UtGQN38y6DW9rsQsy1PLQ@mail.gmail.com> <CALCETrWo+gvVkL8P4Lw-ZtuTfu=L_q5+h9zcdpPyZvB5-FE0vg@mail.gmail.com> <CACsn0cmL6DcbynZkDOZST7-Voq+n217awx737dv7oy5VYWFDyg@mail.gmail.com> <CALCETrX5gJdQZATrzOrXtw_M4hc320yUi_HJPuexJORUuUw07g@mail.gmail.com>
In-Reply-To: <CALCETrX5gJdQZATrzOrXtw_M4hc320yUi_HJPuexJORUuUw07g@mail.gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-PMWin-Version: 3.1.1.0
Archived-At: http://mailarchive.ietf.org/arch/msg/cfrg/QRjYjfGxIYLIMMJjjsl4X0p44RM
Cc: "cfrg@irtf.org" <cfrg@irtf.org>, Paul Hoffman <paul.hoffman@vpnc.org>
Subject: Re: [Cfrg] TLS PRF security proof?
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <http://www.irtf.org/mail-archive/web/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <http://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Thu, 10 Jul 2014 11:16:58 -0000

Hi,

On 10.07.2014 05:16, Andy Lutomirski wrote:
> On Wed, Jul 9, 2014 at 8:05 PM, Watson Ladd <watsonbladd@gmail.com> wrote:
>> On Wed, Jul 9, 2014 at 7:50 PM, Andy Lutomirski <luto@amacapital.net> wrote:
>>> On Wed, Jul 9, 2014 at 6:52 PM, Watson Ladd <watsonbladd@gmail.com> wrote:
>>>
>>>> Without the salt argument the result is simply H(stuff), which is
>>>> supposed to be fine for any reasonable choice of H.
>>> If stuff is (party A data | party B data) and party A gets to choose
>>> all of its data offline, then this isn't so appealing for common
>>> choices of H.
>> Why not? Is there a weakness of SHA256 I'm unaware of? If you need
>> signatures, you need collision resistant hash functions.
>> All uses of SHA1 and MD5 need to be ended ASAP: Microsoft has already
>> begun this process.
> Suppose that party A is malicious and they can find "party A data 1"
> and "party A data 2" that collide.  I can imagine protocols in which
> this violates one of the assumptions of the protocol.
>
> If you allow party A to spend an extremely long time precomputing
> something *before starting the protocol*, I'd like the protocol to
> remain reasonably secure.  Hashes with unnecessarily small internal
> state violate this.

If internal state size is your problem you can always use Sha512 or 
Sha3-512 for an intended collision resistance of 256bit.

But I find your argument much more compelling in the context of 
deteriorating hash functions, like MD5. Of course you wouldn't use MD5 
for new protocols, nonetheless it provides a nice case study for how the 
Sha2 and Sha3 family might break down with future cryptanalysis. 
Specifically while MD5 is no longer collision resistant, it is still 
preimage resistant and target collision resistant / UOWHF (in the sense 
that the random value is prefixed to the message).


On 09.07.2014 17:28, Paul Hoffman wrote:
> On Jul 9, 2014, at 8:18 AM, Andy Lutomirski<luto@amacapital.net>  wrote:
>
>> >I can't speak for the TLS WG, but from my own perspective, I have
>> >three problems with HDKF:
>> >
>> >1. HKDF is parametrized by a hash.  What hash should people use?
> Any one that has no known weakening of preimage resistance. That is: nearly any of them.

Which brings me back to RFC 5869 in the use case of PRFs for protocols 
like TLS. If you want to assure your handshake was not tampered with, 
for example in a downgrade attack, and then put the whole handshake into 
the PRF/KDF (in addition to the Diffi-Hellman result or some other 
secret) you will at least need collision resistance of the KDF. HKDF was 
not analyzed under this setting (as far as I can tell from Definition 7 
of the accompanying paper) and the explanations in the RFC do not help 
you decide with which hash functions it is secure then.

It would be nice to only rely on target collision resistance and 
preimage resistance instead of full collision resistance of the hash 
function, and for right choices of the salt this would be possible for 
HKDF, too. For example if after the handshake an additional random from 
each of the parties is exchanged and the concatenation is used as the 
salt. I don't see how it would be feasible without at least one further 
message transfer, though, so it it's likely not worth the additional costs.

Regards,
Jakob Breier