Skip to content

Public and Private Keys in Cryptocurrency: How They Work

Learn how cryptocurrency key pairs, signatures, addresses and recovery phrases work—and how to protect them without confusing passwords, seeds and private keys.

Public and private keys in cryptocurrency are the cryptographic credentials that let a wallet receive assets and authorize transactions. They are closely related, but they do different jobs: a private key creates digital signatures, while a public key lets software verify those signatures.

The most important correction to a common analogy is that cryptocurrency payments are not normally encrypted with the recipient’s public key and decrypted with the recipient’s private key. Public blockchains record transaction data openly. The private key is used to prove authorization without revealing the secret itself.

This guide explains how key pairs, addresses, signatures, wallets and recovery phrases fit together, then shows how to manage them safely. The details vary by network, but the security principles are broadly useful.

Public and private keys in cryptocurrency at a glance

ItemPurposeCan it be shared?
Private keyCreates signatures that authorize actions for a particular key pairNo
Public keyAllows signatures from the corresponding private key to be verifiedGenerally yes
AddressIdentifies a destination or spending condition in a network-specific formatYes, with privacy considerations
Recovery phraseRepresents the secret material used by many wallets to regenerate many keysNo
Wallet password or PINProtects access to a particular device or encrypted wallet fileNo; it is not normally a blockchain key

What is a private key?

A private key is a secret number selected from the valid range defined by a cryptographic system. Bitcoin and Ethereum both use the secp256k1 elliptic curve for their familiar account and transaction signatures, although their transaction models and address construction differ.

Wallet software generates keys using a cryptographically secure source of randomness. Security depends on that process: a long key generated with weak or predictable randomness can be unsafe even if the underlying algorithm is strong.

The private key does not contain coins, and a wallet does not pull coins out of the blockchain. Instead, the network maintains records—such as Bitcoin unspent transaction outputs or Ethereum account balances—and accepts properly authorized state changes. Control of the appropriate signing key is what allows a user to spend or interact.

Anyone who obtains a usable private key can usually sign transactions as its controller. A blockchain cannot distinguish the legitimate owner from a thief who has copied the secret. That is why no support agent, wallet vendor, exchange employee or giveaway organizer should ever request it.

What is a public key?

A public key is mathematically derived from a private key. The derivation is practical in one direction; calculating the private key from a correctly generated public key is intended to be computationally infeasible with current methods and parameters.

Network software uses the public key to verify that a digital signature matches the transaction data and the expected key. Verification does not reveal the private key. If the signed transaction data is altered, the signature no longer validates for that data.

A public key is not always the string a user shares to receive funds. Wallets normally display an address derived from a public key, a public-key hash, a script or another account rule. Some addresses represent smart contracts rather than a person-controlled key pair. Our separate guide explains how crypto addresses work.

How digital signatures authorize transactions

Consider a simplified payment from Alice to Bob. Bob provides a compatible receiving address. Alice’s wallet constructs a transaction that identifies the destination, amount and network-specific data. Her wallet then uses her private key to sign the relevant transaction message.

  1. The wallet builds an unsigned transaction.
  2. The signing device shows or receives the transaction details.
  3. The private key creates a signature over the defined transaction data.
  4. The signed transaction is broadcast to the network.
  5. Nodes independently check the signature and the network’s other validity rules.
  6. Miners or validators may include the valid transaction according to the protocol and fee market.

Bob does not decrypt the payment. On Bitcoin, the new output is locked by a script, and a later spend must satisfy that script. On Ethereum, a signed transaction from an externally owned account changes the ledger after execution. The network verifies authorization; it does not send a secret file to the recipient.

Transaction fees are separate from key ownership. A correct signature can still accompany a transaction that is delayed, rejected for insufficient fees or reverted during smart-contract execution. See our explanation of blockchain gas fees for those mechanics.

Bitcoin and Ethereum use keys differently

TopicBitcoinEthereum
Ledger modelTracks unspent transaction outputsTracks account state
AuthorizationInputs satisfy the scripts that locked previous outputsExternally owned accounts sign transactions; contracts execute code
Typical address meaningEncodes a destination or spending condition, such as a witness programAn externally owned account or contract address
Address reuseWallets commonly generate a fresh receiving address for privacyAccounts are commonly reused, making activity easy to correlate
Contract controlScript conditions can require multiple signatures or other rulesContract accounts are controlled by code, not a contract private key

This is why statements such as “one private key unlocks every blockchain address” are wrong. A key is meaningful within specific software, algorithms and derivation paths. Wallets also need the correct network and account structure to find assets.

Recovery phrases and HD wallets

Most modern wallets do not ask users to manage a separate raw private key for every address. Hierarchical deterministic wallets derive a tree of keys from a root seed. Bitcoin Improvement Proposal 32 standardized a widely used approach to hierarchical derivation.

