One document matched: draft-ietf-jose-json-web-algorithms-02.xml
<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?xml-stylesheet type='text/xsl' href='http://xml.resource.org/authoring/rfc2629.xslt' ?>
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="4"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" ipr="trust200902" docName="draft-ietf-jose-json-web-algorithms-02">
<front>
<title>JSON Web Algorithms (JWA)</title>
<author fullname="Michael B. Jones" initials="M.B." surname="Jones">
<organization>Microsoft</organization>
<address>
<email>mbj@microsoft.com</email>
<uri>http://self-issued.info/</uri>
</address>
</author>
<date day="12" month="May" year="2012" />
<area>Security</area>
<workgroup>JOSE Working Group</workgroup>
<keyword>RFC</keyword>
<keyword>Request for Comments</keyword>
<keyword>I-D</keyword>
<keyword>Internet-Draft</keyword>
<keyword>JavaScript Object Notation</keyword>
<keyword>JSON</keyword>
<keyword>JSON Web Token</keyword>
<keyword>JWT</keyword>
<keyword>JSON Web Signature</keyword>
<keyword>JWS</keyword>
<keyword>JSON Web Encryption</keyword>
<keyword>JWE</keyword>
<keyword>JSON Web Algorithms</keyword>
<keyword>JWA</keyword>
<abstract>
<t>
The JSON Web Algorithms (JWA) specification enumerates
cryptographic algorithms and identifiers to be used with the
JSON Web Signature (JWS) and
JSON Web Encryption (JWE) specifications.
</t>
</abstract>
<note title="Requirements Language">
<t>
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 <xref target="RFC2119">RFC 2119</xref>.
</t>
</note>
</front>
<middle>
<section title="Introduction">
<t>
The JSON Web Algorithms (JWA) specification enumerates
cryptographic algorithms and identifiers to be used with the
JSON Web Signature (JWS) <xref target="JWS" /> and
JSON Web Encryption (JWE) <xref target="JWE" /> specifications.
Enumerating the algorithms and identifiers for them in this
specification, rather than in the JWS and JWE
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.
This specification also describes the semantics and operations
that are specific to these algorithms and algorithm families.
</t>
</section>
<section title="Terminology">
<t>
This specification uses the terminology defined by the
JSON Web Signature (JWS) <xref target="JWS" /> and
JSON Web Encryption (JWE) <xref target="JWE" /> specifications.
</t>
</section>
<section title="Cryptographic Algorithms for JWS" anchor="SigningAlgs">
<t>
JWS uses cryptographic algorithms to digitally sign or MAC the contents
of the JWS Header and the JWS Payload. The
use of the following algorithms for producing JWSs is defined in
this section.
</t>
<section title='"alg" (Algorithm) Header Parameter Values for JWS' anchor="JWSAlgValues">
<t>
The table below is the set of
<spanx style="verb">alg</spanx> (algorithm) header
parameter values defined by this specification for use with JWS, each of which
is explained in more detail in the following sections:
</t>
<texttable>
<ttcol align="left">alg Parameter Value</ttcol>
<ttcol align="left">Digital Signature or MAC Algorithm</ttcol>
<c>HS256</c>
<c>HMAC using SHA-256 hash algorithm</c>
<c>HS384</c>
<c>HMAC using SHA-384 hash algorithm</c>
<c>HS512</c>
<c>HMAC using SHA-512 hash algorithm</c>
<c>RS256</c>
<c>RSA using SHA-256 hash algorithm</c>
<c>RS384</c>
<c>RSA using SHA-384 hash algorithm</c>
<c>RS512</c>
<c>RSA using SHA-512 hash algorithm</c>
<c>ES256</c>
<c>ECDSA using P-256 curve and SHA-256 hash algorithm</c>
<c>ES384</c>
<c>ECDSA using P-384 curve and SHA-384 hash algorithm</c>
<c>ES512</c>
<c>ECDSA using P-521 curve and SHA-512 hash algorithm</c>
<c>none</c>
<c>No digital signature or MAC value included</c>
</texttable>
<t>
See <xref target="SigAlgXref" /> for a table cross-referencing the
digital signature and MAC <spanx style="verb">alg</spanx> (algorithm)
values used in this specification
with the equivalent identifiers used by other
standards and software packages.
</t>
<t>
Of these algorithms, only HMAC SHA-256 and <spanx
style="verb">none</spanx> MUST be implemented by
conforming JWS implementations. It is RECOMMENDED that
implementations also support the RSA SHA-256 and ECDSA P-256
SHA-256 algorithms. Support for other algorithms and key
sizes is OPTIONAL.
</t>
</section>
<section title="MAC with HMAC SHA-256, HMAC SHA-384, or HMAC SHA-512" anchor="DefiningHMAC">
<t>
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.
</t>
<t>
The algorithm for implementing and validating HMACs is
provided in <xref target="RFC2104">RFC 2104</xref>. This
section defines the use of the HMAC SHA-256, HMAC SHA-384,
and HMAC SHA-512 cryptographic hash functions as defined in
<xref target="FIPS.180-3">FIPS 180-3</xref>. The
<spanx style="verb">alg</spanx> (algorithm) header parameter values
<spanx style="verb">HS256</spanx>, <spanx
style="verb">HS384</spanx>, and <spanx
style="verb">HS512</spanx> are used in the JWS Header
to indicate that the Encoded JWS Signature contains a base64url
encoded HMAC value using the respective hash function.
</t>
<t>
A key of the same size as the hash output (for instance, 256
bits for <spanx style="verb">HS256</spanx>) or larger MUST
be used with this algorithm.
</t>
<t>
The HMAC SHA-256 MAC is generated as follows:
<list style="numbers">
<t>
Apply the HMAC SHA-256 algorithm to the bytes of the UTF-8 representation
of the JWS Secured Input
(which is the same as the ASCII representation)
using the shared key to produce an HMAC value.
</t>
<t>
Base64url encode the resulting HMAC value.
</t>
</list>
The output is the Encoded JWS Signature for that JWS.
</t>
<t>
The HMAC SHA-256 MAC for a JWS is validated as follows:
<list style="numbers">
<t>
Apply the HMAC SHA-256 algorithm to the bytes of the UTF-8 representation
of the JWS Secured Input
(which is the same as the ASCII representation)
of the JWS using the shared key.
</t>
<t>
Base64url encode the resulting HMAC value.
</t>
<t>
If the Encoded JWS Signature and the base64url encoded HMAC
value exactly match, then one has confirmation that the
shared key was used to generate the HMAC on the JWS and that the
contents of the JWS have not be tampered with.
</t>
<t>
If the validation fails, the JWS MUST be rejected.
</t>
</list>
</t>
<t>
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.
</t>
<t>
Securing content with the HMAC SHA-384 and HMAC SHA-512 algorithms is
performed identically to the procedure for HMAC SHA-256 - just
with correspondingly larger minimum key sizes and result values.
</t>
</section>
<section title="Digital Signature with RSA SHA-256, RSA SHA-384, or RSA SHA-512" anchor="DefiningRSA">
<t>
This section defines the use of the RSASSA-PKCS1-v1_5
digital signature algorithm as defined in <xref target="RFC3447">RFC
3447</xref>, Section 8.2 (commonly known as PKCS#1), using
SHA-256, SHA-384, or SHA-512 as the hash function. The
RSASSA-PKCS1-v1_5 algorithm is described in <xref
target="FIPS.186-3">FIPS 186-3</xref>, Section 5.5, and the
SHA-256, SHA-384, and SHA-512 cryptographic hash functions
are defined in <xref target="FIPS.180-3">FIPS 180-3</xref>.
The <spanx style="verb">alg</spanx> (algorithm) header
parameter values <spanx style="verb">RS256</spanx>, <spanx
style="verb">RS384</spanx>, and <spanx
style="verb">RS512</spanx> 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.
</t>
<t>
A key of size 2048 bits or larger MUST be used with these algorithms.
</t>
<t>
Note that while Section 8 of <xref target="RFC3447">RFC
3447</xref> explicitly calls for people not to adopt
RSASSA-PKCS1 for new applications and instead requests that
people transition to RSASSA-PSS, for interoperability
reasons, this specification does use RSASSA-PKCS1 because it
commonly implemented.
</t>
<t>
The RSA SHA-256 digital signature is generated as follows:
<list style="numbers">
<t>
Generate a digital signature of the bytes of the UTF-8 representation
of the JWS Secured Input
(which is the same as the ASCII representation)
using RSASSA-PKCS1-V1_5-SIGN
and the SHA-256 hash function with the desired private
key. The output will be a byte array.
</t>
<t>
Base64url encode the resulting byte array.
</t>
</list>
The output is the Encoded JWS Signature for that JWS.
</t>
<t>
The RSA SHA-256 digital signature for a JWS is validated as follows:
<list style="numbers">
<t>
Take the Encoded JWS Signature and base64url decode it into
a byte array. If decoding fails, the JWS MUST
be rejected.
</t>
<t>
Submit the bytes of the UTF-8 representation of the JWS Secured Input
(which is the same as the ASCII representation)
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.
</t>
<t>
If the validation fails, the JWS MUST be rejected.
</t>
</list>
</t>
<t>
Signing with the RSA SHA-384 and RSA SHA-512 algorithms is
performed identically to the procedure for RSA SHA-256 - just
with correspondingly larger result values.
</t>
</section>
<section title="Digital Signature with ECDSA P-256 SHA-256, ECDSA P-384 SHA-384, or ECDSA P-521 SHA-512" anchor="DefiningECDSA">
<t>
The Elliptic Curve Digital Signature Algorithm (ECDSA) is
defined by <xref target="FIPS.186-3">FIPS 186-3</xref>. ECDSA
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.
</t>
<t>
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 also
defined in FIPS 186-3. The <spanx
style="verb">alg</spanx> (algorithm) header parameter values <spanx
style="verb">ES256</spanx>, <spanx
style="verb">ES384</spanx>, and <spanx
style="verb">ES512</spanx> 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.
</t>
<t>
A key of size 160 bits or larger MUST be used with these algorithms.
</t>
<t>
The ECDSA P-256 SHA-256 digital signature is generated as follows:
<list style="numbers">
<t>
Generate a digital signature of the bytes of the UTF-8 representation
of the JWS Secured Input
(which is the same as the ASCII representation)
using ECDSA P-256 SHA-256 with
the desired private key. The output will be the EC point
(R, S), where R and S are unsigned integers.
</t>
<t>
Turn R and S into byte arrays in big endian order. Each
array will be 32 bytes long.
</t>
<t>
Concatenate the two byte arrays in the order R and then S.
</t>
<t>
Base64url encode the resulting 64 byte array.
</t>
</list>
The output is the Encoded JWS Signature for the JWS.
</t>
<t>
The ECDSA P-256 SHA-256 digital signature for a JWS is validated as follows:
<list style="numbers">
<t>
Take the Encoded JWS Signature and base64url decode it into
a byte array. If decoding fails, the JWS MUST
be rejected.
</t>
<t>
The output of the base64url decoding MUST be a 64 byte
array.
</t>
<t>
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).
</t>
<t>
Submit the bytes of the UTF-8 representation of the JWS Secured Input
(which is the same as the ASCII representation),
R, S and the public key (x, y) to the ECDSA P-256
SHA-256 validator.
</t>
<t>
If the validation fails, the JWS MUST be rejected.
</t>
</list>
The ECDSA validator will then determine if the digital
signature is valid, given the inputs. 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. The consequence of this is
that one must validate an ECDSA digital signature by submitting the
previously specified inputs to an ECDSA validator.
</t>
<t>
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 with correspondingly larger result values.
</t>
</section>
<section title="Creating a Plaintext JWS" anchor="PlaintextJWS">
<t>
To support use cases where the content is secured by a means
other than a digital signature or MAC value, JWSs MAY also
be created without them. These are called "Plaintext JWSs".
Plaintext JWSs MUST use the <spanx style="verb">alg</spanx>
value <spanx style="verb">none</spanx>, and are formatted
identically to other JWSs, but with an empty JWS Signature
value.
</t>
</section>
<section title="Additional Digital Signature/MAC Algorithms and Parameters" anchor="MoreSigAlgs">
<t>
Additional algorithms MAY be used to protect JWSs with
corresponding <spanx style="verb">alg</spanx> (algorithm)
header parameter values being defined to refer to them.
New <spanx style="verb">alg</spanx> header parameter values SHOULD
either be defined in the IANA JSON Web Signature and Encryption Algorithms
registry <xref target="JWSJWEAlgsReg" /> or be
a URI that contains a collision resistant namespace.
In particular, it is permissible to use the algorithm identifiers defined in
<xref target="RFC3275">XML DSIG</xref>,
<xref target="W3C.CR-xmldsig-core2-20120124">XML DSIG 2.0</xref>,
and related specifications as
<spanx style="verb">alg</spanx> values.
</t>
<t>
As indicated by the common registry, JWSs and JWEs share a
common <spanx style="verb">alg</spanx> value space.
The values used by the two specifications MUST be distinct,
as the <spanx style="verb">alg</spanx> value MAY be used
to determine whether the object is a JWS or JWE.
</t>
<t>
Likewise, additional reserved header parameter names MAY be defined
via the IANA
JSON Web Signature and Encryption Header Parameters registry
<xref target="JWSJWEHdrReg" />.
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.
</t>
</section>
</section>
<section title="Cryptographic Algorithms for JWE" anchor="EncryptingAlgs">
<t>
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.
</t>
<section title='"alg" (Algorithm) Header Parameter Values for JWE' anchor="JWEAlgValues">
<t>
The table below is the set of <spanx
style="verb">alg</spanx> (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.
</t>
<texttable>
<ttcol align="left">alg Parameter Value</ttcol>
<ttcol align="left">Key Encryption or Agreement Algorithm</ttcol>
<c>RSA1_5</c>
<c>RSA using RSA-PKCS1-1.5 padding, as defined in <xref
target="RFC3447">RFC 3447</xref></c>
<c>RSA-OAEP</c>
<c>RSA using Optimal Asymmetric Encryption Padding (OAEP), as
defined in <xref target="RFC3447">RFC 3447</xref></c>
<c>ECDH-ES</c>
<c>Elliptic Curve Diffie-Hellman Ephemeral Static, as defined
in <xref target="RFC6090">RFC 6090</xref>, and using the
Concat KDF, as defined in Section 5.8.1 of <xref target="NIST.800-56A" />,
where the Digest Method is SHA-256 and all OtherInfo
parameters are the empty bit string</c>
<c>A128KW</c>
<c>Advanced Encryption Standard (AES) Key Wrap Algorithm using
128 bit keys, as defined in <xref target="RFC3394">RFC
3394</xref></c>
<c>A256KW</c>
<c>Advanced Encryption Standard (AES) Key Wrap Algorithm using
256 bit keys, as defined in <xref target="RFC3394">RFC
3394</xref></c>
</texttable>
</section>
<section title='"enc" (Encryption Method) Header Parameter Values for JWE' anchor="JWEEncValues">
<t>
The table below is the set of
<spanx style="verb">enc</spanx> (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.
</t>
<texttable>
<ttcol align="left">enc Parameter Value</ttcol>
<ttcol align="left">Block Encryption Algorithm</ttcol>
<c>A128CBC</c>
<c>Advanced Encryption Standard (AES) using 128 bit keys in
Cipher Block Chaining (CBC) mode using PKCS #5 padding,
as defined in <xref target="FIPS.197" />
and <xref target="NIST.800-38A" /></c>
<c>A256CBC</c>
<c>Advanced Encryption Standard (AES) using 256 bit keys in
Cipher Block Chaining (CBC) mode using PKCS #5 padding,
as defined in <xref target="FIPS.197" />
and <xref target="NIST.800-38A" /></c>
<c>A128GCM</c>
<c>Advanced Encryption Standard (AES) using 128 bit keys in
Galois/Counter Mode (GCM), as defined in <xref target="FIPS.197" />
and <xref target="NIST.800-38D" /></c>
<c>A256GCM</c>
<c>Advanced Encryption Standard (AES) using 256 bit keys in
Galois/Counter Mode (GCM), as defined in <xref target="FIPS.197" />
and <xref target="NIST.800-38D" /></c>
</texttable>
<t>
See <xref target="EncAlgXref" /> for a table cross-referencing the
encryption <spanx style="verb">alg</spanx> (algorithm) and
<spanx style="verb">enc</spanx> (encryption method)
values used in this specification
with the equivalent identifiers used by other
standards and software packages.
</t>
<t>
Of these <spanx style="verb">alg</spanx> and <spanx style="verb">enc</spanx> algorithms,
only RSA-PKCS1-1.5 with 2048 bit keys,
AES-128-KW, AES-256-KW,
AES-128-CBC, and AES-256-CBC MUST be implemented by conforming JWE
implementations. It is RECOMMENDED that implementations also
support ECDH-ES with 256 bit keys, AES-128-GCM, and
AES-256-GCM. Support for other algorithms and key sizes is
OPTIONAL.
</t>
</section>
<section title='"int" (Integrity Algorithm) Header Parameter Values for JWE' anchor="JWEIntValues">
<t>
The table below is the set of
<spanx style="verb">int</spanx> (integrity algorithm) header
parameter values defined by this specification for use with JWE.
Note that these are the HMAC SHA subset of the
<spanx style="verb">alg</spanx> (algorithm) header parameter values
defined for use with JWS <xref target="JWSAlgValues" />.
/>
</t>
<texttable>
<ttcol align="left">int Parameter Value</ttcol>
<ttcol align="left">Algorithm</ttcol>
<c>HS256</c>
<c>HMAC using SHA-256 hash algorithm</c>
<c>HS384</c>
<c>HMAC using SHA-384 hash algorithm</c>
<c>HS512</c>
<c>HMAC using SHA-512 hash algorithm</c>
</texttable>
<t>
Of these <spanx style="verb">int</spanx> algorithms,
only HMAC SHA-256 MUST be implemented by
conforming JWE implementations. It is RECOMMENDED that
implementations also support the RSA SHA-256 and ECDSA P-256
SHA-256 algorithms.
</t>
</section>
<section title="Key Encryption with RSA using RSA-PKCS1-1.5 Padding" anchor="KeyEncryptionRSA15">
<t>
This section defines the specifics of encrypting a JWE CMK with
RSA using RSA-PKCS1-1.5 padding, as defined in <xref
target="RFC3447">RFC 3447</xref>.
The <spanx style="verb">alg</spanx> header parameter value
<spanx style="verb">RSA1_5</spanx> is used in this case.
</t>
<t>
A key of size 2048 bits or larger MUST be used with this algorithm.
</t>
</section>
<section title="Key Encryption with RSA using Optimal Asymmetric Encryption Padding (OAEP)" anchor="KeyEncryptionRSAOAEP">
<t>
This section defines the specifics of encrypting a JWE CMK with
RSA using Optimal Asymmetric Encryption Padding (OAEP), as
defined in <xref target="RFC3447">RFC 3447</xref>.
The <spanx style="verb">alg</spanx> header parameter value
<spanx style="verb">RSA-OAEP</spanx> is used in this case.
</t>
<t>
A key of size 2048 bits or larger MUST be used with this algorithm.
</t>
</section>
<section title="Key Agreement with Elliptic Curve Diffie-Hellman Ephemeral Static (ECDH-ES)" anchor="KeyEncryptionECDHES">
<t>
This section defines the specifics of agreeing upon a JWE CMK with
Elliptic Curve Diffie-Hellman Ephemeral Static, as defined
in <xref target="RFC6090">RFC 6090</xref>, and using the
Concat KDF, as defined in Section 5.8.1 of <xref target="NIST.800-56A" />,
where the Digest Method is SHA-256 and all OtherInfo
parameters are the empty bit string.
The <spanx style="verb">alg</spanx> header parameter value
<spanx style="verb">ECDH-ES</spanx> is used in this case.
</t>
<t>
A key of size 160 bits or larger MUST be used for the
Elliptic Curve keys used with this algorithm.
The output of the Concat KDF MUST be a key of the
same length as that used by the
<spanx style="verb">enc</spanx> algorithm.
</t>
<t>
An <spanx style="verb">epk</spanx> (ephemeral public key)
value MUST only be used for a single key agreement
transaction.
</t>
</section>
<section title="Key Encryption with AES Key Wrap" anchor="KeyEncryptionAESKW">
<t>
This section defines the specifics of encrypting a JWE CMK with
the Advanced Encryption Standard (AES) Key Wrap Algorithm using
128 or 256 bit keys, as defined in <xref target="RFC3394">RFC
3394</xref>.
The <spanx style="verb">alg</spanx> header parameter values
<spanx style="verb">A128KW</spanx> or <spanx style="verb">A256KW</spanx>
are used in this case.
</t>
</section>
<section title="Plaintext Encryption with AES Cipher Block Chaining (CBC) Mode" anchor="PlaintextEncryptionCBC">
<t>
This section defines the specifics of encrypting the JWE Plaintext with
Advanced Encryption Standard (AES) in Cipher Block Chaining (CBC) mode
using PKCS #5 padding using 128 or 256 bit keys,
as defined in <xref target="FIPS.197" />
and <xref target="NIST.800-38A" />.
The <spanx style="verb">enc</spanx> header parameter values
<spanx style="verb">A128CBC</spanx> or <spanx style="verb">A256CBC</spanx>
are used in this case.
</t>
<t>
Use of an Initialization Vector (IV) of size 128 bits is
RECOMMENDED with this algorithm.
</t>
</section>
<section title="Plaintext Encryption with AES Galois/Counter Mode (GCM)" anchor="PlaintextEncryptionGCM">
<t>
This section defines the specifics of encrypting the JWE Plaintext with
Advanced Encryption Standard (AES) in Galois/Counter Mode (GCM)
using 128 or 256 bit keys,
as defined in <xref target="FIPS.197" />
and <xref target="NIST.800-38D" />.
The <spanx style="verb">enc</spanx> header parameter values
<spanx style="verb">A128GCM</spanx> or <spanx style="verb">A256GCM</spanx>
are used in this case.
</t>
<t>
Use of an Initialization Vector (IV) of size 96 bits is
REQUIRED with this algorithm.
</t>
<t>
The "additional authenticated data" parameter value for the
encryption is the concatenation of the Encoded JWE Header, a
period ('.') character, and the Encoded JWE Encrypted Key.
</t>
<t>
The requested size of the "authentication tag" output MUST be
the same as the key size (for instance, 128 bits for
<spanx style="verb">A128GCM</spanx>).
</t>
<t>
As GCM is an AEAD algorithm, the JWE Integrity Value is set
to be the "authentication tag" value produced by the encryption.
</t>
</section>
<section title="Integrity Calculation with HMAC SHA-256, HMAC SHA-384, or HMAC SHA-512" anchor="IntHMAC">
<t>
This section defines the specifics of computing a JWE Integrity Value with
HMAC SHA-256, HMAC SHA-384, or HMAC SHA-512
as defined in <xref target="FIPS.180-3">FIPS 180-3</xref>.
The <spanx style="verb">int</spanx> header parameter values
<spanx style="verb">HS256</spanx>, <spanx style="verb">HS384</spanx>,
or <spanx style="verb">HS512</spanx>
are used in this case.
</t>
<t>
A key of the same size as the hash output (for instance, 256
bits for <spanx style="verb">HS256</spanx>) or larger MUST
be used with this algorithm.
</t>
</section>
<section title="Additional Encryption Algorithms and Parameters" anchor="MoreEncAlgs">
<t>
Additional algorithms MAY be used to protect JWEs with
corresponding <spanx style="verb">alg</spanx> (algorithm),
<spanx style="verb">enc</spanx> (encryption method), and
<spanx style="verb">int</spanx> (integrity algorithm)
header parameter values being
defined to refer to them. New
<spanx style="verb">alg</spanx>,
<spanx style="verb">enc</spanx>, and
<spanx style="verb">int</spanx>
header parameter values SHOULD
either be defined in the IANA JSON Web Signature and Encryption Algorithms
registry <xref target="JWSJWEAlgsReg" /> or be
a URI that contains a collision resistant namespace.
In particular, it is permissible to use the algorithm identifiers defined in
<xref target="W3C.REC-xmlenc-core-20021210">XML Encryption</xref>,
<xref target="W3C.CR-xmlenc-core1-20120313">XML Encryption 1.1</xref>,
and related specifications as
<spanx style="verb">alg</spanx>,
<spanx style="verb">enc</spanx>, and
<spanx style="verb">int</spanx> values.
</t>
<t>
As indicated by the common registry, JWSs and JWEs share a
common <spanx style="verb">alg</spanx> value space.
The values used by the two specifications MUST be distinct,
as the <spanx style="verb">alg</spanx> value MAY be used
to determine whether the object is a JWS or JWE.
</t>
<t>
Likewise, additional reserved header parameter names MAY be defined
via the IANA
JSON Web Signature and Encryption Header Parameters registry
<xref target="JWSJWEHdrReg" />.
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.
</t>
</section>
</section>
<section title="Cryptographic Algorithms for JWK" anchor="JWKAlgs">
<t>
A JSON Web Key (JWK) <xref target="JWK" /> is a JSON 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.
</t>
<section title='"alg" (Algorithm Family) Parameter Values for JWK' anchor="JWKAlgValues">
<t>
The table below is the set of
<spanx style="verb">alg</spanx> (algorithm family) parameter
values that are defined by this specification for use in JWKs.
</t>
<texttable>
<ttcol align="left">alg Parameter Value</ttcol>
<ttcol align="left">Algorithm Family</ttcol>
<c>EC</c>
<c>Elliptic Curve <xref target="FIPS.186-3" /> key family</c>
<c>RSA</c>
<c>RSA <xref target="RFC3447" /> key family</c>
</texttable>
</section>
<section title="JWK Parameters for Elliptic Curve Keys" anchor="JWKEC">
<t>
JWKs can represent Elliptic Curve <xref
target="FIPS.186-3" /> keys. In
this case, the <spanx style="verb">alg</spanx>
member value MUST be <spanx style="verb">EC</spanx>.
Furthermore, these additional members MUST be present:
</t>
<section title='"crv" (Curve) Parameter'>
<t>
The <spanx style="verb">crv</spanx> (curve) member identifies
the cryptographic curve used with the key. Values
defined by this specification are <spanx
style="verb">P-256</spanx>, <spanx
style="verb">P-384</spanx> and <spanx
style="verb">P-521</spanx>. Additional <spanx
style="verb">crv</spanx> values MAY be used, provided
they are understood by implementations using that Elliptic Curve
key.
The <spanx style="verb">crv</spanx> value is case sensitive.
Its value MUST be a string.
</t>
</section>
<section title='"x" (X Coordinate) Parameter'>
<t>
The <spanx style="verb">x</spanx> (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.
</t>
</section>
<section title='"y" (Y Coordinate) Parameter'>
<t>
The <spanx style="verb">y</spanx> (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.
</t>
</section>
</section>
<section title="JWK Parameters for RSA Keys" anchor="JWKRSA">
<t>
JWKs can represent RSA <xref target="RFC3447" /> keys. In
this case, the <spanx style="verb">alg</spanx>
member value MUST be <spanx style="verb">RSA</spanx>.
Furthermore, these additional members MUST be present:
</t>
<section title='"mod" (Modulus) Parameter'>
<t>
The <spanx style="verb">mod</spanx> (modulus) member contains
the modulus value for the RSA public key. It is
represented as the base64url encoding of the value's big
endian representation.
</t>
</section>
<section title='"exp" (Exponent) Parameter'>
<t>
The <spanx style="verb">exp</spanx> (exponent) member contains
the exponent value for the RSA public key. It is
represented as the base64url encoding of the value's big
endian representation.
</t>
</section>
</section>
<section title="Additional Key Algorithm Families and Parameters" anchor="MoreKeyAlgs">
<t>
Public keys using additional algorithm families MAY be
represented using JWK data structures with corresponding
<spanx style="verb">alg</spanx> (algorithm family) parameter
values being defined to refer to them.
New <spanx style="verb">alg</spanx> parameter values SHOULD
either be defined in the IANA JSON Web Key Algorithm Families
registry <xref target="KeyAlgRegistry" /> or be
a URI that contains a collision resistant namespace.
</t>
<t>
Likewise, parameters for representing keys for additional
algorithm families or additional key properties
SHOULD either be defined in the IANA JSON Web Key Parameters registry
<xref target="JWKParamReg" /> or be
a URI that contains a collision resistant namespace.
</t>
</section>
</section>
<section title="IANA Considerations" anchor="IANA">
<section title="JSON Web Signature and Encryption Header Parameters Registry" anchor="JWSJWEHdrReg">
<t>
This specification establishes the
IANA JSON Web Signature and Encryption Header Parameters registry
for reserved JWS and JWE header parameter names.
Inclusion in the registry is RFC Required in the
<xref target="RFC5226">RFC 5226</xref> sense.
The registry records the reserved header parameter name
and a reference to the RFC that defines it.
This specification registers the header parameter names defined in
JSON Web Signature (JWS) <xref target="JWS" />, Section 4.1 and
JSON Web Encryption (JWE) <xref target="JWE" />, Section 4.1.
</t>
</section>
<section title="JSON Web Signature and Encryption Algorithms Registry" anchor="JWSJWEAlgsReg">
<t>
This specification establishes the
IANA JSON Web Signature and Encryption Algorithms registry
for values of the JWS and JWE
<spanx style="verb">alg</spanx> (algorithm),
<spanx style="verb">enc</spanx> (encryption method), and
<spanx style="verb">int</spanx> (integrity algorithm)
header parameters.
Inclusion in the registry is RFC Required in the
<xref target="RFC5226">RFC 5226</xref> sense.
The registry records the algorithm usage
<spanx style="verb">alg</spanx>,
<spanx style="verb">enc</spanx>, or
<spanx style="verb">int</spanx>, the value,
and a pointer to the RFC that defines it.
This specification registers the values defined in
<xref target="JWSAlgValues" />,
<xref target="JWEAlgValues" />,
<xref target="JWEEncValues" />, and
<xref target="JWEIntValues" />.
</t>
</section>
<section title='JSON Web Signature and Encryption "typ" Values Registry' anchor="JWSJWETypReg">
<t>
This specification establishes the
IANA JSON Web Signature and Encryption "typ" Values registry
for values of the JWS and JWE
<spanx style="verb">typ</spanx> (type)
header parameter.
Inclusion in the registry is RFC Required in the
<xref target="RFC5226">RFC 5226</xref> sense.
It is RECOMMENDED that all registered <spanx
style="verb">typ</spanx> values also register a
MIME Media Type <xref target="RFC2045">RFC 2045</xref>
that the registered value is a short name for.
The registry records the
<spanx style="verb">typ</spanx> value,
the MIME type value that it is an abbreviation for (if any),
and a pointer to the RFC that defines it.
</t>
<t>
MIME Media Type <xref target="RFC2045">RFC 2045</xref>
values MUST NOT be directly registered as new
<spanx style="verb">typ</spanx> values; rather, new
<spanx style="verb">typ</spanx> values MAY be registered
as short names for MIME types.
</t>
</section>
<section title="JSON Web Key Parameters Registry" anchor="JWKParamReg">
<t>
This specification establishes the
IANA JSON Web Key Parameters registry
for reserved JWK parameter names.
Inclusion in the registry is RFC Required in the
<xref target="RFC5226">RFC 5226</xref> sense.
The registry records the reserved parameter name
and a reference to the RFC that defines it.
This specification registers the parameter names defined in
JSON Web Key (JWK) <xref target="JWK" />, Section 4.2,
JSON Web Encryption (JWE) <xref target="JWE" />, Section 4.1,
<xref target="JWKEC" />, and <xref target="JWKRSA" />.
</t>
</section>
<section title="JSON Web Key Algorithm Families Registry" anchor="KeyAlgRegistry">
<t>
This specification establishes the
IANA JSON Web Key Algorithm Families registry
for values of the JWK
<spanx style="verb">alg</spanx> (algorithm family) parameter.
Inclusion in the registry is RFC Required in the
<xref target="RFC5226">RFC 5226</xref> sense.
The registry records the <spanx style="verb">alg</spanx> value
and a pointer to the RFC that defines it.
This specification registers the values defined in
<xref target="JWKAlgValues" />.
</t>
</section>
</section>
<section title="Security Considerations" anchor="Security">
<t>
The security considerations in the JWS, JWE, and JWK
specifications also apply to this specification.
</t>
<t>
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.
</t>
</section>
<section title="Open Issues and Things To Be Done (TBD)" anchor="TBD">
<t>
The following items remain to be done in this draft:
<list style="symbols">
<t>
Find values for encryption algorithm cross-reference table
currently listed as "TBD" or determine that they do not exist.
</t>
</list>
</t>
</section>
</middle>
<back>
<references title="Normative References">
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.2045.xml' ?>
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.2104.xml' ?>
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml' ?>
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.3394.xml' ?>
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.3447.xml' ?>
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.5226.xml' ?>
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.6090.xml' ?>
<reference anchor="FIPS.180-3">
<front>
<title>Secure Hash Standard (SHS)</title>
<author>
<organization>National Institute of Standards and
Technology</organization>
</author>
<date month="October" year="2008" />
</front>
<seriesInfo name="FIPS" value="PUB 180-3" />
<format target="http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf" type="PDF" />
</reference>
<reference anchor="FIPS.186-3">
<front>
<title>Digital Signature Standard (DSS)</title>
<author>
<organization>National Institute of Standards and
Technology</organization>
</author>
<date month="June" year="2009" />
</front>
<seriesInfo name="FIPS" value="PUB 186-3" />
<format target="http://csrc.nist.gov/publications/fips/fips186-3/fips_186-3.pdf" type="PDF" />
</reference>
<reference anchor="FIPS.197">
<front>
<title>Advanced Encryption Standard (AES)</title>
<author>
<organization>National Institute of Standards and Technology (NIST)
</organization>
</author>
<date month="November" year="2001" />
</front>
<seriesInfo name="FIPS" value="PUB 197" />
<format target="http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf" type="PDF" />
</reference>
<reference anchor="NIST.800-38A">
<front>
<title>Recommendation for Block Cipher Modes of Operation</title>
<author>
<organization>National Institute of Standards and Technology (NIST)
</organization>
</author>
<date month="December" year="2001" />
</front>
<seriesInfo name="NIST" value="PUB 800-38A" />
<format target="http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf" type="PDF" />
</reference>
<reference anchor="NIST.800-38D">
<front>
<title>Recommendation for Block Cipher Modes of Operation:
Galois/Counter Mode (GCM) and GMAC</title>
<author>
<organization>National Institute of Standards and Technology (NIST)
</organization>
</author>
<date month="December" year="2001" />
</front>
<seriesInfo name="NIST" value="PUB 800-38D" />
<format target="http://csrc.nist.gov/publications/nistpubs/800-38D/SP-800-38D.pdf" type="PDF" />
</reference>
<reference anchor="NIST.800-56A">
<front>
<title>Recommendation for Pair-Wise Key Establishment Schemes Using Discrete Logarithm Cryptography (Revised)</title>
<author>
<organization>National Institute of Standards and Technology (NIST)
</organization>
</author>
<date month="March" year="2007" />
</front>
<seriesInfo name="NIST" value="PUB 800-56A" />
<format target="http://csrc.nist.gov/publications/nistpubs/800-56A/SP800-56A_Revision1_Mar08-2007.pdf" type="PDF" />
</reference>
<reference anchor="JWS">
<front>
<title>JSON Web Signature (JWS)</title>
<author fullname="Michael B. Jones" initials="M.B." surname="Jones">
<organization>Microsoft</organization>
<address>
<email>mbj@microsoft.com</email>
<uri>http://self-issued.info/</uri>
</address>
</author>
<author fullname="John Bradley" initials="J." surname="Bradley">
<organization abbrev="Ping Identity">Ping Identity</organization>
<address>
<email>ve7jtb@ve7jtb.com</email>
</address>
</author>
<author fullname="Nat Sakimura" initials="N." surname="Sakimura">
<organization abbrev="NRI">Nomura Research Institute</organization>
<address>
<email>n-sakimura@nri.co.jp</email>
</address>
</author>
<date day="12" month="May" year="2012" />
</front>
<format target="http://tools.ietf.org/html/draft-ietf-jose-json-web-signature" type="HTML" />
</reference>
<reference anchor="JWE">
<front>
<title>JSON Web Encryption (JWE)</title>
<author fullname="Michael B. Jones" initials="M.B." surname="Jones">
<organization>Microsoft</organization>
<address>
<email>mbj@microsoft.com</email>
<uri>http://self-issued.info/</uri>
</address>
</author>
<author fullname="Eric Rescorla" initials="E." surname="Rescorla">
<organization abbrev="RTFM">RTFM, Inc.</organization>
<address>
<email>ekr@rtfm.com</email>
</address>
</author>
<author fullname="Joe Hildebrand" initials="J." surname="Hildebrand">
<organization abbrev="Cisco">Cisco Systems, Inc.</organization>
<address>
<email>jhildebr@cisco.com</email>
</address>
</author>
<date day="12" month="May" year="2012" />
</front>
<format target="http://tools.ietf.org/html/draft-ietf-jose-json-web-encryption" type="HTML" />
</reference>
<reference anchor="JWK">
<front>
<title>JSON Web Key (JWK)</title>
<author fullname="Michael B. Jones" initials="M.B." surname="Jones">
<organization>Microsoft</organization>
<address>
<email>mbj@microsoft.com</email>
<uri>http://self-issued.info/</uri>
</address>
</author>
<date day="12" month="May" year="2012" />
</front>
<format target="http://tools.ietf.org/html/draft-ietf-jose-json-web-key" type="HTML" />
</reference>
</references>
<references title="Informative References">
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.3275.xml' ?>
<?rfc include="http://xml.resource.org/public/rfc/bibxml4/reference.W3C.CR-xmldsig-core2-20120124.xml" ?>
<?rfc include="http://xml.resource.org/public/rfc/bibxml4/reference.W3C.REC-xmlenc-core-20021210.xml" ?>
<?rfc include="http://xml.resource.org/public/rfc/bibxml4/reference.W3C.CR-xmlenc-core1-20120313.xml" ?>
<?rfc include="http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-rescorla-jsms-00.xml" ?>
<reference anchor="MagicSignatures">
<front>
<title>Magic Signatures</title>
<author fullname="John Panzer (editor)" initials="J." surname="Panzer (editor)"></author>
<author fullname="Ben Laurie" initials="B." surname="Laurie"></author>
<author fullname="Dirk Balfanz" initials="D." surname="Balfanz"></author>
<date day="7" month="January" year="2011" />
</front>
<format target="http://salmon-protocol.googlecode.com/svn/trunk/draft-panzer-magicsig-01.html" type="HTML" />
</reference>
<reference anchor="JSS">
<front>
<title>JSON Simple Sign</title>
<author fullname="John Bradley" initials="J." surname="Bradley">
<organization>independent</organization>
</author>
<author fullname="Nat Sakimura (editor)" initials="N. " surname="Sakimura (editor)">
<organization abbrev="NRI">Nomura Research Institute</organization>
</author>
<date month="September" year="2010" />
</front>
<format target="http://jsonenc.info/jss/1.0/" type="HTML" />
</reference>
<reference anchor="JSE">
<front>
<title>JSON Simple Encryption</title>
<author fullname="John Bradley" initials="J." surname="Bradley">
<organization>independent</organization>
</author>
<author fullname="Nat Sakimura (editor)" initials="N. " surname="Sakimura (editor)">
<organization abbrev="NRI">Nomura Research Institute</organization>
</author>
<date month="September" year="2010" />
</front>
<format target="http://jsonenc.info/enc/1.0/" type="HTML" />
</reference>
<reference anchor="CanvasApp">
<front>
<title>Canvas Applications</title>
<author fullname="Facebook" surname="Facebook"></author>
<date year="2010" />
</front>
<format target="http://developers.facebook.com/docs/authentication/canvas" type="HTML" />
</reference>
<reference anchor="JCA">
<front>
<title>Java Cryptography Architecture</title>
<author fullname="Oracle" surname="Oracle">
</author>
<date year="2011" />
</front>
<format target="http://download.java.net/jdk7/docs/technotes/guides/security/SunProviders.html" type="HTML" />
</reference>
</references>
<section title="Digital Signature/MAC Algorithm Identifier Cross-Reference" anchor="SigAlgXref">
<t>
This appendix contains a table cross-referencing the
digital signature and MAC <spanx style="verb">alg</spanx> (algorithm)
values used in this specification
with the equivalent identifiers used by other standards and
software packages. See <xref target="RFC3275">XML DSIG</xref>,
<xref target="W3C.CR-xmldsig-core2-20120124">XML DSIG 2.0</xref>,
and <xref target="JCA">Java Cryptography Architecture</xref>
for more information about the names defined by those
documents.
</t>
<texttable>
<ttcol align="left">Algorithm</ttcol>
<ttcol align="left">JWS</ttcol>
<ttcol align="left">XML DSIG</ttcol>
<ttcol align="left">JCA</ttcol>
<ttcol align="left">OID</ttcol>
<c>HMAC using SHA-256 hash algorithm</c>
<c>HS256</c>
<c>http://www.w3.org/2001/04/xmldsig-more#hmac-sha256</c>
<c>HmacSHA256</c>
<c>1.2.840.113549.2.9</c>
<c>HMAC using SHA-384 hash algorithm</c>
<c>HS384</c>
<c>http://www.w3.org/2001/04/xmldsig-more#hmac-sha384</c>
<c>HmacSHA384</c>
<c>1.2.840.113549.2.10</c>
<c>HMAC using SHA-512 hash algorithm</c>
<c>HS512</c>
<c>http://www.w3.org/2001/04/xmldsig-more#hmac-sha512</c>
<c>HmacSHA512</c>
<c>1.2.840.113549.2.11</c>
<c>RSA using SHA-256 hash algorithm</c>
<c>RS256</c>
<c>http://www.w3.org/2001/04/xmldsig-more#rsa-sha256</c>
<c>SHA256withRSA</c>
<c>1.2.840.113549.1.1.11</c>
<c>RSA using SHA-384 hash algorithm</c>
<c>RS384</c>
<c>http://www.w3.org/2001/04/xmldsig-more#rsa-sha384</c>
<c>SHA384withRSA</c>
<c>1.2.840.113549.1.1.12</c>
<c>RSA using SHA-512 hash algorithm</c>
<c>RS512</c>
<c>http://www.w3.org/2001/04/xmldsig-more#rsa-sha512</c>
<c>SHA512withRSA</c>
<c>1.2.840.113549.1.1.13</c>
<c>ECDSA using P-256 curve and SHA-256 hash algorithm</c>
<c>ES256</c>
<c>http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256</c>
<c>SHA256withECDSA</c>
<c>1.2.840.10045.4.3.2</c>
<c>ECDSA using P-384 curve and SHA-384 hash algorithm</c>
<c>ES384</c>
<c>http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384</c>
<c>SHA384withECDSA</c>
<c>1.2.840.10045.4.3.3</c>
<c>ECDSA using P-521 curve and SHA-512 hash algorithm</c>
<c>ES512</c>
<c>http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512</c>
<c>SHA512withECDSA</c>
<c>1.2.840.10045.4.3.4</c>
</texttable>
</section>
<section title="Encryption Algorithm Identifier Cross-Reference" anchor="EncAlgXref">
<t>
This appendix contains a table cross-referencing the <spanx
style="verb">alg</spanx> (algorithm) and <spanx style="verb">enc</spanx> (encryption method)
values used in this specification with the equivalent
identifiers used by other standards and software packages.
See
<xref target="W3C.REC-xmlenc-core-20021210">XML Encryption</xref>,
<xref target="W3C.CR-xmlenc-core1-20120313">XML Encryption 1.1</xref>,
and <xref
target="JCA">Java Cryptography Architecture</xref> for more
information about the names defined by those documents.
</t>
<texttable>
<ttcol align="left">Algorithm</ttcol>
<ttcol align="left">JWE</ttcol>
<ttcol align="left">XML ENC</ttcol>
<ttcol align="left">JCA</ttcol>
<c>RSA using RSA-PKCS1-1.5 padding</c>
<c>RSA1_5</c>
<c>http://www.w3.org/2001/04/xmlenc#rsa-1_5</c>
<c>RSA/ECB/PKCS1Padding</c>
<!-- TBD: RSA/None/PKCS1Padding or RSA/ECB/PKCS1Padding ? -->
<c>RSA using Optimal Asymmetric Encryption Padding (OAEP)</c>
<c>RSA-OAEP</c>
<c>http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p</c>
<c>RSA/ECB/OAEPWithSHA-1AndMGF1Padding</c>
<!-- TBD: RSA/ECB/OAEPWithSHA-1AndMGF1Padding or RSA/ECB/OAEPWithSHA-256AndMGF1Padding or RSA/NONE/OAEPWithSHA-1AndMGF1Padding or RSA/NONE/OAEPWithSHA-256AndMGF1Padding ? -->
<c>Elliptic Curve Diffie-Hellman Ephemeral Static</c>
<c>ECDH-ES</c>
<c>http://www.w3.org/2009/xmlenc11#ECDH-ES</c>
<c>TBD</c>
<c>Advanced Encryption Standard (AES) Key Wrap Algorithm <xref
target="RFC3394">RFC 3394</xref> using 128 bit keys</c>
<c>A128KW</c>
<c>http://www.w3.org/2001/04/xmlenc#kw-aes128</c>
<c>TBD</c>
<c>Advanced Encryption Standard (AES) Key Wrap Algorithm <xref
target="RFC3394">RFC 3394</xref> using 256 bit keys</c>
<c>A256KW</c>
<c>http://www.w3.org/2001/04/xmlenc#kw-aes256</c>
<c>TBD</c>
<c>Advanced Encryption Standard (AES) using 128 bit keys in
Cipher Block Chaining (CBC) mode using PKCS #5 padding</c>
<c>A128CBC</c>
<c>http://www.w3.org/2001/04/xmlenc#aes128-cbc</c>
<c>AES/CBC/PKCS5Padding</c>
<c>Advanced Encryption Standard (AES) using 256 bit keys in
Cipher Block Chaining (CBC) mode using PKCS #5 padding</c>
<c>A256CBC</c>
<c>http://www.w3.org/2001/04/xmlenc#aes256-cbc</c>
<c>AES/CBC/PKCS5Padding</c>
<c>Advanced Encryption Standard (AES) using 128 bit keys in
Galois/Counter Mode (GCM)</c>
<c>A128GCM</c>
<c>http://www.w3.org/2009/xmlenc11#aes128-gcm</c>
<c>AES/GCM/NoPadding</c>
<c>Advanced Encryption Standard (AES) using 256 bit keys in
Galois/Counter Mode (GCM)</c>
<c>A256GCM</c>
<c>http://www.w3.org/2009/xmlenc11#aes256-gcm</c>
<c>AES/GCM/NoPadding</c>
</texttable>
</section>
<section title="Acknowledgements" anchor="Acknowledgements">
<t>
Solutions for signing and encrypting JSON content were
previously explored by <xref target="MagicSignatures">Magic
Signatures</xref>, <xref target="JSS">JSON Simple Sign</xref>,
<xref target="CanvasApp">Canvas Applications</xref>, <xref
target="JSE">JSON Simple Encryption</xref>, and <xref
target="I-D.rescorla-jsms">JavaScript Message Security
Format</xref>, 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.
</t>
</section>
<section title='Document History'>
<t>
-02
<list style='symbols'>
<t>
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.
</t>
<t>
Defined minimum required key sizes for algorithms
without specified key sizes.
</t>
<t>
Defined KDF output key sizes.
</t>
<t>
Specified the use of PKCS #5 padding with AES-CBC.
</t>
<t>
Generalized text to allow key agreement to be employed
as an alternative to key wrapping or key encryption.
</t>
<t>
Clarified that ECDH-ES is a key agreement algorithm.
</t>
<t>
Required implementation of AES-128-KW and AES-256-KW.
</t>
<t>
Removed the use of <spanx style="verb">A128GCM</spanx> and
<spanx style="verb">A256GCM</spanx> for key wrapping.
</t>
<t>
Removed <spanx style="verb">A512KW</spanx> since it turns
out that it's not a standard algorithm.
</t>
<t>
Clarified the relationship between
<spanx style="verb">typ</spanx> header parameter values
and MIME types.
</t>
<t>
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.
</t>
<t>
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.
</t>
<t>
Moved algorithm-specific definitions from JWK to JWA.
</t>
<t>
Reformatted to give each member definition its own section heading.
</t>
</list>
</t>
<t>
-01
<list style='symbols'>
<t>
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.
</t>
<t>
Added Advanced Encryption Standard (AES) Key Wrap Algorithm
using 512 bit keys (<spanx style="verb">A512KW</spanx>).
</t>
<t>
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".
</t>
<t>
Corrected the Magic Signatures reference.
</t>
<t>
Made other editorial improvements suggested by JOSE
working group participants.
</t>
</list>
</t>
<t>
-00
<list style='symbols'>
<t>
Created the initial IETF draft based upon
draft-jones-json-web-signature-04 and
draft-jones-json-web-encryption-02 with no normative changes.
</t>
<t>
Changed terminology to no longer call both digital
signatures and HMACs "signatures".
</t>
</list>
</t>
</section>
</back>
</rfc>
| PAFTECH AB 2003-2026 | 2026-04-23 02:49:20 |