Re: [Cbor] Chunks with tags inside indefinite-length string (major type 2 and 3)

Carsten Bormann <cabo@tzi.org> Tue, 10 December 2019 05:03 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0E2F412021C for <cbor@ietfa.amsl.com>; Mon, 9 Dec 2019 21:03:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Level:
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=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 fI5mi00FqYQO for <cbor@ietfa.amsl.com>; Mon, 9 Dec 2019 21:03:46 -0800 (PST)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9F855120154 for <cbor@ietf.org>; Mon, 9 Dec 2019 21:03:46 -0800 (PST)
Received: from client-0173.vpn.uni-bremen.de (client-0173.vpn.uni-bremen.de [134.102.107.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 47X7J04GTRz16CK; Tue, 10 Dec 2019 06:03:44 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <87a78154vx.fsf@hobgoblin.ariadne.com>
Date: Tue, 10 Dec 2019 06:03:44 +0100
Cc: Faye Amacker <faye.github@gmail.com>, cbor@ietf.org
X-Mao-Original-Outgoing-Id: 597647022.183664-b4d48bb92a0b0f15af4337cd7cca8acf
Content-Transfer-Encoding: quoted-printable
Message-Id: <E7A98F5A-256D-4C2D-B001-4054B87F1AF1@tzi.org>
References: <87a78154vx.fsf@hobgoblin.ariadne.com>
To: "Dale R. Worley" <worley@ariadne.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/ybx3Eb5S8gdW6b_zWIu80cVYRC4>
Subject: Re: [Cbor] Chunks with tags inside indefinite-length string (major type 2 and 3)
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Dec 2019 05:03:49 -0000

On Dec 10, 2019, at 02:46, Dale R. Worley <worley@ariadne.com> wrote:
> 
> Faye Amacker <faye.github@gmail.com> writes:
>> And the pseudocode in Appendix C allows tags for chunks inside
>> indefinite-length strings.

As Jeffrey noted, the pseudocode actually catches chunks that are of a different major type than the indefinite string they are contained in.

> It seems to me that the safe option, the one that will cause the least
> trouble in the future, is to define tags on items inside
> indefinite-length structure as syntactically well-structured but
> semantically having no defined meaning.  

Why would we allow tags here?  Indefinite strings are a very limited syntactical structure; there is no need to allow flexibility here (in particular if there is no semantic gain from that).

> Actually, that's the same as we
> treat use of tags whose values haven’t been defined.

I don’t follow.

> Functionally, that means that no current application should generate
> them (and thus an application for the same universe of values should
> expect to never see them), but "generic" decoders should be prepared to
> see such tags.

I don’t think so.  Both the text and the pseudocode disallow tags on chunks.

Grüße, Carsten