CyberGlossary

Cryptography

Public Key

Definition

The freely distributable half of an asymmetric key pair, used to encrypt messages for its owner or to verify digital signatures produced by the matching private key.

A public key is the non-secret component of a public-key cryptosystem; it can be shared openly through directories, web pages, X.509 certificates, or DNS records without weakening the corresponding private key. It is used to encrypt data that only the holder of the matching private key can decrypt, to verify signatures the private key created, and to participate in authenticated key-exchange protocols like ECDHE. Public keys are commonly distributed inside certificates signed by a Certificate Authority (PKI) or pinned via mechanisms such as DNSSEC/DANE, SSHFP, or Trust-on-First-Use. Their authenticity — not their secrecy — is what matters: an attacker who substitutes a public key can mount man-in-the-middle attacks even though the value itself is public.

Examples

  • An RSA or ECDSA public key embedded in a website's X.509 certificate.
  • An SSH public key added to ~/.ssh/authorized_keys on a server.

Related terms