Draft: draft-ietf-cose-msg

Commentary: Deal with two reviews - Hannes and Ludwig . Kill appendix A - it does not seem to be necessary any more Clean up examples with excess blank lines .
The author did not always agree with some of the decisions made by
the JOSE working group.  Many of these decisions have been re-
examined, and where it seems to the author to be superior or
simpler, replaced.
COSE is not a direct copy of the JOSE specification.  In the
process of creating COSE, decisions that were made for JOSE were
re-examined.  In many cases different results were decided on as
the criteria were not always the same as for JOSE.
In JSON, maps are called objects and only have one kind of map key: a
string.  In COSE, we use both strings and integers (both negative and
non-negative integers) as map keys, as well as data items to identify
specific choices.  The integers (both positive and negative) are used
for compactness of encoding and easy comparison.  (Generally, in this
document the value zero is going to be reserved and not used.)  Since
the work "key" is mainly used in its other meaning, as a
cryptographic key, we use the term "label" for this usage of either
an integer or a string to identify map keys and choice data items.
In JSON, maps are called objects and only have one kind of map key: a
string.  In COSE, we use both strings and integers (both negative and
non-negative integers) as map keys, as well as data items to identify
specific choices.  The integers (both positive and negative) are used
for compactness of encoding and easy comparison.  (Generally, in this
document the value zero is going to be reserved and not used.)  Since
the work "key" is mainly used in its other meaning, as a
cryptographic key, we use the term "label" for this usage of either
an integer or a string to identify map keys and choose data items.
The COSE_MSG structure is a top level CBOR object that corresponds to
the DataContent type in the Cryptographic Message Syntax (CMS)
RFC5652.  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_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.
able to do a common connical encoding.
able to do a common canonical encoding.
This parameter holds either a nonce or Initialization Vector
value.  The value can be used either as a counter value for a
protocol or as an IV for an algorithm.
because the same as doing a singature with appendix.  Thirdly, in the
event that multple signatures are applied to a message, all of the
signature algorithms are going to be required to consume the same
number of bytes of message content.
becomes the same as doing a signature with appendix.  Thirdly, in the
event that multple signatures are applied to a message, all of the
signature algorithms are going to be required to consume the same
number of bytes of message content.
A new IV must be used if the same key is used in more than one
message.  The IV can be modified in a predictable manner, a random
manner or an unpredictable manner.  One unpredictable manner than can
be used is to use the HKDF function to generate the IV.  If HKDF is
used for generating the IV, the algorithm identifier is set to "IV-
GENERATION".
A new IV must be used if the same key is used in more than one
message.  The IV can be modified in a predictable manner, a random
manner or an unpredictable manner.  One unpredictable manner that can
be used is to use the HKDF function to generate the IV.  If HKDF is
used for generating the IV, the algorithm identifier is set to "IV-
GENERATION".