A recovery phrase—often 12 or 24 words—is a human-readable representation used to generate wallet seed material under a scheme such as BIP39. The phrase is not merely a login password. In a compatible wallet, it may recreate every derived private key and address. Anyone who copies it may gain the same spending authority.

  • Private key: normally controls one key pair.
  • Seed or recovery phrase: can regenerate an entire deterministic wallet.
  • Wallet PIN: unlocks a particular app or hardware device but usually cannot restore the wallet elsewhere.
  • Optional passphrase: may create a different wallet from the same mnemonic; losing it can make recovery impossible.

Recovery is also affected by derivation paths, wallet standards and network support. Test the documented recovery procedure with care before depositing a meaningful amount. Never type a hardware-wallet phrase into a website or untrusted app.

Custody changes who controls the keys

In self-custody, the user or a user-controlled signing arrangement holds the keys. With a custodial exchange or service, the provider usually controls the on-chain keys and records the customer’s balance internally. A password reset at an exchange is possible because the exchange remains the custodian; it does not recover a self-custody private key.

Hot versus cold describes whether signing keys are exposed to an internet-connected environment. It does not, by itself, describe custody or quality. A poorly backed-up hardware wallet can fail operationally, while a well-secured software wallet may be appropriate for a small spending balance. Compare the models in our hot and cold crypto wallet guide.

Multisignature and smart accounts

Not every wallet relies on one signature. A multisignature policy can require a threshold, such as two signatures from three approved keys. This can reduce the risk that one lost or compromised key causes immediate loss, but it adds setup, backup and coordination requirements.

Smart-contract wallets can implement spending limits, guardians, delayed recovery or batched actions. Their security depends on both key management and contract code. Interacting with decentralized finance applications may also require token approvals; a valid signature can authorize a harmful approval if the user does not understand the request.

Practical key-management checklist

  • Generate wallets with reputable, current software or authentic hardware.
  • Write down recovery material accurately and store it offline in a physically secure location.
  • Do not photograph, email, cloud-sync or paste a recovery phrase into a website.
  • Maintain a separate backup protected against fire, water, theft and accidental disposal.
  • Verify addresses on the signing device, not only on a potentially compromised computer screen.
  • Keep wallet firmware, apps and operating systems updated from official sources.
  • Use a small test transaction when a destination, network or workflow is unfamiliar.
  • Create an inheritance or emergency-access plan that does not expose the secret prematurely.

Threats the mathematics does not prevent

Strong cryptography does not protect a user who approves the wrong transaction, downloads malicious wallet software or reveals a recovery phrase. Most real losses exploit people, devices or operational mistakes rather than solving the underlying elliptic-curve problem.

  • Phishing: a fake site or support account requests secret recovery data.
  • Clipboard malware: copied destination addresses are replaced before signing.
  • Malicious approvals: a signed contract permission allows an attacker to transfer tokens later.
  • Weak randomness: predictable key generation makes otherwise valid keys discoverable.
  • Physical loss: both the signing device and every usable backup are destroyed or forgotten.
  • Supply-chain tampering: a device arrives altered or with a recovery phrase already prepared by someone else.

Backups should be both private and recoverable

A backup strategy fails if an attacker can read it, but it also fails if the owner cannot find, interpret or restore it. Store the wallet name, network context and recovery instructions separately from day-to-day devices without exposing the secret to unnecessary people. Avoid homemade encryption schemes that depend on memory alone.

Periodically confirm that physical backups remain legible and that trusted heirs or business successors can locate the instructions under the intended conditions. A recovery test should use safe, compatible software and should never require entering the phrase into an unknown website. When moving to a new wallet after suspected exposure, create new keys and transfer assets; changing an app password does not change an already compromised blockchain key.

Frequently asked questions

Is a wallet address the same as a public key?

No. An address is a network-specific identifier derived from or related to a public key, script or account rule. Some contract addresses have no corresponding private key.

Can someone steal funds with only a public key?

Correctly generated keys are designed so that publishing a public key does not reveal the private key. Losses are more likely to arise from exposed secrets, weak key generation, malicious signing requests or compromised devices.

Can a lost hardware wallet be replaced?

Usually, yes, if the owner still has the correct recovery material and any required passphrase. The device stores or protects keys; it is not necessarily the only copy. A thief may still try to unlock the lost device, so moving funds can be prudent.

Should a recovery phrase be shared with support?

No. Legitimate support can explain software but does not need the phrase, seed or private key. A request for one is a critical warning sign.

Conclusion

Public and private keys make decentralized authorization possible: the private key signs, the public key verifies, and an address gives users a network-appropriate destination. Safe ownership depends less on memorizing cryptographic mathematics than on generating secrets correctly, signing only understood transactions and maintaining recoverable, protected backups.

For protocol-level detail, consult the Bitcoin transaction guide and Ethereum account documentation.

Comments

Leave a Reply