Privacy-Enhanced Mail

Privacy-Enhanced Mail (PEM) is a de facto file format for storing and sending cryptographic keys, certificates, and other data, based on a set of 1993 IETF standards defining "privacy-enhanced mail." While the original standards were never broadly adopted, and were supplanted by PGP and S/MIME, the textual encoding they defined became very popular. The PEM format was eventually formalized by the IETF in RFC 7468.[1]

Format

Many cryptography standards use ASN.1 to define their data structures, and Distinguished Encoding Rules (DER) to serialize those structures.[2] Because DER produces binary output, it can be challenging to transmit the resulting files through systems, like electronic mail, that only support ASCII.

The PEM format solves this problem by encoding the binary data using base64. PEM also defines a one-line header, consisting of "-----BEGIN ", a label, and "-----", and a one-line footer, consisting of "-----END ", a label, and "-----". The label determines the type of message encoded. Common labels include "CERTIFICATE", "CERTIFICATE REQUEST", "PRIVATE KEY" and "X509 CRL".

PEM data is commonly stored in files with a ".pem" suffix, a ".cer" or ".crt" suffix (for certificates), or a ".key" suffix (for public or private keys).[3] The label inside a PEM file represents the type of the data more accurately than the file suffix, since many different types of data can be saved in a ".pem" file.

A PEM file may contain multiple instances. For instance, an operating system might provide a file containing a list of trusted CA certificates, or a web server might be configured with a "chain" file containing an end-entity certificate plus a list of intermediate certificates.

-----BEGIN PRIVATE KEY-----
MIIJRAIBADANBgkqhkiG9w0BAQEFAASCCS4wggkqAgEAAoICAQD2GlhF9HuoPwiF
S8lh0lHCwVGlVq0Jqtmp7ieyVOZ0mbU6T2KCDwkL3mWWSiVZc+cjh3EOsXtyzuiq
C1nsynrlSQuU3/pTkKVRWJCL51KXe7Rf+NPjSzqDdyowwQubWH42MMYbdLvjKRp9
Yje8yjHDE6N1OSJyp5TCN+74qLT/xqJOLsBQBEJoQESVUM5xIuEJk8epHwNaP4kP
SiYan5lTqXl0pOwNwyxG/kfRUdhdLI6VhaVzOqG3BT/HBYmu1Tk5CanqLeK8g5yw
pVfhKc/HIlbjTDjBXWfqUqTOOJaLkJxpJgcHS2FvtVzuc2VIbJoaOZqs10SIoqCZ
HuNVMvsFIeM2T2VB+XozoQrboP057wnUr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xoz0iA5+PPtEsClf8etnLXMMzl0GWiaD+GMY
SZjAXvCVYquQCRowgUkvepxreDSeQ/yVqgWdoa/vOWLMfuAbiy7I1FyefLv9SP8V
j00Wh3v7G9Q1vmr5GxcikjvO46PCjty8zomOgZ8dI9GfY44N2b0NTiMWwEx6STOd
88KEnRulMnh9cuk+bKI6rg5fvZoRRVQAisTUV5y3CmymmAijTfwKWsniMq6TVjdA
2SvjTTjVvDUhVclmbgIZKuCRgG0xyBKPYa+SdYfT88NdqzwPqH8IjsJg2J9Aoowy
BWf5AoIBAQD8zybogaMZBBAHbnEObVzHfJS6+g3nqNEL/pKePc7oh2e7wLIOe9zq
3E7DYKJOnC4CulqxK6r7cE2H8dEbdbyMc2u9CqsM4kpLL7aaLWjG3H+MADbgDnWN
lE+wjylfewl+y99tElBHxtsfWXf4AdM9eofirjY5nlDCuym44XG1T/MnJETKyobC
vUmP0OzwCADl/pzVNkbeUyNZVTd9Y34f0FyxWelM5y/MSKCmLBBmS6FXB58nrlQY
psGUNwWXrARgiInCeQkvN3toQrXOyQ5Df3MwrTAUIy0Nec7MrUEcdjrE0Mks3HhH
hMnpHOOGnVBZdVNxlZ9utshYrhRTfEnn
-----END PRIVATE KEY-----

Privacy-enhanced mail

The PEM format was first developed in the privacy-enhanced mail series of RFCs: RFC 1421, RFC 1422, RFC 1423, and RFC 1424. These standards assumed prior deployment of a hierarchical public key infrastructure (PKI) with a single root. Such a PKI was never deployed, due to operational cost and legal liability concerns. These standards were eventually obsoleted by PGP and S/MIME, competing e-mail encryption standards.

History

The initiative to develop Privacy Enhanced Mail began in 1985 on behalf of the PSRG (Privacy and Security Research Group) [4] also known as the Internet Research Task Force.

References

  1. Johnson, Mike (1995-10-01). "Cryptology in Cyberspace". Cryptologia. 19 (4): 392–396. doi:10.1080/0161-119591884042. ISSN 0161-1194.
  2. Sean, Leonard; Simon, Josefsson (April 2015). Textual Encodings of PKIX, PKCS, and CMS Structures. sec. 1. doi:10.17487/RFC7468. RFC 7468. Retrieved 2017-03-06.
  3. "DER vs. CRT vs. CER vs. PEM Certificates and How To Convert Them". www.gtopia.org. Retrieved 2020-02-04.
  4. Kent, S. (1993). "Internet Privacy Enhanced Mail". Communications of the ACM. doi:10.1145/163381.163390.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.