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