idnits 2.17.00 (12 Aug 2021) /tmp/idnits23766/draft-ietf-jose-json-web-key-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 (July 30, 2012) is 3581 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 30, 2012 5 Expires: January 31, 2013 7 JSON Web Key (JWK) 8 draft-ietf-jose-json-web-key-05 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 31, 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 . . . . . . . . . . . . . . . . . . . 9 71 8. Open Issues . . . . . . . . . . . . . . . . . . . . . . . . . 9 72 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 9 73 9.1. Normative References . . . . . . . . . . . . . . . . . . . 9 74 9.2. Informative References . . . . . . . . . . . . . . . . . . 10 75 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 10 76 Appendix B. 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 "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 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. 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 is 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 is 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 the 216 JWK 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 e-mail address, home page URI) may also be included. 302 Specification Document(s): 303 Reference to the document that specifies the parameter, preferably 304 including a URI that can be used to retrieve a copy of the 305 document. An indication of the relevant sections may also be 306 included, but is not required. 308 6.1.2. Initial Registry Contents 310 o Parameter Name: "alg" 312 o Change Controller: IETF 313 o Specification Document(s): Section 4.1 of [[ this document ]] 315 o Parameter Name: "use" 317 o Change Controller: IETF 319 o Specification Document(s): Section 4.2 of [[ this document ]] 321 o Parameter Name: "kid" 323 o Change Controller: IETF 325 o Specification Document(s): Section 4.3 of [[ this document ]] 327 6.2. JSON Web Key Set Parameters Registry 329 This specification establishes the IANA JSON Web Key Set Parameters 330 registry for reserved JWK Set parameter names. The registry records 331 the reserved parameter name and a reference to the specification that 332 defines it. This specification registers the parameter names defined 333 in Section 5. 335 6.2.1. Registration Template 337 Parameter Name: 338 The name requested (e.g., "example"). This name is case 339 sensitive. Names that match other registered names in a case 340 insensitive manner SHOULD NOT be accepted. 342 Change Controller: 343 For standards-track RFCs, state "IETF". For others, give the name 344 of the responsible party. Other details (e.g., postal address, 345 e-mail address, home page URI) may also be included. 347 Specification Document(s): 348 Reference to the document that specifies the parameter, preferably 349 including a URI that can be used to retrieve a copy of the 350 document. An indication of the relevant sections may also be 351 included, but is not required. 353 6.2.2. Initial Registry Contents 355 o Parameter Name: "keys" 357 o Change Controller: IETF 359 o Specification Document(s): Section 5.1 of [[ this document ]] 361 7. Security Considerations 363 All of the security issues faced by any cryptographic application 364 must be faced by a JWS/JWE/JWK agent. Among these issues are 365 protecting the user's private key, preventing various attacks, and 366 helping the user avoid mistakes such as inadvertently encrypting a 367 message for the wrong recipient. The entire list of security 368 considerations is beyond the scope of this document, but some 369 significant concerns are listed here. 371 A key is no more trustworthy than the method by which it was 372 received. 374 Per Section 4.3, applications should not assume that "kid" values are 375 unique within a JWK Set. 377 The security considerations in XML DSIG 2.0 378 [W3C.CR-xmldsig-core2-20120124], about public key representations 379 also apply to this specification, other than those that are XML 380 specific. 382 8. Open Issues 384 [[ to be removed by the RFC editor before publication as an RFC ]] 386 The following items remain to be considered or done in this draft: 388 o There was a request to define the key use value "both". This 389 would seem to be semantically redundant, since omitting a key use 390 value effectively allows unconstrained use of the key. For what 391 it's worth, omitting the use parameter is how XMLDSIG expresses 392 the same thing, so we're currently parallel to XMLDSIG. 393 Furthermore, legitimizing the use of a single key for both signing 394 and encryption seems like it may be a bad idea, since there's a 395 potential vulnerability with using the same key for both signing 396 and encryption. 398 9. References 400 9.1. Normative References 402 [JWA] Jones, M., "JSON Web Algorithms (JWA)", July 2012. 404 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 405 Requirement Levels", BCP 14, RFC 2119, March 1997. 407 [RFC4627] Crockford, D., "The application/json Media Type for 408 JavaScript Object Notation (JSON)", RFC 4627, July 2006. 410 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 411 Encodings", RFC 4648, October 2006. 413 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 414 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 415 May 2008. 417 [W3C.CR-xmldsig-core2-20120124] 418 Solo, D., Datta, P., Hirsch, F., Cantor, S., Reagle, J., 419 Roessler, T., Eastlake, D., and K. Yiu, "XML Signature 420 Syntax and Processing Version 2.0", World Wide Web 421 Consortium CR CR-xmldsig-core2-20120124, January 2012, 422 . 424 9.2. Informative References 426 [JWE] Jones, M., Rescorla, E., and J. Hildebrand, "JSON Web 427 Encryption (JWE)", July 2012. 429 [JWS] Jones, M., Bradley, J., and N. Sakimura, "JSON Web 430 Signature (JWS)", July 2012. 432 [MagicSignatures] 433 Panzer (editor), J., Laurie, B., and D. Balfanz, "Magic 434 Signatures", January 2011. 436 [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally 437 Unique IDentifier (UUID) URN Namespace", RFC 4122, 438 July 2005. 440 Appendix A. Acknowledgements 442 A JSON representation for RSA public keys was previously introduced 443 by John Panzer, Ben Laurie, and Dirk Balfanz in Magic Signatures 444 [MagicSignatures]. 446 Appendix B. Document History 448 [[ to be removed by the RFC editor before publication as an RFC ]] 450 -05 451 o Indented artwork elements to better distinguish them from the body 452 text. 454 -04 456 o Refer to the registries as the primary sources of defined values 457 and then secondarily reference the sections defining the initial 458 contents of the registries. 460 o Normatively reference XML DSIG 2.0 [W3C.CR-xmldsig-core2-20120124] 461 for its security considerations. 463 o Added this language to Registration Templates: "This name is case 464 sensitive. Names that match other registered names in a case 465 insensitive manner SHOULD NOT be accepted." 467 o Described additional open issues. 469 o Applied editorial suggestions. 471 -03 473 o Clarified that "kid" values need not be unique within a JWK Set. 475 o Moved JSON Web Key Parameters registry to the JWK specification. 477 o Added "Collision Resistant Namespace" to the terminology section. 479 o Changed registration requirements from RFC Required to 480 Specification Required with Expert Review. 482 o Added Registration Template sections for defined registries. 484 o Added Registry Contents sections to populate registry values. 486 o Numerous editorial improvements. 488 -02 490 o Simplified JWK terminology to get replace the "JWK Key Object" and 491 "JWK Container Object" terms with simply "JSON Web Key (JWK)" and 492 "JSON Web Key Set (JWK Set)" and to eliminate potential confusion 493 between single keys and sets of keys. As part of this change, the 494 top-level member name for a set of keys was changed from "jwk" to 495 "keys". 497 o Clarified that values with duplicate member names MUST be 498 rejected. 500 o Established JSON Web Key Set Parameters registry. 502 o Explicitly listed non-goals in the introduction. 504 o Moved algorithm-specific definitions from JWK to JWA. 506 o Reformatted to give each member definition its own section 507 heading. 509 -01 511 o Corrected the Magic Signatures reference. 513 -00 515 o Created the initial IETF draft based upon 516 draft-jones-json-web-key-03 with no normative changes. 518 Author's Address 520 Michael B. Jones 521 Microsoft 523 Email: mbj@microsoft.com 524 URI: http://self-issued.info/