IndexCrypto
Educational only. Not financial, tax or legal advice, and nothing here is a recommendation to buy anything.

Public and Private Keys: How the Pair Works

Understand the public-private key pair: what each key does, how addresses derive from public keys, and what signing proves. Essential for crypto security.

Every cryptocurrency wallet, every transaction, and every signature rests on a single cryptographic pair: a public key and a private key. Understanding what each key does, and what signing actually proves, is the foundation for everything else in this reference — from reading a signature request to spotting a phishing site.

What the Pair Is

A key pair is generated together by the wallet software. The private key is a large random number, typically 256 bits. The public key is mathematically derived from the private key using elliptic-curve cryptography (specifically, secp256k1 for most cryptocurrencies). The derivation is one-way: given the private key, computing the public key is trivial; given the public key, computing the private key is computationally infeasible.

  • Private key: a secret number that must never be revealed. It is the ultimate authority over the funds. Anyone who holds it can sign transactions and move the associated assets.
  • Public key: derived from the private key, and safe to share. It is used to verify signatures and to derive addresses.

From Public Key to Address

An address is not the public key itself. It is a further transformation of the public key, usually a hash (e.g., SHA-256 and RIPEMD-160 for Bitcoin-style addresses) plus a checksum and an encoding (Base58Check or Bech32). This means an address is a shorter, more readable representation that also includes error detection. The public key itself is rarely shown; it is revealed when a transaction is signed and broadcast.

Because the address is derived from the public key, and the public key is derived from the private key, the address is effectively a fingerprint of the private key — but it cannot be reversed to recover the private key.

What Signing Actually Proves

When a wallet signs a transaction, it uses the private key to produce a digital signature over the transaction data. The signature is a mathematical construct that can be verified using the corresponding public key. Verification proves two things:

  1. Authenticity: the transaction was signed by the holder of the private key that corresponds to the public key.
  2. Integrity: the transaction data has not been altered after signing. Any change to the data invalidates the signature.

The signature does not reveal the private key. It is a one-way function: signing is easy with the private key, but forging a signature without it is computationally impossible. This is the same principle behind digital signatures used in web security and code signing.

Why One Key Is Public and the Other Private

The entire security model rests on this asymmetry. The public key can be shared freely — it is used to verify signatures and to receive funds. The private key must be kept secret because it is the only thing that can authorise transactions. There is no password reset, no customer support, and no central authority to recover a lost private key. If someone else obtains it, they have full control. If it is lost, the funds are permanently inaccessible.

Common Misconceptions and the Misdiagnosis

A frequent mistake is confusing the private key with the seed phrase. A seed phrase (also called a recovery phrase or mnemonic) is a human-readable encoding of the entropy from which all private keys in a wallet are derived. Entering the seed phrase into a wallet restores the entire set of keys. Many users think that sharing a private key is less dangerous than sharing a seed phrase, but both grant access. The seed phrase is often the target of phishing because it unlocks everything.

Another natural mistake is believing that an address is a public key. Because addresses are derived from public keys, users might assume that revealing an address reveals the public key. In practice, the public key is only revealed when a transaction is spent from that address. This is why some attacks wait for a first outgoing transaction to obtain the public key — though with modern cryptography, knowing the public key does not help an attacker derive the private key.

Why is this mistake natural? The terms “public key” and “address” are often used interchangeably in user interfaces. Wallets show addresses as QR codes and copy buttons, and users rarely see the actual public key. So it is understandable to think they are the same. But the distinction matters for understanding what is exposed on-chain.

How to Protect the Private Key

  • Never share a private key or seed phrase with anyone, including support staff. No legitimate service will ever ask for them.
  • Store the seed phrase offline, on paper or metal, in a secure location. Never keep it in a digital file, screenshot, or cloud service.
  • Use a hardware wallet for significant holdings. The private key never leaves the device; signing happens inside the hardware.
  • Beware of phishing sites that mimic wallet interfaces. Always check the URL and use bookmarks.
  • Understand what a signature request authorises. When a dApp asks to sign a message, it might be a transaction that spends funds, or it might be a harmless authentication. Read the details carefully.

Comparison: Public Key vs. Private Key vs. Address

The following table summarises the differences and when each is used. The “Not for” column clarifies when a key is not appropriate.

ItemWhat it isUsed forNot for
Private keySecret numberSigning transactions, proving ownershipSharing, storing digitally, entering on websites
Public keyDerived from private keyVerifying signaturesDeriving the private key, sharing as an address
AddressHash of public keyReceiving fundsSigning, verifying signatures

What People Get Wrong: The Misdiagnosis

A common piece of advice is “never share your private key.” That is correct, but it is incomplete. Many users think that as long as they do not type their private key into a website, they are safe. However, the seed phrase is the more common target. A phishing site might ask for the seed phrase, not the private key itself, because it restores the whole wallet. The user might think, “It’s not my private key, so it’s fine” — and that is the misdiagnosis.

Another misdiagnosis is believing that a hardware wallet makes the private key unhackable. A hardware wallet protects the private key from being extracted, but it does not protect against a user signing a malicious transaction. If a user approves a transaction that sends funds to an attacker, the hardware wallet will happily sign it. The private key remains safe, but the funds are gone.

These mistakes are natural because they stem from a partial understanding. The advice “keep your private key secret” is simple, but the reality is more nuanced. Understanding the mechanism — that the private key is the root of control, and that signing is the act of authorising — helps users evaluate new threats.

Practical Implications

When a wallet prompts to sign a transaction, the software is using the private key to produce a signature. The user does not see the private key; the wallet handles it. The user’s responsibility is to verify that the transaction details (recipient, amount, network) are correct before approving. A signature is a binding commitment; once broadcast, it cannot be undone.

When restoring a wallet, the software asks for the seed phrase. This is legitimate, but it should be done only on the device itself, not on a website. If a website asks for the seed phrase, it is a scam. No legitimate web service needs it.

Conclusion

The public-private key pair is the core of cryptocurrency security. The private key is the secret that must never be exposed; the public key and address are safe to share. Signing proves ownership and integrity. Understanding these concepts helps users avoid the most common attacks, which rely on tricking users into revealing their private key or seed phrase, or into signing a malicious transaction. The key takeaway is not to memorise a list of scams, but to understand the mechanism so that any new scam becomes obvious.

Common questions

What is the difference between a public key and a private key?

A private key is a secret number that allows you to sign transactions and control funds. A public key is derived from the private key and is used to verify signatures. The public key can be shared, but the private key must never be revealed.

Can someone steal my crypto if they have my public key?

No. The public key is meant to be shared. It is used to verify signatures and to derive addresses. Knowing the public key does not allow anyone to compute the private key, so funds remain safe.

Is a private key the same as a seed phrase?

No. A seed phrase is a human-readable representation of the entropy from which all private keys in a wallet are derived. Entering the seed phrase into a wallet restores all private keys. Both must be kept secret, but the seed phrase is often the target of phishing because it unlocks everything.

Why does my wallet show an address instead of a public key?

An address is a hashed version of the public key, with additional checksum and encoding. It is shorter and more convenient. The public key is only revealed when you make a transaction, but that does not compromise security.

What happens if I lose my private key?

If you lose your private key and have no backup (such as a seed phrase), you permanently lose access to the funds. There is no recovery mechanism. This is why it is critical to back up your seed phrase securely.

Read next