Re: [TLS] Finished stuffing/PSK Binders

Eric Rescorla <ekr@rtfm.com> Sun, 09 October 2016 15:51 UTC

Return-Path: <ekr@rtfm.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6FA0212956E for <tls@ietfa.amsl.com>; Sun, 9 Oct 2016 08:51:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=rtfm-com.20150623.gappssmtp.com
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 O1IEAAYz2tmy for <tls@ietfa.amsl.com>; Sun, 9 Oct 2016 08:51:17 -0700 (PDT)
Received: from mail-yw0-x22a.google.com (mail-yw0-x22a.google.com [IPv6:2607:f8b0:4002:c05::22a]) (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 13107129459 for <tls@ietf.org>; Sun, 9 Oct 2016 08:51:17 -0700 (PDT)
Received: by mail-yw0-x22a.google.com with SMTP id w3so30956846ywg.1 for <tls@ietf.org>; Sun, 09 Oct 2016 08:51:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Sc1eActxoAFVl/nkRTUIwhzLJ0k63RGA1zZO/QMwW4g=; b=sK0kxLPl8u0q2sPxNxoqmDHOLslYCT9aAlxHLCjMstOgQfcnXT8ZUVIVaof2i3cRP+ fNX7lJdLJg72ukSI+uU4Vszo6x2rImJAgixXKyDdOqP65Q/jZfGg3HUhb+ACVNzkUEmT +sFbbtsN7Ku+LkGVDd4bmT68LAB4IkQl3haOaJqmk8iUqKkrGyOFe5GyNlmP2y88KV9v cpf6VGRuUWLj2lM/LMfSofJ6H6QxvlTVM7iqsgxRJ/Jt+nnhf897TiKAUk8j5/DjZqMZ QhHJJZwmHIhYj11j25IHSulwepZPovmBfA7FeNAvQ7On1lYyh7sm4t8MuGUvgeRHvp2s yzUQ==
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; bh=Sc1eActxoAFVl/nkRTUIwhzLJ0k63RGA1zZO/QMwW4g=; b=OJsK4NeL5wDmLeHRR06HNfZUI2MLK3lLObIxyma1B5l6ZihuYNesYa0cAHAuvJfatk bkBre0hnn0hNlrbA6aZt1il6o9/85kPStiQXWZJGmGYEr7S/hmaC/wS8dDZWri4RyK1f 0JIXrMxlPR8tUyCVQM7754Q62HbtSPASrQer+fElK/GqHE3Xe2SA2wvfQMTs746JCheG 9AyyQZqWEhiGZ78JaN4Y32f8zphltvJqxj7OArSB6kxXVS340ZMWb0N1F7A0+T9qSUWw W8gr3w76aGGc4UuKraa1D9qzJChsEQNwRk0HAJtaHdPc22DtfXel8ystr7wXKe1tzyDF +5FQ==
X-Gm-Message-State: AA6/9RkOHeDMvhXI/I5cPOyQMkTZ4/lw2zuz1s7JwpE9WTjCJs1aotJlu0zVcp60mrN6Okcre3Tt3fjR238ctQ==
X-Received: by 10.129.86.131 with SMTP id k125mr23993877ywb.21.1476028276350; Sun, 09 Oct 2016 08:51:16 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.129.75.212 with HTTP; Sun, 9 Oct 2016 08:50:35 -0700 (PDT)
In-Reply-To: <20161009154455.GA13453@LK-Perkele-V2.elisa-laajakaista.fi>
References: <CABcZeBOJPz8DY92LE6531xbRYLU-Wvkqeb-vTX59gU5rYcp+Ww@mail.gmail.com> <20161009135817.GA13000@LK-Perkele-V2.elisa-laajakaista.fi> <CABcZeBNjVbFinq8oH5UrQRSa6FpGBiOXj8WB_X0PncZvz49zDA@mail.gmail.com> <20161009154455.GA13453@LK-Perkele-V2.elisa-laajakaista.fi>
From: Eric Rescorla <ekr@rtfm.com>
Date: Sun, 09 Oct 2016 08:50:35 -0700
Message-ID: <CABcZeBN40gO8g_n=ATyxDbj+05r6w5A5uQuLnDzQAZcRrmDDEA@mail.gmail.com>
To: Ilari Liusvaara <ilariliusvaara@welho.com>
Content-Type: multipart/alternative; boundary="001a1143312c175ca0053e709d74"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/qu0ePRpo7zEHcP6rWDJww9D1u6Y>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Finished stuffing/PSK Binders
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.17
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: Sun, 09 Oct 2016 15:51:19 -0000

On Sun, Oct 9, 2016 at 8:44 AM, Ilari Liusvaara <ilariliusvaara@welho.com>
wrote:

> On Sun, Oct 09, 2016 at 07:10:59AM -0700, Eric Rescorla wrote:
> > On Sun, Oct 9, 2016 at 6:58 AM, Ilari Liusvaara <
> ilariliusvaara@welho.com>
> > wrote:
> >
> > > On Fri, Oct 07, 2016 at 08:01:43AM -0700, Eric Rescorla wrote:
> > > > After the discussion on PR #615, I took another pass at this with
> some
> > > > help from the research community. Please see:
> > > >
> > > >    https://github.com/tlswg/tls13-spec/pull/672
> > > >
> > >
> > > Also, an observation: This seems to interact in somewhat annoying way
> > > with stateless HRR.
> > >
> > > Basically, CH reconstruction no longer works properly, so one needs to
> > > have a  freezeable PRF hash (and most implementations of hashes can not
> > > be frozen).
> > >
> >
> > I've been coming to the conclusion that CH reconstruction is a bad idea.
> > It's
> > tricky to get right and in the common case involves a lot of bloat in
> the CH
> > (because of duplicating the Key Shares). I think we would be better off
> just
> > removing it and replacing (rather than appending to ) KeyShares in HRR.
> > This was primarily intended as an attempt to avoid the need to continue
> > the hash in any case.
> >
>
> That creates a bit of a edge case, where the server might need to pull
> client's share accross retry.
>
> (Since if group is OK, the group is not included in HRR, which presumably
> causes the client to blank its KeyShare).
>

I think we would change that rule, probably.

-Ekr


>
>
> Also, doing some size calculations:
>
> ClientHello with "smallest group" rule is ~200 bytes with reasonable
> parameters (I got a dump of one TLS 1.3 draft-16 CH from my TLS stack,
> it is 265 bytes, but would be 196 with "smallest group" rule).
>
> The amount of space needed to freeze (octet) SHA-256 is 32+63+8=103
> octets. And the space needed to freeze (octet) SHA-384 is 64+127+16=207
> bytes (for full SHA-256 and SHA-384, add one more byte).
>
> So if selecting ciphersuite using SHA-384, the state size might be
> comparable to ClientHello size.
>
>
> -Ilari
>