--- 1/draft-ietf-cose-rfc8152bis-algs-01.txt 2019-03-11 12:19:54.769307833 -0700 +++ 2/draft-ietf-cose-rfc8152bis-algs-02.txt 2019-03-11 12:19:55.005313604 -0700 @@ -1,37 +1,37 @@ COSE Working Group J. Schaad Internet-Draft August Cellars -Obsoletes: 8152 (if approved) February 14, 2019 +Obsoletes: 8152 (if approved) March 11, 2019 Intended status: Standards Track -Expires: August 18, 2019 +Expires: September 12, 2019 - CBOR Algorithms for Object Signing and Encryption (COSE) - draft-ietf-cose-rfc8152bis-algs-01 + CBOR Object Signing and Encryption (COSE): Initial Algorithms + draft-ietf-cose-rfc8152bis-algs-02 Abstract Concise Binary Object Representation (CBOR) is a data format designed for small code size and small message size. There is a need for the ability to have basic security services defined for this data format. This document defines the CBOR Object Signing and Encryption (COSE) protocol. This specification describes how to create and process signatures, message authentication codes, and encryption using CBOR for serialization. COSE additionally describes how to represent cryptographic keys using CBOR. In this specification the conventions for the use of a number of cryptographic algorithms with COSE. The details of the structure of - COSE are defined in [I-D.schaad-cose-rfc8152bis-struct]. + COSE are defined in [I-D.ietf-cose-rfc8152bis-struct]. - This document along with [I-D.schaad-cose-rfc8152bis-struct] - obsoletes RFC8152. + This document along with [I-D.ietf-cose-rfc8152bis-struct] obsoletes + RFC8152. Contributing to this document The source for this draft is being maintained in GitHub. Suggested changes should be submitted as pull requests at . Instructions are on that page as well. Editorial changes can be managed in GitHub, but any substantial issues need to be discussed on the COSE mailing list. Status of This Memo @@ -42,21 +42,21 @@ Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." - This Internet-Draft will expire on August 18, 2019. + This Internet-Draft will expire on September 12, 2019. Copyright Notice Copyright (c) 2019 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents @@ -66,103 +66,99 @@ the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Requirements Terminology . . . . . . . . . . . . . . . . 4 1.2. Changes from RFC8152 . . . . . . . . . . . . . . . . . . 4 1.3. Document Terminology . . . . . . . . . . . . . . . . . . 4 1.4. CBOR Grammar . . . . . . . . . . . . . . . . . . . . . . 4 - 2. Signature Algorithms . . . . . . . . . . . . . . . . . . . . 4 + 1.5. Examples . . . . . . . . . . . . . . . . . . . . . . . . 4 + 2. Signature Algorithms . . . . . . . . . . . . . . . . . . . . 5 2.1. ECDSA . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.1.1. Security Considerations . . . . . . . . . . . . . . . 6 2.2. Edwards-Curve Digital Signature Algorithms (EdDSAs) . . . 7 2.2.1. Security Considerations . . . . . . . . . . . . . . . 8 3. Message Authentication Code (MAC) Algorithms . . . . . . . . 8 - 3.1. Hash-Based Message Authentication Codes (HMACs) . . . . . 8 + 3.1. Hash-Based Message Authentication Codes (HMACs) . . . . . 9 3.1.1. Security Considerations . . . . . . . . . . . . . . . 10 3.2. AES Message Authentication Code (AES-CBC-MAC) . . . . . . 10 3.2.1. Security Considerations . . . . . . . . . . . . . . . 11 - 4. Content Encryption Algorithms . . . . . . . . . . . . . . . . 11 - 4.1. AES GCM . . . . . . . . . . . . . . . . . . . . . . . . . 11 - 4.1.1. Security Considerations . . . . . . . . . . . . . . . 12 + 4. Content Encryption Algorithms . . . . . . . . . . . . . . . . 12 + 4.1. AES GCM . . . . . . . . . . . . . . . . . . . . . . . . . 12 + 4.1.1. Security Considerations . . . . . . . . . . . . . . . 13 4.2. AES CCM . . . . . . . . . . . . . . . . . . . . . . . . . 13 - 4.2.1. Security Considerations . . . . . . . . . . . . . . . 15 - 4.3. ChaCha20 and Poly1305 . . . . . . . . . . . . . . . . . . 15 - 4.3.1. Security Considerations . . . . . . . . . . . . . . . 16 - 5. Key Derivation Functions (KDFs) . . . . . . . . . . . . . . . 16 + 4.2.1. Security Considerations . . . . . . . . . . . . . . . 16 + 4.3. ChaCha20 and Poly1305 . . . . . . . . . . . . . . . . . . 16 + 4.3.1. Security Considerations . . . . . . . . . . . . . . . 17 + 5. Key Derivation Functions (KDFs) . . . . . . . . . . . . . . . 17 5.1. HMAC-Based Extract-and-Expand Key Derivation Function - (HKDF) . . . . . . . . . . . . . . . . . . . . . . . . . 16 - 5.2. Context Information Structure . . . . . . . . . . . . . . 18 + (HKDF) . . . . . . . . . . . . . . . . . . . . . . . . . 18 - 6. Content Key Distribution Methods . . . . . . . . . . . . . . 23 - 6.1. Direct Key . . . . . . . . . . . . . . . . . . . . . . . 23 - 6.1.1. Security Considerations . . . . . . . . . . . . . . . 24 - 6.2. Direct Key with KDF . . . . . . . . . . . . . . . . . . . 24 - 6.2.1. Security Considerations . . . . . . . . . . . . . . . 25 - 6.3. AES Key Wrap . . . . . . . . . . . . . . . . . . . . . . 26 - 6.3.1. Security Considerations for AES-KW . . . . . . . . . 27 - 6.4. Direct ECDH . . . . . . . . . . . . . . . . . . . . . . . 27 - 6.4.1. Security Considerations . . . . . . . . . . . . . . . 29 - 6.5. ECDH with Key Wrap . . . . . . . . . . . . . . . . . . . 30 - 7. Key Object Parameters . . . . . . . . . . . . . . . . . . . . 32 - 7.1. Elliptic Curve Keys . . . . . . . . . . . . . . . . . . . 32 - 7.1.1. Double Coordinate Curves . . . . . . . . . . . . . . 33 - 7.2. Octet Key Pair . . . . . . . . . . . . . . . . . . . . . 34 - 7.3. Symmetric Keys . . . . . . . . . . . . . . . . . . . . . 35 - 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 35 - 8.1. COSE Algorithms Registry . . . . . . . . . . . . . . . . 35 - 8.2. COSE Key Type Parameters Registry . . . . . . . . . . . . 36 - 8.3. COSE Key Types Registry . . . . . . . . . . . . . . . . . 36 - 8.4. COSE Elliptic Curves Registry . . . . . . . . . . . . . . 37 - 8.5. Expert Review Instructions . . . . . . . . . . . . . . . 37 - 9. Security Considerations . . . . . . . . . . . . . . . . . . . 38 - 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 40 - 10.1. Normative References . . . . . . . . . . . . . . . . . . 40 - 10.2. Informative References . . . . . . . . . . . . . . . . . 42 - Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 43 - Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 43 - Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 44 + 5.2. Context Information Structure . . . . . . . . . . . . . . 19 + 6. Content Key Distribution Methods . . . . . . . . . . . . . . 24 + 6.1. Direct Encryption . . . . . . . . . . . . . . . . . . . . 24 + 6.1.1. Direct Key . . . . . . . . . . . . . . . . . . . . . 24 + 6.1.2. Direct Key with KDF . . . . . . . . . . . . . . . . . 25 + 6.2. AES Key Wrap . . . . . . . . . . . . . . . . . . . . . . 27 + 6.2.1. Security Considerations for AES-KW . . . . . . . . . 28 + 6.3. Direct ECDH . . . . . . . . . . . . . . . . . . . . . . . 28 + 6.3.1. Security Considerations . . . . . . . . . . . . . . . 30 + 6.4. ECDH with Key Wrap . . . . . . . . . . . . . . . . . . . 31 + 7. Key Object Parameters . . . . . . . . . . . . . . . . . . . . 33 + 7.1. Elliptic Curve Keys . . . . . . . . . . . . . . . . . . . 33 + 7.1.1. Double Coordinate Curves . . . . . . . . . . . . . . 34 + 7.2. Octet Key Pair . . . . . . . . . . . . . . . . . . . . . 35 + 7.3. Symmetric Keys . . . . . . . . . . . . . . . . . . . . . 36 + 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 36 + 9. Security Considerations . . . . . . . . . . . . . . . . . . . 36 + 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 38 + 10.1. Normative References . . . . . . . . . . . . . . . . . . 38 + 10.2. Informative References . . . . . . . . . . . . . . . . . 40 + Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 42 + Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 42 1. Introduction There has been an increased focus on small, constrained devices that make up the Internet of Things (IoT). One of the standards that has come out of this process is "Concise Binary Object Representation (CBOR)" [RFC7049]. CBOR extended the data model of the JavaScript Object Notation (JSON) [RFC8259] by allowing for binary data, among other changes. CBOR is being adopted by several of the IETF working groups dealing with the IoT world as their encoding of data structures. CBOR was designed specifically to be both small in terms of messages transport and implementation size and be a schema-free decoder. A need exists to provide message security services for IoT, and using CBOR as the message-encoding format makes sense. The core COSE specification consists of two documents. - [I-D.schaad-cose-rfc8152bis-struct] contains the serialization + [I-D.ietf-cose-rfc8152bis-struct] contains the serialization structures and the procedures for using the different cryptographic algorithms. This document provides for an initial set of algorithms that are then use with those structures. Additional algorithms beyond what are in this document are defined elsewhere. 1.1. Requirements Terminology The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. 1.2. Changes from RFC8152 - TBD + o Extract the sections dealing with specific algorithms into this + document. The sections dealing with structure and general + processing rules are placed in [I-D.ietf-cose-rfc8152bis-struct]. 1.3. Document Terminology In this document, we use the following terminology: Byte is a synonym for octet. Constrained Application Protocol (CoAP) is a specialized web transfer protocol for use in constrained systems. It is defined in [RFC7252]. @@ -173,26 +169,42 @@ Authenticated Encryption with Authenticated Data (AEAD) [RFC5116] algorithms provide the same content authentication service as AE algorithms, but they additionally provide for authentication of non- encrypted data as well. 1.4. CBOR Grammar At the time that [RFC8152] was initially published, the CBOR Data Definition Language (CDDL) [I-D.ietf-cbor-cddl] had not yet been published. This document uses a variant of CDDL which is described - in [I-D.schaad-cose-rfc8152bis-struct] + in [I-D.ietf-cose-rfc8152bis-struct] + +1.5. Examples + + A GitHub project has been created at that contains not only the examples presented in this + document, but a more complete set of testing examples as well. Each + example is found in a JSON file that contains the inputs used to + create the example, some of the intermediate values that can be used + in debugging the example and the output of the example presented in + both a hex and a CBOR diagnostic notation format. Some of the + examples at the site are designed failure testing cases; these are + clearly marked as such in the JSON file. If errors in the examples + in this document are found, the examples on GitHub will be updated, + and a note to that effect will be placed in the JSON file. 2. Signature Algorithms - The document defines signature algorithm identifiers for two - signature algorithms. + Section X.X of [I-D.ietf-cose-rfc8152bis-struct] + [I-D.ietf-cose-rfc8152bis-struct] contains a generic description of + signature algorithms. The document defines signature algorithm + identifiers for two signature algorithms. 2.1. ECDSA ECDSA [DSS] defines a signature algorithm using ECC. Implementations SHOULD use a deterministic version of ECDSA such as the one defined in [RFC6979]. The use of a deterministic signature algorithm allows for systems to avoid relying on random number generators in order to avoid generating the same value of 'k' (the per-message random value). Biased generation of the value 'k' can be attacked, and collisions of this value leads to leaked keys. It additionally @@ -352,21 +364,24 @@ and Elliptic Curve Diffie-Hellman (ECDH); for this reason, they should not be used with the other algorithm. If batch signature verification is performed, a well-seeded cryptographic random number generator is REQUIRED. Signing and non- batch signature verification are deterministic operations and do not need random numbers of any kind. 3. Message Authentication Code (MAC) Algorithms - This section defines the usages for two MAC algorithms. + Section X.X of [I-D.ietf-cose-rfc8152bis-struct] + [I-D.ietf-cose-rfc8152bis-struct] contains a generic description of + MAC algorithms. This section defines the conventions for two MAC + algorithms. 3.1. Hash-Based Message Authentication Codes (HMACs) HMAC [RFC2104] [RFC4231] was designed to deal with length extension attacks. The algorithm was also designed to allow for new hash algorithms to be directly plugged in without changes to the hash function. The HMAC design process has been shown as solid since, while the security of hash algorithms such as MD5 has decreased over time; the security of HMAC combined with MD5 has not yet been shown to be compromised [RFC6151]. @@ -495,22 +509,24 @@ o Cipher Block Chaining (CBC) mode, if the same key is used for both encryption and authentication operations, an attacker can produce messages with a valid authentication code. o If the IV can be modified, then messages can be forged. This is addressed by fixing the IV to all zeros. 4. Content Encryption Algorithms - This document defines the identifier and usages for three content - encryption algorithms. + Section X.X of [I-D.ietf-cose-rfc8152bis-struct] + [I-D.ietf-cose-rfc8152bis-struct] contains a generic description of + Content Encryption algorithms. This document defines the identifier + and usages for three content encryption algorithms. 4.1. AES GCM The Galois/Counter Mode (GCM) mode is a generic authenticated encryption block cipher mode defined in [AES-GCM]. The GCM mode is combined with the AES block encryption algorithm to define an AEAD cipher. The GCM mode is parameterized by the size of the authentication tag and the size of the nonce. This document fixes the size of the nonce @@ -740,24 +756,27 @@ 'unwrap key' when decrypting. 4.3.1. Security Considerations The key and nounce values MUST be a unique pair for every invocation of the algorithm. Nonce counters are considered to be an acceptable way of ensuring that they are unique. 5. Key Derivation Functions (KDFs) - This document defines a single context structure and a single KDF. - These elements are used for all of the recipient algorithms defined - in this document that require a KDF process. These algorithms are - defined in Sections 6.2, 6.4, and 6.5. + Section X.X of [I-D.ietf-cose-rfc8152bis-struct] + [I-D.ietf-cose-rfc8152bis-struct] contains a generic description of + Key Derivation Functions. This document defines a single context + structure and a single KDF. These elements are used for all of the + recipient algorithms defined in this document that require a KDF + process. These algorithms are defined in Sections 6.1.2, 6.3, and + 6.4. 5.1. HMAC-Based Extract-and-Expand Key Derivation Function (HKDF) The HKDF key derivation algorithm is defined in [RFC5869]. The HKDF algorithm takes these inputs: secret -- a shared value that is secret. Secrets may be either previously shared or derived from operations like a Diffie-Hellman (DH) key agreement. @@ -1063,62 +1082,72 @@ SuppPubInfo : [ keyDataLength : uint, protected : empty_or_serialized_map, ? other : bstr ], ? SuppPrivInfo : bstr ] 6. Content Key Distribution Methods - This document defines the identifiers and usage for a number of - content key distribution methods. + Section X.X of [I-D.ietf-cose-rfc8152bis-struct] + [I-D.ietf-cose-rfc8152bis-struct] contains a generic description of + content key distribution methods. This document defines the + identifiers and usage for a number of content key distribution + methods. -6.1. Direct Key +6.1. Direct Encryption + + Direct encryption algorithm is defined in Section X.X of [I-D.ietf- + cose-rfc8152bis-struct] [I-D.ietf-cose-rfc8152bis-struct]. + Information about how to fill in the COSE_Recipient structure are + detailed there. + +6.1.1. Direct Key This recipient algorithm is the simplest; the identified key is directly used as the key for the next layer down in the message. There are no algorithm parameters defined for this algorithm. The algorithm identifier value is assigned in Table 11. When this algorithm is used, the protected field MUST be zero length. The key type MUST be 'Symmetric'. +--------+-------+-------------------+ | Name | Value | Description | +--------+-------+-------------------+ | direct | -6 | Direct use of CEK | +--------+-------+-------------------+ Table 11: Direct Key -6.1.1. Security Considerations +6.1.1.1. Security Considerations This recipient algorithm has several potential problems that need to be considered: o These keys need to have some method to be regularly updated over time. All of the content encryption algorithms specified in this document have limits on how many times a key can be used without significant loss of security. o These keys need to be dedicated to a single algorithm. There have been a number of attacks developed over time when a single key is used for multiple different algorithms. One example of this is the use of a single key for both the CBC encryption mode and the CBC-MAC authentication mode. o Breaking one message means all messages are broken. If an adversary succeeds in determining the key for a single message, then the key for all messages is also determined. -6.2. Direct Key with KDF +6.1.2. Direct Key with KDF These recipient algorithms take a common shared secret between the two parties and applies the HKDF function (Section 5.1), using the context structure defined in Section 5.2 to transform the shared secret into the CEK. The 'protected' field can be of non-zero length. Either the 'salt' parameter of HKDF or the 'PartyU nonce' parameter of the context structure MUST be present. The salt/nonce parameter can be generated either randomly or deterministically. The requirement is that it be a unique value for the shared secret in question. @@ -1163,34 +1193,34 @@ made: o The 'kty' field MUST be present, and it MUST be 'Symmetric'. o If the 'alg' field is present, it MUST match the algorithm being used. o If the 'key_ops' field is present, it MUST include 'deriveKey' or 'deriveBits'. -6.2.1. Security Considerations +6.1.2.1. Security Considerations The shared secret needs to have some method to be regularly updated over time. The shared secret forms the basis of trust. Although not used directly, it should still be subject to scheduled rotation. While these methods do not provide for perfect forward secrecy, as the same shared secret is used for all of the keys generated, if the key for any single message is discovered, only the message (or series of messages) using that derived key are compromised. A new key derivation step will generate a new key that requires the same amount of work to get the key. -6.3. AES Key Wrap +6.2. AES Key Wrap The AES Key Wrap algorithm is defined in [RFC3394]. This algorithm uses an AES key to wrap a value that is a multiple of 64 bits. As such, it can be used to wrap a key for any of the content encryption algorithms defined in this document. The algorithm requires a single fixed parameter, the initial value. This is fixed to the value specified in Section 2.2.3.1 of [RFC3394]. There are no public parameters that vary on a per-invocation basis. The protected header field MUST be empty. @@ -1216,26 +1246,26 @@ +--------+-------+----------+-----------------------------+ | Name | Value | Key Size | Description | +--------+-------+----------+-----------------------------+ | A128KW | -3 | 128 | AES Key Wrap w/ 128-bit key | | A192KW | -4 | 192 | AES Key Wrap w/ 192-bit key | | A256KW | -5 | 256 | AES Key Wrap w/ 256-bit key | +--------+-------+----------+-----------------------------+ Table 13: AES Key Wrap Algorithm Values -6.3.1. Security Considerations for AES-KW +6.2.1. Security Considerations for AES-KW The shared secret needs to have some method to be regularly updated over time. The shared secret is the basis of trust. -6.4. Direct ECDH +6.3. Direct ECDH The mathematics for ECDH can be found in [RFC6090]. In this document, the algorithm is extended to be used with the two curves defined in [RFC7748]. ECDH is parameterized by the following: o Curve Type/Curve: The curve selected controls not only the size of the shared secret, but the mathematics for computing the shared secret. The curve selected also controls how a point in the curve @@ -1350,49 +1380,49 @@ o If the 'alg' field is present, it MUST match the key agreement algorithm being used. o If the 'key_ops' field is present, it MUST include 'derive key' or 'derive bits' for the private key. o If the 'key_ops' field is present, it MUST be empty for the public key. -6.4.1. Security Considerations +6.3.1. Security Considerations There is a method of checking that points provided from external entities are valid. For the 'EC2' key format, this can be done by checking that the x and y values form a point on the curve. For the 'OKP' format, there is no simple way to do point validation. Consideration was given to requiring that the public keys of both entities be provided as part of the key derivation process (as recommended in Section 6.1 of [RFC7748]). This was not done as COSE is used in a store and forward format rather than in online key exchange. In order for this to be a problem, either the receiver public key has to be chosen maliciously or the sender has to be malicious. In either case, all security evaporates anyway. A proof of possession of the private key associated with the public key is recommended when a key is moved from untrusted to trusted (either by the end user or by the entity that is responsible for making trust statements on keys). -6.5. ECDH with Key Wrap +6.4. ECDH with Key Wrap These algorithms are defined in Table 16. ECDH with Key Agreement is parameterized by the same parameters as - for ECDH; see Section 6.4, with the following modifications: + for ECDH; see Section 6.3, with the following modifications: o Key Wrap Algorithm: Any of the key wrap algorithms defined in - Section 6.3 are supported. The size of the key used for the key + Section 6.2 are supported. The size of the key used for the key wrap algorithm is fed into the KDF. The set of identifiers are found in Table 16. +-----------+-------+---------+------------+--------+---------------+ | Name | Value | KDF | Ephemeral- | Key | Description | | | | | Static | Wrap | | +-----------+-------+---------+------------+--------+---------------+ | ECDH-ES + | -29 | HKDF - | yes | A128KW | ECDH ES w/ | | A128KW | | SHA-256 | | | Concat KDF | | | | | | | and AES Key | @@ -1582,22 +1612,21 @@ structure. For private keys, it is REQUIRED that 'crv' and 'd' be present in the structure. For private keys, it is RECOMMENDED that 'x' also be present, but it can be recomputed from the required elements and omitting it saves on space. +------+-------+-------+--------+-----------------------------------+ | Name | Key | Label | Type | Description | | | Type | | | | +------+-------+-------+--------+-----------------------------------+ | crv | 1 | -1 | int / | EC identifier - Taken from the | - | | | | tstr | "COSE Key Common Parameters" | - | | | | | registry | + | | | | tstr | "COSE Elliptic Curves" registry | | x | 1 | -2 | bstr | x-coordinate | | d | 1 | -4 | bstr | Private key | +------+-------+-------+--------+-----------------------------------+ Table 20: Octet Key Pair Parameters 7.3. Symmetric Keys Occasionally it is required that a symmetric key be transported between entities. This key structure allows for that to happen. @@ -1616,139 +1645,21 @@ +------+----------+-------+------+-------------+ | Name | Key Type | Label | Type | Description | +------+----------+-------+------+-------------+ | k | 4 | -1 | bstr | Key Value | +------+----------+-------+------+-------------+ Table 21: Symmetric Key Parameters 8. IANA Considerations -8.1. COSE Algorithms Registry - - IANA created and populated the "COSE Algorithms" registry as part of - processing processing [RFC8152]. IANA is requested to update the for - individual algorithms from [RFC8152] to this document. - - This document does not modify the guidance for designated experts. - -8.2. COSE Key Type Parameters Registry - - IANA has created a new registry titled "COSE Key Type Parameters". - The registry has been created to use the "Expert Review Required" - registration procedure. Expert review guidelines are provided in - Section 8.5. - - The columns of the table are: - - Key Type: This field contains a descriptive string of a key type. - This should be a value that is in the "COSE Key Common Parameters" - registry and is placed in the 'kty' field of a COSE Key structure. - - Name: This is a descriptive name that enables easier reference to - the item. It is not used in the encoding. - - Label: The label is to be unique for every value of key type. The - range of values is from -65536 to -1. Labels are expected to be - reused for different keys. - - CBOR Type: This field contains the CBOR type for the field. - - Description: This field contains a brief description for the field. - - Reference: This contains a pointer to the public specification for - the field if one exists. - - This registry has been initially populated by the values in Tables - 19, 20, and 21. All of the entries in the "References" column of - this registry point to this document. - -8.3. COSE Key Types Registry - - IANA has created a new registry titled "COSE Key Types". The - registry has been created to use the "Expert Review Required" - registration procedure. Expert review guidelines are provided in - Section 8.5. - - The columns of this table are: - - Name: This is a descriptive name that enables easier reference to - the item. The name MUST be unique. It is not used in the - encoding. - - Value: This is the value used to identify the curve. These values - MUST be unique. The value can be a positive integer, a negative - integer, or a string. - - Description: This field contains a brief description of the curve. - - References: This contains a pointer to the public specification for - the curve if one exists. - - This registry has been initially populated by the values in Table 17. - The specification column for all of these entries will be this - document. - -8.4. COSE Elliptic Curves Registry - - IANA created and populated the "COSE Elliptic Curves" registry as - part of processing [RFC8152]. IANA is requested to change the - reference from [RFC8152] to this document for all values in the - registry. - - This document does not change the guidance for Designated Experts. - -8.5. Expert Review Instructions - - All of the IANA registries established in this document are defined - as expert review. This section gives some general guidelines for - what the experts should be looking for, but they are being designated - as experts for a reason, so they should be given substantial - latitude. - - Expert reviewers should take into consideration the following points: - - o Point squatting should be discouraged. Reviewers are encouraged - to get sufficient information for registration requests to ensure - that the usage is not going to duplicate one that is already - registered, and that the point is likely to be used in - deployments. The zones tagged as private use are intended for - testing purposes and closed environments; code points in other - ranges should not be assigned for testing. - - o Specifications are required for the standards track range of point - assignment. Specifications should exist for specification - required ranges, but early assignment before a specification is - available is considered to be permissible. Specifications are - needed for the first-come, first-serve range if they are expected - to be used outside of closed environments in an interoperable way. - When specifications are not provided, the description provided - needs to have sufficient information to identify what the point is - being used for. - - o Experts should take into account the expected usage of fields when - approving point assignment. The fact that there is a range for - standards track documents does not mean that a standards track - document cannot have points assigned outside of that range. The - length of the encoded value should be weighed against how many - code points of that length are left, the size of device it will be - used on, and the number of code points left that encode to that - size. - - o When algorithms are registered, vanity registrations should be - discouraged. One way to do this is to require registrations to - provide additional documentation on security analysis of the - algorithm. Another thing that should be considered is requesting - an opinion on the algorithm from the Crypto Forum Research Group - (CFRG). Algorithms that do not meet the security requirements of - the community and the messages structures should not be - registered. + There are no IANA actions. 9. Security Considerations There are a number of security considerations that need to be taken into account by implementers of this specification. The security considerations that are specific to an individual algorithm are placed next to the description of the algorithm. While some considerations have been highlighted here, additional considerations may be found in the documents listed in the references. @@ -1846,24 +1757,24 @@ Publication 800-38D, DOI 10.6028/NIST.SP.800-38D, November 2007, . [DSS] National Institute of Standards and Technology, "Digital Signature Standard (DSS)", FIPS PUB 186-4, DOI 10.6028/NIST.FIPS.186-4, July 2013, . - [I-D.schaad-cose-rfc8152bis-struct] + [I-D.ietf-cose-rfc8152bis-struct] Schaad, J., "CBOR Object Signing and Encryption (COSE) - - Structures and Process", draft-schaad-cose-rfc8152bis- - struct-01 (work in progress), December 2018. + Structures and Process", draft-ietf-cose-rfc8152bis- + struct-01 (work in progress), February 2019. [MAC] National Institute of Standards and Technology, "Computer Data Authentication", FIPS PUB 113, May 1985, . [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- Hashing for Message Authentication", RFC 2104, DOI 10.17487/RFC2104, February 1997, . @@ -1977,34 +1888,20 @@ [SP800-56A] Barker, E., Chen, L., Roginsky, A., and M. Smid, "Recommendation for Pair-Wise Key Establishment Schemes Using Discrete Logarithm Cryptography", NIST Special Publication 800-56A, Revision 2, DOI 10.6028/NIST.SP.800-56Ar2, May 2013, . -Appendix A. Examples - - A GitHub project has been created at that contains not only the examples presented in this - document, but a more complete set of testing examples as well. Each - example is found in a JSON file that contains the inputs used to - create the example, some of the intermediate values that can be used - in debugging the example and the output of the example presented in - both a hex and a CBOR diagnostic notation format. Some of the - examples at the site are designed failure testing cases; these are - clearly marked as such in the JSON file. If errors in the examples - in this document are found, the examples on GitHub will be updated, - and a note to that effect will be placed in the JSON file. - Acknowledgments This document is a product of the COSE working group of the IETF. The following individuals are to blame for getting me started on this project in the first place: Richard Barnes, Matt Miller, and Martin Thomson. The initial version of the specification was based to some degree on the outputs of the JOSE and S/MIME working groups.