Subject: [COSE] Call for Consensus: Distinguishing one vs many countersignatures

From: ivaylo petrov <[email-masked]>
Date: Thu, 28 Feb 2019 17:51:42 +0100

Dear all,

During the virtual interim on 02-15 a question was raised about
distinguishing one counter signature from array of counter signatures.
Currently it is not possible to achieve that based on top level tag alone,
one needs to dig down one level. While this is not a big problem, it could
be something that can be improved. On the negative side, existing
implementations of that, if any, might have to be modified.

Please respond whether or not you think we should make a change, that would
facilitate this distinction.

Best regards,

- Matthew and Ivaylo
COSE Chairs

---

From: Carsten Bormann <[email-masked]>
Date: Thu, 28 Feb 2019 22:16:24 +0100

Hi Ivaylo,

On Feb 28, 2019, at 17:51, ivaylo petrov <[email-masked]> wrote:
> 
> distinguishing one counter signature from array of counter signatures. Currently it is not possible to achieve that based on top level tag alone, one needs to dig down one level.

I missed the first half of the interim, sorry.
After skimming the minutes, I’m still not sure why exposing this information right in the top level tag would be a good thing.  Is that written up somewhere?

Grüße, Carsten

---

From: Jim Schaad <[email-masked]>
Date: Thu, 28 Feb 2019 13:30:22 -0800

A touch more explicit detail.

A counter signature is the same as a signer structure.  Thus it is a CBOR array with three elements (protected attributes, unprotected attributes, signature).

The attribute for holding a counter signature currently has the CDDL description of Counter Signature or array of Counter Signatures.

I am completely agnostic about whether or not this change should be made.  I ran across it while getting my counter signature code working correctly and the check is not difficult, but it does increase the code size while reducing the message size by one byte.

Jim

From: COSE <[email-masked]> On Behalf Of ivaylo petrov
Sent: Thursday, February 28, 2019 8:52 AM
To: cose <[email-masked]>
Subject: [COSE] Call for Consensus: Distinguishing one vs many countersignatures

Dear all,

During the virtual interim on 02-15 a question was raised about distinguishing one counter signature from array of counter signatures. Currently it is not possible to achieve that based on top level tag alone, one needs to dig down one level. While this is not a big problem, it could be something that can be improved. On the negative side, existing implementations of that, if any, might have to be modified.

Please respond whether or not you think we should make a change, that would facilitate this distinction.

Best regards,

- Matthew and Ivaylo

COSE Chairs

---

From: Jim Schaad <[email-masked]>
Date: Thu, 28 Feb 2019 13:32:16 -0800

> -----Original Message-----
> From: COSE <[email-masked]> On Behalf Of Carsten Bormann
> Sent: Thursday, February 28, 2019 1:16 PM
> To: ivaylo petrov <[email-masked]>
> Cc: cose <[email-masked]>
> Subject: Re: [COSE] Call for Consensus: Distinguishing one vs many
> countersignatures
> 
> Hi Ivaylo,
> 
> Currently it is not possible to achieve that based on top level tag alone, one
> needs to dig down one level.
> 
> After skimming the minutes, I’m still not sure why exposing this information
> right in the top level tag would be a good thing.  Is that written up
> somewhere?

The term tag is really my fault as I tend to swap tag and type in general.  Replace tag with type and you will be better off.

Jim

> 
> Grüße, Carsten
> 
> _______________________________________________
> COSE mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/cose

---

From: Carsten Bormann <[email-masked]>
Date: Thu, 28 Feb 2019 23:49:37 +0100

> The attribute for holding a counter signature currently has the CDDL description of Counter Signature or array of Counter Signatures.

Got it.

A choice between a single signer structure (which happens to be an array(*)) and an array of signer structures is indeed confusing.  I’d go with always having an array of signer structures, even if it has only one element (the one array that is the signer structure).  Cost: 1 byte (0x81).

Grüße, Carsten

(*) I’m probably the only one to call such an array with fixed positional semantics a “record”, since “structure” is for maps…  Erlang influence.