One document matched: draft-jones-jose-json-private-key-00.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-jones-jose-json-private-key-00">

  <front>
    <title abbrev="JWS JSON Serialization (JWS-JS)">JSON Private Key</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="August" 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 Key</keyword>
    <keyword>JWK</keyword>
    <keyword>JSON Web Algorithms</keyword>
    <keyword>JWA</keyword>

    <abstract>
      <t>
	The JSON Private Key specification extends the
	JSON Web Key (JWK) and
	JSON Web Algorithms (JWA)
	specifications to define a
	JavaScript Object Notation (JSON)
	representation of private keys.
      </t>
    </abstract>

  </front>

  <middle>
    <section title="Introduction">
      <t>
	The JSON Private Key specification extends the
	JSON Web Key (JWK) <xref target="JWK"/> and
	JSON Web Algorithms (JWA) <xref target="JWA"/>
	specifications to define a
	JavaScript Object Notation (JSON) <xref target="RFC4627"/> 
	representation of private keys.
      </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>
	This specification uses the same terminology as the
	JSON Web Key (JWK) <xref target="JWK"/> and
	JSON Web Algorithms (JWA) <xref target="JWA"/>
	specifications.
      </t>
    </section>

    <section title="JWK Parameters for Private Keys">
      <t>
	This section defines additional JSON Web Key parameters
	that enable JWKs to represent private keys.
      </t>
      <section title="JWK Parameters for Elliptic Curve Private Keys" anchor="ECPrivate">
	<t>
	  When the JWK <spanx style="verb">alg</spanx>
	  member value is <spanx style="verb">EC</spanx>,
	  the following member MAY be used to represent
	  an Elliptic Curve private key:
	</t>

	<section title='"d" (ECC Private Key) Parameter' anchor="dDef">
	  <t>
	    The <spanx style="verb">d</spanx> (ECC private key) member contains
	    the Elliptic Curve private key value.
	    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 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 Private Keys" anchor="RSAPrivate">
	<t>
	  When the JWK <spanx style="verb">alg</spanx>
	  member value is <spanx style="verb">RSA</spanx>,
	  the following member MAY be used to represent
	  an RSA private key:
	</t>

	<section title='"pri" (Private Exponent) Parameter' anchor="priDef">
	  <t>
	    The <spanx style="verb">pri</spanx> (private exponent) member contains
	    the private exponent value for the RSA private 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>
    </section>

    <section title="Example Private Keys" anchor="Example">

      <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
	Section 3 of <xref target="JWK"/>,
	adding private key values.
	(Line breaks are for display purposes only.)
      </t>

      <figure><artwork><![CDATA[
  {"keys":
    [
      {"alg":"EC",
       "crv":"P-256",
       "x":"MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4",
       "y":"4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM",
       "d":"870MB6gfuTJ4HtUnUvYMyJpr5eUZNP4Bk43bVdj3eAE",
       "use":"enc",
       "kid":"1"},

      {"alg":"RSA",
       "mod":"0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx4
  cbbfAAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n3oknjhMst
  n64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65YGjQR0_FDW2Q
  vzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n91CbOpbIS
  D08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINHaQ-G_xBniIqbw
  0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw",
       "exp":"AQAB",
       "pri":"X4cTteJY_gn4FYPsXB8rdXix5vwsg1FLN5E3EaG6RJoVH-HLLKD9
  M7dx5oo7GURknchnrRweUkC7hT5fJLM0WbFAKNLWY2vv7B6NqXSzUvxT0_YSfqij
  wp3RTzlBaCxWp4doFk5N2o8Gy_nHNKroADIkJ46pRUohsXywbReAdYaMwFs9tv8d
  _cPVY3i07a3t8MN6TNwm0dSawm9v47UiCl3Sk5ZiG7xojPLu4sbg1U2jx4IBTNBz
  nbJSzFHK66jT8bgkuqsk0GjskDJk19Z4qwjwbsnn4j2WBii3RL-Us2lGVkY8fkFz
  me1z0HbIkfz0Y6mqnOYtqc0X4jfcKoAC8Q",
       "kid":"2011-04-29"}
    ]
  }
]]></artwork></figure>

    </section>

    <section title="IANA Considerations" anchor="IANA">
      
      <section title="JSON Web Key Parameters Registration">
	<t>
	  This specification registers the parameter names defined in
	  <xref target="ECPrivate"/> and <xref target="RSAPrivate"/> in the
	  IANA JSON Web Key Parameters registry <xref target="JWK"/>.
	</t>

        <section title='Registry Contents'>
          <t>
            <list style='symbols'>
              <t>
                Parameter Name: <spanx style="verb">d</spanx>
              </t>
              <t>
                Change Controller: IETF
              </t>
              <t>
                Specification Document(s): <xref target="dDef"/> of [[ this document ]]
              </t>
            </list>
            <list style='symbols'>
              <t>
                Parameter Name: <spanx style="verb">pri</spanx>
              </t>
              <t>
                Change Controller: IETF
              </t>
              <t>
                Specification Document(s): <xref target="priDef"/> of [[ this document ]]
              </t>
            </list>
	  </t>
	</section>
      </section>
    </section>

    <section title="Security Considerations" anchor="Security">
      <t>
	The security considerations for this specification are the
	same as those for the
	JSON Web Key (JWK) <xref target="JWK"/> specification and
	the portion of the JSON Web Algorithms (JWA) <xref target="JWA"/>
	specification that pertains to key representations.
      </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' ?>

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

    </references>

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

      <t>
	-00
	<list style='symbols'>
	  <t>
	    Created draft-jones-jose-json-private-key to facilitate discussion
	    of the question from the W3C WebCrypto WG to the IETF JOSE WG of whether
	    JOSE plans to support a format for representing private keys.
	  </t>
	</list>
      </t>
    </section>     

  </back>
</rfc>

PAFTECH AB 2003-20262026-04-23 20:47:13