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

Henk Birkholz <henk.birkholz@sit.fraunhofer.de> Thu, 05 November 2020 15:02 UTC

Return-Path: <henk.birkholz@sit.fraunhofer.de>
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 AB2BD3A12C9 for <cbor@ietfa.amsl.com>; Thu, 5 Nov 2020 07:02:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.143
X-Spam-Level:
X-Spam-Status: No, score=-2.143 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, NICE_REPLY_A=-0.247, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_MSPIKE_H3=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 YKZmrD9DEUp1 for <cbor@ietfa.amsl.com>; Thu, 5 Nov 2020 07:02:23 -0800 (PST)
Received: from mail-edgeDD24.fraunhofer.de (mail-edgeDD24.fraunhofer.de [192.102.167.24]) (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 DD7003A12EE for <cbor@ietf.org>; Thu, 5 Nov 2020 07:02:21 -0800 (PST)
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A2EXDABkpYde/xwBYJlmHAEBAQEBBwEBEQEEBAEBgXuCKWwDVS8qCoQRjnmBZAglgQGaPggKAQEBAQEBAQEBBgEBGAsKAgQBAYREAoJHJDgTAhABAQYBAQEBAQUEAgJphVYMhkUBAQEBAgEBASEPAQU2EAcECQIRAwECAQICJgICJyAICAYBDAYCAQEXgwsBglwfBQuTP5sEdYEyhUuDZ4E4BoEOKowxD4FMP4ERJwwDgiU1PoJnAQECAYR0gl4EkH+gEweBSXd8BIZvjzAjgkyIOIQxBYxGjzKJI5J6AgQCCQIVgWkjgVdNJE+CaVAYDY4mGhWIT4VCcwIBgSaNGQGBDwEB
X-IPAS-Result: A2EXDABkpYde/xwBYJlmHAEBAQEBBwEBEQEEBAEBgXuCKWwDVS8qCoQRjnmBZAglgQGaPggKAQEBAQEBAQEBBgEBGAsKAgQBAYREAoJHJDgTAhABAQYBAQEBAQUEAgJphVYMhkUBAQEBAgEBASEPAQU2EAcECQIRAwECAQICJgICJyAICAYBDAYCAQEXgwsBglwfBQuTP5sEdYEyhUuDZ4E4BoEOKowxD4FMP4ERJwwDgiU1PoJnAQECAYR0gl4EkH+gEweBSXd8BIZvjzAjgkyIOIQxBYxGjzKJI5J6AgQCCQIVgWkjgVdNJE+CaVAYDY4mGhWIT4VCcwIBgSaNGQGBDwEB
X-URL-LookUp-ScanningError: 1
X-IronPort-AV: E=Sophos;i="5.72,341,1580770800"; d="scan'208";a="35423442"
Received: from mail-mtaka28.fraunhofer.de ([153.96.1.28]) by mail-edgeDD24.fraunhofer.de with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Nov 2020 16:02:17 +0100
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0AiCACEE6Rf/1lIDI1iHQEBAQEJARIBBQUBQIFPgipwWDAuCoQzkHIIJoEEmyULAQMBAQEBAQcBARgLCgIEAQGESgKCDgIlOBMCEAEBBQEBAQIBBgRxhWEMhXIBAQEDAQEBIQ8BBTYQBwQJAhEDAQIBAgImAgInIAgIBgEMBgIBAReDCwGCXCQLlDabD3aBMoVXgy2BPAaBDiqGY4ZXD4FNP4ERJwwDgic1PoJdAQECAYRzgl8Ek2CkFisHgWOBDYEQBAuHa5FzBQofgxiKEoUdBo8gk02KeJVMAgQCCQIVgWsjgVdNJE+CaVAXAg2OKBoUiE6FRUIxAgE1AgYBCQEBAwl8jDsBgRABAQ
X-IronPort-AV: E=Sophos;i="5.77,453,1596492000"; d="scan'208";a="39117066"
Received: from mailext.sit.fraunhofer.de ([141.12.72.89]) by mail-mtaKA28.fraunhofer.de with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Nov 2020 16:02:14 +0100
Received: from mail.sit.fraunhofer.de (mail.sit.fraunhofer.de [141.12.84.171]) by mailext.sit.fraunhofer.de (8.15.2/8.15.2/Debian-10) with ESMTPS id 0A5F2D2G025742 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=NOT); Thu, 5 Nov 2020 16:02:13 +0100
Received: from [192.168.16.50] (79.234.121.161) by mail.sit.fraunhofer.de (141.12.84.171) with Microsoft SMTP Server (TLS) id 14.3.487.0; Thu, 5 Nov 2020 16:02:08 +0100
To: John Mattsson <john.mattsson@ericsson.com>, "cbor@ietf.org" <cbor@ietf.org>
References: <317AB3AB-B1E9-4AD9-911E-559D166E2788@ericsson.com> <d45672c4-b42c-fb0f-3ab5-0fcd7712f29b@sit.fraunhofer.de> <FCE40691-EC98-4A0C-9C3E-59F9018A15C8@ericsson.com>
From: Henk Birkholz <henk.birkholz@sit.fraunhofer.de>
Message-ID: <3f63613d-9571-f739-d517-042b4ca9398d@sit.fraunhofer.de>
Date: Thu, 05 Nov 2020 16:02:08 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <FCE40691-EC98-4A0C-9C3E-59F9018A15C8@ericsson.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Originating-IP: [79.234.121.161]
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/-UBu1HKAM_9fzDHPdEZqTqwojKE>
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:02:27 -0000

