idnits 2.17.00 (12 Aug 2021) /tmp/idnits59724/draft-ietf-jose-json-web-key-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 : ---------------------------------------------------------------------------- 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 (July 6, 2012) is 3605 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Possible downref: Non-RFC (?) normative reference: ref. 'JWA' ** Obsolete normative reference: RFC 4627 (Obsoleted by RFC 7158, RFC 7159) ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) Summary: 2 errors (**), 0 flaws (~~), 1 warning (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 JOSE Working Group M. Jones 3 Internet-Draft Microsoft 4 Intended status: Standards Track July 6, 2012 5 Expires: January 7, 2013 7 JSON Web Key (JWK) 8 draft-ietf-jose-json-web-key-03 10 Abstract 12 A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data 13 structure that represents a public key. This specification also 14 defines a JSON Web Key Set (JWK Set) JSON data structure for 15 representing a set of JWKs. Cryptographic algorithms and identifiers 16 for use with this specification are described in the separate JSON 17 Web Algorithms (JWA) specification. 19 Status of this Memo 21 This Internet-Draft is submitted in full conformance with the 22 provisions of BCP 78 and BCP 79. 24 Internet-Drafts are working documents of the Internet Engineering 25 Task Force (IETF). Note that other groups may also distribute 26 working documents as Internet-Drafts. The list of current Internet- 27 Drafts is at http://datatracker.ietf.org/drafts/current/. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or to cite them other than as "work in progress." 34 This Internet-Draft will expire on January 7, 2013. 36 Copyright Notice 38 Copyright (c) 2012 IETF Trust and the persons identified as the 39 document authors. All rights reserved. 41 This document is subject to BCP 78 and the IETF Trust's Legal 42 Provisions Relating to IETF Documents 43 (http://trustee.ietf.org/license-info) in effect on the date of 44 publication of this document. Please review these documents 45 carefully, as they describe your rights and restrictions with respect 46 to this document. Code Components extracted from this document must 47 include Simplified BSD License text as described in Section 4.e of 48 the Trust Legal Provisions and are provided without warranty as 49 described in the Simplified BSD License. 51 Table of Contents 53 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 54 1.1. Notational Conventions . . . . . . . . . . . . . . . . . . 3 55 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 56 3. Example JSON Web Key Set . . . . . . . . . . . . . . . . . . . 4 57 4. JSON Web Key (JWK) Format . . . . . . . . . . . . . . . . . . 4 58 4.1. "alg" (Algorithm Family) Parameter . . . . . . . . . . . . 5 59 4.2. "use" (Key Use) Parameter . . . . . . . . . . . . . . . . 5 60 4.3. "kid" (Key ID) Parameter . . . . . . . . . . . . . . . . . 5 61 5. JSON Web Key Set (JWK Set) Format . . . . . . . . . . . . . . 6 62 5.1. "keys" (JSON Web Key Set) Parameter . . . . . . . . . . . 6 63 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 64 6.1. JSON Web Key Parameters Registry . . . . . . . . . . . . . 7 65 6.1.1. Registration Template . . . . . . . . . . . . . . . . 7 66 6.1.2. Initial Registry Contents . . . . . . . . . . . . . . 7 67 6.2. JSON Web Key Set Parameters Registry . . . . . . . . . . . 8 68 6.2.1. Registration Template . . . . . . . . . . . . . . . . 8 69 6.2.2. Initial Registry Contents . . . . . . . . . . . . . . 8 70 7. Security Considerations . . . . . . . . . . . . . . . . . . . 8 71 8. Open Issues . . . . . . . . . . . . . . . . . . . . . . . . . 9 72 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 9 73 9.1. Normative References . . . . . . . . . . . . . . . . . . . 9 74 9.2. Informative References . . . . . . . . . . . . . . . . . . 9 75 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 10 76 Appendix B. Document History . . . . . . . . . . . . . . . . . . 10 77 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 11 79 1. Introduction 81 A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) [RFC4627] 82 data structure that represents a public key. This specification also 83 defines a JSON Web Key Set (JWK Set) JSON data structure for 84 representing a set of JWKs. Cryptographic algorithms and identifiers 85 for use with this specification are described in the separate JSON 86 Web Algorithms (JWA) [JWA] specification. 88 Goals for this specification do not include representing private 89 keys, representing symmetric keys, representing certificate chains, 90 representing certified keys, and replacing X.509 certificates. 92 JWKs and JWK Sets are used in the JSON Web Signature (JWS) [JWS] and 93 JSON Web Encryption (JWE) [JWE] specifications. 95 1.1. Notational Conventions 97 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 98 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 99 document are to be interpreted as described in Key words for use in 100 RFCs to Indicate Requirement Levels [RFC2119]. 102 2. Terminology 104 JSON Web Key (JWK) A JSON data structure that represents a public 105 key. 107 JSON Web Key Set (JWK Set) A JSON object that contains an array of 108 JWKs as a member. 110 Base64url Encoding For the purposes of this specification, this term 111 always refers to the URL- and filename-safe Base64 encoding 112 described in RFC 4648 [RFC4648], Section 5, with the (non URL- 113 safe) '=' padding characters omitted, as permitted by Section 3.2. 114 (See Appendix C of [JWS] for notes on implementing base64url 115 encoding without padding.) 117 Collision Resistant Namespace A namespace that allows names to be 118 allocated in a manner such that they are highly unlikely to 119 collide with other names. For instance, collision resistance can 120 be achieved through administrative delegation of portions of the 121 namespace or through use of collision-resistant name allocation 122 functions. Examples of Collision Resistant Namespaces include: 123 Domain Names, Object Identifiers (OIDs) as defined in the ITU-T 124 X.660 and X.670 Recommendation series, and Universally Unique 125 IDentifiers (UUIDs) [RFC4122]. When using an administratively 126 delegated namespace, the definer of a name needs to take 127 reasonable precautions to ensure they are in control of the 128 portion of the namespace they use to define the name. 130 3. Example JSON Web Key Set 132 The following example JWK Set contains two public keys represented as 133 JWKs: one using an Elliptic Curve algorithm and a second one using an 134 RSA algorithm. The first specifies that the key is to be used for 135 encryption. Both provide a Key ID for key matching purposes. In 136 both cases, integers are represented using the base64url encoding of 137 their big endian representations. (Long lines are broken are for 138 display purposes only.) 139 {"keys": 140 [ 141 {"alg":"EC", 142 "crv":"P-256", 143 "x":"MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4", 144 "y":"4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM", 145 "use":"enc", 146 "kid":"1"}, 148 {"alg":"RSA", 149 "mod": "0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx 150 4cbbfAAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n3oknjhMs 151 tn64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65YGjQR0_FDW2 152 QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n91CbOpbI 153 SD08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINHaQ-G_xBniIqb 154 w0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw", 155 "exp":"AQAB", 156 "kid":"2011-04-29"} 157 ] 158 } 160 4. JSON Web Key (JWK) Format 162 A JSON Web Key (JWK) is a JSON object containing specific members, as 163 specified below. Those members that are common to all key types are 164 defined below. 166 A JWK also requires members that are specific to the particular kind 167 of key to represent the key parameters. See Section 5 of the JSON 168 Web Algorithms (JWA) [JWA] specification for definitions of the 169 members specific to the kinds of keys defined there. 171 The member names within a JWK MUST be unique; objects with duplicate 172 member names MUST be rejected. 174 Additional members MAY be present in the JWK. If present, they MUST 175 be understood by implementations using them. Member names for 176 representing specific kinds of keys SHOULD either be registered in 177 the IANA JSON Web Key Parameters registry Section 6.1 or be URIs that 178 contain a Collision Resistant Namespace. 180 4.1. "alg" (Algorithm Family) Parameter 182 The "alg" (algorithm family) member identifies the cryptographic 183 algorithm family used with the key. The "alg" value is case 184 sensitive. Its value MUST be a string. 186 A list of defined "alg" values is presented in Section 5.1 of the 187 JSON Web Algorithms (JWA) [JWA] specification. Additional members 188 used with these "alg" values are defined in Sections 5.2 and 5.3 of 189 the JSON Web Algorithms (JWA) [JWA] specification. "alg" values 190 SHOULD either be registered in the IANA JSON Web Key Algorithm 191 Families registry [JWA] or be a URI that contains a Collision 192 Resistant Namespace. 194 4.2. "use" (Key Use) Parameter 196 The "use" (key use) member identifies the intended use of the key. 197 Values defined by this specification are: 199 o "sig" (signature) 201 o "enc" (encryption) 203 Other values MAY be used. The "use" value is case sensitive. Its 204 value MUST be a string. This member is OPTIONAL. 206 4.3. "kid" (Key ID) Parameter 208 The "kid" (key ID) member can be used to match a specific key. This 209 can be used, for instance, to choose among a set of keys within the 210 JWK during key rollover. The interpretation of the "kid" value is 211 unspecified. Key ID values within a JWK Set need not be unique; for 212 instance, in some contexts different keys using the same Key ID value 213 might be present, with the keys being disambiguated using other 214 information, such as the "alg" or "use" values. The "kid" value is 215 case sensitive. Its value MUST be a string. This member is 216 OPTIONAL. 218 When used with JWS or JWE, the "kid" value MAY be used to match a JWS 219 or JWE "kid" header parameter value. 221 5. JSON Web Key Set (JWK Set) Format 223 A JSON Web Key Set (JWK Set) is a JSON object that contains an array 224 of JSON Web Key values as the value of its "keys" member. 226 The member names within a JWK Set MUST be unique; objects with 227 duplicate member names MUST be rejected. 229 Additional members MAY be present in the JWK Set. If present, they 230 MUST be understood by implementations using them. Parameters for 231 representing additional properties of JWK Sets SHOULD either be 232 registered in the IANA JSON Web Key Set Parameters registry 233 Section 6.2 or be a URI that contains a Collision Resistant 234 Namespace. 236 5.1. "keys" (JSON Web Key Set) Parameter 238 The value of the "keys" (JSON Web Key Set) member is an array of JSON 239 Web Key (JWK) values. This member is REQUIRED. 241 6. IANA Considerations 243 The following registration procedure is used for all the registries 244 established by this specification. 246 Values are registered with a Specification Required [RFC5226] after a 247 two week review period on the [TBD]@ietf.org mailing list, on the 248 advice of one or more Designated Experts. However, to allow for the 249 allocation of values prior to publication, the Designated Expert(s) 250 may approve registration once they are satisfied that such a 251 specification will be published. 253 Registration requests must be sent to the [TBD]@ietf.org mailing list 254 for review and comment, with an appropriate subject (e.g., "Request 255 for access token type: example"). [[ Note to RFC-EDITOR: The name of 256 the mailing list should be determined in consultation with the IESG 257 and IANA. Suggested name: jose-reg-review. ]] 259 Within the review period, the Designated Expert(s) will either 260 approve or deny the registration request, communicating this decision 261 to the review list and IANA. Denials should include an explanation 262 and, if applicable, suggestions as to how to make the request 263 successful. 265 IANA must only accept registry updates from the Designated Expert(s), 266 and should direct all requests for registration to the review mailing 267 list. 269 6.1. JSON Web Key Parameters Registry 271 This specification establishes the IANA JSON Web Key Parameters 272 registry for reserved JWK parameter names. The registry records the 273 reserved parameter name and a reference to the specification that 274 defines it. This specification registers the parameter names defined 275 in Section 4. 277 6.1.1. Registration Template 279 Parameter Name: 280 The name requested (e.g., "example"). 282 Change Controller: 283 For standards-track RFCs, state "IETF". For others, give the name 284 of the responsible party. Other details (e.g., postal address, 285 e-mail address, home page URI) may also be included. 287 Specification Document(s): 288 Reference to the document that specifies the parameter, preferably 289 including a URI that can be used to retrieve a copy of the 290 document. An indication of the relevant sections may also be 291 included, but is not required. 293 6.1.2. Initial Registry Contents 295 o Parameter Name: "alg" 297 o Change Controller: IETF 299 o Specification Document(s): Section 4.1 of [[ this document ]] 301 o Parameter Name: "use" 303 o Change Controller: IETF 305 o Specification Document(s): Section 4.2 of [[ this document ]] 307 o Parameter Name: "kid" 309 o Change Controller: IETF 311 o Specification Document(s): Section 4.3 of [[ this document ]] 313 6.2. JSON Web Key Set Parameters Registry 315 This specification establishes the IANA JSON Web Key Set Parameters 316 registry for reserved JWK Set parameter names. The registry records 317 the reserved parameter name and a reference to the specification that 318 defines it. This specification registers the parameter names defined 319 in Section 5. 321 6.2.1. Registration Template 323 Parameter Name: 324 The name requested (e.g., "example"). 326 Change Controller: 327 For standards-track RFCs, state "IETF". For others, give the name 328 of the responsible party. Other details (e.g., postal address, 329 e-mail address, home page URI) may also be included. 331 Specification Document(s): 332 Reference to the document that specifies the parameter, preferably 333 including a URI that can be used to retrieve a copy of the 334 document. An indication of the relevant sections may also be 335 included, but is not required. 337 6.2.2. Initial Registry Contents 339 o Parameter Name: "keys" 341 o Change Controller: IETF 343 o Specification Document(s): Section 5.1 of [[ this document ]] 345 7. Security Considerations 347 All of the security issues faced by any cryptographic application 348 must be faced by a JWS/JWE/JWK agent. Among these issues are 349 protecting the user's private key, preventing various attacks, and 350 helping the user avoid mistakes such as inadvertently encrypting a 351 message for the wrong recipient. The entire list of security 352 considerations is beyond the scope of this document, but some 353 significant concerns are listed here. 355 A key is no more trustworthy than the method by which it was 356 received. 358 Per Section 4.3, applications should not assume that "kid" values are 359 unique within a JWK Set. 361 The security considerations in XML DSIG 2.0 362 [W3C.CR-xmldsig-core2-20120124], about public key representations 363 also apply to this specification, other than those that are XML 364 specific. 366 8. Open Issues 368 [[ to be removed by the RFC editor before publication as an RFC ]] 370 The following items remain to be considered or done in this draft: 372 o (None at present) 374 9. References 376 9.1. Normative References 378 [JWA] Jones, M., "JSON Web Algorithms (JWA)", July 2012. 380 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 381 Requirement Levels", BCP 14, RFC 2119, March 1997. 383 [RFC4627] Crockford, D., "The application/json Media Type for 384 JavaScript Object Notation (JSON)", RFC 4627, July 2006. 386 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 387 Encodings", RFC 4648, October 2006. 389 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 390 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 391 May 2008. 393 9.2. Informative References 395 [JWE] Jones, M., Rescorla, E., and J. Hildebrand, "JSON Web 396 Encryption (JWE)", July 2012. 398 [JWS] Jones, M., Bradley, J., and N. Sakimura, "JSON Web 399 Signature (JWS)", July 2012. 401 [MagicSignatures] 402 Panzer (editor), J., Laurie, B., and D. Balfanz, "Magic 403 Signatures", January 2011. 405 [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally 406 Unique IDentifier (UUID) URN Namespace", RFC 4122, 407 July 2005. 409 [W3C.CR-xmldsig-core2-20120124] 410 Reagle, J., Solo, D., Datta, P., Hirsch, F., Eastlake, D., 411 Roessler, T., Cantor, S., and K. Yiu, "XML Signature 412 Syntax and Processing Version 2.0", World Wide Web 413 Consortium CR CR-xmldsig-core2-20120124, January 2012, 414 . 416 Appendix A. Acknowledgements 418 A JSON representation for RSA public keys was previously introduced 419 by John Panzer, Ben Laurie, and Dirk Balfanz in Magic Signatures 420 [MagicSignatures]. 422 Appendix B. Document History 424 [[ to be removed by the RFC editor before publication as an RFC ]] 426 -03 428 o Clarified that "kid" values need not be unique within a JWK Set. 430 o Moved JSON Web Key Parameters registry to the JWK specification. 432 o Added "Collision Resistant Namespace" to the terminology section. 434 o Changed registration requirements from RFC Required to 435 Specification Required with Expert Review. 437 o Added Registration Template sections for defined registries. 439 o Added Registry Contents sections to populate registry values. 441 o Numerous editorial improvements. 443 -02 445 o Simplified JWK terminology to get replace the "JWK Key Object" and 446 "JWK Container Object" terms with simply "JSON Web Key (JWK)" and 447 "JSON Web Key Set (JWK Set)" and to eliminate potential confusion 448 between single keys and sets of keys. As part of this change, the 449 top-level member name for a set of keys was changed from "jwk" to 450 "keys". 452 o Clarified that values with duplicate member names MUST be 453 rejected. 455 o Established JSON Web Key Set Parameters registry. 457 o Explicitly listed non-goals in the introduction. 459 o Moved algorithm-specific definitions from JWK to JWA. 461 o Reformatted to give each member definition its own section 462 heading. 464 -01 466 o Corrected the Magic Signatures reference. 468 -00 470 o Created the initial IETF draft based upon 471 draft-jones-json-web-key-03 with no normative changes. 473 Author's Address 475 Michael B. Jones 476 Microsoft 478 Email: mbj@microsoft.com 479 URI: http://self-issued.info/