Public keys, private keys & digital signatures

Prove it's you โ€” without ever showing your password.

Builder ยท 9 min ยท Updated 2026-11-08

๐Ÿ’ก A glass mailbox and a wax seal

Your public key is like a glass mailbox on the street: anyone can see it and drop things in. Your private key is the only key that opens it. A digital signature is like a personal wax seal that only your private key can make, but anyone can check against your public key. If someone changes the letter after it's sealed, the seal no longer matches.

The key pair

  • Private key โ€” a huge random number (in Bitcoin, 256 bits). Whoever knows it controls the funds. Never share it.
  • Public key โ€” mathematically derived from the private key using elliptic-curve multiplication. Easy to compute forward, practically impossible to reverse.
  • Address โ€” a shorter, hashed and encoded form of the public key, which you share to receive funds.

How signing works

  1. You create a message (e.g. "send 0.01 BTC from my output to Bob").
  2. Your wallet combines the message's hash with your private key to produce a signature.
  3. Anyone can verify the signature with your public key โ€” without learning your private key.
  4. Change one character of the message and verification fails.

How big is "practically impossible"?

There are about 2256 possible private keys โ€” roughly 1077, comparable to the number of atoms in the observable universe. Guessing someone's key is not a realistic attack; stealing it through phishing, malware or a careless backup is.

"Not your keys, not your coins"

When you leave crypto on an exchange, the exchange holds the keys. You have an IOU. If the exchange is hacked, freezes withdrawals or fails (as FTX did in 2022), you may not get your assets back. Self-custody removes that risk but adds another: if you lose the key, nobody can recover it.

๐Ÿงฎ Practical example: signing a message

Key takeaways

  • Private key = control. Public key/address = safe to share.
  • Signatures prove authorisation without revealing secrets.
  • Tampering breaks verification.
  • Exchanges holding your keys = counterparty risk.

Education only โ€” not financial advice.