idnits 2.17.1 draft-ietf-cose-x509-02.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 (June 20, 2019) is 1772 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Unused Reference: 'I-D.ietf-cose-rfc8152bis-struct' is defined on line 362, but no explicit reference was found in the text == Outdated reference: A later version (-15) exists of draft-ietf-cose-rfc8152bis-struct-02 == Outdated reference: A later version (-12) exists of draft-ietf-cose-rfc8152bis-algs-02 == Outdated reference: A later version (-43) exists of draft-ietf-tls-dtls13-31 == Outdated reference: A later version (-14) exists of draft-selander-ace-cose-ecdhe-13 -- Obsolete informational reference (is this intentional?): RFC 8152 (Obsoleted by RFC 9052, RFC 9053) Summary: 0 errors (**), 0 flaws (~~), 6 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 June 20, 2019 5 Expires: December 22, 2019 7 CBOR Object Signing and Encryption (COSE): Headers for carrying and 8 referencing X.509 certificates 9 draft-ietf-cose-x509-02 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 The source for this draft is being maintained in GitHub. Suggested 24 changes should be submitted as pull requests at . Instructions are on that page as well. Editorial 26 changes can be managed in GitHub, but any substantial issues need to 27 be discussed on the COSE mailing list. 29 Status of This Memo 31 This Internet-Draft is submitted in full conformance with the 32 provisions of BCP 78 and BCP 79. 34 Internet-Drafts are working documents of the Internet Engineering 35 Task Force (IETF). Note that other groups may also distribute 36 working documents as Internet-Drafts. The list of current Internet- 37 Drafts is at https://datatracker.ietf.org/drafts/current/. 39 Internet-Drafts are draft documents valid for a maximum of six months 40 and may be updated, replaced, or obsoleted by other documents at any 41 time. It is inappropriate to use Internet-Drafts as reference 42 material or to cite them other than as "work in progress." 44 This Internet-Draft will expire on December 22, 2019. 46 Copyright Notice 48 Copyright (c) 2019 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents 53 (https://trustee.ietf.org/license-info) in effect on the date of 54 publication of this document. Please review these documents 55 carefully, as they describe your rights and restrictions with respect 56 to this document. Code Components extracted from this document must 57 include Simplified BSD License text as described in Section 4.e of 58 the Trust Legal Provisions and are provided without warranty as 59 described in the Simplified BSD License. 61 Table of Contents 63 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 64 1.1. Requirements Terminology . . . . . . . . . . . . . . . . 3 65 1.2. Open Questions . . . . . . . . . . . . . . . . . . . . . 3 66 2. X.509 COSE Headers . . . . . . . . . . . . . . . . . . . . . 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 . . . . . . . . 8 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 where held on the 80 question of X.509 certificates [RFC5280] and if there was a needed to 81 provide for them. At the time there were no use cases presented that 82 appeared to have a sufficient need for these attributes. Since that 83 time a number of cases where X.509 certificate support is necessary 84 have been defined. This document provides a set of attributes that 85 will allow applications to transport and refer to X.509 certificates 86 in a consistent manner. 88 Some of the constrained device situations are being used where an 89 X.509 PKI is already installed. One of these situations is the 6tish 90 environment for enrollment of devices where the certificates are 91 installed at the factory. The [I-D.selander-ace-cose-ecdhe] draft 92 was also written with the idea that long term certificates could be 93 used to provide for authentication of devices and uses them to 94 establish session keys. A final scenario is the use of COSE as a 95 messaging application where long term existence of keys can be used 96 along with a central authentication authority. The use of 97 certificates in this scenario allows for key management to be used 98 which is well understood. 100 Example COSE messages for the various headers defined below can be 101 found at https://github.com/cose-wg/Examples. THIS IS NOT YET DONE 102 BUT SHOULD BE COMING NOT LONG AFTER THE F2F MEETING. 104 1.1. Requirements Terminology 106 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 107 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 108 "OPTIONAL" in this document are to be interpreted as described in BCP 109 14 [RFC2119] [RFC8174] when, and only when, they appear in all 110 capitals, as shown here. 112 1.2. Open Questions 114 Should we define an extended key usage? 116 Revocation info? 118 2. X.509 COSE Headers 120 The use of X.509 certificates allows for an existing trust 121 infrastructure to be used with COSE. This includes the full suite of 122 enrollment protocols, trust anchors, trust chaining and revocation 123 checking that have been defined over time by the IETF and other 124 organizations. The key structures that have been defined in COSE 125 currently do not support all of these properties although some may be 126 found in COSE Web Tokens (CWT) [RFC8392]. 128 It is not necessarily expected that constrained devices will fully 129 support the evaluation and processing of X.509 certificates, it is 130 perfectly reasonable for a certificate to be assigned to a device 131 which it can then provide to a relying party along with a signature 132 or encrypted message, the relying party not being a constrained 133 device. 135 Certificates obtained from any of these methods MUST still be 136 validated. This validation can be done via the PKIX rules in 137 [RFC5280] or by using a different trust structure, such as a trusted 138 certificate distributer for self-signed certificates. The PKIX 139 validation includes matching against the trust anchors configured for 140 the application. These rules apply to certificates of a chain length 141 of one as well as longer chains. If the application cannot establish 142 a trust in the certificate, then it cannot be used. 144 The header attributes defined in this document are: 146 x5bag: This header attributes contains a bag of X.509 certificates. 147 The set of certificates in this header are unordered and may 148 contain self-signed certificates. The certificate bag can contain 149 certificates which are completely extraneous to the message. (An 150 example of this would be to carry a certificate with a key 151 agreement key usage in a signed message.) As the certificates are 152 unordered, the party evaluating the signature will need to do the 153 necessary path building. Certificates needed for any particular 154 chain to be built may be absent from the bag. 156 As this header element does not provide any trust, the header 157 attribute can be in either a protected or unprotected header 158 attribute. 160 This header attribute allows for a single or a bag of X.509 161 certificates to be carried in the message. 163 * If a single certificate is conveyed, it is placed in a CBOR 164 bstr. 166 * If multiple certificates are conveyed, a CBOR array of bstrs is 167 used. Each certificate being in it's own slot. 169 x5chain: This header attribute contains an ordered array of X.509 170 certificates. The certificates are to be ordered starting with 171 the certificate containing the end-entity key followed by the 172 certificate which signed it and so on. There is no requirement 173 for the entire chain to be present in the element if there is 174 reason to believe that the relying party will already have it. 175 This means that the relying party is still required to do path 176 building, but that a candidate path is proposed in this attribute. 178 As this header element does not provide any trust, the header 179 attribute can be in either a protected or unprotected header 180 attribute. 182 This header attribute allows for a single or a chain of X.509 183 certificates to be carried in the message. 185 * If a single certificate is conveyed, it is placed in a CBOR 186 bstr. 188 * If multiple certificates are conveyed, a CBOR array of bstrs is 189 used. Each certificate being in it's own slot. 191 x5t: This header attribute provides the ability to identify an X.509 192 certificate by a hash value. The attribute is an array of two 193 elements. The first element is an algorithm identifier which is 194 an integer or a string containing the hash algorithm identifier. 195 The second element is a binary string containing the hash value. 197 As this header element does not provide any trust, the header 198 attribute can be in either a protected or unprotected header 199 attribute. 200 For interoperability, applications which use this header attribute 201 MUST support the hash algorithm 'sha256', but can use other hash 202 algorithms. 204 x5u: This header attribute provides the ability to identify an X.509 205 certificate by a URL. The referenced resource can be any of the 206 following media types: 208 * application/pkix-cert [RFC2585] 210 * application/pkcs7-mime; smime-type="certs-only" 211 [I-D.ietf-lamps-rfc5751-bis] 213 * application/pem-certificate-chain [I-D.ietf-acme-acme] 215 As this header attribute implies a trust relationship, the 216 attribute MUST be in the protected attributes. 217 The URL provided MUST provide integrity protection and server 218 authentication. For example, an HTTP or CoAP GET request to 219 retrieve a certificate MUST use TLS [RFC8446] or DTLS 220 [I-D.ietf-tls-dtls13]. If the certificate does not chain to an 221 existing trust anchor, the certificate MUST NOT be trusted unless 222 the server is configured as trusted to provide new trust anchors. 223 This will normally be the situation when self-signed certificates 224 are used. 226 The header attributes are used in the following locations: 228 o COSE_Signature and COSE_Sign0 objects, in these objects they 229 identify the key that was used for generating signature. 231 o COSE_recipient objects, in this location they may be used to 232 identify the certificate for the recipient of the message. 234 +---------+-------+---------------+---------------------------------+ 235 | Name | Value | value type | description | 236 +---------+-------+---------------+---------------------------------+ 237 | x5bag | TBD4 | COSE_X509 | An unordered bag of X.509 | 238 | | | | certificates | 239 | | | | | 240 | x5chain | TBD3 | COSE_X509 | An ordered chain of X.509 | 241 | | | | certificates | 242 | | | | | 243 | x5t | TBD1 | COSE_CertHash | Hash of an X.509 certificate | 244 | | | | | 245 | x5u | TBD2 | uri | URL pointing to an X.509 | 246 | | | | certificate | 247 +---------+-------+---------------+---------------------------------+ 249 Table 1: X.509 COSE Headers 251 Below is an equivalent CDDL [I-D.ietf-cbor-cddl] description of the 252 text above. 254 COSE_X509 = bstr / [ 2*certs: bstr ] 255 COSE_CertHash = [ hashAlg: (int / tstr), hashValue: bstr ] 257 3. X.509 certificates and static-static ECDH 259 The header attributes defined in the previous section are used to 260 identify the recipient certificates for the ECDH key agreement 261 algorithms. In this section we define the algorithm specific 262 parameters that are used for identifying or transporting the senders 263 key for static-static key agreement algorithms. 265 These attributes are defined analogously to those in the previous 266 section. There is no definition for the certificate bag as the same 267 attribute would be used for both the sender and recipient 268 certificates. 270 x5chain-sender: This header attribute contains the chain of 271 certificates starting with the sender's key exchange certificate. 272 The structure is the same as 'x5bag'. 274 x5t-sender: This header attribute contains the hash value for the 275 sender's key exchange certificate. The structure is the same as 276 'x5t'. 278 x5u-sender: This header attribute contains a URL for the sender's 279 key exchange certificate. The structure and processing are the 280 same as 'x5u'. 282 +--------------+------+--------------+-----------------+------------+ 283 | Name | Valu | Type | Algorithm | Descriptio | 284 | | e | | | n | 285 +--------------+------+--------------+-----------------+------------+ 286 | x5t-sender | TBD | COSE_CertHas | ECDH- | Thumbprint | 287 | | | h | SS+HKDF-256, | for the | 288 | | | | ECDH- | senders | 289 | | | | SS+HKDF-512, | X.509 cert | 290 | | | | ECDH-SS+A128KW, | ificate | 291 | | | | ECDH- | | 292 | | | | SS+AES192KW, | | 293 | | | | ECDH- | | 294 | | | | SS+AES256KW | | 295 | | | | | | 296 | x5u-sender | TBD | uri | ECDH- | URL for | 297 | | | | SS+HKDF-256, | the | 298 | | | | ECDH- | senders | 299 | | | | SS+HKDF-512, | X.509 cert | 300 | | | | ECDH-SS+A128KW, | ificate | 301 | | | | ECDH- | | 302 | | | | SS+AES192KW, | | 303 | | | | ECDH- | | 304 | | | | SS+AES256KW | | 305 | | | | | | 306 | x5chain- | TBD | COSE_X509 | ECDH- | static key | 307 | sender | | | SS+HKDF-256, | X.509 cert | 308 | | | | ECDH- | ificate | 309 | | | | SS+HKDF-512, | chain | 310 | | | | ECDH-SS+A128KW, | | 311 | | | | ECDH- | | 312 | | | | SS+AES192KW, | | 313 | | | | ECDH- | | 314 | | | | SS+AES256KW | | 315 +--------------+------+--------------+-----------------+------------+ 317 Table 2: Static ECDH Algorithm Values 319 4. IANA Considerations 321 4.1. COSE Header Parameter Registry 323 IANA is requested to register the new COSE Header items in Table 1 in 324 the "COSE Header Parameters" registry. 326 4.2. COSE Header Algorithm Parameter Registry 328 IANA is requested to register the new COSE Header items in Table 2 in 329 the "COSE Header Algorithm Parameters" registry. 331 5. Security Considerations 333 Establishing trust in a certificate is a vital part of processing. 334 Trust cannot be assumed whenever a new self-signed certificate 335 appears on the client, instead a well defined process is required. 336 One common way for a new trust anchor to be added (or removed) from a 337 device is by doing a new firmware upgrade. 339 In constrained systems, there is a trade-off between the order of 340 checking the signature and checking the certificate for validity. 341 Validating certificates can require that network resources be 342 accessed in order to get revocation information or retrieve 343 certificates during path building. Doing the network access can 344 consume resources dealing with power and network bandwidth. On the 345 other hand, an oracle can potentially be built based on if the 346 network resources are only accessed if the signature validation 347 passes. In any event, both the signature and certificate validation 348 MUST be checked before acting on any requests. 350 As called out in the COSE algorithms document 351 [I-D.ietf-cose-rfc8152bis-algs] basic checking on the keys in a 352 certificate needs to be performed prior to using them. These can 353 include validating that points are on curves for elliptical curve 354 algorithms and that sizes of keys are acceptable for RSA. The use of 355 unvalidated keys can lead either to loss of security or excessive 356 consumption of resources. 358 6. References 360 6.1. Normative References 362 [I-D.ietf-cose-rfc8152bis-struct] 363 Schaad, J., "CBOR CBOR Object Signing and Encryption 364 (COSE): Structures and Process", draft-ietf-cose- 365 rfc8152bis-struct-02 (work in progress), March 2019. 367 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 368 Requirement Levels", BCP 14, RFC 2119, 369 DOI 10.17487/RFC2119, March 1997, 370 . 372 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 373 Housley, R., and W. Polk, "Internet X.509 Public Key 374 Infrastructure Certificate and Certificate Revocation List 375 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 376 . 378 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 379 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 380 May 2017, . 382 6.2. Informative References 384 [I-D.ietf-acme-acme] 385 Barnes, R., Hoffman-Andrews, J., McCarney, D., and J. 386 Kasten, "Automatic Certificate Management Environment 387 (ACME)", draft-ietf-acme-acme-18 (work in progress), 388 December 2018. 390 [I-D.ietf-cbor-cddl] 391 Birkholz, H., Vigano, C., and C. Bormann, "Concise data 392 definition language (CDDL): a notational convention to 393 express CBOR and JSON data structures", draft-ietf-cbor- 394 cddl-08 (work in progress), March 2019. 396 [I-D.ietf-cose-rfc8152bis-algs] 397 Schaad, J., "CBOR Object Signing and Encryption (COSE): 398 Initial Algorithms", draft-ietf-cose-rfc8152bis-algs-02 399 (work in progress), March 2019. 401 [I-D.ietf-lamps-rfc5751-bis] 402 Schaad, J., Ramsdell, B., and S. Turner, "Secure/ 403 Multipurpose Internet Mail Extensions (S/MIME) Version 4.0 404 Message Specification", draft-ietf-lamps-rfc5751-bis-12 405 (work in progress), September 2018. 407 [I-D.ietf-tls-dtls13] 408 Rescorla, E., Tschofenig, H., and N. Modadugu, "The 409 Datagram Transport Layer Security (DTLS) Protocol Version 410 1.3", draft-ietf-tls-dtls13-31 (work in progress), March 411 2019. 413 [I-D.selander-ace-cose-ecdhe] 414 Selander, G., Mattsson, J., and F. Palombini, "Ephemeral 415 Diffie-Hellman Over COSE (EDHOC)", draft-selander-ace- 416 cose-ecdhe-13 (work in progress), March 2019. 418 [RFC2585] Housley, R. and P. Hoffman, "Internet X.509 Public Key 419 Infrastructure Operational Protocols: FTP and HTTP", 420 RFC 2585, DOI 10.17487/RFC2585, May 1999, 421 . 423 [RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)", 424 RFC 8152, DOI 10.17487/RFC8152, July 2017, 425 . 427 [RFC8392] Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig, 428 "CBOR Web Token (CWT)", RFC 8392, DOI 10.17487/RFC8392, 429 May 2018, . 431 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 432 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 433 . 435 Author's Address 437 Jim Schaad 438 August Cellars 440 Email: ietf@augustcellars.com