Re: [TLS] Computation of static secret in anonymous DH

Nico Williams <nico@cryptonector.com> Fri, 31 July 2015 16:55 UTC

Return-Path: <nico@cryptonector.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 256CE1B2E59 for <tls@ietfa.amsl.com>; Fri, 31 Jul 2015 09:55:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.366
X-Spam-Level:
X-Spam-Status: No, score=-2.366 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, IP_NOT_FRIENDLY=0.334, 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 Ut_zRRci9Ikh for <tls@ietfa.amsl.com>; Fri, 31 Jul 2015 09:55:49 -0700 (PDT)
Received: from homiemail-a113.g.dreamhost.com (sub4.mail.dreamhost.com [69.163.253.135]) by ietfa.amsl.com (Postfix) with ESMTP id AA87B1A914B for <tls@ietf.org>; Fri, 31 Jul 2015 09:55:49 -0700 (PDT)
Received: from homiemail-a113.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a113.g.dreamhost.com (Postfix) with ESMTP id 4BB9420058D85; Fri, 31 Jul 2015 09:55:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=cryptonector.com; bh=k++g8ZvSxgowas GY2AGJcwjJKPY=; b=ZfTwIU0adYt1vvYFTAEDpxKVifQBYcdqsa4gpMNamjblbS 6GGW8EaWWalbkM0xFuC+pSLWm84K8fqLpca/RtACS2fTKcx9kHP/GGkAJTDKfBxN OCf73Xd3R6tSoNLI6AwXkAh17g6jXerJX1FrACCDHM+b2Wap3BSoyhkm/6zYw=
Received: from localhost (108-207-244-174.lightspeed.austtx.sbcglobal.net [108.207.244.174]) (Authenticated sender: nico@cryptonector.com) by homiemail-a113.g.dreamhost.com (Postfix) with ESMTPA id CF71320058D82; Fri, 31 Jul 2015 09:55:48 -0700 (PDT)
Date: Fri, 31 Jul 2015 11:55:48 -0500
From: Nico Williams <nico@cryptonector.com>
To: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Message-ID: <20150731165547.GI2957@localhost>
References: <20150617082529.GA17280@LK-Perkele-VII> <CABcZeBNzzfxo+xQRrS=7-7C65kr3DqtJ5BHqTnt0mC8v-oFuUw@mail.gmail.com> <20150617150505.GA19959@LK-Perkele-VII> <CABcZeBN8m6f=F14Qx1QctMCoF7_LYNrf9D3HstoTZsK2orS1SA@mail.gmail.com> <20150626085008.GA25187@LK-Perkele-VII> <CABcZeBMHim=qBw9L_PG3C4+E=N6n=AdV1AoWN+_19zi84cJJgQ@mail.gmail.com> <20150626165415.GA28534@LK-Perkele-VII> <CABcZeBOTMHVRNi-7JhKEz6KUt=U79SgiKPAmyqUeF3JauUt3Fw@mail.gmail.com> <20150626184128.GG6117@localhost> <20150731164212.GA28398@LK-Perkele-VII>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20150731164212.GA28398@LK-Perkele-VII>
User-Agent: Mutt/1.5.21 (2010-09-15)
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/hQ80yQemgd2Hrkm9ATmY1Y2dUYs>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Computation of static secret in anonymous DH
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: Fri, 31 Jul 2015 16:55:51 -0000

On Fri, Jul 31, 2015 at 07:42:12PM +0300, Ilari Liusvaara wrote:
> On Fri, Jun 26, 2015 at 01:41:29PM -0500, Nico Williams wrote:
> > tls-unique depends on the Finished message strongly binding the entire
> > transcript up to that point.  I find this elegant (despite the
> > resumption problem, which anyways, should be fixed by the session hash)
> > and easy to understand and analyze.
> > 
> > If the Finished message no longer has this property in 1.3 then that's a
> > problem for tls-unique, and we'd have to fix one or the other.  Surely
> > 1.3 will have some handshake message that binds the transcript, and why
> > that wouldn't be the Finished message is beyond me (but I am missing a
> > lot of the 1.3 context, so please forgive and inform me).
> 
> Also, it turns out some are assuming tls-unique is both connection nonce
> and secret value. :-/

RFC5929 quite rightly says not to do that.

Do you have examples of apps doing this?

(The Finished message is generally sent encrypted, so that's not that
terrible an assumption.)

> I don't think the present construct for Finished values is appropriate
> for such values, which means one would have to redefine tls-unique
> so it meets the need.

I'd rather avoid this unless we really need to.  Examples of
applications mis-using tls-unique would be nice.

> (TLS-Exporter values already look to be secret and connection
> nonces, and I have already seen stuff relying on both properties).

A proper TLS-Exporter can be used (was intended to be used!) as secret
and whatever "connection nonces" are.

> Basically, the value needs to derive from both "master secret" (to make
> it secret) and session hash /w configs (to make it connection
> nonce).

Which Finished messages do!

The only problem with Finished messages as secrets is that the cipher
used might not provide confidentiality protection.  (Again, I'm not
endorsing the use of tls-unique as a secret.)  If we have no such
ciphersuites left in TLS 1.3...

Nico
--