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

  <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="16" 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 MAC
	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 MAC
	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,
	the <spanx style="verb">int</spanx> (integrity algorithm) value,
	and the <spanx style="verb">kdf</spanx> (key derivation function) value,
	when present.
      </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 RSAES OAEP to encrypt the CMK.
	The Plaintext is encrypted using the AES CBC algorithm
	and the same block encryption parameters to produce
	the common JWE Ciphertext value.
	The two Decoded JWE Header Segments used are:
      </t>

      <figure><artwork><![CDATA[
  {"alg":"RSA1_5","enc":"A128CBC","int":"HS256","iv":"AxY8DCtDaGlsbGljb3RoZQ"}
]]></artwork></figure>

      <t>
	and:
      </t>

      <figure><artwork><![CDATA[
  {"alg":"RSA-OAEP","enc":"A128CBC","int":"HS256","iv":"AxY8DCtDaGlsbGljb3RoZQ"}
]]></artwork></figure>

      <t>
	The keys used for the first recipient are the same as those in
	Appendix A.2 of <xref target="JWE"/>, as is the plaintext used.
	The asymmetric encryption key used for the second recipient
	is the same as that used in Appendix A.1 of <xref target="JWE"/>;
	the block encryption keys and parameters for the second recipient
	are the same as those for the first recipient
	(which must be the case, since the ciphertext is shared).
      </t>

      <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":[
    "eyJhbGciOiJSU0ExXzUiLCJlbmMiOiJBMTI4Q0JDIiwiaW50IjoiSFMyNTYiLCJp
     diI6IkF4WThEQ3REYUdsc2JHbGpiM1JvWlEifQ",
    "eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhDQkMiLCJpbnQiOiJIUzI1NiIs
     Iml2IjoiQXhZOERDdERhR2xzYkdsamIzUm9aUSJ9"],
   "encrypted_keys":[
    "IPI_z172hSWHMFgED8EG9DM6hIXU_6NaO1DImCn0vNeuoBq847Sl6qw_GHSYHJUQ
     XtXJq7S_CxWVrI82wjrOyaQca5tLZRZc45BfKHeqByThKI261QevEK56SyAwwXfK
     KZjSvkQ5dwTFSgfy76rMSUvVynHYEhdCatBF9HWTAiXPx7hgZixG1FeP_QCmOylz
     2VClVyYFCbjKREOwBFf-puNYfO75S3LNlJUtTsGGQL2oTKpMsEiUTdefkje91VX9
     h8g7908lFsggbjV7NicJsufuXxnTj1fcWIrRDeNIOmakiPEODi0gTSz0ou-W-LWK
     -3T1zYlOIiIKBjsExQKZ-w",
    "gyhQHQYGyPZQP21Oxd6TdJjrmNkals3Jin2631_eaW-8tPEZxjeNA1lJD7gi2tAQ
     X9ERZkbD8-9-8Gq9HkpJIhINX4TkqmCynmT8kQfjiv5t8KuTI_OjhD-I0CfvWs3T
     7yf2W6_vQcs1ezsapKPGj92i6Z1xpWgtDuK5YwU3PLAEfNeAgBK0fM9x9DkIuhBN
     7O9LWRtP6FnYKaygc5-tzR_O9nTJ0u4ImsBPGaHHQEfvzMBtQgAPQCdkDiITxSdJ
     OdvBQVmg7uGKOybF42R-gzP63lxAqiYmp6DVPlPYydIEB2lCZxGUJIsmEM0qwXt1
     GEmj_aYGhCUrkPSidvE6Ag"],
   "ciphertext":"_Z_djlIoC4MDSCKireWS2beti4Q6iSG2UjFujQvdz-_PQdUcFNkO
    ulegD6BgjgdFLjeB4HHOO7UHvP8PEDu0a0sA2a_-CI0w2YQQ2QQe35M",
   "integrity_values":[
    "c41k4T4eAgCCt63m8ZNmiOinMciFFypOFpvid7i6D0k",
    "NX62w-GLPhXVJuQxXnbWrBKLkt9j14IULcMdJ9kzeF0"]
  }
]]></artwork></figure>

    </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>
	    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="16" 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>
	-01
	<list style='symbols'>
	  <t>
	    Added a complete JWE-JS example.
	  </t>
	  <t>
	    Generalized language to refer to Message Authentication Codes (MACs)
	    rather than Hash-based Message Authentication Codes (HMACs).
	  </t>
	</list>
      </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 14:25:49