<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">

<!-- $Id -->
<?rfc inline="yes"?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes" ?>
<?rfc compact="yes" ?>
<?rfc sortrefs="no" ?>
<?rfc colonspace='yes' ?>
<rfc category="std" docName="draft-manger-jose-jwsec-00.txt"
     ipr="pre5378Trust200902">
  <front>
    <title abbrev="JWsec">JSON Web Security Message Format</title>

    <author fullname="James Manger" initials="J.H.M." surname="Manger">
      <organization>Telstra</organization>

      <address>
        <email>james@manger.com.au</email>
      </address>
    </author>

    <date day="11" month="June" year="2012" />

    <abstract>
	<t>This document describes a cryptographic message format
	based on JavaScript Object Notation (JSON) and base-64 encodings
	to be easy for web applications to generate and process.
	Signed, encrypted, signed-then-encrypted, and unprotected
	messages are supported using symmetric and/or asymmetric keys.</t>

	<t>Please discuss this document on the jose@ietf.org mailing list.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
	<t><list style="empty"><t>[[ This document presents the author's ideas for improving
	the JWS/JWE/JWT drafts -- formulated as a complete spec.
	This document copies lots of text from draft-rescorla-jsms-00,
	draft-ietf-jose-json-web-signature-01, draft-ietf-jose-json-web-encryption,
	and (parts of) draft-ietf-oauth-json-web-token-00. ]]</t></list></t>

	<t>Many applications require the ability to send
	cryptographically secured messages (encrypted, digitally
	signed, etc.). While the IETF has defined a number of formats for
	such messages -- such as Cryptographic Message Syntax (CMS)
	<xref target="RFC5652"/> -- those formats are widely viewed as being
	excessively complicated for the demands of many web applications,
	which typically only need the ability to secure simple
	messages. In addition, existing formats use encoding mechanisms
	that are not congenial for web applications, such as
	Abstract Syntax Notation (ASN.1) Distinguished Encoding
	Rules (DER). This presents an obstacle to the deployment of
	strong security by such applications.</t>

	<t>This document describes a new cryptographic message format,
	nicknamed JWsec, intended to meet the needs of the web environment.
	JWsec uses JavaScript Object Notation (JSON) <xref target="RFC4627"/>
	 and base64url encodings (without padding) <xref target="RFC4648"/> section 5.
	JWsec is loosly modelled on some of the basic functionality of CMS,
	but omits many CMS modes in the interests of simplicity.</t>

	<t>A JWsec message can protect any array of bytes,
	though it is more suited to protecting kilobytes than
	gigabytes. A JWsec message can provide data origin authenticity
	and/or confidentiality for the data. It can compress the data.
	A JWsec message can also carry the data with no cryptographic
	protection, which enables protocols
	to specify JWsec for fields that do not require security in all
	circumstances.</t>

	<t>After providing some example JWsec messages, this document
	describes the processing model, the message syntax, and then three modes
	of protection: unprotected; signed; and encrypted.
	The JSON elements that can appear in a JWsec message
	header are summarized in section 7.</t>

	<t>An initial set of algorithms that a JWsec message can use
	for signing, encrypting, and compressing are specified separately
	in JSON Web Security Message Algorithms <xref target="ALGS"/>. That document
	also establishes a registry for listing further algorithms.</t>


      <section title="Conventions Used In This Document">
	<t>The key words "MUST", "MUST NOT",
	"SHOULD", "SHOULD NOT", "MAY", and "OPTIONAL" in this
	document are to be interpreted as described in <xref target="RFC2119"/>.</t>

	<t>Requirements are specified for originators who create JWsec messages
	and recipients who receive them. Requirements stated for messages
	apply to originators who create them.</t>

	<t>Long base64url encodings are wrapped over multiple lines
	only for display purposes. The real values do not include
	line breaks.</t>
      </section>


      <section title="Examples">
	<t>This simple JWsec message consists of 3 dot-separated components:</t>
	<figure><artwork>
