idnits 2.17.1 draft-ietf-jose-json-web-algorithms-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 : ---------------------------------------------------------------------------- == There are 4 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. 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 4338 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. 'JWE' -- Possible downref: Non-RFC (?) normative reference: ref. 'JWK' -- Possible downref: Non-RFC (?) normative reference: ref. 'JWS' ** Downref: Normative reference to an Informational RFC: RFC 2104 ** Downref: Normative reference to an Informational RFC: RFC 3394 ** Obsolete normative reference: RFC 3447 (Obsoleted by RFC 8017) ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) ** Downref: Normative reference to an Informational RFC: RFC 6090 Summary: 5 errors (**), 0 flaws (~~), 2 warnings (==), 4 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 Algorithms (JWA) 8 draft-ietf-jose-json-web-algorithms-02 10 Abstract 12 The JSON Web Algorithms (JWA) specification enumerates cryptographic 13 algorithms and identifiers to be used with the JSON Web Signature 14 (JWS) and JSON Web Encryption (JWE) specifications. 16 Requirements Language 18 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 19 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 20 document are to be interpreted as described in RFC 2119 [RFC2119]. 22 Status of this Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at http://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on November 13, 2012. 39 Copyright Notice 41 Copyright (c) 2012 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (http://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 Table of Contents 56 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 57 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 58 3. Cryptographic Algorithms for JWS . . . . . . . . . . . . . . . 4 59 3.1. "alg" (Algorithm) Header Parameter Values for JWS . . . . 4 60 3.2. MAC with HMAC SHA-256, HMAC SHA-384, or HMAC SHA-512 . . . 5 61 3.3. Digital Signature with RSA SHA-256, RSA SHA-384, or 62 RSA SHA-512 . . . . . . . . . . . . . . . . . . . . . . . 6 63 3.4. Digital Signature with ECDSA P-256 SHA-256, ECDSA 64 P-384 SHA-384, or ECDSA P-521 SHA-512 . . . . . . . . . . 7 65 3.5. Creating a Plaintext JWS . . . . . . . . . . . . . . . . . 9 66 3.6. Additional Digital Signature/MAC Algorithms and 67 Parameters . . . . . . . . . . . . . . . . . . . . . . . . 9 68 4. Cryptographic Algorithms for JWE . . . . . . . . . . . . . . . 9 69 4.1. "alg" (Algorithm) Header Parameter Values for JWE . . . . 9 70 4.2. "enc" (Encryption Method) Header Parameter Values for 71 JWE . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 72 4.3. "int" (Integrity Algorithm) Header Parameter Values 73 for JWE . . . . . . . . . . . . . . . . . . . . . . . . . 11 74 4.4. Key Encryption with RSA using RSA-PKCS1-1.5 Padding . . . 11 75 4.5. Key Encryption with RSA using Optimal Asymmetric 76 Encryption Padding (OAEP) . . . . . . . . . . . . . . . . 11 77 4.6. Key Agreement with Elliptic Curve Diffie-Hellman 78 Ephemeral Static (ECDH-ES) . . . . . . . . . . . . . . . . 12 79 4.7. Key Encryption with AES Key Wrap . . . . . . . . . . . . . 12 80 4.8. Plaintext Encryption with AES Cipher Block Chaining 81 (CBC) Mode . . . . . . . . . . . . . . . . . . . . . . . . 12 82 4.9. Plaintext Encryption with AES Galois/Counter Mode (GCM) . 12 83 4.10. Integrity Calculation with HMAC SHA-256, HMAC SHA-384, 84 or HMAC SHA-512 . . . . . . . . . . . . . . . . . . . . . 13 85 4.11. Additional Encryption Algorithms and Parameters . . . . . 13 86 5. Cryptographic Algorithms for JWK . . . . . . . . . . . . . . . 13 87 5.1. "alg" (Algorithm Family) Parameter Values for JWK . . . . 14 88 5.2. JWK Parameters for Elliptic Curve Keys . . . . . . . . . . 14 89 5.2.1. "crv" (Curve) Parameter . . . . . . . . . . . . . . . 14 90 5.2.2. "x" (X Coordinate) Parameter . . . . . . . . . . . . . 14 91 5.2.3. "y" (Y Coordinate) Parameter . . . . . . . . . . . . . 14 92 5.3. JWK Parameters for RSA Keys . . . . . . . . . . . . . . . 14 93 5.3.1. "mod" (Modulus) Parameter . . . . . . . . . . . . . . 15 94 5.3.2. "exp" (Exponent) Parameter . . . . . . . . . . . . . . 15 95 5.4. Additional Key Algorithm Families and Parameters . . . . . 15 97 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15 98 6.1. JSON Web Signature and Encryption Header Parameters 99 Registry . . . . . . . . . . . . . . . . . . . . . . . . . 15 100 6.2. JSON Web Signature and Encryption Algorithms Registry . . 15 101 6.3. JSON Web Signature and Encryption "typ" Values Registry . 16 102 6.4. JSON Web Key Parameters Registry . . . . . . . . . . . . . 16 103 6.5. JSON Web Key Algorithm Families Registry . . . . . . . . . 16 104 7. Security Considerations . . . . . . . . . . . . . . . . . . . 16 105 8. Open Issues and Things To Be Done (TBD) . . . . . . . . . . . 17 106 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 17 107 9.1. Normative References . . . . . . . . . . . . . . . . . . . 17 108 9.2. Informative References . . . . . . . . . . . . . . . . . . 18 109 Appendix A. Digital Signature/MAC Algorithm Identifier 110 Cross-Reference . . . . . . . . . . . . . . . . . . . 19 111 Appendix B. Encryption Algorithm Identifier Cross-Reference . . . 21 112 Appendix C. Acknowledgements . . . . . . . . . . . . . . . . . . 25 113 Appendix D. Document History . . . . . . . . . . . . . . . . . . 25 114 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 26 116 1. Introduction 118 The JSON Web Algorithms (JWA) specification enumerates cryptographic 119 algorithms and identifiers to be used with the JSON Web Signature 120 (JWS) [JWS] and JSON Web Encryption (JWE) [JWE] specifications. 121 Enumerating the algorithms and identifiers for them in this 122 specification, rather than in the JWS and JWE specifications, is 123 intended to allow them to remain unchanged in the face of changes in 124 the set of required, recommended, optional, and deprecated algorithms 125 over time. This specification also describes the semantics and 126 operations that are specific to these algorithms and algorithm 127 families. 129 2. Terminology 131 This specification uses the terminology defined by the JSON Web 132 Signature (JWS) [JWS] and JSON Web Encryption (JWE) [JWE] 133 specifications. 135 3. Cryptographic Algorithms for JWS 137 JWS uses cryptographic algorithms to digitally sign or MAC the 138 contents of the JWS Header and the JWS Payload. The use of the 139 following algorithms for producing JWSs is defined in this section. 141 3.1. "alg" (Algorithm) Header Parameter Values for JWS 143 The table below is the set of "alg" (algorithm) header parameter 144 values defined by this specification for use with JWS, each of which 145 is explained in more detail in the following sections: 147 +--------------------+----------------------------------------------+ 148 | alg Parameter | Digital Signature or MAC Algorithm | 149 | Value | | 150 +--------------------+----------------------------------------------+ 151 | HS256 | HMAC using SHA-256 hash algorithm | 152 | HS384 | HMAC using SHA-384 hash algorithm | 153 | HS512 | HMAC using SHA-512 hash algorithm | 154 | RS256 | RSA using SHA-256 hash algorithm | 155 | RS384 | RSA using SHA-384 hash algorithm | 156 | RS512 | RSA using SHA-512 hash algorithm | 157 | ES256 | ECDSA using P-256 curve and SHA-256 hash | 158 | | algorithm | 159 | ES384 | ECDSA using P-384 curve and SHA-384 hash | 160 | | algorithm | 161 | ES512 | ECDSA using P-521 curve and SHA-512 hash | 162 | | algorithm | 163 | none | No digital signature or MAC value included | 164 +--------------------+----------------------------------------------+ 166 See Appendix A for a table cross-referencing the digital signature 167 and MAC "alg" (algorithm) values used in this specification with the 168 equivalent identifiers used by other standards and software packages. 170 Of these algorithms, only HMAC SHA-256 and "none" MUST be implemented 171 by conforming JWS implementations. It is RECOMMENDED that 172 implementations also support the RSA SHA-256 and ECDSA P-256 SHA-256 173 algorithms. Support for other algorithms and key sizes is OPTIONAL. 175 3.2. MAC with HMAC SHA-256, HMAC SHA-384, or HMAC SHA-512 177 Hash-based Message Authentication Codes (HMACs) enable one to use a 178 secret plus a cryptographic hash function to generate a Message 179 Authentication Code (MAC). This can be used to demonstrate that the 180 MAC matches the hashed content, in this case the JWS Secured Input, 181 which therefore demonstrates that whoever generated the MAC was in 182 possession of the secret. The means of exchanging the shared key is 183 outside the scope of this specification. 185 The algorithm for implementing and validating HMACs is provided in 186 RFC 2104 [RFC2104]. This section defines the use of the HMAC SHA- 187 256, HMAC SHA-384, and HMAC SHA-512 cryptographic hash functions as 188 defined in FIPS 180-3 [FIPS.180-3]. The "alg" (algorithm) header 189 parameter values "HS256", "HS384", and "HS512" are used in the JWS 190 Header to indicate that the Encoded JWS Signature contains a 191 base64url encoded HMAC value using the respective hash function. 193 A key of the same size as the hash output (for instance, 256 bits for 194 "HS256") or larger MUST be used with this algorithm. 196 The HMAC SHA-256 MAC is generated as follows: 198 1. Apply the HMAC SHA-256 algorithm to the bytes of the UTF-8 199 representation of the JWS Secured Input (which is the same as the 200 ASCII representation) using the shared key to produce an HMAC 201 value. 203 2. Base64url encode the resulting HMAC value. 205 The output is the Encoded JWS Signature for that JWS. 207 The HMAC SHA-256 MAC for a JWS is validated as follows: 209 1. Apply the HMAC SHA-256 algorithm to the bytes of the UTF-8 210 representation of the JWS Secured Input (which is the same as the 211 ASCII representation) of the JWS using the shared key. 213 2. Base64url encode the resulting HMAC value. 215 3. If the Encoded JWS Signature and the base64url encoded HMAC value 216 exactly match, then one has confirmation that the shared key was 217 used to generate the HMAC on the JWS and that the contents of the 218 JWS have not be tampered with. 220 4. If the validation fails, the JWS MUST be rejected. 222 Alternatively, the Encoded JWS Signature MAY be base64url decoded to 223 produce the JWS Signature and this value can be compared with the 224 computed HMAC value, as this comparison produces the same result as 225 comparing the encoded values. 227 Securing content with the HMAC SHA-384 and HMAC SHA-512 algorithms is 228 performed identically to the procedure for HMAC SHA-256 - just with 229 correspondingly larger minimum key sizes and result values. 231 3.3. Digital Signature with RSA SHA-256, RSA SHA-384, or RSA SHA-512 233 This section defines the use of the RSASSA-PKCS1-v1_5 digital 234 signature algorithm as defined in RFC 3447 [RFC3447], Section 8.2 235 (commonly known as PKCS#1), using SHA-256, SHA-384, or SHA-512 as the 236 hash function. The RSASSA-PKCS1-v1_5 algorithm is described in FIPS 237 186-3 [FIPS.186-3], Section 5.5, and the SHA-256, SHA-384, and SHA- 238 512 cryptographic hash functions are defined in FIPS 180-3 239 [FIPS.180-3]. The "alg" (algorithm) header parameter values "RS256", 240 "RS384", and "RS512" are used in the JWS Header to indicate that the 241 Encoded JWS Signature contains a base64url encoded RSA digital 242 signature using the respective hash function. 244 A key of size 2048 bits or larger MUST be used with these algorithms. 246 Note that while Section 8 of RFC 3447 [RFC3447] explicitly calls for 247 people not to adopt RSASSA-PKCS1 for new applications and instead 248 requests that people transition to RSASSA-PSS, for interoperability 249 reasons, this specification does use RSASSA-PKCS1 because it commonly 250 implemented. 252 The RSA SHA-256 digital signature is generated as follows: 254 1. Generate a digital signature of the bytes of the UTF-8 255 representation of the JWS Secured Input (which is the same as the 256 ASCII representation) using RSASSA-PKCS1-V1_5-SIGN and the SHA- 257 256 hash function with the desired private key. The output will 258 be a byte array. 260 2. Base64url encode the resulting byte array. 262 The output is the Encoded JWS Signature for that JWS. 264 The RSA SHA-256 digital signature for a JWS is validated as follows: 266 1. Take the Encoded JWS Signature and base64url decode it into a 267 byte array. If decoding fails, the JWS MUST be rejected. 269 2. Submit the bytes of the UTF-8 representation of the JWS Secured 270 Input (which is the same as the ASCII representation) and the 271 public key corresponding to the private key used by the signer to 272 the RSASSA-PKCS1-V1_5-VERIFY algorithm using SHA-256 as the hash 273 function. 275 3. If the validation fails, the JWS MUST be rejected. 277 Signing with the RSA SHA-384 and RSA SHA-512 algorithms is performed 278 identically to the procedure for RSA SHA-256 - just with 279 correspondingly larger result values. 281 3.4. Digital Signature with ECDSA P-256 SHA-256, ECDSA P-384 SHA-384, 282 or ECDSA P-521 SHA-512 284 The Elliptic Curve Digital Signature Algorithm (ECDSA) is defined by 285 FIPS 186-3 [FIPS.186-3]. ECDSA provides for the use of Elliptic 286 Curve cryptography, which is able to provide equivalent security to 287 RSA cryptography but using shorter key sizes and with greater 288 processing speed. This means that ECDSA digital signatures will be 289 substantially smaller in terms of length than equivalently strong RSA 290 digital signatures. 292 This specification defines the use of ECDSA with the P-256 curve and 293 the SHA-256 cryptographic hash function, ECDSA with the P-384 curve 294 and the SHA-384 hash function, and ECDSA with the P-521 curve and the 295 SHA-512 hash function. The P-256, P-384, and P-521 curves are also 296 defined in FIPS 186-3. The "alg" (algorithm) header parameter values 297 "ES256", "ES384", and "ES512" are used in the JWS Header to indicate 298 that the Encoded JWS Signature contains a base64url encoded ECDSA 299 P-256 SHA-256, ECDSA P-384 SHA-384, or ECDSA P-521 SHA-512 digital 300 signature, respectively. 302 A key of size 160 bits or larger MUST be used with these algorithms. 304 The ECDSA P-256 SHA-256 digital signature is generated as follows: 306 1. Generate a digital signature of the bytes of the UTF-8 307 representation of the JWS Secured Input (which is the same as the 308 ASCII representation) using ECDSA P-256 SHA-256 with the desired 309 private key. The output will be the EC point (R, S), where R and 310 S are unsigned integers. 312 2. Turn R and S into byte arrays in big endian order. Each array 313 will be 32 bytes long. 315 3. Concatenate the two byte arrays in the order R and then S. 317 4. Base64url encode the resulting 64 byte array. 319 The output is the Encoded JWS Signature for the JWS. 321 The ECDSA P-256 SHA-256 digital signature for a JWS is validated as 322 follows: 324 1. Take the Encoded JWS Signature and base64url decode it into a 325 byte array. If decoding fails, the JWS MUST be rejected. 327 2. The output of the base64url decoding MUST be a 64 byte array. 329 3. Split the 64 byte array into two 32 byte arrays. The first array 330 will be R and the second S (with both being in big endian byte 331 order). 333 4. Submit the bytes of the UTF-8 representation of the JWS Secured 334 Input (which is the same as the ASCII representation), R, S and 335 the public key (x, y) to the ECDSA P-256 SHA-256 validator. 337 5. If the validation fails, the JWS MUST be rejected. 339 The ECDSA validator will then determine if the digital signature is 340 valid, given the inputs. Note that ECDSA digital signature contains 341 a value referred to as K, which is a random number generated for each 342 digital signature instance. This means that two ECDSA digital 343 signatures using exactly the same input parameters will output 344 different signature values because their K values will be different. 345 The consequence of this is that one must validate an ECDSA digital 346 signature by submitting the previously specified inputs to an ECDSA 347 validator. 349 Signing with the ECDSA P-384 SHA-384 and ECDSA P-521 SHA-512 350 algorithms is performed identically to the procedure for ECDSA P-256 351 SHA-256 - just with correspondingly larger result values. 353 3.5. Creating a Plaintext JWS 355 To support use cases where the content is secured by a means other 356 than a digital signature or MAC value, JWSs MAY also be created 357 without them. These are called "Plaintext JWSs". Plaintext JWSs 358 MUST use the "alg" value "none", and are formatted identically to 359 other JWSs, but with an empty JWS Signature value. 361 3.6. Additional Digital Signature/MAC Algorithms and Parameters 363 Additional algorithms MAY be used to protect JWSs with corresponding 364 "alg" (algorithm) header parameter values being defined to refer to 365 them. New "alg" header parameter values SHOULD either be defined in 366 the IANA JSON Web Signature and Encryption Algorithms registry 367 Section 6.2 or be a URI that contains a collision resistant 368 namespace. In particular, it is permissible to use the algorithm 369 identifiers defined in XML DSIG [RFC3275], XML DSIG 2.0 370 [W3C.CR-xmldsig-core2-20120124], and related specifications as "alg" 371 values. 373 As indicated by the common registry, JWSs and JWEs share a common 374 "alg" value space. The values used by the two specifications MUST be 375 distinct, as the "alg" value MAY be used to determine whether the 376 object is a JWS or JWE. 378 Likewise, additional reserved header parameter names MAY be defined 379 via the IANA JSON Web Signature and Encryption Header Parameters 380 registry Section 6.1. As indicated by the common registry, JWSs and 381 JWEs share a common header parameter space; when a parameter is used 382 by both specifications, its usage must be compatible between the 383 specifications. 385 4. Cryptographic Algorithms for JWE 387 JWE uses cryptographic algorithms to encrypt the Content Master Key 388 (CMK) and the Plaintext. This section specifies a set of specific 389 algorithms for these purposes. 391 4.1. "alg" (Algorithm) Header Parameter Values for JWE 393 The table below is the set of "alg" (algorithm) header parameter 394 values that are defined by this specification for use with JWE. 395 These algorithms are used to encrypt the CMK, producing the JWE 396 Encrypted Key, or to use key agreement to agree upon the CMK. 398 +-----------+-------------------------------------------------------+ 399 | alg | Key Encryption or Agreement Algorithm | 400 | Parameter | | 401 | Value | | 402 +-----------+-------------------------------------------------------+ 403 | RSA1_5 | RSA using RSA-PKCS1-1.5 padding, as defined in RFC | 404 | | 3447 [RFC3447] | 405 | RSA-OAEP | RSA using Optimal Asymmetric Encryption Padding | 406 | | (OAEP), as defined in RFC 3447 [RFC3447] | 407 | ECDH-ES | Elliptic Curve Diffie-Hellman Ephemeral Static, as | 408 | | defined in RFC 6090 [RFC6090], and using the Concat | 409 | | KDF, as defined in Section 5.8.1 of [NIST.800-56A], | 410 | | where the Digest Method is SHA-256 and all OtherInfo | 411 | | parameters are the empty bit string | 412 | A128KW | Advanced Encryption Standard (AES) Key Wrap Algorithm | 413 | | using 128 bit keys, as defined in RFC 3394 [RFC3394] | 414 | A256KW | Advanced Encryption Standard (AES) Key Wrap Algorithm | 415 | | using 256 bit keys, as defined in RFC 3394 [RFC3394] | 416 +-----------+-------------------------------------------------------+ 418 4.2. "enc" (Encryption Method) Header Parameter Values for JWE 420 The table below is the set of "enc" (encryption method) header 421 parameter values that are defined by this specification for use with 422 JWE. These algorithms are used to encrypt the Plaintext, which 423 produces the Ciphertext. 425 +-----------+-------------------------------------------------------+ 426 | enc | Block Encryption Algorithm | 427 | Parameter | | 428 | Value | | 429 +-----------+-------------------------------------------------------+ 430 | A128CBC | Advanced Encryption Standard (AES) using 128 bit keys | 431 | | in Cipher Block Chaining (CBC) mode using PKCS #5 | 432 | | padding, as defined in [FIPS.197] and [NIST.800-38A] | 433 | A256CBC | Advanced Encryption Standard (AES) using 256 bit keys | 434 | | in Cipher Block Chaining (CBC) mode using PKCS #5 | 435 | | padding, as defined in [FIPS.197] and [NIST.800-38A] | 436 | A128GCM | Advanced Encryption Standard (AES) using 128 bit keys | 437 | | in Galois/Counter Mode (GCM), as defined in | 438 | | [FIPS.197] and [NIST.800-38D] | 439 | A256GCM | Advanced Encryption Standard (AES) using 256 bit keys | 440 | | in Galois/Counter Mode (GCM), as defined in | 441 | | [FIPS.197] and [NIST.800-38D] | 442 +-----------+-------------------------------------------------------+ 444 See Appendix B for a table cross-referencing the encryption "alg" 445 (algorithm) and "enc" (encryption method) values used in this 446 specification with the equivalent identifiers used by other standards 447 and software packages. 449 Of these "alg" and "enc" algorithms, only RSA-PKCS1-1.5 with 2048 bit 450 keys, AES-128-KW, AES-256-KW, AES-128-CBC, and AES-256-CBC MUST be 451 implemented by conforming JWE implementations. It is RECOMMENDED 452 that implementations also support ECDH-ES with 256 bit keys, AES-128- 453 GCM, and AES-256-GCM. Support for other algorithms and key sizes is 454 OPTIONAL. 456 4.3. "int" (Integrity Algorithm) Header Parameter Values for JWE 458 The table below is the set of "int" (integrity algorithm) header 459 parameter values defined by this specification for use with JWE. 460 Note that these are the HMAC SHA subset of the "alg" (algorithm) 461 header parameter values defined for use with JWS Section 3.1. /> 463 +---------------------+-----------------------------------+ 464 | int Parameter Value | Algorithm | 465 +---------------------+-----------------------------------+ 466 | HS256 | HMAC using SHA-256 hash algorithm | 467 | HS384 | HMAC using SHA-384 hash algorithm | 468 | HS512 | HMAC using SHA-512 hash algorithm | 469 +---------------------+-----------------------------------+ 471 Of these "int" algorithms, only HMAC SHA-256 MUST be implemented by 472 conforming JWE implementations. It is RECOMMENDED that 473 implementations also support the RSA SHA-256 and ECDSA P-256 SHA-256 474 algorithms. 476 4.4. Key Encryption with RSA using RSA-PKCS1-1.5 Padding 478 This section defines the specifics of encrypting a JWE CMK with RSA 479 using RSA-PKCS1-1.5 padding, as defined in RFC 3447 [RFC3447]. The 480 "alg" header parameter value "RSA1_5" is used in this case. 482 A key of size 2048 bits or larger MUST be used with this algorithm. 484 4.5. Key Encryption with RSA using Optimal Asymmetric Encryption 485 Padding (OAEP) 487 This section defines the specifics of encrypting a JWE CMK with RSA 488 using Optimal Asymmetric Encryption Padding (OAEP), as defined in RFC 489 3447 [RFC3447]. The "alg" header parameter value "RSA-OAEP" is used 490 in this case. 492 A key of size 2048 bits or larger MUST be used with this algorithm. 494 4.6. Key Agreement with Elliptic Curve Diffie-Hellman Ephemeral Static 495 (ECDH-ES) 497 This section defines the specifics of agreeing upon a JWE CMK with 498 Elliptic Curve Diffie-Hellman Ephemeral Static, as defined in RFC 499 6090 [RFC6090], and using the Concat KDF, as defined in Section 5.8.1 500 of [NIST.800-56A], where the Digest Method is SHA-256 and all 501 OtherInfo parameters are the empty bit string. The "alg" header 502 parameter value "ECDH-ES" is used in this case. 504 A key of size 160 bits or larger MUST be used for the Elliptic Curve 505 keys used with this algorithm. The output of the Concat KDF MUST be 506 a key of the same length as that used by the "enc" algorithm. 508 An "epk" (ephemeral public key) value MUST only be used for a single 509 key agreement transaction. 511 4.7. Key Encryption with AES Key Wrap 513 This section defines the specifics of encrypting a JWE CMK with the 514 Advanced Encryption Standard (AES) Key Wrap Algorithm using 128 or 515 256 bit keys, as defined in RFC 3394 [RFC3394]. The "alg" header 516 parameter values "A128KW" or "A256KW" are used in this case. 518 4.8. Plaintext Encryption with AES Cipher Block Chaining (CBC) Mode 520 This section defines the specifics of encrypting the JWE Plaintext 521 with Advanced Encryption Standard (AES) in Cipher Block Chaining 522 (CBC) mode using PKCS #5 padding using 128 or 256 bit keys, as 523 defined in [FIPS.197] and [NIST.800-38A]. The "enc" header parameter 524 values "A128CBC" or "A256CBC" are used in this case. 526 Use of an Initialization Vector (IV) of size 128 bits is RECOMMENDED 527 with this algorithm. 529 4.9. Plaintext Encryption with AES Galois/Counter Mode (GCM) 531 This section defines the specifics of encrypting the JWE Plaintext 532 with Advanced Encryption Standard (AES) in Galois/Counter Mode (GCM) 533 using 128 or 256 bit keys, as defined in [FIPS.197] and 534 [NIST.800-38D]. The "enc" header parameter values "A128GCM" or 535 "A256GCM" are used in this case. 537 Use of an Initialization Vector (IV) of size 96 bits is REQUIRED with 538 this algorithm. 540 The "additional authenticated data" parameter value for the 541 encryption is the concatenation of the Encoded JWE Header, a period 542 ('.') character, and the Encoded JWE Encrypted Key. 544 The requested size of the "authentication tag" output MUST be the 545 same as the key size (for instance, 128 bits for "A128GCM"). 547 As GCM is an AEAD algorithm, the JWE Integrity Value is set to be the 548 "authentication tag" value produced by the encryption. 550 4.10. Integrity Calculation with HMAC SHA-256, HMAC SHA-384, or HMAC 551 SHA-512 553 This section defines the specifics of computing a JWE Integrity Value 554 with HMAC SHA-256, HMAC SHA-384, or HMAC SHA-512 as defined in FIPS 555 180-3 [FIPS.180-3]. The "int" header parameter values "HS256", 556 "HS384", or "HS512" are used in this case. 558 A key of the same size as the hash output (for instance, 256 bits for 559 "HS256") or larger MUST be used with this algorithm. 561 4.11. Additional Encryption Algorithms and Parameters 563 Additional algorithms MAY be used to protect JWEs with corresponding 564 "alg" (algorithm), "enc" (encryption method), and "int" (integrity 565 algorithm) header parameter values being defined to refer to them. 566 New "alg", "enc", and "int" header parameter values SHOULD either be 567 defined in the IANA JSON Web Signature and Encryption Algorithms 568 registry Section 6.2 or be a URI that contains a collision resistant 569 namespace. In particular, it is permissible to use the algorithm 570 identifiers defined in XML Encryption [W3C.REC-xmlenc-core-20021210], 571 XML Encryption 1.1 [W3C.CR-xmlenc-core1-20120313], and related 572 specifications as "alg", "enc", and "int" values. 574 As indicated by the common registry, JWSs and JWEs share a common 575 "alg" value space. The values used by the two specifications MUST be 576 distinct, as the "alg" value MAY be used to determine whether the 577 object is a JWS or JWE. 579 Likewise, additional reserved header parameter names MAY be defined 580 via the IANA JSON Web Signature and Encryption Header Parameters 581 registry Section 6.1. As indicated by the common registry, JWSs and 582 JWEs share a common header parameter space; when a parameter is used 583 by both specifications, its usage must be compatible between the 584 specifications. 586 5. Cryptographic Algorithms for JWK 588 A JSON Web Key (JWK) [JWK] is a JSON data structure that represents a 589 public key. A JSON Web Key Set (JWK Set) is a JSON data structure 590 for representing a set of JWKs. This section specifies a set of 591 algorithm families to be used for those public keys and the algorithm 592 family specific parameters for representing those keys. 594 5.1. "alg" (Algorithm Family) Parameter Values for JWK 596 The table below is the set of "alg" (algorithm family) parameter 597 values that are defined by this specification for use in JWKs. 599 +---------------------+----------------------------------------+ 600 | alg Parameter Value | Algorithm Family | 601 +---------------------+----------------------------------------+ 602 | EC | Elliptic Curve [FIPS.186-3] key family | 603 | RSA | RSA [RFC3447] key family | 604 +---------------------+----------------------------------------+ 606 5.2. JWK Parameters for Elliptic Curve Keys 608 JWKs can represent Elliptic Curve [FIPS.186-3] keys. In this case, 609 the "alg" member value MUST be "EC". Furthermore, these additional 610 members MUST be present: 612 5.2.1. "crv" (Curve) Parameter 614 The "crv" (curve) member identifies the cryptographic curve used with 615 the key. Values defined by this specification are "P-256", "P-384" 616 and "P-521". Additional "crv" values MAY be used, provided they are 617 understood by implementations using that Elliptic Curve key. The 618 "crv" value is case sensitive. Its value MUST be a string. 620 5.2.2. "x" (X Coordinate) Parameter 622 The "x" (x coordinate) member contains the x coordinate for the 623 elliptic curve point. It is represented as the base64url encoding of 624 the coordinate's big endian representation. 626 5.2.3. "y" (Y Coordinate) Parameter 628 The "y" (y coordinate) member contains the y coordinate for the 629 elliptic curve point. It is represented as the base64url encoding of 630 the coordinate's big endian representation. 632 5.3. JWK Parameters for RSA Keys 634 JWKs can represent RSA [RFC3447] keys. In this case, the "alg" 635 member value MUST be "RSA". Furthermore, these additional members 636 MUST be present: 638 5.3.1. "mod" (Modulus) Parameter 640 The "mod" (modulus) member contains the modulus value for the RSA 641 public key. It is represented as the base64url encoding of the 642 value's big endian representation. 644 5.3.2. "exp" (Exponent) Parameter 646 The "exp" (exponent) member contains the exponent value for the RSA 647 public key. It is represented as the base64url encoding of the 648 value's big endian representation. 650 5.4. Additional Key Algorithm Families and Parameters 652 Public keys using additional algorithm families MAY be represented 653 using JWK data structures with corresponding "alg" (algorithm family) 654 parameter values being defined to refer to them. New "alg" parameter 655 values SHOULD either be defined in the IANA JSON Web Key Algorithm 656 Families registry Section 6.5 or be a URI that contains a collision 657 resistant namespace. 659 Likewise, parameters for representing keys for additional algorithm 660 families or additional key properties SHOULD either be defined in the 661 IANA JSON Web Key Parameters registry Section 6.4 or be a URI that 662 contains a collision resistant namespace. 664 6. IANA Considerations 666 6.1. JSON Web Signature and Encryption Header Parameters Registry 668 This specification establishes the IANA JSON Web Signature and 669 Encryption Header Parameters registry for reserved JWS and JWE header 670 parameter names. Inclusion in the registry is RFC Required in the 671 RFC 5226 [RFC5226] sense. The registry records the reserved header 672 parameter name and a reference to the RFC that defines it. This 673 specification registers the header parameter names defined in JSON 674 Web Signature (JWS) [JWS], Section 4.1 and JSON Web Encryption (JWE) 675 [JWE], Section 4.1. 677 6.2. JSON Web Signature and Encryption Algorithms Registry 679 This specification establishes the IANA JSON Web Signature and 680 Encryption Algorithms registry for values of the JWS and JWE "alg" 681 (algorithm), "enc" (encryption method), and "int" (integrity 682 algorithm) header parameters. Inclusion in the registry is RFC 683 Required in the RFC 5226 [RFC5226] sense. The registry records the 684 algorithm usage "alg", "enc", or "int", the value, and a pointer to 685 the RFC that defines it. This specification registers the values 686 defined in Section 3.1, Section 4.1, Section 4.2, and Section 4.3. 688 6.3. JSON Web Signature and Encryption "typ" Values Registry 690 This specification establishes the IANA JSON Web Signature and 691 Encryption "typ" Values registry for values of the JWS and JWE "typ" 692 (type) header parameter. Inclusion in the registry is RFC Required 693 in the RFC 5226 [RFC5226] sense. It is RECOMMENDED that all 694 registered "typ" values also register a MIME Media Type RFC 2045 695 [RFC2045] that the registered value is a short name for. The 696 registry records the "typ" value, the MIME type value that it is an 697 abbreviation for (if any), and a pointer to the RFC that defines it. 699 MIME Media Type RFC 2045 [RFC2045] values MUST NOT be directly 700 registered as new "typ" values; rather, new "typ" values MAY be 701 registered as short names for MIME types. 703 6.4. JSON Web Key Parameters Registry 705 This specification establishes the IANA JSON Web Key Parameters 706 registry for reserved JWK parameter names. Inclusion in the registry 707 is RFC Required in the RFC 5226 [RFC5226] sense. The registry 708 records the reserved parameter name and a reference to the RFC that 709 defines it. This specification registers the parameter names defined 710 in JSON Web Key (JWK) [JWK], Section 4.2, JSON Web Encryption (JWE) 711 [JWE], Section 4.1, Section 5.2, and Section 5.3. 713 6.5. JSON Web Key Algorithm Families Registry 715 This specification establishes the IANA JSON Web Key Algorithm 716 Families registry for values of the JWK "alg" (algorithm family) 717 parameter. Inclusion in the registry is RFC Required in the RFC 5226 718 [RFC5226] sense. The registry records the "alg" value and a pointer 719 to the RFC that defines it. This specification registers the values 720 defined in Section 5.1. 722 7. Security Considerations 724 The security considerations in the JWS, JWE, and JWK specifications 725 also apply to this specification. 727 Eventually the algorithms and/or key sizes currently described in 728 this specification will no longer be considered sufficiently secure 729 and will be removed. Therefore, implementers and deployments must be 730 prepared for this eventuality. 732 8. Open Issues and Things To Be Done (TBD) 734 The following items remain to be done in this draft: 736 o Find values for encryption algorithm cross-reference table 737 currently listed as "TBD" or determine that they do not exist. 739 9. References 741 9.1. Normative References 743 [FIPS.180-3] 744 National Institute of Standards and Technology, "Secure 745 Hash Standard (SHS)", FIPS PUB 180-3, October 2008. 747 [FIPS.186-3] 748 National Institute of Standards and Technology, "Digital 749 Signature Standard (DSS)", FIPS PUB 186-3, June 2009. 751 [FIPS.197] 752 National Institute of Standards and Technology (NIST), 753 "Advanced Encryption Standard (AES)", FIPS PUB 197, 754 November 2001. 756 [JWE] Jones, M., Rescorla, E., and J. Hildebrand, "JSON Web 757 Encryption (JWE)", May 2012. 759 [JWK] Jones, M., "JSON Web Key (JWK)", May 2012. 761 [JWS] Jones, M., Bradley, J., and N. Sakimura, "JSON Web 762 Signature (JWS)", May 2012. 764 [NIST.800-38A] 765 National Institute of Standards and Technology (NIST), 766 "Recommendation for Block Cipher Modes of Operation", 767 NIST PUB 800-38A, December 2001. 769 [NIST.800-38D] 770 National Institute of Standards and Technology (NIST), 771 "Recommendation for Block Cipher Modes of Operation: 772 Galois/Counter Mode (GCM) and GMAC", NIST PUB 800-38D, 773 December 2001. 775 [NIST.800-56A] 776 National Institute of Standards and Technology (NIST), 777 "Recommendation for Pair-Wise Key Establishment Schemes 778 Using Discrete Logarithm Cryptography (Revised)", NIST PUB 779 800-56A, March 2007. 781 [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 782 Extensions (MIME) Part One: Format of Internet Message 783 Bodies", RFC 2045, November 1996. 785 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 786 Hashing for Message Authentication", RFC 2104, 787 February 1997. 789 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 790 Requirement Levels", BCP 14, RFC 2119, March 1997. 792 [RFC3394] Schaad, J. and R. Housley, "Advanced Encryption Standard 793 (AES) Key Wrap Algorithm", RFC 3394, September 2002. 795 [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography 796 Standards (PKCS) #1: RSA Cryptography Specifications 797 Version 2.1", RFC 3447, February 2003. 799 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 800 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 801 May 2008. 803 [RFC6090] McGrew, D., Igoe, K., and M. Salter, "Fundamental Elliptic 804 Curve Cryptography Algorithms", RFC 6090, February 2011. 806 9.2. Informative References 808 [CanvasApp] 809 Facebook, "Canvas Applications", 2010. 811 [I-D.rescorla-jsms] 812 Rescorla, E. and J. Hildebrand, "JavaScript Message 813 Security Format", draft-rescorla-jsms-00 (work in 814 progress), March 2011. 816 [JCA] Oracle, "Java Cryptography Architecture", 2011. 818 [JSE] Bradley, J. and N. Sakimura (editor), "JSON Simple 819 Encryption", September 2010. 821 [JSS] Bradley, J. and N. Sakimura (editor), "JSON Simple Sign", 822 September 2010. 824 [MagicSignatures] 825 Panzer (editor), J., Laurie, B., and D. Balfanz, "Magic 826 Signatures", January 2011. 828 [RFC3275] Eastlake, D., Reagle, J., and D. Solo, "(Extensible Markup 829 Language) XML-Signature Syntax and Processing", RFC 3275, 830 March 2002. 832 [W3C.CR-xmldsig-core2-20120124] 833 Eastlake, D., Reagle, J., Yiu, K., Solo, D., Datta, P., 834 Hirsch, F., Cantor, S., and T. Roessler, "XML Signature 835 Syntax and Processing Version 2.0", World Wide Web 836 Consortium CR CR-xmldsig-core2-20120124, January 2012, 837 . 839 [W3C.CR-xmlenc-core1-20120313] 840 Eastlake, D., Reagle, J., Roessler, T., and F. Hirsch, 841 "XML Encryption Syntax and Processing Version 1.1", World 842 Wide Web Consortium CR CR-xmlenc-core1-20120313, 843 March 2012, 844 . 846 [W3C.REC-xmlenc-core-20021210] 847 Eastlake, D. and J. Reagle, "XML Encryption Syntax and 848 Processing", World Wide Web Consortium Recommendation REC- 849 xmlenc-core-20021210, December 2002, 850 . 852 Appendix A. Digital Signature/MAC Algorithm Identifier Cross-Reference 854 This appendix contains a table cross-referencing the digital 855 signature and MAC "alg" (algorithm) values used in this specification 856 with the equivalent identifiers used by other standards and software 857 packages. See XML DSIG [RFC3275], XML DSIG 2.0 858 [W3C.CR-xmldsig-core2-20120124], and Java Cryptography Architecture 859 [JCA] for more information about the names defined by those 860 documents. 862 +-------+-----+----------------------------+----------+-------------+ 863 | Algor | JWS | XML DSIG | JCA | OID | 864 | ithm | | | | | 865 +-------+-----+----------------------------+----------+-------------+ 866 | HMAC | HS2 | http://www.w3.org/2001/04/ | HmacSHA2 | 1.2.840.113 | 867 | using | 56 | xmldsig-more#hmac-sha256 | 56 | 549.2.9 | 868 | SHA-2 | | | | | 869 | 56 | | | | | 870 | hash | | | | | 871 | algo | | | | | 872 | rithm | | | | | 873 | HMAC | HS3 | http://www.w3.org/2001/04/ | HmacSHA3 | 1.2.840.113 | 874 | using | 84 | xmldsig-more#hmac-sha384 | 84 | 549.2.10 | 875 | SHA-3 | | | | | 876 | 84 | | | | | 877 | hash | | | | | 878 | algo | | | | | 879 | rithm | | | | | 880 | HMAC | HS5 | http://www.w3.org/2001/04/ | HmacSHA5 | 1.2.840.113 | 881 | using | 12 | xmldsig-more#hmac-sha512 | 12 | 549.2.11 | 882 | SHA-5 | | | | | 883 | 12 | | | | | 884 | hash | | | | | 885 | algo | | | | | 886 | rithm | | | | | 887 | RSA | RS2 | http://www.w3.org/2001/04/ | SHA256wi | 1.2.840.113 | 888 | using | 56 | xmldsig-more#rsa-sha256 | thRSA | 549.1.1.11 | 889 | SHA-2 | | | | | 890 | 56 | | | | | 891 | hash | | | | | 892 | algo | | | | | 893 | rithm | | | | | 894 | RSA | RS3 | http://www.w3.org/2001/04/ | SHA384wi | 1.2.840.113 | 895 | using | 84 | xmldsig-more#rsa-sha384 | thRSA | 549.1.1.12 | 896 | SHA-3 | | | | | 897 | 84 | | | | | 898 | hash | | | | | 899 | algo | | | | | 900 | rithm | | | | | 901 | RSA | RS5 | http://www.w3.org/2001/04/ | SHA512wi | 1.2.840.113 | 902 | using | 12 | xmldsig-more#rsa-sha512 | thRSA | 549.1.1.13 | 903 | SHA-5 | | | | | 904 | 12 | | | | | 905 | hash | | | | | 906 | algo | | | | | 907 | rithm | | | | | 908 | ECDSA | ES2 | http://www.w3.org/2001/04/ | SHA256wi | 1.2.840.100 | 909 | using | 56 | xmldsig-more#ecdsa-sha256 | thECDSA | 45.4.3.2 | 910 | P-256 | | | | | 911 | curve | | | | | 912 | and | | | | | 913 | SHA-2 | | | | | 914 | 56 | | | | | 915 | hash | | | | | 916 | algo | | | | | 917 | rithm | | | | | 918 | ECDSA | ES3 | http://www.w3.org/2001/04/ | SHA384wi | 1.2.840.100 | 919 | using | 84 | xmldsig-more#ecdsa-sha384 | thECDSA | 45.4.3.3 | 920 | P-384 | | | | | 921 | curve | | | | | 922 | and | | | | | 923 | SHA-3 | | | | | 924 | 84 | | | | | 925 | hash | | | | | 926 | algo | | | | | 927 | rithm | | | | | 928 | ECDSA | ES5 | http://www.w3.org/2001/04/ | SHA512wi | 1.2.840.100 | 929 | using | 12 | xmldsig-more#ecdsa-sha512 | thECDSA | 45.4.3.4 | 930 | P-521 | | | | | 931 | curve | | | | | 932 | and | | | | | 933 | SHA-5 | | | | | 934 | 12 | | | | | 935 | hash | | | | | 936 | algo | | | | | 937 | rithm | | | | | 938 +-------+-----+----------------------------+----------+-------------+ 940 Appendix B. Encryption Algorithm Identifier Cross-Reference 942 This appendix contains a table cross-referencing the "alg" 943 (algorithm) and "enc" (encryption method) values used in this 944 specification with the equivalent identifiers used by other standards 945 and software packages. See XML Encryption 946 [W3C.REC-xmlenc-core-20021210], XML Encryption 1.1 947 [W3C.CR-xmlenc-core1-20120313], and Java Cryptography Architecture 948 [JCA] for more information about the names defined by those 949 documents. 951 +---------+-------+---------------------------+---------------------+ 952 | Algorit | JWE | XML ENC | JCA | 953 | hm | | | | 954 +---------+-------+---------------------------+---------------------+ 955 | RSA | RSA1_ | http://www.w3.org/2001/04 | RSA/ECB/PKCS1Paddin | 956 | using | 5 | /xmlenc#rsa-1_5 | g | 957 | RSA-PKC | | | | 958 | S1-1.5 | | | | 959 | paddin | | | | 960 | g | | | | 961 | RSA | RSA-O | http://www.w3.org/2001/04 | RSA/ECB/OAEPWithSHA | 962 | using | AEP | /xmlenc#rsa-oaep-mgf1p | -1AndMGF1Padding | 963 | Optimal | | | | 964 | Asymmet | | | | 965 | ric | | | | 966 | Encryp | | | | 967 | tion | | | | 968 | Paddi | | | | 969 | ng(OAEP | | | | 970 | ) | | | | 971 | Ellipti | ECDH- | http://www.w3.org/2009/xm | TBD | 972 | cCurve | ES | lenc11#ECDH-ES | | 973 | Diffie | | | | 974 | -Hellma | | | | 975 | n Ephem | | | | 976 | eral | | | | 977 | Stat | | | | 978 | ic | | | | 979 | Advance | A128K | http://www.w3.org/2001/04 | TBD | 980 | d | W | /xmlenc#kw-aes128 | | 981 | Encryp | | | | 982 | tion | | | | 983 | Stand | | | | 984 | ard(AES | | | | 985 | ) Key | | | | 986 | Wrap | | | | 987 | Algo | | | | 988 | rithm R | | | | 989 | FC 339 | | | | 990 | 4 [RF | | | | 991 | C3394] | | | | 992 | using12 | | | | 993 | 8 bitke | | | | 994 | ys | | | | 995 | Advance | A256K | http://www.w3.org/2001/04 | TBD | 996 | d | W | /xmlenc#kw-aes256 | | 997 | Encryp | | | | 998 | tion | | | | 999 | Stand | | | | 1000 | ard(AES | | | | 1001 | ) Key | | | | 1002 | Wrap | | | | 1003 | Algo | | | | 1004 | rithm R | | | | 1005 | FC 339 | | | | 1006 | 4 [RF | | | | 1007 | C3394] | | | | 1008 | using25 | | | | 1009 | 6 bitke | | | | 1010 | ys | | | | 1011 | Advance | A128C | http://www.w3.org/2001/04 | AES/CBC/PKCS5Paddin | 1012 | d | BC | /xmlenc#aes128-cbc | g | 1013 | Encryp | | | | 1014 | tion | | | | 1015 | Stand | | | | 1016 | ard(AES | | | | 1017 | ) usin | | | | 1018 | g 128 | | | | 1019 | bitkeys | | | | 1020 | inCiph | | | | 1021 | er Bloc | | | | 1022 | k Chai | | | | 1023 | ning(CB | | | | 1024 | C) mod | | | | 1025 | e usi | | | | 1026 | ng PKC | | | | 1027 | S #5pad | | | | 1028 | ding | | | | 1029 | Advance | A256C | http://www.w3.org/2001/04 | AES/CBC/PKCS5Paddin | 1030 | d | BC | /xmlenc#aes256-cbc | g | 1031 | Encryp | | | | 1032 | tion | | | | 1033 | Stand | | | | 1034 | ard(AES | | | | 1035 | ) usin | | | | 1036 | g 256 | | | | 1037 | bitkeys | | | | 1038 | inCiph | | | | 1039 | er Bloc | | | | 1040 | k Chai | | | | 1041 | ning(CB | | | | 1042 | C) mod | | | | 1043 | e usi | | | | 1044 | ng PKC | | | | 1045 | S #5pad | | | | 1046 | ding | | | | 1047 | Advance | A128G | http://www.w3.org/2009/xm | AES/GCM/NoPadding | 1048 | d | CM | lenc11#aes128-gcm | | 1049 | Encryp | | | | 1050 | tion | | | | 1051 | Stand | | | | 1052 | ard(AES | | | | 1053 | ) usin | | | | 1054 | g 128 | | | | 1055 | bitkeys | | | | 1056 | inGalo | | | | 1057 | is/Coun | | | | 1058 | ter Mod | | | | 1059 | e (GC | | | | 1060 | M) | | | | 1061 | Advance | A256G | http://www.w3.org/2009/xm | AES/GCM/NoPadding | 1062 | d | CM | lenc11#aes256-gcm | | 1063 | Encryp | | | | 1064 | tion | | | | 1065 | Stand | | | | 1066 | ard(AES | | | | 1067 | ) usin | | | | 1068 | g 256 | | | | 1069 | bitkeys | | | | 1070 | inGalo | | | | 1071 | is/Coun | | | | 1072 | ter Mod | | | | 1073 | e (GC | | | | 1074 | M) | | | | 1075 +---------+-------+---------------------------+---------------------+ 1077 Appendix C. Acknowledgements 1079 Solutions for signing and encrypting JSON content were previously 1080 explored by Magic Signatures [MagicSignatures], JSON Simple Sign 1081 [JSS], Canvas Applications [CanvasApp], JSON Simple Encryption [JSE], 1082 and JavaScript Message Security Format [I-D.rescorla-jsms], all of 1083 which influenced this draft. Dirk Balfanz, John Bradley, Yaron Y. 1084 Goland, John Panzer, Nat Sakimura, and Paul Tarjan all made 1085 significant contributions to the design of this specification and its 1086 related specifications. 1088 Appendix D. Document History 1090 -02 1092 o For AES GCM, use the "additional authenticated data" parameter to 1093 provide integrity for the header, encrypted key, and ciphertext 1094 and use the resulting "authentication tag" value as the JWE 1095 Integrity Value. 1097 o Defined minimum required key sizes for algorithms without 1098 specified key sizes. 1100 o Defined KDF output key sizes. 1102 o Specified the use of PKCS #5 padding with AES-CBC. 1104 o Generalized text to allow key agreement to be employed as an 1105 alternative to key wrapping or key encryption. 1107 o Clarified that ECDH-ES is a key agreement algorithm. 1109 o Required implementation of AES-128-KW and AES-256-KW. 1111 o Removed the use of "A128GCM" and "A256GCM" for key wrapping. 1113 o Removed "A512KW" since it turns out that it's not a standard 1114 algorithm. 1116 o Clarified the relationship between "typ" header parameter values 1117 and MIME types. 1119 o Generalized language to refer to Message Authentication Codes 1120 (MACs) rather than Hash-based Message Authentication Codes (HMACs) 1121 unless in a context specific to HMAC algorithms. 1123 o Established registries: JSON Web Signature and Encryption Header 1124 Parameters, JSON Web Signature and Encryption Algorithms, JSON Web 1125 Signature and Encryption "typ" Values, JSON Web Key Parameters, 1126 and JSON Web Key Algorithm Families. 1128 o Moved algorithm-specific definitions from JWK to JWA. 1130 o Reformatted to give each member definition its own section 1131 heading. 1133 -01 1135 o Moved definition of "alg":"none" for JWSs here from the JWT 1136 specification since this functionality is likely to be useful in 1137 more contexts that just for JWTs. 1139 o Added Advanced Encryption Standard (AES) Key Wrap Algorithm using 1140 512 bit keys ("A512KW"). 1142 o Added text "Alternatively, the Encoded JWS Signature MAY be 1143 base64url decoded to produce the JWS Signature and this value can 1144 be compared with the computed HMAC value, as this comparison 1145 produces the same result as comparing the encoded values". 1147 o Corrected the Magic Signatures reference. 1149 o Made other editorial improvements suggested by JOSE working group 1150 participants. 1152 -00 1154 o Created the initial IETF draft based upon 1155 draft-jones-json-web-signature-04 and 1156 draft-jones-json-web-encryption-02 with no normative changes. 1158 o Changed terminology to no longer call both digital signatures and 1159 HMACs "signatures". 1161 Author's Address 1163 Michael B. Jones 1164 Microsoft 1166 Email: mbj@microsoft.com 1167 URI: http://self-issued.info/