Re: [Cbor] draft-ietf-cbor-cddl-control-00 should add CDDL notation for CBOR Sequences

Carsten Bormann <cabo@tzi.org> Thu, 05 November 2020 15:46 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 C47623A135F for <cbor@ietfa.amsl.com>; Thu, 5 Nov 2020 07:46:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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 wT5mD_DzKc7h for <cbor@ietfa.amsl.com>; Thu, 5 Nov 2020 07:46:42 -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 52D7A3A1355 for <cbor@ietf.org>; Thu, 5 Nov 2020 07:46:41 -0800 (PST)
Received: from [192.168.217.120] (p548dcc60.dip0.t-ipconnect.de [84.141.204.96]) (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 4CRnv34n7VzySB; Thu, 5 Nov 2020 16:46:39 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <B63CB2BF-1F68-4ECB-851B-CD794D1203D9@ericsson.com>
Date: Thu, 05 Nov 2020 16:46:39 +0100
Cc: Henk Birkholz <henk.birkholz@sit.fraunhofer.de>, "cbor@ietf.org" <cbor@ietf.org>
X-Mao-Original-Outgoing-Id: 626283999.1670491-02399f849a6a2808cabe866a7bc49558
Content-Transfer-Encoding: quoted-printable
Message-Id: <CB29760A-1F2F-464B-9DEB-5383130B554C@tzi.org>
References: <317AB3AB-B1E9-4AD9-911E-559D166E2788@ericsson.com> <d45672c4-b42c-fb0f-3ab5-0fcd7712f29b@sit.fraunhofer.de> <FCE40691-EC98-4A0C-9C3E-59F9018A15C8@ericsson.com> <3f63613d-9571-f739-d517-042b4ca9398d@sit.fraunhofer.de> <B63CB2BF-1F68-4ECB-851B-CD794D1203D9@ericsson.com>
To: John Mattsson <john.mattsson=40ericsson.com@dmarc.ietf.org>
X-Mailer: Apple Mail (2.3608.120.23.2.4)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/xCpPq5Sg3-AJiuO5EompmusphdM>
Subject: Re: [Cbor] draft-ietf-cbor-cddl-control-00 should add CDDL notation for CBOR Sequences
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: Thu, 05 Nov 2020 15:46:45 -0000

On 2020-11-05, at 16:10, John Mattsson <john.mattsson=40ericsson.com@dmarc.ietf.org> wrote:
> 
> All the document I cited use unadorned CBOR Sequences (i.e. not wrapped in a byte string). As far as I know there is no way to write CDDL that matches the unadorned CBOR Sequence 0x0102 ( 1, 2 ). I think this needs to be fixed.

Citing RFC 8742 Section 4.1:

   Currently, CDDL does not provide for unadorned CBOR Sequences as a
   top-level subject of a specification.  For now, the suggestion is to
   use an array for the top-level rule, as is used for the ".cborseq"
   control operator, and add English text that explains that the
   specification is really about a CBOR Sequence with the elements of
   the array:

   ; This defines an array, the elements of which are to be used
   ; in a CBOR Sequence:
   my-sequence = [* my-element]
   my-element = my-foo / my-bar

   (Future versions of CDDL may provide a notation for top-level CBOR
   Sequences, e.g., by using a group as the top-level rule in a CDDL
   specification.)

Are you talking about the “future versions” part of that?

Grüße, Carsten