<?xml version='1.0' encoding='US-ASCII'?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC8018 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8018.xml">
<!ENTITY RFC2978 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2978.xml">
<!ENTITY RFC5208 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5208.xml">
<!ENTITY RFC5958 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5958.xml">
<!ENTITY RFC7292 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7292.xml">
<!ENTITY RFC7613 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7613.xml">
]>

<!-- XML source generated using id2xml January 2018 -->

<rfc submissionType="independent" category="info" number="8351" ipr="trust200902">

<?rfc compact="yes"?>
	<?rfc text-list-symbols="o*+-"?>
	<?rfc subcompact="no"?>
	<?rfc sortrefs="yes"?>
	<?rfc symrefs="yes"?>
	<?rfc strict="yes"?>
	<?rfc toc="yes"?>
	<front>
	<title abbrev="PKCS #8 EncryptedPrivateKeyInfo Media Type">The PKCS #8 EncryptedPrivateKeyInfo Media Type</title>
	<author fullname="Sean Leonard" initials="S." surname="Leonard">
	<organization>Penango, Inc.</organization>
	<address><postal><street>5900 Wilshire Blvd</street>
	<street>Ste 2600</street>
	<street>Los Angeles, CA  90036</street>
	<street>United States of America</street>
	</postal>
	<email>dev+ietf@seantek.com</email>
	<uri>http://www.penango.com/</uri>
	</address>
	</author>

	<date month="June" year="2018"/>
	<abstract><t>
   This document registers the application/pkcs8-encrypted media type
   for the EncryptedPrivateKeyInfo type of PKCS #8. An instance of this
   media type carries a single encrypted private key, BER-encoded as a
   single EncryptedPrivateKeyInfo value.</t>

	</abstract>
	</front>

	<middle>

	<section title="Introduction" anchor="section-1">
        <t>
    The private key is encrypted with an encryption algorithm,
  which could be a password-based encryption scheme as that
  term is used in PKCS #5: Password-Based Cryptography
  Specification Version 2.1 as published in <xref target="RFC2898"/> and
  updated by <xref target="RFC8018"/>.  This document registers
  the application/pkcs8-encrypted media type for the
  EncryptedPrivateKeyInfo type of PKCS #8 (as originally
  described in <xref target="RFC5208"/>, which was obsoleted by <xref target="RFC5958"/>).
  An instance of this media type carries a single encrypted
  private key <xref target="RFC5958"/> BER-encoded as a single
  EncryptedPrivateKeyInfo value.
        </t>

	</section>

	<section title="Registration Application" anchor="section-2">
	  <t>Type name: application</t>

	  <t>Subtype name: pkcs8-encrypted</t>

	  <t>Required parameters: None.</t>

	  <t>Optional parameters:</t>
	  <t><list><t>
<!--[rfced] Vertical whitespace after Optional parameters should be removed in post-xml2rfc processing. -->
	  <list style="hanging" hangIndent="2">
	    
          <t hangText="password-mapping:">
	    The private key is encrypted with an encryption
     algorithm, which could be a password-based encryption scheme as
     that term is used in PKCS #5 (<xref target="RFC2898"/> and <xref target="RFC8018"/>).  Such
     algorithms take a password as input.  A "password" is a secret
     text value (see Section 3 of <xref target="RFC2898"/> and <xref target="RFC8018"/>), but for
     algorithmic purposes the term "password" refers to an octet
     string (see Section 2 of <xref target="RFC2898"/> and <xref target="RFC8018"/>).  Therefore,
     there must be some mapping between the text value (which might
     be user input) and the octet string.  Section 3 of <xref target="RFC2898"/>
     (which was replaced by <xref target="RFC8018"/>) recommends "that applications follow
     some common text encoding rules"; it then offers, but does not
     recommend, ASCII and UTF-8.
<vspace blankLines="1" />
    While many modern applications support Unicode and Unicode-based
    encodings such as UTF-8 and UTF-16, interchange is still needed
    with private key artifacts that are encrypted with passwords in
    other encodings. Therefore, this parameter specifies the charset
    (see Section 1.3 of <xref target="RFC2978"/>) that a recipient should attempt
    first, in "reverse", when mapping from a sequence of characters to
    an octet string. This parameter is not cryptographically protected,
    so recipients cannot rely on it as the exclusive mapping
    possibility.
