What is a public key in crypto? How it differs from an address
A public key in crypto is the shareable half of a cryptographic key pair: a code calculated from your private key that lets the network check your digital signatures and lets other people send you funds. You can share it freely, because nobody can work backwards from a public key to the private key that controls your crypto. Your wallet address is usually a shorter, hashed version of the public key.
What is a public key in crypto, in plain words?
A public key is like an account number that can also check signatures. People and the blockchain use it to confirm that a transaction really came from you, without ever seeing your secret.
Every crypto wallet works with three related keys and codes:
- Private key: a secret number only you know. It signs transactions and gives access to your funds.
- Public key: derived mathematically from the private key. It is used to verify signatures and can be shared publicly.
- Wallet address: made from the public key, usually by hashing it. This is what you give someone so they can send funds.
The relationship only works one way. Your wallet turns a private key into a public key in an instant, but reversing the process is practically impossible. That is why the public key acts as your identity on the blockchain while your private key stays hidden.
How public and private keys work together
Public and private keys work together through asymmetric cryptography, also called public key cryptography. The idea dates from the 1970s, decades before Bitcoin, and it secures much of the internet today. Unlike symmetric key cryptography, where both sides share one secret key, each person has two related keys: one public, one private.
In crypto, the key pair is used mainly for digital signatures:
- You create a transaction, for example sending €200 of bitcoin to a friend.
- Your wallet signs it with your private key. The signature is unique to this exact transaction.
- The network checks the signature against your public key. If anything was changed, or the wrong key signed, it fails.
- Nodes accept the transaction once it passes verification, and miners or validators add it to a block.
Nobody else sees your private key at any point. The public key is used to verify that only the owner of the address could have produced that signature, which is how you prove ownership on a network with no central authority.
Encryption: the other job of a public key
Outside blockchains, public key encryption also protects messages. If Bob wants to send Alice a private message, he encrypts it with Alice’s public key. Only the intended recipient, Alice, can decrypt it with her matching private key. Alice can reply using Bob’s public key the same way. This is the idea behind end to end encryption in messaging apps and the padlock in your browser, and it means two parties can set up a shared secret over a public channel without a trusted courier. Bitcoin and Ethereum use the key pair for signing rather than encrypting, but the maths comes from the same family.
How are keys generated?
Keys are generated in a fixed order, starting from randomness. Private key generation comes first: your wallet picks a huge random number, usually derived from your seed phrase. The wallet then calculates the corresponding public key with a cryptographic algorithm based on elliptic curve cryptography. Bitcoin and Ethereum both use the same elliptic curve, called secp256k1.
From there, each blockchain creates addresses in its own way:
| Bitcoin | Ethereum | |
|---|---|---|
| Public key | 33 bytes, shown as 66 characters starting with 02 or 03 | 64 bytes |
| Address made by | Hashing the public key twice | Hashing the public key and keeping the last 20 bytes |
| Address looks like | Starts with 1, 3 or bc1 | 0x followed by 40 characters |
A shortened example of a Bitcoin public key looks like 02b4632d08485ff1…; the matching address would start with bc1 and look completely different, because hashing scrambles it.
Modern wallets generate a new key pair, and so a new bitcoin address, for each payment you receive. Ethereum wallets usually stay on one blockchain address per account.
Public key vs private key vs wallet address
The main difference between the three is who may see them and what they can do.
| Private key | Public key | Wallet address | |
|---|---|---|---|
| Share it? | Never | Yes | Yes |
| What it does | Signs transactions, lets you spend funds | Verifies signatures | Tells people where to send funds |
| Made from | Random number or seed phrase | Private key | Public key (hashed version) |
| If someone else has it | They control your crypto | Nothing happens | They can send you crypto and see the balance |
On Bitcoin, your public key itself only becomes visible on the blockchain when you spend from an address. Until then, other users only see the address. On Ethereum, the public key can be recovered from any transaction you have signed.
Why the public key matters to you
You rarely handle a public key directly; your wallet does it for you. But three practical points follow from how it works.
Privacy. Everything sent to a given address is public. Anyone with your address can look up its full history, and an extended public key (xpub) shows every address in your wallet at once. Share an xpub only with software you trust, such as your own wallet app. Read more about crypto privacy.
EU withdrawal checks. Under the EU travel rule, if you withdraw more than €1,000 from an EU exchange to your own wallet, the exchange must check that the address is yours. Some exchanges ask you to sign a message with your wallet: your private key signs, and the exchange checks the signature against your public key.
Mistakes cannot be undone. Crypto transactions are final. If you send funds to the wrong address or the wrong network, no bank or regulator can reverse it. If the address belongs to nobody, the funds are inaccessible forever.
Address scams to watch for
Scammers cannot steal your crypto with your public key, so they go after the address you send to instead. These tricks are common:
- Address poisoning. A scammer sends you a tiny amount from an address that starts and ends with the same characters as one you use. Later you copy the wrong one from your history.
- Clipboard malware. Malicious software swaps the address you copied for the attacker’s when you paste it.
- Fake QR codes and payment pages that show a scammer’s address instead of the real one.
To protect yourself:
- Check the full address, not just the first and last few characters, before you send.
- Send a small test amount first when you move a larger sum to a new address.
- Save trusted addresses in your exchange’s address book or withdrawal whitelist.
- Keep larger amounts in self-custody on a hardware wallet, which shows the address on its own screen.
If you lose money to a scam, report it to the police and to the exchange you sent from straight away. Our guide to security best practices covers more steps.
Key takeaways
A public key is the part of your crypto identity you can show the world. It proves your signatures are genuine and gives people a way to pay you, while your private key stays secret. Share addresses freely, protect your privacy with fresh ones, and always double-check where your money is going.
Related terms
Questions people ask
Is a public key the same as a wallet address?
No. A wallet address is usually a shorter, hashed version of the public key, made for receiving funds. Your wallet creates the address for you, so in everyday use you share the address, not the public key itself.
Can someone steal my crypto with my public key?
No. A public key only lets people check your signatures and send you funds. To spend funds someone needs the matching private key, which cannot be worked out from the public key.
How do I find my public key?
Most wallets show addresses rather than public keys. Some advanced or hardware wallets let you export an extended public key (xpub), but that reveals every address in the wallet, so only share it with software you trust.
Is it safe to give out my crypto wallet address?
Sharing an address cannot put your funds at risk, but it does let anyone see that address's balance and history on the blockchain. For privacy, use a fresh address for each payment.