idnits 2.17.1 draft-jones-json-web-encryption-json-serialization-00.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 (March 5, 2012) is 4434 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' -- Possible downref: Non-RFC (?) normative reference: ref. 'JWE' ** Obsolete normative reference: RFC 4627 (Obsoleted by RFC 7158, RFC 7159) Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 3 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 March 5, 2012 5 Expires: September 6, 2012 7 JSON Web Encryption JSON Serialization (JWE-JS) 8 draft-jones-json-web-encryption-json-serialization-00 10 Abstract 12 The JSON Web Encryption JSON Serialization (JWE-JS) is a means of 13 representing encrypted content using JSON data structures. This 14 specification describes a means of representing secured content as a 15 JSON data object (as opposed to the JWE specification, which uses a 16 compact serialization with a URL-safe representation). It enables 17 the same content to be encrypted to multiple parties (unlike JWE). 18 Cryptographic algorithms and identifiers used with this specification 19 are enumerated in the separate JSON Web Algorithms (JWA) 20 specification. The JSON Serialization for related digital signature 21 and HMAC functionality is described in the separate JSON Web 22 Signature JSON Serialization (JWS-JS) specification. 24 Requirements Language 26 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 27 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 28 document are to be interpreted as described in RFC 2119 [RFC2119]. 30 Status of this Memo 32 This Internet-Draft is submitted in full conformance with the 33 provisions of BCP 78 and BCP 79. 35 Internet-Drafts are working documents of the Internet Engineering 36 Task Force (IETF). Note that other groups may also distribute 37 working documents as Internet-Drafts. The list of current Internet- 38 Drafts is at http://datatracker.ietf.org/drafts/current/. 40 Internet-Drafts are draft documents valid for a maximum of six months 41 and may be updated, replaced, or obsoleted by other documents at any 42 time. It is inappropriate to use Internet-Drafts as reference 43 material or to cite them other than as "work in progress." 45 This Internet-Draft will expire on September 6, 2012. 47 Copyright Notice 48 Copyright (c) 2012 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents 53 (http://trustee.ietf.org/license-info) in effect on the date of 54 publication of this document. Please review these documents 55 carefully, as they describe your rights and restrictions with respect 56 to this document. Code Components extracted from this document must 57 include Simplified BSD License text as described in Section 4.e of 58 the Trust Legal Provisions and are provided without warranty as 59 described in the Simplified BSD License. 61 Table of Contents 63 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 64 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . 3 65 3. JSON Serialization . . . . . . . . . . . . . . . . . . . . . . 3 66 4. Example JWE-JS . . . . . . . . . . . . . . . . . . . . . . . . 4 67 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 5 68 6. Security Considerations . . . . . . . . . . . . . . . . . . . . 5 69 7. Open Issues and Things To Be Done (TBD) . . . . . . . . . . . . 5 70 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 5 71 8.1. Normative References . . . . . . . . . . . . . . . . . . . 5 72 8.2. Informative References . . . . . . . . . . . . . . . . . . 6 73 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . . 6 74 Appendix B. Document History . . . . . . . . . . . . . . . . . . . 6 75 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 6 77 1. Introduction 79 The JSON Web Encryption JSON Serialization (JWE-JS) is a format for 80 representing encrypted content as a JSON RFC 4627 [RFC4627] object. 81 It enables the same content to be encrypted to multiple parties 82 (unlike JWE [JWE].) The encryption mechanisms are independent of the 83 type of content being encrypted. Cryptographic algorithms and 84 identifiers used with this specification are enumerated in the 85 separate JSON Web Algorithms (JWA) [JWA] specification. The JSON 86 Serialization for related digital signature and HMAC functionality is 87 described in the separate JSON Web Signature JSON Serialization 88 (JWS-JS) [JWS-JS] specification. 90 2. Terminology 92 This specification uses the same terminology as the JSON Web 93 Encryption (JWE) [JWE] specification. 95 3. JSON Serialization 97 The JSON Serialization represents encrypted content as a JSON object 98 with members for each of three constituent parts: a "headers" member 99 whose value is a non-empty array of Encoded JWE Header values, a 100 "encrypted_keys" member whose value is a non-empty array of Encoded 101 JWE Encrypted Key values, where the number of elements in both arrays 102 is the same, and a "ciphertext" member whose value is an Encoded JWE 103 Ciphertext value. 105 Unlike the compact serialization used by JWEs, content using the JSON 106 Serialization MAY be encrypted to more than one recipient. Each 107 recipient requires a JWE Header value specifying the cryptographic 108 parameters used to encrypt the JWE Encrypted Key to that recipient 109 and the parameters used to encrypt the plaintext to produce the JWE 110 Ciphertext; these values are represented as Encoded JWE Header values 111 that are elements of the non-empty array contained in the "headers" 112 member. Each recipient also requires a JWE Encrypted Key value; 113 these values are represented as Encoded JWE Encrypted Key values that 114 are corresponding elements of the non-empty array contained in the 115 "encrypted_keys" member. Therefore, the syntax is: 116 {"headers":["
",...,"
"], 117 "encrypted_keys":["",...,""], 118 "ciphertext":"" 119 } 121 The contents of the Encoded JWE Header, Encoded JWE Encrypted Key, 122 and Encoded JWE Ciphertext values are exactly as specified in JSON 123 Web Encryption (JWE) [JWE]. They are interpreted and validated in 124 the same manner, with each corresponding "headers" and 125 "encrypted_keys" value being created or validated together. The 126 arrays MUST have the same number of elements. 128 The i'th JWE Encrypted Key value is computed using the parameters of 129 i'th JWE Header value in the same manner described in the JWE 130 specification. This has the desirable result that each Encoded JWE 131 Encrypted Key value in the "encrypted_keys" array is identical to the 132 value that would have been computed for the same header and payload 133 in a JWE, as is the JWE Ciphertext value. 135 All recipients use the same JWE Ciphertext value, resulting in 136 potentially significant space savings if the message is large. 137 Therefore, all header parameters that specify the treatment of the 138 JWE Ciphertext value MUST be the same for all recipients. In 139 particular, this means that the "enc" (encryption method) header 140 parameter value in the JWE Header for each recipient MUST be the 141 same, as MUST be the "iv" (initialization vector) value (when 142 required for the algorithm). 144 4. Example JWE-JS 146 This section contains an example using the JWE JSON Serialization. 147 This example demonstrates the capability for encrypting the same 148 plaintext to multiple recipients. 150 Two recipients are present in this example: both using the RSA- 151 PKCS1_1.5 algorithm to produce the JWE Encrypted Key (but with using 152 different public keys). The Plaintext is encrypted using the AES- 153 256-GCM algorithm to produce the JWE Ciphertext. The two Decoded JWE 154 Header Segments used are: 155 {"alg":"RSA1_5", 156 "enc":"A256GCM", 157 "iv":"__79_Pv6-fg", 158 "x5t":"7noOPq-hJ1_hCnvWh6IeYI2w9Q0"} 160 and: 161 {"alg":"RSA1_5", 162 "enc":"A256GCM", 163 "iv":"__79_Pv6-fg", 164 "jku":"https://example.com/public_key.jwk"} 166 The complete JSON Web Encryption JSON Serialization (JWE-JS) for 167 these values is as follows (with line breaks for display purposes 168 only): 170 {"headers":[ 171 "eyJhbGciOiJSU0ExXzUiLA0KICJlbmMiOiJBMjU2R0NNIiwNCiAiaXYiOiJfX 172 zc5X1B2Ni1mZyIsDQogIng1dCI6Ijdub09QcS1oSjFfaENudldoNkllWUkydzlRM 173 CJ9", 174 "eyJhbGciOiJSU0ExXzUiLA0KICJlbmMiOiJBMjU2R0NNIiwNCiAiaXYiOiJfX 175 zc5X1B2Ni1mZyIsDQogImprdSI6Imh0dHBzOi8vZXhhbXBsZS5jb20vcHVibGljX 176 2tleS5qd2sifQ"], 177 "encrypted_keys":[ 178 "TBD_key_1_value_TBD", 179 "TBD_key_2_value_TBD"], 180 "ciphertext":"TBD_ciphertext_value_TBD" 181 } 183 TBD: Finish this example. 185 5. IANA Considerations 187 This specification makes no requests of IANA. 189 6. Security Considerations 191 The security considerations for this specification are the same as 192 those for the JSON Web Encryption (JWE) [JWE] specification. 194 7. Open Issues and Things To Be Done (TBD) 196 The following items remain to be done in this draft: 198 o Complete the example. 200 o Track changes that occur in the JWE spec, including the 201 introduction of integrity protection for non AEAD operations. 203 8. References 205 8.1. Normative References 207 [JWA] Jones, M., "JSON Web Algorithms (JWA)", January 2012. 209 [JWE] Jones, M., Rescorla, E., and J. Hildebrand, "JSON Web 210 Encryption (JWE)", January 2012. 212 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 213 Requirement Levels", BCP 14, RFC 2119, March 1997. 215 [RFC4627] Crockford, D., "The application/json Media Type for 216 JavaScript Object Notation (JSON)", RFC 4627, July 2006. 218 8.2. Informative References 220 [I-D.rescorla-jsms] 221 Rescorla, E. and J. Hildebrand, "JavaScript Message 222 Security Format", draft-rescorla-jsms-00 (work in 223 progress), March 2011. 225 [JSE] Bradley, J. and N. Sakimura (editor), "JSON Simple 226 Encryption", September 2010. 228 [JWS-JS] Jones, M., Bradley, J., and N. Sakimura, "JSON Web 229 Signature JSON Serialization (JWS-JS)", March 2012. 231 Appendix A. Acknowledgements 233 JSON serializations for encrypted content were previously explored by 234 JSON Simple Encryption [JSE] and JavaScript Message Security Format 235 [I-D.rescorla-jsms]. 237 Appendix B. Document History 239 -00 241 o Created the initial version incorporating JOSE working group input 242 and drawing from the JSON Serialization previously proposed in 243 draft-jones-json-web-token-01. 245 Author's Address 247 Michael B. Jones 248 Microsoft 250 Email: mbj@microsoft.com 251 URI: http://self-issued.info/