[TLS] why TLS 1.2 uses length prefixed messages

"Andris Berzins" <pkix@inbox.lv> Tue, 13 November 2012 22:36 UTC

Return-Path: <pkix@inbox.lv>
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 4D83D21F86A2 for <tls@ietfa.amsl.com>; Tue, 13 Nov 2012 14:36:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.214
X-Spam-Level:
X-Spam-Status: No, score=-2.214 tagged_above=-999 required=5 tests=[AWL=-0.474, BAYES_20=-0.74, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s0ISVwu5xfh5 for <tls@ietfa.amsl.com>; Tue, 13 Nov 2012 14:36:38 -0800 (PST)
Received: from shark3.inbox.lv (shark3.inbox.lv [89.111.3.83]) by ietfa.amsl.com (Postfix) with ESMTP id 7D48121F86D3 for <tls@ietf.org>; Tue, 13 Nov 2012 14:36:37 -0800 (PST)
Received: by shark3.inbox.lv (Postfix, from userid 1000) id EC27D10337; Wed, 14 Nov 2012 00:36:34 +0200 (EET)
Received: from localhost (localhost [127.0.0.1]) by shark3-plain-b64d2.inbox.lv (Postfix) with ESMTP id D13701031A for <tls@ietf.org>; Wed, 14 Nov 2012 00:36:34 +0200 (EET)
Received: from localhost ([10.0.1.11]) by localhost (shark3.inbox.lv [10.0.1.80]) (spamfilter, port 27) with ESMTP id nzxcVO48l9xT for <tls@ietf.org>; Wed, 14 Nov 2012 00:36:34 +0200 (EET)
Received: from 193.40.12.10 ( [193.40.12.10]) by mail.inbox.lv with HTTP; Wed, 14 Nov 2012 00:36:34 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Compose: web=mail.inbox.lv, node=w1.inbox.lv, l=en, compose=Plaintext
X-REMOTE-ADDR: 193.40.12.10
X-HTTP-USER-AGENT: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/11.04 Chromium/18.0.1025.151 Chrome/18.0.1025.151 Safari/535.19
Message-ID: <1352846194.50a2cb72ba804@mail.inbox.lv>
Date: Wed, 14 Nov 2012 00:36:34 +0200
From: Andris Berzins <pkix@inbox.lv>
To: tls@ietf.org
User-Agent: Inbox.lv Webmail
Subject: [TLS] why TLS 1.2 uses length prefixed messages
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.12
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: <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: Tue, 13 Nov 2012 22:36:39 -0000

I have noticed that TLS 1.2 introduces additional length field for messages.
For example CertificateVerify:

Structure of this message (TLS 1.1):
      struct {
           Signature signature;
      } CertificateVerify;

Structure of this message (TLS 1.2):
      struct {
           digitally-signed struct {
               opaque handshake_messages[handshake_messages_length];
           }
      } CertificateVerify;

Is there reason why TLS 1.2 uses additional length field?