<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en"><head><title>JSON Web Algorithms (JWA)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="JSON Web Algorithms (JWA)">
<meta name="keywords" content="RFC, Request for Comments, I-D, Internet-Draft, JavaScript Object Notation, JSON, JSON Web Token, JWT, JSON Web Signature, JWS, JSON Web Encryption, JWE, JSON Web Key, JWK, JSON Web Algorithms, JWA">
<meta name="generator" content="xml2rfc v1.36 (http://xml.resource.org/)">
<style type='text/css'><!--
        body {
                font-family: verdana, charcoal, helvetica, arial, sans-serif;
                font-size: small; color: #000; background-color: #FFF;
                margin: 2em;
        }
        h1, h2, h3, h4, h5, h6 {
                font-family: helvetica, monaco, "MS Sans Serif", arial, sans-serif;
                font-weight: bold; font-style: normal;
        }
        h1 { color: #900; background-color: transparent; text-align: right; }
        h3 { color: #333; background-color: transparent; }

        td.RFCbug {
                font-size: x-small; text-decoration: none;
                width: 30px; height: 30px; padding-top: 2px;
                text-align: justify; vertical-align: middle;
                background-color: #000;
        }
        td.RFCbug span.RFC {
                font-family: monaco, charcoal, geneva, "MS Sans Serif", helvetica, verdana, sans-serif;
                font-weight: bold; color: #666;
        }
        td.RFCbug span.hotText {
                font-family: charcoal, monaco, geneva, "MS Sans Serif", helvetica, verdana, sans-serif;
                font-weight: normal; text-align: center; color: #FFF;
        }

        table.TOCbug { width: 30px; height: 15px; }
        td.TOCbug {
                text-align: center; width: 30px; height: 15px;
                color: #FFF; background-color: #900;
        }
        td.TOCbug a {
                font-family: monaco, charcoal, geneva, "MS Sans Serif", helvetica, sans-serif;
                font-weight: bold; font-size: x-small; text-decoration: none;
                color: #FFF; background-color: transparent;
        }

        td.header {
                font-family: arial, helvetica, sans-serif; font-size: x-small;
                vertical-align: top; width: 33%;
                color: #FFF; background-color: #666;
        }
        td.author { font-weight: bold; font-size: x-small; margin-left: 4em; }
        td.author-text { font-size: x-small; }

        /* info code from SantaKlauss at http://www.madaboutstyle.com/tooltip2.html */
        a.info {
                /* This is the key. */
                position: relative;
                z-index: 24;
                text-decoration: none;
        }
        a.info:hover {
                z-index: 25;
                color: #FFF; background-color: #900;
        }
        a.info span { display: none; }
        a.info:hover span.info {
                /* The span will display just on :hover state. */
                display: block;
                position: absolute;
                font-size: smaller;
                top: 2em; left: -5em; width: 15em;
                padding: 2px; border: 1px solid #333;
                color: #900; background-color: #EEE;
                text-align: left;
        }

        a { font-weight: bold; }
        a:link    { color: #900; background-color: transparent; }
        a:visited { color: #633; background-color: transparent; }
        a:active  { color: #633; background-color: transparent; }

        p { margin-left: 2em; margin-right: 2em; }
        p.copyright { font-size: x-small; }
        p.toc { font-size: small; font-weight: bold; margin-left: 3em; }
        table.toc { margin: 0 0 0 3em; padding: 0; border: 0; vertical-align: text-top; }
        td.toc { font-size: small; font-weight: bold; vertical-align: text-top; }

        ol.text { margin-left: 2em; margin-right: 2em; }
        ul.text { margin-left: 2em; margin-right: 2em; }
        li      { margin-left: 3em; }

        /* RFC-2629 <spanx>s and <artwork>s. */
        em     { font-style: italic; }
        strong { font-weight: bold; }
        dfn    { font-weight: bold; font-style: normal; }
        cite   { font-weight: normal; font-style: normal; }
        tt     { color: #036; }
        tt, pre, pre dfn, pre em, pre cite, pre span {
                font-family: "Courier New", Courier, monospace; font-size: small;
        }
        pre {
                text-align: left; padding: 4px;
                color: #000; background-color: #CCC;
        }
        pre dfn  { color: #900; }
        pre em   { color: #66F; background-color: #FFC; font-weight: normal; }
        pre .key { color: #33C; font-weight: bold; }
        pre .id  { color: #900; }
        pre .str { color: #000; background-color: #CFF; }
        pre .val { color: #066; }
        pre .rep { color: #909; }
        pre .oth { color: #000; background-color: #FCF; }
        pre .err { background-color: #FCC; }

        /* RFC-2629 <texttable>s. */
        table.all, table.full, table.headers, table.none {
                font-size: small; text-align: center; border-width: 2px;
                vertical-align: top; border-collapse: collapse;
        }
        table.all, table.full { border-style: solid; border-color: black; }
        table.headers, table.none { border-style: none; }
        th {
                font-weight: bold; border-color: black;
                border-width: 2px 2px 3px 2px;
        }
        table.all th, table.full th { border-style: solid; }
        table.headers th { border-style: none none solid none; }
        table.none th { border-style: none; }
        table.all td {
                border-style: solid; border-color: #333;
                border-width: 1px 2px;
        }
        table.full td, table.headers td, table.none td { border-style: none; }

        hr { height: 1px; }
        hr.insert {
                width: 80%; border-style: none; border-width: 0;
                color: #CCC; background-color: #CCC;
        }
--></style>
</head>
<body>
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<table summary="layout" width="66%" border="0" cellpadding="0" cellspacing="0"><tr><td><table summary="layout" width="100%" border="0" cellpadding="2" cellspacing="1">
<tr><td class="header">JOSE Working Group</td><td class="header">M. Jones</td></tr>
<tr><td class="header">Internet-Draft</td><td class="header">Microsoft</td></tr>
<tr><td class="header">Intended status: Standards Track</td><td class="header">October 14, 2012</td></tr>
<tr><td class="header">Expires: April 17, 2013</td><td class="header"> </td></tr>
</table></td></tr></table>
<h1><br />JSON Web Algorithms (JWA)<br />draft-ietf-jose-json-web-algorithms-06</h1>

<h3>Abstract</h3>

<p>
        The JSON Web Algorithms (JWA) specification enumerates
        cryptographic algorithms and identifiers to be used with the
        JSON Web Signature (JWS),
        JSON Web Encryption (JWE), and
        JSON Web Key (JWK) specifications.
      
</p>
<h3>Status of this Memo</h3>
<p>
This Internet-Draft is submitted  in full
conformance with the provisions of BCP 78 and BCP 79.</p>
<p>
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF).  Note that other groups may also distribute
working documents as Internet-Drafts.  The list of current
Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.</p>
<p>
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any time.
It is inappropriate to use Internet-Drafts as reference material or to cite
them other than as “work in progress.”</p>
<p>
This Internet-Draft will expire on April 17, 2013.</p>

<h3>Copyright Notice</h3>
<p>
Copyright (c) 2012 IETF Trust and the persons identified as the
document authors.  All rights reserved.</p>
<p>
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of
publication of this document.  Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.</p>
<a name="toc"></a><br /><hr />
<h3>Table of Contents</h3>
<p class="toc">
<a href="#anchor1">1.</a> 
Introduction<br />
    <a href="#anchor2">1.1.</a> 
Notational Conventions<br />
<a href="#anchor3">2.</a> 
Terminology<br />
    <a href="#anchor4">2.1.</a> 
Terms Incorporated from the JWS Specification<br />
    <a href="#anchor5">2.2.</a> 
Terms Incorporated from the JWE Specification<br />
    <a href="#anchor6">2.3.</a> 
Terms Incorporated from the JWK Specification<br />
    <a href="#anchor7">2.4.</a> 
Defined Terms<br />
<a href="#SigningAlgs">3.</a> 
Cryptographic Algorithms for JWS<br />
    <a href="#JWSAlgValues">3.1.</a> 
"alg" (Algorithm) Header Parameter Values for JWS<br />
    <a href="#DefiningHMAC">3.2.</a> 
MAC with HMAC SHA-256, HMAC SHA-384, or HMAC SHA-512<br />
    <a href="#DefiningRSA">3.3.</a> 
Digital Signature with RSA SHA-256, RSA SHA-384, or RSA SHA-512<br />
    <a href="#DefiningECDSA">3.4.</a> 
Digital Signature with ECDSA P-256 SHA-256, ECDSA P-384 SHA-384, or ECDSA P-521 SHA-512<br />
    <a href="#anchor8">3.5.</a> 
Using the Algorithm "none"<br />
    <a href="#MoreSigAlgs">3.6.</a> 
Additional Digital Signature/MAC Algorithms and Parameters<br />
<a href="#EncryptingAlgs">4.</a> 
Cryptographic Algorithms for JWE<br />
    <a href="#JWEAlgValues">4.1.</a> 
"alg" (Algorithm) Header Parameter Values for JWE<br />
    <a href="#JWEEncValues">4.2.</a> 
"enc" (Encryption Method) Header Parameter Values for JWE<br />
    <a href="#KeyEncryptionRSA15">4.3.</a> 
Key Encryption with RSAES-PKCS1-V1_5<br />
    <a href="#KeyEncryptionRSAOAEP">4.4.</a> 
Key Encryption with RSAES OAEP<br />
    <a href="#KeyEncryptionAESKW">4.5.</a> 
Key Encryption with AES Key Wrap<br />
    <a href="#DirectEncryption">4.6.</a> 
Direct Encryption with a Shared Symmetric Key<br />
    <a href="#ECDHES">4.7.</a> 
Key Agreement with Elliptic Curve Diffie-Hellman Ephemeral Static (ECDH-ES)<br />
        <a href="#KeyDerivECDHES">4.7.1.</a> 
Key Derivation for "ECDH-ES"<br />
    <a href="#AESCBC">4.8.</a> 
Composite Plaintext Encryption Algorithms "A128CBC+HS256" and "A256CBC+HS512"<br />
        <a href="#KeyDerivCBC">4.8.1.</a> 
Key Derivation for "A128CBC+HS256" and "A256CBC+HS512"<br />
        <a href="#PlaintextEncryptionCBC">4.8.2.</a> 
Encryption Calculation for "A128CBC+HS256" and "A256CBC+HS512"<br />
        <a href="#IntHMAC">4.8.3.</a> 
Integrity Calculation for "A128CBC+HS256" and "A256CBC+HS512"<br />
    <a href="#PlaintextEncryptionGCM">4.9.</a> 
Plaintext Encryption with AES GCM<br />
    <a href="#MoreEncAlgs">4.10.</a> 
Additional Encryption Algorithms and Parameters<br />
<a href="#JWKAlgs">5.</a> 
Cryptographic Algorithms for JWK<br />
    <a href="#JWKAlgValues">5.1.</a> 
"alg" (Algorithm Family) Parameter Values for JWK<br />
    <a href="#JWKEC">5.2.</a> 
JWK Parameters for Elliptic Curve Keys<br />
        <a href="#crvDef">5.2.1.</a> 
"crv" (Curve) Parameter<br />
        <a href="#xDef">5.2.2.</a> 
"x" (X Coordinate) Parameter<br />
        <a href="#yDef">5.2.3.</a> 
"y" (Y Coordinate) Parameter<br />
    <a href="#JWKRSA">5.3.</a> 
JWK Parameters for RSA Keys<br />
        <a href="#modDef">5.3.1.</a> 
"mod" (Modulus) Parameter<br />
        <a href="#xpoDef">5.3.2.</a> 
"xpo" (Exponent) Parameter<br />
    <a href="#MoreKeyAlgs">5.4.</a> 
Additional Key Algorithm Families and Parameters<br />
<a href="#IANA">6.</a> 
IANA Considerations<br />
    <a href="#JWSJWEAlgsReg">6.1.</a> 
JSON Web Signature and Encryption Algorithms Registry<br />
        <a href="#anchor9">6.1.1.</a> 
Registration Template<br />
        <a href="#anchor10">6.1.2.</a> 
Initial Registry Contents<br />
    <a href="#KeyAlgRegistry">6.2.</a> 
JSON Web Key Algorithm Families Registry<br />
        <a href="#anchor11">6.2.1.</a> 
Registration Template<br />
        <a href="#anchor12">6.2.2.</a> 
Initial Registry Contents<br />
    <a href="#anchor13">6.3.</a> 
JSON Web Key Parameters Registration<br />
        <a href="#anchor14">6.3.1.</a> 
Registry Contents<br />
<a href="#Security">7.</a> 
Security Considerations<br />
<a href="#rfc.references1">8.</a> 
References<br />
    <a href="#rfc.references1">8.1.</a> 
Normative References<br />
    <a href="#rfc.references2">8.2.</a> 
Informative References<br />
<a href="#SigAlgXref">Appendix A.</a> 
Digital Signature/MAC Algorithm Identifier Cross-Reference<br />
<a href="#EncAlgXref">Appendix B.</a> 
Encryption Algorithm Identifier Cross-Reference<br />
<a href="#Acknowledgements">Appendix C.</a> 
Acknowledgements<br />
<a href="#TBD">Appendix D.</a> 
Open Issues<br />
<a href="#anchor17">Appendix E.</a> 
Document History<br />
<a href="#rfc.authors">§</a> 
Author's Address<br />
</p>
<br clear="all" />

<a name="anchor1"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.1"></a><h3>1. 
Introduction</h3>

<p>
        The JSON Web Algorithms (JWA) specification enumerates
        cryptographic algorithms and identifiers to be used with the
        JSON Web Signature (JWS) <a class='info' href='#JWS'>[JWS]<span> (</span><span class='info'>Jones, M., Bradley, J., and N. Sakimura, “JSON Web Signature (JWS),” October 2012.</span><span>)</span></a>,
        JSON Web Encryption (JWE) <a class='info' href='#JWE'>[JWE]<span> (</span><span class='info'>Jones, M., Rescorla, E., and J. Hildebrand, “JSON Web Encryption (JWE),” October 2012.</span><span>)</span></a>, and
        JSON Web Key (JWK) <a class='info' href='#JWK'>[JWK]<span> (</span><span class='info'>Jones, M., “JSON Web Key (JWK),” October 2012.</span><span>)</span></a> specifications.
        All these specifications utilize
        JavaScript Object Notation (JSON) <a class='info' href='#RFC4627'>[RFC4627]<span> (</span><span class='info'>Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.</span><span>)</span></a>
        based data structures.
        This specification also describes the semantics and operations
        that are specific to these algorithms and algorithm families.
      
</p>
<p>
        Enumerating the algorithms and identifiers for them in this
        specification, rather than in the JWS, JWE, and JWK
        specifications, is intended to allow them to remain unchanged
        in the face of changes in the set of required, recommended,
        optional, and deprecated algorithms over time.
      
</p>
<a name="anchor2"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.1.1"></a><h3>1.1. 
Notational Conventions</h3>

<p>
          The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
          "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
          and "OPTIONAL" in this document are to be interpreted as
          described in
          Key words for use in RFCs to Indicate Requirement Levels <a class='info' href='#RFC2119'>[RFC2119]<span> (</span><span class='info'>Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels,” March 1997.</span><span>)</span></a>.
        
</p>
<a name="anchor3"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.2"></a><h3>2. 
Terminology</h3>

<a name="anchor4"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.2.1"></a><h3>2.1. 
Terms Incorporated from the JWS Specification</h3>

<p>
          These terms defined by the
          JSON Web Signature (JWS) <a class='info' href='#JWS'>[JWS]<span> (</span><span class='info'>Jones, M., Bradley, J., and N. Sakimura, “JSON Web Signature (JWS),” October 2012.</span><span>)</span></a>
          specification are incorporated into this specification:
        
</p>
<p>
          </p>
<blockquote class="text"><dl>
<dt>JSON Web Signature (JWS)</dt>
<dd>
              A data structure cryptographically securing a JWS Header
              and a JWS Payload with a JWS Signature value.
            
</dd>
<dt>JWS Header</dt>
<dd>
              A string representing a
              JavaScript Object Notation (JSON) <a class='info' href='#RFC4627'>[RFC4627]<span> (</span><span class='info'>Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.</span><span>)</span></a>
              object that describes the
              digital signature or MAC operation applied to
              create the JWS Signature value.
            
</dd>
<dt>JWS Payload</dt>
<dd>
              The bytes to be secured - a.k.a., the message.
              The payload can contain an arbitrary sequence of bytes.
            
</dd>
<dt>JWS Signature</dt>
<dd>
              A byte array containing the cryptographic
              material that secures the contents of the JWS Header
              and the JWS Payload.
            
</dd>
<dt>Base64url Encoding</dt>
<dd>
              The URL- and filename-safe Base64 encoding
              described in <a class='info' href='#RFC4648'>RFC 4648<span> (</span><span class='info'>Josefsson, S., “The Base16, Base32, and Base64 Data Encodings,” October 2006.</span><span>)</span></a> [RFC4648],
              Section 5, with the (non URL-safe) '=' padding characters
              omitted, as permitted by Section 3.2.  (See Appendix C of
              <a class='info' href='#JWS'>[JWS]<span> (</span><span class='info'>Jones, M., Bradley, J., and N. Sakimura, “JSON Web Signature (JWS),” October 2012.</span><span>)</span></a> for notes on implementing base64url
              encoding without padding.)
            
</dd>
<dt>Encoded JWS Header</dt>
<dd>
              Base64url encoding of the bytes of the
              UTF-8 <a class='info' href='#RFC3629'>[RFC3629]<span> (</span><span class='info'>Yergeau, F., “UTF-8, a transformation format of ISO 10646,” November 2003.</span><span>)</span></a>
              representation of the JWS Header.
            
</dd>
<dt>Encoded JWS Payload</dt>
<dd>
              Base64url encoding of the JWS Payload.
            
</dd>
<dt>Encoded JWS Signature</dt>
<dd>
              Base64url encoding of the JWS Signature.
            
</dd>
<dt>JWS Secured Input</dt>
<dd>
              The concatenation of the Encoded JWS Header, a period ('.')
              character, and the Encoded JWS Payload.
            
</dd>
<dt>Collision Resistant Namespace</dt>
<dd>
              A namespace that allows names to be allocated in a manner
              such that they are highly unlikely to collide with other names.
              For instance, collision resistance can be achieved through
              administrative delegation of portions of the namespace or
              through use of collision-resistant name allocation functions.
              Examples of Collision Resistant Namespaces include:
              Domain Names,
              Object Identifiers (OIDs) as defined in the ITU-T X.660
              and X.670 Recommendation series, and
              Universally Unique IDentifiers (UUIDs)
              <a class='info' href='#RFC4122'>[RFC4122]<span> (</span><span class='info'>Leach, P., Mealling, M., and R. Salz, “A Universally Unique IDentifier (UUID) URN Namespace,” July 2005.</span><span>)</span></a>.
              When using an administratively delegated namespace,
              the definer of a name needs to take
              reasonable precautions to ensure they are in control of
              the portion of the namespace they use to define the name.
            
</dd>
</dl></blockquote><p>
        
</p>
<a name="anchor5"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.2.2"></a><h3>2.2. 
Terms Incorporated from the JWE Specification</h3>

<p>
          These terms defined by the
          JSON Web Encryption (JWE) <a class='info' href='#JWE'>[JWE]<span> (</span><span class='info'>Jones, M., Rescorla, E., and J. Hildebrand, “JSON Web Encryption (JWE),” October 2012.</span><span>)</span></a>
          specification are incorporated into this specification:
        
</p>
<p>
          </p>
<blockquote class="text"><dl>
<dt>JSON Web Encryption (JWE)</dt>
<dd>
              A data structure representing an encrypted version of a
              Plaintext.  The structure consists of four parts: the JWE
              Header, the JWE Encrypted Key, the JWE Ciphertext, and
              the JWE Integrity Value.
            
</dd>
<dt>Plaintext</dt>
<dd>
              The bytes to be encrypted - a.k.a., the message.
              The plaintext can contain an arbitrary sequence of bytes.
            
</dd>
<dt>Ciphertext</dt>
<dd>
              The encrypted version of the Plaintext.
            
</dd>
<dt>Content Encryption Key (CEK)</dt>
<dd>
              A symmetric key used to encrypt the Plaintext for the
              recipient to produce the Ciphertext.
            
</dd>
<dt>Content Integrity Key (CIK)</dt>
<dd>
              A key used with a MAC function to ensure the integrity
              of the Ciphertext and the parameters used to create it.
            
</dd>
<dt>Content Master Key (CMK)</dt>
<dd>
              A key from which the CEK and CIK are derived.
              When key wrapping or key encryption are employed, the CMK
              is randomly generated and encrypted to the recipient as
              the JWE Encrypted Key.
              When key agreement is employed, the CMK is the result of
              the key agreement algorithm.
            
</dd>
<dt>JWE Header</dt>
<dd>
              A string representing a JSON object that describes the
              encryption operations applied to create the JWE Encrypted
              Key, the JWE Ciphertext, and the JWE Integrity Value.
            
</dd>
<dt>JWE Encrypted Key</dt>
<dd>
              When key wrapping or key encryption are employed,
              the Content Master Key (CMK) is encrypted with the
              intended recipient's key and the resulting encrypted
              content is recorded as a byte array, which is referred to
              as the JWE Encrypted Key.
              Otherwise, when key agreement is employed,
              the JWE Encrypted Key is the empty byte array.
            
</dd>
<dt>JWE Ciphertext</dt>
<dd>
              A byte array containing the Ciphertext.
            
</dd>
<dt>JWE Integrity Value</dt>
<dd>
              A byte array containing a MAC value that ensures the
              integrity of the Ciphertext and the parameters used to
              create it.
            
</dd>
<dt>Encoded JWE Header</dt>
<dd>
              Base64url encoding of the bytes of the
              UTF-8 <a class='info' href='#RFC3629'>[RFC3629]<span> (</span><span class='info'>Yergeau, F., “UTF-8, a transformation format of ISO 10646,” November 2003.</span><span>)</span></a>
              representation of the JWE Header.
            
</dd>
<dt>Encoded JWE Encrypted Key</dt>
<dd>
              Base64url encoding of the JWE Encrypted Key.
            
</dd>
<dt>Encoded JWE Ciphertext</dt>
<dd>
              Base64url encoding of the JWE Ciphertext.
            
</dd>
<dt>Encoded JWE Integrity Value</dt>
<dd>
              Base64url encoding of the JWE Integrity Value.
            
</dd>
<dt>AEAD Algorithm</dt>
<dd>
              An Authenticated Encryption with Associated Data (AEAD)
              <a class='info' href='#RFC5116'>[RFC5116]<span> (</span><span class='info'>McGrew, D., “An Interface and Algorithms for Authenticated Encryption,” January 2008.</span><span>)</span></a> encryption algorithm is one that
              provides an integrated content integrity check.  AES
              Galois/Counter Mode (GCM) is one such algorithm.
            
</dd>
</dl></blockquote><p>
        
</p>
<a name="anchor6"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.2.3"></a><h3>2.3. 
Terms Incorporated from the JWK Specification</h3>

<p>
          These terms defined by the
          JSON Web Key (JWK) <a class='info' href='#JWK'>[JWK]<span> (</span><span class='info'>Jones, M., “JSON Web Key (JWK),” October 2012.</span><span>)</span></a>
          specification are incorporated into this specification:
        
</p>
<p>
          </p>
<blockquote class="text"><dl>
<dt>JSON Web Key (JWK)</dt>
<dd>
              A JSON data structure that represents a public key.
            
</dd>
<dt>JSON Web Key Set (JWK Set)</dt>
<dd>
              A JSON object that contains an array of JWKs as a member.
            
</dd>
</dl></blockquote><p>
        
</p>
<a name="anchor7"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.2.4"></a><h3>2.4. 
Defined Terms</h3>

<p>
          These terms are defined for use by this specification:
        
</p>
<p>
          </p>
<blockquote class="text"><dl>
<dt>Header Parameter Name</dt>
<dd>
              The name of a member of the JSON object representing a
              JWS Header or JWE Header.
            
</dd>
<dt>Header Parameter Value</dt>
<dd>
              The value of a member of the JSON object representing a
              JWS Header or JWE Header.
            
</dd>
</dl></blockquote><p>
        
</p>
<a name="SigningAlgs"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.3"></a><h3>3. 
Cryptographic Algorithms for JWS</h3>

<p>
        JWS uses cryptographic algorithms to digitally sign or
        create a Message Authentication Codes (MAC) of the contents
        of the JWS Header and the JWS Payload.  The
        use of the following algorithms for producing JWSs is defined in
        this section.
      
</p>
<a name="JWSAlgValues"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.3.1"></a><h3>3.1. 
"alg" (Algorithm) Header Parameter Values for JWS</h3>

<p>
          The table below is the set of
          <tt>alg</tt> (algorithm) header
          parameter values defined by this specification for use with JWS, each of which
          is explained in more detail in the following sections:
        
</p><table class="full" align="center" border="0" cellpadding="2" cellspacing="2">
<col align="left"><col align="left"><col align="left">
<tr><th align="left">alg Parameter Value</th><th align="left">Digital Signature or MAC Algorithm</th><th align="left">Implementation Requirements</th></tr>
<tr>
<td align="left">HS256</td>
<td align="left">HMAC using SHA-256 hash algorithm</td>
<td align="left">REQUIRED</td>
</tr>
<tr>
<td align="left">HS384</td>
<td align="left">HMAC using SHA-384 hash algorithm</td>
<td align="left">OPTIONAL</td>
</tr>
<tr>
<td align="left">HS512</td>
<td align="left">HMAC using SHA-512 hash algorithm</td>
<td align="left">OPTIONAL</td>
</tr>
<tr>
<td align="left">RS256</td>
<td align="left">RSASSA using SHA-256 hash algorithm</td>
<td align="left">RECOMMENDED</td>
</tr>
<tr>
<td align="left">RS384</td>
<td align="left">RSASSA using SHA-384 hash algorithm</td>
<td align="left">OPTIONAL</td>
</tr>
<tr>
<td align="left">RS512</td>
<td align="left">RSASSA using SHA-512 hash algorithm</td>
<td align="left">OPTIONAL</td>
</tr>
<tr>
<td align="left">ES256</td>
<td align="left">ECDSA using P-256 curve and SHA-256 hash algorithm</td>
<td align="left">RECOMMENDED+</td>
</tr>
<tr>
<td align="left">ES384</td>
<td align="left">ECDSA using P-384 curve and SHA-384 hash algorithm</td>
<td align="left">OPTIONAL</td>
</tr>
<tr>
<td align="left">ES512</td>
<td align="left">ECDSA using P-521 curve and SHA-512 hash algorithm</td>
<td align="left">OPTIONAL</td>
</tr>
<tr>
<td align="left">none</td>
<td align="left">No digital signature or MAC value included</td>
<td align="left">REQUIRED</td>
</tr>
</table>
<br clear="all" />

<p>
          All the names are short because a core goal of JWS is
          for the representations to be compact.  However, there is no
          a priori length restriction on <tt>alg</tt> values.
        
</p>
<p>
          The use of "+" in the Implementation Requirements
          indicates that the requirement strength is likely
          to be increased in a future version of the specification. 
        
</p>
<p>
          See <a class='info' href='#SigAlgXref'>Appendix A<span> (</span><span class='info'>Digital Signature/MAC Algorithm Identifier Cross-Reference</span><span>)</span></a> for a table cross-referencing the
          digital signature and MAC <tt>alg</tt> (algorithm)
          values used in this specification
          with the equivalent identifiers used by other
          standards and software packages.
        
</p>
<a name="DefiningHMAC"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.3.2"></a><h3>3.2. 
MAC with HMAC SHA-256, HMAC SHA-384, or HMAC SHA-512</h3>

<p>
          Hash-based Message Authentication Codes (HMACs) enable one to
          use a secret plus a cryptographic hash function to generate a
          Message Authentication Code (MAC). This can be used to
          demonstrate that the MAC matches the hashed content, in this
          case the JWS Secured Input, which therefore demonstrates that
          whoever generated the MAC was in possession of the secret.
          The means of exchanging the shared key is outside the scope
          of this specification.
        
</p>
<p>
          The algorithm for implementing and validating HMACs is
          provided in <a class='info' href='#RFC2104'>RFC 2104<span> (</span><span class='info'>Krawczyk, H., Bellare, M., and R. Canetti, “HMAC: Keyed-Hashing for Message Authentication,” February 1997.</span><span>)</span></a> [RFC2104].  This
          section defines the use of the HMAC SHA-256, HMAC SHA-384,
          and HMAC SHA-512 functions <a class='info' href='#SHS'>[SHS]<span> (</span><span class='info'>National Institute of Standards and             Technology, “Secure Hash Standard (SHS),” October 2008.</span><span>)</span></a>. The
          <tt>alg</tt> (algorithm) header parameter values
          <tt>HS256</tt>, <tt>HS384</tt>, and <tt>HS512</tt> are used in the JWS Header
          to indicate that the Encoded JWS Signature contains a base64url
          encoded HMAC value using the respective hash function.
        
</p>
<p>
          A key of the same size as the hash output (for instance, 256
          bits for <tt>HS256</tt>) or larger MUST
          be used with this algorithm.
        
</p>
<p>
          The HMAC SHA-256 MAC is generated per RFC 2104,
          using SHA-256 as the hash algorithm "H",
          using the bytes of the ASCII <a class='info' href='#USASCII'>[USASCII]<span> (</span><span class='info'>American National Standards Institute, “Coded Character Set -- 7-bit American Standard Code for Information Interchange,” 1986.</span><span>)</span></a> representation
          of the JWS Secured Input as the "text" value,
          and using the shared key.
          The HMAC output value is the JWS Signature.
          The JWS signature is base64url encoded to produce the Encoded JWS Signature.
        
</p>
<p>
          The HMAC SHA-256 MAC for a JWS is validated by computing an HMAC value per RFC 2104,
          using SHA-256 as the hash algorithm "H",
          using the bytes of the ASCII representation
          of the received JWS Secured input as the "text" value,
          and using the shared key.
          This computed HMAC value is then compared to the result of
          base64url decoding the received Encoded JWS signature.
          Alternatively, the computed HMAC value can be base64url encoded
          and compared to the received Encoded JWS Signature,
          as this comparison produces the same result as comparing
          the unencoded values.
          In either case, if the values match, the HMAC has been validated.
          If the validation fails, the JWS MUST be rejected.
        
</p>
<p>
          Securing content with the HMAC SHA-384 and HMAC SHA-512
          algorithms is performed identically to the procedure for
          HMAC SHA-256 -
          just using the corresponding hash algorithm
          with correspondingly larger minimum key sizes and result values:
          384 bits each for HMAC SHA-384 and 512 bits each for HMAC SHA-512.
        
</p>
<a name="DefiningRSA"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.3.3"></a><h3>3.3. 
Digital Signature with RSA SHA-256, RSA SHA-384, or RSA SHA-512</h3>

<p>
          This section defines the use of the RSASSA-PKCS1-V1_5
          digital signature algorithm as defined in
          Section 8.2 of <a class='info' href='#RFC3447'>RFC 3447<span> (</span><span class='info'>Jonsson, J. and B. Kaliski, “Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1,” February 2003.</span><span>)</span></a> [RFC3447],
          (commonly known as PKCS #1),
          using SHA-256, SHA-384, or SHA-512 <a class='info' href='#SHS'>[SHS]<span> (</span><span class='info'>National Institute of Standards and             Technology, “Secure Hash Standard (SHS),” October 2008.</span><span>)</span></a>
          as the hash functions.
          The <tt>alg</tt> (algorithm) header
          parameter values <tt>RS256</tt>, <tt>RS384</tt>, and <tt>RS512</tt> are used in the JWS Header
          to indicate that the Encoded JWS Signature contains a base64url
          encoded RSA digital signature using the respective hash function.
        
</p>
<p>
          A key of size 2048 bits or larger MUST be used with these algorithms.
        
</p>
<p>
          The RSA SHA-256 digital signature is generated as follows:

          </p>
<ol class="text">
<li>
              Generate a digital signature of the bytes of the ASCII representation
              of the JWS Secured Input
              using RSASSA-PKCS1-V1_5-SIGN
              and the SHA-256 hash function with the desired private
              key. The output will be a byte array.
            
</li>
<li>
              Base64url encode the resulting byte array.
            
</li>
</ol><p>

          The output is the Encoded JWS Signature for that JWS.
        
</p>
<p>
          The RSA SHA-256 digital signature for a JWS is validated as follows:

          </p>
<ol class="text">
<li>
              Take the Encoded JWS Signature and base64url decode it into
              a byte array. If decoding fails, the JWS MUST
              be rejected.
            
</li>
<li>
              Submit the bytes of the ASCII representation of the JWS Secured Input
              and the public key corresponding to the private key used
              by the signer to the RSASSA-PKCS1-V1_5-VERIFY algorithm
              using SHA-256 as the hash function.
            
</li>
<li>
              If the validation fails, the JWS MUST be rejected.
            
</li>
</ol><p>
        
</p>
<p>
          Signing with the RSA SHA-384 and RSA SHA-512
          algorithms is performed identically to the procedure for
          RSA SHA-256 -
          just using the corresponding hash algorithm
          with correspondingly larger result values:
          384 bits for RSA SHA-384 and 512 bits for RSA SHA-512.
        
</p>
<a name="DefiningECDSA"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.3.4"></a><h3>3.4. 
Digital Signature with ECDSA P-256 SHA-256, ECDSA P-384 SHA-384, or ECDSA P-521 SHA-512</h3>

<p>
          The Elliptic Curve Digital Signature Algorithm (ECDSA) <a class='info' href='#DSS'>[DSS]<span> (</span><span class='info'>National Institute of Standards and             Technology, “Digital Signature Standard (DSS),” June 2009.</span><span>)</span></a>
          provides for the use of Elliptic Curve cryptography, which is
          able to provide equivalent security to RSA cryptography but
          using shorter key sizes and with greater processing
          speed. This means that ECDSA digital signatures will be substantially
          smaller in terms of length than equivalently strong RSA
          digital signatures.
        
</p>
<p>
          This specification defines the use of ECDSA with the P-256
          curve and the SHA-256 cryptographic hash function, ECDSA
          with the P-384 curve and the SHA-384 hash function, and
          ECDSA with the P-521 curve and the SHA-512 hash
          function. The P-256, P-384, and P-521 curves are
          defined in  <a class='info' href='#DSS'>[DSS]<span> (</span><span class='info'>National Institute of Standards and             Technology, “Digital Signature Standard (DSS),” June 2009.</span><span>)</span></a>. The <tt>alg</tt> (algorithm) header parameter values <tt>ES256</tt>, <tt>ES384</tt>, and <tt>ES512</tt> are used in the JWS Header
          to indicate that the Encoded JWS Signature contains a base64url
          encoded ECDSA P-256 SHA-256, ECDSA P-384 SHA-384, or ECDSA
          P-521 SHA-512 digital signature, respectively.
        
</p>
<p>
          The ECDSA P-256 SHA-256 digital signature is generated as follows:

          </p>
<ol class="text">
<li>
              Generate a digital signature of the bytes of the ASCII representation
              of the JWS Secured Input
              using ECDSA P-256 SHA-256 with
              the desired private key. The output will be the pair
              (R, S), where R and S are 256 bit unsigned integers.
            
</li>
<li>
              Turn R and S into byte arrays in big endian order,
              with each array being be 32 bytes long.
              The array representations MUST not be shortened
              to omit any leading zero bytes contained in the values.
            
</li>
<li>
              Concatenate the two byte arrays in the order R and then S.
              (Note that many ECDSA implementations will directly produce
              this concatenation as their output.)
            
</li>
<li>
              Base64url encode the resulting 64 byte array.
            
</li>
</ol><p>

          The output is the Encoded JWS Signature for the JWS.
        
</p>
<p>
          The ECDSA P-256 SHA-256 digital signature for a JWS is validated as follows:

          </p>
<ol class="text">
<li>
              Take the Encoded JWS Signature and base64url decode it into
              a byte array. If decoding fails, the JWS MUST
              be rejected.
            
</li>
<li>
              The output of the base64url decoding MUST be a 64 byte
              array.
              If decoding does not result in a 64 byte array, the JWS MUST be rejected.
            
</li>
<li>
              Split the 64 byte array into two 32 byte arrays. The first
              array will be R and the second S
              (with both being in big endian byte order).
            
</li>
<li>
              Submit the bytes of the ASCII representation of the JWS Secured Input
              R, S and the public key (x, y) to the ECDSA P-256
              SHA-256 validator.
            
</li>
<li>
              If the validation fails, the JWS MUST be rejected.
            
</li>
</ol><p>

          Note that ECDSA digital
          signature contains a value referred to as K, which is a random
          number generated for each digital signature instance. This
          means that two ECDSA digital signatures using exactly the same
          input parameters will output different signature values because
          their K values will be different. A consequence of this is
          that one cannot validate an ECDSA signature by recomputing
          the signature and comparing the results.
        
</p>
<p>
          Signing with the ECDSA P-384 SHA-384 and ECDSA P-521 SHA-512
          algorithms is performed identically to the procedure for
          ECDSA P-256 SHA-256 -
          just using the corresponding hash algorithm
          with correspondingly larger result values.
          For ECDSA P-384 SHA-384, R and S will be 384 bits each,
          resulting in a 96 byte array.
          For ECDSA P-521 SHA-512, R and S will be 521 bits each,
          resulting in a 132 byte array.
        
</p>
<a name="anchor8"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.3.5"></a><h3>3.5. 
Using the Algorithm "none"</h3>

<p>
          JWSs MAY also be created that do not provide integrity protection.
          Such a JWS is called a "Plaintext JWS".
          Plaintext JWSs MUST use the <tt>alg</tt>
          value <tt>none</tt>, and are formatted
          identically to other JWSs, but with an empty JWS Signature
          value.
        
</p>
<a name="MoreSigAlgs"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.3.6"></a><h3>3.6. 
Additional Digital Signature/MAC Algorithms and Parameters</h3>

<p>
          Additional algorithms MAY be used to protect JWSs with
          corresponding <tt>alg</tt> (algorithm)
          header parameter values being defined to refer to them.
          New <tt>alg</tt> header parameter values SHOULD
          either be registered in the IANA JSON Web Signature and Encryption Algorithms
          registry <a class='info' href='#JWSJWEAlgsReg'>Section 6.1<span> (</span><span class='info'>JSON Web Signature and Encryption Algorithms Registry</span><span>)</span></a> or be
          a URI that contains a Collision Resistant Namespace.
          In particular, it is permissible to use the algorithm identifiers defined in
          <a class='info' href='#RFC3275'>XML DSIG<span> (</span><span class='info'>Eastlake, D., Reagle, J., and D. Solo, “(Extensible Markup Language) XML-Signature Syntax and Processing,” March 2002.</span><span>)</span></a> [RFC3275],
          <a class='info' href='#W3C.CR-xmldsig-core2-20120124'>XML DSIG 2.0<span> (</span><span class='info'>Roessler, T., Yiu, K., Solo, D., Reagle, J., Datta, P., Eastlake, D., Hirsch, F., and S. Cantor, “XML Signature Syntax and Processing Version 2.0,” January 2012.</span><span>)</span></a> [W3C.CR‑xmldsig‑core2‑20120124],
          and related specifications as
          <tt>alg</tt> values.
        
</p>
<p>
          As indicated by the common registry, JWSs and JWEs share a
          common <tt>alg</tt> value space.
          The values used by the two specifications MUST be distinct,
          as the <tt>alg</tt> value MAY be used
          to determine whether the object is a JWS or JWE.
        
</p>
<p>
          Likewise, additional reserved header parameter names MAY be defined
          via the IANA
          JSON Web Signature and Encryption Header Parameters registry
          <a class='info' href='#JWS'>[JWS]<span> (</span><span class='info'>Jones, M., Bradley, J., and N. Sakimura, “JSON Web Signature (JWS),” October 2012.</span><span>)</span></a>.
          As indicated by the common registry, JWSs and JWEs share a
          common header parameter space; when a parameter is used by
          both specifications, its usage must be compatible
          between the specifications.
        
</p>
<a name="EncryptingAlgs"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4"></a><h3>4. 
Cryptographic Algorithms for JWE</h3>

<p>
        JWE uses cryptographic algorithms to encrypt the Content
        Master Key (CMK) and the Plaintext.  This section
        specifies a set of specific algorithms for these purposes.
      
</p>
<a name="JWEAlgValues"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.1"></a><h3>4.1. 
"alg" (Algorithm) Header Parameter Values for JWE</h3>

<p>
          The table below is the set of <tt>alg</tt> (algorithm) header parameter values
          that are defined by this specification for use with JWE.
          These algorithms are used to encrypt the CMK, producing the
          JWE Encrypted Key, or to use key agreement to agree upon the CMK.
        
</p><table class="full" align="center" border="0" cellpadding="2" cellspacing="2">
<col align="left"><col align="left"><col align="left">
<tr><th align="left">alg Parameter Value</th><th align="left">Key Encryption or Agreement Algorithm</th><th align="left">Implementation Requirements</th></tr>
<tr>
<td align="left">RSA1_5</td>
<td align="left">RSAES-PKCS1-V1_5 <a class='info' href='#RFC3447'>[RFC3447]<span> (</span><span class='info'>Jonsson, J. and B. Kaliski, “Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1,” February 2003.</span><span>)</span></a></td>
<td align="left">REQUIRED</td>
</tr>
<tr>
<td align="left">RSA-OAEP</td>
<td align="left">RSAES using Optimal Asymmetric Encryption Padding (OAEP)
          <a class='info' href='#RFC3447'>[RFC3447]<span> (</span><span class='info'>Jonsson, J. and B. Kaliski, “Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1,” February 2003.</span><span>)</span></a>, with the
          default parameters specified by RFC 3447 in Section A.2.1</td>
<td align="left">OPTIONAL</td>
</tr>
<tr>
<td align="left">A128KW</td>
<td align="left">Advanced Encryption Standard (AES) Key Wrap Algorithm
          <a class='info' href='#RFC3394'>[RFC3394]<span> (</span><span class='info'>Schaad, J. and R. Housley, “Advanced Encryption Standard (AES) Key Wrap Algorithm,” September 2002.</span><span>)</span></a>
          using 128 bit keys </td>
<td align="left">RECOMMENDED</td>
</tr>
<tr>
<td align="left">A256KW</td>
<td align="left">AES Key Wrap Algorithm
          using 256 bit keys</td>
<td align="left">RECOMMENDED</td>
</tr>
<tr>
<td align="left">dir</td>
<td align="left">Direct use of a shared symmetric key as the Content Master Key (CMK)
          for the block encryption step
          (rather than using the symmetric key to wrap the CMK)</td>
<td align="left">RECOMMENDED</td>
</tr>
<tr>
<td align="left">ECDH-ES</td>
<td align="left">Elliptic Curve Diffie-Hellman Ephemeral Static
          <a class='info' href='#RFC6090'>[RFC6090]<span> (</span><span class='info'>McGrew, D., Igoe, K., and M. Salter, “Fundamental Elliptic Curve Cryptography Algorithms,” February 2011.</span><span>)</span></a> key agreement using the
          Concat KDF, as defined in Section 5.8.1 of <a class='info' href='#NIST.800-56A'>[NIST.800‑56A]<span> (</span><span class='info'>National Institute of Standards and Technology (NIST), “Recommendation for Pair-Wise Key Establishment Schemes Using Discrete Logarithm Cryptography (Revised),” March 2007.</span><span>)</span></a>,
          with the agreed-upon key being used directly as the Content Master Key (CMK)
          (rather than being used to wrap the CMK),
          as specified in <a class='info' href='#ECDHES'>Section 4.7<span> (</span><span class='info'>Key Agreement with Elliptic Curve Diffie-Hellman Ephemeral Static (ECDH-ES)</span><span>)</span></a>
          </td>
<td align="left">RECOMMENDED+</td>
</tr>
<tr>
<td align="left">ECDH-ES+A128KW</td>
<td align="left">Elliptic Curve Diffie-Hellman Ephemeral Static key agreement
          per <tt>ECDH-ES</tt> and <a class='info' href='#ECDHES'>Section 4.7<span> (</span><span class='info'>Key Agreement with Elliptic Curve Diffie-Hellman Ephemeral Static (ECDH-ES)</span><span>)</span></a>,
          but where the agreed-upon key is used to wrap the Content Master Key (CMK)
          with the <tt>A128KW</tt> function
          (rather than being used directly as the CMK)</td>
<td align="left">RECOMMENDED</td>
</tr>
<tr>
<td align="left">ECDH-ES+A256KW</td>
<td align="left">Elliptic Curve Diffie-Hellman Ephemeral Static key agreement
          per <tt>ECDH-ES</tt> and <a class='info' href='#ECDHES'>Section 4.7<span> (</span><span class='info'>Key Agreement with Elliptic Curve Diffie-Hellman Ephemeral Static (ECDH-ES)</span><span>)</span></a>,
          but where the agreed-upon key is used to wrap the Content Master Key (CMK)
          with the <tt>A256KW</tt> function
          (rather than being used directly as the CMK)</td>
<td align="left">RECOMMENDED</td>
</tr>
</table>
<br clear="all" />

<p>
          The use of "+" in the Implementation Requirements
          indicates that the requirement strength is likely
          to be increased in a future version of the specification. 
        
</p>
<a name="JWEEncValues"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.2"></a><h3>4.2. 
"enc" (Encryption Method) Header Parameter Values for JWE</h3>

<p>
          The table below is the set of
          <tt>enc</tt> (encryption method) header parameter values that
          are defined by this specification for use with JWE.  These algorithms are used
          to encrypt the Plaintext, which produces the Ciphertext.
        
</p><table class="full" align="center" border="0" cellpadding="2" cellspacing="2">
<col align="left"><col align="left"><col align="left">
<tr><th align="left">enc Parameter Value</th><th align="left">Block Encryption Algorithm</th><th align="left">Implementation Requirements</th></tr>
<tr>
<td align="left">A128CBC+HS256</td>
<td align="left">Composite AEAD algorithm using Advanced Encryption Standard (AES)
          in Cipher Block Chaining (CBC) mode with PKCS #5 padding
          <a class='info' href='#AES'>[AES]<span> (</span><span class='info'>National Institute of Standards and Technology (NIST), “Advanced Encryption Standard (AES),” November 2001.</span><span>)</span></a> <a class='info' href='#NIST.800-38A'>[NIST.800‑38A]<span> (</span><span class='info'>National Institute of Standards and Technology (NIST), “Recommendation for Block Cipher Modes of Operation,” December 2001.</span><span>)</span></a>
          with an integrity calculation using HMAC SHA-256,
          using a 256 bit CMK
          as specified in <a class='info' href='#AESCBC'>Section 4.8<span> (</span><span class='info'>Composite Plaintext Encryption Algorithms "A128CBC+HS256" and "A256CBC+HS512"</span><span>)</span></a>
         </td>
<td align="left">REQUIRED</td>
</tr>
<tr>
<td align="left">A256CBC+HS512</td>
<td align="left">Composite AEAD algorithm using AES in CBC mode with PKCS #5 padding
          with an integrity calculation using HMAC SHA-512,
          using a 512 bit CMK
          as specified in <a class='info' href='#AESCBC'>Section 4.8<span> (</span><span class='info'>Composite Plaintext Encryption Algorithms "A128CBC+HS256" and "A256CBC+HS512"</span><span>)</span></a>
          </td>
<td align="left">REQUIRED</td>
</tr>
<tr>
<td align="left">A128GCM</td>
<td align="left">AES in Galois/Counter Mode (GCM)
          <a class='info' href='#AES'>[AES]<span> (</span><span class='info'>National Institute of Standards and Technology (NIST), “Advanced Encryption Standard (AES),” November 2001.</span><span>)</span></a> <a class='info' href='#NIST.800-38D'>[NIST.800‑38D]<span> (</span><span class='info'>National Institute of Standards and Technology (NIST), “Recommendation for Block Cipher Modes of Operation:           Galois/Counter Mode (GCM) and GMAC,” December 2001.</span><span>)</span></a>
          using 128 bit keys</td>
<td align="left">RECOMMENDED</td>
</tr>
<tr>
<td align="left">A256GCM</td>
<td align="left">AES GCM
          using 256 bit keys</td>
<td align="left">RECOMMENDED</td>
</tr>
</table>
<br clear="all" />

<p>
          All the names are short because a core goal of JWE is
          for the representations to be compact.  However, there is no
          a priori length restriction on <tt>alg</tt> values.
        
</p>
<p>
          See <a class='info' href='#EncAlgXref'>Appendix B<span> (</span><span class='info'>Encryption Algorithm Identifier Cross-Reference</span><span>)</span></a> for a table cross-referencing the
          encryption <tt>alg</tt> (algorithm) and
          <tt>enc</tt> (encryption method)
          values used in this specification
          with the equivalent identifiers used by other
          standards and software packages.
        
</p>
<a name="KeyEncryptionRSA15"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.3"></a><h3>4.3. 
Key Encryption with RSAES-PKCS1-V1_5</h3>

<p>
          This section defines the specifics of encrypting a JWE CMK with
          RSAES-PKCS1-V1_5 <a class='info' href='#RFC3447'>[RFC3447]<span> (</span><span class='info'>Jonsson, J. and B. Kaliski, “Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1,” February 2003.</span><span>)</span></a>.
          The <tt>alg</tt> header parameter value
          <tt>RSA1_5</tt> is used in this case.
        
</p>
<p>
          A key of size 2048 bits or larger MUST be used with this algorithm.
        
</p>
<a name="KeyEncryptionRSAOAEP"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.4"></a><h3>4.4. 
Key Encryption with RSAES OAEP</h3>

<p>
          This section defines the specifics of encrypting a JWE CMK with
          RSAES using Optimal Asymmetric Encryption Padding (OAEP)
          <a class='info' href='#RFC3447'>[RFC3447]<span> (</span><span class='info'>Jonsson, J. and B. Kaliski, “Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1,” February 2003.</span><span>)</span></a>, with the
          default parameters specified by RFC 3447 in Section A.2.1.
          The <tt>alg</tt> header parameter value
          <tt>RSA-OAEP</tt> is used in this case.
        
</p>
<p>
          A key of size 2048 bits or larger MUST be used with this algorithm.
        
</p>
<a name="KeyEncryptionAESKW"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.5"></a><h3>4.5. 
Key Encryption with AES Key Wrap</h3>

<p>
          This section defines the specifics of encrypting a JWE CMK with
          the Advanced Encryption Standard (AES) Key Wrap Algorithm
          <a class='info' href='#RFC3394'>[RFC3394]<span> (</span><span class='info'>Schaad, J. and R. Housley, “Advanced Encryption Standard (AES) Key Wrap Algorithm,” September 2002.</span><span>)</span></a>
          using 128 or 256 bit keys.
          The <tt>alg</tt> header parameter values
          <tt>A128KW</tt> or <tt>A256KW</tt>
          are used in this case.
        
</p>
<a name="DirectEncryption"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.6"></a><h3>4.6. 
Direct Encryption with a Shared Symmetric Key</h3>

<p>
          This section defines the specifics of directly performing symmetric key
          encryption without performing a key wrapping step.  In this case,
          the shared symmetric key is used directly as the Content Master Key (CMK)
          value for the <tt>enc</tt> algorithm.
          An empty byte array is used as the JWE Encrypted Key value.
          The <tt>alg</tt> header parameter value
          <tt>dir</tt>
          is used in this case.
        
</p>
<a name="ECDHES"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.7"></a><h3>4.7. 
Key Agreement with Elliptic Curve Diffie-Hellman Ephemeral Static (ECDH-ES)</h3>

<p>
          This section defines the specifics of key agreement with
          Elliptic Curve Diffie-Hellman Ephemeral Static <a class='info' href='#RFC6090'>[RFC6090]<span> (</span><span class='info'>McGrew, D., Igoe, K., and M. Salter, “Fundamental Elliptic Curve Cryptography Algorithms,” February 2011.</span><span>)</span></a>,
          and using the
          Concat KDF, as defined in Section 5.8.1 of <a class='info' href='#NIST.800-56A'>[NIST.800‑56A]<span> (</span><span class='info'>National Institute of Standards and Technology (NIST), “Recommendation for Pair-Wise Key Establishment Schemes Using Discrete Logarithm Cryptography (Revised),” March 2007.</span><span>)</span></a>.
          The key agreement result can be used in one of two ways:
          (1) directly as the Content Master Key (CMK) for the
          <tt>enc</tt> algorithm, or
          (2) as a symmetric key used to wrap the CMK with either the
          <tt>A128KW</tt> or <tt>A256KW</tt>
          algorithms.
          The <tt>alg</tt> header parameter values
          <tt>ECDH-ES</tt>,
          <tt>ECDH-ES+A128KW</tt>, and
          <tt>ECDH-ES+A256KW</tt>
          are respectively used in this case.
        
</p>
<p>
          In the direct case, the output of the Concat KDF MUST be a key of the
          same length as that used by the
          <tt>enc</tt> algorithm;
          in this case, the empty byte array is used as the JWE Encrypted Key value.
          In the key wrap case, the output of the Concat KDF MUST be a key of the
          length needed for the specified key wrap algorithm,
          either 128 or 256 bits respectively.
        
</p>
<p>
          A new <tt>epk</tt> (ephemeral public key)
          value MUST be generated for each key agreement transaction.
        
</p>
<a name="KeyDerivECDHES"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.7.1"></a><h3>4.7.1. 
Key Derivation for "ECDH-ES"</h3>

<p>
            The key derivation process derives the agreed upon key from the
            ECDH-ES output.
          
</p>
<p>
            Key derivation is performed using the Concat KDF, as
            defined in Section 5.8.1 of <a class='info' href='#NIST.800-56A'>[NIST.800‑56A]<span> (</span><span class='info'>National Institute of Standards and Technology (NIST), “Recommendation for Pair-Wise Key Establishment Schemes Using Discrete Logarithm Cryptography (Revised),” March 2007.</span><span>)</span></a>, where the Digest
            Method is SHA-256.
            The Concat KDF parameters are set as follows:
            </p>
<blockquote class="text"><dl>
<dt>keydatalen</dt>
<dd>
                This is set to the number of bits in the desired output key.
                For <tt>ECDH-ES</tt>, this is length of the key
                used by the <tt>enc</tt> algorithm.
                For <tt>ECDH-ES+A128KW</tt>, and
                <tt>ECDH-ES+A256KW</tt>, this is
                128 and 256, respectively.
              
</dd>
<dt>AlgorithmID</dt>
<dd>
                This is set to the concatenation of keydatalen represented as a
                32 bit big endian integer and
                the bytes of the UTF-8 representation of the
                <tt>alg</tt> header parameter value.
              
</dd>
<dt>PartyUInfo</dt>
<dd>
                If an <tt>apu</tt> (agreement PartyUInfo)
                header parameter is present, this is set to the result of
                base64url decoding the <tt>apu</tt> value;
                otherwise, it is set to the empty byte string.
              
</dd>
<dt>PartyVInfo</dt>
<dd>
                If an <tt>apv</tt> (agreement PartyVInfo)
                header parameter is present, this is set to the result of
                base64url decoding the <tt>apv</tt> value;
                otherwise, it is set to the empty byte string.
              
</dd>
<dt>SuppPubInfo</dt>
<dd>
                This is set to the empty byte string.
              
</dd>
<dt>SuppPrivInfo</dt>
<dd>
                This is set to the empty byte string.
              
</dd>
</dl></blockquote><p>
          
</p>
<p>
            For all three <tt>alg</tt> values,
            the digest function used is SHA-256.
          
</p>
<a name="AESCBC"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.8"></a><h3>4.8. 
Composite Plaintext Encryption Algorithms "A128CBC+HS256" and "A256CBC+HS512"</h3>

<p>
          This section defines two composite <tt>enc</tt>
          algorithms that perform plaintext encryption using non-AEAD
          algorithms and add an integrity check calculation, so that
          the resulting composite algorithms are AEAD.
          These composite algorithms derive a Content Encryption Key (CEK) and a
          Content Integrity Key (CIK) from a Content Master Key,
          per <a class='info' href='#KeyDerivCBC'>Section 4.8.1<span> (</span><span class='info'>Key Derivation for "A128CBC+HS256" and "A256CBC+HS512"</span><span>)</span></a>.
          They perform block encryption with AES CBC,
          per <a class='info' href='#PlaintextEncryptionCBC'>Section 4.8.2<span> (</span><span class='info'>Encryption Calculation for "A128CBC+HS256" and "A256CBC+HS512"</span><span>)</span></a>.
          Finally, they add an integrity check using HMAC SHA-2 algorithms of
          matching strength, per <a class='info' href='#IntHMAC'>Section 4.8.3<span> (</span><span class='info'>Integrity Calculation for "A128CBC+HS256" and "A256CBC+HS512"</span><span>)</span></a>.
        
</p>
<p>
          A 256 bit Content Master Key (CMK) value is used with the
          <tt>A128CBC+HS256</tt> algorithm.
          A 512 bit Content Master Key (CMK) value is used with the
          <tt>A256CBC+HS512</tt> algorithm.
        
</p>
<a name="KeyDerivCBC"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.8.1"></a><h3>4.8.1. 
Key Derivation for "A128CBC+HS256" and "A256CBC+HS512"</h3>

<p>
            The key derivation process derives CEK and CIK values from the CMK.
            This section defines the specifics of deriving keys for the
            <tt>enc</tt> algorithms
            <tt>A128CBC+HS256</tt> and
            <tt>A256CBC+HS512</tt>.
          
</p>
<p>
            Key derivation is performed using the Concat KDF, as
            defined in Section 5.8.1 of <a class='info' href='#NIST.800-56A'>[NIST.800‑56A]<span> (</span><span class='info'>National Institute of Standards and Technology (NIST), “Recommendation for Pair-Wise Key Establishment Schemes Using Discrete Logarithm Cryptography (Revised),” March 2007.</span><span>)</span></a>, where the Digest
            Method is SHA-256 or SHA-512, respectively.
            The Concat KDF parameters are set as follows:
            </p>
<blockquote class="text"><dl>
<dt>keydatalen</dt>
<dd>
                This is set to the number of bits in the desired output key.
              
</dd>
<dt>AlgorithmID</dt>
<dd>
                This is set to the concatenation of keydatalen represented as a
                32 bit big endian integer and
                the bytes of the UTF-8 representation of the
                <tt>enc</tt> header parameter value.
              
</dd>
<dt>PartyUInfo</dt>
<dd>
                If an <tt>epu</tt> (encryption PartyUInfo)
                header parameter is present, this is set to the result of
                base64url decoding the <tt>epu</tt> value;
                otherwise, it is set to the empty byte string.
              
</dd>
<dt>PartyVInfo</dt>
<dd>
                If an <tt>epv</tt> (encryption PartyVInfo)
                header parameter is present, this is set to the result of
                base64url decoding the <tt>epv</tt> value;
                otherwise, it is set to the empty byte string.
              
</dd>
<dt>SuppPubInfo</dt>
<dd>
                This is set to the bytes of one of the ASCII strings
                "Encryption" ([69, 110, 99, 114, 121, 112, 116, 105, 111, 110]) or
                "Integrity" ([73, 110, 116, 101, 103, 114, 105, 116, 121]) respectively,
                depending upon whether the CEK or CIK is being generated.
              
</dd>
<dt>SuppPrivInfo</dt>
<dd>
                This is set to the empty byte string.
              
</dd>
</dl></blockquote><p>
          
</p>
<p>
            To compute the CEK from the CMK, the ASCII label "Encryption"
            is used for the SuppPubInfo value.
            For <tt>A128CBC+HS256</tt>, the keydatalen is 128 and
            the digest function used is SHA-256.
            For <tt>A256CBC+HS512</tt>, the keydatalen is 256 and
            the digest function used is SHA-512.
          
</p>
<p>
            To compute the CIK from the CMK, the ASCII label "Integrity"
            is used for the SuppPubInfo value.
            For <tt>A128CBC+HS256</tt>, the keydatalen is 256 and
            the digest function used is SHA-256.
            For <tt>A256CBC+HS512</tt>, the keydatalen is 512 and
            the digest function used is SHA-512.
          
</p>
<p>
            Example derivation computations are shown in Appendices A.4 and A.5 of
            <a class='info' href='#JWE'>[JWE]<span> (</span><span class='info'>Jones, M., Rescorla, E., and J. Hildebrand, “JSON Web Encryption (JWE),” October 2012.</span><span>)</span></a>.
          
</p>
<a name="PlaintextEncryptionCBC"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.8.2"></a><h3>4.8.2. 
Encryption Calculation for "A128CBC+HS256" and "A256CBC+HS512"</h3>

<p>
            This section defines the specifics of encrypting the JWE Plaintext with
            Advanced Encryption Standard (AES) in Cipher Block Chaining (CBC) mode with PKCS #5 padding
            <a class='info' href='#AES'>[AES]<span> (</span><span class='info'>National Institute of Standards and Technology (NIST), “Advanced Encryption Standard (AES),” November 2001.</span><span>)</span></a> <a class='info' href='#NIST.800-38A'>[NIST.800‑38A]<span> (</span><span class='info'>National Institute of Standards and Technology (NIST), “Recommendation for Block Cipher Modes of Operation,” December 2001.</span><span>)</span></a>
            using 128 or 256 bit keys.
            The <tt>enc</tt> header parameter values
            <tt>A128CBC+HS256</tt> or
            <tt>A256CBC+HS512</tt>
            are respectively used in this case.
          
</p>
<p>
            The CEK is used as the encryption key.
          
</p>
<p>
            Use of an initialization vector of size 128 bits is
            REQUIRED with these algorithms.
          
</p>
<p>
            An example encryption calculation is shown in
            Appendix A.2 of <a class='info' href='#JWE'>[JWE]<span> (</span><span class='info'>Jones, M., Rescorla, E., and J. Hildebrand, “JSON Web Encryption (JWE),” October 2012.</span><span>)</span></a>.
          
</p>
<a name="IntHMAC"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.8.3"></a><h3>4.8.3. 
Integrity Calculation for "A128CBC+HS256" and "A256CBC+HS512"</h3>

<p>
            This section defines the specifics of computing the JWE Integrity Value for the
            <tt>enc</tt> algorithms
            <tt>A128CBC+HS256</tt> and
            <tt>A256CBC+HS512</tt>.
            This value is computed as a MAC of the JWE parameters to
            be secured.
          
</p>
<p>
            The MAC input value is the bytes of the ASCII
            representation of the concatenation of
            the Encoded JWE Header, a period ('.') character,
            the Encoded JWE Encrypted Key, a second period character ('.'),
            the Encoded JWE Initialization Vector, a third period ('.') character, and
            the Encoded JWE Ciphertext.
          
</p>
<p>
            The CIK is used as the MAC key.
          
</p>
<p>
            For <tt>A128CBC+HS256</tt>, HMAC SHA-256
            is used as the MAC algorithm.
            For <tt>A256CBC+HS512</tt>, HMAC SHA-512
            is used as the MAC algorithm.
          
</p>
<p>
            The resulting MAC value is used as the JWE Integrity Value.
            The same integrity calculation is performed during decryption.
            During decryption, the computed integrity value must match
            the received JWE integrity value.
          
</p>
<p>
            An example integrity value calculation is shown in
            Appendix A.2 of <a class='info' href='#JWE'>[JWE]<span> (</span><span class='info'>Jones, M., Rescorla, E., and J. Hildebrand, “JSON Web Encryption (JWE),” October 2012.</span><span>)</span></a>.
          
</p>
<a name="PlaintextEncryptionGCM"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.9"></a><h3>4.9. 
Plaintext Encryption with AES GCM</h3>

<p>
          This section defines the specifics of encrypting the JWE Plaintext with
          Advanced Encryption Standard (AES) in Galois/Counter Mode (GCM)
          <a class='info' href='#AES'>[AES]<span> (</span><span class='info'>National Institute of Standards and Technology (NIST), “Advanced Encryption Standard (AES),” November 2001.</span><span>)</span></a> <a class='info' href='#NIST.800-38D'>[NIST.800‑38D]<span> (</span><span class='info'>National Institute of Standards and Technology (NIST), “Recommendation for Block Cipher Modes of Operation:           Galois/Counter Mode (GCM) and GMAC,” December 2001.</span><span>)</span></a>
          using 128 or 256 bit keys.
          The <tt>enc</tt> header parameter values
          <tt>A128GCM</tt> or <tt>A256GCM</tt>
          are used in this case.
        
</p>
<p>
            The CMK is used as the encryption key.
          
</p>
<p>
          Use of an initialization vector of size 96 bits is
          REQUIRED with this algorithm.
        
</p>
<p>
          The "additional authenticated data" parameter is used to
          secure the header and key values.
          The "additional authenticated data" value used is the bytes of the ASCII
          representation of the concatenation of
          the Encoded JWE Header, a period ('.') character,
          the Encoded JWE Encrypted Key, a second period character ('.'), and
          the Encoded JWE Initialization Vector.
          This same "additional authenticated data" value is used when decrypting as well.
        
</p>
<p>
          The requested size of the "authentication tag" output MUST be
          128 bits, regardless of the key size.
        
</p>
<p>
          As GCM is an AEAD algorithm, the JWE Integrity Value is set
          to be the "authentication tag" value produced by the encryption.
          During decryption, the received JWE integrity value is used as the
          "authentication tag" value.
        
</p>
<a name="MoreEncAlgs"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.10"></a><h3>4.10. 
Additional Encryption Algorithms and Parameters</h3>

<p>
          Additional algorithms MAY be used to protect JWEs with
          corresponding <tt>alg</tt> (algorithm) and
          <tt>enc</tt> (encryption method)
          header parameter values being
          defined to refer to them.  New
          <tt>alg</tt> and
          <tt>enc</tt>
          header parameter values SHOULD
          either be registered in the IANA JSON Web Signature and Encryption Algorithms
          registry <a class='info' href='#JWSJWEAlgsReg'>Section 6.1<span> (</span><span class='info'>JSON Web Signature and Encryption Algorithms Registry</span><span>)</span></a> or be
          a URI that contains a Collision Resistant Namespace.
          In particular, it is permissible to use the algorithm identifiers defined in
          <a class='info' href='#W3C.REC-xmlenc-core-20021210'>XML Encryption<span> (</span><span class='info'>Eastlake, D. and J. Reagle, “XML Encryption Syntax and Processing,” December 2002.</span><span>)</span></a> [W3C.REC‑xmlenc‑core‑20021210],
          <a class='info' href='#W3C.CR-xmlenc-core1-20120313'>XML Encryption 1.1<span> (</span><span class='info'>Eastlake, D., Reagle, J., Hirsch, F., and T. Roessler, “XML Encryption Syntax and Processing Version 1.1,” March 2012.</span><span>)</span></a> [W3C.CR‑xmlenc‑core1‑20120313],
          and related specifications as
          <tt>alg</tt> and
          <tt>enc</tt> values.
        
</p>
<p>
          As indicated by the common registry, JWSs and JWEs share a
          common <tt>alg</tt> value space.
          The values used by the two specifications MUST be distinct,
          as the <tt>alg</tt> value MAY be used
          to determine whether the object is a JWS or JWE.
        
</p>
<p>
          Likewise, additional reserved header parameter names MAY be defined
          via the IANA JSON Web Signature and Encryption Header Parameters registry
          <a class='info' href='#JWS'>[JWS]<span> (</span><span class='info'>Jones, M., Bradley, J., and N. Sakimura, “JSON Web Signature (JWS),” October 2012.</span><span>)</span></a>.
          As indicated by the common registry, JWSs and JWEs share a
          common header parameter space; when a parameter is used by
          both specifications, its usage must be compatible
          between the specifications.
        
</p>
<a name="JWKAlgs"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5"></a><h3>5. 
Cryptographic Algorithms for JWK</h3>

<p>
        A JSON Web Key (JWK) <a class='info' href='#JWK'>[JWK]<span> (</span><span class='info'>Jones, M., “JSON Web Key (JWK),” October 2012.</span><span>)</span></a> is a
        JavaScript Object Notation (JSON) <a class='info' href='#RFC4627'>[RFC4627]<span> (</span><span class='info'>Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.</span><span>)</span></a>
        data structure that represents a public key.  A JSON Web Key Set
        (JWK Set) is a JSON data structure for representing a set of JWKs.
        This section specifies a set of algorithm families to be used
        for those public keys and the algorithm family specific
        parameters for representing those keys.
      
</p>
<a name="JWKAlgValues"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.1"></a><h3>5.1. 
"alg" (Algorithm Family) Parameter Values for JWK</h3>

<p>
          The table below is the set of
          <tt>alg</tt> (algorithm family) parameter
          values that are defined by this specification for use in JWKs.
        
</p><table class="full" align="center" border="0" cellpadding="2" cellspacing="2">
<col align="left"><col align="left"><col align="left">
<tr><th align="left">alg Parameter Value</th><th align="left">Algorithm Family</th><th align="left">Implementation Requirements</th></tr>
<tr>
<td align="left">EC</td>
<td align="left">Elliptic Curve <a class='info' href='#DSS'>[DSS]<span> (</span><span class='info'>National Institute of Standards and             Technology, “Digital Signature Standard (DSS),” June 2009.</span><span>)</span></a> key family</td>
<td align="left">RECOMMENDED+</td>
</tr>
<tr>
<td align="left">RSA</td>
<td align="left">RSA <a class='info' href='#RFC3447'>[RFC3447]<span> (</span><span class='info'>Jonsson, J. and B. Kaliski, “Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1,” February 2003.</span><span>)</span></a> key family</td>
<td align="left">REQUIRED</td>
</tr>
</table>
<br clear="all" />

<p>
          All the names are short because a core goal of JWK is
          for the representations to be compact.  However, there is no
          a priori length restriction on <tt>alg</tt> values.
        
</p>
<p>
          The use of "+" in the Implementation Requirements
          indicates that the requirement strength is likely
          to be increased in a future version of the specification. 
        
</p>
<a name="JWKEC"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.2"></a><h3>5.2. 
JWK Parameters for Elliptic Curve Keys</h3>

<p>
          JWKs can represent Elliptic Curve <a class='info' href='#DSS'>[DSS]<span> (</span><span class='info'>National Institute of Standards and             Technology, “Digital Signature Standard (DSS),” June 2009.</span><span>)</span></a> keys.  In
          this case, the <tt>alg</tt>
          member value MUST be <tt>EC</tt>.
          Furthermore, these additional members MUST be present:
        
</p>
<a name="crvDef"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.2.1"></a><h3>5.2.1. 
"crv" (Curve) Parameter</h3>

<p>
            The <tt>crv</tt> (curve) member identifies
            the cryptographic curve used with the key.  Curve values
            from <a class='info' href='#DSS'>[DSS]<span> (</span><span class='info'>National Institute of Standards and             Technology, “Digital Signature Standard (DSS),” June 2009.</span><span>)</span></a> used by this specification are:
            </p>
<ul class="text">
<li><tt>P-256</tt>
</li>
<li><tt>P-384</tt>
</li>
<li><tt>P-521</tt>
</li>
</ul><p>
            Additional <tt>crv</tt> values MAY be used, provided
            they are understood by implementations using that Elliptic Curve key.
            The <tt>crv</tt> value is a case sensitive string.
          
</p>
<a name="xDef"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.2.2"></a><h3>5.2.2. 
"x" (X Coordinate) Parameter</h3>

<p>
            The <tt>x</tt> (x coordinate) member contains the
            x coordinate for the elliptic curve point.  It is
            represented as the base64url encoding of the
            coordinate's big endian representation as a byte array.
            The array representation MUST not be shortened
            to omit any leading zero bytes contained in the value.
            For instance, when representing 521 bit integers,
            the byte array to be base64url encoded MUST contain 66 bytes,
            including any leading zero bytes.
          
</p>
<a name="yDef"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.2.3"></a><h3>5.2.3. 
"y" (Y Coordinate) Parameter</h3>

<p>
            The <tt>y</tt> (y coordinate) member contains the
            y coordinate for the elliptic curve point.  It is
            represented as the base64url encoding of the
            coordinate's big endian representation as a byte array.
            The array representation MUST not be shortened
            to omit any leading zero bytes contained in the value.
            For instance, when representing 521 bit integers,
            the byte array to be base64url encoded MUST contain 66 bytes,
            including any leading zero bytes.
          
</p>
<a name="JWKRSA"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.3"></a><h3>5.3. 
JWK Parameters for RSA Keys</h3>

<p>
          JWKs can represent RSA <a class='info' href='#RFC3447'>[RFC3447]<span> (</span><span class='info'>Jonsson, J. and B. Kaliski, “Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1,” February 2003.</span><span>)</span></a> keys.  In
          this case, the <tt>alg</tt>
          member value MUST be <tt>RSA</tt>.
          Furthermore, these additional members MUST be present:
        
</p>
<a name="modDef"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.3.1"></a><h3>5.3.1. 
"mod" (Modulus) Parameter</h3>

<p>
            The <tt>mod</tt> (modulus) member contains
            the modulus value for the RSA public key.  It is
            represented as the base64url encoding of the value's
            unsigned big endian representation as a byte array.
            The array representation MUST not be shortened
            to omit any leading zero bytes.
            For instance, when representing 2048 bit integers,
            the byte array to be base64url encoded MUST contain 256 bytes,
            including any leading zero bytes.
          
</p>
<a name="xpoDef"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.3.2"></a><h3>5.3.2. 
"xpo" (Exponent) Parameter</h3>

<p>
            The <tt>xpo</tt> (exponent) member contains
            the exponent value for the RSA public key.  It is
            represented as the base64url encoding of the value's
            unsigned big endian representation as a byte array.
            The array representation MUST utilize the minimum
            number of bytes to represent the value.
            For instance, when representing the value 65537,
            the byte array to be base64url encoded MUST consist of the
            three bytes [1, 0, 1].
          
</p>
<a name="MoreKeyAlgs"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.4"></a><h3>5.4. 
Additional Key Algorithm Families and Parameters</h3>

<p>
          Public keys using additional algorithm families MAY be
          represented using JWK data structures with corresponding
          <tt>alg</tt> (algorithm family) parameter
          values being defined to refer to them.
          New <tt>alg</tt> parameter values SHOULD
          either be registered in the
          IANA JSON Web Key Algorithm Families registry <a class='info' href='#KeyAlgRegistry'>Section 6.2<span> (</span><span class='info'>JSON Web Key Algorithm Families Registry</span><span>)</span></a> or be
          a URI that contains a Collision Resistant Namespace.
        
</p>
<p>
          Likewise, parameters for representing keys for additional
          algorithm families or additional key properties
          SHOULD either be registered in the
          IANA JSON Web Key Parameters registry <a class='info' href='#JWK'>[JWK]<span> (</span><span class='info'>Jones, M., “JSON Web Key (JWK),” October 2012.</span><span>)</span></a> or be
          a URI that contains a Collision Resistant Namespace.
        
</p>
<a name="IANA"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.6"></a><h3>6. 
IANA Considerations</h3>

<p>
        The following registration procedure is used for all the
        registries established by this specification.
      
</p>
<p>
        Values are registered with a Specification Required
        <a class='info' href='#RFC5226'>[RFC5226]<span> (</span><span class='info'>Narten, T. and H. Alvestrand, “Guidelines for Writing an IANA Considerations Section in RFCs,” May 2008.</span><span>)</span></a> after a two week review period on the [TBD]@ietf.org mailing
        list, on the advice of one or more Designated Experts. However, to allow for the
        allocation of values prior to publication, the Designated Expert(s) may approve
        registration once they are satisfied that such a specification will be published.
      
</p>
<p>
        Registration requests must be sent to the [TBD]@ietf.org mailing list for review and
        comment, with an appropriate subject (e.g., "Request for access token type: example").
        [[ Note to RFC-EDITOR: The name of the mailing list should be determined in consultation
        with the IESG and IANA. Suggested name: jose-reg-review. ]]
      
</p>
<p>
        Within the review period, the Designated Expert(s) will either approve or
        deny the registration request, communicating this decision to the review list and IANA.
        Denials should include an explanation and, if applicable, suggestions as to how to make
        the request successful.
      
</p>
<p>
        IANA must only accept registry updates from the Designated Expert(s), and should direct
        all requests for registration to the review mailing list.
      
</p>
<a name="JWSJWEAlgsReg"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.6.1"></a><h3>6.1. 
JSON Web Signature and Encryption Algorithms Registry</h3>

<p>
          This specification establishes the
          IANA JSON Web Signature and Encryption Algorithms registry
          for values of the JWS and JWE
          <tt>alg</tt> (algorithm) and
          <tt>enc</tt> (encryption method)
          header parameters.
          The registry records the algorithm name,
          the algorithm usage locations from the set
          <tt>alg</tt> and
          <tt>enc</tt>,
          implementation requirements,
          and a reference to the specification that defines it.
          The same algorithm name may be registered multiple times,
          provided that the sets of usage locations are disjoint.
          The implementation requirements of an algorithm may be changed
          over time by the Designated Experts(s) as the
          cryptographic landscape evolves, for instance,
          to change the status of an algorithm to DEPRECATED, or
          to change the status of an algorithm from OPTIONAL
          to RECOMMENDED or REQUIRED.
        
</p>
<a name="anchor9"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.6.1.1"></a><h3>6.1.1. 
Registration Template</h3>

<p>
            </p>
<blockquote class="text"><dl>
<dt>Algorithm Name:</dt>
<dd>
                
                The name requested (e.g., "example").
                This name is case sensitive.  Names that match other registered names
                in a case insensitive manner SHOULD NOT be accepted.
              
</dd>
<dt>Algorithm Usage Location(s):</dt>
<dd>
                
                The algorithm usage, which must be one or more of the values
                <tt>alg</tt> or
                <tt>enc</tt>.
              
</dd>
<dt>Implementation Requirements:</dt>
<dd>
                
                The algorithm implementation requirements, which must be one the words
                REQUIRED, RECOMMENDED, OPTIONAL, or DEPRECATED.
                Optionally, the word may be followed by a "+" or "-".
                The use of "+" indicates that the requirement strength is likely
                to be increased in a future version of the specification. 
                The use of "-" indicates that the requirement strength is likely
                to be decreased in a future version of the specification.
              
</dd>
<dt>Change Controller:</dt>
<dd>
                
                For standards-track RFCs, state "IETF". For others, give the name of the
                responsible party. Other details (e.g., postal address, e-mail address, home page
                URI) may also be included.
              
</dd>
<dt>Specification Document(s):</dt>
<dd>
                
                Reference to the document that specifies the parameter, preferably including a URI that
                can be used to retrieve a copy of the document. An indication of the relevant
                sections may also be included, but is not required.
              
</dd>
</dl></blockquote><p>
          
</p>
<a name="anchor10"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.6.1.2"></a><h3>6.1.2. 
Initial Registry Contents</h3>

<p>
            </p>
<ul class="text">
<li>
                Algorithm Name: <tt>HS256</tt>
              
</li>
<li>
                Algorithm Usage Location(s): <tt>alg</tt>
              
</li>
<li>
                Implementation Requirements: REQUIRED
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWSAlgValues'>Section 3.1<span> (</span><span class='info'>"alg" (Algorithm) Header Parameter Values for JWS</span><span>)</span></a>
                of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Algorithm Name: <tt>HS384</tt>
              
</li>
<li>
                Algorithm Usage Location(s): <tt>alg</tt>
              
</li>
<li>
                Implementation Requirements: OPTIONAL
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWSAlgValues'>Section 3.1<span> (</span><span class='info'>"alg" (Algorithm) Header Parameter Values for JWS</span><span>)</span></a>
                of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Algorithm Name: <tt>HS512</tt>
              
</li>
<li>
                Algorithm Usage Location(s): <tt>alg</tt>
              
</li>
<li>
                Implementation Requirements: OPTIONAL
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWSAlgValues'>Section 3.1<span> (</span><span class='info'>"alg" (Algorithm) Header Parameter Values for JWS</span><span>)</span></a>
                of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Algorithm Name: <tt>RS256</tt>
              
</li>
<li>
                Algorithm Usage Location(s): <tt>alg</tt>
              
</li>
<li>
                Implementation Requirements: RECOMMENDED
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWSAlgValues'>Section 3.1<span> (</span><span class='info'>"alg" (Algorithm) Header Parameter Values for JWS</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Algorithm Name: <tt>RS384</tt>
              
</li>
<li>
                Algorithm Usage Location(s): <tt>alg</tt>
              
</li>
<li>
                Implementation Requirements: OPTIONAL
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWSAlgValues'>Section 3.1<span> (</span><span class='info'>"alg" (Algorithm) Header Parameter Values for JWS</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Algorithm Name: <tt>RS512</tt>
              
</li>
<li>
                Algorithm Usage Location(s): <tt>alg</tt>
              
</li>
<li>
                Implementation Requirements: OPTIONAL
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWSAlgValues'>Section 3.1<span> (</span><span class='info'>"alg" (Algorithm) Header Parameter Values for JWS</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Algorithm Name: <tt>ES256</tt>
              
</li>
<li>
                Algorithm Usage Location(s): <tt>alg</tt>
              
</li>
<li>
                Implementation Requirements: RECOMMENDED+
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWSAlgValues'>Section 3.1<span> (</span><span class='info'>"alg" (Algorithm) Header Parameter Values for JWS</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Algorithm Name: <tt>ES384</tt>
              
</li>
<li>
                Algorithm Usage Location(s): <tt>alg</tt>
              
</li>
<li>
                Implementation Requirements: OPTIONAL
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWSAlgValues'>Section 3.1<span> (</span><span class='info'>"alg" (Algorithm) Header Parameter Values for JWS</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Algorithm Name: <tt>ES512</tt>
              
</li>
<li>
                Algorithm Usage Location(s): <tt>alg</tt>
              
</li>
<li>
                Implementation Requirements: OPTIONAL
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWSAlgValues'>Section 3.1<span> (</span><span class='info'>"alg" (Algorithm) Header Parameter Values for JWS</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Algorithm Name: <tt>none</tt>
              
</li>
<li>
                Algorithm Usage Location(s): <tt>alg</tt>
              
</li>
<li>
                Implementation Requirements: REQUIRED
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWSAlgValues'>Section 3.1<span> (</span><span class='info'>"alg" (Algorithm) Header Parameter Values for JWS</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Algorithm Name: <tt>RSA1_5</tt>
              
</li>
<li>
                Algorithm Usage Location(s): <tt>alg</tt>
              
</li>
<li>
                Implementation Requirements: REQUIRED
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWEAlgValues'>Section 4.1<span> (</span><span class='info'>"alg" (Algorithm) Header Parameter Values for JWE</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Algorithm Name: <tt>RSA-OAEP</tt>
              
</li>
<li>
                Algorithm Usage Location(s): <tt>alg</tt>
              
</li>
<li>
                Implementation Requirements: OPTIONAL
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWEAlgValues'>Section 4.1<span> (</span><span class='info'>"alg" (Algorithm) Header Parameter Values for JWE</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Algorithm Name: <tt>A128KW</tt>
              
</li>
<li>
                Algorithm Usage Location(s): <tt>alg</tt>
              
</li>
<li>
                Implementation Requirements: RECOMMENDED
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWEAlgValues'>Section 4.1<span> (</span><span class='info'>"alg" (Algorithm) Header Parameter Values for JWE</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Algorithm Name: <tt>A256KW</tt>
              
</li>
<li>
                Algorithm Usage Location(s): <tt>alg</tt>
              
</li>
<li>
                Implementation Requirements: RECOMMENDED
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWEAlgValues'>Section 4.1<span> (</span><span class='info'>"alg" (Algorithm) Header Parameter Values for JWE</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Algorithm Name: <tt>dir</tt>
              
</li>
<li>
                Algorithm Usage Location(s): <tt>alg</tt>
              
</li>
<li>
                Implementation Requirements: RECOMMENDED
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWEAlgValues'>Section 4.1<span> (</span><span class='info'>"alg" (Algorithm) Header Parameter Values for JWE</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Algorithm Name: <tt>ECDH-ES</tt>
              
</li>
<li>
                Algorithm Usage Location(s): <tt>alg</tt>
              
</li>
<li>
                Implementation Requirements: RECOMMENDED+
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWEAlgValues'>Section 4.1<span> (</span><span class='info'>"alg" (Algorithm) Header Parameter Values for JWE</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Algorithm Name: <tt>ECDH-ES+A128KW</tt>
              
</li>
<li>
                Algorithm Usage Location(s): <tt>alg</tt>
              
</li>
<li>
                Implementation Requirements: RECOMMENDED
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWEAlgValues'>Section 4.1<span> (</span><span class='info'>"alg" (Algorithm) Header Parameter Values for JWE</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Algorithm Name: <tt>ECDH-ES+A256KW</tt>
              
</li>
<li>
                Algorithm Usage Location(s): <tt>alg</tt>
              
</li>
<li>
                Implementation Requirements: RECOMMENDED
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWEAlgValues'>Section 4.1<span> (</span><span class='info'>"alg" (Algorithm) Header Parameter Values for JWE</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Algorithm Name: <tt>A128CBC+HS256</tt>
              
</li>
<li>
                Algorithm Usage Location(s): <tt>enc</tt>
              
</li>
<li>
                Implementation Requirements: REQUIRED
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWEEncValues'>Section 4.2<span> (</span><span class='info'>"enc" (Encryption Method) Header Parameter Values for JWE</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Algorithm Name: <tt>A256CBC+HS512</tt>
              
</li>
<li>
                Algorithm Usage Location(s): <tt>enc</tt>
              
</li>
<li>
                Implementation Requirements: REQUIRED
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWEEncValues'>Section 4.2<span> (</span><span class='info'>"enc" (Encryption Method) Header Parameter Values for JWE</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Algorithm Name: <tt>A128GCM</tt>
              
</li>
<li>
                Algorithm Usage Location(s): <tt>enc</tt>
              
</li>
<li>
                Implementation Requirements: RECOMMENDED
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWEEncValues'>Section 4.2<span> (</span><span class='info'>"enc" (Encryption Method) Header Parameter Values for JWE</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Algorithm Name: <tt>A256GCM</tt>
              
</li>
<li>
                Algorithm Usage Location(s): <tt>enc</tt>
              
</li>
<li>
                Implementation Requirements: RECOMMENDED
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWEEncValues'>Section 4.2<span> (</span><span class='info'>"enc" (Encryption Method) Header Parameter Values for JWE</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
          
</p>
<a name="KeyAlgRegistry"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.6.2"></a><h3>6.2. 
JSON Web Key Algorithm Families Registry</h3>

<p>
          This specification establishes the
          IANA JSON Web Key Algorithm Families registry
          for values of the JWK
          <tt>alg</tt> (algorithm family) parameter.
          The registry records the <tt>alg</tt> value
          and a reference to the specification that defines it.
          This specification registers the values defined in
          <a class='info' href='#JWKAlgValues'>Section 5.1<span> (</span><span class='info'>"alg" (Algorithm Family) Parameter Values for JWK</span><span>)</span></a>.
        
</p>
<a name="anchor11"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.6.2.1"></a><h3>6.2.1. 
Registration Template</h3>

<p>
            </p>
<blockquote class="text"><dl>
<dt>"alg" Parameter Value:</dt>
<dd>
                
                The name requested (e.g., "example").
                This name is case sensitive.  Names that match other registered names
                in a case insensitive manner SHOULD NOT be accepted.
              
</dd>
<dt>Change Controller:</dt>
<dd>
                
                For standards-track RFCs, state "IETF". For others, give the name of the
                responsible party. Other details (e.g., postal address, e-mail address, home page
                URI) may also be included.
              
</dd>
<dt>Implementation Requirements:</dt>
<dd>
                
                The algorithm implementation requirements, which must be one the words
                REQUIRED, RECOMMENDED, OPTIONAL, or DEPRECATED.
                Optionally, the word may be followed by a "+" or "-".
                The use of "+" indicates that the requirement strength is likely
                to be increased in a future version of the specification. 
                The use of "-" indicates that the requirement strength is likely
                to be decreased in a future version of the specification.
              
</dd>
<dt>Specification Document(s):</dt>
<dd>
                
                Reference to the document that specifies the parameter, preferably including a URI that
                can be used to retrieve a copy of the document. An indication of the relevant
                sections may also be included, but is not required.
              
</dd>
</dl></blockquote><p>
          
</p>
<a name="anchor12"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.6.2.2"></a><h3>6.2.2. 
Initial Registry Contents</h3>

<p>
            </p>
<ul class="text">
<li>
                "alg" Parameter Value: <tt>EC</tt>
              
</li>
<li>
                Implementation Requirements: RECOMMENDED+
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWKAlgValues'>Section 5.1<span> (</span><span class='info'>"alg" (Algorithm Family) Parameter Values for JWK</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                "alg" Parameter Value: <tt>RSA</tt>
              
</li>
<li>
                Implementation Requirements: REQUIRED
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#JWKAlgValues'>Section 5.1<span> (</span><span class='info'>"alg" (Algorithm Family) Parameter Values for JWK</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
          
</p>
<a name="anchor13"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.6.3"></a><h3>6.3. 
JSON Web Key Parameters Registration</h3>

<p>
          This specification registers the parameter names defined in
          <a class='info' href='#JWKEC'>Section 5.2<span> (</span><span class='info'>JWK Parameters for Elliptic Curve Keys</span><span>)</span></a> and <a class='info' href='#JWKRSA'>Section 5.3<span> (</span><span class='info'>JWK Parameters for RSA Keys</span><span>)</span></a> in the
          IANA JSON Web Key Parameters registry <a class='info' href='#JWK'>[JWK]<span> (</span><span class='info'>Jones, M., “JSON Web Key (JWK),” October 2012.</span><span>)</span></a>.
        
</p>
<a name="anchor14"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.6.3.1"></a><h3>6.3.1. 
Registry Contents</h3>

<p>
            </p>
<ul class="text">
<li>
                Parameter Name: <tt>crv</tt>
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#crvDef'>Section 5.2.1<span> (</span><span class='info'>"crv" (Curve) Parameter</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Parameter Name: <tt>x</tt>
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#xDef'>Section 5.2.2<span> (</span><span class='info'>"x" (X Coordinate) Parameter</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Parameter Name: <tt>y</tt>
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#yDef'>Section 5.2.3<span> (</span><span class='info'>"y" (Y Coordinate) Parameter</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Parameter Name: <tt>mod</tt>
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#modDef'>Section 5.3.1<span> (</span><span class='info'>"mod" (Modulus) Parameter</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
            </p>
<ul class="text">
<li>
                Parameter Name: <tt>xpo</tt>
              
</li>
<li>
                Change Controller: IETF
              
</li>
<li>
                Specification Document(s): <a class='info' href='#xpoDef'>Section 5.3.2<span> (</span><span class='info'>"xpo" (Exponent) Parameter</span><span>)</span></a> of [[ this document ]]
              
</li>
</ul><p>
          
</p>
<a name="Security"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.7"></a><h3>7. 
Security Considerations</h3>

<p>
        All of the security issues faced by any cryptographic application
        must be faced by a JWS/JWE/JWK agent.  Among these issues are protecting
        the user's private key, preventing various attacks, and helping the
        user avoid mistakes such as inadvertently encrypting a message for
        the wrong recipient.  The entire list of security considerations is
        beyond the scope of this document, but some significant concerns are
        listed here.
      
</p>
<p>
        The security considerations in
        <a class='info' href='#AES'>[AES]<span> (</span><span class='info'>National Institute of Standards and Technology (NIST), “Advanced Encryption Standard (AES),” November 2001.</span><span>)</span></a>,
        <a class='info' href='#DSS'>[DSS]<span> (</span><span class='info'>National Institute of Standards and             Technology, “Digital Signature Standard (DSS),” June 2009.</span><span>)</span></a>,
        <a class='info' href='#JWE'>[JWE]<span> (</span><span class='info'>Jones, M., Rescorla, E., and J. Hildebrand, “JSON Web Encryption (JWE),” October 2012.</span><span>)</span></a>,
        <a class='info' href='#JWK'>[JWK]<span> (</span><span class='info'>Jones, M., “JSON Web Key (JWK),” October 2012.</span><span>)</span></a>,
        <a class='info' href='#JWS'>[JWS]<span> (</span><span class='info'>Jones, M., Bradley, J., and N. Sakimura, “JSON Web Signature (JWS),” October 2012.</span><span>)</span></a>,
        <a class='info' href='#NIST.800-38A'>[NIST.800‑38A]<span> (</span><span class='info'>National Institute of Standards and Technology (NIST), “Recommendation for Block Cipher Modes of Operation,” December 2001.</span><span>)</span></a>,
        <a class='info' href='#NIST.800-38D'>[NIST.800‑38D]<span> (</span><span class='info'>National Institute of Standards and Technology (NIST), “Recommendation for Block Cipher Modes of Operation:      Galois/Counter Mode (GCM) and GMAC,” December 2001.</span><span>)</span></a>,
        <a class='info' href='#NIST.800-56A'>[NIST.800‑56A]<span> (</span><span class='info'>National Institute of Standards and Technology (NIST), “Recommendation for Pair-Wise Key Establishment Schemes Using Discrete Logarithm Cryptography (Revised),” March 2007.</span><span>)</span></a>,
        <a class='info' href='#RFC2104'>[RFC2104]<span> (</span><span class='info'>Krawczyk, H., Bellare, M., and R. Canetti, “HMAC: Keyed-Hashing for Message Authentication,” February 1997.</span><span>)</span></a>,
        <a class='info' href='#RFC3394'>[RFC3394]<span> (</span><span class='info'>Schaad, J. and R. Housley, “Advanced Encryption Standard (AES) Key Wrap Algorithm,” September 2002.</span><span>)</span></a>,
        <a class='info' href='#RFC3447'>[RFC3447]<span> (</span><span class='info'>Jonsson, J. and B. Kaliski, “Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1,” February 2003.</span><span>)</span></a>,
        <a class='info' href='#RFC5116'>[RFC5116]<span> (</span><span class='info'>McGrew, D., “An Interface and Algorithms for Authenticated Encryption,” January 2008.</span><span>)</span></a>,
        <a class='info' href='#RFC6090'>[RFC6090]<span> (</span><span class='info'>McGrew, D., Igoe, K., and M. Salter, “Fundamental Elliptic Curve Cryptography Algorithms,” February 2011.</span><span>)</span></a>, and
        <a class='info' href='#SHS'>[SHS]<span> (</span><span class='info'>National Institute of Standards and             Technology, “Secure Hash Standard (SHS),” October 2008.</span><span>)</span></a> apply to this specification.
      
</p>
<p>
        Eventually the algorithms and/or key sizes currently described
        in this specification will no longer be considered
        sufficiently secure and will be removed.  Therefore,
        implementers and deployments must be prepared for this
        eventuality.
      
</p>
<p>
        Algorithms of matching strength should be used together whenever possible.
        For instance, when AES Key Wrap is used with a given key size,
        using the same key size for AES GCM is recommended.
      
</p>
<p>
        While Section 8 of RFC 3447 <a class='info' href='#RFC3447'>[RFC3447]<span> (</span><span class='info'>Jonsson, J. and B. Kaliski, “Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1,” February 2003.</span><span>)</span></a>
        explicitly calls for people not to adopt RSASSA-PKCS1 for new
        applications and instead requests that people transition to
        RSASSA-PSS, this specification does include RSASSA-PKCS1, for
        interoperability reasons, because it commonly implemented.
      
</p>
<p>
        Keys used with RSAES-PKCS1-v1_5 must follow the constraints in
        Section 7.2 of  RFC 3447 <a class='info' href='#RFC3447'>[RFC3447]<span> (</span><span class='info'>Jonsson, J. and B. Kaliski, “Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1,” February 2003.</span><span>)</span></a>.  In particular, keys with
        a low public key exponent value must not be used.
      
</p>
<p>
        Plaintext JWSs (JWSs that use the <tt>alg</tt>
        value <tt>none</tt>) provide no integrity protection.
        Thus, they must only be used in contexts where the payload is secured by
        means other than a digital signature or MAC value, or need not be secured.
      
</p>
<p>
        Receiving agents that validate signatures and sending agents that
        encrypt messages need to be cautious of cryptographic processing
        usage when validating signatures and encrypting messages using keys
        larger than those mandated in this specification.  An attacker could
        send certificates with keys that would result in excessive
        cryptographic processing, for example, keys larger than those
        mandated in this specification, which could swamp the processing
        element.  Agents that use such keys without first validating the
        certificate to a trust anchor are advised to have some sort of
        cryptographic resource management system to prevent such attacks.
      
</p>
<a name="rfc.references"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.8"></a><h3>8. 
References</h3>

<a name="rfc.references1"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<h3>8.1. Normative References</h3>
<table width="99%" border="0">
<tr><td class="author-text" valign="top"><a name="AES">[AES]</a></td>
<td class="author-text">National Institute of Standards and Technology (NIST), “<a href="http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf">Advanced Encryption Standard (AES)</a>,” FIPS PUB 197, November 2001.</td></tr>
<tr><td class="author-text" valign="top"><a name="DSS">[DSS]</a></td>
<td class="author-text">National Institute of Standards and
            Technology, “<a href="http://csrc.nist.gov/publications/fips/fips186-3/fips_186-3.pdf">Digital Signature Standard (DSS)</a>,” FIPS PUB 186-3, June 2009.</td></tr>
<tr><td class="author-text" valign="top"><a name="JWE">[JWE]</a></td>
<td class="author-text"><a href="mailto:mbj@microsoft.com">Jones, M.</a>, <a href="mailto:ekr@rtfm.com">Rescorla, E.</a>, and <a href="mailto:jhildebr@cisco.com">J. Hildebrand</a>, “<a href="http://tools.ietf.org/html/draft-ietf-jose-json-web-encryption">JSON Web Encryption (JWE)</a>,” October 2012.</td></tr>
<tr><td class="author-text" valign="top"><a name="JWK">[JWK]</a></td>
<td class="author-text"><a href="mailto:mbj@microsoft.com">Jones, M.</a>, “<a href="http://tools.ietf.org/html/draft-ietf-jose-json-web-key">JSON Web Key (JWK)</a>,” October 2012.</td></tr>
<tr><td class="author-text" valign="top"><a name="JWS">[JWS]</a></td>
<td class="author-text"><a href="mailto:mbj@microsoft.com">Jones, M.</a>, <a href="mailto:ve7jtb@ve7jtb.com">Bradley, J.</a>, and <a href="mailto:n-sakimura@nri.co.jp">N. Sakimura</a>, “<a href="http://tools.ietf.org/html/draft-ietf-jose-json-web-signature">JSON Web Signature (JWS)</a>,” October 2012.</td></tr>
<tr><td class="author-text" valign="top"><a name="NIST.800-38A">[NIST.800-38A]</a></td>
<td class="author-text">National Institute of Standards and Technology (NIST), “<a href="http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf">Recommendation for Block Cipher Modes of Operation</a>,” NIST PUB 800-38A, December 2001.</td></tr>
<tr><td class="author-text" valign="top"><a name="NIST.800-38D">[NIST.800-38D]</a></td>
<td class="author-text">National Institute of Standards and Technology (NIST), “<a href="http://csrc.nist.gov/publications/nistpubs/800-38D/SP-800-38D.pdf">Recommendation for Block Cipher Modes of Operation:
          Galois/Counter Mode (GCM) and GMAC</a>,” NIST PUB 800-38D, December 2001.</td></tr>
<tr><td class="author-text" valign="top"><a name="NIST.800-56A">[NIST.800-56A]</a></td>
<td class="author-text">National Institute of Standards and Technology (NIST), “<a href="http://csrc.nist.gov/publications/nistpubs/800-56A/SP800-56A_Revision1_Mar08-2007.pdf">Recommendation for Pair-Wise Key Establishment Schemes Using Discrete Logarithm Cryptography (Revised)</a>,” NIST PUB 800-56A, March 2007.</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC2104">[RFC2104]</a></td>
<td class="author-text"><a href="mailto:hugo@watson.ibm.com">Krawczyk, H.</a>, <a href="mailto:mihir@cs.ucsd.edu">Bellare, M.</a>, and <a href="mailto:canetti@watson.ibm.com">R. Canetti</a>, “<a href="http://tools.ietf.org/html/rfc2104">HMAC: Keyed-Hashing for Message Authentication</a>,” RFC 2104, February 1997 (<a href="http://www.rfc-editor.org/rfc/rfc2104.txt">TXT</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC2119">[RFC2119]</a></td>
<td class="author-text"><a href="mailto:sob@harvard.edu">Bradner, S.</a>, “<a href="http://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>,” BCP 14, RFC 2119, March 1997 (<a href="http://www.rfc-editor.org/rfc/rfc2119.txt">TXT</a>, <a href="http://xml.resource.org/public/rfc/html/rfc2119.html">HTML</a>, <a href="http://xml.resource.org/public/rfc/xml/rfc2119.xml">XML</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC3394">[RFC3394]</a></td>
<td class="author-text">Schaad, J. and R. Housley, “<a href="http://tools.ietf.org/html/rfc3394">Advanced Encryption Standard (AES) Key Wrap Algorithm</a>,” RFC 3394, September 2002 (<a href="http://www.rfc-editor.org/rfc/rfc3394.txt">TXT</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC3447">[RFC3447]</a></td>
<td class="author-text">Jonsson, J. and B. Kaliski, “<a href="http://tools.ietf.org/html/rfc3447">Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1</a>,” RFC 3447, February 2003 (<a href="http://www.rfc-editor.org/rfc/rfc3447.txt">TXT</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC3629">[RFC3629]</a></td>
<td class="author-text">Yergeau, F., “<a href="http://tools.ietf.org/html/rfc3629">UTF-8, a transformation format of ISO 10646</a>,” STD 63, RFC 3629, November 2003 (<a href="http://www.rfc-editor.org/rfc/rfc3629.txt">TXT</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC4627">[RFC4627]</a></td>
<td class="author-text">Crockford, D., “<a href="http://tools.ietf.org/html/rfc4627">The application/json Media Type for JavaScript Object Notation (JSON)</a>,” RFC 4627, July 2006 (<a href="http://www.rfc-editor.org/rfc/rfc4627.txt">TXT</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC4648">[RFC4648]</a></td>
<td class="author-text">Josefsson, S., “<a href="http://tools.ietf.org/html/rfc4648">The Base16, Base32, and Base64 Data Encodings</a>,” RFC 4648, October 2006 (<a href="http://www.rfc-editor.org/rfc/rfc4648.txt">TXT</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC5116">[RFC5116]</a></td>
<td class="author-text">McGrew, D., “<a href="http://tools.ietf.org/html/rfc5116">An Interface and Algorithms for Authenticated Encryption</a>,” RFC 5116, January 2008 (<a href="http://www.rfc-editor.org/rfc/rfc5116.txt">TXT</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC5226">[RFC5226]</a></td>
<td class="author-text">Narten, T. and H. Alvestrand, “<a href="http://tools.ietf.org/html/rfc5226">Guidelines for Writing an IANA Considerations Section in RFCs</a>,” BCP 26, RFC 5226, May 2008 (<a href="http://www.rfc-editor.org/rfc/rfc5226.txt">TXT</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC6090">[RFC6090]</a></td>
<td class="author-text">McGrew, D., Igoe, K., and M. Salter, “<a href="http://tools.ietf.org/html/rfc6090">Fundamental Elliptic Curve Cryptography Algorithms</a>,” RFC 6090, February 2011 (<a href="http://www.rfc-editor.org/rfc/rfc6090.txt">TXT</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="SHS">[SHS]</a></td>
<td class="author-text">National Institute of Standards and
            Technology, “<a href="http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf">Secure Hash Standard (SHS)</a>,” FIPS PUB 180-3, October 2008.</td></tr>
<tr><td class="author-text" valign="top"><a name="USASCII">[USASCII]</a></td>
<td class="author-text">American National Standards Institute, “Coded Character Set -- 7-bit American Standard Code for Information Interchange,” ANSI X3.4, 1986.</td></tr>
</table>

<a name="rfc.references2"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<h3>8.2. Informative References</h3>
<table width="99%" border="0">
<tr><td class="author-text" valign="top"><a name="CanvasApp">[CanvasApp]</a></td>
<td class="author-text">Facebook, “<a href="http://developers.facebook.com/docs/authentication/canvas">Canvas Applications</a>,” 2010.</td></tr>
<tr><td class="author-text" valign="top"><a name="I-D.rescorla-jsms">[I-D.rescorla-jsms]</a></td>
<td class="author-text">Rescorla, E. and J. Hildebrand, “<a href="http://tools.ietf.org/html/draft-rescorla-jsms-00">JavaScript Message Security Format</a>,” draft-rescorla-jsms-00 (work in progress), March 2011 (<a href="http://www.ietf.org/internet-drafts/draft-rescorla-jsms-00.txt">TXT</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="JCA">[JCA]</a></td>
<td class="author-text">Oracle, “<a href="http://download.java.net/jdk7/docs/technotes/guides/security/SunProviders.html">Java Cryptography Architecture</a>,” 2011.</td></tr>
<tr><td class="author-text" valign="top"><a name="JSE">[JSE]</a></td>
<td class="author-text">Bradley, J. and N. Sakimura (editor), “<a href="http://jsonenc.info/enc/1.0/">JSON Simple Encryption</a>,” September 2010.</td></tr>
<tr><td class="author-text" valign="top"><a name="JSS">[JSS]</a></td>
<td class="author-text">Bradley, J. and N. Sakimura (editor), “<a href="http://jsonenc.info/jss/1.0/">JSON Simple Sign</a>,” September 2010.</td></tr>
<tr><td class="author-text" valign="top"><a name="MagicSignatures">[MagicSignatures]</a></td>
<td class="author-text">Panzer (editor), J., Laurie, B., and D. Balfanz, “<a href="http://salmon-protocol.googlecode.com/svn/trunk/draft-panzer-magicsig-01.html">Magic Signatures</a>,” January 2011.</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC3275">[RFC3275]</a></td>
<td class="author-text">Eastlake, D., Reagle, J., and D. Solo, “<a href="http://tools.ietf.org/html/rfc3275">(Extensible Markup Language) XML-Signature Syntax and Processing</a>,” RFC 3275, March 2002 (<a href="http://www.rfc-editor.org/rfc/rfc3275.txt">TXT</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC4122">[RFC4122]</a></td>
<td class="author-text"><a href="mailto:paulle@microsoft.com">Leach, P.</a>, <a href="mailto:michael@refactored-networks.com">Mealling, M.</a>, and <a href="mailto:rsalz@datapower.com">R. Salz</a>, “<a href="http://tools.ietf.org/html/rfc4122">A Universally Unique IDentifier (UUID) URN Namespace</a>,” RFC 4122, July 2005 (<a href="http://www.rfc-editor.org/rfc/rfc4122.txt">TXT</a>, <a href="http://xml.resource.org/public/rfc/html/rfc4122.html">HTML</a>, <a href="http://xml.resource.org/public/rfc/xml/rfc4122.xml">XML</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="W3C.CR-xmldsig-core2-20120124">[W3C.CR-xmldsig-core2-20120124]</a></td>
<td class="author-text">Roessler, T., Yiu, K., Solo, D., Reagle, J., Datta, P., Eastlake, D., Hirsch, F., and S. Cantor, “<a href="http://www.w3.org/TR/2012/CR-xmldsig-core2-20120124">XML Signature Syntax and Processing Version 2.0</a>,” World Wide Web Consortium CR CR-xmldsig-core2-20120124, January 2012 (<a href="http://www.w3.org/TR/2012/CR-xmldsig-core2-20120124">HTML</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="W3C.CR-xmlenc-core1-20120313">[W3C.CR-xmlenc-core1-20120313]</a></td>
<td class="author-text">Eastlake, D., Reagle, J., Hirsch, F., and T. Roessler, “<a href="http://www.w3.org/TR/2012/CR-xmlenc-core1-20120313">XML Encryption Syntax and Processing Version 1.1</a>,” World Wide Web Consortium CR CR-xmlenc-core1-20120313, March 2012 (<a href="http://www.w3.org/TR/2012/CR-xmlenc-core1-20120313">HTML</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="W3C.REC-xmlenc-core-20021210">[W3C.REC-xmlenc-core-20021210]</a></td>
<td class="author-text">Eastlake, D. and J. Reagle, “<a href="http://www.w3.org/TR/2002/REC-xmlenc-core-20021210">XML Encryption Syntax and Processing</a>,” World Wide Web Consortium Recommendation REC-xmlenc-core-20021210, December 2002 (<a href="http://www.w3.org/TR/2002/REC-xmlenc-core-20021210">HTML</a>).</td></tr>
</table>

<a name="SigAlgXref"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.A"></a><h3>Appendix A. 
Digital Signature/MAC Algorithm Identifier Cross-Reference</h3>

<p>
        This appendix contains a table cross-referencing the
        digital signature and MAC <tt>alg</tt> (algorithm)
        values used in this specification
        with the equivalent identifiers used by other standards and
        software packages.  See <a class='info' href='#RFC3275'>XML DSIG<span> (</span><span class='info'>Eastlake, D., Reagle, J., and D. Solo, “(Extensible Markup Language) XML-Signature Syntax and Processing,” March 2002.</span><span>)</span></a> [RFC3275],
        <a class='info' href='#W3C.CR-xmldsig-core2-20120124'>XML DSIG 2.0<span> (</span><span class='info'>Roessler, T., Yiu, K., Solo, D., Reagle, J., Datta, P., Eastlake, D., Hirsch, F., and S. Cantor, “XML Signature Syntax and Processing Version 2.0,” January 2012.</span><span>)</span></a> [W3C.CR‑xmldsig‑core2‑20120124],
        and <a class='info' href='#JCA'>Java Cryptography Architecture<span> (</span><span class='info'>Oracle, “Java Cryptography Architecture,” 2011.</span><span>)</span></a> [JCA]
        for more information about the names defined by those
        documents.
      
</p><table class="full" align="center" border="0" cellpadding="2" cellspacing="2">
<col align="left"><col align="left"><col align="left"><col align="left"><col align="left">
<tr><th align="left">Algorithm</th><th align="left">JWS</th><th align="left">XML DSIG</th><th align="left">JCA</th><th align="left">OID</th></tr>
<tr>
<td align="left">HMAC using SHA-256 hash algorithm</td>
<td align="left">HS256</td>
<td align="left">http://www.w3.org/2001/04/xmldsig-more#hmac-sha256</td>
<td align="left">HmacSHA256</td>
<td align="left">1.2.840.113549.2.9</td>
</tr>
<tr>
<td align="left">HMAC using SHA-384 hash algorithm</td>
<td align="left">HS384</td>
<td align="left">http://www.w3.org/2001/04/xmldsig-more#hmac-sha384</td>
<td align="left">HmacSHA384</td>
<td align="left">1.2.840.113549.2.10</td>
</tr>
<tr>
<td align="left">HMAC using SHA-512 hash algorithm</td>
<td align="left">HS512</td>
<td align="left">http://www.w3.org/2001/04/xmldsig-more#hmac-sha512</td>
<td align="left">HmacSHA512</td>
<td align="left">1.2.840.113549.2.11</td>
</tr>
<tr>
<td align="left">RSASSA using SHA-256 hash algorithm</td>
<td align="left">RS256</td>
<td align="left">http://www.w3.org/2001/04/xmldsig-more#rsa-sha256</td>
<td align="left">SHA256withRSA</td>
<td align="left">1.2.840.113549.1.1.11</td>
</tr>
<tr>
<td align="left">RSASSA using SHA-384 hash algorithm</td>
<td align="left">RS384</td>
<td align="left">http://www.w3.org/2001/04/xmldsig-more#rsa-sha384</td>
<td align="left">SHA384withRSA</td>
<td align="left">1.2.840.113549.1.1.12</td>
</tr>
<tr>
<td align="left">RSASSA using SHA-512 hash algorithm</td>
<td align="left">RS512</td>
<td align="left">http://www.w3.org/2001/04/xmldsig-more#rsa-sha512</td>
<td align="left">SHA512withRSA</td>
<td align="left">1.2.840.113549.1.1.13</td>
</tr>
<tr>
<td align="left">ECDSA using P-256 curve and SHA-256 hash algorithm</td>
<td align="left">ES256</td>
<td align="left">http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256</td>
<td align="left">SHA256withECDSA</td>
<td align="left">1.2.840.10045.4.3.2</td>
</tr>
<tr>
<td align="left">ECDSA using P-384 curve and SHA-384 hash algorithm</td>
<td align="left">ES384</td>
<td align="left">http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384</td>
<td align="left">SHA384withECDSA</td>
<td align="left">1.2.840.10045.4.3.3</td>
</tr>
<tr>
<td align="left">ECDSA using P-521 curve and SHA-512 hash algorithm</td>
<td align="left">ES512</td>
<td align="left">http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512</td>
<td align="left">SHA512withECDSA</td>
<td align="left">1.2.840.10045.4.3.4</td>
</tr>
</table>
<br clear="all" />

<a name="EncAlgXref"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.B"></a><h3>Appendix B. 
Encryption Algorithm Identifier Cross-Reference</h3>

<p>
        This appendix contains a table cross-referencing the <tt>alg</tt> (algorithm) and <tt>enc</tt> (encryption method)
        values used in this specification with the equivalent
        identifiers used by other standards and software packages.
        See
        <a class='info' href='#W3C.REC-xmlenc-core-20021210'>XML Encryption<span> (</span><span class='info'>Eastlake, D. and J. Reagle, “XML Encryption Syntax and Processing,” December 2002.</span><span>)</span></a> [W3C.REC‑xmlenc‑core‑20021210],
        <a class='info' href='#W3C.CR-xmlenc-core1-20120313'>XML Encryption 1.1<span> (</span><span class='info'>Eastlake, D., Reagle, J., Hirsch, F., and T. Roessler, “XML Encryption Syntax and Processing Version 1.1,” March 2012.</span><span>)</span></a> [W3C.CR‑xmlenc‑core1‑20120313],
        and <a class='info' href='#JCA'>Java Cryptography Architecture<span> (</span><span class='info'>Oracle, “Java Cryptography Architecture,” 2011.</span><span>)</span></a> [JCA] for more
        information about the names defined by those documents.
      
</p>
<p>
        For the composite algorithms <tt>A128CBC+HS256</tt> and
        <tt>A256CBC+HS512</tt>, the corresponding AES CBC
        algorithm identifiers are listed.
      
</p><table class="full" align="center" border="0" cellpadding="2" cellspacing="2">
<col align="left"><col align="left"><col align="left"><col align="left">
<tr><th align="left">Algorithm</th><th align="left">JWE</th><th align="left">XML ENC</th><th align="left">JCA</th></tr>
<tr>
<td align="left">RSAES-PKCS1-V1_5</td>
<td align="left">RSA1_5</td>
<td align="left">http://www.w3.org/2001/04/xmlenc#rsa-1_5</td>
<td align="left">RSA/ECB/PKCS1Padding</td>
</tr>
<tr>
<td align="left">RSAES using Optimal Asymmetric Encryption Padding (OAEP)</td>
<td align="left">RSA-OAEP</td>
<td align="left">http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p</td>
<td align="left">RSA/ECB/OAEPWithSHA-1AndMGF1Padding</td>
</tr>
<tr>
<td align="left">Elliptic Curve Diffie-Hellman Ephemeral Static</td>
<td align="left">ECDH-ES</td>
<td align="left">http://www.w3.org/2009/xmlenc11#ECDH-ES</td>
<td align="left"> </td>
</tr>
<tr>
<td align="left">Advanced Encryption Standard (AES) Key Wrap Algorithm
        using 128 bit keys</td>
<td align="left">A128KW</td>
<td align="left">http://www.w3.org/2001/04/xmlenc#kw-aes128</td>
<td align="left"> </td>
</tr>
<tr>
<td align="left">AES Key Wrap Algorithm
        using 256 bit keys</td>
<td align="left">A256KW</td>
<td align="left">http://www.w3.org/2001/04/xmlenc#kw-aes256</td>
<td align="left"> </td>
</tr>
<tr>
<td align="left">AES in Cipher Block Chaining (CBC) mode with PKCS #5 padding
        using 128 bit keys</td>
<td align="left">A128CBC+HS256</td>
<td align="left">http://www.w3.org/2001/04/xmlenc#aes128-cbc</td>
<td align="left">AES/CBC/PKCS5Padding</td>
</tr>
<tr>
<td align="left">AES in CBC mode with PKCS #5 padding
        using 256 bit keys</td>
<td align="left">A256CBC+HS512</td>
<td align="left">http://www.w3.org/2001/04/xmlenc#aes256-cbc</td>
<td align="left">AES/CBC/PKCS5Padding</td>
</tr>
<tr>
<td align="left">AES in Galois/Counter Mode (GCM)
        using 128 bit keys</td>
<td align="left">A128GCM</td>
<td align="left">http://www.w3.org/2009/xmlenc11#aes128-gcm</td>
<td align="left">AES/GCM/NoPadding</td>
</tr>
<tr>
<td align="left">AES GCM
        using 256 bit keys</td>
<td align="left">A256GCM</td>
<td align="left">http://www.w3.org/2009/xmlenc11#aes256-gcm</td>
<td align="left">AES/GCM/NoPadding</td>
</tr>
</table>
<br clear="all" />

<a name="Acknowledgements"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.C"></a><h3>Appendix C. 
Acknowledgements</h3>

<p>
        Solutions for signing and encrypting JSON content were
        previously explored by <a class='info' href='#MagicSignatures'>Magic
        Signatures<span> (</span><span class='info'>Panzer (editor), J., Laurie, B., and D. Balfanz, “Magic Signatures,” January 2011.</span><span>)</span></a> [MagicSignatures], <a class='info' href='#JSS'>JSON Simple Sign<span> (</span><span class='info'>Bradley, J. and N. Sakimura (editor), “JSON Simple Sign,” September 2010.</span><span>)</span></a> [JSS],
        <a class='info' href='#CanvasApp'>Canvas Applications<span> (</span><span class='info'>Facebook, “Canvas Applications,” 2010.</span><span>)</span></a> [CanvasApp], <a class='info' href='#JSE'>JSON Simple Encryption<span> (</span><span class='info'>Bradley, J. and N. Sakimura (editor), “JSON Simple Encryption,” September 2010.</span><span>)</span></a> [JSE], and <a class='info' href='#I-D.rescorla-jsms'>JavaScript Message Security
        Format<span> (</span><span class='info'>Rescorla, E. and J. Hildebrand, “JavaScript Message Security Format,” March 2011.</span><span>)</span></a> [I‑D.rescorla‑jsms], all of which influenced this draft.  Dirk
        Balfanz, John Bradley, Yaron Y. Goland, John Panzer, Nat
        Sakimura, and Paul Tarjan all made significant contributions
        to the design of this specification and its related
        specifications.
      
</p>
<p>
        Jim Schaad and Karen O'Donoghue chaired the JOSE working group and
        Sean Turner and Stephen Farrell served as Security area directors
        during the creation of this specification.
      
</p>
<a name="TBD"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.D"></a><h3>Appendix D. 
Open Issues</h3>

<p>
        [[ to be removed by the RFC editor before publication as an RFC ]]
      
</p>
<p>
        The following items remain to be considered or done in this draft:

        </p>
<ul class="text">
<li>
            No known open issues.
          
</li>
</ul><p>
      
</p>
<a name="anchor17"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.E"></a><h3>Appendix E. 
Document History</h3>

<p>
        [[ to be removed by the RFC editor before publication as an RFC ]]
      
</p>
<p>
        -06
        </p>
<ul class="text">
<li>
            Removed the <tt>int</tt> and
            <tt>kdf</tt> parameters and defined the new composite
            AEAD algorithms <tt>A128CBC+HS256</tt> and
            <tt>A256CBC+HS512</tt> to replace the former
            uses of AES CBC, which required the use of separate integrity
            and key derivation functions.
          
</li>
<li>
            Included additional values in the Concat KDF calculation -- the
            desired output size and the algorithm value,
            and optionally PartyUInfo and PartyVInfo values.
            Added the optional header parameters
            <tt>apu</tt> (agreement PartyUInfo),
            <tt>apv</tt> (agreement PartyVInfo),
            <tt>epu</tt> (encryption PartyUInfo), and
            <tt>epv</tt> (encryption PartyVInfo).
          
</li>
<li>
            Changed the name of the JWK RSA exponent parameter from 
            <tt>exp</tt> to <tt>xpo</tt>
            so as to allow the potential use of the name <tt>exp</tt>
            for a future extension that might define an expiration parameter for keys.
            (The <tt>exp</tt> name is already used for this
            purpose in the JWT specification.)
          
</li>
</ul><p>
      
</p>
<p>
        -05
        </p>
<ul class="text">
<li>
            Support both direct encryption using a
            shared or agreed upon symmetric key, and the use of a
            shared or agreed upon symmetric key to key wrap the CMK.
            Specifically, added the <tt>alg</tt> values
            <tt>dir</tt>,
            <tt>ECDH-ES+A128KW</tt>, and
            <tt>ECDH-ES+A256KW</tt>
            to finish filling in this set of capabilities.
          
</li>
<li>
            Updated open issues.
          
</li>
</ul><p>
      
</p>
<p>
        -04
        </p>
<ul class="text">
<li>
            Added text requiring that any leading zero bytes be retained in
            base64url encoded key value representations for fixed-length values.
          
</li>
<li>
            Added this language to Registration Templates:
            "This name is case sensitive.  Names that match other registered names
            in a case insensitive manner SHOULD NOT be accepted."
          
</li>
<li>
            Described additional open issues.
          
</li>
<li>
            Applied editorial suggestions.
          
</li>
</ul><p>
      
</p>
<p>
        -03
        </p>
<ul class="text">
<li>
            Always use a 128 bit "authentication tag" size for
            AES GCM, regardless of the key size.
          
</li>
<li>
            Specified that use of a 128 bit IV is REQUIRED with AES CBC.
            It was previously RECOMMENDED.
          
</li>
<li>
            Removed key size language for ECDSA algorithms, since the
            key size is implied by the algorithm being used.
          
</li>
<li>
            Stated that the <tt>int</tt> key size
            must be the same as the hash output size (and not larger,
            as was previously allowed) so that its size is defined for
            key generation purposes.
          
</li>
<li>
            Added the <tt>kdf</tt> (key derivation function) header parameter
            to provide crypto agility for key derivation.
            The default KDF remains the Concat KDF with the SHA-256 digest function.
          
</li>
<li>
            Clarified that the <tt>mod</tt> and
            <tt>exp</tt> values are unsigned.
          
</li>
<li>
            Added Implementation Requirements columns to algorithm tables
            and Implementation Requirements entries to algorithm registries.
          
</li>
<li>
            Changed AES Key Wrap to RECOMMENDED.
          
</li>
<li>
            Moved registries
            JSON Web Signature and Encryption Header Parameters and
            JSON Web Signature and Encryption Type Values
            to the JWS specification.
          
</li>
<li>
            Moved JSON Web Key Parameters registry to the JWK specification.
          
</li>
<li>
            Changed registration requirements from RFC Required to
            Specification Required with Expert Review.
          
</li>
<li>
            Added Registration Template sections for defined registries.
          
</li>
<li>
            Added Registry Contents sections to populate registry values.
          
</li>
<li>
            No longer say "the UTF-8 representation of the JWS Secured Input
            (which is the same as the ASCII representation)".  Just call it
            "the ASCII representation of the JWS Secured Input".
          
</li>
<li>
            Added "Collision Resistant Namespace" to the terminology section.
          
</li>
<li>
            Numerous editorial improvements.
          
</li>
</ul><p>
      
</p>
<p>
        -02
        </p>
<ul class="text">
<li>
            For AES GCM,
            use the "additional authenticated data" parameter
            to provide integrity for the header, encrypted key, and
            ciphertext and use the resulting "authentication tag"
            value as the JWE Integrity Value.
          
</li>
<li>
            Defined minimum required key sizes for algorithms
            without specified key sizes.
          
</li>
<li>
            Defined KDF output key sizes.
          
</li>
<li>
            Specified the use of PKCS #5 padding with AES CBC.
          
</li>
<li>
            Generalized text to allow key agreement to be employed
            as an alternative to key wrapping or key encryption.
          
</li>
<li>
            Clarified that ECDH-ES is a key agreement algorithm.
          
</li>
<li>
            Required implementation of AES-128-KW and AES-256-KW.
          
</li>
<li>
            Removed the use of <tt>A128GCM</tt> and
            <tt>A256GCM</tt> for key wrapping.
          
</li>
<li>
            Removed <tt>A512KW</tt> since it turns
            out that it's not a standard algorithm.
          
</li>
<li>
            Clarified the relationship between
            <tt>typ</tt> header parameter values
            and MIME types.
          
</li>
<li>
            Generalized language to refer to Message Authentication Codes (MACs)
            rather than Hash-based Message Authentication Codes (HMACs)
            unless in a context specific to HMAC algorithms.
          
</li>
<li>
            Established registries:
            JSON Web Signature and Encryption Header Parameters,
            JSON Web Signature and Encryption Algorithms,
            JSON Web Signature and Encryption "typ" Values,
            JSON Web Key Parameters, and
            JSON Web Key Algorithm Families.
          
</li>
<li>
            Moved algorithm-specific definitions from JWK to JWA.
          
</li>
<li>
            Reformatted to give each member definition its own section heading.
          
</li>
</ul><p>
      
</p>
<p>
        -01
        </p>
<ul class="text">
<li>
           Moved definition of "alg":"none" for JWSs here from the JWT
           specification since this functionality is likely to be
           useful in more contexts that just for JWTs.
          
</li>
<li>
            Added Advanced Encryption Standard (AES) Key Wrap Algorithm
            using 512 bit keys (<tt>A512KW</tt>).
          
</li>
<li>
            Added text "Alternatively, the Encoded JWS Signature MAY be base64url
            decoded to produce the JWS Signature and this value can
            be compared with the computed HMAC value, as this
            comparison produces the same result as comparing the
            encoded values".
          
</li>
<li>
            Corrected the Magic Signatures reference.
          
</li>
<li>
            Made other editorial improvements suggested by JOSE
            working group participants.
          
</li>
</ul><p>
      
</p>
<p>
        -00
        </p>
<ul class="text">
<li>
            Created the initial IETF draft based upon
            draft-jones-json-web-signature-04 and
            draft-jones-json-web-encryption-02 with no normative changes.
          
</li>
<li>
            Changed terminology to no longer call both digital
            signatures and HMACs "signatures".
          
</li>
</ul><p>
      
</p>
<a name="rfc.authors"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<h3>Author's Address</h3>
<table width="99%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="author-text"> </td>
<td class="author-text">Michael B. Jones</td></tr>
<tr><td class="author-text"> </td>
<td class="author-text">Microsoft</td></tr>
<tr><td class="author" align="right">Email: </td>
<td class="author-text"><a href="mailto:mbj@microsoft.com">mbj@microsoft.com</a></td></tr>
<tr><td class="author" align="right">URI: </td>
<td class="author-text"><a href="http://self-issued.info/">http://self-issued.info/</a></td></tr>
</table>
</body></html>