what is pem file

11 months ago 28
Nature

A PEM file is a container file format that is often used to store cryptographic keys and certificates. It defines the structure and encoding type of the file used to store a bit of data. A PEM file can contain a certificate (public key), a private key, or both concatenated together. The format of a PEM file dictates that it starts with "-----BEGIN <type>-----" and ends with "-----END <type>-----". Everything in between is base64 encoded, forming a block of data that can be used in other programs. A single PEM file can contain multiple blocks. PEM files are commonly used to encode keyfiles, such as RSA keys used for SSH, and certificates used for SSL encryption. They are also used to store SSL certificates and their associated private keys. Because it is a standard, any Public Key Infrastructure (PKI) implementation can use .pem files as a repository for keys or certificates.