clarification: when I wrote "The COSE messages are around 52 Bytes.." I wanted to say the COSE messages *of my particular application*; but let's forget that.
On Tue, Apr 18, 2017 at 11:46 AM, Renzo Navas <[email protected]> wrote: > Hello Cose ML! > (Sorry for the late reply, I didn't see the replies the same day; then > I was on holidays) > > Jim: > thanks for the suggestion. Indeed I think I will go for this option to > keep the solution non-homebrew. I will borrow from the CoAP > Content-Formats (application/cose-key : 101) and put this in the > protected headers. > I think this solution will be 3 bytes (1B content-type label + 2B to > represent "101") instead of 1 byte of the hypothetical CBOR Tag for > COSE-Key (19 or 20 looked nice). > > Carsten: > I am using CoAP (..for now) but I want the least possible COSE > metadata on the CoAP header; to make the COSE message as agnostic as > possible of the transport (maybe we will transport this message > over-foo). In my particular case, I simply use the CoAP Content-format > 60 to indicate that this is an "application/cbor" payload. > Then I use the CBOR-Tag 16 (COSE_Encrypt0), because indeed that is > what this CBOR message is. So even if I use CoAP metadata for COSE I > should indicate this message as "application/cose; > cose-type="cose-encrypt0" (16). > > My 'problem' arose when, once decrypted; the plaintext part of the > COSE_Encrypt0 contains , in some cases, a COSE_Key object; and I > simply wanted to indicate that with a 1-byte tag . Jim's suggestions > of content-type in protected header solves my problem indeed. > > > So maybe the question I want to ask to the ML is: > > why you discarded defining the COSE_Key/COSE_KeySet CBOR tag? ( I see > the pretty tags 19 and 20 unassigned) > Carsten, I really agree with your opinion from 2015 : > >>I'd propose this rule: >>If there is a media type, there should be a CBOR tag for those >>environments that don't benefit from media types. > In the end, it's a matter of 2 bytes, 1 byte tag, vs 3 byte protected > header content-type. > The COSE messages are around 52 Bytes, so It's a matter of 4% longer > Messages/Energy. > > I found it strange not to find a CBOR tag for a mayor COSE type. > > These are my 2 cents, > > Thank you for your quick reply Jim and Carsten! > > Renzo > > > On Fri, Apr 7, 2017 at 6:14 PM, Carsten Bormann <[email protected]> wrote: >> Hi Renzo, >> >> where would you put such a tag? >> >> Starting the encoded CBOR with a tag would amount to a magic number unless >> the media type already indicates that this is CBOR-encoded. But then it >> could indicate that this is a application/cose-key in the first place >> (Content-Format 101): >> >> https://www.iana.org/assignments/core-parameters/core-parameters.xhtml#content-formats >> >> Grüße, Carsten >> _______________________________________________ COSE mailing list [email protected] https://www.ietf.org/mailman/listinfo/cose
