Subject: Re: [Cbor] Packed CBOR and dictionaries

From: Jim Schaad <[email-masked]>
Date: Mon, 14 Sep 2020 18:23:23 -0700

Carsten,

Have we gotten enough feedback to start on this or do we need to cast a wider net to some other groups?

Jim

-----Original Message-----
From: Carsten Bormann <[email-masked]> 
Sent: Friday, August 28, 2020 3:08 PM
To: Michael Richardson <[email-masked]>
Cc: Jim Schaad <[email-masked]>; [email-masked]; [email-masked]
Subject: Re: [Cbor] Packed CBOR and dictionaries

On 2020-08-28, at 23:56, Michael Richardson <[email-masked]> wrote:
> 
> 
> Carsten Bormann <[email-masked]> wrote:
>> OK, I think we need to answer a few questions first.
> 
>> Is there only ever one dictionary that is being referenced?
>> Or can you reference multiple?
> 
> I've read the thread and I think that there are three places to look.
> Please correct me I'm wrong.
> 
> 1) included in the packed CBOR.

Yes, but I’m not sure that this is a “dictionary” in the sense of being separate from the prefix and shared item tables.  Is that what you mean?

> 2) included in specifically referenced dictionary (yes, by hash)

A hash is not really a reference.  It is an identifier that can be used to check that you have referenced the right thing, so you can sign the whole item.  Like in RFC 6920, that identifier could be augmented with a reference.

A hash also is expensive, on the order of several dozen bytes, so see below.

> 3) included in an application specific dictionary defined at the RFC-level.
>   (what Klaus was doing with CoRAL, I think)

I would generalize this a bit.  There may be some context that explains where to get the dictionary for.  To be able to sign such a packed item, there would need to be an immutable relationship between a context hint in the packed item and a dictionary (possibly identified by the hash of that).  An IANA registry can be used to maintain such a relationship.

> I had previously thought that (3) was just a rather static, 
> compiled-in version of (2), and only one or the other would be invoked.

I think we need to enable these dictionaries to evolve, so static, compiled-in may be true, but new versions of formats that employ packed items should be able to make use of new static, compiled-in dictionaries.  (The dictionary defined in RFC 3485 was never updated, but that is probably more about the deployment of SigComp.)

Grüße, Carsten