1 comment

[ 2.8 ms ] story [ 9.8 ms ] thread
There are two styles of public key, both with Base64 between the boundaries:

    -----BEGIN RSA PUBLIC KEY-----
    -----END RSA PUBLIC KEY-----
    and
    -----BEGIN PUBLIC KEY-----
    -----END PUBLIC KEY-----
The top answer gives a stellar explanation of internals in response to OP asking how to convert between them.

For the former (older) format, there is this overview in the middle of the post:

> [This is an] PEM DER ASN.1 PKCS#1 RSA Public key

> - PEM: synonym for base64

> - DER: a flavor of ASN.1 encoding

> - ASN.1: the binary encoding scheme used

> - PKCS#1: The formal specification that dictates representing a public key as structure that consists of modulus followed by an exponent

> - RSA public key: the public key algorithm being used

Trivial!

I really appreciated the explanation of all these terms in one place, even if I question that PEM really just means Base64 it is likely a useful simplification.