Datatypes

Public key (PEM)

ID pem_public_key

DatatypeNot PIIDraft

This record is a draft: it has not been reviewed yet and may be incomplete or wrong. Do not rely on it for compliance decisions. Help improve it (see CONTRIBUTING.md).

Public key in the PEM textual encoding: the Base64 of a DER SubjectPublicKeyInfo structure (RFC 5280) between -----BEGIN PUBLIC KEY----- and -----END PUBLIC KEY----- (RFC 7468, section 13). OpenSSL also writes RSA keys in the PKCS #1 form with the label RSA PUBLIC KEY. A public key is not secret; for the private key see x509_private_key.

Categories
Cryptographic identifiers
Countries
Global (not tied to a country)
Languages
Common to most languages
Quality
68/100 · missing: second example, mapping (Wikidata, Schema.org, ...), translation, detector coverage
Metacrafter rules
no detection rule yet
Supported by tools
no tool record lists this type yet

Regular expression

^-----BEGIN (?:RSA )?PUBLIC KEY-----[\s\S]+-----END (?:RSA )?PUBLIC KEY-----$

Python re syntax.

Examples

ValueDescription
-----BEGIN PUBLIC KEY----- MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEn1LlwLN/KBYQRVH6HfIMTzfEqJOVztLe kLchp2hi78cCaMY81FBlYs8J9l7krc+M4aBeCGYFjba+hiXttJWPL7ydlE+5UG4U Nkn3Eos8EiZByi9DVsyfy9eejh+8AXgp -----END PUBLIC KEY-----Example P-384 key of RFC 7468, section 13
-----BEGIN PGP PUBLIC KEY BLOCK----- xjMEU/NfCxYJKwYBBAHaRw8BAQdAPwmJlL3ZFu1AUxl5NOSofIBzOhKA1i+AEJku Q+47JAY= -----END PGP PUBLIC KEY BLOCK----- invalidOpenPGP public key block

Sources

Use this record