Draft: draft-ietf-cose-msg

Commentary: Message type is removed from the message structures and replaced with a set of CBOR tags at the start of the message . Place holder values are assigned to the CBOR tags for the purpose of creating the examples .
The COSE_MSG structure is a top level CBOR object that corresponds to
the DataContent type in the Cryptographic Message Syntax (CMS)
RFC5652.  [CREF4] This structure allows for a top level message to be
sent that could be any of the different security services.  The
security service is identified within the message.
The COSE_Tagged_MSG CBOR type takes the COSE_MSG and prepends a CBOR
tag of TBD1 to the encoding of COSE_MSG.  By having both a tagged and
untagged version of the COSE_MSG structure, it becomes easy to either
use COSE_MSG as a top level object or embedded in another object.
The tagged version allows for a method of placing the COSE_MSG
structure into a choice, using a consistent tag value to determine
that this is a COSE object.
The existence of the COSE_MSG and COSE_Tagged_MSG CBOR data types are
not intended to prevent protocols from using the individual security
primitives directly.  Where only a single service is required, that
structure can be used directly.
0 - Reserved.
1 - Signed Message.
Implementations MUST be prepared to find an integer in this field
that does not correspond to the values 1 to 3.  If a message type is
found then the client does not support the associated security
object, the client MUST stop attempting to process the structure and
fail.  The value of 0 is reserved and not assigned to a security
object.  If the value of 0 is found, then clients MUST fail
processing the structure.  Implementations need to recognize that the
set of values might be extended at a later date, but they should not
provide a security service based on guesses of what the security
object might be.
The COSE Message structure is designed so that there can be a large
amount of common code when parsing and processing the different
security messages.  All of the message structures are build on a CBOR
array type.  The first three elements of the array contains the same
basic information.  The first element is a set of protected header
information.  The second element is a set of unprotected header
information.  The third element is the content of the message (either
as plain text or encrypted).  Elements after this point are dependent
on the specific message type.
The specific message type is known from the context in which it is
placed.  This may be defined by a marker in the containing
structure or by restrictions specified by the application
protocol.
The message type is identified by a CBOR tag.  This document
defines a CBOR tag for each of the message structures.
The signature structure allows for one or more signatures to be
applied to a message payload.  There are provisions for parameters
about the content and parameters about the signature to be carried
along with the signature itself.  These parameters may be
authenticated by the signature, or just present.  Examples of
parameters about the content would be the type of content, when the
content was created, and who created the content.  [CREF9] Examples
of parameters about the signature would be the algorithm and key used
to create the signature, when the signature was created, and counter-
signatures.
The signature structure allows for one or more signatures to be
applied to a message payload.  There are provisions for parameters
about the content and parameters about the signature to be carried
along with the signature itself.  These parameters may be
authenticated by the signature, or just present.  Examples of
parameters about the content would be the type of content, when the
content was created, and who created the content.  [CREF5] Examples
of parameters about the signature would be the algorithm and key used
to create the signature, when the signature was created, and counter-
signatures.
identifies this as providing the signed security service.  The
value MUST be msg_type_signed (1).
identifies this as providing the encrypted security service.  The
value MUST be msg_type_encrypted (2).
identifies this as providing the encrypted data security service.
This value MUST be mg_type_encrypted (4).
identifies this as providing the encrypted security service.  The
value MUST be msg_type_mac (3).
It is requested that IANA assign a new tag from the "Concise Binary
Object Representation (CBOR) Tags" registry.  It is requested that
the tag be assigned in the 0 to 23 value range.
Semantics: COSE security message.
It is requested that IANA assign the following tags from the "Concise
Binary Object Representation (CBOR) Tags" registry.  It is requested
that the tags be assigned in the 24 to 128 value range.
This section registers the "application/cose" and "application/
cose+cbor" media types in the "Media Types" registry.  [CREF15] These
media types are used to indicate that the content is a COSE_MSG.
This section registers the "application/cose" and "application/
cose+cbor" media types in the "Media Types" registry.  [CREF11] These
media types are used to indicate that the content is a COSE_MSG.