Skip to content
ecdsa.com

Public key

The half of an asymmetric key pair that can be shared freely and is used to verify signatures, encrypt to, or agree on keys with the holder of the matching private key.
Also written aspublic keypubkeyverification key

Mathematically it is derived from the private key: a curve point Q = d·G for ECDSA and ECDH, a 32-byte encoded point for Ed25519 and X25519, the modulus and exponent (n, e) for RSA, a matrix seed plus vector for ML-KEM and ML-DSA. Sizes range from 32 bytes (Ed25519) and 33/65 bytes (P-256 compressed/uncompressed) to 294 bytes (RSA-2048 as DER SubjectPublicKeyInfo) and 1,312–2,592 bytes (ML-DSA).

Common containers: SubjectPublicKeyInfo in DER or PEM (-----BEGIN PUBLIC KEY-----), the older PKCS #1 RSAPublicKey (BEGIN RSA PUBLIC KEY), JWK (kty, crv, x, y or n, e), the OpenSSH one-line format (ssh-ed25519 AAAA…), COSE_Key in WebAuthn, OpenPGP key packets and blockchain addresses, which are hashes of public keys.

A public key carries no identity. Trust comes from a binding: a certificate signed by a CA, a JWKS fetched over HTTPS from the issuer, a known_hosts entry, a pinned fingerprint or an on-chain address. Validate keys received from others (curve membership, size, type) before using them.

Standards and references

All terms