DeFi Intel

What is Public Key?

Plain-English explainer · Updated 2026-07-02 · By DeFi Intel

How it works

Public keys are generated from private keys using elliptic curve cryptography (ECC), such as the secp256k1 curve standardized by Bitcoin and Ethereum. The private key is a random 256-bit number; the public key is a corresponding point on the curve computed through scalar multiplication. This one-way operation makes it infeasible to reverse the process, ensuring that revealing the public key does not compromise the private key. The public key is then typically hashed using algorithms like SHA-256 and RIPEMD-160 (Bitcoin) or Keccak-256 (Ethereum) to produce a shorter wallet address for efficiency.

In transactions, the owner signs a message with their private key, producing a digital signature. Anyone with the corresponding public key can verify that the signature was created by the owner and that the message has not been altered. Verification uses the public key to check the elliptic curve math of the signature. This mechanism underpins all on-chain operations in networks like Bitcoin and Ethereum. For instance, when sending ETH, the sender's wallet signs the transaction data with the private key; nodes use the public key (extracted from the signature or provided separately) to confirm authorization before updating the ledger.

Though less common in everyday DeFi, public keys also enable encryption for secure communication. A sender can encrypt a message with the recipient's public key, ensuring only the holder of the corresponding private key can decrypt it. This principle is used in some decentralized messaging protocols and in the ECIES (Elliptic Curve Integrated Encryption Scheme) standard. In practice, most blockchain interactions emphasize signature verification over encryption, but the dual functionality of asymmetric keys remains a foundational cryptographic property.

Why it matters

Public keys are essential for trustless, permissionless transaction verification in decentralized systems. They allow anyone to confirm ownership and authenticity without needing a trusted intermediary. This enables self-custody, where users alone control their funds through private keys while freely sharing their public addresses to receive assets. Public keys also underpin digital identity, smart contract interactions, and multi-signature schemes. Without them, blockchain networks could not achieve the security and transparency that set them apart from traditional finance.

Real-world examples

In Bitcoin, a public key is hashed to generate an address like 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa. In Ethereum, the public key is derived from the private key using ECDSA on secp256k1, then hashed via Keccak-256 to produce a 0x-prefixed address. Both Bitcoin and Ethereum rely on public keys for transaction signing and verification. Other protocols, such as Solana (Ed25519) and Cardano, use similar elliptic curve systems but with different curve and hashing standards.

FAQ

What is the difference between a public key and a wallet address?

A wallet address is a shorter, hashed representation of a public key. For example, Bitcoin addresses are derived by hashing the public key with SHA-256 and RIPEMD-160, adding a checksum, and encoding it in Base58. Addresses are more user-friendly, while the raw public key is used for signature verification.

Can a public key be used to derive a private key?

No, due to the one-way nature of elliptic curve cryptography. Given a public key, finding the private key is computationally infeasible, equivalent to solving the discrete logarithm problem. This security property is fundamental to all public-key cryptography.

Is it safe to share your public key?

Yes, public keys are designed to be shared freely. Revealing your public key allows others to send you encrypted messages or verify your signatures, but does not expose your private key. However, sharing the public key before using the corresponding address can reduce privacy because all transactions become linkable.

Related terms

Go deeper

Browse the complete crypto glossary to explore related terms and concepts.

Browse Glossary

Entities mentioned