U.e30.SGVsbG8sIFdvcmxkIQ
	</artwork></figure>
	<t>The initial letter "U" indicated that this is an unprotected
	JWsec message. The other components are base64url encodings
	(without padding). The second component decodes to a JSON
	object (the header), in this case an empty JSON object {} indicating
	that no processing (eg no compression) of the data has occured.
	The last component decodes to the actual data: 13 bytes,
	which is the UTF-8-encoded 13-character string "Hello, World!".</t>

	<t>The next example is a signed JWsec message since it starts
	with "S".</t>
	<figure><artwork>
S.eyAic2lnIjoiSFMyNTYiLCAia2lkIjoiRmViMTJrMSIgfQ.
 SGVsbG8sIFdvcmxkIQ.
 MDEyMzQ-FIX-OWFiY2RlZj_xMjM0NTY-ODlhYmNkZWY
	</artwork></figure>
	<t>The header (the JSON object decoded from the second
	dot-separated component) is:</t>
	<figure><artwork>{ "sig":"HS256", "kid":"Feb12k1" }</artwork></figure>
	<t>The next component decodes to the data "Hello, World!".
	The final component decodes to a 256-bit MAC (message authentication code)
	calculated over the preceeding portion of the JWsec message.
	In this instance the MAC uses the HS256 algorithm (HMAC with SHA-256)
	with the secret key identified by the label "Feb12k1", and
	covers the 71 initial characters of the message (UTF-8 encoded into 71 bytes).</t>
	<figure><artwork>
 MDEyMzQ-FI...ZWY = B64(HMAC(S.eyAi...IgfQ.SGVsbG8sIFdvcmxkIQ))
	</artwork></figure>

	<t>The following example is a signed-then-encrypted JWsec message.</t>
	<figure><artwork>
e.ew0KICJhbGc-FIX-U0ExXzUiLA0KICJraWQiOiJodHRwOi8vZX
 hhbXBsZS5vcm-FIX-ibGljLmp3ayNrMiIsDQogImVuYyI6IkEyN
 TZHQ00iLA0KI-FIX-AiOiJERUYiLA0KICJlbnYiOnRydWUNCn0.
 [2048-bit RSA BT2 value].
 [96-bit IV][ciphertext][128-bit tag]
	</artwork></figure>
	<t>The decoded header is:</t>
	<figure><artwork>
{
 "kmg":"RSA1_5",
 "kid":"http://example.org/public.jwk#k2",
 "enc":"A256GCM",
 "zip":"DEF",
}
	</artwork></figure>
	<t>The third component is a random 256-bit AES key encrypted
	with a 2048-bit RSA public key, as per the RSA1_5 key transport algorithm.
	The fourth component is the concatenation
	of a 96-bit IV, the ciphertext, and a 128-bit authentication tag.
	The ciphertext and tag are calculated
	using AES in Galois/Counter mode.</t>

	<t>After verifying the tag, decrypting the ciphertext, and
	decompressing with the DEFLATE algorithm, the result is
	S.eyJzaWciOiJSUzI1... This data is processed as another
	(inner) JWsec messages.</t>

	<t>The initial lowercase "e" on the outer JWsec messages indicates
	the encryption wraps another JWsec message. The initial
	"S" on the inner JWsec message indicates signed data.
	Together they show that this is a signed-then-encrypted message.</t>

	<t>Appendix A has a complete example.</t>
      </section>
    </section>


    <section title="Model">
	<t>The starting point for creating a JWsec message is the input data,
	which is a byte array. One or more modes of protection are applied in turn,
	using algorithms and keys chosen by the message originator.
	Three modes of protection are specified in this document:
	unprotected; signed; and encrypted.
	The resultant JWsec message is a string, using a limited alphabet of
	65 characters. To apply multiple modes of protection, the output
	JWsec message from one mode is UTF-8 encoded to give the input data
	for the next mode.</t>

	<figure><artwork><![CDATA[
                  -->[unprotected]---   
 input data       |                 |      JWsec message
-------------+->--+->[  signed   ]--+->--+--------------->
[byte array] ^    |                 |    |   [string]
             |    -->[ encrypted ]---    |
             |                           |
             --------[UTF-8 encode]<------
	]]></artwork></figure>
    </section>


    <section title="Syntax">
	<t>A JWsec message is a string consisting of dot-separated
	components. Each component only uses a limited set of 64 characters:
	A-Z, a-z, 0-9, "-" (hypen-minus), and "_" (low line). This set
	is sufficient to hold a base64url encoding (without padding),
	as defined in RFC4648 section 5 "Base 64 Encoding with URL and
	Filename Safe Alphabet" <xref target="RFC4648"/>.
	The limited range of characters used in a JWsec
	message make it suitable to be carried in fields of many web protocols without
	requiring escaping (eg in an HTTP header, URI query string,
	HTML form POST, XML document, JSON string value etc).</t>

	<t>A JWsec message MUST match the &lt;jwsec&gt; production,
	defined using Augmented Backus-Naur Form (ABNF) <xref target="RFC5234"/>:</t>

	<figure><artwork>
