Re: [TLS] I-D Action:draft-ietf-tls-rfc4366-bis-09.txt

Nikos Mavrogiannopoulos <nmav@gnutls.org> Mon, 14 June 2010 07:46 UTC

Return-Path: <n.mavrogiannopoulos@gmail.com>
X-Original-To: tls@core3.amsl.com
Delivered-To: tls@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id CC3D53A67A3 for <tls@core3.amsl.com>; Mon, 14 Jun 2010 00:46:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.923
X-Spam-Level:
X-Spam-Status: No, score=0.923 tagged_above=-999 required=5 tests=[BAYES_50=0.001, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tCKO2Dt6S3GG for <tls@core3.amsl.com>; Mon, 14 Jun 2010 00:46:18 -0700 (PDT)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id A11423A6403 for <tls@ietf.org>; Mon, 14 Jun 2010 00:46:18 -0700 (PDT)
Received: by wwc33 with SMTP id 33so3490271wwc.31 for <tls@ietf.org>; Mon, 14 Jun 2010 00:46:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=UcXJRG/UhfyUUBlUBvJOrsbAaJ6DrL7gHl8aoEA2WpY=; b=LPyBDytF1DjjzfFJLyH4XhgcMcuH0Gm8Cnv1X6vbumbh9dsMusXHF9trdARM2JMhVs flznkvGdRexJ1sNyf5/8/RchDkEd9wnsJWCW11+26zogojhGXno6JAZV9Mf0W8ajetIz ZLrkxchdLu4DPn+EL2JyHw4nnqKgH8Hmovuw4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=G9fXg6+7QngWxAj4bXkeOW1asrR6z76gpzsf7mNyjyxSniDMNgVXgULUzDX2iAjFEy CE64XIUq1AIrYQm98/6rbAd0o7989BtZmhXok/GBbvA8QR69A7cdd2GrhOPKn4QtT2uB LglulziONliE/M9GXVfgDNwt5c2VBO5rZP3+4=
MIME-Version: 1.0
Received: by 10.216.159.20 with SMTP id r20mr2022958wek.62.1276501578829; Mon, 14 Jun 2010 00:46:18 -0700 (PDT)
Sender: n.mavrogiannopoulos@gmail.com
Received: by 10.216.160.147 with HTTP; Mon, 14 Jun 2010 00:46:18 -0700 (PDT)
In-Reply-To: <03826B11-ABC0-4F5B-A636-A07DECDF428C@iki.fi>
References: <E1ONiI8-0001C6-Ln@wintermute02.cs.auckland.ac.nz> <4C149556.7040008@gnutls.org> <03826B11-ABC0-4F5B-A636-A07DECDF428C@iki.fi>
Date: Mon, 14 Jun 2010 09:46:18 +0200
X-Google-Sender-Auth: Yi6kWvD279OHmXGsfObcy4G5hlU
Message-ID: <AANLkTimYxYX8KqZ09bC-aglGU6D6W3JGH4gSlpmP4QCG@mail.gmail.com>
From: Nikos Mavrogiannopoulos <nmav@gnutls.org>
To: Juho Vähä-Herttua <juhovh@iki.fi>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Cc: tls@ietf.org
Subject: Re: [TLS] I-D Action:draft-ietf-tls-rfc4366-bis-09.txt
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.9
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/listinfo/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/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: Mon, 14 Jun 2010 07:46:21 -0000

On Sun, Jun 13, 2010 at 11:01 AM, Juho Vähä-Herttua <juhovh@iki.fi> wrote:
> On 13.6.2010, at 11.22, Nikos Mavrogiannopoulos wrote:
>> This is not really a stopper. Since it is being negotiated it should be
>> obvious that those clients will accept the default or less. The
>> intention is to give choice to more capable clients and servers.
>
> I still don't see a big benefit in making the maximum fragment length 64kB instead of 16kB, since all implementations have to be able to fall back to the 16kB anyway, and handshake messages have maximum length of 16MB so the fragmentation has to be handled nevertheless.

I don't understand your point. Implementations that want to support
could support it (i.e. when implementing for a high bandwidth tunnel),
and others can use the 16kb limit. Being able not to use it is an
advantage not a limitation.

> The benefit of having a fragment length smaller than 2^14 seems quite clear to me. First is what Peter mentioned, the maximum TLSRecord size directly affects the required I/O buffers size that need to be allocated no matter what. Handshake message buffers still might be larger than that, but they can be allocated larger when needed and the implementation can fail gracefully if a handshake message is too large.
> Another benefit comes from DTLS, where TLSRecords themselves need to be fragmented in order to fit inside a single IP packet. If the implementation can negotiate a fragment length with a max_fragment_length extension, it doesn't have to be able to handle the double fragmentation (first fragment handshake, then encrypt, then fragment the encrypted data).

Then it shouldn't negotiate it. Isn't it obvious? The extension is for
applications that require more bandwidth and are not running on 8 or
16 bit cpus. This is an extension you use it when you need it, not
when you don't.

> If the fragment length is increased from 16kB to 64kB, I can only see a benefit of 3*(5+IV+padding+MAC) bytes per 64kB. That is at most 927 bytes with current implementations, more likely less than 200 bytes since adding 256 bytes of padding is a waste. It would save less than 0,4-1,5% of bandwidth, and if the current implementations don't implement the extension just because they have expected the value not to exceed 2^14 before, it would make all the benefits mentioned earlier void as well.
> So is your motivation behind making it larger what I just mentioned above or maybe something else? Since I would like to know if I've missed something important or if this is just a disagreement on the mentioned feature being useful or not.

The save is not on data sent but on processing speed. Decryption and
encryption today is done in hardware (several embedded systems have a
crypto coprocessor) so the bottleneck is on processing those
fragments. The larger they are the less they are processed, the higher
the bandwidth. (check what happens to ATM today with the fixed 53 byte
payload, everybody tries to do reassembly in hardware otherwise the
performance is poor. 16kb is not 53 bytes but it's close :)

regards,
Nikos