idnits 2.17.1 draft-ietf-cose-x509-03.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 : ---------------------------------------------------------------------------- ** There are 3 instances of too long lines in the document, the longest one being 1 character in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (August 18, 2019) is 1684 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Outdated reference: A later version (-12) exists of draft-ietf-cose-rfc8152bis-algs-03 == Outdated reference: A later version (-43) exists of draft-ietf-tls-dtls13-32 == 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: 1 error (**), 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 August 18, 2019 5 Expires: February 19, 2020 7 CBOR Object Signing and Encryption (COSE): Headers for carrying and 8 referencing X.509 certificates 9 draft-ietf-cose-x509-03 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 https://github.com/ 25 cose-wg/X509. 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 February 19, 2020. 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 (https://trustee.ietf.org/ 53 license-info) in effect on the date of publication of this document. 54 Please review these documents carefully, as they describe your rights 55 and restrictions with respect to this document. Code Components 56 extracted from this document must include Simplified BSD License text 57 as described in Section 4.e of the Trust Legal Provisions and are 58 provided without warranty as described in the Simplified BSD License. 60 Table of Contents 62 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 63 1.1. Requirements Terminology . . . . . . . . . . . . . . . . 3 64 1.2. Open Questions . . . . . . . . . . . . . . . . . . . . . 3 65 2. X.509 COSE Headers . . . . . . . . . . . . . . . . . . . . . 3 66 3. X.509 certificates and static-static ECDH . . . . . . . . . . 6 67 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 68 4.1. COSE Header Parameter Registry . . . . . . . . . . . . . 7 69 4.2. COSE Header Algorithm Parameter Registry . . . . . . . . 7 70 5. Security Considerations . . . . . . . . . . . . . . . . . . . 7 71 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 72 6.1. Normative References . . . . . . . . . . . . . . . . . . 8 73 6.2. Informative References . . . . . . . . . . . . . . . . . 8 74 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 9 76 1. Introduction 78 In the process of writing [RFC8152] discussions where held on the 79 question of X.509 certificates [RFC5280] and if there was a needed to 80 provide for them. At the time there were no use cases presented that 81 appeared to have a sufficient need for these attributes. Since that 82 time a number of cases where X.509 certificate support is necessary 83 have been defined. This document provides a set of attributes that 84 will allow applications to transport and refer to X.509 certificates 85 in a consistent manner. 87 Some of the constrained device situations are being used where an 88 X.509 PKI is already installed. One of these situations is the 6tish 89 environment for enrollment of devices where the certificates are 90 installed at the factory. The [I-D.selander-ace-cose-ecdhe] draft 91 was also written with the idea that long term certificates could be 92 used to provide for authentication of devices and uses them to 93 establish session keys. A final scenario is the use of COSE as a 94 messaging application where long term existence of keys can be used 95 along with a central authentication authority. The use of 96 certificates in this scenario allows for key management to be used 97 which is well understood. 99 Example COSE messages for the various headers defined below can be 100 found at https://github.com/cose-wg/Examples. THIS IS NOT YET DONE 101 BUT SHOULD BE COMING NOT LONG AFTER THE F2F MEETING. 103 1.1. Requirements Terminology 105 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 106 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 107 "OPTIONAL" in this document are to be interpreted as described in BCP 108 14 [RFC2119] [RFC8174] when, and only when, they appear in all 109 capitals, as shown here. 111 1.2. Open Questions 113 Should we define an extended key usage? 115 Revocation info? 117 2. X.509 COSE Headers 119 The use of X.509 certificates allows for an existing trust 120 infrastructure to be used with COSE. This includes the full suite of 121 enrollment protocols, trust anchors, trust chaining and revocation 122 checking that have been defined over time by the IETF and other 123 organizations. The key structures that have been defined in COSE 124 currently do not support all of these properties although some may be 125 found in COSE Web Tokens (CWT) [RFC8392]. 127 It is not necessarily expected that constrained devices will fully 128 support the evaluation and processing of X.509 certificates, it is 129 perfectly reasonable for a certificate to be assigned to a device 130 which it can then provide to a relying party along with a signature 131 or encrypted message, the relying party not being a constrained 132 device. 134 Certificates obtained from any of these methods MUST still be 135 validated. This validation can be done via the PKIX rules in 136 [RFC5280] or by using a different trust structure, such as a trusted 137 certificate distributer for self-signed certificates. The PKIX 138 validation includes matching against the trust anchors configured for 139 the application. These rules apply to certificates of a chain length 140 of one as well as longer chains. If the application cannot establish 141 a trust in the certificate, then it cannot be used. 143 The header attributes defined in this document are: 145 x5bag: This header attributes contains a bag of X.509 146 certificates. The set of certificates in this header are 147 unordered and may contain self-signed certificates. The 148 certificate bag can contain certificates which are 149 completely extraneous to the message. (An example of this 150 would be to carry a certificate with a key agreement key 151 usage in a signed message.) As the certificates are 152 unordered, the party evaluating the signature will need to 153 do the necessary path building. Certificates needed for 154 any particular chain to be built may be absent from the 155 bag. 157 As this header element does not provide any trust, the 158 header attribute can be in either a protected or 159 unprotected header attribute. 161 This header attribute allows for a single or a bag of X.509 162 certificates to be carried in the message. 164 * If a single certificate is conveyed, it is placed in a 165 CBOR bstr. 167 * If multiple certificates are conveyed, a CBOR array of 168 bstrs is used. Each certificate being in its own bstr. 170 x5chain: This header attribute contains an ordered array of X.509 171 certificates. The certificates are to be ordered starting 172 with the certificate containing the end-entity key followed 173 by the certificate which signed it and so on. There is no 174 requirement for the entire chain to be present in the 175 element if there is reason to believe that the relying 176 party will already have it. This means that the relying 177 party is still required to do path building, but that a 178 candidate path is proposed in this attribute. 180 As this header element does not provide any trust, the 181 header attribute can be in either a protected or 182 unprotected header attribute. 184 This header attribute allows for a single or a chain of 185 X.509 certificates to be carried in the message. 187 * If a single certificate is conveyed, it is placed in a 188 CBOR bstr. 190 * If multiple certificates are conveyed, a CBOR array of 191 bstrs is used. Each certificate being in it's own slot. 193 x5t: This header attribute provides the ability to identify an 194 X.509 certificate by a hash value. The attribute is an 195 array of two elements. The first element is an algorithm 196 identifier which is an integer or a string containing the 197 hash algorithm identifier. The second element is a binary 198 string containing the hash value. 200 As this header element does not provide any trust, the 201 header attribute can be in either a protected or 202 unprotected header attribute. 204 For interoperability, applications which use this header 205 attribute MUST support the hash algorithm 'sha256', but can 206 use other hash algorithms. 208 x5u: This header attribute provides the ability to identify an 209 X.509 certificate by a URI. The referenced resource can be 210 any of the following media types: 212 * application/pkix-cert [RFC2585] 214 * application/pkcs7-mime; smime-type="certs-only" 215 [RFC8551] 217 As this header attribute implies a trust relationship, the 218 attribute MUST be in the protected attributes. 220 The URI provided MUST provide integrity protection and 221 server authentication. For example, an HTTP or CoAP GET 222 request to retrieve a certificate MUST use TLS [RFC8446] or 223 DTLS [I-D.ietf-tls-dtls13]. If the certificate does not 224 chain to an existing trust anchor, the certificate MUST NOT 225 be trusted unless the server is configured as trusted to 226 provide new trust anchors. This will normally be the 227 situation when self-signed certificates are used. 229 The header attributes are used in the following locations: 231 * COSE_Signature and COSE_Sign0 objects, in these objects they 232 identify the key that was used for generating signature. 234 * COSE_recipient objects, in this location they may be used to 235 identify the certificate for the recipient of the message. 237 +---------+-------+---------------+---------------------+ 238 | Name | Value | value type | description | 239 +=========+=======+===============+=====================+ 240 | x5bag | TBD4 | COSE_X509 | An unordered bag of | 241 | | | | X.509 certificates | 242 +---------+-------+---------------+---------------------+ 243 | x5chain | TBD3 | COSE_X509 | An ordered chain of | 244 | | | | X.509 certificates | 245 +---------+-------+---------------+---------------------+ 246 | x5t | TBD1 | COSE_CertHash | Hash of an X.509 | 247 | | | | certificate | 248 +---------+-------+---------------+---------------------+ 249 | x5u | TBD2 | uri | URI pointing to an | 250 | | | | X.509 certificate | 251 +---------+-------+---------------+---------------------+ 253 Table 1: X.509 COSE Headers 255 Below is an equivalent CDDL [RFC8610] description of the text above. 257 COSE_X509 = bstr / [ 2*certs: bstr ] 258 COSE_CertHash = [ hashAlg: (int / tstr), hashValue: bstr ] 260 3. X.509 certificates and static-static ECDH 262 The header attributes defined in the previous section are used to 263 identify the recipient certificates for the ECDH key agreement 264 algorithms. In this section we define the algorithm specific 265 parameters that are used for identifying or transporting the senders 266 key for static-static key agreement algorithms. 268 These attributes are defined analogously to those in the previous 269 section. There is no definition for the certificate bag as the same 270 attribute would be used for both the sender and recipient 271 certificates. 273 x5chain-sender: This header attribute contains the chain of 274 certificates starting with the sender's key exchange 275 certificate. The structure is the same as 'x5bag'. 277 x5t-sender: This header attribute contains the hash value for 278 the sender's key exchange certificate. The 279 structure is the same as 'x5t'. 281 x5u-sender: This header attribute contains a URI for the 282 sender's key exchange certificate. The structure 283 and processing are the same as 'x5u'. 285 +---------------+-----+-------------+-------------------+-----------+ 286 | Name |Value|Type | Algorithm |Description| 287 +===============+=====+=============+===================+===========+ 288 | x5t-sender |TBD |COSE_CertHash| ECDH-SS+HKDF-256, |Thumbprint | 289 | | | | ECDH-SS+HKDF-512, |for the | 290 | | | | ECDH-SS+A128KW, |senders | 291 | | | | ECDH- SS+AES192KW, |X.509 | 292 | | | | ECDH-SS+AES256KW |certificate| 293 +---------------+-----+-------------+-------------------+-----------+ 294 | x5u-sender |TBD |uri | ECDH-SS+HKDF-256, |URI for the| 295 | | | | ECDH-SS+HKDF-512, |senders | 296 | | | | ECDH-SS+A128KW, |X.509 | 297 | | | | ECDH- SS+AES192KW, |certificate| 298 | | | | ECDH-SS+AES256KW | | 299 +---------------+-----+-------------+-------------------+-----------+ 300 | x5chain-sender|TBD |COSE_X509 | ECDH-SS+HKDF-256, |static key | 301 | | | | ECDH-SS+HKDF-512, |X.509 | 302 | | | | ECDH-SS+A128KW, |certificate| 303 | | | | ECDH- SS+AES192KW, |chain | 304 | | | | ECDH-SS+AES256KW | | 305 +---------------+-----+-------------+-------------------+-----------+ 307 Table 2: Static ECDH Algorithm Values 309 4. IANA Considerations 311 4.1. COSE Header Parameter Registry 313 IANA is requested to register the new COSE Header items in Table 1 in 314 the "COSE Header Parameters" registry. 316 4.2. COSE Header Algorithm Parameter Registry 318 IANA is requested to register the new COSE Header items in Table 2 in 319 the "COSE Header Algorithm Parameters" registry. 321 5. Security Considerations 323 Establishing trust in a certificate is a vital part of processing. 324 Trust cannot be assumed whenever a new self-signed certificate 325 appears on the client, instead a well defined process is required. 326 One common way for a new trust anchor to be added (or removed) from a 327 device is by doing a new firmware upgrade. 329 In constrained systems, there is a trade-off between the order of 330 checking the signature and checking the certificate for validity. 331 Validating certificates can require that network resources be 332 accessed in order to get revocation information or retrieve 333 certificates during path building. Doing the network access can 334 consume resources dealing with power and network bandwidth. On the 335 other hand, an oracle can potentially be built based on if the 336 network resources are only accessed if the signature validation 337 passes. In any event, both the signature and certificate validation 338 MUST be checked before acting on any requests. 340 As called out in the COSE algorithms document 341 [I-D.ietf-cose-rfc8152bis-algs] basic checking on the keys in a 342 certificate needs to be performed prior to using them. These can 343 include validating that points are on curves for elliptical curve 344 algorithms and that sizes of keys are acceptable for RSA. The use of 345 unvalidated keys can lead either to loss of security or excessive 346 consumption of resources. 348 6. References 350 6.1. Normative References 352 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 353 Requirement Levels", BCP 14, RFC 2119, 354 DOI 10.17487/RFC2119, March 1997, 355 . 357 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 358 Housley, R., and W. Polk, "Internet X.509 Public Key 359 Infrastructure Certificate and Certificate Revocation List 360 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 361 . 363 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 364 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 365 May 2017, . 367 6.2. Informative References 369 [I-D.ietf-cose-rfc8152bis-algs] 370 Schaad, J., "CBOR Object Signing and Encryption (COSE): 371 Initial Algorithms", draft-ietf-cose-rfc8152bis-algs-03 372 (work in progress), June 10, 2019, 373 . 376 [I-D.ietf-tls-dtls13] 377 Rescorla, E., Tschofenig, H., and N. Modadugu, "The 378 Datagram Transport Layer Security (DTLS) Protocol Version 379 1.3", draft-ietf-tls-dtls13-32 (work in progress), July 8, 380 2019, . 383 [I-D.selander-ace-cose-ecdhe] 384 Selander, G., Mattsson, J., and F. Palombini, "Ephemeral 385 Diffie-Hellman Over COSE (EDHOC)", draft-selander-ace- 386 cose-ecdhe-13 (work in progress), March 11, 2019, 387 . 390 [RFC2585] Housley, R. and P. Hoffman, "Internet X.509 Public Key 391 Infrastructure Operational Protocols: FTP and HTTP", 392 RFC 2585, DOI 10.17487/RFC2585, May 1999, 393 . 395 [RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)", 396 RFC 8152, DOI 10.17487/RFC8152, July 2017, 397 . 399 [RFC8392] Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig, 400 "CBOR Web Token (CWT)", RFC 8392, DOI 10.17487/RFC8392, 401 May 2018, . 403 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 404 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 405 . 407 [RFC8551] Schaad, J., Ramsdell, B., and S. Turner, "Secure/ 408 Multipurpose Internet Mail Extensions (S/MIME) Version 4.0 409 Message Specification", RFC 8551, DOI 10.17487/RFC8551, 410 April 2019, . 412 [RFC8610] Birkholz, H., Vigano, C., and C. Bormann, "Concise Data 413 Definition Language (CDDL): A Notational Convention to 414 Express Concise Binary Object Representation (CBOR) and 415 JSON Data Structures", RFC 8610, DOI 10.17487/RFC8610, 416 June 2019, . 418 Author's Address 420 Jim Schaad 421 August Cellars 423 Email: ietf@augustcellars.com