[Cbor] Fwd: CDDL tool doesn't recognize h'hexstring'?

Carsten Bormann <cabo@tzi.org> Mon, 27 March 2017 23:29 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 2C46A1286CA for <cbor@ietfa.amsl.com>; Mon, 27 Mar 2017 16:29:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.198
X-Spam-Level:
X-Spam-Status: No, score=-4.198 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, 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 Ooe5bnVI5I2E for <cbor@ietfa.amsl.com>; Mon, 27 Mar 2017 16:29:04 -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 AE6C91296C3 for <cbor@ietf.org>; Mon, 27 Mar 2017 16:29:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from submithost.informatik.uni-bremen.de (submithost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::b]) by mailhost.informatik.uni-bremen.de (8.14.5/8.14.5) with ESMTP id v2RNSsRu012467 for <cbor@ietf.org>; Tue, 28 Mar 2017 01:28:54 +0200 (CEST)
Received: from dhcp-8858.meeting.ietf.org (dhcp-8858.meeting.ietf.org [31.133.136.88]) (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 3vsVbB0kb8zDHyQ; Tue, 28 Mar 2017 01:28:53 +0200 (CEST)
From: Carsten Bormann <cabo@tzi.org>
Content-Type: multipart/alternative; boundary="Apple-Mail=_AE7D15E0-51CE-48E4-9D8F-C4F9C97B9C35"
X-Mao-Original-Outgoing-Id: 512350132.107491-81d860557349d3e32840473cb32809f0
Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\))
Date: Mon, 27 Mar 2017 18:28:52 -0500
Message-Id: <9214C5DC-F298-4CC9-A480-E39E5BF6D764@tzi.org>
References: <CANh-dX=69_mKP2G45jbOLqNXcXisQ7q6pFKxs-dNkDoBVZLAOA@mail.gmail.com>
To: cbor@ietf.org
X-Mailer: Apple Mail (2.3259)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/u0NS7L3Yr1QlfzAJwQ5DcU2Agrc>
Subject: [Cbor] Fwd: CDDL tool doesn't recognize h'hexstring'?
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.22
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: Mon, 27 Mar 2017 23:29:11 -0000

I just got this interesting feedback (and permission to forward it to the list).

Welcome to the CBOR WG, Jeffrey!

(Jeffrey also got me to finally support byte strings constants in the CDDL tool.
But there certainly still is a lot of work to do with the tool; see further below.)

Grüße, Carsten


> Begin forwarded message:
> 
> From: Jeffrey Yasskin <jyasskin@google.com <mailto:jyasskin@google.com>>
> Subject: Re: CDDL tool doesn't recognize h'hexstring'?
> Date: 27 March 2017 at 17:23:36 -0500
> To: Carsten Bormann <cabo@tzi.org <mailto:cabo@tzi.org>>
> 
> My CBOR patch is now in https://github.com/dimich-g/webpackage/pull/36 <https://github.com/dimich-g/webpackage/pull/36>. I noticed two extra things while completing the patch:
> 
> 5. Use of COSE_Sign could benefit from the generics you ponder in https://tools.ietf.org/html/draft-greevenbosch-appsawg-cbor-cddl-10#appendix-B.1 <https://tools.ietf.org/html/draft-greevenbosch-appsawg-cbor-cddl-10#appendix-B.1>. In particular, uses are likely to want to specify the bytes stored in the payload, and to extend the protected and unprotected maps. They may also want to constrain the use of Generic_Headers in the protected and unprotected maps, but it's less obvious how to accomplish that.
> 6. Some sort of namespacing might be helpful so that a reference to the 'Headers' type in the COSE spec isn't ambiguous with a local 'Headers' or a type of that name in some other spec.
> 
> Also, if you're collecting uses of CDDL, WebAuthn is also using it: https://w3c.github.io/webauthn/#sec-attestation-data <https://w3c.github.io/webauthn/#sec-attestation-data>
> 
> Jeffrey
> 
> […]
> 
> Other problems I've found so far are:
> The non-BMP emoji cause parse errors, in either comments or 'bytestrings'.
> json-generate tries to turn 0xF0 into a UTF-8 character and fails, instead of noticing that it's part of a larger sequence.
> generate can't handle .within. A simple fix might be to just ignore the right side of .within.
> It's odd that `{stuff} .within {otherstuff}` fails to parse, since the braces should provide as much grouping as parentheses, but I haven't checked the CDDL grammar to see if it's forbidden there too.
> I can reduce these if you need.
> 
> Thanks,
> Jeffrey