Re: [TLS] Length of a variable-length vector: zero-length case

Eric Rescorla <ekr@rtfm.com> Fri, 22 January 2016 16:51 UTC

Return-Path: <ekr@rtfm.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4213C1B29D8 for <tls@ietfa.amsl.com>; Fri, 22 Jan 2016 08:51:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.277
X-Spam-Level:
X-Spam-Status: No, score=-1.277 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001] autolearn=no
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 6LaO9fxCe8pn for <tls@ietfa.amsl.com>; Fri, 22 Jan 2016 08:51:33 -0800 (PST)
Received: from mail-yk0-x22f.google.com (mail-yk0-x22f.google.com [IPv6:2607:f8b0:4002:c07::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 0C20C1A87CD for <tls@ietf.org>; Fri, 22 Jan 2016 08:51:33 -0800 (PST)
Received: by mail-yk0-x22f.google.com with SMTP id v14so92949573ykd.3 for <tls@ietf.org>; Fri, 22 Jan 2016 08:51:33 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=Q8EIV7netRitBQRmvFVWFafV6XdesnHJUZgpTvVQmEA=; b=iELCU8aL+t5j4hixBVh68yusGk11EGfi8YbV08Lx1m9MBr6nZkohK/whPD0PdlKIdF Pw+VWCQS4FbDneZ9lMwgiXohAv0NqoKpkcCOCTXJCpBIS/YlJAp7Uu4fg+EfIIPklqV4 F/kiQ/58wSFq+ueW8GXK/9Ouo7yH3JL4/rUlZ2iQbjbV4s/PSwLxZJF9RREgnknOWxW+ jLs3hxUj98tps4MDwt5dKAApDJJBdN1TAyVMqEvHRi+BrLzeP+LpT/fDcdRFRnrLfFEr khl5Ix2b7oDDvZKUuE7obLs1jJF/GV7Cv6XNGAdttY4Qmesn2ulmjQQ+blR2lzjOH9l8 dp7Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=Q8EIV7netRitBQRmvFVWFafV6XdesnHJUZgpTvVQmEA=; b=YO36ErIFs4zU9ZivoB2ITr2ppAF+SGRVFlAPtvTwISglHAjt5HEa5U9MpPKbbixl+u sHSvEOF+161Wu7UDnsH7cubGEh3G4jHUQaGoovTblerwD8qvb6MNSrJsJ8Qdjl0+t4ue bvZhQaMLB9djNOnPNr/+aFkw+R56EnNNOiu+O0Q3NULBT/V51KUdXkPMAC/Dka1eIvmf 43doUPeZlzLi9cAhUEMnGP7EtKubT90p/92xnLrgEJxB5qHAhJmpWxMl3NM055FKLYXq Q4f68bcrgs1GKXi1wbjIAvGaRfQdwNJDfGIDuNlFnOEe4Lc2umabG4c3h5I+3OgsXRaK 1Rcg==
X-Gm-Message-State: AG10YOSZJUn+n0nYCUsFltDx6uRDQTNQPEPqmIBhCmjISLyTUo0slzDUtF/uGSUiWodiTC9RSrm1iY31gGYI8w==
X-Received: by 10.37.86.7 with SMTP id k7mr2140462ybb.82.1453481492371; Fri, 22 Jan 2016 08:51:32 -0800 (PST)
MIME-Version: 1.0
Received: by 10.13.249.197 with HTTP; Fri, 22 Jan 2016 08:50:53 -0800 (PST)
In-Reply-To: <56A24FAA.6050409@KingsMountain.com>
References: <56A24FAA.6050409@KingsMountain.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Fri, 22 Jan 2016 08:50:53 -0800
Message-ID: <CABcZeBPwGe=tQ6qLRC5br3QNeNDO+4U11hoO-AkuRXPxiTdO2g@mail.gmail.com>
To: =JeffH <Jeff.Hodges@kingsmountain.com>
Content-Type: multipart/alternative; boundary="001a114268260a89f50529ef0825"
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/g-WKkXjCpdis0mKyOYQwOpa7X50>
Cc: IETF TLS WG <tls@ietf.org>
Subject: Re: [TLS] Length of a variable-length vector: zero-length case
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
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, 22 Jan 2016 16:51:34 -0000

On Fri, Jan 22, 2016 at 7:50 AM, =JeffH <Jeff.Hodges@kingsmountain.com>
wrote:

> wrt https://tools.ietf.org/html/draft-ietf-tls-tls13-11#section-4.3
>
> if we have..
>
>   opaque foo<0..2^16-1>;
>
> ..with a floor length of zero, thus with an instantiation of foo of zero
> length, we actually will have in terms of encoded bytes on the wire (in
> hex)..
>
>   00 00
>
> ..where this is the 2-byte length field, with length value zero, and a
> zero-length (ie, absent, empty) vector content, correct ?


Yes.

-Ekr


>
>
thanks,
>
> =JeffH
>
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls
>