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

Martin Thomson <martin.thomson@gmail.com> Fri, 17 March 2017 03:49 UTC

Return-Path: <martin.thomson@gmail.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 3883A129BD7 for <tls@ietfa.amsl.com>; Thu, 16 Mar 2017 20:49:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 SMFa25K3d1A0 for <tls@ietfa.amsl.com>; Thu, 16 Mar 2017 20:49:40 -0700 (PDT)
Received: from mail-qt0-x22f.google.com (mail-qt0-x22f.google.com [IPv6:2607:f8b0:400d:c0d::22f]) (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 AEA50129BCA for <tls@ietf.org>; Thu, 16 Mar 2017 20:49:40 -0700 (PDT)
Received: by mail-qt0-x22f.google.com with SMTP id r45so53940607qte.3 for <tls@ietf.org>; Thu, 16 Mar 2017 20:49:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=TgiuJZ1xGiIBPaEIjdo+lQmzvG66Rx/YSgK5okUgdwE=; b=CIzUAhx1J8KogZgR5/fBLdj/FLMBTlcYhpC85n3wKdzJvgidfhfriapGHvMn5mKbG9 ptJwWMSHrdYkQnFWCFX23MTBu6PAojCM546QCL6KmqFoUaEBW94yMwmw4+gEPlfBF72n zZddC5GFgAzWDJc1Z1hC0BeM01FMtx7EbyVoH1XXqPZfbOFAmqquh+AMOC9tjZ2ipafH 9nlnpEGKB5adM3zwNV4mz8ncRU11F65mieXAjoSqACV/YYFBVI3yn/lysYczQZ/DfRtY 3QrG50p+v33a+PHvprtwXpEsxF0jcQ5mNvpT2Lu4sb7m0sdygPpU3mP6LvgXmAD0kMDr ukSA==
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=TgiuJZ1xGiIBPaEIjdo+lQmzvG66Rx/YSgK5okUgdwE=; b=l08n3l23gUTVw+kp4ubHStoR/j4t0KB3lmMW4xVp+z18ZO8XHvNi+lT7HhQ6q6E6O7 AtW9Fajo9b9H4dJtSdXo+QpuP2z56MZ0seIHbMoxKa0vhdomNPEMtsGjGk6ofBPfLA6s oK6EAGtWJ25voJO5aZhq8iR7HDykiZFZSn5tJ6aenhsR4Zmp5/Gz/TfnwH374/iN7JfO H2WoOS8bYaOZtv7C40uYWSlqSCFx6AWjYzhjVhC22jDgVfbJWj8ELeRFkLxRw0m+uy/y yjUviCi2QeN1Nf2qgWN305cRsPY6KD4DMwWpHBisfEXvOvjm9d8BKb11J+S1PBjgHpol oOSA==
X-Gm-Message-State: AFeK/H23P6icf1yFORmg5bsyhVEkPLy/6F1Vxf+Kyf3CaY7uRVFLb6AVEkbde1oovqKpwva2diwv3Wx88i5Z/g==
X-Received: by 10.237.41.100 with SMTP id s91mr12641668qtd.143.1489722579930; Thu, 16 Mar 2017 20:49:39 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.140.27.194 with HTTP; Thu, 16 Mar 2017 20:49:39 -0700 (PDT)
In-Reply-To: <1489721710740.52293@cs.auckland.ac.nz>
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>
From: Martin Thomson <martin.thomson@gmail.com>
Date: Fri, 17 Mar 2017 14:49:39 +1100
Message-ID: <CABkgnnWq_5e8TJgJV+okqi6vo-_5=811pOZRtUCp0TD07SmNoQ@mail.gmail.com>
To: Peter Gutmann <pgut001@cs.auckland.ac.nz>
Cc: Nitin Shrivastav <nitin.shrivastav@broadcom.com>, "tls@ietf.org" <tls@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/SQFTl98XbJxqKVUe_t4_w4iEFNE>
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: Fri, 17 Mar 2017 03:49:42 -0000

On 17 March 2017 at 14:35, Peter Gutmann <pgut001@cs.auckland.ac.nz> wrote:
> Why is it badly designed?  I can guess that some people would prefer to have a
> mechanism for client and server to debate endlessly what the most cromulent
> fragment size is, but that's about the only thing I can see.

I looked at implementing this for NSS with the idea that I would try
to be nice to embedded servers (because web servers are constrained
devices too).

I can't send a max_fragment_length extension that says I support
records of 2^14 octets in length.  Because I don't care and full-sized
fragments are valuable to me in some cases, but if a server is
constrained, it would be no trouble to send it smaller records.

And I can't fix that.  If I send a max_fragment_length extension with
a value other than the four values defined in RFC 6066, all I get for
my troubles is an "illegal_parameter" alert from any server that
implements the RFC correctly.

The design I would use is much simpler.  The extension would carry a
two octet value that is the maximum size of the plaintext that the
endpoint is willing to receive.  A client could say 2^14 and that
would allow the server to send that much if it were able.  The same
server could say 5 and the client would be forced to fragment like
crazy (ok, that last might be too far, we'd probably want to set a
lower bound on the value).

I'd happily implement and advertise that extension.