Re: [TLS] 0-RTT encrypted data limits

David Benjamin <davidben@chromium.org> Thu, 01 September 2016 15:46 UTC

Return-Path: <davidben@google.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 87A4312DA5F for <tls@ietfa.amsl.com>; Thu, 1 Sep 2016 08:46:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.247
X-Spam-Level:
X-Spam-Status: No, score=-3.247 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-0.548, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=chromium.org
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 8VyQf8FTFeLJ for <tls@ietfa.amsl.com>; Thu, 1 Sep 2016 08:46:32 -0700 (PDT)
Received: from mail-it0-x22e.google.com (mail-it0-x22e.google.com [IPv6:2607:f8b0:4001:c0b::22e]) (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 37CCA12D15E for <tls@ietf.org>; Thu, 1 Sep 2016 08:46:32 -0700 (PDT)
Received: by mail-it0-x22e.google.com with SMTP id i184so76155666itf.1 for <tls@ietf.org>; Thu, 01 Sep 2016 08:46:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SpuJKuz6bIxENsoJqMUqxTBMXAYJInFTrDgEkzHR5FY=; b=cUeWzZX7jWVsOEJzeIX3EPY41sIhcuA9m/dhRmzymCyP9DyNtwix4xNBl8npSgCj3p p8ixybdy4O1XF8Z5U9GH8kvQx5cvhToZ02AOjfNcMu+HYIQYHe4HC+3z2iXykk93n9Gf DTkBYK/xEv2xElebqYvIX2l3NTlYCDLHnTabo=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SpuJKuz6bIxENsoJqMUqxTBMXAYJInFTrDgEkzHR5FY=; b=hoUfmKqMkcVsxNJi2vUPvNGrJWDReR4iZL2cbMa8/JewO7L18u7lamnr0acmQpLFFR Jw6pPEGFAi6hGPmz9ItqOE0mBPpPCxJSbOw4OMArlIL4p0YYFSjNct5Ql+ske2kiYdyg UpYeidKkg0T6RR8Dh/h8E7SXfobws08wCi4CY33iWMWxmh5reptx2FW2IsZfswjnNJQ7 TvwcZm0tXNNh32Be3ZMcuPn7m9Vmv2BoVLSIHvxTeOugIwTJEC+WAtRGMtOP/uWHCAE+ VmqgWRGjhWHM1PARogOuos3d5+n6NHRyVhosPJG/PFgUNWVXntwjxvv2wX5D3sQI2SUG Rcgg==
X-Gm-Message-State: AE9vXwMcEQFZfak5bUwb2hI0hyerTzJjAScO6a0GdTi2fUPMc9XRH3GqPK7D8JWvi+QsQYgbdNNfYdNQgVn1l5p4
X-Received: by 10.36.41.205 with SMTP id p196mr42577018itp.76.1472744791296; Thu, 01 Sep 2016 08:46:31 -0700 (PDT)
MIME-Version: 1.0
References: <6918283.boJRZ9WqjH@pintsize.usersys.redhat.com> <CABcZeBMOyM2v3gt69gHzfW7k5w=OwFqCUiER-bPERfNkLGhpWQ@mail.gmail.com> <6822534.tPWjKYA1SU@pintsize.usersys.redhat.com> <CABcZeBN_TPyYD63u4t41SKn-T6ugZdpxgM8i7-tJ82tU13+yUA@mail.gmail.com> <20160901131521.rjw3jebdjwwizp2z@LK-Perkele-V2.elisa-laajakaista.fi> <CABcZeBMUA8tzsPr_6pC6kRzhPifxuz4YjSRo1KB2V52SiGWstw@mail.gmail.com> <CAF8qwaCwqydWk30875=p1p2NkK+Ju+NtVL6meybYESN6GxCSJw@mail.gmail.com> <20160901152203.hivko6qm2jdguqc6@LK-Perkele-V2.elisa-laajakaista.fi> <CABcZeBM3sk9ROXnnYNdOtcD5T7U68bSBeEbaUzroRUoNOykqrQ@mail.gmail.com>
In-Reply-To: <CABcZeBM3sk9ROXnnYNdOtcD5T7U68bSBeEbaUzroRUoNOykqrQ@mail.gmail.com>
From: David Benjamin <davidben@chromium.org>
Date: Thu, 01 Sep 2016 15:46:20 +0000
Message-ID: <CAF8qwaAs=EkfVDeT-n_tGYGzec4-OqAY96b2gNryYjNU0Y9Kiw@mail.gmail.com>
To: Eric Rescorla <ekr@rtfm.com>, Ilari Liusvaara <ilariliusvaara@welho.com>
Content-Type: multipart/alternative; boundary="001a113f6d5e21c21b053b741e21"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/qCo0ANNbinAYtDly8nRcgwoAT1g>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] 0-RTT encrypted data limits
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: Thu, 01 Sep 2016 15:46:36 -0000

