cose-wg / cose-issues

COSE Working Group Issues
0 stars 1 forks source link

Change “Senders SHOULD encode” to “Senders MUST encode” #26

Closed selfissued closed 8 years ago

selfissued commented 9 years ago

The description of the “protected” field in Section 3 says “Senders SHOULD encode an empty protected map as a zero length binary object (it is shorter).” Such uses of “SHOULD” will result in interoperability problems. Therefore, please change the “SHOULD” to a “MUST”.

jimsch commented 9 years ago

There are two options that can be used here for encoding a protected header with no entries. It can be either a zero length binary string that is encoded, or it can be a zero length map that is encoded. There is no interopability issue as both of these are valid. The first is dealt with as a special case while the second just falls out from the normal case of there being any items in the map (i.e. the code to parse a map with 1 item or with 0 items is identical). This is a recommendation that one method ought to be used. This is the correct usage of a SHOULD.