idnits 2.17.1 draft-ietf-cose-x509-05.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 (4 November 2019) is 1632 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-33 -- 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-05 Summary: 0 errors (**), 0 flaws (~~), 3 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 4 November 2019 5 Expires: 7 May 2020 7 CBOR Object Signing and Encryption (COSE): Headers for carrying and 8 referencing X.509 certificates 9 draft-ietf-cose-x509-05 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 7 May 2020. 48 Copyright Notice 50 Copyright (c) 2019 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 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 . . . . . . . . 7 71 5. Security Considerations . . . . . . . . . . . . . . . . . . . 7 72 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 73 6.1. Normative References . . . . . . . . . . . . . . . . . . 8 74 6.2. Informative References . . . . . . . . . . . . . . . . . 8 75 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 9 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 90 6TiSCH environment for enrollment of devices where the certificates 91 are installed at the factory. The [I-D.selander-ace-cose-ecdhe] 92 draft was also written with the idea that long term certificates 93 could be used to provide for authentication of devices and uses them 94 to 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. 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 2. X.509 COSE Headers 113 The use of X.509 certificates allows for an existing trust 114 infrastructure to be used with COSE. This includes the full suite of 115 enrollment protocols, trust anchors, trust chaining and revocation 116 checking that have been defined over time by the IETF and other 117 organizations. The key structures that have been defined in COSE 118 currently do not support all of these properties although some may be 119 found in COSE Web Tokens (CWT) [RFC8392]. 121 It is not necessarily expected that constrained devices will fully 122 support the evaluation and processing of X.509 certificates, it is 123 perfectly reasonable for a certificate to be assigned to a device 124 which it can then provide to a relying party along with a signature 125 or encrypted message, the relying party not being a constrained 126 device. 128 Certificates obtained from any of these methods MUST still be 129 validated. This validation can be done via the PKIX rules in 130 [RFC5280] or by using a different trust structure, such as a trusted 131 certificate distributer for self-signed certificates. The PKIX 132 validation includes matching against the trust anchors configured for 133 the application. These rules apply to certificates of a chain length 134 of one as well as longer chains. If the application cannot establish 135 a trust in the certificate, then it cannot be used. 137 The header attributes defined in this document are: 139 x5bag: This header attributes contains a bag of X.509 certificates. 140 The set of certificates in this header are unordered and may 141 contain self-signed certificates. The certificate bag can contain 142 certificates which are completely extraneous to the message. (An 143 example of this would be to carry a certificate with a key 144 agreement key usage in a signed message.) As the certificates are 145 unordered, the party evaluating the signature will need to do the 146 necessary path building. Certificates needed for any particular 147 chain to be built may be absent from the bag. 149 As this header element does not provide any trust, the header 150 attribute can be in either a protected or unprotected header 151 attribute. 153 This header attribute allows for a single or a bag of X.509 154 certificates to be carried in the message. 156 * If a single certificate is conveyed, it is placed in a CBOR 157 bstr. 159 * If multiple certificates are conveyed, a CBOR array of bstrs is 160 used, with each certificate being in its own bstr. 162 x5chain: This header attribute contains an ordered array of X.509 163 certificates. The certificates are to be ordered starting with 164 the certificate containing the end-entity key followed by the 165 certificate which signed it and so on. There is no requirement 166 for the entire chain to be present in the element if there is 167 reason to believe that the relying party will already have it. 168 This means that the relying party is still required to do path 169 building, but that a candidate path is proposed in this attribute. 171 As this header element does not provide any trust, the header 172 attribute can be in either a protected or unprotected header 173 attribute. 175 This header attribute allows for a single or a chain of X.509 176 certificates to be carried in the message. 178 * If a single certificate is conveyed, it is placed in a CBOR 179 bstr. 181 * If multiple certificates are conveyed, a CBOR array of bstrs is 182 used, with each certificate being in its own bstr. 184 x5t: This header attribute provides the ability to identify an X.509 185 certificate by a hash value. The attribute is an array of two 186 elements. The first element is an algorithm identifier which is 187 an integer or a string containing the hash algorithm identifier. 188 The second element is a binary string containing the hash value. 190 As this header element does not provide any trust, the header 191 attribute can be in either a protected or unprotected header 192 attribute. 194 For interoperability, applications which use this header attribute 195 MUST support the hash algorithm 'SHA-256', but can use other hash 196 algorithms. 198 x5u: This header attribute provides the ability to identify an X.509 199 certificate by a URI. The referenced resource can be any of the 200 following media types: 202 * application/pkix-cert [RFC2585] 204 * application/pkcs7-mime; smime-type="certs-only" [RFC8551] 206 As this header attribute implies a trust relationship, the 207 attribute MUST be in the protected attributes. 209 The URI provided MUST provide integrity protection and server 210 authentication. For example, an HTTP or CoAP GET request to 211 retrieve a certificate MUST use TLS [RFC8446] or DTLS 212 [I-D.ietf-tls-dtls13]. If the certificate does not chain to an 213 existing trust anchor, the certificate MUST NOT be trusted unless 214 the server is configured as trusted to provide new trust anchors. 215 This will normally be the situation when self-signed certificates 216 are used. 218 The header attributes are used in the following locations: 220 * COSE_Signature and COSE_Sign0 objects, in these objects they 221 identify the certificate to be used for validation the signature. 223 * COSE_recipient objects, in this location they identify the 224 certificate for the recipient of the message. 226 +---------+-------+---------------+---------------------+ 227 | Name | Label | Value Type | Description | 228 +=========+=======+===============+=====================+ 229 | x5bag | TBD4 | COSE_X509 | An unordered bag of | 230 | | | | X.509 certificates | 231 +---------+-------+---------------+---------------------+ 232 | x5chain | TBD3 | COSE_X509 | An ordered chain of | 233 | | | | X.509 certificates | 234 +---------+-------+---------------+---------------------+ 235 | x5t | TBD1 | COSE_CertHash | Hash of an X.509 | 236 | | | | certificate | 237 +---------+-------+---------------+---------------------+ 238 | x5u | TBD2 | uri | URI pointing to an | 239 | | | | X.509 certificate | 240 +---------+-------+---------------+---------------------+ 242 Table 1: X.509 COSE Headers 244 Below is an equivalent CDDL [RFC8610] description of the text above. 246 COSE_X509 = bstr / [ 2*certs: bstr ] 247 COSE_CertHash = [ hashAlg: (int / tstr), hashValue: bstr ] 249 3. X.509 certificates and static-static ECDH 251 The header attributes defined in the previous section are used to 252 identify the recipient certificates for the ECDH key agreement 253 algorithms. In this section we define the algorithm specific 254 parameters that are used for identifying or transporting the senders 255 key for static-static key agreement algorithms. 257 These attributes are defined analogously to those in the previous 258 section. There is no definition for the certificate bag as the same 259 attribute would be used for both the sender and recipient 260 certificates. 262 x5chain-sender: This header attribute contains the chain of 263 certificates starting with the sender's key exchange certificate. 264 The structure is the same as 'x5chain'. 266 x5t-sender: This header attribute contains the hash value for the 267 sender's key exchange certificate. The structure is the same as 268 'x5t'. 270 x5u-sender: This header attribute contains a URI for the sender's 271 key exchange certificate. The structure and processing are the 272 same as 'x5u'. 274 +---------------+-----+-------------+-------------------+-----------+ 275 | Name |Label| Type | Algorithm |Description| 276 +===============+=====+=============+===================+===========+ 277 | x5t-sender | TBD |COSE_CertHash| ECDH-SS+HKDF-256, |Thumbprint | 278 | | | | ECDH-SS+HKDF-512, | for the | 279 | | | | ECDH-SS+A128KW, | senders | 280 | | | | ECDH-SS+AES192KW, | X.509 | 281 | | | | ECDH-SS+AES256KW |certificate| 282 +---------------+-----+-------------+-------------------+-----------+ 283 | x5u-sender | TBD | uri | ECDH-SS+HKDF-256, |URI for the| 284 | | | | ECDH-SS+HKDF-512, | senders | 285 | | | | ECDH-SS+A128KW, | X.509 | 286 | | | | ECDH-SS+AES192KW, |certificate| 287 | | | | ECDH-SS+AES256KW | | 288 +---------------+-----+-------------+-------------------+-----------+ 289 |x5chain-sender | TBD | COSE_X509 | ECDH-SS+HKDF-256, |static key | 290 | | | | ECDH-SS+HKDF-512, | X.509 | 291 | | | | ECDH-SS+A128KW, |certificate| 292 | | | | ECDH-SS+AES192KW, | chain | 293 | | | | ECDH-SS+AES256KW | | 294 +---------------+-----+-------------+-------------------+-----------+ 296 Table 2: Static ECDH Algorithm Values 298 4. IANA Considerations 300 4.1. COSE Header Parameter Registry 302 IANA is requested to register the new COSE Header items in Table 1 in 303 the "COSE Header Parameters" registry. The "Value Registry" field is 304 empty for all of the items. For each item, the 'Reference' field 305 points to this document. 307 4.2. COSE Header Algorithm Parameter Registry 309 IANA is requested to register the new COSE Header items in Table 2 in 310 the "COSE Header Algorithm Parameters" registry. For each item, the 311 'Reference' field points to this document. 313 5. Security Considerations 315 Establishing trust in a certificate is a vital part of processing. 316 Trust cannot be assumed whenever a new self-signed certificate 317 appears on the client, instead a well defined process is required. 318 One common way for a new trust anchor to be added (or removed) from a 319 device is by doing a new firmware upgrade. 321 In constrained systems, there is a trade-off between the order of 322 checking the signature and checking the certificate for validity. 323 Validating certificates can require that network resources be 324 accessed in order to get revocation information or retrieve 325 certificates during path building. Doing the network access can 326 consume resources dealing with power and network bandwidth. On the 327 other hand, an oracle can potentially be built based on if the 328 network resources are only accessed if the signature validation 329 passes. In any event, both the signature and certificate validation 330 MUST be checked before acting on any requests. 332 As called out in the COSE algorithms document 333 [I-D.ietf-cose-rfc8152bis-algs] basic checking on the keys in a 334 certificate needs to be performed prior to using them. These can 335 include validating that points are on curves for elliptical curve 336 algorithms and that sizes of keys are acceptable for RSA. The use of 337 unvalidated keys can lead either to loss of security or excessive 338 consumption of resources. 340 6. References 342 6.1. Normative References 344 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 345 Requirement Levels", BCP 14, RFC 2119, 346 DOI 10.17487/RFC2119, March 1997, 347 . 349 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 350 Housley, R., and W. Polk, "Internet X.509 Public Key 351 Infrastructure Certificate and Certificate Revocation List 352 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 353 . 355 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 356 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 357 May 2017, . 359 6.2. Informative References 361 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 362 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 363 . 365 [I-D.ietf-tls-dtls13] 366 Rescorla, E., Tschofenig, H., and N. Modadugu, "The 367 Datagram Transport Layer Security (DTLS) Protocol Version 368 1.3", Work in Progress, Internet-Draft, draft-ietf-tls- 369 dtls13-33, 11 October 2019, 370 . 372 [RFC8551] Schaad, J., Ramsdell, B., and S. Turner, "Secure/ 373 Multipurpose Internet Mail Extensions (S/MIME) Version 4.0 374 Message Specification", RFC 8551, DOI 10.17487/RFC8551, 375 April 2019, . 377 [RFC2585] Housley, R. and P. Hoffman, "Internet X.509 Public Key 378 Infrastructure Operational Protocols: FTP and HTTP", 379 RFC 2585, DOI 10.17487/RFC2585, May 1999, 380 . 382 [I-D.selander-ace-cose-ecdhe] 383 Selander, G., Mattsson, J., and F. Palombini, "Ephemeral 384 Diffie-Hellman Over COSE (EDHOC)", Work in Progress, 385 Internet-Draft, draft-selander-ace-cose-ecdhe-14, 11 386 September 2019, . 389 [RFC8392] Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig, 390 "CBOR Web Token (CWT)", RFC 8392, DOI 10.17487/RFC8392, 391 May 2018, . 393 [RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)", 394 RFC 8152, DOI 10.17487/RFC8152, July 2017, 395 . 397 [RFC8610] Birkholz, H., Vigano, C., and C. Bormann, "Concise Data 398 Definition Language (CDDL): A Notational Convention to 399 Express Concise Binary Object Representation (CBOR) and 400 JSON Data Structures", RFC 8610, DOI 10.17487/RFC8610, 401 June 2019, . 403 [I-D.ietf-cose-rfc8152bis-algs] 404 Schaad, J., "CBOR Object Signing and Encryption (COSE): 405 Initial Algorithms", Work in Progress, Internet-Draft, 406 draft-ietf-cose-rfc8152bis-algs-05, 11 September 2019, 407 . 410 Author's Address 412 Jim Schaad 413 August Cellars 415 Email: ietf@augustcellars.com