On Thu, Sep 1, 2016 at 11:25 AM Eric Rescorla <ekr@rtfm.com> wrote:

> On Thu, Sep 1, 2016 at 8:22 AM, Ilari Liusvaara <ilariliusvaara@welho.com>
> wrote:
>
>> On Thu, Sep 01, 2016 at 02:29:00PM +0000, David Benjamin wrote:
>> > On Thu, Sep 1, 2016 at 10:01 AM Eric Rescorla <ekr@rtfm.com> wrote:
>> >
>> > > On Thu, Sep 1, 2016 at 6:15 AM, Ilari Liusvaara <
>> ilariliusvaara@welho.com>
>> > >>
>> > >> Should there be recommendation for clients to cut transfer and send
>> > >> Finished if the client receives EncryptedExtensions without
>> > >> early_data extension?
>> > >>
>> > >
>> > > I thought that was implicit, but i'd take a PR that did that.
>> > >
>> >
>> > (s/EncryptedExtensions/ServerHello/, but whatever.)
>>
>> According to the table it is EncryptedExtensions (but there have been
>> errors in it before)...
>>
>
> It goes in EE, because it should be encrypted.
>

Hrm. Most of the text currently says ServerHello, except for the table
which says EncryptedExtensions.

ServerHello:
https://tlswg.github.io/tls13-spec/#rfc.section.4.2.6
https://tlswg.github.io/tls13-spec/#rfc.section.2.3

EncryptedExtensions:
https://tlswg.github.io/tls13-spec/#rfc.section.10

I'm a little wary of putting something that tells you the handshake "shape"
in EncryptedExtensions. Accepting early_data comes with a host of
constraints  the client must enforce like ALPN not being allowed to change,
etc. But I think all the current constraints are with EncryptedExtensions,
so maybe it's fine?

(The failure mode for getting this wrong is a risk of serious
implementation complexity and bugs, similar to why client
EncryptedExtensions was a problem. E.g. if ALPN were in SH but early_data
in EE , there would be a window of time where we have a new ALPN but aren't
sure if it's a 0-RTT reject or fatal error. It makes things a mess.)


> > At this point the client must do much more than cut transfer anyway. It
>> > probably should be phrased as starting over and retrying or so.
>> Everything
>> > sent has been rejected and all you thought you knew about the connection
>> > may have changed, like ALPN. At sufficiently high layers, you should
>> > probably just pretend you got a fresh connection and are repeating the
>> > request (or whatever) from scratch.
>>
>> So server is supposed to continue on 0-RTT fail, but not client?
>
>
> There are plenty of scenarios where the client can continue. For instance,
> if the server has forgotten the ticket but is otherwise unchanged.
>

Right, I mean it's a logical starting over. I imagine most cases one can
keep affinity with the old transport socket just fine, but data does likely
need to be reset. (Although in some cases you can't.)

David


> -Ekr
>
>
>>
>> -Ilari
>>
>
>