Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
LABS
Glossary

Public Key

A public key is a cryptographic address, derived from a private key, that is openly shared to receive cryptocurrency and verify digital signatures on a blockchain network.
Chainscore © 2026
definition
CRYPTOGRAPHY

What is a Public Key?

A public key is a cryptographic code that allows a user to receive cryptocurrency transactions and verify digital signatures, functioning as a publicly shareable address.

A public key is a long alphanumeric string derived from a corresponding private key through a one-way cryptographic function. In blockchain networks, it serves as a publicly shareable address to which funds can be sent. The most critical property is that while the public key can be freely distributed, it is computationally infeasible to reverse-engineer the private key from it, ensuring the security of the associated assets. This forms the basis of asymmetric cryptography, also known as public-key cryptography.

In practice, a user's blockchain address, such as a Bitcoin or Ethereum address, is a hashed and encoded version of the public key. When someone sends cryptocurrency, they are directing it to this derived address. To spend those funds, the owner must prove ownership by creating a digital signature using their private key. The network can then use the public key to verify that the signature is valid without ever exposing the private secret. Common cryptographic algorithms used to generate key pairs include Elliptic Curve Cryptography (ECC), specifically the secp256k1 curve.

Beyond receiving assets, public keys are fundamental to various blockchain functions. They enable identity verification in decentralized systems, allowing users to prove they control an account. They are also essential for secure messaging, access control in smart contracts, and participation in consensus mechanisms like Proof-of-Stake, where a validator's public key identifies their stake. The public nature of these keys on transparent ledgers enables auditability while maintaining user pseudonymity.

It is crucial to distinguish a public key from a wallet address. The public key is the direct cryptographic output, while an address (e.g., 0x... or bc1...) is a shorter, more user-friendly representation created by applying hash functions like SHA-256 and RIPEMD-160 to the public key. This hashing adds an extra layer of security, protecting against future vulnerabilities in the elliptic curve cryptography itself, a concept known as quantum resistance through hashing.

how-it-works
CRYPTOGRAPHIC PRIMER

How a Public Key Works

A public key is the cornerstone of asymmetric cryptography, enabling secure digital interactions without shared secrets. This section details its technical operation, from key generation to its critical role in blockchain protocols.

A public key is the openly shareable half of an asymmetric cryptographic key pair, derived from a mathematically linked private key. Its primary function is to enable two core operations: encrypting data that only the corresponding private key can decrypt, and verifying digital signatures created by that private key. This one-way relationship—where operations with the public key can be reversed only by its paired private key—forms the basis for secure communication and identity verification in decentralized systems. In blockchain contexts, public keys are often cryptographically hashed to generate a user's public address, such as a Bitcoin or Ethereum wallet address.

The generation of a key pair begins with a cryptographic algorithm like Elliptic Curve Cryptography (ECC), commonly using the secp256k1 curve. A random, secret private key (a large integer) is selected. The public key is then computed by performing an elliptic curve point multiplication operation on a predefined generator point of the curve, using the private key as the scalar. This process is computationally straightforward, but the reverse—deriving the private key from the public key—is considered computationally infeasible, providing the system's security. The resulting public key is typically a coordinate point (x, y) on the elliptic curve.

In practice, a public key facilitates several critical blockchain functions. For transaction authorization, a user signs a transaction hash with their private key, producing a digital signature. Network nodes then use the sender's public key to verify the signature's validity, confirming the transaction originated from the legitimate key holder without exposing the secret key. For peer-to-peer encryption, a sender can encrypt a message using the recipient's public key, ensuring only the holder of the paired private key can read it. This mechanism is fundamental to secure messaging and certain smart contract interactions.

To enhance usability and reduce size, full public keys are rarely used directly on-chain. Instead, they undergo cryptographic hashing. For example, in Ethereum, the public key is processed through the Keccak-256 hash function, and the last 20 bytes of the output become the Ethereum address. This compressed representation, often encoded in formats like hexadecimal or Base58Check (in Bitcoin), is what users commonly share and see. Importantly, while a public key can be derived from a private key, the address cannot be reverse-engineered to reveal the public key until a transaction from it is broadcast, at which point the public key is revealed in the signature.

