draft-ietf-cose-rfc8152bis-algs-09.txt   draft-ietf-cose-rfc8152bis-algs-10.txt 
COSE Working Group J. Schaad COSE Working Group J. Schaad
Internet-Draft August Cellars Internet-Draft August Cellars
Obsoletes: 8152 (if approved) 2 June 2020 Obsoletes: 8152 (if approved) 26 June 2020
Intended status: Standards Track Intended status: Informational
Expires: 4 December 2020 Expires: 28 December 2020
CBOR Object Signing and Encryption (COSE): Initial Algorithms CBOR Object Signing and Encryption (COSE): Initial Algorithms
draft-ietf-cose-rfc8152bis-algs-09 draft-ietf-cose-rfc8152bis-algs-10
Abstract Abstract
Concise Binary Object Representation (CBOR) is a data format designed Concise Binary Object Representation (CBOR) is a data format designed
for small code size and small message size. There is a need for the 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. ability to have basic security services defined for this data format.
This document defines the CBOR Object Signing and Encryption (COSE) THis document defines a set of algorithms that can be used with the
protocol. This specification describes how to create and process CBOR Object Signing and Encryption (COSE) protocol RFC XXXX.
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.ietf-cose-rfc8152bis-struct].
This document along with [I-D.ietf-cose-rfc8152bis-struct] obsoletes
RFC8152.
Contributing to this document Contributing to this document
This note is to be removed before publishing as an RFC. This note is to be removed before publishing as an RFC.
The source for this draft is being maintained in GitHub. Suggested The source for this draft is being maintained in GitHub. Suggested
changes should be submitted as pull requests at https://github.com/ changes should be submitted as pull requests at https://github.com/
cose-wg/cose-rfc8152bis. Instructions are on that page as well. cose-wg/cose-rfc8152bis. Instructions are on that page as well.
Editorial changes can be managed in GitHub, but any substantial Editorial changes can be managed in GitHub, but any substantial
issues need to be discussed on the COSE mailing list. issues need to be discussed on the COSE mailing list.
skipping to change at page 2, line 10 skipping to change at page 1, line 45
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on 4 December 2020. This Internet-Draft will expire on 28 December 2020.
Copyright Notice Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents (https://trustee.ietf.org/ Provisions Relating to IETF Documents (https://trustee.ietf.org/
license-info) in effect on the date of publication of this document. license-info) in effect on the date of publication of this document.
Please review these documents carefully, as they describe your rights Please review these documents carefully, as they describe your rights
skipping to change at page 2, line 50 skipping to change at page 2, line 43
3.1. Hash-Based Message Authentication Codes (HMACs) . . . . . 9 3.1. Hash-Based Message Authentication Codes (HMACs) . . . . . 9
3.1.1. Security Considerations . . . . . . . . . . . . . . . 11 3.1.1. Security Considerations . . . . . . . . . . . . . . . 11
3.2. AES Message Authentication Code (AES-CBC-MAC) . . . . . . 11 3.2. AES Message Authentication Code (AES-CBC-MAC) . . . . . . 11
3.2.1. Security Considerations . . . . . . . . . . . . . . . 12 3.2.1. Security Considerations . . . . . . . . . . . . . . . 12
4. Content Encryption Algorithms . . . . . . . . . . . . . . . . 12 4. Content Encryption Algorithms . . . . . . . . . . . . . . . . 12
4.1. AES GCM . . . . . . . . . . . . . . . . . . . . . . . . . 12 4.1. AES GCM . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.1.1. Security Considerations . . . . . . . . . . . . . . . 13 4.1.1. Security Considerations . . . . . . . . . . . . . . . 13
4.2. AES CCM . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.2. AES CCM . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.2.1. Security Considerations . . . . . . . . . . . . . . . 17 4.2.1. Security Considerations . . . . . . . . . . . . . . . 17
4.3. ChaCha20 and Poly1305 . . . . . . . . . . . . . . . . . . 18 4.3. ChaCha20 and Poly1305 . . . . . . . . . . . . . . . . . . 18
4.3.1. Security Considerations . . . . . . . . . . . . . . . 18 4.3.1. Security Considerations . . . . . . . . . . . . . . . 19
5. Key Derivation Functions (KDFs) . . . . . . . . . . . . . . . 19 5. Key Derivation Functions (KDFs) . . . . . . . . . . . . . . . 19
5.1. HMAC-Based Extract-and-Expand Key Derivation Function 5.1. HMAC-Based Extract-and-Expand Key Derivation Function
(HKDF) . . . . . . . . . . . . . . . . . . . . . . . . . 19 (HKDF) . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.2. Context Information Structure . . . . . . . . . . . . . . 21 5.2. Context Information Structure . . . . . . . . . . . . . . 21
6. Content Key Distribution Methods . . . . . . . . . . . . . . 26 6. Content Key Distribution Methods . . . . . . . . . . . . . . 26
6.1. Direct Encryption . . . . . . . . . . . . . . . . . . . . 26 6.1. Direct Encryption . . . . . . . . . . . . . . . . . . . . 27
6.1.1. Direct Key . . . . . . . . . . . . . . . . . . . . . 27 6.1.1. Direct Key . . . . . . . . . . . . . . . . . . . . . 27
6.1.2. Direct Key with KDF . . . . . . . . . . . . . . . . . 28 6.1.2. Direct Key with KDF . . . . . . . . . . . . . . . . . 28
6.2. AES Key Wrap . . . . . . . . . . . . . . . . . . . . . . 29 6.2. Key Wrap . . . . . . . . . . . . . . . . . . . . . . . . 29
6.2.1. Security Considerations for AES-KW . . . . . . . . . 30 6.2.1. AES Key Wrap . . . . . . . . . . . . . . . . . . . . 30
6.3. Direct ECDH . . . . . . . . . . . . . . . . . . . . . . . 30 6.3. Direct Key Agreement . . . . . . . . . . . . . . . . . . 31
6.3.1. Security Considerations . . . . . . . . . . . . . . . 34 6.3.1. Direct ECDH . . . . . . . . . . . . . . . . . . . . . 31
6.4. ECDH with Key Wrap . . . . . . . . . . . . . . . . . . . 34 6.4. Key Agreement with Key Wrap . . . . . . . . . . . . . . . 34
7. Key Object Parameters . . . . . . . . . . . . . . . . . . . . 36 6.4.1. ECDH with Key Wrap . . . . . . . . . . . . . . . . . 35
7.1. Elliptic Curve Keys . . . . . . . . . . . . . . . . . . . 36 7. Key Object Parameters . . . . . . . . . . . . . . . . . . . . 37
7.1.1. Double Coordinate Curves . . . . . . . . . . . . . . 37 7.1. Elliptic Curve Keys . . . . . . . . . . . . . . . . . . . 37
7.2. Octet Key Pair . . . . . . . . . . . . . . . . . . . . . 38 7.1.1. Double Coordinate Curves . . . . . . . . . . . . . . 38
7.3. Symmetric Keys . . . . . . . . . . . . . . . . . . . . . 39 7.2. Octet Key Pair . . . . . . . . . . . . . . . . . . . . . 39
8. COSE Capabilities . . . . . . . . . . . . . . . . . . . . . . 40 7.3. Symmetric Keys . . . . . . . . . . . . . . . . . . . . . 40
8.1. Assignments for Existing Key Types . . . . . . . . . . . 40 8. COSE Capabilities . . . . . . . . . . . . . . . . . . . . . . 41
8.2. Assignments for Existing Algorithms . . . . . . . . . . . 41 8.1. Assignments for Existing Algorithms . . . . . . . . . . . 42
8.3. Examples . . . . . . . . . . . . . . . . . . . . . . . . 41 8.2. Assignments for Existing Key Types . . . . . . . . . . . 42
9. CBOR Encoding Restrictions . . . . . . . . . . . . . . . . . 42 8.3. Examples . . . . . . . . . . . . . . . . . . . . . . . . 42
10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 42 9. CBOR Encoding Restrictions . . . . . . . . . . . . . . . . . 45
10.1. Changes to "COSE Key Types" registry. . . . . . . . . . 42 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 45
10.2. Changes to "COSE Algorithms" registry . . . . . . . . . 43 10.1. Changes to "COSE Key Types" registry. . . . . . . . . . 45
10.3. Changes to the "COSE Key Type Parameters" registry . . . 43 10.2. Changes to "COSE Algorithms" registry . . . . . . . . . 46
11. Security Considerations . . . . . . . . . . . . . . . . . . . 44 10.3. Changes to the "COSE Key Type Parameters" registry . . . 46
12. References . . . . . . . . . . . . . . . . . . . . . . . . . 46 10.4. COSE Header Algorithm Parameters Registry . . . . . . . 47
12.1. Normative References . . . . . . . . . . . . . . . . . . 46 10.5. Expert Review Instructions . . . . . . . . . . . . . . . 47
12.2. Informative References . . . . . . . . . . . . . . . . . 48 11. Security Considerations . . . . . . . . . . . . . . . . . . . 48
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 50 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 50
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 50 12.1. Normative References . . . . . . . . . . . . . . . . . . 50
12.2. Informative References . . . . . . . . . . . . . . . . . 52
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 54
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 55
1. Introduction 1. Introduction
There has been an increased focus on small, constrained devices that There has been an increased focus on small, constrained devices that
make up the Internet of Things (IoT). One of the standards that has make up the Internet of Things (IoT). One of the standards that has
come out of this process is "Concise Binary Object Representation come out of this process is "Concise Binary Object Representation
(CBOR)" [RFC7049]. CBOR extended the data model of the JavaScript (CBOR)" [RFC7049]. CBOR extended the data model of JavaScript Object
Object Notation (JSON) [RFC8259] by allowing for binary data, among Notation (JSON) [STD90] by allowing for binary data, among other
other changes. CBOR is being adopted by several of the IETF working changes. CBOR is being adopted by several of the IETF working groups
groups dealing with the IoT world as their encoding of data dealing with the IoT world as their encoding of data structures.
structures. CBOR was designed specifically to be both small in terms CBOR was designed specifically to be both small in terms of messages
of messages transport and implementation size and be a schema-free transported and implementation size and be a schema-free decoder. A
decoder. A need exists to provide message security services for IoT, need exists to provide message security services for IoT, and using
and using CBOR as the message-encoding format makes sense. CBOR as the message-encoding format makes sense.
The core COSE specification consists of two documents. The core COSE specification consists of two documents.
[I-D.ietf-cose-rfc8152bis-struct] contains the serialization [I-D.ietf-cose-rfc8152bis-struct] contains the serialization
structures and the procedures for using the different cryptographic structures and the procedures for using the different cryptographic
algorithms. This document provides an initial set of algorithms for algorithms. This document provides an initial set of algorithms for
use with those structures. Additional algorithms beyond what are in use with those structures.
this document are defined elsewhere.
1.1. Requirements Terminology 1.1. Requirements Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP "OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here. capitals, as shown here.
1.2. Changes from RFC8152 1.2. Changes from RFC8152
skipping to change at page 4, line 37 skipping to change at page 4, line 30
1.3. Document Terminology 1.3. Document Terminology
In this document, we use the following terminology: In this document, we use the following terminology:
Byte is a synonym for octet. Byte is a synonym for octet.
Constrained Application Protocol (CoAP) is a specialized web transfer Constrained Application Protocol (CoAP) is a specialized web transfer
protocol for use in constrained systems. It is defined in [RFC7252]. protocol for use in constrained systems. It is defined in [RFC7252].
Authenticated Encryption (AE) [RFC5116] algorithms are those Authenticated Encryption (AE) [RFC5116] algorithms are encryption
encryption algorithms that provide an authentication check of the algorithms that provide an authentication check of the contents with
plain text contents as part of the encryption service. the encryption service. An example of an AE algorithm used in COSE
is AES Key Wrap [RFC3394]. These algorithms are used for key
encryption algorithms, but AEAD algorithms would be preferred.
Authenticated Encryption with Associated Data (AEAD) [RFC5116] Authenticated Encryption with Associated Data (AEAD) [RFC5116]
algorithms provide the same content authentication service as AE algorithms provide the same authentication service of the content as
algorithms, but they additionally provide for authentication of non- AE algorithms do. They also allow for associated data to be included
encrypted data as well. in the authentication service, but which is not part of the encrypted
body. An example of an AEAD algorithm used in COSE is AES-GCM
[RFC5116]. These algorithms are used for content encryption and can
be used for key encryption as well.
The term 'byte string' is used for sequences of bytes, while the term The term 'byte string' is used for sequences of bytes, while the term
'text string' is used for sequences of characters. 'text string' is used for sequences of characters.
The tables for algorithms contain the following columns: The tables for algorithms contain the following columns:
* A name for use in documents for the algorithms. * A name for use in documents for the algorithms.
* The value used on the wire for the algorithm. One place this is * The value used on the wire for the algorithm. One place this is
used is the algorithm header parameter of a message. used is the algorithm header parameter of a message.
skipping to change at page 5, line 19 skipping to change at page 5, line 16
when scanning the IANA registry. when scanning the IANA registry.
Additional columns may be present in the table depending on the Additional columns may be present in the table depending on the
algorithms. algorithms.
1.4. CBOR Grammar 1.4. CBOR Grammar
At the time that [RFC8152] was initially published, the CBOR Data At the time that [RFC8152] was initially published, the CBOR Data
Definition Language (CDDL) [RFC8610] had not yet been published. Definition Language (CDDL) [RFC8610] had not yet been published.
This document uses a variant of CDDL which is described in This document uses a variant of CDDL which is described in
[I-D.ietf-cose-rfc8152bis-struct] [I-D.ietf-cose-rfc8152bis-struct].
1.5. Examples 1.5. Examples
A GitHub project has been created at <https://github.com/cose-wg/ A GitHub project has been created at [GitHub-Examples] that contains
Examples> that contains a set of testing examples as well. Each a set of testing examples as well. Each example is found in a JSON
example is found in a JSON file that contains the inputs used to file that contains the inputs used to create the example, some of the
create the example, some of the intermediate values that can be used intermediate values that can be used for debugging, and the output of
for debugging, and the output of the example. The results are the example. The results are encoded using both hexadecimal and CBOR
encoded using both hexadecimal and CBOR diagnostic notation format. diagnostic notation format.
Some of the examples are designed to test failure case; these are Some of the examples are designed to test failure case; these are
clearly marked as such in the JSON file. If errors in the examples 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, 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. and a note to that effect will be placed in the JSON file.
2. Signature Algorithms 2. Signature Algorithms
Part Section 9.1 of [I-D.ietf-cose-rfc8152bis-struct] contains a Section 9.1 of [I-D.ietf-cose-rfc8152bis-struct] contains a generic
generic description of signature algorithms. The document defines description of signature algorithms. The document defines signature
signature algorithm identifiers for two signature algorithms. algorithm identifiers for two signature algorithms.
2.1. ECDSA 2.1. ECDSA
ECDSA [DSS] defines a signature algorithm using ECC. Implementations ECDSA [DSS] defines a signature algorithm using ECC. Implementations
SHOULD use a deterministic version of ECDSA such as the one defined SHOULD use a deterministic version of ECDSA such as the one defined
in [RFC6979]. The use of a deterministic signature algorithm allows in [RFC6979]. The use of a deterministic signature algorithm allows
for systems to avoid relying on random number generators in order to for systems to avoid relying on random number generators in order to
avoid generating the same value of 'k' (the per-message random avoid generating the same value of 'k' (the per-message random
value). Biased generation of the value 'k' can be attacked, and value). Biased generation of the value 'k' can be attacked, and
collisions of this value leads to leaked keys. It additionally collisions of this value leads to leaked keys. It additionally
skipping to change at page 6, line 26 skipping to change at page 6, line 26
+-------+-------+---------+------------------+ +-------+-------+---------+------------------+
| ES384 | -35 | SHA-384 | ECDSA w/ SHA-384 | | ES384 | -35 | SHA-384 | ECDSA w/ SHA-384 |
+-------+-------+---------+------------------+ +-------+-------+---------+------------------+
| ES512 | -36 | SHA-512 | ECDSA w/ SHA-512 | | ES512 | -36 | SHA-512 | ECDSA w/ SHA-512 |
+-------+-------+---------+------------------+ +-------+-------+---------+------------------+
Table 1: ECDSA Algorithm Values Table 1: ECDSA Algorithm Values
This document defines ECDSA to work only with the curves P-256, This document defines ECDSA to work only with the curves P-256,
P-384, and P-521. This document requires that the curves be encoded P-384, and P-521. This document requires that the curves be encoded
using the 'EC2' (2 coordinate elliptic curve) key type. using the 'EC2' (two coordinate elliptic curve) key type.
Implementations need to check that the key type and curve are correct Implementations need to check that the key type and curve are correct
when creating and verifying a signature. Other documents can define when creating and verifying a signature. Future documents may define
it to work with other curves and points in the future. it to work with other curves and points in the future.
In order to promote interoperability, it is suggested that SHA-256 be In order to promote interoperability, it is suggested that SHA-256 be
used only with curve P-256, SHA-384 be used only with curve P-384, used only with curve P-256, SHA-384 be used only with curve P-384,
and SHA-512 be used with curve P-521. This is aligned with the and SHA-512 be used with curve P-521. This is aligned with the
recommendation in Section 4 of [RFC5480]. recommendation in Section 4 of [RFC5480].
The signature algorithm results in a pair of integers (R, S). These The signature algorithm results in a pair of integers (R, S). These
integers will be the same length as the length of the key used for integers will be the same length as the length of the key used for
the signature process. The signature is encoded by converting the the signature process. The signature is encoded by converting the
skipping to change at page 7, line 26 skipping to change at page 7, line 26
2.1.1. Security Considerations 2.1.1. Security Considerations
The security strength of the signature is no greater than the minimum The security strength of the signature is no greater than the minimum
of the security strength associated with the bit length of the key of the security strength associated with the bit length of the key
and the security strength of the hash function. and the security strength of the hash function.
Note: Use of a deterministic signature technique is a good idea even Note: Use of a deterministic signature technique is a good idea even
when good random number generation exists. Doing so both reduces the when good random number generation exists. Doing so both reduces the
possibility of having the same value of 'k' in two signature possibility of having the same value of 'k' in two signature
operations and allows for reproducible signature values, which helps operations and allows for reproducible signature values, which helps
testing. testing. There have been recent attacks involving faulting the
device in order to extract the key. This can be addressed by
combining both randomness and determinism
[I-D.mattsson-cfrg-det-sigs-with-noise].
There are two substitution attacks that can theoretically be mounted There are two substitution attacks that can theoretically be mounted
against the ECDSA signature algorithm. against the ECDSA signature algorithm.
* Changing the curve used to validate the signature: If one changes * Changing the curve used to validate the signature: If one changes
the curve used to validate the signature, then potentially one the curve used to validate the signature, then potentially one
could have two messages with the same signature, each computed could have two messages with the same signature, each computed
under a different curve. The only requirement on the new curve is under a different curve. The only requirement on the new curve is
that its order be the same as the old one and it be acceptable to that its order be the same as the old one and it be acceptable to
the client. An example would be to change from using the curve the client. An example would be to change from using the curve
secp256r1 (aka P-256) to using secp256k1. (Both are 256-bit secp256r1 (aka P-256) to using secp256k1. (Both are 256-bit
curves.) We currently do not have any way to deal with this curves.) We currently do not have any way to deal with this
version of the attack except to restrict the overall set of curves version of the attack except to restrict the overall set of curves
that can be used. that can be used.
* Change the hash function used to validate the signature: If one * Change the hash function used to validate the signature: If one
either has two different hash functions of the same length or can either has two different hash functions of the same length or can
truncate a hash function down, then one could potentially find truncate a hash function, then one could potentially find
collisions between the hash functions rather than within a single collisions between the hash functions rather than within a single
hash function (for example, truncating SHA-512 to 256 bits might hash function (for example, truncating SHA-512 to 256 bits might
collide with a SHA-256 bit hash value). As the hash algorithm is collide with a SHA-256 bit hash value). As the hash algorithm is
part of the signature algorithm identifier, this attack is part of the signature algorithm identifier, this attack is
mitigated by including a signature algorithm identifier in the mitigated by including a signature algorithm identifier in the
protected header bucket. protected header bucket.
2.2. Edwards-Curve Digital Signature Algorithms (EdDSAs) 2.2. Edwards-Curve Digital Signature Algorithms (EdDSAs)
[RFC8032] describes the elliptic curve signature scheme Edwards-curve [RFC8032] describes the elliptic curve signature scheme Edwards-curve
skipping to change at page 9, line 14 skipping to change at page 9, line 22
* If the 'key_ops' field is present, it MUST include 'sign' when * If the 'key_ops' field is present, it MUST include 'sign' when
creating an EdDSA signature. creating an EdDSA signature.
* If the 'key_ops' field is present, it MUST include 'verify' when * If the 'key_ops' field is present, it MUST include 'verify' when
verifying an EdDSA signature. verifying an EdDSA signature.
2.2.1. Security Considerations 2.2.1. Security Considerations
How public values are computed is not the same when looking at EdDSA How public values are computed is not the same when looking at EdDSA
and Elliptic Curve Diffie-Hellman (ECDH); for this reason, they and Elliptic Curve Diffie-Hellman (ECDH); for this reason, the public
should not be used with the other algorithm. key should not be used with the other algorithm.
If batch signature verification is performed, a well-seeded If batch signature verification is performed, a well-seeded
cryptographic random number generator is REQUIRED. Signing and non- cryptographic random number generator is REQUIRED (Section 8.2 of
batch signature verification are deterministic operations and do not [RFC8032]). Signing and non-batch signature verification are
need random numbers of any kind. deterministic operations and do not need random numbers of any kind.
3. Message Authentication Code (MAC) Algorithms 3. Message Authentication Code (MAC) Algorithms
Part Section 9.2 of [I-D.ietf-cose-rfc8152bis-struct] contains a Section 9.2 of [I-D.ietf-cose-rfc8152bis-struct] contains a generic
generic description of MAC algorithms. This section defines the description of MAC algorithms. This section defines the conventions
conventions for two MAC algorithms. for two MAC algorithms.
3.1. Hash-Based Message Authentication Codes (HMACs) 3.1. Hash-Based Message Authentication Codes (HMACs)
HMAC [RFC2104] [RFC4231] was designed to deal with length extension HMAC [RFC2104] [RFC4231] was designed to deal with length extension
attacks. The algorithm was also designed to allow for new hash attacks. The algorithm was also designed to allow for new hash
algorithms to be directly plugged in without changes to the hash algorithms to be directly plugged in without changes to the hash
function. The HMAC design process has been shown as solid since, function. The HMAC design process has been shown as solid since,
while the security of hash algorithms such as MD5 has decreased over 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 time; the security of HMAC combined with MD5 has not yet been shown
to be compromised [RFC6151]. to be compromised [RFC6151].
skipping to change at page 10, line 26 skipping to change at page 10, line 31
+-------------+-------+---------+------------+----------------------+ +-------------+-------+---------+------------+----------------------+
| HMAC | 7 | SHA-512 | 512 | HMAC w/ SHA-512 | | HMAC | 7 | SHA-512 | 512 | HMAC w/ SHA-512 |
| 512/512 | | | | | | 512/512 | | | | |
+-------------+-------+---------+------------+----------------------+ +-------------+-------+---------+------------+----------------------+
Table 3: HMAC Algorithm Values Table 3: HMAC Algorithm Values
Some recipient algorithms transport the key, while others derive a Some recipient algorithms transport the key, while others derive a
key from secret data. For those algorithms that transport the key key from secret data. For those algorithms that transport the key
(such as AES Key Wrap), the size of the HMAC key SHOULD be the same (such as AES Key Wrap), the size of the HMAC key SHOULD be the same
size as the underlying hash function. For those algorithms that size as the output of the underlying hash function. For those
derive the key (such as ECDH), the derived key MUST be the same size algorithms that derive the key (such as ECDH), the derived key MUST
as the underlying hash function. be the same size as the underlying hash function.
When using a COSE key for this algorithm, the following checks are When using a COSE key for this algorithm, the following checks are
made: made:
* The 'kty' field MUST be present, and it MUST be 'Symmetric'. * The 'kty' field MUST be present, and it MUST be 'Symmetric'.
* If the 'alg' field is present, it MUST match the HMAC algorithm * If the 'alg' field is present, it MUST match the HMAC algorithm
being used. being used.
* If the 'key_ops' field is present, it MUST include 'MAC create' * If the 'key_ops' field is present, it MUST include 'MAC create'
skipping to change at page 11, line 19 skipping to change at page 11, line 19
force the key. This means that key size is going to be directly force the key. This means that key size is going to be directly
related to the security of an HMAC operation. related to the security of an HMAC operation.
3.2. AES Message Authentication Code (AES-CBC-MAC) 3.2. AES Message Authentication Code (AES-CBC-MAC)
AES-CBC-MAC is defined in [MAC]. (Note that this is not the same AES-CBC-MAC is defined in [MAC]. (Note that this is not the same
algorithm as AES Cipher-Based Message Authentication Code (AES-CMAC) algorithm as AES Cipher-Based Message Authentication Code (AES-CMAC)
[RFC4493].) [RFC4493].)
AES-CBC-MAC is parameterized by the key length, the authentication AES-CBC-MAC is parameterized by the key length, the authentication
tag length, and the IV used. For all of these algorithms, the IV is tag length, and the Initialization Vector (IV) used. For all of
fixed to all zeros. We provide an array of algorithms for various these algorithms, the IV is fixed to all zeros. We provide an array
key lengths and tag lengths. The algorithms defined in this document of algorithms for various key lengths and tag lengths. The
are found in Table 4. algorithms defined in this document are found in Table 4.
+---------+-------+------------+------------+------------------+ +---------+-------+------------+------------+------------------+
| Name | Value | Key Length | Tag Length | Description | | Name | Value | Key Length | Tag Length | Description |
+=========+=======+============+============+==================+ +=========+=======+============+============+==================+
| AES-MAC | 14 | 128 | 64 | AES-MAC 128-bit | | AES-MAC | 14 | 128 | 64 | AES-MAC 128-bit |
| 128/64 | | | | key, 64-bit tag | | 128/64 | | | | key, 64-bit tag |
+---------+-------+------------+------------+------------------+ +---------+-------+------------+------------+------------------+
| AES-MAC | 15 | 256 | 64 | AES-MAC 256-bit | | AES-MAC | 15 | 256 | 64 | AES-MAC 256-bit |
| 256/64 | | | | key, 64-bit tag | | 256/64 | | | | key, 64-bit tag |
+---------+-------+------------+------------+------------------+ +---------+-------+------------+------------+------------------+
skipping to change at page 12, line 27 skipping to change at page 12, line 27
Authentication Code (CBC-MAC) that need to be considered. Authentication Code (CBC-MAC) that need to be considered.
* A single key must only be used for messages of a fixed or known * A single key must only be used for messages of a fixed or known
length. If this is not the case, an attacker will be able to length. If this is not the case, an attacker will be able to
generate a message with a valid tag given two message and tag generate a message with a valid tag given two message and tag
pairs. This can be addressed by using different keys for messages pairs. This can be addressed by using different keys for messages
of different lengths. The current structure mitigates this of different lengths. The current structure mitigates this
problem, as a specific encoding structure that includes lengths is problem, as a specific encoding structure that includes lengths is
built and signed. (CMAC also addresses this issue.) built and signed. (CMAC also addresses this issue.)
* Cipher Block Chaining (CBC) mode, if the same key is used for both * In cipher Block Chaining (CBC) mode, if the same key is used for
encryption and authentication operations, an attacker can produce both encryption and authentication operations, an attacker can
messages with a valid authentication code. produce messages with a valid authentication code.
* If the IV can be modified, then messages can be forged. This is * If the IV can be modified, then messages can be forged. This is
addressed by fixing the IV to all zeros. addressed by fixing the IV to all zeros.
4. Content Encryption Algorithms 4. Content Encryption Algorithms
Part Section 9.3 of [I-D.ietf-cose-rfc8152bis-struct] contains a Section 9.3 of [I-D.ietf-cose-rfc8152bis-struct] contains a generic
generic description of Content Encryption algorithms. This document description of Content Encryption algorithms. This document defines
defines the identifier and usages for three content encryption the identifier and usages for three content encryption algorithms.
algorithms.
4.1. AES GCM 4.1. AES GCM
The Galois/Counter Mode (GCM) mode is a generic authenticated The Galois/Counter Mode (GCM) mode is a generic AEAD block cipher
encryption block cipher mode defined in [AES-GCM]. The GCM mode is mode defined in [AES-GCM]. The GCM mode is combined with the AES
combined with the AES block encryption algorithm to define an AEAD block encryption algorithm to define an AEAD cipher.
cipher.
The GCM mode is parameterized by the size of the authentication tag 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 and the size of the nonce. This document fixes the size of the nonce
at 96 bits. The size of the authentication tag is limited to a small at 96 bits. The size of the authentication tag is limited to a small
set of values. For this document however, the size of the set of values. For this document however, the size of the
authentication tag is fixed at 128 bits. authentication tag is fixed at 128 bits.
The set of algorithms defined in this document are in Table 5. The set of algorithms defined in this document are in Table 5.
+---------+-------+------------------------------------------+ +---------+-------+------------------------------------------+
skipping to change at page 13, line 44 skipping to change at page 13, line 42
* If the 'key_ops' field is present, it MUST include 'decrypt' or * If the 'key_ops' field is present, it MUST include 'decrypt' or
'unwrap key' when decrypting. 'unwrap key' when decrypting.
4.1.1. Security Considerations 4.1.1. Security Considerations
When using AES-GCM, the following restrictions MUST be enforced: When using AES-GCM, the following restrictions MUST be enforced:
* The key and nonce pair MUST be unique for every message encrypted. * The key and nonce pair MUST be unique for every message encrypted.
* The total amount of data encrypted for a single key MUST NOT * The total number of messages encrypted for a single key MUST NOT
exceed 2^39 - 256 bits. An explicit check is required only in exceed 2^32 [SP800-38d]. An explicit check is required only in
environments where it is expected that it might be exceeded. environments where it is expected that it might be exceeded.
* A more recent analysis in [ROBUST] indicates that the the number
of failed decryptions needs to be taken into account as part
determining when a key roll-over is to be done. Following the
recommendation of for DTLS, the number of failed message
decryptions should be limited to 2^36.
Consideration was given to supporting smaller tag values; the Consideration was given to supporting smaller tag values; the
constrained community would desire tag sizes in the 64-bit range. constrained community would desire tag sizes in the 64-bit range.
Doing so drastically changes both the maximum messages size Doing so drastically changes both the maximum messages size
(generally not an issue) and the number of times that a key can be (generally not an issue) and the number of times that a key can be
used. Given that Counter with CBC-MAC (CCM) is the usual mode for used. Given that Counter with CBC-MAC (CCM) is the usual mode for
constrained environments, restricted modes are not supported. constrained environments, restricted modes are not supported.
4.2. AES CCM 4.2. AES CCM
CCM is a generic authentication encryption block cipher mode defined CCM is a generic authentication encryption block cipher mode defined
skipping to change at page 17, line 37 skipping to change at page 17, line 37
* The key and nonce pair MUST be unique for every message encrypted. * The key and nonce pair MUST be unique for every message encrypted.
Note that the value of L influences the number of unique nonces. Note that the value of L influences the number of unique nonces.
* The total number of times the AES block cipher is used MUST NOT * The total number of times the AES block cipher is used MUST NOT
exceed 2^61 operations. This limitation is the sum of times the exceed 2^61 operations. This limitation is the sum of times the
block cipher is used in computing the MAC value and in performing block cipher is used in computing the MAC value and in performing
stream encryption operations. An explicit check is required only stream encryption operations. An explicit check is required only
in environments where it is expected that it might be exceeded. in environments where it is expected that it might be exceeded.
* [I-D.ietf-quic-tls] contains an analysis on the use of AES-CCM in
that environment. Based on that reommendation, one should
restrict the number of messages encrypted to 2^23. If one is
using the 64-bit tag, then the limits are signficantly smaller if
one wants to keep the same integrity limits. A protocol
recommending this needs to analysis what level of integrity is
acceptable for the smaller tag size. It may be that to keep the
desired integrity one needs to re-key as often as every 2^7
messages.
* In addition to the number of messages successfully decrypted, the
number of failed decryptions needs to be kept as well. If the
number of failed decryptions exceeds 2^23 then a rekeying
operation should occur.
[RFC3610] additionally calls out one other consideration of note. It [RFC3610] additionally calls out one other consideration of note. It
is possible to do a pre-computation attack against the algorithm in is possible to do a pre-computation attack against the algorithm in
cases where portions of the plaintext are highly predictable. This cases where portions of the plaintext are highly predictable. This
reduces the security of the key size by half. Ways to deal with this reduces the security of the key size by half. Ways to deal with this
attack include adding a random portion to the nonce value and/or attack include adding a random portion to the nonce value and/or
increasing the key size used. Using a portion of the nonce for a increasing the key size used. Using a portion of the nonce for a
random value will decrease the number of messages that a single key random value will decrease the number of messages that a single key
can be used for. Increasing the key size may require more resources can be used for. Increasing the key size may require more resources
in the constrained device. See Sections 5 and 10 of [RFC3610] for in the constrained device. See Sections 5 and 10 of [RFC3610] for
more information. more information.
skipping to change at page 18, line 26 skipping to change at page 18, line 37
ciphertext as an option. We define one algorithm identifier for this ciphertext as an option. We define one algorithm identifier for this
algorithm in Table 7. algorithm in Table 7.
+-------------------+-------+--------------------------+ +-------------------+-------+--------------------------+
| Name | Value | Description | | Name | Value | Description |
+===================+=======+==========================+ +===================+=======+==========================+
| ChaCha20/Poly1305 | 24 | ChaCha20/Poly1305 w/ | | ChaCha20/Poly1305 | 24 | ChaCha20/Poly1305 w/ |
| | | 256-bit key, 128-bit tag | | | | 256-bit key, 128-bit tag |
+-------------------+-------+--------------------------+ +-------------------+-------+--------------------------+
Table 7: Algorithm Value for AES-GCM Table 7: Algorithm Value for ChaCha20/Poly1305
Keys may be obtained either from a key structure or from a recipient Keys may be obtained either from a key structure or from a recipient
structure. Implementations encrypting and decrypting MUST validate structure. Implementations encrypting and decrypting MUST validate
that the key type, key length, and algorithm are correct and that the key type, key length, and algorithm are correct and
appropriate for the entities involved. appropriate for the entities involved.
When using a COSE key for this algorithm, the following checks are When using a COSE key for this algorithm, the following checks are
made: made:
* The 'kty' field MUST be present, and it MUST be 'Symmetric'. * The 'kty' field MUST be present, and it MUST be 'Symmetric'.
skipping to change at page 19, line 5 skipping to change at page 19, line 17
* If the 'key_ops' field is present, it MUST include 'decrypt' or * If the 'key_ops' field is present, it MUST include 'decrypt' or
'unwrap key' when decrypting. 'unwrap key' when decrypting.
4.3.1. Security Considerations 4.3.1. Security Considerations
The key and nonce values MUST be a unique pair for every invocation The key and nonce values MUST be a unique pair for every invocation
of the algorithm. Nonce counters are considered to be an acceptable of the algorithm. Nonce counters are considered to be an acceptable
way of ensuring that they are unique. way of ensuring that they are unique.
A more recent analysis in [ROBUST] indicates that the the number of
failed decryptions needs to be taken into account as part determining
when a key roll-over is to be done. Following the recommendation of
for DTLS, the number of failed message decryptions should be limited
to 2^36.
[I-D.ietf-quic-tls] recommends that no more than 2^24.5 messages be
encrypted under a single key.
5. Key Derivation Functions (KDFs) 5. Key Derivation Functions (KDFs)
Part Section 9.4 of [I-D.ietf-cose-rfc8152bis-struct] contains a Section 9.4 of [I-D.ietf-cose-rfc8152bis-struct] contains a generic
generic description of Key Derivation Functions. This document description of Key Derivation Functions. This document defines a
defines a single context structure and a single KDF. These elements single context structure and a single KDF. These elements are used
are used for all of the recipient algorithms defined in this document for all of the recipient algorithms defined in this document that
that require a KDF process. These algorithms are defined in Sections require a KDF process. These algorithms are defined in Sections
6.1.2, 6.3, and 6.4. 6.1.2, 6.3.1, and 6.4.1.
5.1. HMAC-Based Extract-and-Expand Key Derivation Function (HKDF) 5.1. HMAC-Based Extract-and-Expand Key Derivation Function (HKDF)
The HKDF key derivation algorithm is defined in [RFC5869]. The HKDF key derivation algorithm is defined in [RFC5869][HKDF].
The HKDF algorithm takes these inputs: The HKDF algorithm takes these inputs:
secret -- a shared value that is secret. Secrets may be either secret -- a shared value that is secret. Secrets may be either
previously shared or derived from operations like a Diffie-Hellman previously shared or derived from operations like a Diffie-Hellman
(DH) key agreement. (DH) key agreement.
salt -- an optional value that is used to change the generation salt -- an optional value that is used to change the generation
process. The salt value can be either public or private. If the process. The salt value can be either public or private. If the
salt is public and carried in the message, then the 'salt' salt is public and carried in the message, then the 'salt'
skipping to change at page 26, line 37 skipping to change at page 26, line 48
SuppPubInfo : [ SuppPubInfo : [
keyDataLength : uint, keyDataLength : uint,
protected : empty_or_serialized_map, protected : empty_or_serialized_map,
? other : bstr ? other : bstr
], ],
? SuppPrivInfo : bstr ? SuppPrivInfo : bstr
] ]
6. Content Key Distribution Methods 6. Content Key Distribution Methods
Part Section 9.5 of [I-D.ietf-cose-rfc8152bis-struct] contains a Section 9.5 of [I-D.ietf-cose-rfc8152bis-struct] contains a generic
generic description of content key distribution methods. This description of content key distribution methods. This document
document defines the identifiers and usage for a number of content defines the identifiers and usage for a number of content key
key distribution methods. distribution methods.
6.1. Direct Encryption 6.1. Direct Encryption
Direct encryption algorithm is defined in Part Section 9.5.1 of Direct encryption algorithm is defined in Section 9.5.1 of
[I-D.ietf-cose-rfc8152bis-struct]. Information about how to fill in [I-D.ietf-cose-rfc8152bis-struct]. Information about how to fill in
the COSE_Recipient structure are detailed there. the COSE_Recipient structure are detailed there.
6.1.1. Direct Key 6.1.1. Direct Key
This recipient algorithm is the simplest; the identified key is This recipient algorithm is the simplest; the identified key is
directly used as the key for the next layer down in the message. directly used as the key for the next layer down in the message.
There are no algorithm parameters defined for this algorithm. The There are no algorithm parameters defined for this algorithm. The
algorithm identifier value is assigned in Table 11. algorithm identifier value is assigned in Table 11.
skipping to change at page 28, line 18 skipping to change at page 28, line 18
two parties and applies the HKDF function (Section 5.1), using the two parties and applies the HKDF function (Section 5.1), using the
context structure defined in Section 5.2 to transform the shared context structure defined in Section 5.2 to transform the shared
secret into the CEK. The 'protected' field can be of non-zero secret into the CEK. The 'protected' field can be of non-zero
length. Either the 'salt' parameter of HKDF or the 'PartyU nonce' length. Either the 'salt' parameter of HKDF or the 'PartyU nonce'
parameter of the context structure MUST be present. The salt/nonce parameter of the context structure MUST be present. The salt/nonce
parameter can be generated either randomly or deterministically. The parameter can be generated either randomly or deterministically. The
requirement is that it be a unique value for the shared secret in requirement is that it be a unique value for the shared secret in
question. question.
If the salt/nonce value is generated randomly, then it is suggested If the salt/nonce value is generated randomly, then it is suggested
that the length of the random value be the same length as the hash that the length of the random value be the same length as the output
function underlying HKDF. While there is no way to guarantee that it of the hash function underlying HKDF. While there is no way to
will be unique, there is a high probability that it will be unique. guarantee that it will be unique, there is a high probability that it
If the salt/nonce value is generated deterministically, it can be will be unique. If the salt/nonce value is generated
guaranteed to be unique, and thus there is no length requirement. deterministically, it can be guaranteed to be unique, and thus there
is no length requirement.
A new IV must be used for each message if the same key is used. The A new IV must be used for each message if the same key is used. The
IV can be modified in a predictable manner, a random manner, or an IV can be modified in a predictable manner, a random manner, or an
unpredictable manner (i.e., encrypting a counter). unpredictable manner (i.e., encrypting a counter).
The IV used for a key can also be generated from the same HKDF The IV used for a key can also be generated from the same HKDF
functionality as the key is generated. If HKDF is used for functionality as the key is generated. If HKDF is used for
generating the IV, the algorithm identifier is set to "IV- generating the IV, the algorithm identifier is set to "IV-
GENERATION". GENERATION".
skipping to change at page 29, line 29 skipping to change at page 29, line 47
over time. The shared secret forms the basis of trust. Although not over time. The shared secret forms the basis of trust. Although not
used directly, it should still be subject to scheduled rotation. used directly, it should still be subject to scheduled rotation.
While these methods do not provide for perfect forward secrecy, as 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 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 key for any single message is discovered, only the message (or series
of messages) using that derived key are compromised. A new key of messages) using that derived key are compromised. A new key
derivation step will generate a new key that requires the same amount derivation step will generate a new key that requires the same amount
of work to get the key. of work to get the key.
6.2. AES Key Wrap 6.2. Key Wrap
Key wrap is defined in Section 9.5.1 of
[I-D.ietf-cose-rfc8152bis-struct]. Information about how to fill in
the COSE_Recipient structure is detailed there.
6.2.1. AES Key Wrap
The AES Key Wrap algorithm is defined in [RFC3394]. This algorithm 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 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 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 algorithms defined in this document. The algorithm requires a single
fixed parameter, the initial value. This is fixed to the value fixed parameter, the initial value. This is fixed to the value
specified in Section 2.2.3.1 of [RFC3394]. There are no public key specified in Section 2.2.3.1 of [RFC3394]. There are no public key
parameters that vary on a per-invocation basis. The protected header parameters that vary on a per-invocation basis. The protected header
bucket MUST be empty. bucket MUST be empty.
skipping to change at page 30, line 23 skipping to change at page 30, line 47
+========+=======+==========+=============================+ +========+=======+==========+=============================+
| A128KW | -3 | 128 | AES Key Wrap w/ 128-bit key | | A128KW | -3 | 128 | AES Key Wrap w/ 128-bit key |
+--------+-------+----------+-----------------------------+ +--------+-------+----------+-----------------------------+
| A192KW | -4 | 192 | AES Key Wrap w/ 192-bit key | | A192KW | -4 | 192 | AES Key Wrap w/ 192-bit key |
+--------+-------+----------+-----------------------------+ +--------+-------+----------+-----------------------------+
| A256KW | -5 | 256 | AES Key Wrap w/ 256-bit key | | A256KW | -5 | 256 | AES Key Wrap w/ 256-bit key |
+--------+-------+----------+-----------------------------+ +--------+-------+----------+-----------------------------+
Table 13: AES Key Wrap Algorithm Values Table 13: AES Key Wrap Algorithm Values
6.2.1. Security Considerations for AES-KW 6.2.1.1. Security Considerations for AES-KW
The shared secret needs to have some method to be regularly updated The shared secret needs to have some method to be regularly updated
over time. The shared secret is the basis of trust. over time. The shared secret is the basis of trust.
6.3. Direct ECDH 6.3. Direct Key Agreement
Key Transport is defined in Section 9.5.4 of
[I-D.ietf-cose-rfc8152bis-struct]. Information about how to fill in
the COSE_Recipient structure is detailed there.
6.3.1. Direct ECDH
The mathematics for ECDH can be found in [RFC6090]. In this The mathematics for ECDH can be found in [RFC6090]. In this
document, the algorithm is extended to be used with the two curves document, the algorithm is extended to be used with the two curves
defined in [RFC7748]. defined in [RFC7748].
ECDH is parameterized by the following: ECDH is parameterized by the following:
* Curve Type/Curve: The curve selected controls not only the size of * Curve Type/Curve: The curve selected controls not only the size of
the shared secret, but the mathematics for computing the shared the shared secret, but the mathematics for computing the shared
secret. The curve selected also controls how a point in the curve secret. The curve selected also controls how a point in the curve
skipping to change at page 31, line 27 skipping to change at page 31, line 52
ephemeral key for every key agreement operation. The ephemeral ephemeral key for every key agreement operation. The ephemeral
key is placed in the 'ephemeral key' parameter and MUST be present key is placed in the 'ephemeral key' parameter and MUST be present
for all algorithm identifiers that use ephemeral keys. When using for all algorithm identifiers that use ephemeral keys. When using
static keys, the sender MUST either generate a new random value or static keys, the sender MUST either generate a new random value or
create a unique value. For the KDFs used, this means either the create a unique value. For the KDFs used, this means either the
'salt' parameter for HKDF (Table 9) or the 'PartyU nonce' 'salt' parameter for HKDF (Table 9) or the 'PartyU nonce'
parameter for the context structure (Table 10) MUST be present parameter for the context structure (Table 10) MUST be present
(both can be present if desired). The value in the parameter MUST (both can be present if desired). The value in the parameter MUST
be unique for the pair of keys being used. It is acceptable to be unique for the pair of keys being used. It is acceptable to
use a global counter that is incremented for every static-static use a global counter that is incremented for every static-static
operation and use the resulting value. When using static keys, operation and use the resulting value. Care must be taken that
the static key should be identified to the recipient. The static the counter is saved to permanent storage in a way to avoid reuse
key can be identified either by providing the key ('static key') of that counter value. When using static keys, the static key
or by providing a key identifier for the static key ('static key should be identified to the recipient. The static key can be
id'). Both of these header parameters are defined in Table 15. identified either by providing the key ('static key') or by
providing a key identifier for the static key ('static key id').
Both of these header parameters are defined in Table 15.
* Key Derivation Algorithm: The result of an ECDH key agreement * Key Derivation Algorithm: The result of an ECDH key agreement
process does not provide a uniformly random secret. As such, it process does not provide a uniformly random secret. As such, it
needs to be run through a KDF in order to produce a usable key. needs to be run through a KDF in order to produce a usable key.
Processing the secret through a KDF also allows for the Processing the secret through a KDF also allows for the
introduction of context material: how the key is going to be used introduction of context material: how the key is going to be used
and one-time material for static-static key agreement. All of the and one-time material for static-static key agreement. All of the
algorithms defined in this document use one of the HKDF algorithms algorithms defined in this document use one of the HKDF algorithms
defined in Section 5.1 with the context structure defined in defined in Section 5.1 with the context structure defined in
Section 5.2. Section 5.2.
skipping to change at page 34, line 5 skipping to change at page 34, line 25
* If the 'alg' field is present, it MUST match the key agreement * If the 'alg' field is present, it MUST match the key agreement
algorithm being used. algorithm being used.
* If the 'key_ops' field is present, it MUST include 'derive key' or * If the 'key_ops' field is present, it MUST include 'derive key' or
'derive bits' for the private key. 'derive bits' for the private key.
* If the 'key_ops' field is present, it MUST be empty for the public * If the 'key_ops' field is present, it MUST be empty for the public
key. key.
6.3.1. Security Considerations 6.3.1.1. Security Considerations
There is a method of checking that points provided from external There is a method of checking that points provided from external
entities are valid. For the 'EC2' key format, this can be done by 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 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. 'OKP' format, there is no simple way to do point validation.
Consideration was given to requiring that the public keys of both Consideration was given to requiring that the public keys of both
entities be provided as part of the key derivation process (as entities be provided as part of the key derivation process (as
recommended in Section 6.4 of [RFC7748]). This was not done as COSE recommended in Section 6.4 of [RFC7748]). This was not done as COSE
is used in a store and forward format rather than in online key 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 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 public key has to be chosen maliciously or the sender has to be
malicious. In either case, all security evaporates anyway. malicious. In either case, all security evaporates anyway.
A proof of possession of the private key associated with the public A proof of possession of the private key associated with the public
key is recommended when a key is moved from untrusted to trusted 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 (either by the end user or by the entity that is responsible for
making trust statements on keys). making trust statements on keys).
6.4. ECDH with Key Wrap 6.4. Key Agreement with Key Wrap
Key Agreement with Key Wrap is defined in Section 9.5.5 of
[I-D.ietf-cose-rfc8152bis-struct]. Information about how to fill in
the COSE_Recipient structure are detailed there.
6.4.1. ECDH with Key Wrap
These algorithms are defined in Table 16. These algorithms are defined in Table 16.
ECDH with Key Agreement is parameterized by the same header ECDH with Key Agreement is parameterized by the same header
parameters as for ECDH; see Section 6.3, with the following parameters as for ECDH; see Section 6.3.1, with the following
modifications: modifications:
* Key Wrap Algorithm: Any of the key wrap algorithms defined in * Key Wrap Algorithm: Any of the key wrap algorithms defined in
Section 6.2 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 wrap algorithm is fed into the KDF. The set of identifiers are
found in Table 16. found in Table 16.
+---------+-------+---------+------------+--------+----------------+ +---------+-------+---------+------------+--------+----------------+
| Name | Value | KDF | Ephemeral- | Key | Description | | Name | Value | KDF | Ephemeral- | Key | Description |
| | | | Static | Wrap | | | | | | Static | Wrap | |
skipping to change at page 38, line 50 skipping to change at page 39, line 50
The key parameters defined in this section are summarized in The key parameters defined in this section are summarized in
Table 20. The members that are defined for this key type are: Table 20. The members that are defined for this key type are:
crv: This contains an identifier of the curve to be used with the crv: This contains an identifier of the curve to be used with the
key. The curves defined in this document for this key type can key. The curves defined in this document for this key type can
be found in Table 18. Other curves may be registered in the be found in Table 18. Other curves may be registered in the
future and private curves can be used as well. future and private curves can be used as well.
x: This contains the public key. The byte string contains the x: This contains the public key. The byte string contains the
public key as defined by the algorithm. (For X25591, internally public key as defined by the algorithm. (For X25519, internally
it is a little-endian integer.) it is a little-endian integer.)
d: This contains the private key. d: This contains the private key.
For public keys, it is REQUIRED that 'crv' and 'x' be present in the For public keys, it is REQUIRED that 'crv' and 'x' be present in the
structure. For private keys, it is REQUIRED that 'crv' and 'd' be structure. For private keys, it is REQUIRED that 'crv' and 'd' be
present in the structure. For private keys, it is RECOMMENDED that present in the structure. For private keys, it is RECOMMENDED that
'x' also be present, but it can be recomputed from the required 'x' also be present, but it can be recomputed from the required
elements and omitting it saves on space. elements and omitting it saves on space.
skipping to change at page 40, line 8 skipping to change at page 41, line 8
| Name | Key Type | Label | Type | Description | | Name | Key Type | Label | Type | Description |
+======+==========+=======+======+=============+ +======+==========+=======+======+=============+
| k | 4 | -1 | bstr | Key Value | | k | 4 | -1 | bstr | Key Value |
+------+----------+-------+------+-------------+ +------+----------+-------+------+-------------+
Table 21: Symmetric Key Parameters Table 21: Symmetric Key Parameters
8. COSE Capabilities 8. COSE Capabilities
There are some situations that have been identified where There are some situations that have been identified where
identification of capabilities of an algorithm need to be specified. identification of capabilities of an algorithm or a key type need to
One example of this is in [I-D.ietf-core-oscore-groupcomm] where the be specified. One example of this is in
capabilities of the counter signature algorithm are mixed into the [I-D.ietf-core-oscore-groupcomm] where the capabilities of the
traffic key derivation process. This has a counterpart in the S/MIME counter signature algorithm are mixed into the traffic key derivation
specifications where SMIMECapabilities is defined in Section 2.5.2 of process. This has a counterpart in the S/MIME specifications where
[RFC8551]. The concept is being pulled forward and defined now for SMIMECapabilities is defined in Section 2.5a.2 of [RFC8551]. This
COSE. document defines the same concept for COSE.
The algorithm identifier is not part of the capabilities data as it The algorithm identifier is not included in the capabilities data as
should already be part of message structure. There is a presumption it should be encoded elsewhere in the message. The key type
in the way that this is laid out is that the algorithm identifier identifier is included in the capabilities data as it is not expected
itself is not needed to be a part of this as it is specified in a to be encoded elsewhere.
different location.
Two different types of capabilities are defined: capabilities for Two different types of capabilities are defined: capabilities for
algorithms and capabilities for key structures. Once defined by algorithms and capabilities for key type. Once defined by
registration with IANA, the list of capabilities is immutable. If it registration with IANA, the list of capabilities for an algorithm or
is later found that a new capability is needed for a key type or an key type is immutable. If it is later found that a new capability is
algorithm, it will require that a new code point be assigned to deal needed for a key type or an algorithm, it will require that a new
with that. As a general rule, the capabilities are going to map to code point be assigned to deal with that. As a general rule, the
algorithm-specific header parameters or key parameters, but they do capabilities are going to map to algorithm-specific header parameters
not need to do so. An example of this is the HSS-LMS key or key parameters, but they do not need to do so. An example of this
capabilities defined below where the hash algorithm used is included. is the HSS-LMS key capabilities defined below where the hash
algorithm used is included.
The capability structure is an array of values, the order being The capability structure is an array of values, the values included
dependent on the specific algorithm or key. For an algorithm, the in the structure are dependent on a specific algorithm or key type.
first element should always be a key type value, but the items that For algorithm capabilities, the first element should always be a key
are specific to a key should not be included in the algorithm type value if applicable, but the items that are specific to a key
(for example a curve) should not be included in the algorithm
capabilities. This means that if one wishes to enumerate all of the capabilities. This means that if one wishes to enumerate all of the
capabilities for a device which implements ECDH, it requires multiple capabilities for a device which implements ECDH, it requires that all
pairs of capability structures (algorithm, key) to deal with the of the combinations of algorithms and key pairs to be specified. The
different key types and curves that are supported. For a key, the last example of Section 8.3 provides a case where this is done by
first element should also be a key type value. While this means that allowing for a cross product to be specified between an array of
this value will be duplicated if both an algorithm and key capability algorithm capabilities and key type capabilities (see ECDH-ES+A25KW
are used, the key type is needed in order to understand the rest of element). For a key, the first element should be the key type value.
the values. While this means that the key type value will be duplicated if both
an algorithm and key capability are used, the key type is needed in
order to understand the rest of the values.
8.1. Assignments for Existing Key Types 8.1. Assignments for Existing Algorithms
For the current set of algorithms in the registry, those in this
document as well as those in [RFC8230] and [I-D.ietf-cose-hash-sig],
the capabilities list is an array with one element, the key type
(from the "COSE Key Types" Registry). It is expected future
registered algorithms could have zero, one, or multiple elements.
8.2. Assignments for Existing Key Types
There are a number of pre-existing key types, the following deals There are a number of pre-existing key types, the following deals
with creating the capability definition for those structures: with creating the capability definition for those structures:
* OKP, EC2: The list of capabilities is: * OKP, EC2: The list of capabilities is:
- The key type value. (1 for OKP or 2 for EC2.) - The key type value. (1 for OKP or 2 for EC2.)
- One curve for that key type from the "COSE Elliptic Curve" - One curve for that key type from the "COSE Elliptic Curve"
registry. registry.
* RSA: The list of capabilities is: * RSA: The list of capabilities is:
- The key type value (3). - The key type value (3).
* Symmetric: The list of capabilities is: * Symmetric: The list of capabilities is:
- The key type value (4). - The key type value (4).
skipping to change at page 41, line 22 skipping to change at page 42, line 40
- The key type value (4). - The key type value (4).
* HSS-LMS: The list of capabilities is: * HSS-LMS: The list of capabilities is:
- The key type value (5), - The key type value (5),
- Algorithm identifier for the underlying hash function from the - Algorithm identifier for the underlying hash function from the
"COSE Algorithms" registry. "COSE Algorithms" registry.
8.2. Assignments for Existing Algorithms 8.3. Examples
For the current set of algorithms in the registry, those in this Capabilities can be use in a key derivation process to make sure that
document as well as those in [RFC8230] and [I-D.ietf-cose-hash-sig], both sides are using the same parameters. This is the approach that
the capabilities list is an array with one element, the key type is being used by the group communication KDF in
(from the "COSE Key Types" Registry). It is expected future [I-D.ietf-core-oscore-groupcomm]. The three examples below show
registered algorithms could have zero, one, or multiple elements. different ways that one might include things:
8.3. Examples * Just an algorithm capability: This is useful if the protocol wants
to require a specific algorithm such as ECDSA, but it is agnostic
about which curve is being used. This does require that the
algorithm identifier be specified in the protocol. See the first
example.
In this section a trio of examples is provided. In all three cases * Just a key type capability: This is useful if the protccol wants
it it encodes the algorithm capabilities followed by the key to require a specific a specific key type and curve, such as
capabilities. For simplicity's sake, a CBOR sequence P-256, but will accept any algorithm using that curve (e.g. both
[I-D.ietf-cbor-sequence] is used for the two arrays. ECDSA and ECDH). See the second example.
ECDSA with SHA-512 and a P-256 curve: * Both an algorithm and a key type capability: This is used if the
protocol needs to nail down all of the options surrounding an
algorithm E.g. EdDSA with the curve X25519. As with the first
example, the algorithm identifier needs to be specified in the
protocol. See the third example which just concatenates the two
capabilities together.
0x8102820201 / [2],[2, 1] / Algorithm ECDSA
ECDH-ES + A256KW with a P-256 curve: 0x8102 / [2 \ EC2 \ ] /
0x8102820201 / [2],[2, 1] / Key type EC2 with P-256 curve:
0x820201 / [2 \ EC2 \, 1 \ P-256 \] /
ECDH-ES + A256KW with an X25519 curve: ECDH-ES + A256KW with an X25519 curve:
0x8101820104 / [1],[1, 4] / 0x8101820104 / [1 \ OKP \],[1 \ OKP \, 4 \ X25519 \] /
The capabilities can also be used by and entity to advertise what it
is capabable of doing. The decoded example below is one of many
encoding that could be used for that purpose. Each array element
includes three fields: the algorithm identifier, one or more
algorithm capabilities, and one or more key type capabilities.
[
[-8 / EdDSA /,
[1 / OKP key type /],
[
[1 / OKP /, 6 / Ed25519 / ],
[1 /OKP/, 7 /Ed448 /]
]
],
[-7 / ECDSA with SHA-256/,
[2 /EC2 key type/],
[
[2 /EC2/, 1 /P-256/],
[2 /EC2/, 3 /P-521/]
]
],
[ -31 / ECDH-ES+A256KW/,
[
[ 2 /EC2/],
[1 /OKP/ ]
],
[
[2 /EC2/, 1 /P-256/],
[1 /OKP/, 4 / X25519/ ]
]
],
[ 1 / A128GCM /,
[ 4 / Symmetric / ],
[ 4 / Symmetric /]
]
]
Examining the above:
* The first element indicates that the entity supports EdDSA with
curves Ed25519 and Ed448.
* The second element indicates that the entity supports ECDSA with
curves P-256 and P-521.
* The third element indicates that the entity support ephemeral-
static ECDH using AES256 key wrap. The entity can support the
P-256 curve with an EC2 key type and the X25519 curve with an OKP
key type.
* The last element indicates that the entity supports AES-GCM of 128
bits for content encryption.
The entity does not advertise that it supports any MAC algorithms.
9. CBOR Encoding Restrictions 9. CBOR Encoding Restrictions
This document limits the restrictions it imposes on how the CBOR This document limits the restrictions it imposes on how the CBOR
Encoder needs to work. We have managed to narrow it down to the Encoder needs to work. It has been narrowed down to the following
following restrictions: restrictions:
* The restriction applies to the encoding of the COSE_KDF_Context. * The restriction applies to the encoding of the COSE_KDF_Context.
* Encoding MUST be done using definite lengths and the length of the * Encoding MUST be done using definite lengths and the length of the
MUST be the minimum possible length. This means that the integer MUST be the minimum possible length. This means that the integer
1 is encoded as "0x01" and not "0x1801". 1 is encoded as "0x01" and not "0x1801".
* Applications MUST NOT generate messages with the same label used * Applications MUST NOT generate messages with the same label used
twice as a key in a single map. Applications MUST NOT parse and twice as a key in a single map. Applications MUST NOT parse and
process messages with the same label used twice as a key in a process messages with the same label used twice as a key in a
skipping to change at page 43, line 5 skipping to change at page 45, line 49
+-------+-----------+--------------------------+ +-------+-----------+--------------------------+
| 3 | RSA | [kty(3)] | | 3 | RSA | [kty(3)] |
+-------+-----------+--------------------------+ +-------+-----------+--------------------------+
| 4 | Symmetric | [kty(4)] | | 4 | Symmetric | [kty(4)] |
+-------+-----------+--------------------------+ +-------+-----------+--------------------------+
| 5 | HSS-LMS | [kty(5), hash algorithm] | | 5 | HSS-LMS | [kty(5), hash algorithm] |
+-------+-----------+--------------------------+ +-------+-----------+--------------------------+
Table 22: Key Type Capabilities Table 22: Key Type Capabilities
IANA is requested to update the pointer for expert review to [[this
document]].
10.2. Changes to "COSE Algorithms" registry 10.2. Changes to "COSE Algorithms" registry
IANA is requested to create a new column in the "COSE Algorithms" IANA is requested to create a new column in the "COSE Algorithms"
registry. The new column is to be labeled "Capabilities". The new registry. The new column is to be labeled "Capabilities". The new
column is populated with "[kty]" for all current, non-provisional, column is populated with "[kty]" for all current, non-provisional,
registrations. It is expected that the documents which define those registrations. It is expected that the documents which define those
algorithms will be expanded to include this registration, if this is algorithms will be expanded to include this registration. If this is
not done then the DE should be consulted before final registration not done then the Designated Expert should be consulted before final
for this document is done. registration for this document is done.
IANA is requested to update all references from RFC 8152 to [[This
Document]].
IANA is requested to update the pointer for expert rview to [[this
document]].
IANA is requested to update the reference column in the "COSE IANA is requested to update the reference column in the "COSE
Algorithms" registry to include [[This Document]] as a reference for Algorithms" registry to include [[This Document]] as a reference for
all rows where it is not already present. Note to IANA: There is an all rows where it is not already present.
action in [I-D.ietf-cose-rfc8152bis-struct] which also modifies data
in the reference column. That action should be applied first.
IANA is rquested to add a new row to the "COSE Algorithms" registry. IANA is requested to add a new row to the "COSE Algorithms" registry.
+----------+---------------+-------------+------------+-------------+ +----------+---------------+-------------+------------+-------------+
| Name | Value | Description | Reference | Recommended | | Name | Value | Description | Reference | Recommended |
+==========+===============+=============+============+=============+ +==========+===============+=============+============+=============+
| IV | IV-GENERATION |Reserved for | [[THIS | No | | IV | IV-GENERATION |For doing IV | [[THIS | No |
|Generation| | doing IV | DOCUMENT]] | | |Generation| | generation | DOCUMENT]] | |
| | | generation | | |
| | |for symmetric| | | | | |for symmetric| | |
| | | algorithms. | | | | | | algorithms. | | |
+----------+---------------+-------------+------------+-------------+ +----------+---------------+-------------+------------+-------------+
Table 23 Table 23
The capabilities column for this registration is to be empty. The capabilities column for this registration is to be empty.
10.3. Changes to the "COSE Key Type Parameters" registry 10.3. Changes to the "COSE Key Type Parameters" registry
IANA is requested to modify the description to "Public Key" for the IANA is requested to modify the description to "Public Key" for the
line with "Key Type" of 2 and the "Name" of "x". See Table 20 which line with "Key Type" of 2 and the "Name" of "x". See Table 20 which
has been modified with this change. has been modified with this change.
IANA is requested to update the references in the table from RFC8152 IANA is requested to update the references in the table from RFC8152
to [[This Document]]. to [[This Document]].
IANA is requested to update the pointer for expert rview to [[this
document]].
10.4. COSE Header Algorithm Parameters Registry
IANA created a registry titled "COSE Header Algorithm Parameters" as
part of processing [RFC8152]. The registry has been created to use
the "Expert Review Required" registration procedure [RFC8126].
IANA is requested to update the references from [RFC8152] to this
document.
IANA is requested to update the pointer for expert rview to [[this
document]].
10.5. Expert Review Instructions
All of the IANA registries established by [RFC8152] are, at least in
part, 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:
* 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.
* 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.
* 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.
* 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.
11. Security Considerations 11. Security Considerations
There are a number of security considerations that need to be taken There are a number of security considerations that need to be taken
into account by implementers of this specification. The security into account by implementers of this specification. The security
considerations that are specific to an individual algorithm are considerations that are specific to an individual algorithm are
placed next to the description of the algorithm. While some placed next to the description of the algorithm. While some
considerations have been highlighted here, additional considerations considerations have been highlighted here, additional considerations
may be found in the documents listed in the references. may be found in the documents listed in the references.
Implementations need to protect the private key material for any Implementations need to protect the private key material for any
skipping to change at page 45, line 49 skipping to change at page 49, line 49
that use nonce values. For all of the nonces defined in this that use nonce values. For all of the nonces defined in this
document, there is some type of restriction on the nonce being a document, there is some type of restriction on the nonce being a
unique value either for a key or for some other conditions. In all unique value either for a key or for some other conditions. In all
of these cases, there is no known requirement on the nonce being both of these cases, there is no known requirement on the nonce being both
unique and unpredictable; under these circumstances, it's reasonable unique and unpredictable; under these circumstances, it's reasonable
to use a counter for creation of the nonce. In cases where one wants to use a counter for creation of the nonce. In cases where one wants
the pattern of the nonce to be unpredictable as well as unique, one the pattern of the nonce to be unpredictable as well as unique, one
can use a key created for that purpose and encrypt the counter to can use a key created for that purpose and encrypt the counter to
produce the nonce value. produce the nonce value.
One area that has been starting to get exposure is doing traffic One area that has been getting exposure is traffic analysis of
analysis of encrypted messages based on the length of the message. encrypted messages based on the length of the message. This
This specification does not provide for a uniform method of providing specification does not provide for a uniform method of providing
padding as part of the message structure. An observer can padding as part of the message structure. An observer can
distinguish between two different messages (for example, 'YES' and distinguish between two different messages (for example, 'YES' and
'NO') based on the length for all of the content encryption 'NO') based on the length for all of the content encryption
algorithms that are defined in this document. This means that it is algorithms that are defined in this document. This means that it is
up to the applications to document how content padding is to be done up to the applications to document how content padding is to be done
in order to prevent or discourage such analysis. (For example, the in order to prevent or discourage such analysis. (For example, the
text strings could be defined as 'YES' and 'NO '.) text strings could be defined as 'YES' and 'NO '.)
The analsys done in [I-D.ietf-quic-tls] is based on the number of
records/packets that are sent. This should map well to the number of
messages sent when use COSE so that analysis should hold here as
well. It needs to be noted that the limits are based on the number
of messages, but QUIC and DTLS are always pair-wise based endpoints,
[I-D.ietf-core-oscore-groupcomm] use COSE in a group communication.
Under these circumstances it may be that no one single entity will
see all of the messages that are encrypted an therefore no single
entity can trigger the rekey operation.
12. References 12. References
12.1. Normative References 12.1. Normative References
[I-D.ietf-cose-rfc8152bis-struct] [I-D.ietf-cose-rfc8152bis-struct]
Schaad, J., "CBOR Object Signing and Encryption (COSE): Schaad, J., "CBOR Object Signing and Encryption (COSE):
Structures and Process", Work in Progress, Internet-Draft, Structures and Process", Work in Progress, Internet-Draft,
draft-ietf-cose-rfc8152bis-struct-09, 14 May 2020, draft-ietf-cose-rfc8152bis-struct-10, 2 June 2020,
<https://tools.ietf.org/html/draft-ietf-cose-rfc8152bis- <https://tools.ietf.org/html/draft-ietf-cose-rfc8152bis-
struct-09>. struct-10>.
[RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-
Hashing for Message Authentication", RFC 2104, Hashing for Message Authentication", RFC 2104,
DOI 10.17487/RFC2104, February 1997, DOI 10.17487/RFC2104, February 1997,
<https://www.rfc-editor.org/info/rfc2104>. <https://www.rfc-editor.org/info/rfc2104>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
skipping to change at page 47, line 40 skipping to change at page 51, line 50
Publication 800-38D, November 2007, Publication 800-38D, November 2007,
<https://csrc.nist.gov/publications/nistpubs/800-38D/SP- <https://csrc.nist.gov/publications/nistpubs/800-38D/SP-
800-38D.pdf>. 800-38D.pdf>.
[DSS] National Institute of Standards and Technology, "Digital [DSS] National Institute of Standards and Technology, "Digital
Signature Standard (DSS)", DOI 10.6028/NIST.FIPS.186-4, Signature Standard (DSS)", DOI 10.6028/NIST.FIPS.186-4,
FIPS PUB 186-4, July 2013, FIPS PUB 186-4, July 2013,
<http://nvlpubs.nist.gov/nistpubs/FIPS/ <http://nvlpubs.nist.gov/nistpubs/FIPS/
NIST.FIPS.186-4.pdf>. NIST.FIPS.186-4.pdf>.
[MAC] National Institute of Standards and Technology, "Computer [MAC] Menees, A., van Oorschot, P., and S. Vanstone, "Handbook
Data Authentication", FIPS PUB 113, May 1985, of Applied Cryptography", 1996.
<http://csrc.nist.gov/publications/fips/fips113/
fips113.html>.
[SEC1] Certicom Research, "SEC 1: Elliptic Curve Cryptography", [SEC1] Certicom Research, "SEC 1: Elliptic Curve Cryptography",
May 2009, <http://www.secg.org/sec1-v2.pdf>. May 2009, <http://www.secg.org/sec1-v2.pdf>.
[RFC8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital [RFC8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital
Signature Algorithm (EdDSA)", RFC 8032, Signature Algorithm (EdDSA)", RFC 8032,
DOI 10.17487/RFC8032, January 2017, DOI 10.17487/RFC8032, January 2017,
<https://www.rfc-editor.org/info/rfc8032>. <https://www.rfc-editor.org/info/rfc8032>.
[RFC8017] Moriarty, K., Ed., Kaliski, B., Jonsson, J., and A. Rusch,
"PKCS #1: RSA Cryptography Specifications Version 2.2",
RFC 8017, DOI 10.17487/RFC8017, November 2016,
<https://www.rfc-editor.org/info/rfc8017>.
12.2. Informative References 12.2. Informative References
[RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for
Writing an IANA Considerations Section in RFCs", BCP 26,
RFC 8126, DOI 10.17487/RFC8126, June 2017,
<https://www.rfc-editor.org/info/rfc8126>.
[RFC8610] Birkholz, H., Vigano, C., and C. Bormann, "Concise Data [RFC8610] Birkholz, H., Vigano, C., and C. Bormann, "Concise Data
Definition Language (CDDL): A Notational Convention to Definition Language (CDDL): A Notational Convention to
Express Concise Binary Object Representation (CBOR) and Express Concise Binary Object Representation (CBOR) and
JSON Data Structures", RFC 8610, DOI 10.17487/RFC8610, JSON Data Structures", RFC 8610, DOI 10.17487/RFC8610,
June 2019, <https://www.rfc-editor.org/info/rfc8610>. June 2019, <https://www.rfc-editor.org/info/rfc8610>.
[RFC4231] Nystrom, M., "Identifiers and Test Vectors for HMAC-SHA- [RFC4231] Nystrom, M., "Identifiers and Test Vectors for HMAC-SHA-
224, HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512", 224, HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512",
RFC 4231, DOI 10.17487/RFC4231, December 2005, RFC 4231, DOI 10.17487/RFC4231, December 2005,
<https://www.rfc-editor.org/info/rfc4231>. <https://www.rfc-editor.org/info/rfc4231>.
skipping to change at page 48, line 36 skipping to change at page 53, line 5
[RFC5480] Turner, S., Brown, D., Yiu, K., Housley, R., and T. Polk, [RFC5480] Turner, S., Brown, D., Yiu, K., Housley, R., and T. Polk,
"Elliptic Curve Cryptography Subject Public Key "Elliptic Curve Cryptography Subject Public Key
Information", RFC 5480, DOI 10.17487/RFC5480, March 2009, Information", RFC 5480, DOI 10.17487/RFC5480, March 2009,
<https://www.rfc-editor.org/info/rfc5480>. <https://www.rfc-editor.org/info/rfc5480>.
[RFC6151] Turner, S. and L. Chen, "Updated Security Considerations [RFC6151] Turner, S. and L. Chen, "Updated Security Considerations
for the MD5 Message-Digest and the HMAC-MD5 Algorithms", for the MD5 Message-Digest and the HMAC-MD5 Algorithms",
RFC 6151, DOI 10.17487/RFC6151, March 2011, RFC 6151, DOI 10.17487/RFC6151, March 2011,
<https://www.rfc-editor.org/info/rfc6151>. <https://www.rfc-editor.org/info/rfc6151>.
[RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data [STD90] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data
Interchange Format", STD 90, RFC 8259, Interchange Format", STD 90, RFC 8259, December 2017.
DOI 10.17487/RFC8259, December 2017,
<https://www.rfc-editor.org/info/rfc8259>. <https://www.rfc-editor.org/info/std90>
[RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained
Application Protocol (CoAP)", RFC 7252, Application Protocol (CoAP)", RFC 7252,
DOI 10.17487/RFC7252, June 2014, DOI 10.17487/RFC7252, June 2014,
<https://www.rfc-editor.org/info/rfc7252>. <https://www.rfc-editor.org/info/rfc7252>.
[RFC7518] Jones, M., "JSON Web Algorithms (JWA)", RFC 7518, [RFC7518] Jones, M., "JSON Web Algorithms (JWA)", RFC 7518,
DOI 10.17487/RFC7518, May 2015, DOI 10.17487/RFC7518, May 2015,
<https://www.rfc-editor.org/info/rfc7518>. <https://www.rfc-editor.org/info/rfc7518>.
[RFC8017] Moriarty, K., Ed., Kaliski, B., Jonsson, J., and A. Rusch,
"PKCS #1: RSA Cryptography Specifications Version 2.2",
RFC 8017, DOI 10.17487/RFC8017, November 2016,
<https://www.rfc-editor.org/info/rfc8017>.
[RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)", [RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)",
RFC 8152, DOI 10.17487/RFC8152, July 2017, RFC 8152, DOI 10.17487/RFC8152, July 2017,
<https://www.rfc-editor.org/info/rfc8152>. <https://www.rfc-editor.org/info/rfc8152>.
[RFC8551] Schaad, J., Ramsdell, B., and S. Turner, "Secure/ [RFC8551] Schaad, J., Ramsdell, B., and S. Turner, "Secure/
Multipurpose Internet Mail Extensions (S/MIME) Version 4.0 Multipurpose Internet Mail Extensions (S/MIME) Version 4.0
Message Specification", RFC 8551, DOI 10.17487/RFC8551, Message Specification", RFC 8551, DOI 10.17487/RFC8551,
April 2019, <https://www.rfc-editor.org/info/rfc8551>. April 2019, <https://www.rfc-editor.org/info/rfc8551>.
[RFC8230] Jones, M., "Using RSA Algorithms with CBOR Object Signing [RFC8230] Jones, M., "Using RSA Algorithms with CBOR Object Signing
and Encryption (COSE) Messages", RFC 8230, and Encryption (COSE) Messages", RFC 8230,
DOI 10.17487/RFC8230, September 2017, DOI 10.17487/RFC8230, September 2017,
<https://www.rfc-editor.org/info/rfc8230>. <https://www.rfc-editor.org/info/rfc8230>.
[I-D.ietf-core-oscore-groupcomm] [I-D.ietf-core-oscore-groupcomm]
Tiloca, M., Selander, G., Palombini, F., and J. Park, Tiloca, M., Selander, G., Palombini, F., and J. Park,
"Group OSCORE - Secure Group Communication for CoAP", Work "Group OSCORE - Secure Group Communication for CoAP", Work
in Progress, Internet-Draft, draft-ietf-core-oscore- in Progress, Internet-Draft, draft-ietf-core-oscore-
groupcomm-08, 6 April 2020, <https://tools.ietf.org/html/ groupcomm-09, 23 June 2020, <https://tools.ietf.org/html/
draft-ietf-core-oscore-groupcomm-08>. draft-ietf-core-oscore-groupcomm-09>.
[I-D.ietf-cose-hash-sig] [I-D.ietf-cose-hash-sig]
Housley, R., "Use of the HSS/LMS Hash-based Signature Housley, R., "Use of the HSS/LMS Hash-based Signature
Algorithm with CBOR Object Signing and Encryption (COSE)", Algorithm with CBOR Object Signing and Encryption (COSE)",
Work in Progress, Internet-Draft, draft-ietf-cose-hash- Work in Progress, Internet-Draft, draft-ietf-cose-hash-
sig-09, 11 December 2019, sig-09, 11 December 2019,
<https://tools.ietf.org/html/draft-ietf-cose-hash-sig-09>. <https://tools.ietf.org/html/draft-ietf-cose-hash-sig-09>.
[I-D.ietf-cbor-sequence] [SP800-38d]
Bormann, C., "Concise Binary Object Representation (CBOR) Dworkin, M., "Recommendation for Block Cipher Modes of
Sequences", Work in Progress, Internet-Draft, draft-ietf- Operation: Galois/Counter Mode (GCM) and GMAC", NIST
cbor-sequence-02, 25 September 2019, Special Publication 800-38D , November 2007,
<https://tools.ietf.org/html/draft-ietf-cbor-sequence-02>. <https://nvlpubs.nist.gov/nistpubs/Legacy/SP/
nistspecialpublication800-38d.pdf>.
[SP800-56A] [SP800-56A]
Barker, E., Chen, L., Roginsky, A., and M. Smid, Barker, E., Chen, L., Roginsky, A., and M. Smid,
"Recommendation for Pair-Wise Key Establishment Schemes "Recommendation for Pair-Wise Key Establishment Schemes
Using Discrete Logarithm Cryptography", Using Discrete Logarithm Cryptography",
DOI 10.6028/NIST.SP.800-56Ar2, NIST Special Publication DOI 10.6028/NIST.SP.800-56Ar2, NIST Special Publication
800-56A, Revision 2, May 2013, 800-56A, Revision 2, May 2013,
<http://nvlpubs.nist.gov/nistpubs/SpecialPublications/ <http://nvlpubs.nist.gov/nistpubs/SpecialPublications/
NIST.SP.800-56Ar2.pdf>. NIST.SP.800-56Ar2.pdf>.
[GitHub-Examples]
"GitHub Examples of COSE",
<https://github.com/cose-wg/Examples>.
[I-D.mattsson-cfrg-det-sigs-with-noise]
Mattsson, J., Thormarker, E., and S. Ruohomaa,
"Deterministic ECDSA and EdDSA Signatures with Additional
Randomness", Work in Progress, Internet-Draft, draft-
mattsson-cfrg-det-sigs-with-noise-02, 11 March 2020,
<https://tools.ietf.org/html/draft-mattsson-cfrg-det-sigs-
with-noise-02>.
[HKDF] Krawczyk, H., "Cryptographic Extraction and Key
Derivation: The HKDF Scheme", 2010,
<https://eprint.iacr.org/2010/264.pdf>.
[ROBUST] Fischlin, M., G√ľnther, F., and C. Janson, "Robust
Channels: Handling Unreliable Networks in the Record
Layers of QUIC and DTLS", February 2020,
<https://www.felixguenther.info/docs/
QUIP2020_RobustChannels.pdf>.
[I-D.ietf-quic-tls]
Thomson, M. and S. Turner, "Using TLS to Secure QUIC",
Work in Progress, Internet-Draft, draft-ietf-quic-tls-29,
9 June 2020,
<https://tools.ietf.org/html/draft-ietf-quic-tls-29>.
Acknowledgments Acknowledgments
This document is a product of the COSE working group of the IETF. 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 The following individuals are to blame for getting me started on this
project in the first place: Richard Barnes, Matt Miller, and Martin project in the first place: Richard Barnes, Matt Miller, and Martin
Thomson. Thomson.
The initial version of the specification was based to some degree on The initial version of the specification was based to some degree on
the outputs of the JOSE and S/MIME working groups. the outputs of the JOSE and S/MIME working groups.
The following individuals provided input into the final form of the The following individuals provided input into the final form of the
document: Carsten Bormann, John Bradley, Brain Campbell, Michael B. document: Carsten Bormann, John Bradley, Brain Campbell, Michael B.
Jones, Ilari Liusvaara, Francesca Palombini, Ludwig Seitz, and Goran Jones, Ilari Liusvaara, Francesca Palombini, Ludwig Seitz, and
Selander. G&#246;ran Selander.
Author's Address Author's Address
Jim Schaad Jim Schaad
August Cellars August Cellars
Email: ietf@augustcellars.com Email: ietf@augustcellars.com
 End of changes. 80 change blocks. 
219 lines changed or deleted 455 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/