what is .pem file

1 year ago 64
Nature

A PEM file is a container file format used to store cryptographic keys and certificates. It defines the structure and encoding type of the file used to store a bit of data. The format dictates that PEM files start with "-----BEGIN <type>-----" and end 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 and can be used to represent all kinds of data, but its commonly used to encode keyfiles, such as RSA keys used for SSH, and certificates used for SSL encryption. The typical PEM files are:

  • key.pem: contains the private encryption key
  • cert.pem: contains certificate information

A .pem file is a container format that may include the public certificate or the entire certificate chain (private key, public key, root certificates) . PEM files are frequently used in certificate installations when multiple certificates that form a complete chain are being imported as a single file. The format is used by Apache and other web servers.