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

Eric Rescorla <ekr@rtfm.com> Fri, 26 June 2015 12:56 UTC

Return-Path: <ekr@rtfm.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 C0BF51B2D61 for <tls@ietfa.amsl.com>; Fri, 26 Jun 2015 05:56:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level:
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, 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 YQPu2BA8rn-J for <tls@ietfa.amsl.com>; Fri, 26 Jun 2015 05:56:04 -0700 (PDT)
Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2F61B1B2DAB for <tls@ietf.org>; Fri, 26 Jun 2015 05:56:02 -0700 (PDT)
Received: by wiwl6 with SMTP id l6so44749848wiw.0 for <tls@ietf.org>; Fri, 26 Jun 2015 05:56:01 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=Q2/mqb2ZtZLO8KrPd1K02Hu8Gzd8t3X9WDOodjjcfJo=; b=B0F4owAtxOexCT27OCxMGug1/4KDxI2722WC0gTmH8sH3dKeBx/pQALBsq33GR2Ipn FALa7iP/7NYTLAjoQt7wgmHlucQGU0KZ/xxEzh4TFpQ44knQWaxXVUQclEZRpJ5exyFV O7TRxzqrz85HnW0QICHtZDGurO0hxKvVyXmYO8jrcTD96M7WaH58Pz4RlMBqU5g7vylF 4JKnCx3Bm1qhyWnnMyBL6MalzFksutXVOZE4eXgvaRzlX2PW8H/vrgbIaa+02rKCGIgN CXI96v0pWwnQmFQGFdcpkteEpyb2dnanyvU92RtgBwtBz4pdcmfbEouE0kHfls7vl26X SeRw==
X-Gm-Message-State: ALoCoQlYIJjA183/XWI4/PBaPZok6gSxDYlvMV3+E7ImYV/NWsJmmpgdLxMaT/prSiq8TznTLxqi
X-Received: by 10.194.133.73 with SMTP id pa9mr2819500wjb.148.1435323360872; Fri, 26 Jun 2015 05:56:00 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.27.95.211 with HTTP; Fri, 26 Jun 2015 05:55:21 -0700 (PDT)
In-Reply-To: <20150626085008.GA25187@LK-Perkele-VII>
References: <2AA11887-2F82-48EF-BD45-4D85CFA83847@qut.edu.au> <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>
From: Eric Rescorla <ekr@rtfm.com>
Date: Fri, 26 Jun 2015 05:55:21 -0700
Message-ID: <CABcZeBMHim=qBw9L_PG3C4+E=N6n=AdV1AoWN+_19zi84cJJgQ@mail.gmail.com>
To: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Content-Type: multipart/alternative; boundary="089e011771a91044fc05196b43b1"
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/7aolwSWSlC_LoyIFL5ICl9LpRi0>
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, 26 Jun 2015 12:56:05 -0000

On Fri, Jun 26, 2015 at 1:50 AM, Ilari Liusvaara <
ilari.liusvaara@elisanet.fi> wrote:

> On Wed, Jun 17, 2015 at 09:35:14AM -0700, Eric Rescorla wrote:
> > On Wed, Jun 17, 2015 at 8:05 AM, Ilari Liusvaara <
> > ilari.liusvaara@elisanet.fi> wrote:
> >
> > > On Wed, Jun 17, 2015 at 05:56:23AM -0700, Eric Rescorla wrote:
> > > > On Wed, Jun 17, 2015 at 1:25 AM, Ilari Liusvaara <
> > > > ilari.liusvaara@elisanet.fi> wrote:
> > > >
> > > > > There's much newer version in ekr/tls13-spec#WIP_draft_06
> > > > > (seems to have fixed most of the mistakes in the original WIP)
> > > > >
> > > >
> > > > Don't worry, I'm sure there are plenty of mistakes left!
> > >
> > > Such as how keys for TLS exporters are derived?
> >
> > Quite possibly. Hence the WIP designation.
> >
>
> Reviewing it again after changes (e1219310a7f, Jun 25th):
>
> 1) xSS is used as direct input to HKDF-Expand, so one would presume
> it should be HKDF-Extract output (AFAIK, HKDF-Extract and HKDF-Expand
> are supposed to be paired). HKDF-Extract does not take label nor
> length.
>
> 2) Same as above for xES.
>
> 3) Same as above for master_secret.
>
> 4) Why does master_secret derivation take xSS and xES instead of
> SS and ES directly (especially if xSS and xES are supposed to be
> HKDF-Extract outputs)?
>
> 4) Why is finished independent of ES (IIRC, it did depend on it
> in earlier version)?
>

i'm going to refer these to Hugo, as they were his suggestion.



> 5) Application data uses xES as secret. AFAICT, leads to an attack.
> Should be master_secret (IIRC, was that way in earlier version)?
>

This is a typo. Will fix.  Remember, this is a WIP branch. :)

With that said, I'd be interested in hearing what the attack is.


6) I think the key table should refer to inputs by their proper
> names, not e.g. referring to "xES" as "ES" when there is another
> thing named "ES" (that's confusing even with a note).
>

Typo. Willdo.


7) I think there should be helper function defined to do the
> label zero-padding, instead of it being just a note (just for
> clarity).


Hmm... Can you suggest text? Do you think we should do this
for the signature context as well?

-Ekr



>
> -Ilari
>