The security of the entire model rests on the computational hardness of the Elliptic Curve Discrete Logarithm Problem (ECDLP). While it is easy to calculate the public key from a private key, solving for the private key given the public key and the curve parameters requires an astronomical amount of computational effort with current technology. This asymmetry ensures that a user can freely distribute their public key as a point of trust and verification, while their private key remains the sole, unforgeable proof of ownership for their digital assets and identity.

key-features
CRYPTOGRAPHIC IDENTITY

Key Features of a Public Key

A public key is a cryptographic string derived from a private key, serving as a publicly shareable address or identity for receiving assets and verifying digital signatures.

01

Derived from a Private Key

A public key is mathematically generated from a private key using a one-way cryptographic function, such as the Elliptic Curve Digital Signature Algorithm (ECDSA). This ensures the public key can be safely shared, as it is computationally infeasible to reverse-engineer the private key from it. The relationship is foundational to asymmetric cryptography.

02

Used for Address Generation

In blockchain systems, a public key is cryptographically hashed (e.g., using Keccak-256 for Ethereum, SHA-256 and RIPEMD-160 for Bitcoin) to create a shorter, more manageable public address. This address is what users share to receive funds, providing a layer of abstraction and security from the raw public key.

03

Verifies Digital Signatures

The primary function of a public key is to verify digital signatures created by its corresponding private key. When a transaction is signed, anyone can use the signer's public key to mathematically confirm the signature's authenticity and that the message (transaction data) has not been altered, enabling non-repudiation.

04

Publicly Shareable & Non-Secret

Unlike a private key, a public key is designed to be publicly distributed without compromising security. It can be listed on websites, included in digital certificates, or shared in transactions. Its security relies entirely on the secrecy of the paired private key, a principle central to public-key infrastructure (PKI).

05

Format & Representation

A raw public key is a long alphanumeric string, often represented in hexadecimal or Base64 encoding. For example, an uncompressed ECDSA public key for Bitcoin is a 130-character hex string (65 bytes). In practice, wallets and applications use the derived addresses or compressed public key formats (33 bytes) for efficiency.

06

Foundational to Wallet Security

A public key enables the creation of a hierarchical deterministic (HD) wallet. From a single master seed, a tree of key pairs can be generated. While the public keys can generate all receiving addresses, the private keys remain securely offline. This allows for secure backup and management of multiple addresses.

from-key-to-address
CRYPTOGRAPHIC TRANSFORMATION

From Public Key to Blockchain Address

This section details the deterministic process of generating a human-readable blockchain address from a public key, a fundamental step in user interaction with distributed ledgers.

A public key is a cryptographic key, derived from a private key, that is publicly shared and used to verify digital signatures and encrypt data. In blockchain systems, it serves as the primary cryptographic identifier from which a receiving address is generated. This one-way derivation is critical: while the public key can be freely shared to receive funds, it is computationally infeasible to reverse the process to discover the private key. Common elliptic curve cryptography algorithms like secp256k1 (used by Bitcoin and Ethereum) define the mathematical relationship between the key pair.

The transformation from public key to address involves several cryptographic hash functions to compress and secure the data. For a Bitcoin address, the public key is first hashed using SHA-256, then RIPEMD-160, to create a 160-bit public key hash. This hash is then encoded with a version byte and checksum (using double SHA-256) before finally being converted into a Base58Check string, resulting in the familiar format like 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa. This process shortens the address, adds error detection, and obscures the public key until it is needed for spending.

Ethereum uses a simpler, but analogous, process. The address is derived by taking the last 20 bytes (160 bits) of the Keccak-256 hash of the public key. This hexadecimal string is typically prefixed with '0x', such as 0x742d35Cc6634C0532925a3b844Bc454e4438f44e. A crucial distinction is that Ethereum addresses are not re-encoded with a checksum in the core derivation, though checksums were later introduced via EIP-55 for user-facing representations to prevent mistyping errors.

This derivation chain—private key → public key → address—establishes the hierarchy of access and visibility. The address acts as a public receiving endpoint on the blockchain, analogous to an account number. The corresponding private key is the sole proof of ownership required to authorize transactions from that address. This separation allows users to publicly share their address for transactions while keeping the private key, and by extension the public key, secret until they choose to sign and broadcast a transaction.

