Glossary · deep dive

Public key

A key derived from the private key; others use it to verify your signatures. Addresses are derived from it.

A public key is the "shareable" half of a key pair. It is mathematically derived from a private key and lets anyone verify that a signature was made by the matching private key, without revealing that key.

How it is made

Bitcoin uses elliptic-curve cryptography on a curve called secp256k1. The private key, a number, is multiplied by a fixed starting point on the curve. The result is another point: the public key. Multiplying forward is fast. Working backward, from public key to private key, is believed to be infeasible with today's computers. That one-way property is what everything rests on.

Public key vs. address

An address is not the same as a public key. Most address formats are a hash of the public key, written in a format with built-in error checking, such as Base58Check, Bech32 or Bech32m. Addresses are shorter and catch typos. Newer Taproot addresses, activated in November 2021, contain a (tweaked) public key directly instead of its hash.

What it does in a transaction

When you spend a UTXO, your transaction includes your public key (or it is already known) and a digital signature. Every node checks that the signature is valid for that public key and that the public key matches the coins being spent. If it does, the spend is authorized.

Extended public keys

Wallets often use an "xpub", an extended public key that can generate all of a wallet's receiving addresses. It can be used for watch-only wallets, which see balances but cannot spend. Treat an xpub as private information, though: it reveals your whole transaction history.

The quantum footnote

A large future quantum computer could in theory derive private keys from public keys. This is one reason why reusing addresses is discouraged, and why researchers are studying quantum-resistant signatures for Bitcoin.