idnits 2.17.1 draft-ietf-cose-x509-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (9 March 2020) is 1480 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Outdated reference: A later version (-43) exists of draft-ietf-tls-dtls13-34 -- Obsolete informational reference (is this intentional?): RFC 8152 (Obsoleted by RFC 9052, RFC 9053) == Outdated reference: A later version (-12) exists of draft-ietf-cose-rfc8152bis-algs-06 == Outdated reference: A later version (-03) exists of draft-richardson-enrollment-roadmap-02 Summary: 0 errors (**), 0 flaws (~~), 4 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group J. Schaad 3 Internet-Draft August Cellars 4 Intended status: Informational 9 March 2020 5 Expires: 10 September 2020 7 CBOR Object Signing and Encryption (COSE): Header parameters for 8 carrying and referencing X.509 certificates 9 draft-ietf-cose-x509-06 11 Abstract 13 The CBOR Signing And Encrypted Message (COSE) structure uses 14 references to keys in general. For some algorithms, additional 15 properties are defined which carry parts of keys as needed. The COSE 16 Key structure is used for transporting keys outside of COSE messages. 17 This document extends the way that keys can be identified and 18 transported by providing attributes that refer to or contain X.509 19 certificates. 21 Contributing to this document 23 This note is to be removed before publishing as an RFC. 25 The source for this draft is being maintained in GitHub. Suggested 26 changes should be submitted as pull requests at https://github.com/ 27 cose-wg/X509. Instructions are on that page as well. Editorial 28 changes can be managed in GitHub, but any substantial issues need to 29 be discussed on the COSE mailing list. 31 Status of This Memo 33 This Internet-Draft is submitted in full conformance with the 34 provisions of BCP 78 and BCP 79. 36 Internet-Drafts are working documents of the Internet Engineering 37 Task Force (IETF). Note that other groups may also distribute 38 working documents as Internet-Drafts. The list of current Internet- 39 Drafts is at https://datatracker.ietf.org/drafts/current/. 41 Internet-Drafts are draft documents valid for a maximum of six months 42 and may be updated, replaced, or obsoleted by other documents at any 43 time. It is inappropriate to use Internet-Drafts as reference 44 material or to cite them other than as "work in progress." 46 This Internet-Draft will expire on 10 September 2020. 48 Copyright Notice 50 Copyright (c) 2020 IETF Trust and the persons identified as the 51 document authors. All rights reserved. 53 This document is subject to BCP 78 and the IETF Trust's Legal 54 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 55 license-info) in effect on the date of publication of this document. 56 Please review these documents carefully, as they describe your rights 57 and restrictions with respect to this document. Code Components 58 extracted from this document must include Simplified BSD License text 59 as described in Section 4.e of the Trust Legal Provisions and are 60 provided without warranty as described in the Simplified BSD License. 62 Table of Contents 64 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 65 1.1. Requirements Terminology . . . . . . . . . . . . . . . . 3 66 2. X.509 COSE Header Parameters . . . . . . . . . . . . . . . . 3 67 3. X.509 certificates and static-static ECDH . . . . . . . . . . 6 68 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 69 4.1. COSE Header Parameter Registry . . . . . . . . . . . . . 7 70 4.2. COSE Header Algorithm Parameter Registry . . . . . . . . 7 71 5. Security Considerations . . . . . . . . . . . . . . . . . . . 8 72 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 73 6.1. Normative References . . . . . . . . . . . . . . . . . . 8 74 6.2. Informative References . . . . . . . . . . . . . . . . . 9 75 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 10 77 1. Introduction 79 In the process of writing [RFC8152] discussions were held on the 80 question of X.509 certificates [RFC5280] and if there was a needed to 81 provide for them. At the time no use cases were presented that 82 appeared to have a sufficient need for these attributes. Since that 83 time a number of cases have been defined in which X.509 certificate 84 support is necessary, and by implication, applications will need a 85 documented and consistent way to handle such certificates. This 86 document defines a set of attributes that will allow applications to 87 transport and refer to X.509 certificates in a consistent manner. 89 In some of these cases, a constrained device is being deployed in the 90 context of an existing X.509 PKI: for example, in the 6TiSCH 91 environment [I-D.richardson-enrollment-roadmap], describes a device 92 enrollment solution that relies on the presence in the device of a 93 factory-installed certificate. The [I-D.selander-ace-cose-ecdhe] 94 draft was also written with the idea that long term certificates 95 could be used to provide for authentication of devices, and uses them 96 to establish session keys. A third scenario is the use of COSE as 97 the basis for a secure messaging application. This scenario assumes 98 the presence of long term keys and a central authentication 99 authority. Basing such an application on public key certificates 100 allows it to make use of well established key management disciplines. 102 Example COSE messages for the various header parameters defined below 103 can be found at https://github.com/cose-wg/Examples. 105 1.1. Requirements Terminology 107 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 108 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 109 "OPTIONAL" in this document are to be interpreted as described in BCP 110 14 [RFC2119] [RFC8174] when, and only when, they appear in all 111 capitals, as shown here. 113 2. X.509 COSE Header Parameters 115 The use of X.509 certificates allows for an existing trust 116 infrastructure to be used with COSE. This includes the full suite of 117 enrollment protocols, trust anchors, trust chaining and revocation 118 checking that have been defined over time by the IETF and other 119 organizations. The key structures that have been defined in COSE 120 currently do not support all of these properties although some may be 121 found in COSE Web Tokens (CWT) [RFC8392]. 123 It is not necessarily expected that constrained devices themselves 124 will evaluate and process of X.509 certificates: it is perfectly 125 reasonable for a constrained device to be provisioned with a 126 certificate which it can then provide to a relying party - along with 127 a signature or encrypted message - on the assumption that the relying 128 party is not a constrained device, and is capable of performing the 129 required certificate evaluation and processing. 131 Certificates obtained from any of these methods MUST still be 132 validated. This validation can be done according to the PKIX rules 133 in [RFC5280] or by using a different trust structure, such as a 134 trusted certificate distributor for self-signed certificates. The 135 PKIX validation includes matching against the trust anchors 136 configured for the application. These rules apply to certificates of 137 a chain length of one as well as longer chains. If the application 138 cannot establish trust in the certificate, that certificate cannot be 139 used. 141 The header parameters defined in this document are: 143 x5bag: This header parameter contains a bag of X.509 certificates. 144 The set of certificates in this header parameter is unordered and 145 may contain self-signed certificates. The certificate bag can 146 contain certificates which are completely extraneous to the 147 message. (An example of this would be where a signed message is 148 being used to transport a certificate containing a key agreement 149 key.) As the certificates are unordered, the party evaluating the 150 signature will need to be capable of building the certificate path 151 as necessary. That party will also have to take into account that 152 the bag may not contain the full set of certificates needed to 153 build any particular chain. 155 The trust mechanism MUST process any certificates in this 156 parameter as untrusted input. The presence of a self-signed 157 certificate in the parameter MUST NOT be used as a signal to 158 modify the set of trust anchors. As the contents of this header 159 parameter are untrusted input, the header parameter can be in 160 either the protected or unprotected header bucket. 162 This header parameter allows for a single X.509 certificate or a 163 bag of X.509 certificates to be carried in the message. 165 * If a single certificate is conveyed, it is placed in a CBOR 166 bstr. 168 * If multiple certificates are conveyed, a CBOR array of bstrs is 169 used, with each certificate being in its own bstr. 171 x5chain: This header parameter contains an ordered array of X.509 172 certificates. The certificates are to be ordered starting with 173 the certificate containing the end-entity key followed by the 174 certificate which signed it and so on. There is no requirement 175 for the entire chain to be present in the element if there is 176 reason to believe that the relying party already has, or can 177 locate the missing certificates. This means that the relying 178 party is still required to do path building, but that a candidate 179 path is proposed in this attribute. 181 The trust mechanism MUST process any certificates in this 182 parameter as untrusted input. The presence of a self-signed 183 certificate in the parameter MUST NOT be used as a signal to 184 modify the set of trust anchors. As the contents of this header 185 parameter are untrusted input, the header parameter can be in 186 either the protected or unprotected header bucket. 188 This header parameter allows for a single X.509 certificate or a 189 chain of X.509 certificates to be carried in the message. 191 * If a single certificate is conveyed, it is placed in a CBOR 192 bstr. 194 * If multiple certificates are conveyed, a CBOR array of bstrs is 195 used, with each certificate being in its own bstr. 197 x5t: This header parameter provides the ability to identify an X.509 198 certificate by a hash value. The attribute is an array of two 199 elements. The first element is an algorithm identifier which is 200 an integer or a string containing the hash algorithm identifier. 201 The algorithm is registered in the "COSE Algorithms" registry The 202 second element is a binary string containing the hash value. 204 As this header parameter does not provide any trust, the header 205 parameter can be in either a protected or unprotected header 206 bucket. 208 For interoperability, applications which use this header parameter 209 MUST support the hash algorithm 'SHA-256', but can use other hash 210 algorithms. 212 x5u: This header parameter provides the ability to identify an X.509 213 certificate by a URI [RFC3986]. The referenced resource can be 214 any of the following media types: 216 * application/pkix-cert [RFC2585] 218 * application/pkcs7-mime; smime-type="certs-only" [RFC8551] 220 As this header parameter implies a trust relationship, the 221 attribute MUST be in the protected attribute bucket. 223 The URI provided MUST provide integrity protection and server 224 authentication. For example, an HTTP or CoAP GET request to 225 retrieve a certificate MUST use TLS [RFC8446] or DTLS 226 [I-D.ietf-tls-dtls13]. If the certificate does not chain to an 227 existing trust anchor, the certificate MUST NOT be trusted unless 228 the server is configured as trusted to provide new trust anchors. 229 This will normally be the situation when self-signed certificates 230 are used. 232 The header parameters are used in the following locations: 234 * COSE_Signature and COSE_Sign0 objects, in these objects they 235 identify the certificate to be used for validation the signature. 237 * COSE_recipient objects, in this location they identify the 238 certificate for the recipient of the message. 240 +---------+-------+---------------+---------------------+ 241 | Name | Label | Value Type | Description | 242 +=========+=======+===============+=====================+ 243 | x5bag | TBD4 | COSE_X509 | An unordered bag of | 244 | | | | X.509 certificates | 245 +---------+-------+---------------+---------------------+ 246 | x5chain | TBD3 | COSE_X509 | An ordered chain of | 247 | | | | X.509 certificates | 248 +---------+-------+---------------+---------------------+ 249 | x5t | TBD1 | COSE_CertHash | Hash of an X.509 | 250 | | | | certificate | 251 +---------+-------+---------------+---------------------+ 252 | x5u | TBD2 | uri | URI pointing to an | 253 | | | | X.509 certificate | 254 +---------+-------+---------------+---------------------+ 256 Table 1: X.509 COSE Header Parameters 258 Below is an equivalent CDDL [RFC8610] description of the text above. 260 COSE_X509 = bstr / [ 2*certs: bstr ] 261 COSE_CertHash = [ hashAlg: (int / tstr), hashValue: bstr ] 263 3. X.509 certificates and static-static ECDH 265 The header parameters defined in the previous section are used to 266 identify the recipient certificates for the ECDH key agreement 267 algorithms. In this section we define the algorithm specific 268 parameters that are used for identifying or transporting the sender's 269 key for static-static key agreement algorithms. 271 These attributes are defined analogously to those in the previous 272 section. There is no definition for the certificate bag as the same 273 attribute would be used for both the sender and recipient 274 certificates. 276 x5chain-sender: This header parameter contains the chain of 277 certificates starting with the sender's key exchange certificate. 278 The structure is the same as 'x5chain'. 280 x5t-sender: This header parameter contains the hash value for the 281 sender's key exchange certificate. The structure is the same as 282 'x5t'. 284 x5u-sender: This header parameter contains a URI for the sender's 285 key exchange certificate. The structure and processing are the 286 same as 'x5u'. 288 +---------------+-----+-------------+-------------------+-----------+ 289 | Name |Label| Type | Algorithm |Description| 290 +===============+=====+=============+===================+===========+ 291 | x5t-sender | TBD |COSE_CertHash| ECDH-SS+HKDF-256, |Thumbprint | 292 | | | | ECDH-SS+HKDF-512, | for the | 293 | | | | ECDH-SS+A128KW, | senders | 294 | | | | ECDH-SS+AES192KW, | X.509 | 295 | | | | ECDH-SS+AES256KW |certificate| 296 +---------------+-----+-------------+-------------------+-----------+ 297 | x5u-sender | TBD | uri | ECDH-SS+HKDF-256, |URI for the| 298 | | | | ECDH-SS+HKDF-512, | senders | 299 | | | | ECDH-SS+A128KW, | X.509 | 300 | | | | ECDH-SS+AES192KW, |certificate| 301 | | | | ECDH-SS+AES256KW | | 302 +---------------+-----+-------------+-------------------+-----------+ 303 |x5chain-sender | TBD | COSE_X509 | ECDH-SS+HKDF-256, |static key | 304 | | | | ECDH-SS+HKDF-512, | X.509 | 305 | | | | ECDH-SS+A128KW, |certificate| 306 | | | | ECDH-SS+AES192KW, | chain | 307 | | | | ECDH-SS+AES256KW | | 308 +---------------+-----+-------------+-------------------+-----------+ 310 Table 2: Static ECDH Algorithm Values 312 4. IANA Considerations 314 4.1. COSE Header Parameter Registry 316 IANA is requested to register the new COSE Header parameter in 317 Table 1 in the "COSE Header Parameters" registry. The "Value 318 Registry" field is empty for all of the items. For each item, the 319 'Reference' field points to this document. 321 4.2. COSE Header Algorithm Parameter Registry 323 IANA is requested to register the new COSE Header Algorithm 324 parameters in Table 2 in the "COSE Header Algorithm Parameters" 325 registry. For each item, the 'Reference' field points to this 326 document. 328 5. Security Considerations 330 Establishing trust in a certificate is a vital part of processing. A 331 major component of establishing trust is determining what the set of 332 trust anchors are for the process. A new self-signed certificate 333 appearing on the client cannot be a trigger to modify the set of 334 trust anchors, instead a well defined trust-establishment process is 335 required. One common way for a new trust anchor to be added (or 336 removed) from a device is by doing a new firmware upgrade. 338 In constrained systems, there is a trade-off between the order of 339 checking the signature and checking the certificate for validity. 340 Validating certificates can require that network resources be 341 accessed in order to get revocation information or retrieve 342 certificates during path building. The resulting network access can 343 consume power and network bandwidth. On the other hand, an oracle 344 can potentially be built based on detecting the network resources 345 which is only done if the signature validation passes. In any event, 346 both the signature and certificate validation MUST be completed 347 successfully before acting on any requests. 349 Before using the keys in a certificate, they MUST be checked as 350 described in the COSE algorithms document 351 [I-D.ietf-cose-rfc8152bis-algs]. These checks can include validating 352 that points are on curves for elliptical curve algorithms, and that 353 sizes of RSA keys are of an acceptable size. The use of unvalidated 354 keys can lead either to loss of security or excessive consumption of 355 resources. 357 6. References 359 6.1. Normative References 361 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 362 Requirement Levels", BCP 14, RFC 2119, 363 DOI 10.17487/RFC2119, March 1997, 364 . 366 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 367 Housley, R., and W. Polk, "Internet X.509 Public Key 368 Infrastructure Certificate and Certificate Revocation List 369 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 370 . 372 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 373 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 374 May 2017, . 376 6.2. Informative References 378 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 379 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 380 . 382 [I-D.ietf-tls-dtls13] 383 Rescorla, E., Tschofenig, H., and N. Modadugu, "The 384 Datagram Transport Layer Security (DTLS) Protocol Version 385 1.3", Work in Progress, Internet-Draft, draft-ietf-tls- 386 dtls13-34, 19 November 2019, 387 . 389 [RFC8551] Schaad, J., Ramsdell, B., and S. Turner, "Secure/ 390 Multipurpose Internet Mail Extensions (S/MIME) Version 4.0 391 Message Specification", RFC 8551, DOI 10.17487/RFC8551, 392 April 2019, . 394 [RFC2585] Housley, R. and P. Hoffman, "Internet X.509 Public Key 395 Infrastructure Operational Protocols: FTP and HTTP", 396 RFC 2585, DOI 10.17487/RFC2585, May 1999, 397 . 399 [I-D.selander-ace-cose-ecdhe] 400 Selander, G., Mattsson, J., and F. Palombini, "Ephemeral 401 Diffie-Hellman Over COSE (EDHOC)", Work in Progress, 402 Internet-Draft, draft-selander-ace-cose-ecdhe-14, 11 403 September 2019, . 406 [RFC8392] Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig, 407 "CBOR Web Token (CWT)", RFC 8392, DOI 10.17487/RFC8392, 408 May 2018, . 410 [RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)", 411 RFC 8152, DOI 10.17487/RFC8152, July 2017, 412 . 414 [RFC8610] Birkholz, H., Vigano, C., and C. Bormann, "Concise Data 415 Definition Language (CDDL): A Notational Convention to 416 Express Concise Binary Object Representation (CBOR) and 417 JSON Data Structures", RFC 8610, DOI 10.17487/RFC8610, 418 June 2019, . 420 [I-D.ietf-cose-rfc8152bis-algs] 421 Schaad, J., "CBOR Object Signing and Encryption (COSE): 422 Initial Algorithms", Work in Progress, Internet-Draft, 423 draft-ietf-cose-rfc8152bis-algs-06, 4 November 2019, 424 . 427 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 428 Resource Identifier (URI): Generic Syntax", STD 66, 429 RFC 3986, DOI 10.17487/RFC3986, January 2005, 430 . 432 [I-D.richardson-enrollment-roadmap] 433 Richardson, M., "Device Enrollment in IETF protocols -- A 434 Roadmap", Work in Progress, Internet-Draft, draft- 435 richardson-enrollment-roadmap-02, 23 May 2018, 436 . 439 Author's Address 441 Jim Schaad 442 August Cellars 444 Email: ietf@augustcellars.com