<vspace blankLines="1" />
This parameter has similar semantics to the charset parameter from
    text/plain, except that it only applies to the user's input (text
    value) of a password. There is no default value.
<vspace blankLines="1" />
 The following special values, which all begin with "*" to
 distinguish them from registered charsets, are defined:
<list style="hanging" hangIndent="13">
<t hangText="*pkcs12">UTF-16LE with U+0000 NULL terminator: PKCS #12 style,
see <xref target="RFC7292"/>.</t>
<t hangText="*precis">Preparation, Enforcement, and Comparison of
               Internationalized Strings (PRECIS) password profile, i.e.,
	       OpaqueString from Section 4 of <xref target="RFC7613"/>: always
UTF-8 in Normalization Form C (NFC).</t> 


<t hangText="*precis-XXX">Any profile from the IANA "PRECIS Profiles" registry where "XXX" is replaced by the profile name as shown in the registry.</t>
<t hangText="*hex">hexadecimal input: the input is mapped to 0-9, A-F, and
then converted directly to octets. If there are an odd number of hex digits,
either the final digit 0 is appended or an error condition is raised. Compare
with Annex M.4 of <xref target="IEEE.802.11-2012"/>.</t>
<t hangText="*dtmf">The characters "0"-"9", "A"-"D", "*", and "#", which map
to their corresponding ASCII codes. "A"-"D" map to the uppercase range 0x41 -
0x44. (This is to support restricted-input devices, i.e., telephones and
telephone-like equipment.) User input outside of these values is either
ignored or an error condition is raised.</t>
	</list>
<vspace blankLines="1" />
   Otherwise, the value of this parameter is a charset, from the IANA
   "Character Sets" registry <xref target="CHARREG"/>.
<vspace blankLines="1" />
   This parameter is case insensitive.
	  </t></list></t></list></t>
	<t>
   Encoding considerations: Binary.</t>

	<t>
   Security considerations:</t>
<t><list style="empty">
	<t>
   Carries a cryptographic private key. See Section 6 of <xref target="RFC5958"/>.</t>

	<t>
   EncryptedPrivateKeyInfo PKCS #8 data contains exactly one private
   key. Poor password choices, weak algorithms, or improper parameter
   selections (e.g., insufficient salting rounds) will make the
   confidential payloads much easier to compromise.</t></list></t>

	<t>
   Interoperability considerations:</t>
