One document matched: draft-ietf-jose-json-web-key-03.xml


<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?xml-stylesheet type='text/xsl' href='http://xml.resource.org/authoring/rfc2629.xslt' ?>

<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="4"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>

<rfc category="std" ipr="trust200902" docName="draft-ietf-jose-json-web-key-03">

  <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="6" month="July" year="2012" />

    <area>Security</area>
    <workgroup>JOSE Working Group</workgroup>

    <keyword>RFC</keyword>
    <keyword>Request for Comments</keyword>
    <keyword>I-D</keyword>
    <keyword>Internet-Draft</keyword>
    <keyword>JavaScript Object Notation</keyword>
    <keyword>JSON</keyword>
    <keyword>JSON Web Token</keyword>
    <keyword>JWT</keyword>
    <keyword>JSON Web Signature</keyword>
    <keyword>JWS</keyword>
    <keyword>JSON Web Encryption</keyword>
    <keyword>JWE</keyword>
    <keyword>JSON Web Key</keyword>
    <keyword>JWK</keyword>
    <keyword>JSON Web Algorithms</keyword>
    <keyword>JWA</keyword>

    <abstract>
      <t>
	A JSON Web Key (JWK) is a JavaScript Object Notation (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 for use with this
	specification are described in the separate
	JSON Web Algorithms (JWA) specification.
      </t>
    </abstract>

  </front>

  <middle>
    <section title="Introduction">
      <t>
	A JSON Web Key (JWK) is a
	JavaScript Object Notation (JSON) <xref target="RFC4627"/>
	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 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
	private keys, representing symmetric keys, 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'>
        <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">
      <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>
          <t hangText="Base64url Encoding">
	    For the purposes of this specification, this term always
	    refers to the URL- and filename-safe Base64 encoding
	    described in <xref target="RFC4648">RFC 4648</xref>,
	    Section 5, with the (non URL-safe) '=' padding characters
	    omitted, as permitted by Section 3.2.  (See Appendix C of
	    <xref target="JWS" /> for notes on implementing base64url
	    encoding without padding.)
	  </t>

	  <t hangText="Collision Resistant Namespace">
	    A namespace that allows names to be allocated in a manner
	    such that they are highly unlikely to collide with other names.
	    For instance, collision resistance can be achieved through
	    administrative delegation of portions of the namespace or
	    through use of collision-resistant name allocation functions.
	    Examples of Collision Resistant Namespaces include:
	    Domain Names,
	    Object Identifiers (OIDs) as defined in the ITU-T X.660
	    and X.670 Recommendation series, and
	    Universally Unique IDentifiers (UUIDs)
	    <xref target="RFC4122"/>.
	    When using an administratively delegated namespace,
	    the definer of a name needs to take
	    reasonable precautions to ensure they are in control of
	    the portion of the namespace they use to define the name.
	  </t>
        </list>
      </t>
    </section>

    <section title="Example JSON Web Key Set" anchor="ExampleJWKSet">

      <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.  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":
  [
    {"alg":"EC",
     "crv":"P-256",
     "x":"MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4",
     "y":"4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM",
     "use":"enc",
     "kid":"1"},
 
    {"alg":"RSA",
     "mod": "0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx
4cbbfAAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n3oknjhMs
tn64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65YGjQR0_FDW2
QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n91CbOpbI
SD08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINHaQ-G_xBniIqb
w0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw",
     "exp":"AQAB",
     "kid":"2011-04-29"}
  ]
}]]></artwork></figure>

    </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>
	A JWK also requires members that are specific to the particular
	kind of key to represent the key parameters.
	See Section 5 of the
	JSON Web Algorithms (JWA) <xref target="JWA"/> specification
	for definitions of the members specific to the kinds of keys
	defined there.
      </t>
      <t>
	The member names within a JWK MUST be unique;
	objects with duplicate member names MUST be rejected.
      </t>
      <t>
	Additional members MAY be present in the JWK.
	If present, they MUST be understood by implementations using them.
	Member names for representing specific kinds of keys
	SHOULD either be registered in the IANA JSON Web Key Parameters registry
	<xref target="JWKParamReg" /> or be
	URIs that contain a Collision Resistant Namespace.
      </t>

      <section title='"alg" (Algorithm Family) Parameter' anchor="algDef">
	<t>
	  The <spanx style="verb">alg</spanx> (algorithm family) member
	  identifies the cryptographic algorithm family used with the key.
	  The <spanx style="verb">alg</spanx> value is case sensitive.
	  Its value MUST be a string.
	</t>
	<t>
	  A list of defined
	  <spanx style="verb">alg</spanx> values is presented in
	  Section 5.1 of the
	  JSON Web Algorithms (JWA) <xref target="JWA" /> specification.
	  Additional members used with these <spanx style="verb">alg</spanx> values
	  are defined in Sections 5.2 and 5.3 of the
	  JSON Web Algorithms (JWA) <xref target="JWA" /> specification.
	  <spanx style="verb">alg</spanx> values SHOULD either be
	  registered in the IANA JSON Web Key Algorithm Families registry
	  <xref target="JWA" /> or be
	  a URI that contains a Collision Resistant Namespace.
	</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)</t>
	    <t><spanx style="verb">enc</spanx> (encryption)</t>
	  </list>
 	  Other values MAY be used.
	  The <spanx style="verb">use</spanx> value is case sensitive.
	  Its value MUST be a string.
	  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 the JWK
	  during key rollover.
	  The interpretation of the <spanx style="verb">kid</spanx> value is unspecified.
	  Key ID values within a JWK Set need not be unique; for instance,
	  in some contexts different keys using the same Key ID value might be present,
	  with the keys being disambiguated using other information, such as the
	  <spanx style="verb">alg</spanx> or <spanx style="verb">use</spanx> values.
	  The <spanx style="verb">kid</spanx> value is case sensitive.
	  Its value MUST be a string.
	  This member is OPTIONAL.
	</t>
	<t>
	  When used with JWS or JWE, the <spanx style="verb">kid</spanx>
	  value MAY be used to match a JWS or JWE <spanx style="verb">kid</spanx>
	  header parameter value.
	</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;
	objects with duplicate member names MUST be rejected.
      </t>
      <t>
	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 registered in the IANA JSON Web Key Set Parameters registry
	<xref target="JWKSetParamReg" /> or be
	a URI 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.
	  This member is REQUIRED.
	</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 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.
	  This specification registers the parameter names defined in
	  <xref target="JWKFormat"/>.
	</t>

        <section title='Registration Template'>
          <t>
            <list style='hanging'>
              <t hangText='Parameter Name:'>
                <vspace />
                The name requested (e.g., "example").
              </t>
              <t hangText='Change Controller:'>
                <vspace />
                For standards-track RFCs, state "IETF". For others, give the name of the
                responsible party. Other details (e.g., postal address, e-mail address, home page
                URI) may also be included.
              </t>
              <t hangText='Specification Document(s):'>
                <vspace />
                Reference to the document that specifies the parameter, preferably including a URI that
                can be used to retrieve a copy of the document. An indication of the relevant
                sections may also be included, but is not required.
              </t>
            </list>
          </t>
        </section>

        <section title='Initial Registry Contents'>
          <t>
            <list style='symbols'>
              <t>
                Parameter Name: <spanx style="verb">alg</spanx>
              </t>
              <t>
                Change Controller: IETF
              </t>
              <t>
                Specification Document(s): <xref target="algDef" /> of [[ this document ]]
              </t>
            </list>
            <list style='symbols'>
              <t>
                Parameter Name: <spanx style="verb">use</spanx>
              </t>
              <t>
                Change Controller: IETF
              </t>
              <t>
                Specification Document(s): <xref target="useDef" /> of [[ this document ]]
              </t>
            </list>
            <list style='symbols'>
              <t>
                Parameter Name: <spanx style="verb">kid</spanx>
              </t>
              <t>
                Change Controller: IETF
              </t>
              <t>
                Specification Document(s): <xref target="kidDef" /> of [[ this document ]]
              </t>
            </list>
	  </t>
	</section>

      </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'>
          <t>
            <list style='hanging'>
              <t hangText='Parameter Name:'>
                <vspace />
                The name requested (e.g., "example").
              </t>
              <t hangText='Change Controller:'>
                <vspace />
                For standards-track RFCs, state "IETF". For others, give the name of the
                responsible party. Other details (e.g., postal address, e-mail address, home page
                URI) may also be included.
              </t>
              <t hangText='Specification Document(s):'>
                <vspace />
                Reference to the document that specifies the parameter, preferably including a URI that
                can be used to retrieve a copy of the document. An indication of the relevant
                sections may also be included, but is not required.
              </t>
            </list>
          </t>
        </section>

        <section title='Initial Registry Contents'>
          <t>
            <list style='symbols'>
              <t>
                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>

      </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>
	A key is no more trustworthy than the method by which it was received.
      </t>
      <t>
	Per <xref target="kidDef"/>, applications should not assume
	that <spanx style="verb">kid</spanx> values are unique within
	a JWK Set.
      </t>
      <t>
	The security considerations in
	<xref target="W3C.CR-xmldsig-core2-20120124">XML DSIG 2.0</xref>,
	about public key representations also apply to this specification,
	other than those that are XML specific.
      </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>
	    (None at present)
	  </t>

	</list>
      </t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.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' ?>

      <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="6" month="July" year="2012" />
        </front>
        <format target="http://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms" type="HTML" />
      </reference>

    </references>

    <references title="Informative References">

      <?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" ?>

      <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="JWS">
        <front>
          <title>JSON Web Signature (JWS)</title>

	  <author fullname="Michael B. Jones" initials="M.B." surname="Jones">
	    <organization>Microsoft</organization>
	    <address>
	      <email>mbj@microsoft.com</email>
	      <uri>http://self-issued.info/</uri>
	    </address>
	  </author>

	  <author fullname="John Bradley" initials="J." surname="Bradley">
	    <organization abbrev="Ping Identity">Ping Identity</organization>
	    <address>
	      <email>ve7jtb@ve7jtb.com</email>
	    </address>
	  </author>

	  <author fullname="Nat Sakimura" initials="N." surname="Sakimura">
	    <organization abbrev="NRI">Nomura Research Institute</organization>
	    <address>
	      <email>n-sakimura@nri.co.jp</email>
	    </address>
	  </author>

	  <date day="6" month="July" year="2012" />
        </front>
        <format target="http://tools.ietf.org/html/draft-ietf-jose-json-web-signature" type="HTML" />
      </reference>

      <reference anchor="JWE">
        <front>
          <title>JSON Web Encryption (JWE)</title>

	  <author fullname="Michael B. Jones" initials="M.B." surname="Jones">
	    <organization>Microsoft</organization>
	    <address>
	      <email>mbj@microsoft.com</email>
	      <uri>http://self-issued.info/</uri>
	    </address>
	  </author>

	  <author fullname="Eric Rescorla" initials="E." surname="Rescorla">
	    <organization abbrev="RTFM">RTFM, Inc.</organization>
	    <address>
	      <email>ekr@rtfm.com</email>
	    </address>
	  </author>

	  <author fullname="Joe Hildebrand" initials="J." surname="Hildebrand">
	    <organization abbrev="Cisco">Cisco Systems, Inc.</organization>
	    <address>
	      <email>jhildebr@cisco.com</email>
	    </address>
	  </author>

	  <date day="6" month="July" year="2012" />
        </front>
        <format target="http://tools.ietf.org/html/draft-ietf-jose-json-web-encryption" type="HTML" />
      </reference>

    </references>

    <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>

    </section>

    <section title='Document History'>
      <t>
	[[ to be removed by the RFC editor before publication as an RFC ]]
      </t>

      <t>
        -03
        <list style='symbols'>
	  <t>
	    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-20262026-04-23 04:41:15