Understanding this flow is essential for security and wallet interoperability. Different blockchain networks may use distinct hashing algorithms (e.g., SHA-3 variants, Blake2b) and encoding schemes (Bech32 for Bitcoin native SegWit addresses). However, the core principle remains: a deterministic, one-way cryptographic function transforms a public key into a condensed, user-friendly identifier that can be safely published on the immutable ledger without immediately compromising the underlying cryptographic keys.

CRYPTOGRAPHIC KEY PAIR

Public Key vs. Private Key

A comparison of the two mathematically linked keys that form the basis of asymmetric cryptography and digital ownership on blockchains.

FeaturePublic KeyPrivate Key

Definition

A cryptographic key that can be freely shared and is used to receive funds or verify signatures.

A secret cryptographic key that must be kept secure and is used to spend funds or create digital signatures.

Derivation

Mathematically generated from the private key via elliptic curve multiplication.

Generated as a large, random number; serves as the root secret.

Visibility

Publicly visible on the blockchain (e.g., in transaction outputs).

Never revealed on-chain; stored securely in a wallet.

Primary Function

Address generation and signature verification.

Digital signature creation and transaction authorization.

Analogy

A public mailbox address (anyone can send mail to it).

The physical key to the mailbox (only the owner can open it).

Security Posture

Designed to be shared; no security risk from exposure.

Must be kept secret; compromise leads to total loss of controlled assets.

Loss Consequence

No direct loss of funds; can still receive transactions.

Permanent loss of access to all associated funds and identities.

Format Example

04x-coordinate...y-coordinate... (uncompressed), or 02/03x-coordinate... (compressed)

64 hexadecimal characters (256-bit number), often represented as a seed phrase.

ecosystem-usage
CRYPTOGRAPHIC IDENTITY

Ecosystem Usage & Standards

A public key is a cryptographic address derived from a private key, serving as a publicly shareable identifier for receiving assets and verifying digital signatures across blockchain networks.

01

Digital Signature Verification

The primary function of a public key is to verify digital signatures created by its corresponding private key. This is the core mechanism for proving ownership and authorizing transactions without revealing the secret key. For example, when you sign an Ethereum transaction with your private key, network nodes use your public key to cryptographically confirm the signature's validity.

02

Address Derivation (Hashing)

A blockchain address is not the public key itself but a hashed and encoded version of it. This process enhances security and shortens the identifier.

  • Bitcoin: A public key is hashed (SHA-256, then RIPEMD-160) and encoded with a version byte and checksum to create a Base58Check address (e.g., 1A1zP1...).
  • Ethereum: The public key is hashed with Keccak-256, and the last 20 bytes of the hash become the standard hex address (e.g., 0x742d35...).
03

Public Key Cryptography Standards

Blockchains rely on established cryptographic standards to generate key pairs.

  • Elliptic Curve Cryptography (ECC): The most common foundation, using specific curves like secp256k1 (Bitcoin, Ethereum) or Ed25519 (Solana, Near).
  • RSA: Rarely used in modern blockchains due to larger key sizes and slower performance compared to ECC. These standards ensure the mathematical one-way relationship between the private and public key is secure.
04

Account Model vs. UTXO Model

The role of a public key differs between two major blockchain accounting models:

  • Account Model (Ethereum, Solana): The public key (or its derived address) is the account identifier. State (balances, smart contract code) is stored directly against this address.
  • UTXO Model (Bitcoin, Cardano): The public key controls unspent transaction outputs (UTXOs). Ownership is proven by signing with the private key to unlock a UTXO, but the public key itself is not a persistent account.
05

Hierarchical Deterministic (HD) Wallets

HD Wallets (defined by BIP-32) generate a tree of key pairs from a single master seed. A public extended public key (xpub) can derive a sequence of child public keys without access to the private keys. This allows for:

  • Generating unlimited receive addresses securely.
  • Enabling watch-only wallets that can track balances but not spend.
  • Structuring keys for organizational use (e.g., different departments).
06

Multi-Signature & Smart Contract Wallets

