Re: [Cbor] correctness of implied top level array?

Carsten Bormann <cabo@tzi.org> Wed, 13 March 2019 16:56 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 1E422130FB4 for <cbor@ietfa.amsl.com>; Wed, 13 Mar 2019 09:56:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.299
X-Spam-Level:
X-Spam-Status: No, score=-2.299 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3, 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 QBcYuYafWUh4 for <cbor@ietfa.amsl.com>; Wed, 13 Mar 2019 09:56:30 -0700 (PDT)
Received: from mailhost.informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 14A90130F35 for <cbor@ietf.org>; Wed, 13 Mar 2019 09:56:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from submithost.informatik.uni-bremen.de (submithost2.informatik.uni-bremen.de [IPv6:2001:638:708:30c8:406a:91ff:fe74:f2b7]) by mailhost.informatik.uni-bremen.de (8.14.5/8.14.5) with ESMTP id x2DGuLFF016516; Wed, 13 Mar 2019 17:56:26 +0100 (CET)
Received: from client-0134.vpn.uni-bremen.de (client-0134.vpn.uni-bremen.de [134.102.107.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by submithost.informatik.uni-bremen.de (Postfix) with ESMTPSA id 44KHzn1RW6z1Bp8; Wed, 13 Mar 2019 17:56:21 +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: <C08C1F33-EE18-4E17-A6EA-96002A935DBD@ericsson.com>
Date: Wed, 13 Mar 2019 17:56:20 +0100
Cc: "cbor@ietf.org" <cbor@ietf.org>
X-Mao-Original-Outgoing-Id: 574188978.916838-0bc13306cc8c4df3610674f859baeea8
Content-Transfer-Encoding: quoted-printable
Message-Id: <E5B53796-250B-4457-9AEE-B8FA1B3A06BD@tzi.org>
References: <C08C1F33-EE18-4E17-A6EA-96002A935DBD@ericsson.com>
To: John Mattsson <john.mattsson@ericsson.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/cy8-qjY5lQ2H_Y-rRe7Ionhic2I>
Subject: Re: [Cbor] correctness of implied top level array?
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: Wed, 13 Mar 2019 16:56:35 -0000

On Mar 13, 2019, at 17:49, John Mattsson <john.mattsson@ericsson.com> wrote:
> 
> Hi,
> 
> Great with a document that define a CBOR sequence. I have already made draft-bormann-cbor-sequence a normative reference in EDHOC.
> 
> I would like to see CDDL and CBOR diagnostic notation for a CBOR sequence. In lack of something better, EDHOC is currently using the CDDL group notation:
> 
> message_1 = (
>  TYPE : int,
>  SUITES_U : suite / [ index: uint, 2* suite ],
>  X_U : bstr,
>  C_U : bstr,
>  ID_PSK : bstr / header_map,
>  ? UAD_1 : bstr,
> )

That is probably where we want to go, but not with CDDL version 1.
For now, both diagnostic notation and CDDL can use an array and just say in English that we are not using a single data item but a CBOR sequence instead.

Grüße, Carsten