RFC 8351
The PKCS #8 EncryptedPrivateKeyInfo Media Type
RFC 8351: The PKCS #8 EncryptedPrivateKeyInfo Media Type π
okay bestie, let's talk about this one β¨ It's an Informational doc from Sean Leonard at Penango, Inc., published as an Independent Submission in June 2018 (ISSN 2070-1721). It's not on the Standards Track, so it's not an Internet Standard, and it doesn't list any RFCs it obsoletes or updates π
The whole point is to register a new media type, application/pkcs8-encrypted, for a single encrypted private key in PKCS #8 format. Iconic, honestly π¦
Status and copyright stuff is below, so you can skip it if you want π
Abstract
okay so this doc registers application/pkcs8-encrypted as the media type for the EncryptedPrivateKeyInfo type of PKCS #8 π Each instance carries one encrypted private key, BER-encoded as a single EncryptedPrivateKeyInfo value π
Status of This Memo
ngl this part is pretty formal π The short version: this document is not an Internet Standards Track spec, it's just published for information πΈ
It's a contribution to the RFC Series, separate from any other RFC stream. The RFC Editor chose to publish it at their discretion and doesn't say whether it's good for implementing or deploying π«Ά Docs the RFC Editor approves aren't candidates for any level of Internet Standard. See Section 2 of RFC 7841 for that.
For the current status, any errata, and how to give feedback, check https://www.rfc-editor.org/info/rfc8351 β¨
Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the document authors. All rights reserved. π
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) as they stood on the publication date. Please actually read these, because they spell out your rights and restrictions for this document π
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Registration Application . . . . . . . . . . . . . . . . . . 2
3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6
4. Security Considerations . . . . . . . . . . . . . . . . . . . 6
5. Normative References . . . . . . . . . . . . . . . . . . . . 6
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 7
1. Introduction
so the private key gets encrypted with some encryption algorithm π That could be a password-based encryption scheme, the kind defined in PKCS #5: Password-Based Cryptography Specification Version 2.1, which is published as [RFC2898] and updated by [RFC8018] π
This doc registers the application/pkcs8-encrypted media type for the EncryptedPrivateKeyInfo type of PKCS #8. The original description was in [RFC5208], which got obsoleted by [RFC5958] π§ An instance of this media type carries a single encrypted private key [RFC5958], BER-encoded as a single EncryptedPrivateKeyInfo value β¨
2. Registration Application
Here's the registration template, bestie π
Type name: application
Subtype name: pkcs8-encrypted
Required parameters: None. πΈ
Optional parameters:
password-mapping: okay, this is the big one π The private key is encrypted with an encryption algorithm, which could be a password-based scheme as defined in PKCS #5 ([RFC2898] and [RFC8018]). These algorithms take a password as input. In this context, a "password" is a secret text value (see Section 3 of [RFC2898] and [RFC8018]), but for the math, the algorithm actually works on an octet string (see Section 2 of [RFC2898] and [RFC8018]) π€ So there has to be some mapping between the text value, which might be what the user typed in, and that octet string π¦
Section 3 of [RFC2898] (which [RFC8018] replaced) says applications "follow some common text encoding rules" and then offers ASCII and UTF-8 as options, without actually recommending either one π
Now, lots of modern apps handle Unicode, like UTF-8 and UTF-16 π But interchange still matters, because you'll run into private key files that were encrypted with passwords in other encodings. So this parameter names the charset (see Section 1.3 of [RFC2978]) that a recipient should try first, working in "reverse", when mapping a sequence of characters into an octet string β¨ Heads up: this parameter isn't cryptographically protected, so recipients can't treat it as the only possible mapping π
It works a lot like the charset parameter on text/plain, except it only applies to the user's password input (the text value) π There's no default value.
The special values below all start with "*" so they can't be confused with registered charsets π
*pkcs12 UTF-16LE with U+0000 NULL terminator: PKCS #12
style, see [RFC7292].
*precis Preparation, Enforcement, and Comparison of
Internationalized Strings (PRECIS) password
profile, i.e., OpaqueString from Section 4 of
[RFC7613], which was obsoleted by [RFC8265]: always
UTF-8 in Normalization Form C (NFC).
*precis-XXX Any profile from the IANA "PRECIS Profiles"
registry where "XXX" is replaced by the profile
name as shown in the registry.
*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
[IEEE.802.11-2012].
*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.
Quick breakdown, because these are a lot π«Ά
*pkcs12is UTF-16LE with a U+0000 NULL terminator, the PKCS #12 style, which you can read about in [RFC7292] π*precisis the PRECIS password profile, which isOpaqueStringfrom Section 4 of [RFC7613]. That one got obsoleted by [RFC8265], and it's always UTF-8 in Normalization Form C (NFC) πΈ*precis-XXXcovers any profile in the IANA "PRECIS Profiles" registry. You just swap "XXX" for the profile name as it appears in the registry β¨*hexis hexadecimal input. Each character gets mapped to 0-9 or A-F, then turned directly into octets. If you've got an odd number of hex digits, either a final digit 0 gets appended or an error gets raised. For a comparison, check out Annex M.4 of [IEEE.802.11-2012] π¦*dtmfis for the characters "0"-"9", "A"-"D", "*", and "#", which map to their ASCII codes. "A"-"D" land in the uppercase range 0x41 - 0x44. It exists for restricted-input devices, like telephones and phone-like equipment π Any input outside those values is either ignored or raises an error π
Anything else in this parameter is a charset from the IANA "Character Sets" registry [CHARREG] π
And the parameter is case insensitive, so UTF-8 and utf-8 are the same thing π
More of the registration template, plus the IANA, Security, and References sections, is coming in part 2 π
5. Normative References β¨
okay bestie, these are the docs this spec literally cannot live without π (normative = you NEED them, no cap) π
[CHARREG]IANA, "Character Sets", December 2013,<http://www.iana.org/assignments/character-sets>.[IEEE.802.11-2012]IEEE, "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", IEEE 802.11-2012, DOI 10.1109/ieeestd.2012.6178212,<http://ieeexplore.ieee.org/document/6178212/>. πΈ[RFC2898]Kaliski, B., "PKCS #5: Password-Based Cryptography Specification Version 2.0", RFC 2898, DOI 10.17487/RFC2898, September 2000,<https://www.rfc-editor.org/info/rfc2898>. π[RFC2978]Freed, N. and J. Postel, "IANA Charset Registration Procedures", BCP 19, RFC 2978, DOI 10.17487/RFC2978, October 2000,<https://www.rfc-editor.org/info/rfc2978>. π[RFC5208]Kaliski, B., "Public-Key Cryptography Standards (PKCS) #8: Private-Key Information Syntax Specification Version 1.2", RFC 5208, DOI 10.17487/RFC5208, May 2008,<https://www.rfc-editor.org/info/rfc5208>. π¦[RFC5958]Turner, S., "Asymmetric Key Packages", RFC 5958, DOI 10.17487/RFC5958, August 2010,<https://www.rfc-editor.org/info/rfc5958>. π§[RFC7292]Moriarty, K., Ed., Nystrom, M., Parkinson, S., Rusch, A., and M. Scott, "PKCS #12: Personal Information Exchange Syntax v1.1", RFC 7292, DOI 10.17487/RFC7292, July 2014,<https://www.rfc-editor.org/info/rfc7292>. π[RFC7613]Saint-Andre, P. and A. Melnikov, "Preparation, Enforcement, and Comparison of Internationalized Strings Representing Usernames and Passwords", RFC 7613, DOI 10.17487/RFC7613, August 2015,<https://www.rfc-editor.org/info/rfc7613>. π[RFC8018]Moriarty, K., Ed., Kaliski, B., and A. Rusch, "PKCS #5: Password-Based Cryptography Specification Version 2.1", RFC 8018, DOI 10.17487/RFC8018, January 2017,<https://www.rfc-editor.org/info/rfc8018>. β[RFC8265]Saint-Andre, P. and A. Melnikov, "Preparation, Enforcement, and Comparison of Internationalized Strings Representing Usernames and Passwords", RFC 8265, DOI 10.17487/RFC8265, October 2017,<https://www.rfc-editor.org/info/rfc8265>. π
Author's Address π«Ά
Here's where the author lives, in case you want to reach out! π
Sean Leonard
Penango, Inc.
5900 Wilshire Blvd
Ste 2600
Los Angeles, CA 90036
United States of America
Email: dev+ietf@seantek.com
URI: http://www.penango.com/
and that's the whole RFC, bestie!! πβ¨π
π¦ where this page comes from
- ietf: rfc8351 2018-06
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms