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.

[2] Because DER produces binary output, it can be challenging to transmit the resulting files through systems, like electronic mail, that only support ASCII.

In particular PEM refers to the header and base64 wrapper for a binary format contained within, but does not specify any type or format for the binary data, so that a PEM file may contain "almost anything base64 encoded and wrapped with BEGIN and END lines".

These standards assumed prior deployment of a hierarchical public key infrastructure (PKI) with a single root.