Hi John,

I might be totally missing something obvious here - it's just that I am 
having a hard time visualizing your problem at the moment.

Maybe asking the obvious can help (me getting a grasp of the issue). Why 
does the following recommendation from RFC8764 not help you?

>    my-embedded-cbor-seq = bytes .cborseq my-array
>    my-array = [* my-element]
>    my-element = my-foo / my-bar

Viele Grüße,

Henk


On 05.11.20 15:54, John Mattsson wrote:
> Hi Henk,
> 
> To quote RFC 8764
> 
> 1) "CBOR Sequences are already supported as contents of byte strings using the ".cborseq" control operator"
> 2) "CDDL does not provide for unadorned CBOR Sequences as a top-level subject of a specification"
>   
> All the document I cited do 2) not 1) .cborseq as currently specified is not a solution.
> 
> Cheers,
> John
> 
> -----Original Message-----
> From: Henk Birkholz <henk.birkholz@sit.fraunhofer.de>
> Date: Thursday, 5 November 2020 at 15:29
> To: John Mattsson <john.mattsson@ericsson.com>, "cbor@ietf.org" <cbor@ietf.org>
> Subject: Re: [Cbor] draft-ietf-cbor-cddl-control-00 should add CDDL notation for CBOR Sequences
> 
> Hi John,
> 
> as the control for cborseq is introduced in:
> 
>> https://tools.ietf.org/html/rfc8610#section-3.8.4
> 
> and RFC8742 states that:
> 
>>     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
> 
> it seems to me that you are asking for a specific CDDL notation that can
> represent a cborseq as a top-level subject. Why is using an array here
> not good enough in your case?
> 
> Viele Grüße,
> 
> Henk
> 
> On 05.11.20 13:49, John Mattsson wrote:
>> Hi,
>>
>> I the most important missing piece in RFC 8610 is the lack of CDDL for CBOR Sequences (RFC 8742) and I think draft-ietf-cbor-cddl-control would be a good place to add CDDL for that.
>>
>> CBOR sequences has already been standardized in RFC 8742. CBOR sequences are used quite heavily in IETF documents such as RFC 8769, draft-ietf-6tisch-minimal-security, draft-ietf-lake-edhoc, draft-palombini-core-oscore-edhoc, draft-mattsson-cose-cbor-cert-compress, etc.
>>
>> I don't understand all the complexities of CDDL formalism, but this seems like a quite easy thing to solve. I do not care exactly which notation is used, but could we please just agree on something and put in a draft.
>>
>> The notation could be something like:
>>
>> - reuse the CDDL notation for group ( ... )
>> - reuse the Diagnostic Notation for CBOR sequences << ... >>
>> - Some modification of the CDDL array notation ] ... [
>> - Something looking like symbol swearing #$%@#$% ... #$%@#$%
>> ...
>>
>> Cheers,
>> John
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> CBOR mailing list
>> CBOR@ietf.org
>> https://www.ietf.org/mailman/listinfo/cbor
>>
>