idnits 2.17.1 draft-ietf-jose-json-web-algorithms-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 : ---------------------------------------------------------------------------- == 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 (January 16, 2012) is 4477 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. 'FIPS-197' -- Possible downref: Non-RFC (?) normative reference: ref. 'JWE' -- Possible downref: Non-RFC (?) normative reference: ref. 'JWS' -- Possible downref: Non-RFC (?) normative reference: ref. 'NIST-800-38A' -- Possible downref: Non-RFC (?) normative reference: ref. 'NIST-800-38D' -- Possible downref: Non-RFC (?) normative reference: ref. 'NIST-800-56A' ** 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 (==), 7 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 January 16, 2012 5 Expires: July 19, 2012 7 JSON Web Algorithms (JWA) 8 draft-ietf-jose-json-web-algorithms-00 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 July 19, 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 . . . . . . . . . . . . . . . . . . . . . . . . . 3 57 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 58 3. Cryptographic Algorithms for JWS . . . . . . . . . . . . . . . 3 59 3.1. Creating a JWS with HMAC SHA-256, HMAC SHA-384, or 60 HMAC SHA-512 . . . . . . . . . . . . . . . . . . . . . . . 4 61 3.2. Creating a JWS with RSA SHA-256, RSA SHA-384, or RSA 62 SHA-512 . . . . . . . . . . . . . . . . . . . . . . . . . 5 63 3.3. Creating a JWS with ECDSA P-256 SHA-256, ECDSA P-384 64 SHA-384, or ECDSA P-521 SHA-512 . . . . . . . . . . . . . 6 65 3.4. Additional Digital Signature/HMAC Algorithms . . . . . . . 7 66 4. Cryptographic Algorithms for JWE . . . . . . . . . . . . . . . 7 67 4.1. Encrypting a JWE with TBD . . . . . . . . . . . . . . . . 9 68 4.2. Additional Encryption Algorithms . . . . . . . . . . . . . 9 69 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 70 6. Security Considerations . . . . . . . . . . . . . . . . . . . 10 71 7. Open Issues and Things To Be Done (TBD) . . . . . . . . . . . 10 72 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 11 73 8.1. Normative References . . . . . . . . . . . . . . . . . . . 11 74 8.2. Informative References . . . . . . . . . . . . . . . . . . 12 75 Appendix A. Digital Signature/HMAC Algorithm Identifier 76 Cross-Reference . . . . . . . . . . . . . . . . . . . 13 77 Appendix B. Encryption Algorithm Identifier Cross-Reference . . . 15 78 Appendix C. Acknowledgements . . . . . . . . . . . . . . . . . . 18 79 Appendix D. Document History . . . . . . . . . . . . . . . . . . 18 80 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 18 82 1. Introduction 84 The JSON Web Algorithms (JWA) specification enumerates cryptographic 85 algorithms and identifiers to be used with the JSON Web Signature 86 (JWS) [JWS] and JSON Web Encryption (JWE) [JWE] specifications. 87 Enumerating the algorithms and identifiers for them in this 88 specification, rather than in the JWS and JWE specifications, is 89 intended to allow them to remain unchanged in the face of changes in 90 the set of required, recommended, optional, and deprecated algorithms 91 over time. This specification also describes the semantics and 92 operations that are specific to these algorithms and algorithm 93 families. 95 2. Terminology 97 This specification uses the terminology defined by the JSON Web 98 Signature (JWS) [JWS] and JSON Web Encryption (JWE) [JWE] 99 specifications. 101 3. Cryptographic Algorithms for JWS 103 JWS uses cryptographic algorithms to sign the contents of the JWS 104 Header and the JWS Payload. The use of the following algorithms for 105 producing JWSs is defined in this section. 107 The table below Table 1 is the set of "alg" (algorithm) header 108 parameter values defined by this specification for use with JWS, each 109 of which is explained in more detail in the following sections: 111 +--------------------+----------------------------------------------+ 112 | Alg Parameter | Algorithm | 113 | Value | | 114 +--------------------+----------------------------------------------+ 115 | HS256 | HMAC using SHA-256 hash algorithm | 116 | HS384 | HMAC using SHA-384 hash algorithm | 117 | HS512 | HMAC using SHA-512 hash algorithm | 118 | RS256 | RSA using SHA-256 hash algorithm | 119 | RS384 | RSA using SHA-384 hash algorithm | 120 | RS512 | RSA using SHA-512 hash algorithm | 121 | ES256 | ECDSA using P-256 curve and SHA-256 hash | 122 | | algorithm | 123 | ES384 | ECDSA using P-384 curve and SHA-384 hash | 124 | | algorithm | 125 | ES512 | ECDSA using P-521 curve and SHA-512 hash | 126 | | algorithm | 127 +--------------------+----------------------------------------------+ 128 Table 1: JWS Defined "alg" Parameter Values 130 See Appendix A for a table cross-referencing the digital signature 131 and HMAC "alg" (algorithm) values used in this specification with the 132 equivalent identifiers used by other standards and software packages. 134 Of these algorithms, only HMAC SHA-256 MUST be implemented by 135 conforming JWS implementations. It is RECOMMENDED that 136 implementations also support the RSA SHA-256 and ECDSA P-256 SHA-256 137 algorithms. Support for other algorithms and key sizes is OPTIONAL. 139 3.1. Creating a JWS with HMAC SHA-256, HMAC SHA-384, or HMAC SHA-512 141 Hash based Message Authentication Codes (HMACs) enable one to use a 142 secret plus a cryptographic hash function to generate a Message 143 Authentication Code (MAC). This can be used to demonstrate that the 144 MAC matches the hashed content, in this case the JWS Secured Input, 145 which therefore demonstrates that whoever generated the MAC was in 146 possession of the secret. The means of exchanging the shared key is 147 outside the scope of this specification. 149 The algorithm for implementing and validating HMACs is provided in 150 RFC 2104 [RFC2104]. This section defines the use of the HMAC SHA- 151 256, HMAC SHA-384, and HMAC SHA-512 cryptographic hash functions as 152 defined in FIPS 180-3 [FIPS.180-3]. The "alg" (algorithm) header 153 parameter values "HS256", "HS384", and "HS512" are used in the JWS 154 Header to indicate that the Encoded JWS Signature contains a 155 base64url encoded HMAC value using the respective hash function. 157 The HMAC SHA-256 MAC is generated as follows: 159 1. Apply the HMAC SHA-256 algorithm to the UTF-8 representation of 160 the JWS Secured Input using the shared key to produce an HMAC 161 value. 163 2. Base64url encode the resulting HMAC value. 165 The output is the Encoded JWS Signature for that JWS. 167 The HMAC SHA-256 MAC for a JWS is validated as follows: 169 1. Apply the HMAC SHA-256 algorithm to the UTF-8 representation of 170 the JWS Secured Input of the JWS using the shared key. 172 2. Base64url encode the resulting HMAC value. 174 3. If the JWS Signature and the base64url encoded HMAC value exactly 175 match, then one has confirmation that the shared key was used to 176 generate the HMAC on the JWS and that the contents of the JWS 177 have not be tampered with. 179 4. If the validation fails, the JWS MUST be rejected. 181 Securing content with the HMAC SHA-384 and HMAC SHA-512 algorithms is 182 performed identically to the procedure for HMAC SHA-256 - just with 183 correspondingly longer key and result values. 185 3.2. Creating a JWS with RSA SHA-256, RSA SHA-384, or RSA SHA-512 187 This section defines the use of the RSASSA-PKCS1-v1_5 digital 188 signature algorithm as defined in RFC 3447 [RFC3447], Section 8.2 189 (commonly known as PKCS#1), using SHA-256, SHA-384, or SHA-512 as the 190 hash function. The RSASSA-PKCS1-v1_5 algorithm is described in FIPS 191 186-3 [FIPS.186-3], Section 5.5, and the SHA-256, SHA-384, and SHA- 192 512 cryptographic hash functions are defined in FIPS 180-3 193 [FIPS.180-3]. The "alg" (algorithm) header parameter values "RS256", 194 "RS384", and "RS512" are used in the JWS Header to indicate that the 195 Encoded JWS Signature contains a base64url encoded RSA digital 196 signature using the respective hash function. 198 A 2048-bit or longer key length MUST be used with this algorithm. 200 The RSA SHA-256 digital signature is generated as follows: 202 1. Generate a digital signature of the UTF-8 representation of the 203 JWS Secured Input using RSASSA-PKCS1-V1_5-SIGN and the SHA-256 204 hash function with the desired private key. The output will be a 205 byte array. 207 2. Base64url encode the resulting byte array. 209 The output is the Encoded JWS Signature for that JWS. 211 The RSA SHA-256 digital signature for a JWS is validated as follows: 213 1. Take the Encoded JWS Signature and base64url decode it into a 214 byte array. If decoding fails, the JWS MUST be rejected. 216 2. Submit the UTF-8 representation of the JWS Secured Input and the 217 public key corresponding to the private key used by the signer to 218 the RSASSA-PKCS1-V1_5-VERIFY algorithm using SHA-256 as the hash 219 function. 221 3. If the validation fails, the JWS MUST be rejected. 223 Signing with the RSA SHA-384 and RSA SHA-512 algorithms is performed 224 identically to the procedure for RSA SHA-256 - just with 225 correspondingly longer key and result values. 227 3.3. Creating a JWS with ECDSA P-256 SHA-256, ECDSA P-384 SHA-384, or 228 ECDSA P-521 SHA-512 230 The Elliptic Curve Digital Signature Algorithm (ECDSA) is defined by 231 FIPS 186-3 [FIPS.186-3]. ECDSA provides for the use of Elliptic 232 Curve cryptography, which is able to provide equivalent security to 233 RSA cryptography but using shorter key lengths and with greater 234 processing speed. This means that ECDSA digital signatures will be 235 substantially smaller in terms of length than equivalently strong RSA 236 digital signatures. 238 This specification defines the use of ECDSA with the P-256 curve and 239 the SHA-256 cryptographic hash function, ECDSA with the P-384 curve 240 and the SHA-384 hash function, and ECDSA with the P-521 curve and the 241 SHA-512 hash function. The P-256, P-384, and P-521 curves are also 242 defined in FIPS 186-3. The "alg" (algorithm) header parameter values 243 "ES256", "ES384", and "ES512" are used in the JWS Header to indicate 244 that the Encoded JWS Signature contains a base64url encoded ECDSA 245 P-256 SHA-256, ECDSA P-384 SHA-384, or ECDSA P-521 SHA-512 digital 246 signature, respectively. 248 The ECDSA P-256 SHA-256 digital signature is generated as follows: 250 1. Generate a digital signature of the UTF-8 representation of the 251 JWS Secured Input using ECDSA P-256 SHA-256 with the desired 252 private key. The output will be the EC point (R, S), where R and 253 S are unsigned integers. 255 2. Turn R and S into byte arrays in big endian order. Each array 256 will be 32 bytes long. 258 3. Concatenate the two byte arrays in the order R and then S. 260 4. Base64url encode the resulting 64 byte array. 262 The output is the Encoded JWS Signature for the JWS. 264 The ECDSA P-256 SHA-256 digital signature for a JWS is validated as 265 follows: 267 1. Take the Encoded JWS Signature and base64url decode it into a 268 byte array. If decoding fails, the JWS MUST be rejected. 270 2. The output of the base64url decoding MUST be a 64 byte array. 272 3. Split the 64 byte array into two 32 byte arrays. The first array 273 will be R and the second S. Remember that the byte arrays are in 274 big endian byte order; please check the ECDSA validator in use to 275 see what byte order it requires. 277 4. Submit the UTF-8 representation of the JWS Secured Input, R, S 278 and the public key (x, y) to the ECDSA P-256 SHA-256 validator. 280 5. If the validation fails, the JWS MUST be rejected. 282 The ECDSA validator will then determine if the digital signature is 283 valid, given the inputs. Note that ECDSA digital signature contains 284 a value referred to as K, which is a random number generated for each 285 digital signature instance. This means that two ECDSA digital 286 signatures using exactly the same input parameters will output 287 different signature values because their K values will be different. 288 The consequence of this is that one must validate an ECDSA digital 289 signature by submitting the previously specified inputs to an ECDSA 290 validator. 292 Signing with the ECDSA P-384 SHA-384 and ECDSA P-521 SHA-512 293 algorithms is performed identically to the procedure for ECDSA P-256 294 SHA-256 - just with correspondingly longer key and result values. 296 3.4. Additional Digital Signature/HMAC Algorithms 298 Additional algorithms MAY be used to protect JWSs with corresponding 299 "alg" (algorithm) header parameter values being defined to refer to 300 them. New "alg" header parameter values SHOULD either be defined in 301 the IANA JSON Web Signature Algorithms registry or be a URI that 302 contains a collision resistant namespace. In particular, it is 303 permissible to use the algorithm identifiers defined in XML DSIG 304 [RFC3275] and related specifications as "alg" values. 306 4. Cryptographic Algorithms for JWE 308 JWE uses cryptographic algorithms to encrypt the Content Encryption 309 Key (CEK) and the Plaintext. This section specifies a set of 310 specific algorithms for these purposes. 312 The table below Table 2 is the set of "alg" (algorithm) header 313 parameter values that are defined by this specification for use with 314 JWE. These algorithms are used to encrypt the CEK, which produces 315 the JWE Encrypted Key. 317 +-----------+-------------------------------------------------------+ 318 | alg | Encryption Algorithm | 319 | Parameter | | 320 | Value | | 321 +-----------+-------------------------------------------------------+ 322 | RSA1_5 | RSA using RSA-PKCS1-1.5 padding, as defined in RFC | 323 | | 3447 [RFC3447] | 324 | RSA-OAEP | RSA using Optimal Asymmetric Encryption Padding | 325 | | (OAEP), as defined in RFC 3447 [RFC3447] | 326 | ECDH-ES | Elliptic Curve Diffie-Hellman Ephemeral Static, as | 327 | | defined in RFC 6090 [RFC6090], and using the Concat | 328 | | KDF, as defined in [NIST-800-56A], where the Digest | 329 | | Method is SHA-256 | 330 | A128KW | Advanced Encryption Standard (AES) Key Wrap Algorithm | 331 | | using 128 bit keys, as defined in RFC 3394 [RFC3394] | 332 | A256KW | Advanced Encryption Standard (AES) Key Wrap Algorithm | 333 | | using 256 bit keys, as defined in RFC 3394 [RFC3394] | 334 | A128GCM | Advanced Encryption Standard (AES) using 128 bit keys | 335 | | in Galois/Counter Mode, as defined in [FIPS-197] and | 336 | | [NIST-800-38D] | 337 | A256GCM | Advanced Encryption Standard (AES) using 256 bit keys | 338 | | in Galois/Counter Mode, as defined in [FIPS-197] and | 339 | | [NIST-800-38D] | 340 +-----------+-------------------------------------------------------+ 342 Table 2: JWE Defined "alg" Parameter Values 344 The table below Table 3 is the set of "enc" (encryption method) 345 header parameter values that are defined by this specification for 346 use with JWE. These algorithms are used to encrypt the Plaintext, 347 which produces the Ciphertext. 349 +-----------+-------------------------------------------------------+ 350 | enc | Symmetric Encryption Algorithm | 351 | Parameter | | 352 | Value | | 353 +-----------+-------------------------------------------------------+ 354 | A128CBC | Advanced Encryption Standard (AES) using 128 bit keys | 355 | | in Cipher Block Chaining mode, as defined in | 356 | | [FIPS-197] and [NIST-800-38A] | 357 | A256CBC | Advanced Encryption Standard (AES) using 256 bit keys | 358 | | in Cipher Block Chaining mode, as defined in | 359 | | [FIPS-197] and [NIST-800-38A] | 360 | A128GCM | Advanced Encryption Standard (AES) using 128 bit keys | 361 | | in Galois/Counter Mode, as defined in [FIPS-197] and | 362 | | [NIST-800-38D] | 363 | A256GCM | Advanced Encryption Standard (AES) using 256 bit keys | 364 | | in Galois/Counter Mode, as defined in [FIPS-197] and | 365 | | [NIST-800-38D] | 366 +-----------+-------------------------------------------------------+ 368 Table 3: JWE Defined "enc" Parameter Values 370 See Appendix B for a table cross-referencing the encryption "alg" 371 (algorithm) and "alg" (encryption method) values used in this 372 specification with the equivalent identifiers used by other standards 373 and software packages. 375 Of these algorithms, only RSA-PKCS1-1.5 with 2048 bit keys, AES-128- 376 CBC, and AES-256-CBC MUST be implemented by conforming JWE 377 implementations. It is RECOMMENDED that implementations also support 378 ECDH-ES with 256 bit keys, AES-128-GCM, and AES-256-GCM. Support for 379 other algorithms and key sizes is OPTIONAL. 381 4.1. Encrypting a JWE with TBD 383 TBD: Descriptions of the particulars of using each specified 384 encryption algorithm go here. 386 4.2. Additional Encryption Algorithms 388 Additional algorithms MAY be used to protect JWEs with corresponding 389 "alg" (algorithm) and "enc" (encryption method) header parameter 390 values being defined to refer to them. New "alg" and "enc" header 391 parameter values SHOULD either be defined in the IANA JSON Web 392 Encryption Algorithms registry or be a URI that contains a collision 393 resistant namespace. In particular, it is permissible to use the 394 algorithm identifiers defined in XML Encryption 395 [W3C.REC-xmlenc-core-20021210], XML Encryption 1.1 396 [W3C.CR-xmlenc-core1-20110303], and related specifications as "alg" 397 and "enc" values. 399 5. IANA Considerations 401 This specification calls for: 403 o A new IANA registry entitled "JSON Web Signature Algorithms" for 404 values of the JWS "alg" (algorithm) header parameter is defined in 405 Section 3.4. Inclusion in the registry is RFC Required in the RFC 406 5226 [RFC5226] sense. The registry will just record the "alg" 407 value and a pointer to the RFC that defines it. This 408 specification defines inclusion of the algorithm values defined in 409 Table 1. 411 o A new IANA registry entitled "JSON Web Encryption Algorithms" for 412 values used with the JWE "alg" (algorithm) and "enc" (encryption 413 method) header parameters is defined in Section 4.2. Inclusion in 414 the registry is RFC Required in the RFC 5226 [RFC5226] sense. The 415 registry will record the "alg" or "enc" value and a pointer to the 416 RFC that defines it. This specification defines inclusion of the 417 algorithm values defined in Table 2 and Table 3. 419 6. Security Considerations 421 TBD 423 7. Open Issues and Things To Be Done (TBD) 425 The following items remain to be done in this draft: 427 o Since RFC 3447 Section 8 explicitly calls for people NOT to adopt 428 RSASSA-PKCS1 for new applications and instead requests that people 429 transition to RSASSA-PSS, we probably need some Security 430 Considerations text explaining why RSASSA-PKCS1 is being used 431 (it's what's commonly implemented) and what the potential 432 consequences are. 434 o Consider having an algorithm that is a MAC using SHA-256 that 435 provides content integrity but for which there is no associated 436 secret. This would be like the JWT "alg":"none", in that no 437 validation of the authenticity content is performed but a checksum 438 is provided. 440 o Consider whether to define "alg":"none" here, rather than in the 441 JWT spec. 443 o Should we define the use of RFC 5649 key wrapping functions, which 444 allow arbitrary key sizes, in addition to the current use of RFC 445 3394 key wrapping functions, which require that keys be multiples 446 of 64 bits? Is this needed in practice? 448 o Decide whether to move the JWK algorithm family definitions "EC" 449 and "RSA" here. This would likely result in all the family- 450 specific parameter definitions also moving here ("crv", "x", "y", 451 "mod", "exp"), leaving very little normative text in the JWK spec 452 itself. This seems like it would reduce spec readability and so 453 was not done. 455 o It would be good to say somewhere, in normative language, that 456 eventually the algorithms and/or key sizes currently specified 457 will no longer be considered sufficiently secure and will be 458 removed. Therefore, implementers MUST be prepared for this 459 eventuality. 461 o Write the Security Considerations section. 463 8. References 465 8.1. Normative References 467 [FIPS-197] 468 National Institute of Standards and Technology (NIST), 469 "Advanced Encryption Standard (AES)", FIPS PUB 197, 470 November 2001. 472 [FIPS.180-3] 473 National Institute of Standards and Technology, "Secure 474 Hash Standard (SHS)", FIPS PUB 180-3, October 2008. 476 [FIPS.186-3] 477 National Institute of Standards and Technology, "Digital 478 Signature Standard (DSS)", FIPS PUB 186-3, June 2009. 480 [JWE] Jones, M., Rescorla, E., and J. Hildebrand, "JSON Web 481 Encryption (JWE)", January 2012. 483 [JWS] Jones, M., Bradley, J., and N. Sakimura, "JSON Web 484 Signature (JWS)", January 2012. 486 [NIST-800-38A] 487 National Institute of Standards and Technology (NIST), 488 "Recommendation for Block Cipher Modes of Operation", 489 NIST PUB 800-38A, December 2001. 491 [NIST-800-38D] 492 National Institute of Standards and Technology (NIST), 493 "Recommendation for Block Cipher Modes of Operation: 494 Galois/Counter Mode (GCM) and GMAC", NIST PUB 800-38D, 495 December 2001. 497 [NIST-800-56A] 498 National Institute of Standards and Technology (NIST), 499 "Recommendation for Pair-Wise Key Establishment Schemes 500 Using Discrete Logarithm Cryptography (Revised)", NIST PUB 501 800-56A, March 2007. 503 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 504 Hashing for Message Authentication", RFC 2104, 505 February 1997. 507 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 508 Requirement Levels", BCP 14, RFC 2119, March 1997. 510 [RFC3394] Schaad, J. and R. Housley, "Advanced Encryption Standard 511 (AES) Key Wrap Algorithm", RFC 3394, September 2002. 513 [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography 514 Standards (PKCS) #1: RSA Cryptography Specifications 515 Version 2.1", RFC 3447, February 2003. 517 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 518 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 519 May 2008. 521 [RFC6090] McGrew, D., Igoe, K., and M. Salter, "Fundamental Elliptic 522 Curve Cryptography Algorithms", RFC 6090, February 2011. 524 8.2. Informative References 526 [CanvasApp] 527 Facebook, "Canvas Applications", 2010. 529 [I-D.rescorla-jsms] 530 Rescorla, E. and J. Hildebrand, "JavaScript Message 531 Security Format", draft-rescorla-jsms-00 (work in 532 progress), March 2011. 534 [JCA] Oracle, "Java Cryptography Architecture", 2011. 536 [JSE] Bradley, J. and N. Sakimura (editor), "JSON Simple 537 Encryption", September 2010. 539 [JSS] Bradley, J. and N. Sakimura (editor), "JSON Simple Sign", 540 September 2010. 542 [MagicSignatures] 543 Panzer (editor), J., Laurie, B., and D. Balfanz, "Magic 544 Signatures", August 2010. 546 [RFC3275] Eastlake, D., Reagle, J., and D. Solo, "(Extensible Markup 547 Language) XML-Signature Syntax and Processing", RFC 3275, 548 March 2002. 550 [W3C.CR-xmlenc-core1-20110303] 551 Hirsch, F., Roessler, T., Reagle, J., and D. Eastlake, 552 "XML Encryption Syntax and Processing Version 1.1", World 553 Wide Web Consortium CR CR-xmlenc-core1-20110303, 554 March 2011, 555 . 557 [W3C.REC-xmlenc-core-20021210] 558 Eastlake, D. and J. Reagle, "XML Encryption Syntax and 559 Processing", World Wide Web Consortium Recommendation REC- 560 xmlenc-core-20021210, December 2002, 561 . 563 Appendix A. Digital Signature/HMAC Algorithm Identifier Cross-Reference 565 This appendix contains a table cross-referencing the digital 566 signature and HMAC "alg" (algorithm) values used in this 567 specification with the equivalent identifiers used by other standards 568 and software packages. See XML DSIG [RFC3275] and Java Cryptography 569 Architecture [JCA] for more information about the names defined by 570 those documents. 572 +-------+-----+----------------------------+----------+-------------+ 573 | Algor | JWS | XML DSIG | JCA | OID | 574 | ithm | | | | | 575 +-------+-----+----------------------------+----------+-------------+ 576 | HMAC | HS2 | http://www.w3.org/2001/04/ | HmacSHA2 | 1.2.840.113 | 577 | using | 56 | xmldsig-more#hmac-sha256 | 56 | 549.2.9 | 578 | SHA-2 | | | | | 579 | 56 | | | | | 580 | hash | | | | | 581 | algo | | | | | 582 | rithm | | | | | 583 | HMAC | HS3 | http://www.w3.org/2001/04/ | HmacSHA3 | 1.2.840.113 | 584 | using | 84 | xmldsig-more#hmac-sha384 | 84 | 549.2.10 | 585 | SHA-3 | | | | | 586 | 84 | | | | | 587 | hash | | | | | 588 | algo | | | | | 589 | rithm | | | | | 590 | HMAC | HS5 | http://www.w3.org/2001/04/ | HmacSHA5 | 1.2.840.113 | 591 | using | 12 | xmldsig-more#hmac-sha512 | 12 | 549.2.11 | 592 | SHA-5 | | | | | 593 | 12 | | | | | 594 | hash | | | | | 595 | algo | | | | | 596 | rithm | | | | | 597 | RSA | RS2 | http://www.w3.org/2001/04/ | SHA256wi | 1.2.840.113 | 598 | using | 56 | xmldsig-more#rsa-sha256 | thRSA | 549.1.1.11 | 599 | SHA-2 | | | | | 600 | 56 | | | | | 601 | hash | | | | | 602 | algo | | | | | 603 | rithm | | | | | 604 | RSA | RS3 | http://www.w3.org/2001/04/ | SHA384wi | 1.2.840.113 | 605 | using | 84 | xmldsig-more#rsa-sha384 | thRSA | 549.1.1.12 | 606 | SHA-3 | | | | | 607 | 84 | | | | | 608 | hash | | | | | 609 | algo | | | | | 610 | rithm | | | | | 611 | RSA | RS5 | http://www.w3.org/2001/04/ | SHA512wi | 1.2.840.113 | 612 | using | 12 | xmldsig-more#rsa-sha512 | thRSA | 549.1.1.13 | 613 | SHA-5 | | | | | 614 | 12 | | | | | 615 | hash | | | | | 616 | algo | | | | | 617 | rithm | | | | | 618 | ECDSA | ES2 | http://www.w3.org/2001/04/ | SHA256wi | 1.2.840.100 | 619 | using | 56 | xmldsig-more#ecdsa-sha256 | thECDSA | 45.4.3.2 | 620 | P-256 | | | | | 621 | curve | | | | | 622 | and | | | | | 623 | SHA-2 | | | | | 624 | 56 | | | | | 625 | hash | | | | | 626 | algo | | | | | 627 | rithm | | | | | 628 | ECDSA | ES3 | http://www.w3.org/2001/04/ | SHA384wi | 1.2.840.100 | 629 | using | 84 | xmldsig-more#ecdsa-sha384 | thECDSA | 45.4.3.3 | 630 | P-384 | | | | | 631 | curve | | | | | 632 | and | | | | | 633 | SHA-3 | | | | | 634 | 84 | | | | | 635 | hash | | | | | 636 | algo | | | | | 637 | rithm | | | | | 638 | ECDSA | ES5 | http://www.w3.org/2001/04/ | SHA512wi | 1.2.840.100 | 639 | using | 12 | xmldsig-more#ecdsa-sha512 | thECDSA | 45.4.3.4 | 640 | P-521 | | | | | 641 | curve | | | | | 642 | and | | | | | 643 | SHA-5 | | | | | 644 | 12 | | | | | 645 | hash | | | | | 646 | algo | | | | | 647 | rithm | | | | | 648 +-------+-----+----------------------------+----------+-------------+ 650 Table 4: Digital Signature/HMAC Algorithm Identifier Cross-Reference 652 Appendix B. Encryption Algorithm Identifier Cross-Reference 654 This appendix contains a table cross-referencing the "alg" 655 (algorithm) and "enc" (encryption method) values used in this 656 specification with the equivalent identifiers used by other standards 657 and software packages. See XML Encryption 658 [W3C.REC-xmlenc-core-20021210], XML Encryption 1.1 659 [W3C.CR-xmlenc-core1-20110303], and Java Cryptography Architecture 660 [JCA] for more information about the names defined by those 661 documents. 663 +---------+-------+---------------------------+---------------------+ 664 | Algorit | JWE | XML ENC | JCA | 665 | hm | | | | 666 +---------+-------+---------------------------+---------------------+ 667 | RSA | RSA1_ | http://www.w3.org/2001/04 | RSA/ECB/PKCS1Paddin | 668 | using | 5 | /xmlenc#rsa-1_5 | g | 669 | RSA-PKC | | | | 670 | S1-1.5 | | | | 671 | paddin | | | | 672 | g | | | | 673 | RSA | RSA-O | http://www.w3.org/2001/04 | RSA/ECB/OAEPWithSHA | 674 | using | AEP | /xmlenc#rsa-oaep-mgf1p | -1AndMGF1Padding | 675 | Optimal | | | | 676 | Asymmet | | | | 677 | ric | | | | 678 | Encryp | | | | 679 | tion | | | | 680 | Paddi | | | | 681 | ng(OAEP | | | | 682 | ) | | | | 683 | Ellipti | ECDH- | http://www.w3.org/2009/xm | TBD | 684 | cCurve | ES | lenc11#ECDH-ES | | 685 | Diffie | | | | 686 | -Hellma | | | | 687 | n Ephem | | | | 688 | eral | | | | 689 | Stat | | | | 690 | ic | | | | 691 | Advance | A128K | http://www.w3.org/2001/04 | TBD | 692 | d | W | /xmlenc#kw-aes128 | | 693 | Encryp | | | | 694 | tion | | | | 695 | Stand | | | | 696 | ard(AES | | | | 697 | ) Key | | | | 698 | Wrap | | | | 699 | Algo | | | | 700 | rithm R | | | | 701 | FC 339 | | | | 702 | 4 [RF | | | | 703 | C3394] | | | | 704 | using12 | | | | 705 | 8 bitke | | | | 706 | ys | | | | 707 | Advance | A256K | http://www.w3.org/2001/04 | TBD | 708 | d | W | /xmlenc#kw-aes256 | | 709 | Encryp | | | | 710 | tion | | | | 711 | Stand | | | | 712 | ard(AES | | | | 713 | ) Key | | | | 714 | Wrap | | | | 715 | Algo | | | | 716 | rithm R | | | | 717 | FC 339 | | | | 718 | 4 [RF | | | | 719 | C3394] | | | | 720 | using25 | | | | 721 | 6 bitke | | | | 722 | ys | | | | 723 | Advance | A128C | http://www.w3.org/2001/04 | AES/CBC/PKCS5Paddin | 724 | d | BC | /xmlenc#aes128-cbc | g | 725 | Encryp | | | | 726 | tion | | | | 727 | Stand | | | | 728 | ard(AES | | | | 729 | ) usin | | | | 730 | g 128 | | | | 731 | bitkeys | | | | 732 | inCiph | | | | 733 | er Bloc | | | | 734 | k Chai | | | | 735 | ningmod | | | | 736 | e | | | | 737 | Advance | A256C | http://www.w3.org/2001/04 | AES/CBC/PKCS5Paddin | 738 | d | BC | /xmlenc#aes256-cbc | g | 739 | Encryp | | | | 740 | tion | | | | 741 | Stand | | | | 742 | ard(AES | | | | 743 | ) usin | | | | 744 | g 256 | | | | 745 | bitkeys | | | | 746 | inCiph | | | | 747 | er Bloc | | | | 748 | k Chai | | | | 749 | ningmod | | | | 750 | e | | | | 751 | Advance | A128G | http://www.w3.org/2009/xm | AES/GCM/NoPadding | 752 | d | CM | lenc11#aes128-gcm | | 753 | Encryp | | | | 754 | tion | | | | 755 | Stand | | | | 756 | ard(AES | | | | 757 | ) usin | | | | 758 | g 128 | | | | 759 | bitkeys | | | | 760 | inGalo | | | | 761 | is/Coun | | | | 762 | ter Mod | | | | 763 | e | | | | 764 | Advance | A256G | http://www.w3.org/2009/xm | AES/GCM/NoPadding | 765 | d | CM | lenc11#aes256-gcm | | 766 | Encryp | | | | 767 | tion | | | | 768 | Stand | | | | 769 | ard(AES | | | | 770 | ) usin | | | | 771 | g 256 | | | | 772 | bitkeys | | | | 773 | inGalo | | | | 774 | is/Coun | | | | 775 | ter Mod | | | | 776 | e | | | | 777 +---------+-------+---------------------------+---------------------+ 779 Table 5: Encryption Algorithm Identifier Cross-Reference 781 Appendix C. Acknowledgements 783 Solutions for signing and encrypting JSON content were previously 784 explored by Magic Signatures [MagicSignatures], JSON Simple Sign 785 [JSS], Canvas Applications [CanvasApp], JSON Simple Encryption [JSE], 786 and JavaScript Message Security Format [I-D.rescorla-jsms], all of 787 which influenced this draft. Dirk Balfanz, John Bradley, Yaron Y. 788 Goland, John Panzer, Nat Sakimura, and Paul Tarjan all made 789 significant contributions to the design of this specification and its 790 related specifications. 792 Appendix D. Document History 794 -00 796 o Created the initial IETF draft based upon 797 draft-jones-json-web-signature-04 and 798 draft-jones-json-web-encryption-02 with no normative changes. 800 o Changed terminology to no longer call both digital signatures and 801 HMACs "signatures". 803 Author's Address 805 Michael B. Jones 806 Microsoft 808 Email: mbj@microsoft.com 809 URI: http://self-issued.info/