[TLS] Clarification on vectors required

"Neil.Young" <Neil.Young@Freenet.de> Thu, 01 April 2010 12:54 UTC

Return-Path: <Neil.Young@Freenet.de>
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 D59633A6D3D for <tls@core3.amsl.com>; Thu, 1 Apr 2010 05:54:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.131
X-Spam-Level: *
X-Spam-Status: No, score=1.131 tagged_above=-999 required=5 tests=[BAYES_50=0.001, DNS_FROM_OPENWHOIS=1.13]
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 KN9+5QbS19kO for <tls@core3.amsl.com>; Thu, 1 Apr 2010 05:54:03 -0700 (PDT)
Received: from mout0.freenet.de (mout0.freenet.de [IPv6:2001:748:100:40::2:2]) by core3.amsl.com (Postfix) with ESMTP id E1AA13A687D for <tls@ietf.org>; Thu, 1 Apr 2010 05:43:00 -0700 (PDT)
Received: from [195.4.92.10] (helo=0.mx.freenet.de) by mout0.freenet.de with esmtpa (ID roland.klabunde@freenet.de) (port 25) (Exim 4.72 #3) id 1NxJkB-0005g4-0c for tls@ietf.org; Thu, 01 Apr 2010 14:43:31 +0200
Received: from [141.39.41.223] (port=1348) by 0.mx.freenet.de with esmtpsa (ID roland.klabunde@freenet.de) (TLSv1:AES256-SHA:256) (port 25) (Exim 4.72 #3) id 1NxJkA-0008G2-Lw for tls@ietf.org; Thu, 01 Apr 2010 14:43:30 +0200
Message-ID: <4BB49475.5060701@Freenet.de>
Date: Thu, 01 Apr 2010 14:41:25 +0200
From: "Neil.Young" <Neil.Young@Freenet.de>
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
MIME-Version: 1.0
To: tls@ietf.org
Content-Type: text/plain; charset="ISO-8859-15"; format="flowed"
Content-Transfer-Encoding: 7bit
Subject: [TLS] Clarification on vectors required
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: Neil.Young@Freenet.de
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: Thu, 01 Apr 2010 12:54:03 -0000

Hello,

I have a question about how to understand 4.3 of RFC 2246.

The vector definition seems rather clear to me. I have a problem to 
catch the meaning of this statement:
"The length of an encoded vector must be an even multiple of the length 
of a single element (for example, a 17 byte vector of uint16 would be 
illegal). "

Given the following declaration:

opaque             config_data<2^24-1>;

Is this understanding correct:
1) The declaration is slightly incorrect, because the "floor" element is 
missing. I tend to treat it to be 0
2) The number of bytes expressing the length of the vector is 3, large 
enough to count for 2**24-1 bytes
3) If e.g. the size of the vector's data is 2 bytes, do I really have to 
add a pad byte in order to meet the "even multiple" demand?

Sample: Data payload is 0x4711

Is this correct?
00 00 05 47 11 0

Or this?
00 00 05 47 11

Or none?

Kind regards