One document matched: draft-ietf-jose-json-web-algorithms-07.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-07">
<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="November" 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.
All these specifications utilize
JavaScript Object Notation (JSON) <xref target="RFC4627"/>
based data structures.
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="Base64url Encoding">
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="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="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.
AEAD encryption algorithms accept two inputs, the plaintext and the
"additional authenticated data" value, and produce two outputs,
the ciphertext and the "authentication tag" value.
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>
<t>
An example using this algorithm is shown in
Appendix A.1 of <xref target="JWS"/>.
</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>
<t>
An example using this algorithm is shown in
Appendix A.2 of <xref target="JWS"/>.
</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 pair
(R, S), where R and S are 256 bit unsigned integers.
</t>
<t>
Turn R and S into byte arrays in big endian order,
with each array being be 32 bytes long.
The array representations MUST not be shortened
to omit any leading zero bytes contained in the values.
</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 384 bits each,
resulting in a 96 byte array.
For ECDSA P-521 SHA-512, R and S will be 521 bits each,
resulting in a 132 byte array.
</t>
<t>
Examples using these algorithms are shown in
Appendices A.3 and A.4 of <xref target="JWS"/>.
</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>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>
<c>dir</c>
<c>Direct use of a shared symmetric key as the Content Master Key (CMK)
for the block encryption step
(rather than using the symmetric key to wrap the CMK)</c>
<c>RECOMMENDED</c>
<c>ECDH-ES</c>
<c>Elliptic Curve Diffie-Hellman Ephemeral Static
<xref target="RFC6090"/> key agreement using the
Concat KDF, as defined in Section 5.8.1 of <xref target="NIST.800-56A" />,
with the agreed-upon key being used directly as the Content Master Key (CMK)
(rather than being used to wrap the CMK),
as specified in <xref target="ECDHES"/>
</c>
<c>RECOMMENDED+</c>
<c>ECDH-ES+A128KW</c>
<c>Elliptic Curve Diffie-Hellman Ephemeral Static key agreement
per <spanx style="verb">ECDH-ES</spanx> and <xref target="ECDHES"/>,
but where the agreed-upon key is used to wrap the Content Master Key (CMK)
with the <spanx style="verb">A128KW</spanx> function
(rather than being used directly as the CMK)</c>
<c>RECOMMENDED</c>
<c>ECDH-ES+A256KW</c>
<c>Elliptic Curve Diffie-Hellman Ephemeral Static key agreement
per <spanx style="verb">ECDH-ES</spanx> and <xref target="ECDHES"/>,
but where the agreed-upon key is used to wrap the Content Master Key (CMK)
with the <spanx style="verb">A256KW</spanx> function
(rather than being used directly as the CMK)</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+HS256</c>
<c>Composite AEAD algorithm using Advanced Encryption Standard (AES)
in Cipher Block Chaining (CBC) mode with PKCS #5 padding
<xref target="AES"/> <xref target="NIST.800-38A"/>
with an integrity calculation using HMAC SHA-256,
using a 256 bit CMK (and 128 bit CEK)
as specified in <xref target="AESCBC"/>
</c>
<c>REQUIRED</c>
<c>A256CBC+HS512</c>
<c>Composite AEAD algorithm using AES in CBC mode with PKCS #5 padding
with an integrity calculation using HMAC SHA-512,
using a 512 bit CMK (and 256 bit CEK)
as specified in <xref target="AESCBC"/>
</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="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>
<t>
An example using this algorithm is shown in
Appendix A.2 of <xref target="JWE"/>.
</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>
<t>
An example using this algorithm is shown in
Appendix A.1 of <xref target="JWE"/>.
</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>
<t>
An example using this algorithm is shown in
Appendix A.3 of <xref target="JWE"/>.
</t>
</section>
<section title="Direct Encryption with a Shared Symmetric Key" anchor="DirectEncryption">
<t>
This section defines the specifics of directly performing symmetric key
encryption without performing a key wrapping step. In this case,
the shared symmetric key is used directly as the Content Master Key (CMK)
value for the <spanx style="verb">enc</spanx> algorithm.
An empty byte array is used as the JWE Encrypted Key value.
The <spanx style="verb">alg</spanx> header parameter value
<spanx style="verb">dir</spanx>
is used in this case.
</t>
</section>
<section title="Key Agreement with Elliptic Curve Diffie-Hellman Ephemeral Static (ECDH-ES)" anchor="ECDHES">
<t>
This section defines the specifics of key agreement 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" />.
The key agreement result can be used in one of two ways:
(1) directly as the Content Master Key (CMK) for the
<spanx style="verb">enc</spanx> algorithm, or
(2) as a symmetric key used to wrap the CMK with either the
<spanx style="verb">A128KW</spanx> or <spanx style="verb">A256KW</spanx>
algorithms.
The <spanx style="verb">alg</spanx> header parameter values
<spanx style="verb">ECDH-ES</spanx>,
<spanx style="verb">ECDH-ES+A128KW</spanx>, and
<spanx style="verb">ECDH-ES+A256KW</spanx>
are respectively used in this case.
</t>
<t>
In the direct case, 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;
in this case, the empty byte array is used as the JWE Encrypted Key value.
In the key wrap case, the output of the Concat KDF MUST be a key of the
length needed for the specified key wrap algorithm,
either 128 or 256 bits respectively.
</t>
<t>
A new <spanx style="verb">epk</spanx> (ephemeral public key)
value MUST be generated for each key agreement transaction.
</t>
<section title='Key Derivation for "ECDH-ES"' anchor="KeyDerivECDHES">
<t>
The key derivation process derives the agreed upon key from the
shared secret Z established through the ECDH algorithm,
per Section 6.2.2.2 of <xref target="NIST.800-56A" />.
</t>
<t>
Key derivation is performed using the Concat KDF, as
defined in Section 5.8.1 of <xref target="NIST.800-56A" />, where the Digest
Method is SHA-256.
The Concat KDF parameters are set as follows:
<list style='hanging'>
<t hangText="Z">
This is set to the representation of the shared secret Z as a byte array.
</t>
<t hangText="keydatalen">
This is set to the number of bits in the desired output key.
For <spanx style="verb">ECDH-ES</spanx>, this is length of the key
used by the <spanx style="verb">enc</spanx> algorithm.
For <spanx style="verb">ECDH-ES+A128KW</spanx>, and
<spanx style="verb">ECDH-ES+A256KW</spanx>, this is
128 and 256, respectively.
</t>
<t hangText="AlgorithmID">
This is set to the concatenation of keydatalen represented as a
32 bit big endian integer and
the bytes of the UTF-8 representation of the
<spanx style="verb">alg</spanx> header parameter value.
</t>
<t hangText="PartyUInfo">
The PartyUInfo value is of the form Datalen || Data, where
Data is a variable-length string of zero or more bytes,
and Datalen is a fixed-length, big endian 32 bit counter that
indicates the length (in bytes) of Data, with || being concatenation.
If an <spanx style="verb">apu</spanx> (agreement PartyUInfo)
header parameter is present, Data is set to the result of
base64url decoding the <spanx style="verb">apu</spanx> value
and Datalen is set to the number of bytes in Data.
Otherwise, Datalen is set to 0 and Data is set to the empty byte string.
</t>
<t hangText="PartyVInfo">
The PartyVInfo value is of the form Datalen || Data, where
Data is a variable-length string of zero or more bytes,
and Datalen is a fixed-length, big endian 32 bit counter that
indicates the length (in bytes) of Data, with || being concatenation.
If an <spanx style="verb">apv</spanx> (agreement PartyVInfo)
header parameter is present, Data is set to the result of
base64url decoding the <spanx style="verb">apv</spanx> value
and Datalen is set to the number of bytes in Data.
Otherwise, Datalen is set to 0 and Data is set to the empty byte string.
</t>
<t hangText="SuppPubInfo">
This is set to the empty byte string.
</t>
<t hangText="SuppPrivInfo">
This is set to the empty byte string.
</t>
</list>
</t>
<t>
For all three <spanx style="verb">alg</spanx> values,
the digest function used is SHA-256.
</t>
</section>
</section>
<section title='Composite Plaintext Encryption Algorithms "A128CBC+HS256" and "A256CBC+HS512"' anchor="AESCBC">
<t>
This section defines two composite <spanx style="verb">enc</spanx>
algorithms that perform plaintext encryption using non-AEAD
algorithms and add an integrity check calculation, so that
the resulting composite algorithms are AEAD.
These composite algorithms derive a Content Encryption Key (CEK) and a
Content Integrity Key (CIK) from a Content Master Key,
per <xref target="KeyDerivCBC"/>.
They perform block encryption with AES CBC,
per <xref target="PlaintextEncryptionCBC"/>.
Finally, they add an integrity check using HMAC SHA-2 algorithms of
matching strength, per <xref target="IntHMAC"/>.
</t>
<t>
A 256 bit Content Master Key (CMK) value is used with the
<spanx style="verb">A128CBC+HS256</spanx> algorithm.
A 512 bit Content Master Key (CMK) value is used with the
<spanx style="verb">A256CBC+HS512</spanx> algorithm.
</t>
<t>
An example using this algorithm is shown in
Appendix A.2 of <xref target="JWE"/>.
</t>
<section title='Key Derivation for "A128CBC+HS256" and "A256CBC+HS512"' anchor="KeyDerivCBC">
<t>
The key derivation process derives CEK and CIK values from the CMK.
This section defines the specifics of deriving keys for the
<spanx style="verb">enc</spanx> algorithms
<spanx style="verb">A128CBC+HS256</spanx> and
<spanx style="verb">A256CBC+HS512</spanx>.
</t>
<t>
Key derivation is performed using the Concat KDF, as
defined in Section 5.8.1 of <xref target="NIST.800-56A" />, where the Digest
Method is SHA-256 or SHA-512, respectively.
The Concat KDF parameters are set as follows:
<list style='hanging'>
<t hangText="Z">
This is set to the Content Master Key (CMK).
</t>
<t hangText="keydatalen">
This is set to the number of bits in the desired output key.
</t>
<t hangText="AlgorithmID">
This is set to the concatenation of keydatalen represented as a
32 bit big endian integer and
the bytes of the UTF-8 representation of the
<spanx style="verb">enc</spanx> header parameter value.
</t>
<t hangText="PartyUInfo">
The PartyUInfo value is of the form Datalen || Data, where
Data is a variable-length string of zero or more bytes,
and Datalen is a fixed-length, big endian 32 bit counter that
indicates the length (in bytes) of Data, with || being concatenation.
If an <spanx style="verb">epu</spanx> (encryption PartyUInfo)
header parameter is present, Data is set to the result of
base64url decoding the <spanx style="verb">epu</spanx> value
and Datalen is set to the number of bytes in Data.
Otherwise, Datalen is set to 0 and Data is set to the empty byte string.
</t>
<t hangText="PartyVInfo">
The PartyVInfo value is of the form Datalen || Data, where
Data is a variable-length string of zero or more bytes,
and Datalen is a fixed-length, big endian 32 bit counter that
indicates the length (in bytes) of Data, with || being concatenation.
If an <spanx style="verb">epv</spanx> (encryption PartyVInfo)
header parameter is present, Data is set to the result of
base64url decoding the <spanx style="verb">epv</spanx> value
and Datalen is set to the number of bytes in Data.
Otherwise, Datalen is set to 0 and Data is set to the empty byte string.
</t>
<t hangText="SuppPubInfo">
This is set to the bytes of one of the ASCII strings
"Encryption" ([69, 110, 99, 114, 121, 112, 116, 105, 111, 110]) or
"Integrity" ([73, 110, 116, 101, 103, 114, 105, 116, 121]) respectively,
depending upon whether the CEK or CIK is being generated.
</t>
<t hangText="SuppPrivInfo">
This is set to the empty byte string.
</t>
</list>
</t>
<t>
To compute the CEK from the CMK, the ASCII label "Encryption"
is used for the SuppPubInfo value.
For <spanx style="verb">A128CBC+HS256</spanx>, the keydatalen is 128 and
the digest function used is SHA-256.
For <spanx style="verb">A256CBC+HS512</spanx>, the keydatalen is 256 and
the digest function used is SHA-512.
</t>
<t>
To compute the CIK from the CMK, the ASCII label "Integrity"
is used for the SuppPubInfo value.
For <spanx style="verb">A128CBC+HS256</spanx>, the keydatalen is 256 and
the digest function used is SHA-256.
For <spanx style="verb">A256CBC+HS512</spanx>, the keydatalen is 512 and
the digest function used is SHA-512.
</t>
<t>
Example derivation computations are shown in Appendices A.4 and A.5 of
<xref target="JWE"/>.
</t>
</section>
<section title='Encryption Calculation for "A128CBC+HS256" and "A256CBC+HS512"' 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+HS256</spanx> or
<spanx style="verb">A256CBC+HS512</spanx>
are respectively used in this case.
</t>
<t>
The CEK is used as the encryption key.
</t>
<t>
Use of an initialization vector of size 128 bits is
REQUIRED with these algorithms.
</t>
</section>
<section title='Integrity Calculation for "A128CBC+HS256" and "A256CBC+HS512"' anchor="IntHMAC">
<t>
This section defines the specifics of computing the JWE Integrity Value for the
<spanx style="verb">enc</spanx> algorithms
<spanx style="verb">A128CBC+HS256</spanx> and
<spanx style="verb">A256CBC+HS512</spanx>.
This value is computed as a MAC of the JWE parameters to
be secured.
</t>
<t>
The MAC input value is the bytes of the ASCII
representation of the concatenation of
the Encoded JWE Header, a period ('.') character,
the Encoded JWE Encrypted Key, a second period character ('.'),
the Encoded JWE Initialization Vector, a third period ('.') character, and
the Encoded JWE Ciphertext.
(Equivalently, this input value is the concatenation of
the "additional authenticated data" value,
a byte containing an ASCII period character,
and the bytes of the ASCII representation of the Encoded JWE Ciphertext.)
</t>
<t>
The CIK is used as the MAC key.
</t>
<t>
For <spanx style="verb">A128CBC+HS256</spanx>, HMAC SHA-256
is used as the MAC algorithm.
For <spanx style="verb">A256CBC+HS512</spanx>, HMAC SHA-512
is used as the MAC algorithm.
</t>
<t>
The resulting MAC value is used as the JWE Integrity Value.
(Equivalently, this value is the "authentication tag" output
for the algorithm.)
The same integrity calculation is performed during decryption.
During decryption, the computed integrity value must match
the received JWE Integrity Value.
</t>
</section>
</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>
The CMK is used as the encryption key.
</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.
(The "additional authenticated data" value used is the bytes of the ASCII
representation of the concatenation of
the Encoded JWE Header, a period ('.') character,
the Encoded JWE Encrypted Key, a second period character ('.'), and
the Encoded JWE Initialization Vector,
per Section 5 of the JWE specification.)
This same "additional authenticated data" value is used when decrypting as well.
</t>
<t>
The requested size of the "authentication tag" output MUST be
128 bits, regardless of the key size.
</t>
<t>
The JWE Integrity Value is set
to be the "authentication tag" value produced by the encryption.
During decryption, the received JWE Integrity Value is used as the
"authentication tag" value.
</t>
<t>
Examples using this algorithm are shown in
Appendices A.1 and A.3 of <xref target="JWE"/>.
</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) and
<spanx style="verb">enc</spanx> (encryption method)
header parameter values being
defined to refer to them. New
<spanx style="verb">alg</spanx> and
<spanx style="verb">enc</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> and
<spanx style="verb">enc</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="crvECDef">
<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 a case sensitive string.
</t>
</section>
<section title='"x" (X Coordinate) Parameter' anchor="xECDef">
<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 as a byte array.
The array representation MUST not be shortened
to omit any leading zero bytes contained in the value.
For instance, when representing 521 bit integers,
the byte array to be base64url encoded MUST contain 66 bytes,
including any leading zero bytes.
</t>
</section>
<section title='"y" (Y Coordinate) Parameter' anchor="yECDef">
<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 as a byte array.
The array representation MUST not be shortened
to omit any leading zero bytes contained in the value.
For instance, when representing 521 bit integers,
the byte array to be base64url encoded MUST contain 66 bytes,
including any leading zero bytes.
</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='"n" (Modulus) Parameter' anchor="nRSADef">
<t>
The <spanx style="verb">n</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 as a byte array.
The array representation MUST not be shortened
to omit any leading zero bytes.
For instance, when representing 2048 bit integers,
the byte array to be base64url encoded MUST contain 256 bytes,
including any leading zero bytes.
</t>
</section>
<section title='"e" (Exponent) Parameter' anchor="eRSADef">
<t>
The <spanx style="verb">e</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 as a byte array.
The array representation MUST utilize the minimum
number of bytes to represent the value.
For instance, when representing the value 65537,
the byte array to be base64url encoded MUST consist of the
three bytes [1, 0, 1].
</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) and
<spanx style="verb">enc</spanx> (encryption method)
header parameters.
The registry records the algorithm name,
the algorithm usage locations from the set
<spanx style="verb">alg</spanx> and
<spanx style="verb">enc</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").
This name is case sensitive. Names that match other registered names
in a case insensitive manner SHOULD NOT be accepted.
</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> or
<spanx style="verb">enc</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, email address, home page
URI) may also be included.
</t>
<t hangText='Specification Document(s):'>
<vspace />
Reference to the document(s) that specify the parameter, preferably including URI(s) that
can be used to retrieve copies of the document(s). An indication of the relevant
sections may also be included but is not required.
</t>
</list>
</t>
</section>
<section title='Initial Registry Contents'>
<t> <?rfc subcompact="yes"?>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">HS256</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>
</t>
<t>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">HS384</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>
</t>
<t>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">HS512</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>
</t>
<t>
<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>
</t>
<t>
<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>
</t>
<t>
<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>
</t>
<t>
<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>
</t>
<t>
<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>
</t>
<t>
<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>
</t>
<t>
<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>
</t>
<t>
<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>
</t>
<t>
<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>
</t>
<t>
<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>
</t>
<t>
<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>
</t>
<t>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">dir</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>
</t>
<t>
<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>
</t>
<t>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">ECDH-ES+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>
</t>
<t>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">ECDH-ES+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>
</t>
<t>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">A128CBC+HS256</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>
</t>
<t>
<list style='symbols'>
<t>
Algorithm Name: <spanx style="verb">A256CBC+HS512</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>
</t>
<t>
<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>
</t>
<t>
<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>
</t>
</section>
<?rfc subcompact="no"?>
</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").
This name is case sensitive. Names that match other registered names
in a case insensitive manner SHOULD NOT be accepted.
</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, email 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(s) that specify the parameter, preferably including URI(s) that
can be used to retrieve copies of the document(s). An indication of the relevant
sections may also be included but is not required.
</t>
</list>
</t>
</section>
<section title='Initial Registry Contents'>
<t> <?rfc subcompact="yes"?>
<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>
</t>
<t>
<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>
<?rfc subcompact="no"?>
</section>
<section title="JSON Web Key Parameters Registration">
<t>
This specification registers the parameter names defined in
Sections <xref target="JWKEC" format="counter"/>
and <xref target="JWKRSA" format="counter"/> in the
IANA JSON Web Key Parameters registry <xref target="JWK"/>.
</t>
<section title='Registry Contents'>
<t> <?rfc subcompact="yes"?>
<list style='symbols'>
<t>
Parameter Name: <spanx style="verb">crv</spanx>
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="crvECDef" /> of [[ this document ]]
</t>
</list>
</t>
<t>
<list style='symbols'>
<t>
Parameter Name: <spanx style="verb">x</spanx>
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="xECDef" /> of [[ this document ]]
</t>
</list>
</t>
<t>
<list style='symbols'>
<t>
Parameter Name: <spanx style="verb">y</spanx>
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="yECDef" /> of [[ this document ]]
</t>
</list>
</t>
<t>
<list style='symbols'>
<t>
Parameter Name: <spanx style="verb">n</spanx>
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="nRSADef" /> of [[ this document ]]
</t>
</list>
</t>
<t>
<list style='symbols'>
<t>
Parameter Name: <spanx style="verb">e</spanx>
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="eRSADef" /> of [[ this document ]]
</t>
</list>
</t>
</section>
<?rfc subcompact="no"?>
</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 is recommended when AES GCM is also used.
</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>
</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="November" 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="November" 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="November" 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>
<t>
For the composite algorithms <spanx style="verb">A128CBC+HS256</spanx> and
<spanx style="verb">A256CBC+HS512</spanx>, the corresponding AES CBC
algorithm identifiers are listed.
</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/ECB/PKCS1Padding</c>
<!-- RSA/ECB/PKCS1Padding or RSA/None/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/ECB/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+HS256</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+HS512</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>
<t>
Jim Schaad and Karen O'Donoghue chaired the JOSE working group and
Sean Turner and Stephen Farrell served as Security area directors
during the creation of this specification.
</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>
No known open issues.
</t>
</list>
</t>
</section>
<section title='Document History'>
<t>
[[ to be removed by the RFC editor before publication as an RFC ]]
</t>
<t>
-07
<list style='symbols'>
<t>
Added a data length prefix to PartyUInfo and PartyVInfo values.
</t>
<t>
Changed the name of the JWK RSA modulus parameter from
<spanx style="verb">mod</spanx> to <spanx style="verb">n</spanx>
and the name of the JWK RSA exponent parameter from
<spanx style="verb">xpo</spanx> to <spanx style="verb">e</spanx>,
so that the identifiers are the same as those used in RFC 3447.
</t>
<t>
Made several local editorial changes to clean up loose ends
left over from to the decision to only support
block encryption methods providing integrity.
</t>
</list>
</t>
<t>
-06
<list style='symbols'>
<t>
Removed the <spanx style="verb">int</spanx> and
<spanx style="verb">kdf</spanx> parameters and defined the new composite
AEAD algorithms <spanx style="verb">A128CBC+HS256</spanx> and
<spanx style="verb">A256CBC+HS512</spanx> to replace the former
uses of AES CBC, which required the use of separate integrity
and key derivation functions.
</t>
<t>
Included additional values in the Concat KDF calculation -- the
desired output size and the algorithm value,
and optionally PartyUInfo and PartyVInfo values.
Added the optional header parameters
<spanx style="verb">apu</spanx> (agreement PartyUInfo),
<spanx style="verb">apv</spanx> (agreement PartyVInfo),
<spanx style="verb">epu</spanx> (encryption PartyUInfo), and
<spanx style="verb">epv</spanx> (encryption PartyVInfo).
</t>
<t>
Changed the name of the JWK RSA exponent parameter from
<spanx style="verb">exp</spanx> to <spanx style="verb">xpo</spanx>
so as to allow the potential use of the name <spanx style="verb">exp</spanx>
for a future extension that might define an expiration parameter for keys.
(The <spanx style="verb">exp</spanx> name is already used for this
purpose in the JWT specification.)
</t>
<t>
Applied changes made by the RFC Editor to RFC 6749's registry language
to this specification.
</t>
</list>
</t>
<t>
-05
<list style='symbols'>
<t>
Support both direct encryption using a
shared or agreed upon symmetric key, and the use of a
shared or agreed upon symmetric key to key wrap the CMK.
Specifically, added the <spanx style="verb">alg</spanx> values
<spanx style="verb">dir</spanx>,
<spanx style="verb">ECDH-ES+A128KW</spanx>, and
<spanx style="verb">ECDH-ES+A256KW</spanx>
to finish filling in this set of capabilities.
</t>
<t>
Updated open issues.
</t>
</list>
</t>
<t>
-04
<list style='symbols'>
<t>
Added text requiring that any leading zero bytes be retained in
base64url encoded key value representations for fixed-length values.
</t>
<t>
Added this language to Registration Templates:
"This name is case sensitive. Names that match other registered names
in a case insensitive manner SHOULD NOT be accepted."
</t>
<t>
Described additional open issues.
</t>
<t>
Applied editorial suggestions.
</t>
</list>
</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:39 |