Re: [TLS] RFC 6066 - Max fragment length negotiation

Eric Rescorla <ekr@rtfm.com> Wed, 22 March 2017 01:02 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 6639E1292F4 for <tls@ietfa.amsl.com>; Tue, 21 Mar 2017 18:02:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 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_NONE=-0.0001] 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 lpwaPFBLniKe for <tls@ietfa.amsl.com>; Tue, 21 Mar 2017 18:02:31 -0700 (PDT)
Received: from mail-ot0-x22c.google.com (mail-ot0-x22c.google.com [IPv6:2607:f8b0:4003:c0f::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 1FD391287A3 for <tls@ietf.org>; Tue, 21 Mar 2017 18:02:31 -0700 (PDT)
Received: by mail-ot0-x22c.google.com with SMTP id i1so162139015ota.3 for <tls@ietf.org>; Tue, 21 Mar 2017 18:02:31 -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=pWAfZRVEOUTgOCdNIw8htyzp1LEaRCU0ca9G5brh5gg=; b=HPiwXzxkbuqRK6TvluB+SQ5Lo/dKKQxVDzq/S9E6h0dqx9RbNWCXiVHIA9+z+vAq39 vB6uUWkOGiUwfyxhMTXFfa7+Ce7A8UytqoS3Opo25cP1N2f7bu3OmVRw38PffhFW4ROr 6UbXEsaudRgWYLl8KGceB+fgfg6mLI4eVeQvLyh9pcJNnnHBBVfiXCfXFF0vtprgI9Wg C6kiKx8UGXu+0KyqC8tLmOOt4UAOTHiWw8FjKlpDkrYHzjODZaZTk1TTFNJvtZ4hseWO xtAg+p0+FNPZwre7bQ3t2U7vBSf2+tfFh0vnYZ1a7QTjIxgAAOi4uTGuMO9rPJ1IEmrt Ae9Q==
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=pWAfZRVEOUTgOCdNIw8htyzp1LEaRCU0ca9G5brh5gg=; b=Kek6Ybyf41rj184IrqkRwPsDOPlws1sz5iFmzdEJA1jBpcDuCy7649EwHpnHXwG1Bg hyhTic/dlW1KAxHlW41CQNAa97JQ2NdLZ3X+rIPsk8fT38pbwLERJm16FdNBcAXbJ5gP jpLOskB8pCb9m02Yqma4qRj6eF0315SJo9DtdHTxhKeKtAUNFDdeGXHU6I1sRqKIC0Hm DVgilXJwn/E0ndVwbBHbZqc8Z5IKhJYkSIT0wksFPNKbQ6z/SIWVF2cgLTjwgDo/LH76 xIzHPZaHMpspR+wAVXeSbe9lygUvtKVmh92DNEVWMuBQjpJ/i/8lgNgBw3+X2qt58ejr MiyQ==
X-Gm-Message-State: AFeK/H339K3x3MsfKNTMA1aFZOAiKCgvxNGbcvKJWBesKVxWw5ImuHAS27stwLChpmO9ivvp4XGJ76kT6GdwdA==
X-Received: by 10.157.46.133 with SMTP id w5mr18569395ota.78.1490144550516; Tue, 21 Mar 2017 18:02:30 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.157.13.167 with HTTP; Tue, 21 Mar 2017 18:01:49 -0700 (PDT)
In-Reply-To: <CABkgnnVAaySsBhvmLSrHJ7D2SK+-mK5=--ZiZ-SapaY9HvYBmA@mail.gmail.com>
References: <CAD8WAomJLs4hdaso9hT036=UORjT9=H5-oCHbdSofuv++n3rYg@mail.gmail.com> <1489706298995.98317@cs.auckland.ac.nz> <855C5079-FDA7-4E68-AE29-1E9605B495D7@broadcom.com> <1489707933992.42551@cs.auckland.ac.nz> <CABkgnnVRZBwXHZ6w=gX9pykNpXp80OLP1pe-VMg-uO-C6O8yEQ@mail.gmail.com> <1489710142144.88978@cs.auckland.ac.nz> <CABkgnnXiB5ksGbbPqDP3D=FVdQu9ht0vD8-T-5HTaEKQQE4+9w@mail.gmail.com> <1489721710740.52293@cs.auckland.ac.nz> <CABkgnnWq_5e8TJgJV+okqi6vo-_5=811pOZRtUCp0TD07SmNoQ@mail.gmail.com> <CABkgnnW=Pz+6M8UYoB+MTY8rQp9vsHyh6aqiSb3EbTT_BdWokA@mail.gmail.com> <20170321131514.GA9342@bolet.org> <1490103123694.3164@cs.auckland.ac.nz> <CABkgnnX1_YvbVb-FXjGe1jCuEjGxiaQ8WFuZGyuu0puNU+4ABQ@mail.gmail.com> <CABcZeBOSuezVLo_QjW+ZChOvPE0EWaN7aFCEpQbbR__GHoxpvA@mail.gmail.com> <CABkgnnVAaySsBhvmLSrHJ7D2SK+-mK5=--ZiZ-SapaY9HvYBmA@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Tue, 21 Mar 2017 18:01:49 -0700
Message-ID: <CABcZeBOt-EtCUTr6kyqpb9muCB_-q8XhKX1dNCQ_4Ukx7UV5kw@mail.gmail.com>
To: Martin Thomson <martin.thomson@gmail.com>
Cc: Peter Gutmann <pgut001@cs.auckland.ac.nz>, "tls@ietf.org" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="001a1135bf5298ff55054b475077"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/Whuv44-IOZ3CQGCNEnae17VCb3Q>
Subject: Re: [TLS] RFC 6066 - Max fragment length negotiation
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: Wed, 22 Mar 2017 01:02:32 -0000

On Tue, Mar 21, 2017 at 5:44 PM, Martin Thomson <martin.thomson@gmail.com>
wrote:

> On 22 March 2017 at 11:09, Eric Rescorla <ekr@rtfm.com> wrote:
> > Couldn't you just use the maximum expansion you support (which
> > ought to be 16 for TLS 1.3).
>
> That leads to the same problem that we're trying to avoid, namely that
> your usable space goes through the floor.
>

I'm not quite sure I'm following. In the extension we say "You can send up
to X bytes"
and X can either be expressed in plaintext or ciphertext bytes. If we
express it
in ciphertext, then senders can totally safely marshall up to X - E_max
bytes of plaintext
where E_max is the maximum expansion of any cipher suite they support.

The maximum amount of wastage in this case is E_max - E_min where E_min is
the minimum amount of expansion of any cipher suite they support. If E_min
== E_max,
then this is fine (because you can just advertise X + E_max to hit a target
of X).

What am I missing?

-Ekr


>
> >> When compression is enabled, I can't imagine
> >> what it would do.
> >
> > I feel like we could ignore this, and just say "don't do compression"
>
>
> Already done, in the spec.  But not the code :(
>