idnits 2.17.00 (12 Aug 2021) /tmp/idnits53151/draft-ietf-jose-json-web-key-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 : ---------------------------------------------------------------------------- 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 16, 2012) is 3595 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 16, 2012 5 Expires: January 17, 2013 7 JSON Web Key (JWK) 8 draft-ietf-jose-json-web-key-04 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 17, 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.) 138 {"keys": 139 [ 140 {"alg":"EC", 141 "crv":"P-256", 142 "x":"MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4", 143 "y":"4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM", 144 "use":"enc", 145 "kid":"1"}, 147 {"alg":"RSA", 148 "mod": "0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx 149 4cbbfAAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n3oknjhMs 150 tn64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65YGjQR0_FDW2 151 QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n91CbOpbI 152 SD08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINHaQ-G_xBniIqb 153 w0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw", 154 "exp":"AQAB", 155 "kid":"2011-04-29"} 156 ] 157 } 159 4. JSON Web Key (JWK) Format 161 A JSON Web Key (JWK) is a JSON object containing specific members, as 162 specified below. Those members that are common to all key types are 163 defined below. 165 In addition to the common parameters, each JWK will have members that 166 are specific to the key being represented. These members represent 167 the parameters of the key. Section 5 of the JSON Web Algorithms 168 (JWA) [JWA] specification defines multiple kinds of public keys and 169 their associated members. 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 used for 176 representing key parameters for different kinds of keys need not be 177 distinct. Member names SHOULD either be registered in the IANA JSON 178 Web Key Parameters registry Section 6.1 or be URIs that contain a 179 Collision Resistant Namespace. 181 4.1. "alg" (Algorithm Family) Parameter 183 The "alg" (algorithm family) member identifies the cryptographic 184 algorithm family used with the key. "alg" values SHOULD either be 185 registered in the IANA JSON Web Key Algorithm Families registry [JWA] 186 or be a URI that contains a Collision Resistant Namespace. The "alg" 187 value is a case sensitive string. 189 A list of defined "alg" values can be found in the IANA JSON Web Key 190 Algorithm Families registry [JWA]; the initial contents of this 191 registry is the values defined in Section 5.1 of the JSON Web 192 Algorithms (JWA) [JWA] specification. 194 Additional members used with these "alg" values can be found in the 195 IANA JSON Web Key Parameters registry Section 6.1; the initial 196 contents of this registry is the values defined in Sections 5.2 and 197 5.3 of the JSON Web Algorithms (JWA) [JWA] specification. 199 4.2. "use" (Key Use) Parameter 201 The "use" (key use) member identifies the intended use of the key. 202 Values defined by this specification are: 204 o "sig" (signature) 206 o "enc" (encryption) 208 Other values MAY be used. The "use" value is a case sensitive 209 string. This member is OPTIONAL. 211 4.3. "kid" (Key ID) Parameter 213 The "kid" (key ID) member can be used to match a specific key. This 214 can be used, for instance, to choose among a set of keys within the 215 JWK during key rollover. The interpretation of the "kid" value is 216 unspecified. Key ID values within a JWK Set need not be unique. The 217 "kid" value is a case sensitive string. This member is OPTIONAL. 219 When used with JWS or JWE, the "kid" value MAY be used to match a JWS 220 or JWE "kid" header parameter value. 222 In some contexts, different keys using the same Key ID value might be 223 present, with the keys being disambiguated using other information, 224 such as the "alg" or "use" values. For example, imagine "kid" values 225 like "Current", "Upcoming", and "Deprecated", used for key rollover 226 guidance. One could apply a label to all keys where the 227 classification fits. If there are multiple "Current" keys, then in 228 this example, they might be differentiated either by having different 229 "alg" or "use" values, or some combination of both. As one example, 230 there might only be one current RSA signing key and one current 231 Elliptic Curve signing key, but both would be "Current". 233 5. JSON Web Key Set (JWK Set) Format 235 A JSON Web Key Set (JWK Set) is a JSON object that contains an array 236 of JSON Web Key values as the value of its "keys" member. 238 The member names within a JWK Set MUST be unique; objects with 239 duplicate member names MUST be rejected. 241 Additional members MAY be present in the JWK Set. If present, they 242 MUST be understood by implementations using them. Parameters for 243 representing additional properties of JWK Sets SHOULD either be 244 registered in the IANA JSON Web Key Set Parameters registry 245 Section 6.2 or be a URI that contains a Collision Resistant 246 Namespace. 248 5.1. "keys" (JSON Web Key Set) Parameter 250 The value of the "keys" (JSON Web Key Set) member is an array of JSON 251 Web Key (JWK) values. This member is REQUIRED. 253 6. IANA Considerations 255 The following registration procedure is used for all the registries 256 established by this specification. 258 Values are registered with a Specification Required [RFC5226] after a 259 two week review period on the [TBD]@ietf.org mailing list, on the 260 advice of one or more Designated Experts. However, to allow for the 261 allocation of values prior to publication, the Designated Expert(s) 262 may approve registration once they are satisfied that such a 263 specification will be published. 265 Registration requests must be sent to the [TBD]@ietf.org mailing list 266 for review and comment, with an appropriate subject (e.g., "Request 267 for access token type: example"). [[ Note to RFC-EDITOR: The name of 268 the mailing list should be determined in consultation with the IESG 269 and IANA. Suggested name: jose-reg-review. ]] 271 Within the review period, the Designated Expert(s) will either 272 approve or deny the registration request, communicating this decision 273 to the review list and IANA. Denials should include an explanation 274 and, if applicable, suggestions as to how to make the request 275 successful. 277 IANA must only accept registry updates from the Designated Expert(s), 278 and should direct all requests for registration to the review mailing 279 list. 281 6.1. JSON Web Key Parameters Registry 283 This specification establishes the IANA JSON Web Key Parameters 284 registry for reserved JWK parameter names. The registry records the 285 reserved parameter name and a reference to the specification that 286 defines it. This specification registers the parameter names defined 287 in Section 4. 289 6.1.1. Registration Template 291 Parameter Name: 292 The name requested (e.g., "example"). This name is case 293 sensitive. Names that match other registered names in a case 294 insensitive manner SHOULD NOT be accepted. 296 Change Controller: 297 For standards-track RFCs, state "IETF". For others, give the name 298 of the responsible party. Other details (e.g., postal address, 299 e-mail address, home page URI) may also be included. 301 Specification Document(s): 302 Reference to the document that specifies the parameter, preferably 303 including a URI that can be used to retrieve a copy of the 304 document. An indication of the relevant sections may also be 305 included, but is not required. 307 6.1.2. Initial Registry Contents 309 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" 316 o Change Controller: IETF 318 o Specification Document(s): Section 4.2 of [[ this document ]] 320 o Parameter Name: "kid" 322 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 e-mail address, home page URI) may also be included. 346 Specification Document(s): 347 Reference to the document that specifies the parameter, preferably 348 including a URI that can be used to retrieve a copy of the 349 document. An indication of the relevant sections may also be 350 included, but is not required. 352 6.2.2. Initial Registry Contents 354 o Parameter Name: "keys" 356 o Change Controller: IETF 358 o Specification Document(s): Section 5.1 of [[ this document ]] 360 7. Security Considerations 362 All of the security issues faced by any cryptographic application 363 must be faced by a JWS/JWE/JWK agent. Among these issues are 364 protecting the user's private key, preventing various attacks, and 365 helping the user avoid mistakes such as inadvertently encrypting a 366 message for the wrong recipient. The entire list of security 367 considerations is beyond the scope of this document, but some 368 significant concerns are listed here. 370 A key is no more trustworthy than the method by which it was 371 received. 373 Per Section 4.3, applications should not assume that "kid" values are 374 unique within a JWK Set. 376 The security considerations in XML DSIG 2.0 377 [W3C.CR-xmldsig-core2-20120124], about public key representations 378 also apply to this specification, other than those that are XML 379 specific. 381 8. Open Issues 383 [[ to be removed by the RFC editor before publication as an RFC ]] 385 The following items remain to be considered or done in this draft: 387 o There was a request to define the key use value "both". This 388 would seem to be semantically redundant, since omitting a key use 389 value effectively allows unconstrained use of the key. For what 390 it's worth, omitting the use parameter is how XMLDSIG expresses 391 the same thing, so we're currently parallel to XMLDSIG. 392 Furthermore, legitimizing the use of a single key for both signing 393 and encryption seems like it may be a bad idea, since there's a 394 potential vulnerability with using the same key for both signing 395 and encryption. 397 9. References 399 9.1. Normative References 401 [JWA] Jones, M., "JSON Web Algorithms (JWA)", July 2012. 403 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 404 Requirement Levels", BCP 14, RFC 2119, March 1997. 406 [RFC4627] Crockford, D., "The application/json Media Type for 407 JavaScript Object Notation (JSON)", RFC 4627, July 2006. 409 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 410 Encodings", RFC 4648, October 2006. 412 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 413 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 414 May 2008. 416 [W3C.CR-xmldsig-core2-20120124] 417 Reagle, J., Hirsch, F., Cantor, S., Roessler, T., 418 Eastlake, D., Yiu, K., Solo, D., and P. Datta, "XML 419 Signature Syntax and Processing Version 2.0", World Wide 420 Web Consortium CR CR-xmldsig-core2-20120124, January 2012, 421 . 423 9.2. Informative References 425 [JWE] Jones, M., Rescorla, E., and J. Hildebrand, "JSON Web 426 Encryption (JWE)", July 2012. 428 [JWS] Jones, M., Bradley, J., and N. Sakimura, "JSON Web 429 Signature (JWS)", July 2012. 431 [MagicSignatures] 432 Panzer (editor), J., Laurie, B., and D. Balfanz, "Magic 433 Signatures", January 2011. 435 [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally 436 Unique IDentifier (UUID) URN Namespace", RFC 4122, 437 July 2005. 439 Appendix A. Acknowledgements 441 A JSON representation for RSA public keys was previously introduced 442 by John Panzer, Ben Laurie, and Dirk Balfanz in Magic Signatures 443 [MagicSignatures]. 445 Appendix B. Document History 447 [[ to be removed by the RFC editor before publication as an RFC ]] 449 -04 450 o Refer to the registries as the primary sources of defined values 451 and then secondarily reference the sections defining the initial 452 contents of the registries. 454 o Normatively reference XML DSIG 2.0 [W3C.CR-xmldsig-core2-20120124] 455 for its security considerations. 457 o Added this language to Registration Templates: "This name is case 458 sensitive. Names that match other registered names in a case 459 insensitive manner SHOULD NOT be accepted." 461 o Described additional open issues. 463 o Applied editorial suggestions. 465 -03 467 o Clarified that "kid" values need not be unique within a JWK Set. 469 o Moved JSON Web Key Parameters registry to the JWK specification. 471 o Added "Collision Resistant Namespace" to the terminology section. 473 o Changed registration requirements from RFC Required to 474 Specification Required with Expert Review. 476 o Added Registration Template sections for defined registries. 478 o Added Registry Contents sections to populate registry values. 480 o Numerous editorial improvements. 482 -02 484 o Simplified JWK terminology to get replace the "JWK Key Object" and 485 "JWK Container Object" terms with simply "JSON Web Key (JWK)" and 486 "JSON Web Key Set (JWK Set)" and to eliminate potential confusion 487 between single keys and sets of keys. As part of this change, the 488 top-level member name for a set of keys was changed from "jwk" to 489 "keys". 491 o Clarified that values with duplicate member names MUST be 492 rejected. 494 o Established JSON Web Key Set Parameters registry. 496 o Explicitly listed non-goals in the introduction. 498 o Moved algorithm-specific definitions from JWK to JWA. 500 o Reformatted to give each member definition its own section 501 heading. 503 -01 505 o Corrected the Magic Signatures reference. 507 -00 509 o Created the initial IETF draft based upon 510 draft-jones-json-web-key-03 with no normative changes. 512 Author's Address 514 Michael B. Jones 515 Microsoft 517 Email: mbj@microsoft.com 518 URI: http://self-issued.info/