JSON Web Key (JWK)Microsoftmbj@microsoft.comhttp://self-issued.info/
Security
JOSE Working GroupRFCRequest for CommentsI-DInternet-DraftJavaScript Object NotationJSONJSON Web TokenJWTJSON Web SignatureJWSJSON Web EncryptionJWEJSON Web KeyJWK
A JSON Web Key (JWK) is a JSON data structure that represents
a public 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 used with this
specification are enumerated in the separate
JSON Web Algorithms (JWA) specification.
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 RFC 2119.
A JSON Web Key (JWK) is a JSON data structure that represents
a public key as a JSON object .
This specification also defines a JSON Web Key Set (JWK Set)
JSON data structure for representing a set of JWKs.
Cryptographic algorithms and identifiers used with this
specification are enumerated in the separate
JSON Web Algorithms (JWA) specification.
Non-goals for this specification include representing
private keys, representing symmetric keys, representing
certificate chains, representing certified keys, and replacing
X.509 certificates.
JWKs are used in the
JSON Web Signature (JWS) jwk (JSON Web Key)
header parameter and the
JSON Web Encryption (JWE) jwk (JSON Web Key) and
epk (Ephemeral Public Key)
header parameters.
The resources referenced by the
JWS
jku (JWK Set URL) and
JWE
jku (JWK Set URL)
header parameters contain JWK Sets.
A JSON data structure that represents a public key.
A JSON object that contains an array of JWKs as a member.
For the purposes of this specification, this term always
refers to the URL- and filename-safe Base64 encoding
described in RFC 4648,
Section 5, with the (non URL-safe) '=' padding characters
omitted, as permitted by Section 3.2. (See Appendix B of
for notes on implementing base64url
encoding without padding.)
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. 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.)
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.
JWKs also require members that are specific to the particular
key algorithm family to represent the key parameters.
These algorithm specific members are defined in Section 5 of the
JSON Web Algorithms (JWA) specification.
The member names within a JWK MUST be unique;
objects with duplicate member names MUST be rejected.
Additional members MAY be present in the JWK.
If present, they MUST be understood by implementations using them.
Parameters for representing keys for additional
algorithm families or additional key properties
SHOULD either be defined in the IANA JSON Web Key Parameters registry
or be
a URI that contains a collision resistant namespace.
The alg (algorithm family) member
identifies the cryptographic algorithm family used with the key.
A list of defined
alg values is presented in
Section 5.1 of the
JSON Web Algorithms (JWA) specification.
Specific additional members are
required to represent the key, depending upon the algorithm
family. These members are specified in Section 5 of the
JSON Web Algorithms (JWA) specification.
The alg value is case sensitive.
Its value MUST be a string.
alg values SHOULD either be
defined in the IANA JSON Web Key Algorithm Families registry
or be
a URI that contains a collision resistant namespace.
The use (key use) member identifies the
intended use of the key. Values defined by this
specification are sig (signature)
and enc (encryption). Other values
MAY be used.
The use value is case sensitive.
Its value MUST be a string.
This member is OPTIONAL.
The kid (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 the JWK
during key rollover.
When used with JWS or JWE, the kid
value MAY be used to match a JWS or JWE kid
header parameter value.
The interpretation of the kid value is unspecified.
Its value MUST be a string.
This member is OPTIONAL.
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
keys member.
The member names within a JWK Set MUST be unique;
objects with duplicate member names MUST be rejected.
Additional members MAY be present in the JWK Set.
If present, they MUST be understood by implementations using them.
Parameters for representing additional properties of JWK Sets
SHOULD either be defined in the IANA JSON Web Key Set Parameters registry
or be
a URI that contains a collision resistant namespace.
The value of the keys (JSON Web Key Set)
member is an array of JSON Web Key (JWK) values.
This member is REQUIRED.
This specification establishes the
IANA JSON Web Key Set Parameters registry
for reserved JWK Set parameter names.
Inclusion in the registry is RFC Required in the
RFC 5226 sense.
The registry records the reserved parameter name
and a reference to the RFC that defines it.
This specification registers the parameter names defined in
.
A key is no more trustworthy than the method by which it was received.
The security considerations in
XML DSIG 2.0,
about public key representations also apply to this specification,
other than those that are XML specific.
The following items remain to be done in this draft:
(None at present)
JSON Web Algorithms (JWA)Microsoftmbj@microsoft.comhttp://self-issued.info/Magic SignaturesJSON Web Signature (JWS)Microsoftmbj@microsoft.comhttp://self-issued.info/Ping Identityve7jtb@ve7jtb.comNomura Research Instituten-sakimura@nri.co.jpJSON Web Encryption (JWE)Microsoftmbj@microsoft.comhttp://self-issued.info/RTFM, Inc.ekr@rtfm.comCisco Systems, Inc.jhildebr@cisco.com
A JSON representation for RSA public keys was previously
introduced in Magic
Signatures.
-02
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 jwk
to keys.
Clarified that values with duplicate member names MUST be rejected.
Established JSON Web Key Set Parameters registry.
Explicitly listed non-goals in the introduction.
Moved algorithm-specific definitions from JWK to JWA.
Reformatted to give each member definition its own section heading.
-01
Corrected the Magic Signatures reference.
-00
Created the initial IETF draft based upon
draft-jones-json-web-key-03 with no normative changes.