One document matched: draft-ietf-jose-json-web-algorithms-03.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-03">
<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="6" month="July" 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 Key</keyword>
<keyword>JWK</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),
JSON Web Encryption (JWE), and
JSON Web Key (JWK) specifications.
</t>
</abstract>
</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"/>,
JSON Web Encryption (JWE) <xref target="JWE"/>, and
JSON Web Key (JWK) <xref target="JWK"/> specifications.
This specification also describes the semantics and operations
that are specific to these algorithms and algorithm families.
</t>
<t>
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.
</t>
<section title='Notational Conventions'>
<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
Key words for use in RFCs to Indicate Requirement Levels <xref target='RFC2119' />.
</t>
</section>
</section>
<section title="Terminology">
<section title="Terms Incorporated from the JWS Specification">
<t>
These terms defined by the
JSON Web Signature (JWS) <xref target="JWS"/>
specification are incorporated into this specification:
</t>
<t>
<list style="hanging">
<t hangText="JSON Web Signature (JWS)">
A data structure cryptographically securing a JWS Header
and a JWS Payload with a JWS Signature value.
</t>
<t hangText="JWS Header">
A string representing a
JavaScript Object Notation (JSON) <xref target="RFC4627"/>
object that describes the
digital signature or MAC operation applied to
create the JWS Signature value.
</t>
<t hangText="JWS Payload">
The bytes to be secured - a.k.a., the message.
The payload can contain an arbitrary sequence of bytes.
</t>
<t hangText="JWS Signature">
A byte array containing the cryptographic
material that secures the contents of the JWS Header
and the JWS Payload.
</t>
<t hangText="Encoded JWS Header">
Base64url encoding of the bytes of the
UTF-8 <xref target="RFC3629"/>
representation of the JWS Header.
</t>
<t hangText="Encoded JWS Payload">
Base64url encoding of the JWS Payload.
</t>
<t hangText="Encoded JWS Signature">
Base64url encoding of the JWS Signature.
</t>
<t hangText="JWS Secured Input">
The concatenation of the Encoded JWS Header, a period ('.')
character, and the Encoded JWS Payload.
</t>
<t hangText="Base64url Encoding">
For the purposes of this specification, this term always
refers to the URL- and filename-safe Base64 encoding
described in <xref target="RFC4648">RFC 4648</xref>,
Section 5, with the (non URL-safe) '=' padding characters
omitted, as permitted by Section 3.2. (See Appendix C of
<xref target="JWS" /> for notes on implementing base64url
encoding without padding.)
</t>
<t hangText="Collision Resistant Namespace">
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)
<xref target="RFC4122"/>.
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.
</t>
</list>
</t>
</section>
<section title="Terms Incorporated from the JWE Specification">
<t>
These terms defined by the
JSON Web Encryption (JWE) <xref target="JWE"/>
specification are incorporated into this specification:
</t>
<t>
<list style="hanging">
<t hangText="JSON Web Encryption (JWE)">
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.
</t>
<t hangText="Plaintext">
The bytes to be encrypted - a.k.a., the message.
The plaintext can contain an arbitrary sequence of bytes.
</t>
<t hangText="Ciphertext">
The encrypted version of the Plaintext.
</t>
<t hangText="Content Encryption Key (CEK)">
A symmetric key used to encrypt the Plaintext for the
recipient to produce the Ciphertext.
</t>
<t hangText="Content Integrity Key (CIK)">
A key used with a MAC function to ensure the integrity
of the Ciphertext and the parameters used to create it.
</t>
<t hangText="Content Master Key (CMK)">
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.
</t>
<t hangText="JWE Header">
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.
</t>
<t hangText="JWE Encrypted Key">
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.
</t>
<t hangText="JWE Ciphertext">
A byte array containing the Ciphertext.
</t>
<t hangText="JWE Integrity Value">
A byte array containing a MAC value that ensures the
integrity of the Ciphertext and the parameters used to
create it.
</t>
<t hangText="Encoded JWE Header">
Base64url encoding of the bytes of the
UTF-8 <xref target="RFC3629"/>
representation of the JWE Header.
</t>
<t hangText="Encoded JWE Encrypted Key">
Base64url encoding of the JWE Encrypted Key.
</t>
<t hangText="Encoded JWE Ciphertext">
Base64url encoding of the JWE Ciphertext.
</t>
<t hangText="Encoded JWE Integrity Value">
Base64url encoding of the JWE Integrity Value.
</t>
<t hangText="AEAD Algorithm">
An Authenticated Encryption with Associated Data (AEAD)
<xref target="RFC5116"/> encryption algorithm is one that
provides an integrated content integrity check. AES
Galois/Counter Mode (GCM) is one such algorithm.
</t>
</list>
</t>
</section>
<section title="Terms Incorporated from the JWK Specification">
<t>
These terms defined by the
JSON Web Key (JWK) <xref target="JWK"/>
specification are incorporated into this specification:
</t>
<t>
<list style="hanging">
<t hangText="JSON Web Key (JWK)">
A JSON data structure that represents a public key.
</t>
<t hangText="JSON Web Key Set (JWK Set)">
A JSON object that contains an array of JWKs as a member.
</t>
</list>
</t>
</section>
<section title="Defined Terms">
<t>
These terms are defined for use by this specification:
</t>
<t>
<list style="hanging">
<t hangText="Header Parameter Name">
The name of a member of the JSON object representing a
JWS Header or JWE Header.
</t>
<t hangText="Header Parameter Value">
The value of a member of the JSON object representing a
JWS Header or JWE Header.
</t>
</list>
</t>
</section>
</section>
<section title="Cryptographic Algorithms for JWS" anchor="SigningAlgs">
<t>
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.
</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>
<ttcol align="left">Implementation Requirements</ttcol>
<c>HS256</c>
<c>HMAC using SHA-256 hash algorithm</c>
<c>REQUIRED</c>
<c>HS384</c>
<c>HMAC using SHA-384 hash algorithm</c>
<c>OPTIONAL</c>
<c>HS512</c>
<c>HMAC using SHA-512 hash algorithm</c>
<c>OPTIONAL</c>
<c>RS256</c>
<c>RSASSA using SHA-256 hash algorithm</c>
<c>RECOMMENDED</c>
<c>RS384</c>
<c>RSASSA using SHA-384 hash algorithm</c>
<c>OPTIONAL</c>
<c>RS512</c>
<c>RSASSA using SHA-512 hash algorithm</c>
<c>OPTIONAL</c>
<c>ES256</c>
<c>ECDSA using P-256 curve and SHA-256 hash algorithm</c>
<c>RECOMMENDED+</c>
<c>ES384</c>
<c>ECDSA using P-384 curve and SHA-384 hash algorithm</c>
<c>OPTIONAL</c>
<c>ES512</c>
<c>ECDSA using P-521 curve and SHA-512 hash algorithm</c>
<c>OPTIONAL</c>
<c>none</c>
<c>No digital signature or MAC value included</c>
<c>REQUIRED</c>
</texttable>
<t>
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 <spanx style="verb">alg</spanx> values.
</t>
<t>
The use of "+" in the Implementation Requirements
indicates that the requirement strength is likely
to be increased in a future version of the specification.
</t>
<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>
</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 functions <xref target="SHS"/>. 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 per RFC 2104,
using SHA-256 as the hash algorithm "H",
using the bytes of the ASCII <xref target="USASCII"/> 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.
</t>
<t>
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.
</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 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.
</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
Section 8.2 of <xref target="RFC3447">RFC 3447</xref>,
(commonly known as PKCS #1),
using SHA-256, SHA-384, or SHA-512 <xref target="SHS"/>
as the hash functions.
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>
The RSA SHA-256 digital signature is generated as follows:
<list style="numbers">
<t>
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.
</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 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.
</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 using the corresponding hash algorithm
with correspondingly larger result values:
384 bits for RSA SHA-384 and 512 bits for RSA SHA-512.
</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) <xref target="DSS"/>
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
defined in <xref target="DSS"/>. 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>
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 ASCII representation
of the JWS Secured Input
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,
with each array being be 32 bytes long.
</t>
<t>
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.)
</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.
If decoding does not result in a 64 byte array, the JWS MUST be rejected.
</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 ASCII representation of the JWS Secured Input
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>
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.
</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 using the corresponding hash algorithm
with correspondingly larger result values.
For ECDSA P-384 SHA-384, R and S will be 48 bytes each,
resulting in a 96 byte array.
For ECDSA P-521 SHA-512, R and S will be 66 bytes each
(so they can represent a 521-bit integer),
resulting in a 132 byte array.
</t>
</section>
<section title='Using the Algorithm "none"'>
<t>
JWSs MAY also be created that do not provide integrity protection.
Such a JWS is called a "Plaintext JWS".
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 registered 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="JWS" />.
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>
<ttcol align="left">Implementation Requirements</ttcol>
<c>RSA1_5</c>
<c>RSAES-PKCS1-V1_5 <xref target="RFC3447"/></c>
<c>REQUIRED</c>
<c>RSA-OAEP</c>
<c>RSAES using Optimal Asymmetric Encryption Padding (OAEP)
<xref target="RFC3447"/>, with the
default parameters specified by RFC 3447 in Section A.2.1</c>
<c>OPTIONAL</c>
<c>ECDH-ES</c>
<c>Elliptic Curve Diffie-Hellman Ephemeral Static
<xref target="RFC6090"/>, 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>RECOMMENDED+</c>
<c>A128KW</c>
<c>Advanced Encryption Standard (AES) Key Wrap Algorithm
<xref target="RFC3394"/>
using 128 bit keys </c>
<c>RECOMMENDED</c>
<c>A256KW</c>
<c>AES Key Wrap Algorithm
using 256 bit keys</c>
<c>RECOMMENDED</c>
</texttable>
<t>
The use of "+" in the Implementation Requirements
indicates that the requirement strength is likely
to be increased in a future version of the specification.
</t>
</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>
<ttcol align="left">Implementation Requirements</ttcol>
<c>A128CBC</c>
<c>Advanced Encryption Standard (AES) in Cipher Block Chaining (CBC) mode with PKCS #5 padding
<xref target="AES"/> <xref target="NIST.800-38A"/>
using 128 bit keys
</c>
<c>REQUIRED</c>
<c>A256CBC</c>
<c>AES in CBC mode with PKCS #5 padding
using 256 bit keys</c>
<c>REQUIRED</c>
<c>A128GCM</c>
<c>AES in Galois/Counter Mode (GCM)
<xref target="AES"/> <xref target="NIST.800-38D"/>
using 128 bit keys</c>
<c>RECOMMENDED</c>
<c>A256GCM</c>
<c>AES GCM
using 256 bit keys</c>
<c>RECOMMENDED</c>
</texttable>
<t>
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 <spanx style="verb">alg</spanx> values.
</t>
<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>
</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>
<ttcol align="left">Implementation Requirements</ttcol>
<c>HS256</c>
<c>HMAC using SHA-256 hash algorithm</c>
<c>REQUIRED</c>
<c>HS384</c>
<c>HMAC using SHA-384 hash algorithm</c>
<c>OPTIONAL</c>
<c>HS512</c>
<c>HMAC using SHA-512 hash algorithm</c>
<c>OPTIONAL</c>
</texttable>
</section>
<section title='"kdf" (Key Derivation Function) Header Parameter Values for JWE' anchor="JWEKdfValues">
<t>
The table below is the set of
<spanx style="verb">kdf</spanx> (key derivation function) header
parameter values defined by this specification for use with JWE.
</t>
<texttable>
<ttcol align="left">kdf Parameter Value</ttcol>
<ttcol align="left">Algorithm</ttcol>
<ttcol align="left">Implementation Requirements</ttcol>
<c>CS256</c>
<c>Concat KDF, as defined in Section 5.8.1 of <xref target="NIST.800-56A" />,
with parameters per <xref target="KeyDeriv"/>,
using SHA-256 as the digest method</c>
<c>REQUIRED</c>
<c>CS384</c>
<c>Concat KDF with parameters per <xref target="KeyDeriv"/>,
using SHA-384 as the digest method</c>
<c>OPTIONAL</c>
<c>CS512</c>
<c>Concat KDF with parameters per <xref target="KeyDeriv"/>,
using SHA-512 as the digest method</c>
<c>OPTIONAL</c>
</texttable>
</section>
<section title="Key Encryption with RSAES-PKCS1-V1_5" anchor="KeyEncryptionRSA15">
<t>
This section defines the specifics of encrypting a JWE CMK with
RSAES-PKCS1-V1_5 <xref target="RFC3447"/>.
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 RSAES OAEP" anchor="KeyEncryptionRSAOAEP">
<t>
This section defines the specifics of encrypting a JWE CMK with
RSAES using Optimal Asymmetric Encryption Padding (OAEP)
<xref target="RFC3447"/>, with the
default parameters specified by RFC 3447 in Section A.2.1.
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 <xref target="RFC6090"/>,
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>
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>
A new <spanx style="verb">epk</spanx> (ephemeral public key)
value MUST be generated for each 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
<xref target="RFC3394"/>
using 128 or 256 bit keys.
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 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 with PKCS #5 padding
<xref target="AES"/> <xref target="NIST.800-38A"/>
using 128 or 256 bit keys.
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 of size 128 bits is
REQUIRED with this algorithm.
</t>
</section>
<section title="Plaintext Encryption with AES GCM" anchor="PlaintextEncryptionGCM">
<t>
This section defines the specifics of encrypting the JWE Plaintext with
Advanced Encryption Standard (AES) in Galois/Counter Mode (GCM)
<xref target="AES"/> <xref target="NIST.800-38D"/>
using 128 or 256 bit keys.
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 of size 96 bits is
REQUIRED with this algorithm.
</t>
<t>
The "additional authenticated data" parameter is used to
secure the header and key values, as specified for
AEAD algorithms in Section 5 of <xref target="JWE"/>.
</t>
<t>
The requested size of the "authentication tag" output MUST be
128 bits, regardless of the key size.
</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 <xref target="SHS"/>.
Other than as stated below, these computations are performed
identically to those specified in <xref target="DefiningHMAC"/>.
</t>
<t>
A key of the same size as the hash output (for instance, 256
bits for <spanx style="verb">HS256</spanx>) MUST
be used with this algorithm.
</t>
<t>
Per Section 9 of <xref target="JWE"/>, the JWS Secured Input value
used contains the header, encrypted key, and ciphertext.
</t>
</section>
<section title="Key Derivation with Concat KDF and SHA-256, SHA-384, or SHA-512" anchor="KeyDeriv">
<t>
The key derivation process derives CEK and CIK values from the CMK.
It uses as a primitive a Key Derivation Function (KDF)
which notionally takes three arguments:
<list style="hanging">
<t hangText="MasterKey:">The master key used to compute the
individual use keys</t>
<t hangText="Label:">The use key label, used to differentiate
individual use keys</t>
<t hangText="Length:">The desired length of the use key</t>
</list>
This section defines the specifics of using the Concat KDF, as
defined in Section 5.8.1 of <xref target="NIST.800-56A" />, where the Digest
Method is one of SHA-256, SHA-384, or SHA-512,
the SuppPubInfo parameter is the Label, and
the remaining OtherInfo parameters are the empty bit string.
</t>
<t>
The <spanx style="verb">kdf</spanx> (key derivation function) header parameter values
<spanx style="verb">CS256</spanx>, <spanx style="verb">CS384</spanx>, and
<spanx style="verb">CS512</spanx> are respectively used in the JWE Header
to indicate the use of the Concat KDF as above with the respective digest methods.
If the <spanx style="verb">kdf</spanx> header parameter is omitted when an
AEAD <spanx style="verb">enc</spanx> algorithm is not used, this is equivalent
to specifying use of the <spanx style="verb">CS256</spanx> key derivation function.
</t>
<t>
To compute the CEK from the CMK, the ASCII label "Encryption"
([69, 110, 99, 114, 121, 112, 116, 105, 111, 110])
is used.
Use the key size for the <spanx style="verb">enc</spanx>
algorithm as the CEK desired key length.
</t>
<t>
To compute the CIK from the CMK, the ASCII label "Integrity"
([73, 110, 116, 101, 103, 114, 105, 116, 121])
is used.
Use the minimum key size for the <spanx style="verb">int</spanx>
algorithm (for instance, 256 bits for <spanx style="verb">HS256</spanx>)
as the CIK desired key length.
</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 registered 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="JWS" />.
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
JavaScript Object Notation (JSON) <xref target="RFC4627"/>
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>
<ttcol align="left">Implementation Requirements</ttcol>
<c>EC</c>
<c>Elliptic Curve <xref target="DSS"/> key family</c>
<c>RECOMMENDED+</c>
<c>RSA</c>
<c>RSA <xref target="RFC3447" /> key family</c>
<c>REQUIRED</c>
</texttable>
<t>
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 <spanx style="verb">alg</spanx> values.
</t>
<t>
The use of "+" in the Implementation Requirements
indicates that the requirement strength is likely
to be increased in a future version of the specification.
</t>
</section>
<section title="JWK Parameters for Elliptic Curve Keys" anchor="JWKEC">
<t>
JWKs can represent Elliptic Curve <xref target="DSS"/> 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' anchor="crvDef">
<t>
The <spanx style="verb">crv</spanx> (curve) member identifies
the cryptographic curve used with the key. Curve values
from <xref target="DSS"/> used by this specification are:
<list style='symbols'>
<t><spanx style="verb">P-256</spanx></t>
<t><spanx style="verb">P-384</spanx></t>
<t><spanx style="verb">P-521</spanx></t>
</list>
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' anchor="xDef">
<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' anchor="yDef">
<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' anchor="modDef">
<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
unsigned big endian representation.
</t>
</section>
<section title='"exp" (Exponent) Parameter' anchor="expDef">
<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
unsigned 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 registered 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 registered in the
IANA JSON Web Key Parameters registry <xref target="JWK" /> or be
a URI that contains a Collision Resistant Namespace.
</t>
</section>
</section>
<section title="IANA Considerations" anchor="IANA">
<t>
The following registration procedure is used for all the
registries established by this specification.
</t>
<t>
Values are registered with a Specification Required
<xref target="RFC5226"/> 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.
</t>
<t>
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. ]]
</t>
<t>
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.
</t>
<t>
IANA must only accept registry updates from the Designated Expert(s), and should direct
all requests for registration to the review mailing list.
</t>
<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.
The registry records the algorithm name,
the algorithm usage locations from the set
<spanx style="verb">alg</spanx>,
<spanx style="verb">enc</spanx>, and
<spanx style="verb">int</spanx>,
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.
</t>
<section title='Registration Template'>
<t>
<list style='hanging'>
<t hangText='Algorithm Name:'>
<vspace />
The name requested (e.g., "example").
</t>
<t hangText='Algorithm Usage Location(s):'>
<vspace />
The algorithm usage, which must be one or more of the values
<spanx style="verb">alg</spanx>,
<spanx style="verb">enc</spanx>,
<spanx style="verb">int</spanx>, or
<spanx style="verb">kdf</spanx>.
</t>
<t hangText='Implementation Requirements:'>
<vspace />
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.
</t>
<t hangText='Change Controller:'>
<vspace />
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.
</t>
<t hangText='Specification Document(s):'>
<vspace />
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.
</t>
</list>
</t>
</section>
<section title='Initial Registry Contents'>
<t>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">HS256</spanx>
</t>
<t>
Algorithm Usage Location(s): <spanx style="verb">alg</spanx>,
<spanx style="verb">int</spanx>
</t>
<t>
Implementation Requirements: REQUIRED
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWSAlgValues" />
and <xref target="JWEIntValues" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">HS384</spanx>
</t>
<t>
Algorithm Usage Location(s): <spanx style="verb">alg</spanx>,
<spanx style="verb">int</spanx>
</t>
<t>
Implementation Requirements: OPTIONAL
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWSAlgValues" />
and <xref target="JWEIntValues" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">HS512</spanx>
</t>
<t>
Algorithm Usage Location(s): <spanx style="verb">alg</spanx>,
<spanx style="verb">int</spanx>
</t>
<t>
Implementation Requirements: OPTIONAL
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWSAlgValues" />
and <xref target="JWEIntValues" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">RS256</spanx>
</t>
<t>
Algorithm Usage Location(s): <spanx style="verb">alg</spanx>
</t>
<t>
Implementation Requirements: RECOMMENDED
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWSAlgValues" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">RS384</spanx>
</t>
<t>
Algorithm Usage Location(s): <spanx style="verb">alg</spanx>
</t>
<t>
Implementation Requirements: OPTIONAL
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWSAlgValues" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">RS512</spanx>
</t>
<t>
Algorithm Usage Location(s): <spanx style="verb">alg</spanx>
</t>
<t>
Implementation Requirements: OPTIONAL
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWSAlgValues" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">ES256</spanx>
</t>
<t>
Algorithm Usage Location(s): <spanx style="verb">alg</spanx>
</t>
<t>
Implementation Requirements: RECOMMENDED+
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWSAlgValues" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">ES384</spanx>
</t>
<t>
Algorithm Usage Location(s): <spanx style="verb">alg</spanx>
</t>
<t>
Implementation Requirements: OPTIONAL
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWSAlgValues" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">ES512</spanx>
</t>
<t>
Algorithm Usage Location(s): <spanx style="verb">alg</spanx>
</t>
<t>
Implementation Requirements: OPTIONAL
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWSAlgValues" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">none</spanx>
</t>
<t>
Algorithm Usage Location(s): <spanx style="verb">alg</spanx>
</t>
<t>
Implementation Requirements: REQUIRED
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWSAlgValues" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">RSA1_5</spanx>
</t>
<t>
Algorithm Usage Location(s): <spanx style="verb">alg</spanx>
</t>
<t>
Implementation Requirements: REQUIRED
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWEAlgValues" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">RSA-OAEP</spanx>
</t>
<t>
Algorithm Usage Location(s): <spanx style="verb">alg</spanx>
</t>
<t>
Implementation Requirements: OPTIONAL
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWEAlgValues" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">ECDH-ES</spanx>
</t>
<t>
Algorithm Usage Location(s): <spanx style="verb">alg</spanx>
</t>
<t>
Implementation Requirements: RECOMMENDED+
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWEAlgValues" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">A128KW</spanx>
</t>
<t>
Algorithm Usage Location(s): <spanx style="verb">alg</spanx>
</t>
<t>
Implementation Requirements: RECOMMENDED
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWEAlgValues" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">A256KW</spanx>
</t>
<t>
Algorithm Usage Location(s): <spanx style="verb">alg</spanx>
</t>
<t>
Implementation Requirements: RECOMMENDED
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWEAlgValues" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">A128CBC</spanx>
</t>
<t>
Algorithm Usage Location(s): <spanx style="verb">enc</spanx>
</t>
<t>
Implementation Requirements: REQUIRED
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWEEncValues" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">A256CBC</spanx>
</t>
<t>
Algorithm Usage Location(s): <spanx style="verb">enc</spanx>
</t>
<t>
Implementation Requirements: REQUIRED
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWEEncValues" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">A128GCM</spanx>
</t>
<t>
Algorithm Usage Location(s): <spanx style="verb">enc</spanx>
</t>
<t>
Implementation Requirements: RECOMMENDED
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWEEncValues" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">A256GCM</spanx>
</t>
<t>
Algorithm Usage Location(s): <spanx style="verb">enc</spanx>
</t>
<t>
Implementation Requirements: RECOMMENDED
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWEEncValues" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">CS256</spanx>
</t>
<t>
Algorithm Usage Location(s): <spanx style="verb">kdf</spanx>
</t>
<t>
Implementation Requirements: REQUIRED
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWEKdfValues" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">CS384</spanx>
</t>
<t>
Algorithm Usage Location(s): <spanx style="verb">kdf</spanx>
</t>
<t>
Implementation Requirements: OPTIONAL
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWEKdfValues" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">CS512</spanx>
</t>
<t>
Algorithm Usage Location(s): <spanx style="verb">kdf</spanx>
</t>
<t>
Implementation Requirements: OPTIONAL
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWEKdfValues" /> of [[ this document ]]
</t>
</list>
</t>
</section>
</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.
The registry records the <spanx style="verb">alg</spanx> value
and a reference to the specification that defines it.
This specification registers the values defined in
<xref target="JWKAlgValues" />.
</t>
<section title='Registration Template'>
<t>
<list style='hanging'>
<t hangText='"alg" Parameter Value:'>
<vspace />
The name requested (e.g., "example").
</t>
<t hangText='Change Controller:'>
<vspace />
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.
</t>
<t hangText='Implementation Requirements:'>
<vspace />
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.
</t>
<t hangText='Specification Document(s):'>
<vspace />
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.
</t>
</list>
</t>
</section>
<section title='Initial Registry Contents'>
<t>
<list style='symbols'>
<t>
"alg" Parameter Value: <spanx style="verb">EC</spanx>
</t>
<t>
Implementation Requirements: RECOMMENDED+
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWKAlgValues" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
"alg" Parameter Value: <spanx style="verb">RSA</spanx>
</t>
<t>
Implementation Requirements: REQUIRED
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWKAlgValues" /> of [[ this document ]]
</t>
</list>
</t>
</section>
</section>
<section title="JSON Web Key Parameters Registration">
<t>
This specification registers the parameter names defined in
<xref target="JWKEC"/> and <xref target="JWKRSA"/> in the
IANA JSON Web Key Parameters registry <xref target="JWK"/>.
</t>
<section title='Registry Contents'>
<t>
<list style='symbols'>
<t>
Parameter Name: <spanx style="verb">crv</spanx>
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="crvDef" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Parameter Name: <spanx style="verb">x</spanx>
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="xDef" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Parameter Name: <spanx style="verb">y</spanx>
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="yDef" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Parameter Name: <spanx style="verb">mod</spanx>
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="modDef" /> of [[ this document ]]
</t>
</list>
<list style='symbols'>
<t>
Parameter Name: <spanx style="verb">exp</spanx>
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="expDef" /> of [[ this document ]]
</t>
</list>
</t>
</section>
</section>
</section>
<section title="Security Considerations" anchor="Security">
<t>
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.
</t>
<t>
The security considerations in
<xref target="AES"/>,
<xref target="DSS"/>,
<xref target="JWE"/>,
<xref target="JWK"/>,
<xref target="JWS"/>,
<xref target="NIST.800-38A"/>,
<xref target="NIST.800-38D"/>,
<xref target="NIST.800-56A"/>,
<xref target="RFC2104"/>,
<xref target="RFC3394"/>,
<xref target="RFC3447"/>,
<xref target="RFC5116"/>,
<xref target="RFC6090"/>, and
<xref target="SHS"/> 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>
<t>
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 CBC or GCM is recommended.
Likewise, when AES CBC is used with a 128 bit key, using HMAC SHA-256
as the integrity algorithm is recommended, whereas when
AES CBC is used with a 256 bit key, using HMAC SHA-512
as the integrity algorithm is recommended.
</t>
<t>
While Section 8 of RFC 3447 <xref target="RFC3447"/>
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.
</t>
<t>
Keys used with RSAES-PKCS1-v1_5 must follow the constraints in
Section 7.2 of RFC 3447 <xref target="RFC3447"/>. In particular, keys with
a low public key exponent value must not be used.
</t>
<t>
Plaintext JWSs (JWSs that use the <spanx style="verb">alg</spanx>
value <spanx style="verb">none</spanx>) 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.
</t>
<t>
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.
</t>
</section>
<section title="Open Issues" anchor="TBD">
<t>
[[ to be removed by the RFC editor before publication as an RFC ]]
</t>
<t>
The following items remain to be considered or done in this draft:
<list style="symbols">
<t>
Should we use the <spanx style="verb">alg</spanx> value as
the AlgorithmID input to the Concat KDF when doing key agreement?
Or is an AlgorithmID value unnecessary in the way that we
are using Concat?
</t>
<t>
Should we use the <spanx style="verb">enc</spanx> and
<spanx style="verb">int</spanx> values as AlgorithmID
inputs to the Concat KDF when doing key derivation?
Or is an AlgorithmID value unnecessary in the way that we
are using Concat?
</t>
<t>
Do we want to add AES ECB as a (non-authenticated) key wrap algorithm?
</t>
</list>
</t>
</section>
</middle>
<back>
<references title="Normative References">
<?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.3629.xml' ?>
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.4627.xml' ?>
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.4648.xml' ?>
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.5116.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="SHS">
<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="DSS">
<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="AES">
<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="6" month="July" 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="6" month="July" 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="6" month="July" year="2012" />
</front>
<format target="http://tools.ietf.org/html/draft-ietf-jose-json-web-key" type="HTML" />
</reference>
<reference anchor="USASCII">
<front>
<title>Coded Character Set -- 7-bit American Standard Code for Information Interchange</title>
<author>
<organization>American National Standards Institute</organization>
</author>
<date year="1986"/>
</front>
<seriesInfo name="ANSI" value="X3.4"/>
</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/bibxml/reference.RFC.4122.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>RSASSA 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>RSASSA 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>RSASSA 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>RSAES-PKCS1-V1_5</c>
<c>RSA1_5</c>
<c>http://www.w3.org/2001/04/xmlenc#rsa-1_5</c>
<c>RSA/None/PKCS1Padding</c>
<!-- RSA/None/PKCS1Padding or RSA/ECB/PKCS1Padding ? -->
<c>RSAES 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/None/OAEPWithSHA-1AndMGF1Padding</c>
<!-- RSA/ECB/OAEPWithSHA-1AndMGF1Padding or RSA/None/OAEPWithSHA-1AndMGF1Padding ? -->
<c>Elliptic Curve Diffie-Hellman Ephemeral Static</c>
<c>ECDH-ES</c>
<c>http://www.w3.org/2009/xmlenc11#ECDH-ES</c>
<c></c>
<c>Advanced Encryption Standard (AES) Key Wrap Algorithm
using 128 bit keys</c>
<c>A128KW</c>
<c>http://www.w3.org/2001/04/xmlenc#kw-aes128</c>
<c></c>
<c>AES Key Wrap Algorithm
using 256 bit keys</c>
<c>A256KW</c>
<c>http://www.w3.org/2001/04/xmlenc#kw-aes256</c>
<c></c>
<c>AES in Cipher Block Chaining (CBC) mode with PKCS #5 padding
using 128 bit keys</c>
<c>A128CBC</c>
<c>http://www.w3.org/2001/04/xmlenc#aes128-cbc</c>
<c>AES/CBC/PKCS5Padding</c>
<c>AES in CBC mode with PKCS #5 padding
using 256 bit keys</c>
<c>A256CBC</c>
<c>http://www.w3.org/2001/04/xmlenc#aes256-cbc</c>
<c>AES/CBC/PKCS5Padding</c>
<c>AES in Galois/Counter Mode (GCM)
using 128 bit keys</c>
<c>A128GCM</c>
<c>http://www.w3.org/2009/xmlenc11#aes128-gcm</c>
<c>AES/GCM/NoPadding</c>
<c>AES GCM
using 256 bit keys</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>
[[ to be removed by the RFC editor before publication as an RFC ]]
</t>
<t>
-03
<list style='symbols'>
<t>
Always use a 128 bit "authentication tag" size for
AES GCM, regardless of the key size.
</t>
<t>
Specified that use of a 128 bit IV is REQUIRED with AES CBC.
It was previously RECOMMENDED.
</t>
<t>
Removed key size language for ECDSA algorithms, since the
key size is implied by the algorithm being used.
</t>
<t>
Stated that the <spanx style="verb">int</spanx> 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.
</t>
<t>
Added the <spanx style="verb">kdf</spanx> (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.
</t>
<t>
Clarified that the <spanx style="verb">mod</spanx> and
<spanx style="verb">exp</spanx> values are unsigned.
</t>
<t>
Added Implementation Requirements columns to algorithm tables
and Implementation Requirements entries to algorithm registries.
</t>
<t>
Changed AES Key Wrap to RECOMMENDED.
</t>
<t>
Moved registries
JSON Web Signature and Encryption Header Parameters and
JSON Web Signature and Encryption Type Values
to the JWS specification.
</t>
<t>
Moved JSON Web Key Parameters registry to the JWK specification.
</t>
<t>
Changed registration requirements from RFC Required to
Specification Required with Expert Review.
</t>
<t>
Added Registration Template sections for defined registries.
</t>
<t>
Added Registry Contents sections to populate registry values.
</t>
<t>
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".
</t>
<t>
Added "Collision Resistant Namespace" to the terminology section.
</t>
<t>
Numerous editorial improvements.
</t>
</list>
</t>
<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:47:53 |