Public keys are fundamental components in advanced wallet structures:

  • Multi-Signature (Multisig): A wallet address is controlled by multiple public keys (e.g., 2-of-3). Transactions require signatures from a defined threshold of the corresponding private keys.
  • Smart Contract Wallets (Ethereum): Addresses like those created by Safe (formerly Gnosis Safe) are smart contracts that hold assets. The contract's logic defines which public keys are authorized signers, enabling complex governance and recovery schemes.
security-considerations
PUBLIC KEY

Security Considerations

While a public key is designed to be shared, its security is intrinsically linked to the protection of its corresponding private key. These cards detail the core cryptographic principles and practical risks associated with public key usage in blockchain systems.

01

The One-Way Function

The security of a public key rests on cryptographic one-way functions, such as Elliptic Curve Cryptography (ECC). These functions make it computationally infeasible to:

  • Derive the private key from its public counterpart.
  • Forge a valid digital signature without possessing the private key. This mathematical asymmetry is the foundation for secure authentication and transaction signing.
02

Address Derivation & Collision Resistance

A blockchain address (e.g., 0x...) is a hashed representation of the public key. This process adds a critical security layer:

  • Hash functions like Keccak-256 are used, which are collision-resistant (extremely unlikely two keys produce the same address).
  • It provides a shorter, more user-friendly identifier while hiding the full public key until a transaction is made, offering a minor privacy benefit.
03

Key Management is Paramount

The public key itself is not a secret, but its security is entirely dependent on private key custody. Critical risks include:

  • Loss: If the private key is lost, access to all associated assets is permanently irrecoverable.
  • Theft: Compromise of the private key grants an attacker full control.
  • This necessitates secure storage solutions like hardware wallets or institutional custody services.
04

Quantum Computing Threat

Future quantum computers, leveraging Shor's algorithm, pose a theoretical threat to current public-key cryptography (e.g., ECC, RSA). They could potentially:

  • Compute a private key from its public key, breaking the one-way function.
  • The blockchain industry is researching post-quantum cryptography (PQC) to develop algorithms resistant to such attacks.
05

Address Poisoning & Phishing

Attackers exploit the human element by creating addresses (vanity addresses) that look similar to a victim's. This enables:

  • Address Poisoning: Sending $0-value transactions to a victim's history, hoping they copy the fake address for future payments.
  • Phishing: Displaying a deceptive address on a fake website or interface. Users must always verify the full address, not just the first/last few characters.
06

Protocol-Level Key Exposure

Certain blockchain protocols or smart contract interactions can inadvertently expose public keys, increasing privacy risks:

  • In Bitcoin, the full public key is revealed when spending from a Pay-to-Public-Key-Hash (P2PKH) address.
  • This can enable address clustering, linking multiple transactions to a single entity. Protocols like Taproot (Schnorr signatures) help mitigate this by making all signatures look identical.
PUBLIC KEYS

Common Misconceptions

Clarifying widespread misunderstandings about public keys, their relationship to addresses, and their role in blockchain security.

No, a public key is not the same as a wallet address; the address is a derived, shorter representation of the public key. A public key is a long alphanumeric string (e.g., 64 bytes for an Ethereum secp256k1 key) generated from a private key. The wallet address is created by applying a cryptographic hash function (like Keccak-256 for Ethereum) to the public key and then taking the last 20 bytes. This process is one-way, meaning you can derive an address from a public key, but you cannot derive the public key from the address alone. This distinction is crucial for privacy and security.

PUBLIC KEY CRYPTOGRAPHY

Frequently Asked Questions

Public keys are a fundamental component of blockchain identity and security. These questions address their core functions, generation, and practical use in Web3.

A public key is a cryptographic string, derived from a private key, that serves as a publicly shareable address or identity on a blockchain network. It functions as your account's receiving address, similar to an email address or bank account number, allowing others to send you cryptocurrency or verify your digital signatures. The public key is generated through a one-way mathematical function from the private key, ensuring that while the public key can be freely shared, it is computationally infeasible to reverse-engineer the private key from it. This asymmetric relationship is the foundation of blockchain security and user sovereignty.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected direct pipeline
Public Key: Definition & Role in Blockchain Security | ChainScore Glossary