<t><list style="empty">
	<t>
   PKCS #8 is a widely recognized format for private key information
   on all modern cryptographic stacks. The contents are exactly one
   private key (with optional key attributes), so there is no
   possibility for hidden "Easter eggs" in the payload such as
   unexpected certificates or miscellaneous secrets.</t>

	<t>
   The encrypted variation in this registration,
   EncryptedPrivateKeyInfo (<xref target="section-3"/>, "Encrypted Private Key Info", of
   <xref target="RFC5958"/>, and Section 6 of PKCS #8 as originally described in <xref target="RFC5208"/>, which was obsoleted by <xref target="RFC5958"/>), is less widely used for
   exchange than PKCS #12, but it is much simpler to implement.
   Actually, PKCS #12 incorporates the PKCS #8 types, so a PKCS #12
   processor ought to be able to process PKCS #8 data by embedding the
   PKCS #8 data in PKCS #12 "scaffolding".</t>

	<t>
   The password-mapping parameter aids in interoperability when the
   creator (who encrypted the keying material) and the user (who is
   attempting to decrypt the keying material) are not operating in the
   same character-encoding environment. An anticipated scenario is
   that the creator may have created the keying material with a
   password in a Shift-JIS environment a long time ago, while the user
   is in a UTF-8 environment. There are potentially many Unicode
   sequences that code for the same abstract character, such as
   precomposed and decomposed forms; yet, such an abstract character
   (however coded in Unicode) will tend to map to one coding in the
   legacy charset, if it can be represented at all. Therefore, the
   password-mapping parameter will almost never be ambiguous when
   mapping to legacy encodings. When mapping from one Unicode form to
   another (such as an internal Unicode representation to *pkcs12),
   code sequences are either preserved or folded deterministically to
   common Unicode code points or sequences, producing the same
   holistic result as mapping to legacy encodings.</t>

	<t>
   It is possible that an abstract character might map to multiple
   legacy encodings under the same charset. However, the possibility
   is sufficiently remote as to be ignored in this media type
   registration. One possible workaround is to set the user's
   (decrypting party's) local operating environment to the password-mapping legacy encoding parameter for the purpose of generating the
   password octet string from user input. Another possibility is to
   generate all possible legacy encoding combinations from the
   abstract text (i.e., Unicode text), attempting decryption with
   them. Customized behavior can be defined by updating this media
   type registration with a new password-mapping special value,
   prefixed with *.</t></list></t>

	<t>
   Published specification:</t>
<t><list style="empty">
	<t>
   RSA Laboratories PKCS #8 v1.2 RSA Encryption Standard, November
     1993 (republished as <xref target="RFC5208"/>, May 2008, and updated as <xref target="RFC5958"/>, August 2010);
   RFC 5958, August 2010</t></list></t>

	<t>
   Applications that use this media type:</t>
<t><list style="empty">
	<t>
   Machines, applications, browsers, Internet kiosks, and so on, that
   support this standard allow a user to import, export, and exercise
   a single private key.</t></list></t>

	<t>
   Fragment identifier considerations: None.</t>

	<t>
   Additional information:</t>
<t><list style="empty">
<?rfc subcompact="yes"?>
<t>Deprecated alias names for this type: N/A</t>
<t>Magic number(s): None.</t>
<t>File extension(s): .p8e</t>
<t>Macintosh file type code(s): None. A uniform type identifier (UTI) of
     "com.rsa.pkcs&nbhy;8&nbhy;encrypted" is recommended.</t>

	<?rfc subcompact="no"?>

      </list></t>
	<t>
   Object Identifiers: 1.2.840.113549.1.12.10.1.2 (when in PKCS #12)</t>

	<t><list style="hanging" hangIndent="2"><t hangText="Person &amp; email address to contact for further information:">
	<vspace blankLines="1"/>
	Sean Leonard &lt;dev+ietf@seantek.com&gt;
	</t>

	</list>
	</t>
	<t>
   Intended usage: COMMON</t>

	<t>
   Restrictions on usage: None.</t>

	<t>
   Author/Change controller: Sean Leonard &lt;dev+ietf@seantek.com&gt;</t>


	<t>
   Provisional registration? No</t>

	</section>

	<section title="IANA Considerations" anchor="section-3"><t>
   IANA has registered the media type application/pkcs8-encrypted
   in the Standards tree using the information provided in Section 2 of
   this document.</t>

	</section>

	<section title="Security Considerations" anchor="section-4"><t>
   See the registration template.</t>

	</section>

	</middle>

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


	<reference anchor="CHARREG" target="http://www.iana.org/assignments/character-sets"><front>
	<title>Character Sets</title>
	<author>
	<organization>IANA</organization>
	</author>

	<date month="December" year="2013"/>
	</front>

	</reference>

        <?rfc include="reference.RFC.2898"?>
	&RFC8018;
	&RFC2978;
	&RFC5208;
	&RFC5958;
	&RFC7292;
	&RFC7613;

<reference anchor="IEEE.802.11-2012"
	   target='http://ieeexplore.ieee.org/document/6178212/'>
<front>
<title>IEEE Standard for Information technology--Telecommunications and
information exchange between systems Local and metropolitan area
networks--Specific requirements Part 11: Wireless LAN Medium Access
 Control (MAC) and Physical Layer (PHY) Specifications</title>
<author>
 <organization>IEEE</organization>
</author>
<date />
</front>
 <seriesInfo name="IEEE" value='802.11-2012'/>
<seriesInfo name="DOI" value="10.1109/ieeestd.2012.6178212"/>
</reference>

	</references>


	</back>

	</rfc>
	
