idnits 2.17.1 draft-ietf-jose-json-web-key-02.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 (May 12, 2012) is 4360 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 May 12, 2012 5 Expires: November 13, 2012 7 JSON Web Key (JWK) 8 draft-ietf-jose-json-web-key-02 10 Abstract 12 A JSON Web Key (JWK) is a JSON data structure that represents a 13 public key. This specification also defines a JSON Web Key Set (JWK 14 Set) JSON data structure for representing a set of JWKs. 15 Cryptographic algorithms and identifiers used with this specification 16 are enumerated in the separate JSON Web Algorithms (JWA) 17 specification. 19 Requirements Language 21 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 22 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 23 document are to be interpreted as described in RFC 2119 [RFC2119]. 25 Status of this Memo 27 This Internet-Draft is submitted in full conformance with the 28 provisions of BCP 78 and BCP 79. 30 Internet-Drafts are working documents of the Internet Engineering 31 Task Force (IETF). Note that other groups may also distribute 32 working documents as Internet-Drafts. The list of current Internet- 33 Drafts is at http://datatracker.ietf.org/drafts/current/. 35 Internet-Drafts are draft documents valid for a maximum of six months 36 and may be updated, replaced, or obsoleted by other documents at any 37 time. It is inappropriate to use Internet-Drafts as reference 38 material or to cite them other than as "work in progress." 40 This Internet-Draft will expire on November 13, 2012. 42 Copyright Notice 44 Copyright (c) 2012 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents 49 (http://trustee.ietf.org/license-info) in effect on the date of 50 publication of this document. Please review these documents 51 carefully, as they describe your rights and restrictions with respect 52 to this document. Code Components extracted from this document must 53 include Simplified BSD License text as described in Section 4.e of 54 the Trust Legal Provisions and are provided without warranty as 55 described in the Simplified BSD License. 57 Table of Contents 59 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 60 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . 3 61 3. Example JSON Web Key Set . . . . . . . . . . . . . . . . . . . 3 62 4. JSON Web Key (JWK) Format . . . . . . . . . . . . . . . . . . . 4 63 4.1. "alg" (Algorithm Family) Parameter . . . . . . . . . . . . 4 64 4.2. "use" (Key Use) Parameter . . . . . . . . . . . . . . . . . 5 65 4.3. "kid" (Key ID) Parameter . . . . . . . . . . . . . . . . . 5 66 5. JSON Web Key Set (JWK Set) Format . . . . . . . . . . . . . . . 5 67 5.1. "keys" (JSON Web Key Set) Parameter . . . . . . . . . . . . 5 68 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 6 69 6.1. JSON Web Key Set Parameters Registry . . . . . . . . . . . 6 70 7. Security Considerations . . . . . . . . . . . . . . . . . . . . 6 71 8. Open Issues and Things To Be Done (TBD) . . . . . . . . . . . . 6 72 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 6 73 9.1. Normative References . . . . . . . . . . . . . . . . . . . 6 74 9.2. Informative References . . . . . . . . . . . . . . . . . . 7 75 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . . 7 76 Appendix B. Document History . . . . . . . . . . . . . . . . . . . 7 77 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 8 79 1. Introduction 81 A JSON Web Key (JWK) is a JSON data structure that represents a 82 public key as a JSON object [RFC4627]. 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 used with this specification are enumerated in the separate JSON Web 86 Algorithms (JWA) [JWA] specification. 88 Non-goals for this specification include representing private keys, 89 representing symmetric keys, representing certificate chains, 90 representing certified keys, and replacing X.509 certificates. 92 JWKs are used in the JSON Web Signature (JWS) [JWS] "jwk" (JSON Web 93 Key) header parameter and the JSON Web Encryption (JWE) [JWE] "jwk" 94 (JSON Web Key) and "epk" (Ephemeral Public Key) header parameters. 95 The resources referenced by the JWS "jku" (JWK Set URL) and JWE "jku" 96 (JWK Set URL) header parameters contain JWK Sets. 98 2. Terminology 100 JSON Web Key (JWK) A JSON data structure that represents a public 101 key. 103 JSON Web Key Set (JWK Set) A JSON object that contains an array of 104 JWKs as a member. 106 Base64url Encoding For the purposes of this specification, this term 107 always refers to the URL- and filename-safe Base64 encoding 108 described in RFC 4648 [RFC4648], Section 5, with the (non URL- 109 safe) '=' padding characters omitted, as permitted by Section 3.2. 110 (See Appendix B of [JWS] for notes on implementing base64url 111 encoding without padding.) 113 3. Example JSON Web Key Set 115 The following example JWK Set contains two public keys represented as 116 JWKs: one using an Elliptic Curve algorithm and a second one using an 117 RSA algorithm. The first specifies that the key is to be used for 118 encryption. Both provide a Key ID for key matching purposes. In 119 both cases, integers are represented using the base64url encoding of 120 their big endian representations. (Long lines are broken are for 121 display purposes only.) 122 {"keys": 123 [ 124 {"alg":"EC", 125 "crv":"P-256", 126 "x":"MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4", 127 "y":"4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM", 128 "use":"enc", 129 "kid":"1"}, 131 {"alg":"RSA", 132 "mod": "0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx 133 4cbbfAAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n3oknjhMs 134 tn64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65YGjQR0_FDW2 135 QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n91CbOpbI 136 SD08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINHaQ-G_xBniIqb 137 w0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw", 138 "exp":"AQAB", 139 "kid":"2011-04-29"} 140 ] 141 } 143 4. JSON Web Key (JWK) Format 145 A JSON Web Key (JWK) is a JSON object containing specific members, as 146 specified below. Those members that are common to all key types are 147 defined below. 149 JWKs also require members that are specific to the particular key 150 algorithm family to represent the key parameters. These algorithm 151 specific members are defined in Section 5 of the JSON Web Algorithms 152 (JWA) [JWA] specification. 154 The member names within a JWK MUST be unique; objects with duplicate 155 member names MUST be rejected. 157 Additional members MAY be present in the JWK. If present, they MUST 158 be understood by implementations using them. Parameters for 159 representing keys for additional algorithm families or additional key 160 properties SHOULD either be defined in the IANA JSON Web Key 161 Parameters registry [JWA] or be a URI that contains a collision 162 resistant namespace. 164 4.1. "alg" (Algorithm Family) Parameter 166 The "alg" (algorithm family) member identifies the cryptographic 167 algorithm family used with the key. A list of defined "alg" values 168 is presented in Section 5.1 of the JSON Web Algorithms (JWA) [JWA] 169 specification. Specific additional members are required to represent 170 the key, depending upon the algorithm family. These members are 171 specified in Section 5 of the JSON Web Algorithms (JWA) [JWA] 172 specification. The "alg" value is case sensitive. Its value MUST be 173 a string. 175 "alg" values SHOULD either be defined in the IANA JSON Web Key 176 Algorithm Families registry [JWA] or be a URI that contains a 177 collision resistant namespace. 179 4.2. "use" (Key Use) Parameter 181 The "use" (key use) member identifies the intended use of the key. 182 Values defined by this specification are "sig" (signature) and "enc" 183 (encryption). Other values MAY be used. The "use" value is case 184 sensitive. Its value MUST be a string. This member is OPTIONAL. 186 4.3. "kid" (Key ID) Parameter 188 The "kid" (key ID) member can be used to match a specific key. This 189 can be used, for instance, to choose among a set of keys within the 190 JWK during key rollover. When used with JWS or JWE, the "kid" value 191 MAY be used to match a JWS or JWE "kid" header parameter value. The 192 interpretation of the "kid" value is unspecified. Its value MUST be 193 a string. This member is OPTIONAL. 195 5. JSON Web Key Set (JWK Set) Format 197 A JSON Web Key Set (JWK Set) is a JSON object that contains an array 198 of JSON Web Key values as the value of its "keys" member. 200 The member names within a JWK Set MUST be unique; objects with 201 duplicate member names MUST be rejected. 203 Additional members MAY be present in the JWK Set. If present, they 204 MUST be understood by implementations using them. Parameters for 205 representing additional properties of JWK Sets SHOULD either be 206 defined in the IANA JSON Web Key Set Parameters registry Section 6.1 207 or be a URI that contains a collision resistant namespace. 209 5.1. "keys" (JSON Web Key Set) Parameter 211 The value of the "keys" (JSON Web Key Set) member is an array of JSON 212 Web Key (JWK) values. This member is REQUIRED. 214 6. IANA Considerations 216 6.1. JSON Web Key Set Parameters Registry 218 This specification establishes the IANA JSON Web Key Set Parameters 219 registry for reserved JWK Set parameter names. Inclusion in the 220 registry is RFC Required in the RFC 5226 [RFC5226] sense. The 221 registry records the reserved parameter name and a reference to the 222 RFC that defines it. This specification registers the parameter 223 names defined in Section 5. 225 7. Security Considerations 227 A key is no more trustworthy than the method by which it was 228 received. 230 The security considerations in XML DSIG 2.0 231 [W3C.CR-xmldsig-core2-20120124], about public key representations 232 also apply to this specification, other than those that are XML 233 specific. 235 8. Open Issues and Things To Be Done (TBD) 237 The following items remain to be done in this draft: 239 o (None at present) 241 9. References 243 9.1. Normative References 245 [JWA] Jones, M., "JSON Web Algorithms (JWA)", May 2012. 247 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 248 Requirement Levels", BCP 14, RFC 2119, March 1997. 250 [RFC4627] Crockford, D., "The application/json Media Type for 251 JavaScript Object Notation (JSON)", RFC 4627, July 2006. 253 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 254 Encodings", RFC 4648, October 2006. 256 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 257 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 258 May 2008. 260 9.2. Informative References 262 [JWE] Jones, M., Rescorla, E., and J. Hildebrand, "JSON Web 263 Encryption (JWE)", May 2012. 265 [JWS] Jones, M., Bradley, J., and N. Sakimura, "JSON Web 266 Signature (JWS)", May 2012. 268 [MagicSignatures] 269 Panzer (editor), J., Laurie, B., and D. Balfanz, "Magic 270 Signatures", January 2011. 272 [W3C.CR-xmldsig-core2-20120124] 273 Eastlake, D., Reagle, J., Yiu, K., Solo, D., Datta, P., 274 Hirsch, F., Cantor, S., and T. Roessler, "XML Signature 275 Syntax and Processing Version 2.0", World Wide Web 276 Consortium CR CR-xmldsig-core2-20120124, January 2012, 277 . 279 Appendix A. Acknowledgements 281 A JSON representation for RSA public keys was previously introduced 282 in Magic Signatures [MagicSignatures]. 284 Appendix B. Document History 286 -02 288 o Simplified JWK terminology to get replace the "JWK Key Object" and 289 "JWK Container Object" terms with simply "JSON Web Key (JWK)" and 290 "JSON Web Key Set (JWK Set)" and to eliminate potential confusion 291 between single keys and sets of keys. As part of this change, the 292 top-level member name for a set of keys was changed from "jwk" to 293 "keys". 295 o Clarified that values with duplicate member names MUST be 296 rejected. 298 o Established JSON Web Key Set Parameters registry. 300 o Explicitly listed non-goals in the introduction. 302 o Moved algorithm-specific definitions from JWK to JWA. 304 o Reformatted to give each member definition its own section 305 heading. 307 -01 309 o Corrected the Magic Signatures reference. 311 -00 313 o Created the initial IETF draft based upon 314 draft-jones-json-web-key-03 with no normative changes. 316 Author's Address 318 Michael B. Jones 319 Microsoft 321 Email: mbj@microsoft.com 322 URI: http://self-issued.info/