Re: [TLS] The case for a single stream of data

Eric Rescorla <ekr@rtfm.com> Sun, 07 May 2017 00:56 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 5B42C129411 for <tls@ietfa.amsl.com>; Sat, 6 May 2017 17:56:02 -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 nasW7P5bssqG for <tls@ietfa.amsl.com>; Sat, 6 May 2017 17:56:00 -0700 (PDT)
Received: from mail-yw0-x230.google.com (mail-yw0-x230.google.com [IPv6:2607:f8b0:4002:c05::230]) (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 B9AFD128C82 for <tls@ietf.org>; Sat, 6 May 2017 17:56:00 -0700 (PDT)
Received: by mail-yw0-x230.google.com with SMTP id b68so16861955ywe.3 for <tls@ietf.org>; Sat, 06 May 2017 17:56:00 -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=Jm6u9TxAQhVvFvr7ZotgMvGefGJVYmc3rMyHtzYL3aU=; b=O9dQfSmdM20aBFmaBCLEIbaVOqSoXSQxFSN9VjQ2fnis9daenkjhwEzCY5NiaV5sJ7 /Bti0Gr8xEXu7DuuoLh+mz2lDrDWRghKraplgoZBduwOVRYP48/gTnYZLM3/HKX6dSHk hvu4tGxtKD4vhgOZ87pZ3hQY/H68fUdiN9/HHgp9zbt3ZejLtLcm5ER/i4IvvBS5KOBZ vTN7tuhwOfimaRiIDMsTgtL1Wp8akjBxt099JZbbKFkU/mHcJvaqzm5wvczzuQ7K/wpw LNc8IxCk8QbVdkctAcSbZJJGn3ZLnSiUay9MYEeM/4zSvoZPo0iHTrc/NRZDLu6iBcDr xJIQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Jm6u9TxAQhVvFvr7ZotgMvGefGJVYmc3rMyHtzYL3aU=; b=hnCxI3HHQrl59EUVDryAL2uvo5LxE9onp9lG0Domrs18uwY9JGao/xefcojYvdFYd7 FVJZ0XHaYjnNd40Z+eTOXNukTqcUVcVG1rkRoP7awxRB+EC1uJzzyaMZLkGw0DWOd8rS Iw56V3F88OTvb84++XQ8wmIq2QBPD1cK+9ekJ0y00G/afTBALIE5kvlMuNpQcf1V3i7z KL1keOIRIsa6xorTcUpkBIjvxn9elu1Fs4lPyDHG6WOIcoqpZO+mHyInovmMt+sQQKKs YqZX5GCmrcZfP8349Zmy92uHSHARUA2wvt6Weo3tjq4W8pje+45dPyw9dIe3Ch91Q5bw HIWQ==
X-Gm-Message-State: AODbwcDaNm9IcDah0ZJrtXuV41/brdSfNAiZyG6EeKBjHGDnzoQ0EktY 3pzK4Bf6dEoSi857fk83xuah9ZyumQ==
X-Received: by 10.129.85.83 with SMTP id j80mr6944032ywb.283.1494118560007; Sat, 06 May 2017 17:56:00 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.129.131.150 with HTTP; Sat, 6 May 2017 17:55:19 -0700 (PDT)
In-Reply-To: <CAJU8_nWPtNM=OJ911VbbkbpqHt=yBDRsh7QW6veZ=FWKMZDYdQ@mail.gmail.com>
References: <CAAF6GDfm=voTt_=JrdGtiaYby1JG8ySU2s6myjjpHKeGvi0bMg@mail.gmail.com> <879211b6670148a19b816018664324f2@usma1ex-dag1mb1.msg.corp.akamai.com> <CAJU8_nXxNrSj4L+Ab+ENOgWaVhmn6Lt5eRUQOtPFfBCYqTOJeA@mail.gmail.com> <20170506151208.GA4491@LK-Perkele-V2.elisa-laajakaista.fi> <CAJU8_nWPtNM=OJ911VbbkbpqHt=yBDRsh7QW6veZ=FWKMZDYdQ@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Sat, 06 May 2017 17:55:19 -0700
Message-ID: <CABcZeBM+rrUg-fdQsRXV+AvSBMJnKXFeKTyxd+Dc9RGHwnLU3w@mail.gmail.com>
To: Kyle Rose <krose@krose.org>
Cc: Ilari Liusvaara <ilariliusvaara@welho.com>, "tls@ietf.org" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="001a113f3cbe05e666054ee496dd"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/vVR7icf9zI9Jb06r33cjX5iXnUU>
Subject: Re: [TLS] The case for a single stream of data
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.22
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, 07 May 2017 00:56:02 -0000

On Sat, May 6, 2017 at 4:54 PM, Kyle Rose <krose@krose.org> wrote:

> On Sat, May 6, 2017 at 11:12 AM, Ilari Liusvaara <ilariliusvaara@welho.com
> > wrote:
>
>> On Sat, May 06, 2017 at 09:43:55AM -0400, Kyle Rose wrote:
>> > I asked this question a while back, and didn't get a satisfying answer:
>> if
>> > an on-path attacker replaces the early data with a replay from an
>> earlier
>> > connection, does the server eventually figure this out once the
>> handshake
>> > is complete, or is this mix-and-match impossible for the server to
>> detect?
>> > It would be nice if a security property of early data is that a replay
>> > attack is eventually detected, because at least then you'll know you're
>> > under attack.
>>
>> Trying to replace the early data leads to fatal handshake error if the
>> server accepts 0-RTT (since actual deprotection failure from 0-RTT data
>> is fatal). If server rejects, then the substitution is silently ignored.
>>
>
> I'm not sure this completely answers my question, so let me propose where
> I think protection lies.
>
> If the on-path attacker replaces only the early data bytes, deprotection
> of early data will fail since the early traffic secret incorporates the
> ClientHello in its derivation, which includes a (presumably) fresh client
> random.
>

Correct.


If the on-path attacker replaces the entire first flight (or at least
> ClientHello and the early data), the early data may be accepted but the
> subsequent handshake will fail because the client and server will derive
> different handshake traffic keys.
>

Correct.

-Ekr


>
> If this is accurate, then replays of partial requests don't really pose a
> problem (at least for HTTP) because the remainder of the request will fail
> deprotection and so the request won't actually be delivered to the
> application.
>
> Kyle
>
>
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls
>
>