Re: [Cbor] draft-ietf-cbor-cddl-control-00 should add CDDL notation for CBOR Sequences
Carsten Bormann <cabo@tzi.org> Thu, 05 November 2020 17:02 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 BA3A53A181F for <cbor@ietfa.amsl.com>; Thu, 5 Nov 2020 09:02:48 -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 CtGGNqMwaEjL for <cbor@ietfa.amsl.com>; Thu, 5 Nov 2020 09:02: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 2937E3A1815 for <cbor@ietf.org>; Thu, 5 Nov 2020 09:02:45 -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 4CRqZp5jvfzyWV; Thu, 5 Nov 2020 18:02:42 +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: <5CB44449-A1EB-465A-8A51-14FE14155B68@ericsson.com>
Date: Thu, 05 Nov 2020 18:02:42 +0100
Cc: Henk Birkholz <henk.birkholz@sit.fraunhofer.de>, "cbor@ietf.org" <cbor@ietf.org>, Andrew Weiss <anweiss@github.com>
X-Mao-Original-Outgoing-Id: 626288562.324324-04eb3f9cc35f9ad70cd6411fc7d90188
Content-Transfer-Encoding: quoted-printable
Message-Id: <4CBAFAE0-EB02-4E02-9CAD-D7E0AB546F06@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> <a89f603a-8cc9-21c0-4d75-a78c49efc0e7@sit.fraunhofer.de> <5CB44449-A1EB-465A-8A51-14FE14155B68@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/t0PtgMAk61Ft9R3ssTVqqMnLlIE>
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 17:02:49 -0000
On 2020-11-05, at 17:25, John Mattsson <john.mattsson=40ericsson.com@dmarc.ietf.org> wrote: > > Hi, > > Henk wrote: >> Circling back to my initial reply, I am still under the impression that >> you are asking for a CDDL notation that can express CBOR Sequences as a >> top-level item in a CDDL spec, right? (RFC8764 is hinting at that.) > > Carsten wrote: >> Are you talking about the “future versions” part of that? > > Yes, I am asking for a future update to CDDL that allows expression of CBOR Sequences as a top-level item. I want that "future version" of CDDL as soon as possible. I see. (I don’t see why.) The reason that this is under “future” is that there is no urgency to re-spin CDDL at this point — we can handle all current issues within the extension points (at least until we do the module structure — but that will take another year or two). > The reason I want that updated version is because I want to use CDDL. Yes, and RFC 8742 tells you how to do this for CBOR sequences with today’s CDDL. > The > alternative is to not use CDDL, or as suggested by RFC 8742 and use CDDL together with human readable text. The human readable text cannot be used for automatic verification unless you have a very smart AI. You already need something (“English” or in your implementation glue) that links the specific CDDL spec to the incoming data. That something could as well tell you that the incoming data is a CBOR sequence and not a single CBOR data item, and use the CDDL accordingly. Can you explain the difficulties you find with that? >> So the solution here is to concatenate four separate CBOR data items >> (key_id, key_usage, key_value, key_addinfo) in order to safe the bytes >> that would wrap them in an array and would result in a single CBOR data >> item. > > Yes, all the specs I referred to do something similar. My understanding is that the result is a CBOR sequence (not a single CBOR data item). In EDHOC we have taken every possible measure to shave of bytes so that the message can fit in 5-hop 6TiSCH and LoRaWAN. The resulting CBOR sequence for message_2 is 46 bytes which is still one (1) byte too much. In EDHOC we will need concatenate byte strings of known length to make the CBOR sequence fit inside a single frame. There is absolutely no possibility to take the cost of even a single extra byte. I’m not arguing for converting the CBOR sequence into a single CBOR data item. I’m just arguing that you can use the way of using CDDL for CBOR sequences that is specified today in RFC 8742. Henk has pointed out to me in separate conversation that my CDDL tool is not yet sequence-friendly; I’ll take that as an action point now. Andrew — where is your tool with respect to handling RFC 8742 CBOR sequences? Grüße, Carsten
- Re: [Cbor] draft-ietf-cbor-cddl-control-00 should… Henk Birkholz
- [Cbor] draft-ietf-cbor-cddl-control-00 should add… John Mattsson
- Re: [Cbor] draft-ietf-cbor-cddl-control-00 should… Henk Birkholz
- Re: [Cbor] draft-ietf-cbor-cddl-control-00 should… John Mattsson
- Re: [Cbor] draft-ietf-cbor-cddl-control-00 should… John Mattsson
- Re: [Cbor] draft-ietf-cbor-cddl-control-00 should… Carsten Bormann
- Re: [Cbor] draft-ietf-cbor-cddl-control-00 should… Henk Birkholz
- Re: [Cbor] draft-ietf-cbor-cddl-control-00 should… Henk Birkholz
- Re: [Cbor] draft-ietf-cbor-cddl-control-00 should… John Mattsson
- Re: [Cbor] draft-ietf-cbor-cddl-control-00 should… Carsten Bormann
- Re: [Cbor] draft-ietf-cbor-cddl-control-00 should… Andrew Weiss
- Re: [Cbor] draft-ietf-cbor-cddl-control-00 should… Andrew Weiss