idnits 2.17.00 (12 Aug 2021) /tmp/idnits28995/draft-ietf-jose-json-web-key-07.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 (November 6, 2012) is 3482 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 November 6, 2012 5 Expires: May 10, 2013 7 JSON Web Key (JWK) 8 draft-ietf-jose-json-web-key-07 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 May 10, 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 . . . . . . . . . . . . . . 8 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 . . . . . . . . . . . . . . . . . . . 9 71 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 9 72 8.1. Normative References . . . . . . . . . . . . . . . . . . . 9 73 8.2. Informative References . . . . . . . . . . . . . . . . . . 10 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 "n": "0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx 150 4cbbfAAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n3oknjhMs 151 tn64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65YGjQR0_FDW2 152 QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n91CbOpbI 153 SD08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINHaQ-G_xBniIqb 154 w0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw", 155 "e":"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. The same JWK parameter name may be registered multiple 289 times, provided that duplicate parameter registrations are only for 290 algorithm-specific JWK parameters; in this case, the meaning of the 291 duplicate parameter name is disambiguated by the "alg" value of the 292 JWK containing it. 294 6.1.1. Registration Template 296 Parameter Name: 297 The name requested (e.g., "example"). This name is case 298 sensitive. Names that match other registered names in a case 299 insensitive manner SHOULD NOT be accepted. 301 Change Controller: 302 For Standards Track RFCs, state "IETF". For others, give the name 303 of the responsible party. Other details (e.g., postal address, 304 email address, home page URI) may also be included. 306 Specification Document(s): 307 Reference to the document(s) that specify the parameter, 308 preferably including URI(s) that can be used to retrieve copies of 309 the document(s). An indication of the relevant sections may also 310 be included but is not required. 312 6.1.2. Initial Registry Contents 314 o Parameter Name: "alg" 315 o Change Controller: IETF 316 o Specification Document(s): Section 4.1 of [[ this document ]] 318 o Parameter Name: "use" 319 o Change Controller: IETF 320 o Specification Document(s): Section 4.2 of [[ this document ]] 322 o Parameter Name: "kid" 323 o Change Controller: IETF 324 o Specification Document(s): Section 4.3 of [[ this document ]] 326 6.2. JSON Web Key Set Parameters Registry 328 This specification establishes the IANA JSON Web Key Set Parameters 329 registry for reserved JWK Set parameter names. The registry records 330 the reserved parameter name and a reference to the specification that 331 defines it. This specification registers the parameter names defined 332 in Section 5. 334 6.2.1. Registration Template 336 Parameter Name: 337 The name requested (e.g., "example"). This name is case 338 sensitive. Names that match other registered names in a case 339 insensitive manner SHOULD NOT be accepted. 341 Change Controller: 342 For Standards Track RFCs, state "IETF". For others, give the name 343 of the responsible party. Other details (e.g., postal address, 344 email address, home page URI) may also be included. 346 Specification Document(s): 347 Reference to the document(s) that specify the parameter, 348 preferably including URI(s) that can be used to retrieve copies of 349 the document(s). An indication of the relevant sections may also 350 be included but is not required. 352 6.2.2. Initial Registry Contents 354 o Parameter Name: "keys" 355 o Change Controller: IETF 356 o Specification Document(s): Section 5.1 of [[ this document ]] 358 7. Security Considerations 360 All of the security issues faced by any cryptographic application 361 must be faced by a JWS/JWE/JWK agent. Among these issues are 362 protecting the user's private key, preventing various attacks, and 363 helping the user avoid mistakes such as inadvertently encrypting a 364 message for the wrong recipient. The entire list of security 365 considerations is beyond the scope of this document, but some 366 significant concerns are listed here. 368 A key is no more trustworthy than the method by which it was 369 received. 371 Per Section 4.3, applications should not assume that "kid" values are 372 unique within a JWK Set. 374 The security considerations in XML DSIG 2.0 375 [W3C.CR-xmldsig-core2-20120124], about public key representations 376 also apply to this specification, other than those that are XML 377 specific. 379 8. References 381 8.1. Normative References 383 [JWA] Jones, M., "JSON Web Algorithms (JWA)", November 2012. 385 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 386 Requirement Levels", BCP 14, RFC 2119, March 1997. 388 [RFC4627] Crockford, D., "The application/json Media Type for 389 JavaScript Object Notation (JSON)", RFC 4627, July 2006. 391 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 392 Encodings", RFC 4648, October 2006. 394 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 395 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 396 May 2008. 398 [W3C.CR-xmldsig-core2-20120124] 399 Reagle, J., Solo, D., Datta, P., Hirsch, F., Eastlake, D., 400 Cantor, S., Roessler, T., and K. Yiu, "XML Signature 401 Syntax and Processing Version 2.0", World Wide Web 402 Consortium CR CR-xmldsig-core2-20120124, January 2012, 403 . 405 8.2. Informative References 407 [JWE] Jones, M., Rescorla, E., and J. Hildebrand, "JSON Web 408 Encryption (JWE)", November 2012. 410 [JWS] Jones, M., Bradley, J., and N. Sakimura, "JSON Web 411 Signature (JWS)", November 2012. 413 [MagicSignatures] 414 Panzer (editor), J., Laurie, B., and D. Balfanz, "Magic 415 Signatures", January 2011. 417 [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally 418 Unique IDentifier (UUID) URN Namespace", RFC 4122, 419 July 2005. 421 Appendix A. Acknowledgements 423 A JSON representation for RSA public keys was previously introduced 424 by John Panzer, Ben Laurie, and Dirk Balfanz in Magic Signatures 425 [MagicSignatures]. 427 Jim Schaad and Karen O'Donoghue chaired the JOSE working group and 428 Sean Turner and Stephen Farrell served as Security area directors 429 during the creation of this specification. 431 Appendix B. Open Issues 433 [[ to be removed by the RFC editor before publication as an RFC ]] 435 The following items remain to be considered or done in this draft: 437 o No known open issues. 439 Appendix C. Document History 441 [[ to be removed by the RFC editor before publication as an RFC ]] 443 -07 445 o Changed the name of the JWK RSA modulus parameter from "mod" to 446 "n" and the name of the JWK RSA exponent parameter from "xpo" to 447 "e", so that the identifiers are the same as those used in RFC 448 3447. 450 -06 452 o Changed the name of the JWK RSA exponent parameter from "exp" to 453 "xpo" so as to allow the potential use of the name "exp" for a 454 future extension that might define an expiration parameter for 455 keys. (The "exp" name is already used for this purpose in the JWT 456 specification.) 458 o Clarify that the "alg" (algorithm family) member is REQUIRED. 460 o Correct an instance of "JWK" that should have been "JWK Set". 462 o Applied changes made by the RFC Editor to RFC 6749's registry 463 language to this specification. 465 -05 467 o Indented artwork elements to better distinguish them from the body 468 text. 470 -04 472 o Refer to the registries as the primary sources of defined values 473 and then secondarily reference the sections defining the initial 474 contents of the registries. 476 o Normatively reference XML DSIG 2.0 [W3C.CR-xmldsig-core2-20120124] 477 for its security considerations. 479 o Added this language to Registration Templates: "This name is case 480 sensitive. Names that match other registered names in a case 481 insensitive manner SHOULD NOT be accepted." 483 o Described additional open issues. 485 o Applied editorial suggestions. 487 -03 489 o Clarified that "kid" values need not be unique within a JWK Set. 491 o Moved JSON Web Key Parameters registry to the JWK specification. 493 o Added "Collision Resistant Namespace" to the terminology section. 495 o Changed registration requirements from RFC Required to 496 Specification Required with Expert Review. 498 o Added Registration Template sections for defined registries. 500 o Added Registry Contents sections to populate registry values. 502 o Numerous editorial improvements. 504 -02 506 o Simplified JWK terminology to get replace the "JWK Key Object" and 507 "JWK Container Object" terms with simply "JSON Web Key (JWK)" and 508 "JSON Web Key Set (JWK Set)" and to eliminate potential confusion 509 between single keys and sets of keys. As part of this change, the 510 top-level member name for a set of keys was changed from "jwk" to 511 "keys". 513 o Clarified that values with duplicate member names MUST be 514 rejected. 516 o Established JSON Web Key Set Parameters registry. 518 o Explicitly listed non-goals in the introduction. 520 o Moved algorithm-specific definitions from JWK to JWA. 522 o Reformatted to give each member definition its own section 523 heading. 525 -01 527 o Corrected the Magic Signatures reference. 529 -00 531 o Created the initial IETF draft based upon 532 draft-jones-json-web-key-03 with no normative changes. 534 Author's Address 536 Michael B. Jones 537 Microsoft 539 Email: mbj@microsoft.com 540 URI: http://self-issued.info/