Search notes:

Privacy-Enhanced Mail (PEM)

Privacy-Enhanced Mail (PEM) defines a format for storing and exchanging cryptographic keys and certificates.
With PEM, binary data is represented with Base64. The Base64 encoded data is embedded between a starting line and an ending line like so
-----BEGIN label -----
…
-----END label -----.
Commonly found values for label include
A file that contains PEM data typically has one of the following suffixes:

TODO

Generate a file in PEM format

$ openssl genpkey -out the.key -algorithm RSA
$ cat the.key
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDd+IKR9wyKI5jp
Yy4abfvcuDebil4av4P7qh1qykOZE5L0MYaAL0pXsC7iYu1/dZSGpqiR0xigwDFQ
…
-----END PRIVATE KEY-----

BEGIN RSA PRIVATE KEY

A PEM file that starts with BEGIN RSA PRIVATE KEY is stored in a legacy format.

See also

The Python script get-remote-certificate.py, located in a Python installation under Tools/scripts
PKCS #8

Links

RFC 7468: Textual Encodings of PKIX, PKCS, and CMS Structures.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758194743, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/security/Privacy-Enhanced-Mail/index(82): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78