idnits 2.17.00 (12 Aug 2021) /tmp/idnits40924/draft-ietf-jose-json-web-key-06.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 (October 15, 2012) is 3504 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 October 15, 2012 5 Expires: April 18, 2013 7 JSON Web Key (JWK) 8 draft-ietf-jose-json-web-key-06 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 April 18, 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. References . . . . . . . . . . . . . . . . . . . . . . . . . . 9 72 8.1. Normative References . . . . . . . . . . . . . . . . . . . 9 73 8.2. Informative References . . . . . . . . . . . . . . . . . . 9 74 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 10 75 Appendix B. Open Issues . . . . . . . . . . . . . . . . . . . . . 10 76 Appendix C. Document History . . . . . . . . . . . . . . . . . . 10 77 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 12 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 The URL- and filename-safe Base64 encoding 111 described in RFC 4648 [RFC4648], Section 5, with the (non URL- 112 safe) '=' padding characters omitted, as permitted by Section 3.2. 113 (See Appendix C of [JWS] for notes on implementing base64url 114 encoding without padding.) 116 Collision Resistant Namespace A namespace that allows names to be 117 allocated in a manner such that they are highly unlikely to 118 collide with other names. For instance, collision resistance can 119 be achieved through administrative delegation of portions of the 120 namespace or through use of collision-resistant name allocation 121 functions. Examples of Collision Resistant Namespaces include: 122 Domain Names, Object Identifiers (OIDs) as defined in the ITU-T 123 X.660 and X.670 Recommendation series, and Universally Unique 124 IDentifiers (UUIDs) [RFC4122]. When using an administratively 125 delegated namespace, the definer of a name needs to take 126 reasonable precautions to ensure they are in control of the 127 portion of the namespace they use to define the name. 129 3. Example JSON Web Key Set 131 The following example JWK Set contains two public keys represented as 132 JWKs: one using an Elliptic Curve algorithm and a second one using an 133 RSA algorithm. The first specifies that the key is to be used for 134 encryption. Both provide a Key ID for key matching purposes. In 135 both cases, integers are represented using the base64url encoding of 136 their big endian representations. (Long lines are broken are for 137 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 "xpo":"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 In addition to the common parameters, each JWK will have members that 167 are specific to the key being represented. These members represent 168 the parameters of the key. Section 5 of the JSON Web Algorithms 169 (JWA) [JWA] specification defines multiple kinds of public keys and 170 their associated members. 172 The member names within a JWK MUST be unique; objects with duplicate 173 member names MUST be rejected. 175 Additional members MAY be present in the JWK. If present, they MUST 176 be understood by implementations using them. Member names used for 177 representing key parameters for different kinds of keys need not be 178 distinct. Member names SHOULD either be registered in the IANA JSON 179 Web Key Parameters registry Section 6.1 or be URIs that contain a 180 Collision Resistant Namespace. 182 4.1. "alg" (Algorithm Family) Parameter 184 The "alg" (algorithm family) member identifies the cryptographic 185 algorithm family used with the key. "alg" values SHOULD either be 186 registered in the IANA JSON Web Key Algorithm Families registry [JWA] 187 or be a URI that contains a Collision Resistant Namespace. The "alg" 188 value is a case sensitive string. This member is REQUIRED. 190 A list of defined "alg" values can be found in the IANA JSON Web Key 191 Algorithm Families registry [JWA]; the initial contents of this 192 registry are the values defined in Section 5.1 of the JSON Web 193 Algorithms (JWA) [JWA] specification. 195 Additional members used with these "alg" values can be found in the 196 IANA JSON Web Key Parameters registry Section 6.1; the initial 197 contents of this registry are the values defined in Sections 5.2 and 198 5.3 of the JSON Web Algorithms (JWA) [JWA] specification. 200 4.2. "use" (Key Use) Parameter 202 The "use" (key use) member identifies the intended use of the key. 203 Values defined by this specification are: 205 o "sig" (signature) 207 o "enc" (encryption) 209 Other values MAY be used. The "use" value is a case sensitive 210 string. This member is OPTIONAL. 212 4.3. "kid" (Key ID) Parameter 214 The "kid" (key ID) member can be used to match a specific key. This 215 can be used, for instance, to choose among a set of keys within a JWK 216 Set during key rollover. The interpretation of the "kid" value is 217 unspecified. Key ID values within a JWK Set need not be unique. The 218 "kid" value is a case sensitive string. This member is OPTIONAL. 220 When used with JWS or JWE, the "kid" value MAY be used to match a JWS 221 or JWE "kid" header parameter value. 223 In some contexts, different keys using the same Key ID value might be 224 present, with the keys being disambiguated using other information, 225 such as the "alg" or "use" values. For example, imagine "kid" values 226 like "Current", "Upcoming", and "Deprecated", used for key rollover 227 guidance. One could apply a label to all keys where the 228 classification fits. If there are multiple "Current" keys, then in 229 this example, they might be differentiated either by having different 230 "alg" or "use" values, or some combination of both. As one example, 231 there might only be one current RSA signing key and one current 232 Elliptic Curve signing key, but both would be "Current". 234 5. JSON Web Key Set (JWK Set) Format 236 A JSON Web Key Set (JWK Set) is a JSON object that contains an array 237 of JSON Web Key values as the value of its "keys" member. 239 The member names within a JWK Set MUST be unique; objects with 240 duplicate member names MUST be rejected. 242 Additional members MAY be present in the JWK Set. If present, they 243 MUST be understood by implementations using them. Parameters for 244 representing additional properties of JWK Sets SHOULD either be 245 registered in the IANA JSON Web Key Set Parameters registry 246 Section 6.2 or be a URI that contains a Collision Resistant 247 Namespace. 249 5.1. "keys" (JSON Web Key Set) Parameter 251 The value of the "keys" (JSON Web Key Set) member is an array of JSON 252 Web Key (JWK) values. This member is REQUIRED. 254 6. IANA Considerations 256 The following registration procedure is used for all the registries 257 established by this specification. 259 Values are registered with a Specification Required [RFC5226] after a 260 two-week review period on the [TBD]@ietf.org mailing list, on the 261 advice of one or more Designated Experts. However, to allow for the 262 allocation of values prior to publication, the Designated Expert(s) 263 may approve registration once they are satisfied that such a 264 specification will be published. 266 Registration requests must be sent to the [TBD]@ietf.org mailing list 267 for review and comment, with an appropriate subject (e.g., "Request 268 for access token type: example"). [[ Note to RFC-EDITOR: The name of 269 the mailing list should be determined in consultation with the IESG 270 and IANA. Suggested name: jose-reg-review. ]] 272 Within the review period, the Designated Expert(s) will either 273 approve or deny the registration request, communicating this decision 274 to the review list and IANA. Denials should include an explanation 275 and, if applicable, suggestions as to how to make the request 276 successful. 278 IANA must only accept registry updates from the Designated Expert(s) 279 and should direct all requests for registration to the review mailing 280 list. 282 6.1. JSON Web Key Parameters Registry 284 This specification establishes the IANA JSON Web Key Parameters 285 registry for reserved JWK parameter names. The registry records the 286 reserved parameter name and a reference to the specification that 287 defines it. This specification registers the parameter names defined 288 in Section 4. 290 6.1.1. Registration Template 292 Parameter Name: 293 The name requested (e.g., "example"). This name is case 294 sensitive. Names that match other registered names in a case 295 insensitive manner SHOULD NOT be accepted. 297 Change Controller: 298 For Standards Track RFCs, state "IETF". For others, give the name 299 of the responsible party. Other details (e.g., postal address, 300 email address, home page URI) may also be included. 302 Specification Document(s): 303 Reference to the document(s) that specify the parameter, 304 preferably including URI(s) that can be used to retrieve copies of 305 the document(s). An indication of the relevant sections may also 306 be included but is not required. 308 6.1.2. Initial Registry Contents 310 o Parameter Name: "alg" 311 o Change Controller: IETF 312 o Specification Document(s): Section 4.1 of [[ this document ]] 314 o Parameter Name: "use" 315 o Change Controller: IETF 316 o Specification Document(s): Section 4.2 of [[ this document ]] 318 o Parameter Name: "kid" 319 o Change Controller: IETF 320 o Specification Document(s): Section 4.3 of [[ this document ]] 322 6.2. JSON Web Key Set Parameters Registry 324 This specification establishes the IANA JSON Web Key Set Parameters 325 registry for reserved JWK Set parameter names. The registry records 326 the reserved parameter name and a reference to the specification that 327 defines it. This specification registers the parameter names defined 328 in Section 5. 330 6.2.1. Registration Template 332 Parameter Name: 333 The name requested (e.g., "example"). This name is case 334 sensitive. Names that match other registered names in a case 335 insensitive manner SHOULD NOT be accepted. 337 Change Controller: 338 For Standards Track RFCs, state "IETF". For others, give the name 339 of the responsible party. Other details (e.g., postal address, 340 email address, home page URI) may also be included. 342 Specification Document(s): 343 Reference to the document(s) that specify the parameter, 344 preferably including URI(s) that can be used to retrieve copies of 345 the document(s). An indication of the relevant sections may also 346 be included but is not required. 348 6.2.2. Initial Registry Contents 350 o Parameter Name: "keys" 351 o Change Controller: IETF 352 o Specification Document(s): Section 5.1 of [[ this document ]] 354 7. Security Considerations 356 All of the security issues faced by any cryptographic application 357 must be faced by a JWS/JWE/JWK agent. Among these issues are 358 protecting the user's private key, preventing various attacks, and 359 helping the user avoid mistakes such as inadvertently encrypting a 360 message for the wrong recipient. The entire list of security 361 considerations is beyond the scope of this document, but some 362 significant concerns are listed here. 364 A key is no more trustworthy than the method by which it was 365 received. 367 Per Section 4.3, applications should not assume that "kid" values are 368 unique within a JWK Set. 370 The security considerations in XML DSIG 2.0 371 [W3C.CR-xmldsig-core2-20120124], about public key representations 372 also apply to this specification, other than those that are XML 373 specific. 375 8. References 377 8.1. Normative References 379 [JWA] Jones, M., "JSON Web Algorithms (JWA)", October 2012. 381 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 382 Requirement Levels", BCP 14, RFC 2119, March 1997. 384 [RFC4627] Crockford, D., "The application/json Media Type for 385 JavaScript Object Notation (JSON)", RFC 4627, July 2006. 387 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 388 Encodings", RFC 4648, October 2006. 390 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 391 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 392 May 2008. 394 [W3C.CR-xmldsig-core2-20120124] 395 Roessler, T., Yiu, K., Solo, D., Reagle, J., Datta, P., 396 Eastlake, D., Hirsch, F., and S. Cantor, "XML Signature 397 Syntax and Processing Version 2.0", World Wide Web 398 Consortium CR CR-xmldsig-core2-20120124, January 2012, 399 . 401 8.2. Informative References 403 [JWE] Jones, M., Rescorla, E., and J. Hildebrand, "JSON Web 404 Encryption (JWE)", October 2012. 406 [JWS] Jones, M., Bradley, J., and N. Sakimura, "JSON Web 407 Signature (JWS)", October 2012. 409 [MagicSignatures] 410 Panzer (editor), J., Laurie, B., and D. Balfanz, "Magic 411 Signatures", January 2011. 413 [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally 414 Unique IDentifier (UUID) URN Namespace", RFC 4122, 415 July 2005. 417 Appendix A. Acknowledgements 419 A JSON representation for RSA public keys was previously introduced 420 by John Panzer, Ben Laurie, and Dirk Balfanz in Magic Signatures 421 [MagicSignatures]. 423 Jim Schaad and Karen O'Donoghue chaired the JOSE working group and 424 Sean Turner and Stephen Farrell served as Security area directors 425 during the creation of this specification. 427 Appendix B. Open Issues 429 [[ to be removed by the RFC editor before publication as an RFC ]] 431 The following items remain to be considered or done in this draft: 433 o No known open issues. 435 Appendix C. Document History 437 [[ to be removed by the RFC editor before publication as an RFC ]] 439 -06 441 o Changed the name of the JWK RSA exponent parameter from "exp" to 442 "xpo" so as to allow the potential use of the name "exp" for a 443 future extension that might define an expiration parameter for 444 keys. (The "exp" name is already used for this purpose in the JWT 445 specification.) 447 o Clarify that the "alg" (algorithm family) member is REQUIRED. 449 o Correct an instance of "JWK" that should have been "JWK Set". 451 o Applied changes made by the RFC Editor to RFC 6749's registry 452 language to this specification. 454 -05 456 o Indented artwork elements to better distinguish them from the body 457 text. 459 -04 461 o Refer to the registries as the primary sources of defined values 462 and then secondarily reference the sections defining the initial 463 contents of the registries. 465 o Normatively reference XML DSIG 2.0 [W3C.CR-xmldsig-core2-20120124] 466 for its security considerations. 468 o Added this language to Registration Templates: "This name is case 469 sensitive. Names that match other registered names in a case 470 insensitive manner SHOULD NOT be accepted." 472 o Described additional open issues. 474 o Applied editorial suggestions. 476 -03 478 o Clarified that "kid" values need not be unique within a JWK Set. 480 o Moved JSON Web Key Parameters registry to the JWK specification. 482 o Added "Collision Resistant Namespace" to the terminology section. 484 o Changed registration requirements from RFC Required to 485 Specification Required with Expert Review. 487 o Added Registration Template sections for defined registries. 489 o Added Registry Contents sections to populate registry values. 491 o Numerous editorial improvements. 493 -02 495 o Simplified JWK terminology to get replace the "JWK Key Object" and 496 "JWK Container Object" terms with simply "JSON Web Key (JWK)" and 497 "JSON Web Key Set (JWK Set)" and to eliminate potential confusion 498 between single keys and sets of keys. As part of this change, the 499 top-level member name for a set of keys was changed from "jwk" to 500 "keys". 502 o Clarified that values with duplicate member names MUST be 503 rejected. 505 o Established JSON Web Key Set Parameters registry. 507 o Explicitly listed non-goals in the introduction. 509 o Moved algorithm-specific definitions from JWK to JWA. 511 o Reformatted to give each member definition its own section 512 heading. 514 -01 516 o Corrected the Magic Signatures reference. 518 -00 520 o Created the initial IETF draft based upon 521 draft-jones-json-web-key-03 with no normative changes. 523 Author's Address 525 Michael B. Jones 526 Microsoft 528 Email: mbj@microsoft.com 529 URI: http://self-issued.info/