One document matched: draft-jones-jose-jwe-json-serialization-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-jwe-json-serialization-00">

  <front>
    <title abbrev="JWE JSON Serialization (JWE-JS)">JSON Web Encryption JSON Serialization (JWE-JS)</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="9" 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>
	The JSON Web Encryption JSON Serialization (JWE-JS) is a means
	of representing encrypted content using
	JavaScript Object Notation (JSON) data structures.
	This specification describes a means of representing
	secured content as a JSON data object
	(as opposed to the JWE specification, which uses a
	compact serialization with a URL-safe representation).
	It enables the same content to be encrypted to multiple
	parties (unlike JWE).
	Cryptographic algorithms and identifiers used with this
	specification are described in the separate
	JSON Web Algorithms (JWA) specification.
	The JSON Serialization for related digital signature and HMAC
	functionality is described in the separate
	JSON Web Signature JSON Serialization (JWS-JS) specification.
      </t>
    </abstract>

  </front>

  <middle>
    <section title="Introduction">
      <t>
	The JSON Web Encryption JSON Serialization (JWE-JS) is a format for
	representing encrypted content as a
	JavaScript Object Notation (JSON) <xref target="RFC4627"/> object.
	It enables the same content to be encrypted to multiple parties
	(unlike JWE <xref target="JWE" />.)
	The encryption mechanisms are independent of the type of
	content being encrypted.
	Cryptographic algorithms and identifiers used with this
	specification are described in the separate
	JSON Web Algorithms (JWA) <xref target="JWA" /> specification.
	The JSON Serialization for related digital signature and HMAC
	functionality is described in the separate
	JSON Web Signature JSON Serialization (JWS-JS) <xref target="JWS-JS" />
	specification.
      </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 Encryption (JWE) <xref target="JWE" />
	specification.
      </t>
    </section>

    <section title="JSON Serialization">

      <t>
	The JSON Serialization represents encrypted content as a JSON
	object with members for each of four constituent parts: a
	<spanx style="verb">headers</spanx> member whose value is a
	non-empty array of Encoded JWE Header values, an <spanx
	style="verb">encrypted_keys</spanx> member whose value is a
	non-empty array of Encoded JWE Encrypted Key values, a <spanx
	style="verb">ciphertext</spanx> member whose value is an
	Encoded JWE Ciphertext value, and an <spanx
	style="verb">integrity_values</spanx> member whose value is a
	non-empty array of Encoded JWE Integrity Value values.  The
	number of elements in each of the arrays MUST be the same.
      </t>
      <t>
	Unlike the compact serialization used by JWEs, content using
	the JSON Serialization MAY be encrypted to more than one
	recipient.  Each recipient requires:

	<list style="symbols">
	  <t>
	    a JWE Header value specifying the cryptographic parameters
	    used to encrypt the JWE Encrypted Key to that recipient
	    and the parameters used to encrypt the plaintext to
	    produce the JWE Ciphertext; these values are represented
	    as Encoded JWE Header values that are elements of the
	    non-empty array contained in the <spanx
	    style="verb">headers</spanx> member.
	  </t>
	  <t>
	    a JWE Encrypted Key value; these values are represented as
	    Encoded JWE Encrypted Key values that are corresponding
	    elements of the non-empty array contained in the <spanx
	    style="verb">encrypted_keys</spanx> member.
	  </t>
	  <t>
	    a JWE Integrity Value that ensures the integrity of
	    the Ciphertext and the parameters used to create it; these
	    values are represented as Encoded JWE Integrity Value
	    values that are corresponding elements of the non-empty
	    array contained in the <spanx
	    style="verb">integrity_values</spanx> member.
	  </t>
	</list>

	Therefore, the syntax is:
      </t>
      <figure><artwork><![CDATA[
  {"headers":["<header 1 contents>",...,"<header N contents>"],
   "encrypted_keys":["<key 1 contents>",...,"<key N contents>"],
   "ciphertext":"<ciphertext contents>",
   "integrity_values":["<value 1 contents>",...,"<value N contents>"]
  }
]]></artwork></figure>

      <t>
	The contents of the Encoded JWE Header, Encoded JWE Encrypted
	Key, Encoded JWE Ciphertext, and Encoded JWE Integrity Value
	values are exactly as
	specified in JSON Web Encryption (JWE) <xref target="JWE" />.
	They are interpreted and validated in the same manner, with
	each corresponding <spanx style="verb">headers</spanx>,
	<spanx style="verb">encrypted_keys</spanx>, and <spanx
	style="verb">integrity_values</spanx> value being created
	or validated together.  The arrays MUST have the same number
	of elements.
      </t>
      <t>
	The i'th JWE Encrypted Key value and the
	i'th JWE Integrity Value are computed using the
	parameters of i'th JWE Header value in the same manner
	described in the JWE specification.  This has the desirable
	result that each Encoded JWE Encrypted Key value in the <spanx
	style="verb">encrypted_keys</spanx> array and
	each Encoded JWE Integrity Value in the <spanx
	style="verb">integrity_values</spanx> array
	are identical to the
	values that would have been computed for the same header and
	payload in a JWE, as is the JWE Ciphertext value.
      </t>
      <t>
	All recipients use the same JWE Ciphertext value, resulting in
	potentially significant space savings if the message is large.
	Therefore, all header parameters that specify the treatment of
	the JWE Ciphertext value MUST be the same for all recipients.
	In particular, this means that the <spanx
	style="verb">enc</spanx> (encryption method) header parameter
	value in the JWE Header for each recipient MUST be the same,
	as MUST be the <spanx style="verb">iv</spanx> (initialization
	vector) value (when required for the algorithm).
      </t>
    </section>

    <section title="Example JWE-JS" anchor="JSONSerializationExample">
      <t>
	This section contains an example using the JWE JSON
	Serialization.  This example demonstrates the capability for
	encrypting the same plaintext to multiple recipients.
      </t>

      <t>
	Two recipients are present in this example: the first using the
	RSAES-PKCS1-V1_5 algorithm to encrypt the Content Master Key (CMK)
	and the second using the AES Key Wrap algorithm to encrypt the CMK.
	The Plaintext is encrypted
	using the AES CBC algorithm to produce the JWE Ciphertext.
	The two Decoded JWE Header Segments used are:
      </t>

      <figure><artwork><![CDATA[
  {"alg":"RSA1_5",
   "x5t":"7noOPq-hJ1_hCnvWh6IeYI2w9Q0",
   "enc":"A128CBC",
   "iv":"__79_Pv6-fj39vX08_Lx8A",
   "int":"HS256"}
]]></artwork></figure>

      <t>
	and:
      </t>

      <figure><artwork><![CDATA[
  {"alg":"A128KW",
   "enc":"A128CBC",
   "iv":"__79_Pv6-fj39vX08_Lx8A",
   "int":"HS256"}
]]></artwork></figure>

      <t>
	The complete JSON Web Encryption JSON Serialization (JWE-JS)
	for these values is as follows
	(with line breaks for display purposes only):
      </t>

      <figure><artwork><![CDATA[
  {"headers":[
    "eyJhbGciOiJSU0ExXzUiLA0KICJlbmMiOiJBMjU2Q0JDIiwNCiAiaW50IjoiS
  FMyNTYiLA0KICJpdiI6Ik16LW1XXzRKSGZnIiwNCiAieDV0IjoiN25vT1BxLWhKM
  V9oQ252V2g2SWVZSTJ3OVEwIn0",
    "eyJhbGciOiJFQ0RILUVTIiwNCiAiZW5jIjoiQTI1NkNCQyIsDQogImVwayI6e
  w0KICAiYWxnIjoiRUMiLA0KICAiY3J2IjoiUC0yNTYiLA0KICAieCI6IjIzNVJUN
  2lLVEkzS1d2UzRfbUl3VWhYNk9DX1gySS1ic09wUzV3N01HQTQiLA0KICAieSI6I
  lpTdjBkdHZYczRvMlhzSVZoRnpnaU1UU2c5dVNzeXRhT3ZDLVhSdGZvSU0ifSwNC
  iAiamt1IjoiaHR0cHM6Ly9leGFtcGxlLmNvbS9wdWJsaWNfa2V5Lmp3ayJ9"],
   "encrypted_keys":[
    "TBD_encrypted_key_1_value_TBD",
    "TBD_encrypted_key_2_value_TBD"],
   "ciphertext":"TBD_ciphertext_value_TBD",
   "integrity_values":[
    "TBD_integrity_1_value_TBD",
    "TBD_integrity_2_value_TBD"]
  }
]]></artwork></figure>

	<t>
	  TBD: Finish this example.
	</t>

    </section>

    <section title="IANA Considerations" anchor="IANA">
      <t>
	This specification makes no requests of IANA.
      </t>
    </section>

    <section title="Security Considerations" anchor="Security">
      <t>
	The security considerations for this specification are the
	same as those for the JSON Web Encryption (JWE) <xref
	target="JWE" /> 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>
	    Complete the example.
	  </t>
	  <t>
	    Track changes that occur in the JWE spec.
	  </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' ?>

      <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>RTFM, Inc.</organization>
	    <address>
	      <email>ekr@rtfm.com</email>
	    </address>
	  </author>

	  <author fullname="Joe Hildebrand" initials="J." surname="Hildebrand">
	    <organization>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>

      <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/bibxml3/reference.I-D.draft-rescorla-jsms-00.xml" ?>

      <reference anchor="JWS-JS">
        <front>
          <title>JSON Web Signature JSON Serialization (JWS-JS)</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>independent</organization>
	    <address>
	      <email>ve7jtb@ve7jtb.com</email>
	    </address>
	  </author>

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

	  <date day="9" month="July" year="2012" />
        </front>
        <format target="http://tools.ietf.org/html/draft-jones-jose-jws-json-serialization" 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>Nomura Research Institute</organization>
	  </author>

          <date month="September" year="2010" />
        </front>
        <format target="http://jsonenc.info/enc/1.0/" type="HTML" />
      </reference>

    </references>

    <section title="Acknowledgements" anchor="Acknowledgements">

      <t>
	JSON serializations for encrypted content were previously explored by
	<xref target="JSE">JSON Simple Encryption</xref> and
	<xref target="I-D.rescorla-jsms">JavaScript Message Security
	Format</xref>.
      </t>

    </section>

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

      <t>
	-00
	<list style='symbols'>
	  <t>
	    Renamed draft-jones-json-web-encryption-json-serialization
	    to draft-jones-jose-jwe-json-serialization to have "jose"
	    be in the document name so it can be included in the
	    Related Documents list at http://datatracker.ietf.org/wg/jose/.
	    No normative changes.
	  </t>
	</list>
      </t>
       <t>
        draft-jones-json-web-encryption-json-serialization-02
        <list style='symbols'>
	  <t>
	    Updated examples to track updated algorithm properties in the JWA spec.
	  </t>
          <t>
           Tracked editorial changes made to the JWE spec.
	  </t>
        </list>
      </t>
      <t>
        draft-jones-json-web-encryption-json-serialization-01
        <list style='symbols'>
          <t>
	    Tracked changes between JOSE JWE draft -00 and -01, which
	    added an integrity check for non-AEAD algorithms.
	  </t>
        </list>
      </t>
      <t>
        draft-jones-json-web-encryption-json-serialization-00
        <list style='symbols'>
          <t>
            Created the initial version incorporating JOSE working
            group input and drawing from the JSON Serialization
            previously proposed in draft-jones-json-web-token-01.
	  </t>
        </list>
      </t>
    </section>     

  </back>
</rfc>

PAFTECH AB 2003-20262026-04-23 03:08:01