jwsec = ("U" "." header64 "." compressed64) /
        ("S" "." header64 "." compressed64 "." signature64) /
        ("E" "." header64 "." enckey64 "." ciphertext64) /
        (ext "." header64 *("." component64))
          ; note: "X" matches "X" or "x" in ABNF

ext = %x41-5A / %x61-7A ; A-Z a-z

header64 = 1*b64url ; base64url-encoded UTF-8-encoded JSON object

; base64url-encoded byte arrays
compressed64 = *b64url ; input data, optionally compressed
signature64  = *b64url ; digital signature or MAC
enckey64     = *b64url ; encrypted per-message key
ciphertext64 = *b64url ; IV, encrypted data, and authentication tag
component64  = *b64url

b64url = %x41-5A / %x61-7A / %x30-39 / %x2D / %x5F
        ;   A-Z       a-z       0-9      -      _
	</artwork></figure>

	<t>The first dot-separated component in a JWsec message
	is a single letter indicating the nature of the protection provided
	to the data. It determines the semantics of the components
	after the header. Three modes are defined in this specification:
	"U" or "u" for unprotected data; "S" or "s" for signed data;
	and "E" or "e" for encrypted data. A lowercase letter for the
	mode indicates that the input data for the JWsec
	message is another a JWsec message (UTF-8 encoded).</t>

	<t>Additional modes can be defined in RFCs that update this specification.</t>

	<t>Each JWsec message incorporates a header that is a JSON object with
	0, 1, or more elements <xref target="RFC4627"/>. The header64 field is the base64url
	encoding (without padding) of the UTF-8 encoding of the header
	JSON object. Header elements identify the algorithms and keys required
	to process the message.</t>

	<t>Various header elements are defined in this document.
	Further header elements holding algorithm-specific parameters are
	likely to be defined as algorithms are specified for use with JWsec.
	Other header elements could be defined to hold status information
	about keys or certificates, for instance.
	A recipient MUST ignore any header elements it does not recognize so new header
	elements can be deployed while maintaining interoperability.</t>

	<t>Subsequent sections for each mode define output components that are bytes arrays.
	Those byte arrays are base64url encoded (without padding) then joined to the mode and
	header (all separated by dots) to form a JWsec message.
	A component's value can be a zero-length byte array, in which case the corresponding
	part of the JWsec message is an empty string but the dot-separators are still present.</t>
    </section>


    <section title="Unprotected message (mode U)">
	<t>An unprotected JWsec message offers no security for the input data it carries.
	It can compress the data. An unprotected message can be useful when
	security is provided by a lower layer. Using an unprotected JWsec message
	as the input data for an encrypted JWsec message provides a place 
	(the unprotected JWsec message's header) to include any
	header elements associated with the input data that are confidential.</t>

	<t>Output components (other than the mode and header) are:</t>

	<t><list style="hanging">
	<t hangText="compressed">[byte array]</t>
	</list></t>

	<t>The compressed data is the input data after applying the compression
	algorithm specified by the "zip" header element.
	If there is no "zip" element the compressed data equals the input data.
	A recipient MUST understand the "zip" header element.</t>

	<t>There are no mandatory header elements so an empty
	JSON object {} is a valid header.</t>
    </section>


    <section title="Signed message (mode S)">
	<t>A signed JWsec message provides data-origin authentication for the input
	data. Signing can use the private key
	of a public/private key pair to create a digital signature;
	or it can use a secret symmetric key to create a message authentication
	code (MAC). The data can, optionally, be compressed.</t>

	<t>Output components (other than the mode and header) are:</t>

	<t><list style="hanging">
	<t hangText="compressed">[byte array]</t>
	<t hangText="signature">[byte array]</t>
	</list></t>

	<t>The compressed data is the input data after applying the compression
	algorithm specified by the "zip" element in the header.
	If there is no "zip" element the compressed data equals the input data.
	A recipient MUST understand the "zip" header element.</t>

	<t>The header MUST include a "sig" element identifying either
	an asymmetric signature algorithm or a MAC algorithm
	[see <xref target="ALGS"/> sections 4 and 5].
	The signature or MAC covers the mode, header, and compressed data.
	It is calculated over the (UTF-8 encoded) prefix
	of the JWsec message upto (but excluding) the dot-separator before
	the signature64 component.</t>

	<figure><artwork>
signature  = SIGN(("S" or "s") "." B64(header) "." B64(compressed))
	</artwork></figure>

	<t>When using a MAC algorithm the header MUST include a "kid"
	element to identify the secret key.</t>

	<t>When using an asymmetric signature algorithm the public
	verification key needs to be available to the recipient.
	The header MUST include an "okid" element to identify the public key.
	The header SHOULD include a "jku" or "x5u" element holding
	a URI for the raw or certified public key respectively.</t>
    </section>


    <section title="Encrypted message (mode E)">
	<t>An encrypted JWsec message provides confidentiality for the input data.
	The input data is, optionally, compressed. The message is also integrity protected.
	This is achieved by using an authenticated encryption algorithm that
	supports additional data (AEAD algorithm), keyed with
	a randomly-chosen per-message secret key. Three techniques are
	available to distribute the per-message key:</t>

	<t><list style="symbols">
	<t>Key transport: the per-message key is encrypted with the
	recipient's public key</t>

	<t>Key agreement: a pairwise symmetric key is generated from
	the originator's and recipient's public/private key pairs,
	and then used to encrypt the per-message key</t>

	<t>Symmetric key wrapping: the per-message key is encrypted
	using a shared symmetric secret key</t>
	</list></t>

	<t>An intermediate component to aid describing the process is:</t>
	<t><list style="hanging">
	<t hangText="plaintext">[byte array]</t>
	</list></t>

	<t>Output components (other than the mode and header) are:</t>

	<t><list style="hanging">
	<t hangText="enckey">[byte array]</t>
	<t hangText="ciphertext">[byte array]</t>
	</list></t>

	<t>The plaintext is the input data after applying the compression
	algorithm specified by the "zip" element in the header.
	If there is no "zip" element the plaintext equals the input data.
	A recipient MUST understand the "zip" header element.</t>

	<t>The header MUST include an "enc" element identifying
	an AEAD algorithm [see <xref target="ALGS"/> section 9].
	A random per-message key is chosen, using the key size required
	by the AEAD algorithm.
	See <xref target="RFC4086"/> for considerations on generating
	random values. The data to be encrypted by the AEAD algorithm is
	the plaintext. The additional data to be authenticated by the
	AEAD algorithm is the (UTF-8 encoded) prefix of the JWsec message
	up to (but excluding) the dot-separator before the ciphertext64
	component.</t>

	<t>If the AEAD algorithm involves an initialization
	vector (IV) it is prepended to the ciphertext. The authentication tag
	generated by the AEAD algorithm is appended to the ciphertext.
	The lengths of the IV and authentication tag are defined by
	the AEAD algorithm.</t>

	<figure><artwork>
additionalData  = ("E" or "e") "." B64(header) "." B64(enckey)

ciphertext  = [iv] ENCRYPT(plaintext) authtag
	</artwork></figure>

	<t>The header MUST include a "kmg" element identifying
	a key transport, key agreement, or
	symmetric key wrapping algorithm
	[see <xref target="ALGS"/> sections 6, 7, and 8]. The encrypted per-message
	key is held in the enckey component.</t>


      <section title="Key transport">
	<t>When the "kmg" header element identifies a key transport algorithm,
	that algorithm is used to encrypted the per-message key with the
	recipient's public key.</t>

	<t>The header MUST include a "kid" element to identify the
	recipient's asymmetric key pair.</t>
      </section>


      <section title="Key agreement">
	<t>When the "kmg" header element identifies a key agreement algorithm,
	the originator and recipient each use their own private key and the
	other party's public key to generate a pairwise symmetric key.
	That symmetric key is used to encrypted the per-message key using a symmetric
	key wrapping algorithm.</t>

	<t>Note: the specification of a key agreement algorithm has to
	specify a symmetric key wrapping algorithm as well.</t>

	<t>The header MUST include a "kid" element to identify the
	recipient's asymmetric key pair.</t>

	<t>The originator's public key also needs to be identified.
	The header MUST include either an "epk" element or an "okid" element.
	The former hold the originator's actual public key. The latter
	is an identifier for the public key, and SHOULD be accompanied by
	either a "jku" or "x5u" element, conveying a URI for the raw or
	certified public key respectively.</t>
      </section>

      <section title="Symmetric key wrapping">
	<t>When the "kmg" header element identifies a symmetric key wrapping algorithm,
	that algorithm is used to encrypted the per-message key with a secret key shared
	by the originator and recipient.</t>

	<t>The header MUST include a "kid" element to identify the
	shared secret key.</t>
      </section>
    </section>

    <section title="Header elements">
	<t>The following header elements are defined in this document:</t>
	<texttable>
	<ttcol>Name</ttcol><ttcol>Description</ttcol>
	<c>zip</c>
		<c>String identifier for a compression algorithm.
		See <xref target="ALGS"/> section 3.</c>
	<c>sig</c>
		<c>String identifier for an asymmetric digital signature
		algorithm, or for a symmetric message authentication code (MAC)
		algorithm. See <xref target="ALGS"/> sections 4 and 5.</c>
	<c>kmg</c>
		<c>String identifier for a key transport algorithm, a key
		exchange algorithm, or a symmetric key wrapping algorithm.
		See <xref target="ALGS"/> sections 6, 7, or 8 respectively.</c>
	<c>enc</c>
		<c>String identifier for an authenticated encryption with
		additional data (AEAD) algorithm.
		See <xref target="ALGS"/> section 9.</c>
	<c>kid</c>
		<c>String identifier for the recipient's key that is needed to
		process the message. The identified key can be either: a
		symmetric secret key shared by the message originator and
		recipient; or an asymmetric key pair for which the recipient
		has the private key while the originator used the public key.</c>
	<c>okid</c>
		<c>String identifier for the originator's asymmetric key pair,
		the public key of which is needed by the recipient to process the message.</c>
	<c>jku</c>
		<c>String holding a Uniform Resource Identifier (URI) for one or more
		public keys in JSON Web Key format
		<xref target="draft-ietf-jose-json-web-key"/>.
		It MUST be an HTTPS URI.</c>
	<c>x5u</c>
		<c>String holding a Uniform Resource Identifier (URI) for an
		X.509 certificate chain.</c>
	</texttable>

	<t>Additional header elements can be defined in other documents.
	A header element name can be a URI or a short name. A short name
	MUST NOT contain a colon ":" (which a URI will contain), but can
	otherwise be any Unicode string. A header element name that is a
	short name MUST be registered in the JWsec header element registry.
	A header element name that is a URI MAY be registered.</t>
    </section>


    <section title="IANA considerations">


      <section title="JWsec Header Element Registry">
	<t>This document establishes a registry that IANA will maintain
	for elements that can appear in the header of a JWsec message.
	The registry's name is "JWsec Header Element Registry".
	The registry lists element names and the specification
	where they are defined.</t>

	<t>The policy for registring a name that is a URI is
	First Come First Served (as per <xref target="RFC5226"/> section 4.1).
	The policy for registring a name that is not a URI
	(and MUST NOT contain a colon) is Specification Required.</t>

	<t>The initial contents of the registry are:</t>
	<texttable>
	<ttcol>Name</ttcol><ttcol>Reference</ttcol>
	<c>zip</c><c>[this document]</c>
	<c>sig</c><c>[this document]</c>
	<c>kmg</c><c>[this document]</c>
	<c>enc</c><c>[this document]</c>
	<c>kid</c><c>[this document]</c>
	<c>okid</c><c>[this document]</c>
	<c>jku</c><c>[this document]</c>
	<c>x5u</c><c>[this document]</c>
	</texttable>
      </section>


      <section title="Media type">
	<t>The "application/jwsec" media type is registered with IANA to
	identify a JWsec message.</t>

	<t><list style="hanging">
	<t hangText="Type name:">application</t>
	<t hangText="Subtype name:">jwsec</t>
	<t hangText="Required parameters:">none</t>
	<t hangText="Optional parameters:">none</t>
	<t hangText="Encoding considerations:">7bit</t>
	<t hangText="Security considerations:">Some JWsec messages provide
	data origin authenticity and confidentiality, but others
	provide no security. A recipient of a message with this media type
	needs to ensure that the security provided by the actual message received
	meets the receiver's expectations for the message.</t>
	<t hangText="Interoperability considerations:">no known issues</t>
	<t hangText="Published specification">[this document]</t>
	<t hangText="Applications that use this media type:">expected to be used
	by a range of web applications</t>
	<t hangText="Additional information:">none</t>
	<t hangText="Contact:">IETF</t>
	<t hangText="Intended usage:">COMMON</t>
	<t hangText="Restrictions on usage:">none</t>
	<t hangText="Author:">IETF</t>
	<t hangText="Change controller:">IETF</t>
	</list></t>
      </section>

    </section>

    <section title="Security considerations">
	<t>JWsec messages have different security properties depending
	on the modes of protection applied, the order they are applied,
	and whether symmetric or asymmetric keys are used. A JWsec message
	can have no security. Consequently, a recipient
	needs to explicitly confirm that the protection applied
	to each received message matchs the expected protection.</t>

	<t>...</t>
    </section>


  </middle>

  <back>
    <references title="Normative References">


<reference anchor='RFC2119'>

<front>
<title abbrev='RFC Key Words'>Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials='S.' surname='Bradner' fullname='Scott Bradner'>
<organization>Harvard University</organization>
<address>
<postal>
<street>1350 Mass. Ave.</street>
<street>Cambridge</street>
<street>MA 02138</street></postal>
<phone>- +1 617 495 3864</phone>
<email>sob@harvard.edu</email></address></author>
<date year='1997' month='March' />
<area>General</area>
<keyword>keyword</keyword>
<abstract>
<t>
   In many standards track documents several words are used to signify
   the requirements in the specification.  These words are often
   capitalized.  This document defines these words as they should be
   interpreted in IETF documents.  Authors who follow these guidelines
   should incorporate this phrase near the beginning of their document:
</t>
<t><list>
<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
      RFC 2119.
</t></list></t>
<t>
   Note that the force of these words is modified by the requirement
   level of the document in which they are used.
</t></abstract></front>

<seriesInfo name='BCP' value='14' />
<seriesInfo name='RFC' value='2119' />
<format type='TXT' octets='4723' target='http://www.rfc-editor.org/rfc/rfc2119.txt' />
<format type='HTML' octets='17491' target='http://xml.resource.org/public/rfc/html/rfc2119.html' />
<format type='XML' octets='5777' target='http://xml.resource.org/public/rfc/xml/rfc2119.xml' />
</reference>


<reference anchor='RFC4086'>

<front>
<title>Randomness Requirements for Security</title>
<author initials='D.' surname='Eastlake' fullname='D. Eastlake'>
<organization /></author>
<author initials='J.' surname='Schiller' fullname='J. Schiller'>
<organization /></author>
<author initials='S.' surname='Crocker' fullname='S. Crocker'>
<organization /></author>
<date year='2005' month='June' />
<abstract>
<t>Security systems are built on strong cryptographic algorithms that foil pattern analysis attempts. However, the security of these systems is dependent on generating secret quantities for passwords, cryptographic keys, and similar quantities. The use of pseudo-random processes to generate secret quantities can result in pseudo-security. A sophisticated attacker may find it easier to reproduce the environment that produced the secret quantities and to search the resulting small set of possibilities than to locate the quantities in the whole of the potential number space.&lt;/t>&lt;t> Choosing random quantities to foil a resourceful and motivated adversary is surprisingly difficult. This document points out many pitfalls in using poor entropy sources or traditional pseudo-random number generation techniques for generating such quantities. It recommends the use of truly random hardware techniques and shows that the existing hardware on many systems can be used for this purpose. It provides suggestions to ameliorate the problem when a hardware solution is not available, and it gives examples of how large such quantities need to be for some applications. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t></abstract></front>

<seriesInfo name='BCP' value='106' />
<seriesInfo name='RFC' value='4086' />
<format type='TXT' octets='114321' target='http://www.rfc-editor.org/rfc/rfc4086.txt' />
</reference>


<reference anchor='RFC4627'>

<front>
<title>The application/json Media Type for JavaScript Object Notation (JSON)</title>
<author initials='D.' surname='Crockford' fullname='D. Crockford'>
<organization /></author>
<date year='2006' month='July' />
<abstract>
<t>JavaScript Object Notation (JSON) is a lightweight, text-based, language-independent data interchange format.  It was derived from the ECMAScript Programming Language Standard.  JSON defines a small set of formatting rules for the portable representation of structured data.  This memo provides information for the Internet community.</t></abstract></front>

<seriesInfo name='RFC' value='4627' />
<format type='TXT' octets='16319' target='http://www.rfc-editor.org/rfc/rfc4627.txt' />
</reference>


<reference anchor='RFC4648'>

<front>
<title>The Base16, Base32, and Base64 Data Encodings</title>
<author initials='S.' surname='Josefsson' fullname='S. Josefsson'>
<organization /></author>
<date year='2006' month='October' />
<abstract>
<t>This document describes the commonly used base 64, base 32, and base 16 encoding schemes.  It also discusses the use of line-feeds in encoded data, use of padding in encoded data, use of non-alphabet characters in encoded data, use of different encoding alphabets, and canonical encodings. [STANDARDS-TRACK]</t></abstract></front>

<seriesInfo name='RFC' value='4648' />
<format type='TXT' octets='35491' target='http://www.rfc-editor.org/rfc/rfc4648.txt' />
</reference>


<reference anchor='RFC5652'>

<front>
<title>Cryptographic Message Syntax (CMS)</title>
<author initials='R.' surname='Housley' fullname='R. Housley'>
<organization /></author>
<date year='2009' month='September' />
<abstract>
<t>This document describes the Cryptographic Message Syntax (CMS).  This syntax is used to digitally sign, digest, authenticate, or encrypt arbitrary message content. [STANDARDS-TRACK]</t></abstract></front>

<seriesInfo name='STD' value='70' />
<seriesInfo name='RFC' value='5652' />
<format type='TXT' octets='126813' target='http://www.rfc-editor.org/rfc/rfc5652.txt' />
</reference>

<reference anchor='RFC5234'>

<front>
<title>Augmented BNF for Syntax Specifications: ABNF</title>
<author initials='D.' surname='Crocker' fullname='D. Crocker'>
<organization /></author>
<author initials='P.' surname='Overell' fullname='P. Overell'>
<organization /></author>
<date year='2008' month='January' />
<abstract>
<t>Internet technical specifications often need to define a formal syntax.  Over the years, a modified version of Backus-Naur Form (BNF), called Augmented BNF (ABNF), has been popular among many Internet specifications.  The current specification documents ABNF.  It balances compactness and simplicity with reasonable representational power.  The differences between standard BNF and ABNF involve naming rules, repetition, alternatives, order-independence, and value ranges.  This specification also supplies additional rule definitions and encoding for a core lexical analyzer of the type common to several Internet specifications. [STANDARDS-TRACK]</t></abstract></front>

<seriesInfo name='STD' value='68' />
<seriesInfo name='RFC' value='5234' />
<format type='TXT' octets='26359' target='http://www.rfc-editor.org/rfc/rfc5234.txt' />
</reference>

<reference anchor='RFC5226'>

<front>
<title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
<author initials='T.' surname='Narten' fullname='T. Narten'>
<organization /></author>
<author initials='H.' surname='Alvestrand' fullname='H. Alvestrand'>
<organization /></author>
<date year='2008' month='May' />
<abstract>
<t>Many protocols make use of identifiers consisting of constants and other well-known values. Even after a protocol has been defined and deployment has begun, new values may need to be assigned (e.g., for a new option type in DHCP, or a new encryption or authentication transform for IPsec). To ensure that such quantities have consistent values and interpretations across all implementations, their assignment must be administered by a central authority. For IETF protocols, that role is provided by the Internet Assigned Numbers Authority (IANA).&lt;/t>&lt;t> In order for IANA to manage a given namespace prudently, it needs guidelines describing the conditions under which new values can be assigned or when modifications to existing values can be made. If IANA is expected to play a role in the management of a namespace, IANA must be given clear and concise instructions describing that role. This document discusses issues that should be considered in formulating a policy for assigning values to a namespace and provides guidelines for authors on the specific text that must be included in documents that place demands on IANA.&lt;/t>&lt;t> This document obsoletes RFC 2434. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t></abstract></front>

<seriesInfo name='BCP' value='26' />
<seriesInfo name='RFC' value='5226' />
<format type='TXT' octets='66160' target='http://www.rfc-editor.org/rfc/rfc5226.txt' />
</reference>

<reference anchor='draft-ietf-jose-json-web-key'>

<front>
<title>JSON Web Key (JWK)</title>
<author initials='M.' surname='Jones' fullname='M. Jones'>
<organization /></author>
<date year='2012' month='May' />
</front>
<format type='TXT' target='http://tools.ietf.org/html/draft-ietf-jose-json-web-key-02' />
</reference>


<reference anchor='ALGS'>

<front>
<title>JSON Web Security Message Algorithms (similar to draft-ietf-jose-json-web-algorithms)</title>
<author initials='J.' surname='Doe' fullname='J. Doe'>
<organization /></author>
<date year='2012' month='June' />
</front>
<format type='TXT' target='http://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms' />
</reference>




</references>

    <section title="Acknowledgments">
      <t>[TODO]</t>
    </section>
  </back>
</rfc>
<!-- Keep this comment at the end of the file
Local variables:
mode: xml
sgml-omittag:nil
sgml-shorttag:nil
sgml-namecase-general:nil
sgml-general-insert-case:lower
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:nil
sgml-parent-document:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->
