Re: [TLS] Add max_early_data_size to TicketEarlyDataInfo

Eric Rescorla <ekr@rtfm.com> Sat, 08 October 2016 23:01 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 C471C129400 for <tls@ietfa.amsl.com>; Sat, 8 Oct 2016 16:01:23 -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 U5M08sa1jInd for <tls@ietfa.amsl.com>; Sat, 8 Oct 2016 16:01:21 -0700 (PDT)
Received: from mail-yw0-x22c.google.com (mail-yw0-x22c.google.com [IPv6:2607:f8b0:4002:c05::22c]) (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 105BE129437 for <tls@ietf.org>; Sat, 8 Oct 2016 16:01:21 -0700 (PDT)
Received: by mail-yw0-x22c.google.com with SMTP id t192so31942848ywf.0 for <tls@ietf.org>; Sat, 08 Oct 2016 16:01:21 -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=8BmngXdHhmDXWq7Cpjef66jcyCsf0GZnyh3PASV6EPI=; b=tQ2PMb9XbIHiSeaodWCrttjFeDI+YgGw8C1QLekZSTBZKORrAtqIBF8Dl2eyw0AYEA /e9FuGRM3JF1WbdIGXH8YHbQWOCUFZAuZ3BfBQU8tyOCsbzN6MUTF/rtV9bU6/0E2vK2 YRmCPaznQvdOhPDYRoJsCT7im+W2MPRIG8PSfNoSSLmcLqICzzJPlzLFtguOKdaBLy79 i+KLN1nZ26MR4kyaUQwDO7y7l8KCraj6WDaDHFUpE1qcxxOeeCzbNJplW2LBcj21i6dQ NCG5y/yFlIi90fUmWypuLShkO/f+Mc5rjBQVWT+5SHVIuxOdrtIU+PYA4VH8qvq16xUx ZPYw==
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=8BmngXdHhmDXWq7Cpjef66jcyCsf0GZnyh3PASV6EPI=; b=dGCP2xenWxURGdg1j/POAmVmHByvyRD5SRRo4PekyNLrtfIKImrMan1GkBbqFD2X9o qryvjfAQovZyUuPbMlh79Pba4Kb9Pm4qwwfQpex/jnHu5guRn3aIfGnoIaUXTTiwYpZr 2Tbcyk99ezuPeF8D7VRQl8gg5UkktUmTCJfDqG9qnTuMi48RrJqXjdyFXVtNdno1j9Ru XTZD1ZPySiXk9nlV2Oiw/5DJOytMo4JxHwM9H6GMJMHNSvAieqo3XynKQcSEakHnh0VH Y3wPQU3+uY4JCWHOxZl5zzILzBRR+PQ8wI7WLODGqG8tyALObFdPpJwf1RY+NhsM9K4U DBHg==
X-Gm-Message-State: AA6/9RnialA170IVv1fVgaUYxPMwvZrX/AHRBUHwh7wf1PbaEoWE8n4O6pcc2Ze5xJ76uzPGGG4YbBhgQ9tYrw==
X-Received: by 10.129.60.10 with SMTP id j10mr22623835ywa.354.1475967680288; Sat, 08 Oct 2016 16:01:20 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.129.75.212 with HTTP; Sat, 8 Oct 2016 16:00:39 -0700 (PDT)
In-Reply-To: <CAF8qwaBhVdxyXUc=p0kFHrB=bfE7KaXf229nEfFh_uFSEiHTjw@mail.gmail.com>
References: <1475859457.3070375.749089329.59EED0F8@webmail.messagingengine.com> <82f39c83-0040-cf87-94ae-16c321eecc95@akamai.com> <CAF8qwaBhVdxyXUc=p0kFHrB=bfE7KaXf229nEfFh_uFSEiHTjw@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Sat, 8 Oct 2016 16:00:39 -0700
Message-ID: <CABcZeBNqD7xywry4sLoPFst15csBDu5Mu-bPR4XkXZ0irr=Dbw@mail.gmail.com>
To: David Benjamin <davidben@chromium.org>
Content-Type: multipart/alternative; boundary=001a1142702648d502053e6281d0
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/MMB2IX3s_n8UCAWwoibLuW7FfDg>
Cc: Filippo Valsorda <filippo@cloudflare.com>, aaspring@umich.edu, Filippo Valsorda <ml@filippo.io>, "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Add max_early_data_size to TicketEarlyDataInfo
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: Sat, 08 Oct 2016 23:01:24 -0000

I agree that this is a good idea. Absent objection, i'm going to merge this
PR on Monday

On Fri, Oct 7, 2016 at 3:06 PM, David Benjamin <davidben@chromium.org>;
wrote:

> We were also expecting to want to bound how much traffic a server could be
> compelled to skip over without making progress. It actually didn't occur to
> me we could let the client know the bounds, rather than just making up a
> conservative bound (there's only so much data you can get into an RTT) and
> hoping nothing breaks. That's a good idea.
>
> Units is a little interesting. For those purposes, this limit would kick
> in whether or not the early data could be decrypted, so the server-side
> limit would be measured in ciphertext, possibly even including record
> headers. (Although any inaccuracies in converting could be done by just
> advertising an underestimate and breaking peers that send pathologically
> silly things like all one-byte records. So it doesn't matter much.)
>
> On Fri, Oct 7, 2016 at 5:45 PM Benjamin Kaduk <bkaduk@akamai.com>; wrote:
>
>> On 10/07/2016 11:57 AM, Filippo Valsorda wrote:
>>
>> Hello,
>>
>> Cloudflare's current (not definitive) plan for 0-RTT is essentially to
>> decide whether or not to answer to requests in the 0.5 flight on a
>> case-by-case basis. That obviously requires reading all of them and
>> caching the ones we don't want to answer.
>>
>> To mitigate the obvious DoS concern we plan to use the ticket age and a
>> per-machine replay cache.
>>
>> However, chatting with Drew (cc'd) we realized that clients could still
>> send huge amounts of 0-RTT data that we would have to buffer. Once a
>>
>>
>> Well, "have to" is perhaps a bit of a stretch; the client should be
>> prepared to cope reasonably if you abort the connection arbitrarily.
>>
>
> I think the concern is that a well-meaning client may not necessarily do a
> retry here and instead read this even as a network error. And if it did,
> the next attempt, if there is still a 0-RTT-able ticket available, may hit
> this again anyway...
>
> client sent early data, there's no way to accept only a part of it or to
>> verify that the client is not replaying before reading it all. But if we
>> were to close the connection after a given amount of data we risk
>> failing connections from legal clients.
>>
>> I propose to add a field max_early_data_size to TicketEarlyDataInfo, to
>> inform clients about the maximum amount of 0-RTT data they are allowed
>> to send, allowing servers to safely terminate connections that exceed
>> it.
>>
>>
>> But this seems like a good idea; I left a couple of ~editorial notes on
>> github.
>>
>> -Ben
>>
>>
>> https://github.com/tlswg/tls13-spec/pull/674
>>
>> [Please keep me in the CC of replies]
>>
>> _______________________________________________
>> TLS mailing listTLS@ietf.orghttps://www.ietf.org/mailman/listinfo/tls
>>
>>
>> _______________________________________________
>> TLS mailing list
>> TLS@ietf.org
>> https://www.ietf.org/mailman/listinfo/tls
>>
>
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls
>
>