Re: [Cbor] Eric Rescorla's Discuss on draft-ietf-cbor-cddl-06: (with DISCUSS and COMMENT)

Benjamin Kaduk <kaduk@mit.edu> Thu, 22 November 2018 01:24 UTC

Return-Path: <kaduk@mit.edu>
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 8BF4D130E61; Wed, 21 Nov 2018 17:24:50 -0800 (PST)
X-Quarantine-ID: <bEscPBr4Zrwp>
X-Virus-Scanned: amavisd-new at amsl.com
X-Amavis-Alert: BAD HEADER SECTION, Non-encoded 8-bit data (char 9C hex): Received: ...s kaduk@ATHENA.MIT.EDU)\n\t\234by outgoing.mit[...]
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Level:
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, UNPARSEABLE_RELAY=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 bEscPBr4Zrwp; Wed, 21 Nov 2018 17:24:49 -0800 (PST)
Received: from dmz-mailsec-scanner-2.mit.edu (dmz-mailsec-scanner-2.mit.edu [18.9.25.13]) (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 987E9130DFF; Wed, 21 Nov 2018 17:24:48 -0800 (PST)
X-AuditID: 1209190d-625ff70000004e3b-06-5bf6055e1be8
Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) (using TLS with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP id EF.EB.20027.E5506FB5; Wed, 21 Nov 2018 20:24:47 -0500 (EST)
Received: from outgoing.mit.edu (OUTGOING-AUTH-1.MIT.EDU [18.9.28.11]) by mailhub-auth-2.mit.edu (8.14.7/8.9.2) with ESMTP id wAM1OfcB028019; Wed, 21 Nov 2018 20:24:42 -0500
Received: from kduck.kaduk.org (24-107-191-124.dhcp.stls.mo.charter.com [24.107.191.124]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) �by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id wAM1OYYI027860 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Nov 2018 20:24:38 -0500
Date: Wed, 21 Nov 2018 19:24:34 -0600
From: Benjamin Kaduk <kaduk@mit.edu>
To: Carsten Bormann <cabo@tzi.org>
Cc: Eric Rescorla <ekr@rtfm.com>, cbor@ietf.org, Barry Leiba <barryleiba@computer.org>, IESG <iesg@ietf.org>, draft-ietf-cbor-cddl@ietf.org, cbor-chairs@ietf.org
Message-ID: <20181122012434.GB11132@kduck.kaduk.org>
References: <154267838656.26631.4178048052675609107.idtracker@ietfa.amsl.com> <D99E5141-4C3E-475F-8F25-3018BBC2B484@tzi.org> <CABcZeBMb8nV-Bm1R3n9Dk-TyWZjwcOe7dxhAFfHaQRyPcBAROQ@mail.gmail.com> <6882FA6E-B656-4539-AB4D-CF9272B7A269@tzi.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <6882FA6E-B656-4539-AB4D-CF9272B7A269@tzi.org>
User-Agent: Mutt/1.9.1 (2017-09-22)
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOKsWRmVeSWpSXmKPExsUixG6nohvP+i3aYOksdotDiy+xWhyZcpfV YvbfLYwWMzums1hcuzGNyWLF63PsFjP+TGR2YPdoWdXL7LFkyU8mj8mP25g9pi3KDGCJ4rJJ Sc3JLEst0rdL4Mq4/3Q/W8FhgYol5z8xNzBO5uli5OSQEDCROHTtAmMXIxeHkMAaJonXu85D ORsZJTYv38wO4dxlkji2bRo7SAuLgKrE3f43zCA2m4CKREP3ZTBbREBJ4sLFNWwgDcwCmxkl Dv7pBWsQFoiVWH1qJiOIzQu0727HbagV3xglPry6zwyREJQ4OfMJC4jNLKAu8WfeJaA4B5At LbH8HwdEWF6ieetssHJOAWuJN51NbCC2qICyxN6+Q+wTGAVnIZk0C8mkWQiTZiGZtICRZRWj bEpulW5uYmZOcWqybnFyYl5eapGukV5uZoleakrpJkZQfHBK8u5g/HfX6xCjAAejEg+vRuTX aCHWxLLiytxDjJIcTEqivGzZQCG+pPyUyozE4oz4otKc1OJDjBIczEoivBdWAOV4UxIrq1KL 8mFS0hwsSuK8v0UeRwsJpCeWpGanphakFsFkZTg4lCR43Vm+RQsJFqWmp1akZeaUIKSZODhB hvMADRcHqeEtLkjMLc5Mh8ifYlSUEuetB0kIgCQySvPgekHpSyJ7f80rRnGgV4R5DUGqeICp D677FdBgJqDBsmc+gwwuSURISTUwBq/S+cqovuz0IQbD5EifB5UxGVdqWdvmFyz6K7/x/yuf 7Mldc76v2ucnkWanpLdP3vnPwYdyh5x+cyVsWl7JmrRmqt21+gtPrCZfeN2yJan37I6s4mp7 00Oady/YH555R5ZR8ceRb7xaPw+kXVr3Q75tZ6Df738PQ37t0Ehw/PHtZvGOTbdYbJRYijMS DbWYi4oTAd4GgKU6AwAA
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/b9sOCoCTLr6R5sGD38Zc6CLE9m8>
Subject: Re: [Cbor] Eric Rescorla's Discuss on draft-ietf-cbor-cddl-06: (with DISCUSS and COMMENT)
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, 22 Nov 2018 01:24:51 -0000

On Wed, Nov 21, 2018 at 02:10:24PM +0100, Carsten Bormann wrote:
> Hi Eric,
> 
> you probably won’t have time to read this before the telechat, but I would like to keep the ball rolling.

Jumping in on one specific point...

> (For some reason, my mail reader doesn’t pick up the quoting correctly in this reply; I hope it is still readable enough.)
> 
> Grüße, Carsten
> 
> 
> > On Nov 20, 2018, at 20:15, Eric Rescorla <ekr@rtfm.com> wrote:
> > 
> > On Tue, Nov 20, 2018 at 8:14 AM Carsten Bormann <cabo@tzi.org> wrote:
> > 
> > > On Nov 20, 2018, at 02:46, Eric Rescorla <ekr@rtfm.com> wrote:
> > > 
[...]
> > > S 3.7.
> > >>                              buuid = #6.37(bstr)
> > >> 
> > >>     In the following example, usage of the tag 32 for URIs is optional:
> > >> 
> > >>                          my_uri = #6.32(tstr) / tstr
> > >> 
> > > 
> > > I am basically unable to make sense of this section. Your previous
> > > example of tags used #7.25 but here you are specifying everything as
> > > using 6.
> > 
> > 6 is CBOR’s major type for tags.  #7.25 is not a tag, but a (16-bit) floating point value.
> > 
> > Yes, I understand that.
> > 
> > 
> > The example shows how to construct tagged items by using the #6.xxx(ttt) syntax, where xxx is a tag value and ttt is the type of the data item enclosed by the tag.
> > 
> > > It seems like the semantics here are something to the effect of:
> > > 
> > > X = #6.Y(Z)
> > > 
> > > means: act as if this were a thing of type Z but it’s tagged by Y.
> 
> That is not how I would describe what tags are about.
> 
> E.g., using CBOR diagnostic notation, h’123456789a’ is a byte string, but 2(h’123456789a’) is the number 78187493520.
> This does no longer act as if it were a byte string.  It is tagged by the tag number 2 (which stands for unsigned bignum).
> 
> A type for tagged data items like this is described in the prelude by:
> 
> biguint = #6.2(bstr)

I'm still a bit confused on where the #M.N(x) syntax is formally defined.
Is it supposed to be part of CDDL's ABNF?

-Benjamin