A public key is a cryptographic value derived from your private key through one-way elliptic curve multiplication. It can be shared freely, anyone can use it to verify your digital signatures and derive your wallet address. Unlike your private key, exposing your public key does not compromise your funds.
What Is a Public Key?
3 min read
The short version
If your private key is the pen you use to sign checks, your public key is the signature card the bank has on file to verify those signatures are genuine. Sharing the card lets people confirm your identity, but nobody can forge your signature just by looking at it.
How It Works
The public key is generated by multiplying the private key (a scalar) by the generator point G on the secp256k1 elliptic curve: Public Key = Private Key × G. This operation takes nanoseconds in one direction but is computationally infeasible to reverse (the Elliptic Curve Discrete Logarithm Problem). On Bitcoin, the public key is 33 bytes (compressed) or 65 bytes (uncompressed). On Ethereum, it is 64 bytes (uncompressed, without prefix). Your wallet address is derived from the public key by hashing it, adding another layer of indirection. In legacy Bitcoin, the public key is only revealed on-chain when you spend from an address. In SegWit/Taproot, the public key is exposed differently. On Ethereum, the public key is derivable from any transaction signature via ecrecover.
Verifying a transaction signature
Alice broadcasts a signed Ethereum transaction. Any node can verify it: (1) Extract the public key from the ECDSA signature using ecrecover(message_hash, v, r, s). (2) Hash the recovered public key with Keccak-256 and take the last 20 bytes to get an address. (3) Confirm this address matches the "from" field. If it matches, Alice provably signed this transaction. At no point did anyone need Alice's private key, only the public key (recovered from the signature itself) was needed to verify authenticity.
What People Get Wrong
Public key and wallet address are the same thing
An address is derived from the public key (hashed and encoded), but they are not identical. On Bitcoin, the public key is 33 bytes; the address is 20 bytes (a hash). This distinction matters for understanding security properties.
Sharing your public key is dangerous
The whole point of public-key cryptography is that the public key can be shared freely. It cannot be reversed to find the private key. However, revealing your public key before spending (in some address formats) slightly reduces quantum-attack resistance, a theoretical concern, not a practical one.
Each transaction uses a different public key
Each address uses one public key derived from one private key. However, best practice is to use a new address (and thus new key pair) for each transaction for privacy reasons. HD wallets generate these automatically from one seed.
Keep Reading
Sources & Further Reading
- Bitcoin Developer: Key Derivation
Technical docs on public key derivation from private keys
Questions People Also Ask
- Why not use the public key directly as an address?
- Hashing adds a security layer. If quantum computers could eventually break elliptic curves (derive private keys from public keys), addresses whose public keys have never been revealed on-chain would remain safe because attackers would only have the hash, not the key itself.
- Can I look up any address's public key?
- On Ethereum, yes, once an address has sent any transaction, the public key is recoverable from the signature. On Bitcoin, only after the address has been spent from (revealing the public key in the witness/scriptSig).
- Is it safe to put my public key on my website?
- Yes. This is equivalent to sharing your address, it allows people to verify signatures you make and send you crypto. It reveals no information that could be used to access your funds.