One document matched: draft-ietf-jose-json-web-key-13.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-key-13">
<front>
<title abbrev="JWK">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="15" month="July" year="2013" />
<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 Object Signing and Encryption</keyword>
<keyword>JOSE</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>
A JSON Web Key (JWK) is a JavaScript Object Notation (JSON)
data structure that represents a cryptographic key.
This specification also defines a JSON Web Key Set (JWK Set)
JSON data structure for representing a set of JWKs.
Cryptographic algorithms and identifiers for use with this
specification are described in the separate
JSON Web Algorithms (JWA) specification.
</t>
</abstract>
</front>
<middle>
<section title="Introduction" anchor="Introduction">
<t>
A JSON Web Key (JWK) is a
JavaScript Object Notation (JSON) <xref target="RFC4627"/>
data structure that represents a cryptographic key.
This specification also defines a JSON Web Key Set (JWK Set)
JSON data structure for representing a set of JWKs.
Cryptographic algorithms and identifiers for use with this
specification are described in the separate
JSON Web Algorithms (JWA) <xref target="JWA" /> specification.
</t>
<t>
Goals for this specification do not include representing
certificate chains, representing certified keys, and replacing
X.509 certificates.
</t>
<t>
JWKs and JWK Sets are used in the
JSON Web Signature (JWS) <xref target="JWS" />
and
JSON Web Encryption (JWE) <xref target="JWE" />
specifications.
</t>
<section title="Notational Conventions" anchor="NotationalConventions">
<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" anchor="Terminology">
<t>
<list style="hanging">
<t hangText="JSON Web Key (JWK)">
A JSON object that represents a cryptographic key.
</t>
<t hangText="JSON Web Key Set (JWK Set)">
A JSON object that contains an array of JWKs as
the value of its <spanx style="verb">keys</spanx> member.
</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="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>
<t hangText="Encrypted JWK">
A JWE with a JWK as its plaintext value.
</t>
<t hangText="Encrypted JWK Set">
A JWE with a JWK Set as its plaintext value.
</t>
</list>
</t>
</section>
<section title="JSON Web Key (JWK) Format" anchor="JWKFormat">
<t>
A JSON Web Key (JWK) is a JSON object containing specific
members, as specified below. Those members that are common
to all key types are defined below.
</t>
<t>
In addition to the common parameters, each JWK will have
members that are specific to the kind of key being represented.
These members represent the parameters of the key.
Section 5 of the JSON Web Algorithms (JWA) <xref target="JWA"/> specification
defines multiple kinds of cryptographic keys and their associated members.
</t>
<t>
The member names within a JWK MUST be unique;
recipients MUST either reject JWKs with duplicate member names
or use a JSON parser that returns only the lexically last duplicate member name,
as specified in Section 15.12 (The JSON Object) of
ECMAScript 5.1 <xref target="ECMAScript"/>.
</t>
<t>
Additional members MAY be present in the JWK.
If not understood by implementations encountering them, they MUST be ignored.
Member names used for representing key parameters
for different kinds of keys need not be distinct.
Any new member name
SHOULD either be registered in the IANA JSON Web Key Parameters registry
<xref target="JWKParamReg" /> or be
a value that contains a Collision Resistant Namespace.
</t>
<section title='"kty" (Key Type) Parameter' anchor="ktyDef">
<t>
The <spanx style="verb">kty</spanx> (key type) member
identifies the cryptographic algorithm family used with the key.
<spanx style="verb">kty</spanx> values SHOULD either be
registered in the IANA JSON Web Key Types registry
<xref target="JWA" /> or be
a value that contains a Collision Resistant Namespace.
The <spanx style="verb">kty</spanx> value is a case sensitive string.
Use of this member is REQUIRED.
</t>
<t>
A list of defined <spanx style="verb">kty</spanx> values can be found
in the IANA JSON Web Key Types registry <xref target="JWA"/>;
the initial contents of this registry are the values defined in
Section 5.1 of the
JSON Web Algorithms (JWA) <xref target="JWA" /> specification.
</t>
<t>
Additional members used with these <spanx style="verb">kty</spanx> values can be found
in the IANA JSON Web Key Parameters registry <xref target="JWKParamReg"/>;
the initial contents of this registry are the values defined in
Sections 5.2 and 5.3 of the
JSON Web Algorithms (JWA) <xref target="JWA" /> specification.
</t>
</section>
<section title='"use" (Key Use) Parameter' anchor="useDef">
<t>
The <spanx style="verb">use</spanx> (key use) member identifies the
intended use of the key. Values defined by this specification are:
<list style='symbols'>
<t><spanx style="verb">sig</spanx> (signature or MAC operation)</t>
<t><spanx style="verb">enc</spanx> (encryption)</t>
</list>
Other values MAY be used.
The <spanx style="verb">use</spanx> value is a case sensitive string.
Use of this member is OPTIONAL.
</t>
</section>
<section title='"alg" (Algorithm) Parameter' anchor="algDef">
<t>
The <spanx style="verb">alg</spanx> (algorithm) member identifies the
algorithm intended for use with the key.
The values used in this field are the same as those used in the
JWS <xref target="JWS" /> and JWE <xref target="JWE" />
<spanx style="verb">alg</spanx> and <spanx style="verb">enc</spanx> header parameters;
these values can be found in the
JSON Web Signature and Encryption Algorithms registry <xref target="JWA"/>.
Use of this member is OPTIONAL.
</t>
</section>
<section title='"kid" (Key ID) Parameter' anchor="kidDef">
<t>
The <spanx style="verb">kid</spanx> (key ID) member can
be used to match a specific key. This can be used, for
instance, to choose among a set of keys within a JWK Set
during key rollover.
The interpretation of the <spanx style="verb">kid</spanx> value is unspecified.
When <spanx style="verb">kid</spanx> values are used
within a JWK Set, different keys within the JWK Set SHOULD use distinct
<spanx style="verb">kid</spanx> values.
The <spanx style="verb">kid</spanx> value is a case sensitive string.
Use of this member is OPTIONAL.
</t>
<t>
When used with JWS or JWE, the <spanx style="verb">kid</spanx>
value can be used to match a JWS or JWE <spanx style="verb">kid</spanx>
header parameter value.
</t>
</section>
<section title='"x5u" (X.509 URL) Header Parameter' anchor="x5uDef">
<t>
The <spanx style="verb">x5u</spanx> (X.509 URL) member
is a URI <xref target="RFC3986"/> that refers to a resource for
an X.509 public key certificate or certificate chain <xref target="RFC5280"/>.
The identified resource MUST provide a representation of
the certificate or certificate chain that conforms to
<xref target="RFC5280">RFC 5280</xref> in PEM encoded form
<xref target="RFC1421"/>.
The key in the first certificate MUST match the bare public key
represented by other members of the JWK.
The protocol used to acquire the resource MUST provide
integrity protection; an HTTP GET request to retrieve the
certificate MUST use TLS <xref target="RFC2818"/> <xref target="RFC5246"/>;
the identity of the server MUST be validated, as per
Section 3.1 of HTTP Over TLS <xref target='RFC2818'/>.
Use of this member is OPTIONAL.
</t>
</section>
<section title='"x5t" (X.509 Certificate Thumbprint) Header Parameter'
anchor="x5tDef">
<t>
The <spanx style="verb">x5t</spanx> (X.509 Certificate Thumbprint)
member is a base64url encoded
SHA-1 thumbprint (a.k.a. digest) of the DER encoding of
an X.509 certificate <xref target="RFC5280"/>.
The key in the certificate MUST match the bare public key
represented by other members of the JWK.
Use of this member is OPTIONAL.
</t>
</section>
<section title='"x5c" (X.509 Certificate Chain) Parameter' anchor="x5cDef">
<t>
The <spanx style="verb">x5c</spanx> (X.509 Certificate Chain) member
contains a chain of one or more PKIX certificates <xref target="RFC5280"/>.
The certificate chain is represented as
a JSON array of certificate value strings.
Each string in the array is a base64 encoded
(<xref target="RFC4648"/> Section 4 -- not base64url encoded)
DER <xref target="ITU.X690.1994"/> PKIX certificate value.
The PKIX certificate containing the key value
MUST be the first certificate.
This MAY be followed by additional certificates, with each
subsequent certificate being the one used to certify the
previous one.
The key in the first certificate MUST match the bare public key
represented by other members of the JWK.
Use of this member is OPTIONAL.
</t>
</section>
</section>
<section title="JSON Web Key Set (JWK Set) Format" anchor="JWKSet">
<t>
A JSON Web Key Set (JWK Set) is a JSON object that contains
an array of JSON Web Key values as the value of its
<spanx style="verb">keys</spanx> member.
</t>
<t>
The member names within a JWK Set MUST be unique;
recipients MUST either reject JWK Sets with duplicate member names
or use a JSON parser that returns only the lexically last duplicate member name,
as specified in Section 15.12 (The JSON Object) of
ECMAScript 5.1 <xref target="ECMAScript"/>.
</t>
<t>
Additional members MAY be present in the JWK Set.
If not understood by implementations encountering them, they MUST be ignored.
Parameters for representing additional properties of JWK Sets
SHOULD either be registered in the IANA JSON Web Key Set Parameters registry
<xref target="JWKSetParamReg" /> or be
a value that contains a Collision Resistant Namespace.
</t>
<section title='"keys" (JSON Web Key Set) Parameter' anchor="keysDef">
<t>
The value of the <spanx style="verb">keys</spanx> (JSON Web Key Set)
member is an array of JSON Web Key (JWK) values.
Use of this member is REQUIRED.
</t>
</section>
</section>
<section title="String Comparison Rules" anchor="StringComparison">
<t>
Processing a JWK inevitably requires comparing known strings
to values in JSON objects. For example, in checking what the
key type is, the Unicode string encoding
<spanx style="verb">kty</spanx> will be
checked against the member names in the JWK
to see if there is a matching name.
</t>
<t>
Comparisons between JSON strings and other Unicode strings
MUST be performed by comparing Unicode code points without normalization
as specified in the String Comparison Rules in Section 5.3 of <xref target="JWS" />.
</t>
</section>
<section title="Encrypted JWK and Encrypted JWK Set Formats" anchor="EncryptedJWK">
<t>
JWKs containing non-public key material will need to be encrypted
in some contexts to prevent the disclosure of private or symmetric
key values to unintended parties.
The use of an Encrypted JWK, which is a JWE with a JWK
as its plaintext value, is RECOMMENED for this purpose.
The processing of Encrypted JWKs is identical to
the processing of other JWEs.
A <spanx style="verb">cty</spanx> (content type) header parameter
value of <spanx style="verb">JWK</spanx> can be used to indicate
that the content of the JWE is a JWK in contexts where this is useful.
</t>
<t>
JWK Sets containing non-public key material will similarly need to be encrypted.
The use of an Encrypted JWK Set, which is a JWE with a JWK Set
as its plaintext value, is RECOMMENED for this purpose.
The processing of Encrypted JWK Sets is identical to
the processing of other JWEs.
A <spanx style="verb">cty</spanx> (content type) header parameter
value of <spanx style="verb">JWK-SET</spanx> can be used to indicate
that the content of the JWE is a JWK Set in contexts where this is useful.
</t>
</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 Key Parameters Registry" anchor="JWKParamReg">
<t>
This specification establishes the
IANA JSON Web Key Parameters registry
for reserved JWK parameter names.
The registry records the reserved parameter name
and a reference to the specification that defines it.
It also records whether the parameter conveys public or private information.
This specification registers the parameter names defined in
<xref target="JWKFormat"/>.
The same JWK parameter name may be registered multiple times,
provided that duplicate parameter registrations are only for
algorithm-specific JWK parameters; in this case, the meaning
of the duplicate parameter name is disambiguated by the
<spanx style="verb">kty</spanx> value of the JWK containing it.
</t>
<section title="Registration Template" anchor="JWKTemplate">
<t>
<list style='hanging'>
<t hangText='Parameter 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='Parameter Information Class:'>
<vspace />
Registers whether the parameter conveys public or private information.
Its value must be one the words Public or Private.
</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" anchor="JWKContents">
<t> <?rfc subcompact="yes"?>
<list style='symbols'>
<t>
Parameter Name: <spanx style="verb">kty</spanx>
</t>
<t>
Parameter Information Class: Public
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="ktyDef" /> of [[ this document ]]
</t>
</list>
</t>
<t>
<list style='symbols'>
<t>
Parameter Name: <spanx style="verb">use</spanx>
</t>
<t>
Parameter Information Class: Public
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="useDef" /> of [[ this document ]]
</t>
</list>
</t>
<t>
<list style='symbols'>
<t>
Parameter Name: <spanx style="verb">alg</spanx>
</t>
<t>
Parameter Information Class: Public
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="algDef" /> of [[ this document ]]
</t>
</list>
</t>
<t>
<list style='symbols'>
<t>
Parameter Name: <spanx style="verb">kid</spanx>
</t>
<t>
Parameter Information Class: Public
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="kidDef" /> of [[ this document ]]
</t>
</list>
</t>
<t>
<list style='symbols'>
<t>
Parameter Name: <spanx style="verb">x5u</spanx>
</t>
<t>
Parameter Information Class: Public
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="x5uDef" /> of [[ this document ]]
</t>
</list>
</t>
<t>
<list style='symbols'>
<t>
Parameter Name: <spanx style="verb">x5t</spanx>
</t>
<t>
Parameter Information Class: Public
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="x5tDef" /> of [[ this document ]]
</t>
</list>
</t>
<t>
<list style='symbols'>
<t>
Parameter Name: <spanx style="verb">x5c</spanx>
</t>
<t>
Parameter Information Class: Public
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="x5cDef" /> of [[ this document ]]
</t>
</list>
</t>
</section>
<?rfc subcompact="no"?>
</section>
<section title="JSON Web Key Set Parameters Registry" anchor="JWKSetParamReg">
<t>
This specification establishes the
IANA JSON Web Key Set Parameters registry
for reserved JWK Set parameter names.
The registry records the reserved parameter name
and a reference to the specification that defines it.
This specification registers the parameter names defined in
<xref target="JWKSet" />.
</t>
<section title="Registration Template" anchor="SetTemplate">
<t>
<list style='hanging'>
<t hangText='Parameter 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='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" anchor="SetContents">
<t> <?rfc subcompact="yes"?>
<list style='symbols'>
<t>
Parameter Name: <spanx style="verb">keys</spanx>
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="keysDef" /> of [[ this document ]]
</t>
</list>
</t>
</section>
<?rfc subcompact="no"?>
</section>
<section title="JSON Web Signature and Encryption Type Values Registration" anchor="TypReg">
<section title="Registry Contents" anchor="TypContents">
<t>
This specification registers the <spanx style='verb'>JWK</spanx>
and <spanx style='verb'>JWK-SET</spanx>
type values in the
IANA JSON Web Signature and Encryption Type Values registry <xref target="JWS"/>,
which can be used to indicate, respectively, that the content is
a JWK or
a JWK Set.
</t>
<t> <?rfc subcompact="yes"?>
<list style='symbols'>
<t>
"typ" Header Parameter Value: <spanx style='verb'>JWK</spanx>
</t>
<t>
Abbreviation for MIME Type: application/jwk+json
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWKFormat"/> of [[ this document ]]
</t>
</list>
</t>
<t>
<list style='symbols'>
<t>
"typ" Header Parameter Value: <spanx style='verb'>JWK-SET</spanx>
</t>
<t>
Abbreviation for MIME Type: application/jwk-set+json
</t>
<t>
Change Controller: IETF
</t>
<t>
Specification Document(s): <xref target="JWKSet"/> of [[ this document ]]
</t>
</list>
</t>
</section>
<?rfc subcompact="no"?>
</section>
<section title="Media Type Registration" anchor="MediaReg">
<section title="Registry Contents" anchor="MediaContents">
<t>
This specification registers the
<spanx style="verb">application/jwk+json</spanx> and
<spanx style="verb">application/jwk-set+json</spanx>
Media Types <xref target="RFC2046"/>
in the MIME Media Type registry <xref target="RFC4288"/>,
which can be used to indicate, respectively, that the content is
a JWK or
a JWK Set.
</t>
<t> <?rfc subcompact="yes"?>
<list style="symbols">
<t>
Type Name: application
</t>
<t>
Subtype Name: jwk+json
</t>
<t>
Required Parameters: n/a
</t>
<t>
Optional Parameters: n/a
</t>
<t>
Encoding considerations:
application/jwk+json values are represented as JSON object;
UTF-8 encoding SHOULD be employed for the JSON object.
</t>
<t>
Security Considerations: See the Security Considerations section of [[ this document ]]
</t>
<t>
Interoperability Considerations: n/a
</t>
<t>
Published Specification: [[ this document ]]
</t>
<t>
Applications that use this media type:
TBD
</t>
<t>
Additional Information: Magic number(s): n/a,
File extension(s): n/a,
Macintosh file type code(s): n/a
</t>
<t>
Person & email address to contact for further information: Michael B. Jones, mbj@microsoft.com
</t>
<t>
Intended Usage: COMMON
</t>
<t>
Restrictions on Usage: none
</t>
<t>
Author: Michael B. Jones, mbj@microsoft.com
</t>
<t>
Change Controller: IETF
</t>
</list>
</t>
<t>
<list style="symbols">
<t>
Type Name: application
</t>
<t>
Subtype Name: jwk-set+json
</t>
<t>
Required Parameters: n/a
</t>
<t>
Optional Parameters: n/a
</t>
<t>
Encoding considerations:
application/jwk-set+json values are represented as a JSON Object;
UTF-8 encoding SHOULD be employed for the JSON object.
</t>
<t>
Security Considerations: See the Security Considerations section of [[ this document ]]
</t>
<t>
Interoperability Considerations: n/a
</t>
<t>
Published Specification: [[ this document ]]
</t>
<t>
Applications that use this media type:
TBD
</t>
<t>
Additional Information: Magic number(s): n/a,
File extension(s): n/a,
Macintosh file type code(s): n/a
</t>
<t>
Person & email address to contact for further information: Michael B. Jones, mbj@microsoft.com
</t>
<t>
Intended Usage: COMMON
</t>
<t>
Restrictions on Usage: none
</t>
<t>
Author: Michael B. Jones, mbj@microsoft.com
</t>
<t>
Change Controller: IETF
</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 and symmetric keys, 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 considerations are
listed here.
</t>
<t>
A key is no more trustworthy than the method by which it was received.
</t>
<t>
Private and symmetric keys must be protected from disclosure
to unintended parties. One recommended means of doing so is
to encrypt JWKs or JWK Sets containing them by using the JWK
or JWK Set value as the plaintext of a JWE.
</t>
<t>
The security considerations in
<xref target="RFC3447">RFC 3447</xref> and <xref target="RFC6030">RFC 6030</xref>
about protecting private and symmetric keys also apply to this specification.
</t>
<t>
The security considerations in
<xref target="W3C.CR-xmldsig-core2-20120124">XML DSIG 2.0</xref>,
about key representations also apply to this specification,
other than those that are XML specific.
</t>
<t>
The TLS Requirements in <xref target="JWS" />
also apply to this specification.
</t>
</section>
</middle>
<back>
<references title="Normative References">
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.1421.xml' ?>
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.2046.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.2818.xml' ?>
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml' ?>
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.4288.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.5226.xml' ?>
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.5246.xml' ?>
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.5280.xml' ?>
<?rfc include='http://xml.resource.org/public/rfc/bibxml2/reference.ITU.X690.1994.xml' ?>
<?rfc include="http://xml.resource.org/public/rfc/bibxml4/reference.W3C.CR-xmldsig-core2-20120124.xml" ?>
<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="15" month="July" year="2013" />
</front>
<seriesInfo value="draft-ietf-jose-json-web-signature" name="Internet-Draft"/>
<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="15" month="July" year="2013" />
</front>
<seriesInfo value="draft-ietf-jose-json-web-encryption" name="Internet-Draft"/>
<format target="http://tools.ietf.org/html/draft-ietf-jose-json-web-encryption" type="HTML" />
</reference>
<reference anchor="JWA">
<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="15" month="July" year="2013" />
</front>
<seriesInfo value="draft-ietf-jose-json-web-algorithms" name="Internet-Draft"/>
<format target="http://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms" type="HTML" />
</reference>
<reference anchor="ECMAScript">
<front>
<title>ECMAScript Language Specification, 5.1 Edition</title>
<author>
<organization>Ecma International</organization>
</author>
<date month="June" year="2011"/>
</front>
<seriesInfo name="ECMA" value="262"/>
<format target="http://www.ecma-international.org/ecma-262/5.1/" type="HTML" />
<format target="http://www.ecma-international.org/ecma-262/5.1/ECMA-262.pdf" type="PDF" />
</reference>
</references>
<references title="Informative References">
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.3447.xml' ?>
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.4122.xml' ?>
<?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.6030.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>
</references>
<section title="Example JSON Web Key Sets" anchor="ExampleJWKSet">
<section title="Example Public Keys" anchor="PublicExample">
<t>
The following example JWK Set contains two public keys
represented as JWKs: one
using an Elliptic Curve algorithm and a second one using an
RSA algorithm. The first specifies that the key is to be
used for encryption.
The second specifies that the key is to be used with the
<spanx style='verb'>RS256</spanx> algorithm.
Both provide a Key ID for key matching
purposes. In both cases, integers are represented using the
base64url encoding of their big endian representations.
(Long lines are broken are for display purposes only.)
</t>
<figure><artwork><![CDATA[
{"keys":
[
{"kty":"EC",
"crv":"P-256",
"x":"MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4",
"y":"4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM",
"use":"enc",
"kid":"1"},
{"kty":"RSA",
"n": "0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx
4cbbfAAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n3oknjhMs
tn64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65YGjQR0_FDW2
QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n91CbOpbI
SD08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINHaQ-G_xBniIqb
w0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw",
"e":"AQAB",
"alg":"RS256",
"kid":"2011-04-29"}
]
}
]]></artwork></figure>
</section>
<section title="Example Private Keys" anchor="PrivateExample">
<t>
The following example JWK Set contains two keys represented
as JWKs containing both public and private key values:
one using an Elliptic Curve algorithm and
a second one using an RSA algorithm.
This example extends the example in
the previous section,
adding private key values.
(Line breaks are for display purposes only.)
</t>
<figure><artwork><![CDATA[
{"keys":
[
{"kty":"EC",
"crv":"P-256",
"x":"MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4",
"y":"4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM",
"d":"870MB6gfuTJ4HtUnUvYMyJpr5eUZNP4Bk43bVdj3eAE",
"use":"enc",
"kid":"1"},
{"kty":"RSA",
"n":"0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx4
cbbfAAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n3oknjhMst
n64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65YGjQR0_FDW2Q
vzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n91CbOpbIS
D08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINHaQ-G_xBniIqbw
0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw",
"e":"AQAB",
"d":"X4cTteJY_gn4FYPsXB8rdXix5vwsg1FLN5E3EaG6RJoVH-HLLKD9
M7d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oDAaa-Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rx
yR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU",
"alg":"RS256",
"kid":"2011-04-29"}
]
}
]]></artwork></figure>
</section>
<section title="Example Symmetric Keys" anchor="SymmetricExample">
<t>
The following example JWK Set contains two symmetric keys represented
as JWKs:
one designated as being for use with the AES Key Wrap algorithm and
a second one that is an HMAC key.
(Line breaks are for display purposes only.)
</t>
<figure><artwork><![CDATA[
{"keys":
[
{"kty":"oct",
"alg":"A128KW",
"k":"GawgguFyGrWKav7AX4VKUg"},
{"kty":"oct",
"k":"AyM1SysPpbyDfgZld3umj1qzKObwVMkoqQ-EstJQLr_T-1qS0gZH75
aKtMN3Yj0iPS4hcgUuTwjAzZr1Z9CAow",
"kid":"HMAC key used in JWS A.1 example"}
]
}
]]></artwork></figure>
</section>
</section>
<section title='Example Use of "x5c" (X.509 Certificate Chain) Parameter' anchor="x5cExample">
<t>
<figure>
<preamble>The following is a non-normative example of a JWK
with a RSA signing key represented both as a bare public key
and as an X.509 certificate using the
<spanx style="verb">x5c</spanx> parameter:</preamble>
<artwork><![CDATA[
{"kty":"RSA",
"use":"sig",
"kid":"1b94c",
"n":"vrjOfz9Ccdgx5nQudyhdoR17V-IubWMeOZCwX_jj0hgAsz2J_pqYW08
PLbK_PdiVGKPrqzmDIsLI7sA25VEnHU1uCLNwBuUiCO11_-7dYbsr4iJmG0Q
u2j8DsVyT1azpJC_NG84Ty5KKthuCaPod7iI7w0LK9orSMhBEwwZDCxTWq4a
YWAchc8t-emd9qOvWtVMDC2BXksRngh6X5bUYLy6AyHKvj-nUy1wgzjYQDwH
MTplCoLtU-o-8SNnZ1tmRoGE9uJkBLdh5gFENabWnU5m1ZqZPdwS-qo-meMv
VfJb6jJVWRpl2SUtCnYG2C32qvbWbjZ_jBPD5eunqsIo1vQ",
"e":"AQAB",
"x5c":
["MIIDQjCCAiqgAwIBAgIGATz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c2cJEUyMTY5MPvACWpkA6SdS4xSvdXK3IVfOWA=="]
}
]]></artwork>
</figure>
</t>
</section>
<section title="Acknowledgements" anchor="Acknowledgements">
<t>
A JSON representation for RSA public keys was previously
introduced by John Panzer, Ben Laurie, and Dirk Balfanz
in <xref target="MagicSignatures">Magic Signatures</xref>.
</t>
<t>
This specification is the work of the JOSE Working Group,
which includes dozens of active and dedicated participants.
In particular, the following individuals contributed ideas,
feedback, and wording that influenced this specification:
</t>
<t>
Dirk Balfanz,
Richard Barnes,
John Bradley,
Brian Campbell,
Breno de Medeiros,
Joe Hildebrand,
Edmund Jay,
Ben Laurie,
James Manger,
Matt Miller,
Tony Nadalin,
Axel Nennker,
John Panzer,
Eric Rescorla,
Nat Sakimura,
Jim Schaad,
Paul Tarjan,
Hannes Tschofenig,
and Sean Turner.
</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="Document History" anchor="History">
<t>
[[ to be removed by the RFC editor before publication as an RFC ]]
</t>
<t>
-13
<list style='symbols'>
<t>
Applied spelling and grammar corrections.
</t>
</list>
</t>
<t>
-12
<list style='symbols'>
<t>
Stated that recipients MUST either reject JWKs and JWK Sets with
duplicate member names
or use a JSON parser that returns only
the lexically last duplicate member name.
</t>
</list>
</t>
<t>
-11
<list style='symbols'>
<t>
Stated that when <spanx style="verb">kid</spanx> values are used
within a JWK Set, different keys within the JWK Set SHOULD use distinct
<spanx style="verb">kid</spanx> values.
</t>
<t>
Added optional <spanx style="verb">x5u</spanx> (X.509 URL),
<spanx style="verb">x5t</spanx> (X.509 Certificate Thumbprint), and
<spanx style="verb">x5c</spanx> (X.509 Certificate Chain) JWK parameters.
</t>
<t>
Added section on Encrypted JWK and Encrypted JWK Set Formats.
</t>
<t>
Added a Parameter Information Class value to the
JSON Web Key Parameters registry, which registers whether
the parameter conveys public or private information.
</t>
<t>
Registered <spanx style="verb">application/jwk+json</spanx> and
<spanx style="verb">application/jwk-set+json</spanx> MIME types
and <spanx style="verb">JWK</spanx> and <spanx style="verb">JWK-SET</spanx>
typ header parameter values, addressing issue #21.
</t>
</list>
</t>
<t>
-10
<list style='symbols'>
<t>
No changes were made, other than to the version number and date.
</t>
</list>
</t>
<t>
-09
<list style='symbols'>
<t>
Expanded the scope of the JWK specification to include
private and symmetric key representations, as specified by
draft-jones-jose-json-private-and-symmetric-key-00.
</t>
<t>
Defined that members that are not understood must be ignored.
</t>
</list>
</t>
<t>
-08
<list style='symbols'>
<t>
Changed the name of the JWK key type parameter from
<spanx style="verb">alg</spanx> to <spanx style="verb">kty</spanx>
to enable use of <spanx style="verb">alg</spanx> to indicate
the particular algorithm that the key is intended to be used with.
</t>
<t>
Clarified statements of the form "This member is OPTIONAL"
to "Use of this member is OPTIONAL".
</t>
<t>
Referenced String Comparison Rules in JWS.
</t>
<t>
Added seriesInfo information to Internet Draft references.
</t>
</list>
</t>
<t>
-07
<list style='symbols'>
<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>
</list>
</t>
<t>
-06
<list style='symbols'>
<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>
Clarify that the <spanx style="verb">alg</spanx> (algorithm family)
member is REQUIRED.
</t>
<t>
Correct an instance of "JWK" that should have been "JWK Set".
</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>
Indented artwork elements to better distinguish them from the body text.
</t>
</list>
</t>
<t>
-04
<list style='symbols'>
<t>
Refer to the registries as the primary sources of defined
values and then secondarily reference the sections
defining the initial contents of the registries.
</t>
<t>
Normatively reference
<xref target="W3C.CR-xmldsig-core2-20120124">XML DSIG 2.0</xref>
for its security considerations.
</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>
Clarified that <spanx style="verb">kid</spanx> values need not be unique
within a JWK Set.
</t>
<t>
Moved JSON Web Key Parameters registry to the JWK specification.
</t>
<t>
Added "Collision Resistant Namespace" to the terminology section.
</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>
Numerous editorial improvements.
</t>
</list>
</t>
<t>
-02
<list style='symbols'>
<t>
Simplified JWK terminology to get replace the "JWK Key Object" and
"JWK Container Object" terms with simply "JSON Web Key (JWK)"
and "JSON Web Key Set (JWK Set)" and to eliminate potential
confusion between single keys and sets of keys.
As part of this change, the top-level member name for a
set of keys was changed from <spanx style="verb">jwk</spanx>
to <spanx style="verb">keys</spanx>.
</t>
<t>
Clarified that values with duplicate member names MUST be rejected.
</t>
<t>
Established JSON Web Key Set Parameters registry.
</t>
<t>
Explicitly listed non-goals in the introduction.
</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>
Corrected the Magic Signatures reference.
</t>
</list>
</t>
<t>
-00
<list style='symbols'>
<t>
Created the initial IETF draft based upon
draft-jones-json-web-key-03 with no normative changes.
</t>
</list>
</t>
</section>
</back>
</rfc>
| PAFTECH AB 2003-2026 | 2026-04-23 03:00:48 |