Re: [TLS] About the contents of Record Layers

Juho Vähä-Herttua <juhovh@iki.fi> Sun, 01 August 2010 16:42 UTC

Return-Path: <juhovh@iki.fi>
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 F0A033A6993 for <tls@core3.amsl.com>; Sun, 1 Aug 2010 09:42:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.299
X-Spam-Level:
X-Spam-Status: No, score=-2.299 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, 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 rxr6cMaAguXk for <tls@core3.amsl.com>; Sun, 1 Aug 2010 09:42:27 -0700 (PDT)
Received: from smtp-3.tky.hut.fi (smtp03.tky.fi [82.130.63.73]) by core3.amsl.com (Postfix) with SMTP id A7E5F3A6831 for <tls@ietf.org>; Sun, 1 Aug 2010 09:42:26 -0700 (PDT)
Received: from smtp.vaha-herttua.fi ([82.130.46.36]) by smtp-3.tky.hut.fi (SMSSMTP 4.1.9.35) with SMTP id M2010080119425023165 ; Sun, 01 Aug 2010 19:42:50 +0300
Received: from vagabond.lan (qer2.kyla.fi [82.130.46.10]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.vaha-herttua.fi (Postfix) with ESMTPSA id 75EBA20096; Sun, 1 Aug 2010 19:43:04 +0300 (EEST)
Mime-Version: 1.0 (Apple Message framework v1081)
Content-Type: multipart/signed; boundary="Apple-Mail-1--421424628"; protocol="application/pkcs7-signature"; micalg="sha1"
From: Juho Vähä-Herttua <juhovh@iki.fi>
In-Reply-To: <AANLkTi=1rrGWPGn+numA=JxU69_yd=NcNfRpL3_vwO_V@mail.gmail.com>
Date: Sun, 01 Aug 2010 19:42:49 +0300
Message-Id: <AFBE0D66-F4C9-4E81-B53D-C2B1039CF35E@iki.fi>
References: <AANLkTi=1rrGWPGn+numA=JxU69_yd=NcNfRpL3_vwO_V@mail.gmail.com>
To: JCA <1.41421@gmail.com>
X-Mailer: Apple Mail (2.1081)
Cc: tls@ietf.org
Subject: Re: [TLS] About the contents of Record Layers
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: Sun, 01 Aug 2010 16:42:28 -0000

On 1.8.2010, at 18.08, JCA wrote:
> Does the TLS 1.* specs allow to send a Record Layer with an empty
> body? That is, a Record Layer containing only the protocol ID, version
> and length fields? I don't see why would anyone want to do that but,
> is it legal?

The specification seems to be quite clear about this, in TLS 1.0:

6.2.  Record Layer

   The TLS record layer receives uninterpreted data from higher layers
   in non-empty blocks of arbitrary size.

...and clarified in TLS 1.2...

   Implementations MUST NOT send zero-length fragments of Handshake,
   Alert, or ChangeCipherSpec content types.  Zero-length fragments of
   Application data MAY be sent as they are potentially useful as a
   traffic analysis countermeasure.

So in case of application data they can be sent, in reality I would do serious testing with existing implementations to see how they behave. If they are TLS 1.2 compliant and negotiate a TLS 1.2 connection they should all accept the empty records though.


Juho