Closed EskoDijk closed 2 years ago
Points from list dicussion:
I don't think we need additional things in the COSE_Sign1 level of things. We will be getting a TBD3, Content-Format allocated which the Pledge ought to be into the CoAP Accept (17) Option (on the request), and the Registrar ought to be putting into the CoAP Content-Format (12) option.
The Pledge POST operation should perhaps be marking the Content of the POSTed object. It may be that we need a TBD4 to designate voucher-request, but we did not do that in RFC8995. Perhaps that was a mistake.
Note that https://www.ietf.org/archive/id/draft-ietf-cbor-file-magic-03.html#name-cbor-tags-for-coap-content- means that if we have a Content-Format, then we also have a cbor-file-magic Tag number that we can use on disk. We may wish to specify if we recommend CBOR Seq or CBOR Tag mechanism.
Regarding CBOR Tags, the CBOR data may start with a Tag 18 (COSE_Sign1) so this already tells a parser of the standalone Voucher object that it is a COSE-sign1-signed CBOR data. By design a COSE_Sign1 object includes CBOR data so including an additional CF=60 within the sign1 structure (first bullet in my prev comment) would be utterly useless - it's always CBOR.
In my view the additional inclusion of a CF=TBD4 in the sign1-object doesn't add much benefit in terms of security or context-less format representation, as the CBOR payload already encodes whether it is a voucher or voucher-request using the YANG/SID semantics. This is something a parser of the sign1 object could and should easily detect without risk.
If we use that Tag 18 (COSE_Sign1) as usual on the sign1 object, then I don't think we need a CBOR file magic tag.
Usually, in other drafts, it is a choice to use a tag or a content format to announce what is transported. Limiting to a tag I have not seen examples of.
See discussion on the list; some think an explicit 'content type' parameter is needed in the COSE_Sign1 object.
Logically this would then have value 60 (CBOR). (There is no cf number allocated for "Voucher in CBOR". And value TBD3 is not correct. ). This will add 3 bytes to the Voucher Request and Voucher sizes.