Finished reading?

Mark it as read & it’s ticked off across Cryptopedia, including the Crypto Tax & Regulations learning path.

Chris Shepley
Reviewed byChris Shepley

Founder & CEO of Shepley Capital, Adelaide. Cryptopedia guides are written by the Shepley Capital team & reviewed by Chris.

About Chris
Go deeper

Guides linked in this article.

guides across Cryptopedia, coloured by category.

Fresh from the category

Latest in Crypto Tax & Regulations.

Premium intelligence

Stay ahead of the digital asset economy.

Access deeper market intelligence, research, and premium guidance through the Shepley Capital membership ecosystem. Built for investors who want more than information.

WALLETS & SECURITY
Wallets and Security - Cryptopedia by Shepley Capital

Private Keys and Public Keys Explained

A private key is a secret random number that lets you spend crypto; a public key is calculated from it using one-way maths, and a wallet address is derived from the public key. You can share an address freely, but anyone who learns your private key, or the seed phrase that generates it, can take your funds, and nobody can reset or recover it for you. Wallets hide the keys behind a seed phrase and sign transactions for you, ideally on a hardware wallet. The key points:

  • Private key: secret, controls spending, never share it.
  • Public key and address: safe to share, used to receive funds and check signatures.
  • A seed phrase can regenerate every private key in a wallet.
  • Lose the keys and the seed phrase, and the funds are gone permanently.

Moneysmart’s guide to crypto assets explains why control of your keys matters, and the BIP39 specification shows how seed phrases turn into keys.

Private keys and public keys are the cryptographic foundation of all cryptocurrency. Every Bitcoin wallet, every Ethereum address, every crypto transaction in existence depends on the mathematics of public-key cryptography to function. Understanding how these keys work, even at a conceptual level, transforms your understanding of why crypto security matters and what it actually means to “own” cryptocurrency.

The beautiful simplicity at the heart of the system: a private key is a randomly generated large number. From that number, a corresponding public key is derived using one-way mathematics (easy to compute in one direction, computationally infeasible to reverse). The public key generates a wallet address that anyone can see and send crypto to. The private key is required to sign transactions spending from that address. No institution verifies this: the mathematics enforces it universally and permissionlessly.

This guide explains private and public keys conceptually (no advanced mathematics required), how they generate wallet addresses, how seed phrases relate to private keys, what happens when you sign a transaction, and what it truly means that “not your keys, not your crypto.”

 

Public-Key Cryptography: The Foundation

Public-key cryptography (also called asymmetric cryptography) is a mathematical system where two related keys are generated together: a private key and a public key. The relationship between them has a critical one-way property: you can derive the public key from the private key, but you cannot derive the private key from the public key. This asymmetry is the security foundation.

This is analogous to a padlock: the padlock (public key) can be shared publicly and anyone can use it to lock a box. Only the key (private key) can unlock the box. But the analogy undersells the security: with real padlocks, a determined person can pick the lock or make a copy from the lock itself. With public-key cryptography, deriving the private key from the public key would require solving a mathematical problem that would take billions of years on all computers in existence running simultaneously.

Bitcoin uses Elliptic Curve Digital Signature Algorithm (ECDSA) on the secp256k1 curve for its cryptography. Ethereum also uses ECDSA on secp256k1. The private key is a 256-bit number (a number with 77 decimal digits), and the public key is a point on the elliptic curve generated by multiplying the private key by a defined base point. The security comes from the Elliptic Curve Discrete Logarithm Problem: given the curve point (public key) and the base point, finding the multiplier (private key) is computationally infeasible.

 

What a Private Key Is

A private key is a randomly generated 256-bit number: effectively any number from 1 to approximately 1.16 times 10 to the power of 77. The number of possible private keys is so large it exceeds the number of atoms in the observable universe. A wallet application generates this number using a cryptographically secure random number generator: the randomness quality is important because a predictable or poorly seeded private key is a security vulnerability.

Private keys are typically represented in a human-readable format:

Raw hexadecimal: A 64-character hex string like “E9873D79C6D87DC0FB6A5778633389F4453213303DA61F20BD67FC233AA33262”. This is the raw private key in hexadecimal notation.

Wallet Import Format (WIF): A compressed representation starting with “5” (uncompressed) or “K” or “L” (compressed) used by Bitcoin wallets. WIF encoding adds a checksum that catches transcription errors.

The private key must be kept secret, stored securely, and used only for signing transactions. Exposing a private key to any party or any internet-connected system compromises that key permanently: anyone with the private key can spend all funds associated with it. This is not recoverable: crypto transactions are irreversible.

 

From Private Key to Public Key

The public key is mathematically derived from the private key using elliptic curve multiplication. The computation is deterministic: the same private key always produces the same public key. The public key is a point on the secp256k1 elliptic curve, represented as two 256-bit numbers (x and y coordinates), or in compressed form as a 33-byte value (one coordinate plus a sign bit).

The public key serves two purposes: it is a cryptographic commitment to the private key (proving ownership without revealing the key), and it is the basis for the wallet address. The public key can be shared freely: knowing your public key does not help an attacker compute your private key.

 

From Public Key to Wallet Address

A wallet address is derived from the public key, and the method depends on the address type. A legacy Bitcoin address starting with “1” (P2PKH) is made by hashing the public key with SHA-256 and then RIPEMD-160 and encoding the result with Base58Check, which adds a checksum. Addresses starting with “3” (P2SH) are a hash of a script rather than of a single key. Native SegWit addresses starting with “bc1q” encode a witness program using Bech32, and Taproot addresses starting with “bc1p” use Bech32m and contain a tweaked public key directly rather than a hash of it.

For Ethereum: the public key (uncompressed, 64 bytes) is hashed with Keccak-256, and the last 20 bytes of the hash become the address, prefixed with “0x”. Ethereum addresses look like “0x742d35Cc6634C0532925a3b8D4C9C3E1e5F6c2e9.”

The address hashing step provides an additional security layer: even if the elliptic curve problem were somehow weakened, revealing the public key, the address does not directly expose the public key (it is a hash of it). For most wallet types, the public key is only revealed when a transaction is signed and broadcast, not from the address alone.

This chain, from private key to public key to address, is entirely deterministic. There is no registration, no central authority and no database entry. Creating an address is just mathematics: generate a random number and perform a defined sequence of operations, which is why anyone can create a wallet instantly, without permission, anywhere in the world.

 

How Seed Phrases Relate to Private Keys

Modern wallets do not directly use raw private keys as the primary user interface. Instead, they use hierarchical deterministic (HD) wallets defined by BIP-32 and BIP-44 standards, with a seed phrase (BIP-39) as the human-readable master backup.

The relationship: a 12 or 24-word seed phrase encodes a 128 or 256-bit master seed. From this master seed, a master private key is derived using a defined key derivation function. From the master private key, an unlimited number of child private keys are derived deterministically using BIP-32 derivation paths (like m/44’/0’/0’/0/0 for the first Bitcoin account’s first address). Each child private key has its own public key and address.

This hierarchy means one seed phrase backs up every account, address, and private key the wallet has ever generated. This is the power of HD wallets: rather than backing up each individual private key separately (which would be unmanageable across many addresses), the single seed phrase recovers the entire wallet tree. A seed phrase of 24 words is the compact, human-readable representation of a master cryptographic key that controls potentially millions of derived addresses.

Critically, the seed phrase is as sensitive as every private key it generates combined. Anyone with it can derive all the private keys in the wallet and spend all the funds, so the seed phrase storage guide and advanced storage techniques matter as much as any technical detail.

 

Digital Signatures: How Transactions Are Authorised

When you send cryptocurrency, you are creating a digital signature that proves you authorise the transaction without revealing your private key. This is the cryptographic core of how blockchain transactions work.

The signing process: You compose a transaction specifying inputs (which funds to spend), outputs (recipient addresses and amounts), and a fee. Your wallet takes this transaction data and uses your private key to compute a digital signature using ECDSA. The signature is a mathematical value that proves the transaction was created by someone who knows the private key for the spending address, without revealing the private key itself.

Verification: the signed transaction is broadcast to the network. Every node checks the signature against the public key, which is included with the transaction when coins are spent (or, on Ethereum, recovered from the signature itself), and confirms that it matches the address being spent from. If the signature is valid, the transaction can be included in a block; if not, it is rejected. No central authority is involved: every node performs the check independently.

This architecture is why hardware wallets provide security: the signing operation happens inside the secure element chip, where the private key lives. The private key computes the signature internally and outputs only the signature (not the key) to the connected computer. A compromised computer cannot steal the key because the key never passes through it, only the signature output.

 

Why Transactions Are Irreversible

Blockchain transactions are irreversible because there is no mechanism to undo a valid signed transaction. Once confirmed in a block, it is part of the chain’s history, and changing it would require redoing the consensus work for that block and every block after it, which is infeasible on an established network.

This irreversibility prevents double-spending and enables settlement without a middleman. It also means that sending to the wrong address, paying a scammer or any other mistake is permanent: there is no bank to call and no dispute process, and recovery depends on the recipient choosing to return the funds. Knowing what to do if you send crypto to the wrong address helps in the rare cases where something can be done.

 

Address Reuse and Privacy

For older, hash-based address types such as P2PKH and P2WPKH, the public key only appears on-chain once you spend from the address, so using each address only once keeps it hidden until then. Taproot addresses are different: they contain a tweaked public key from the start. Neither case compromises security today, because the elliptic curve problem remains infeasible to reverse, but avoiding address reuse improves privacy and keeps a buffer against future advances such as quantum computing.

HD wallets automatically generate new addresses for each receive transaction, making address reuse unnecessary. Most modern wallets (hardware and software) implement this by default. For privacy reasons related to the blockchain transparency of Bitcoin, using fresh receive addresses for each transaction also prevents transaction history linkability: if you reuse an address, all transactions to and from that address are publicly linked.

Ethereum addresses are commonly reused because Ethereum’s account model (unlike Bitcoin’s UTXO model) typically involves one address per account. The public key is revealed on the first transaction and remains associated with the account permanently. This is accepted as a design tradeoff in Ethereum’s model.

 

Key Management in Practice

For most crypto users, direct interaction with raw private keys is rare. Hardware wallets manage keys inside the secure element. Software wallets manage keys in encrypted storage. The user interacts through the wallet interface without ever seeing the actual private key numbers.

The seed phrase is the practical, everyday form of key custody: securing the seed phrase is securing the keys, and good wallet backup habits are how private key security works in real life.

One common scenario where direct private key handling occurs: importing a paper wallet or moving from one wallet application to another using a private key rather than a seed phrase. When importing a private key, it is being entered into the new wallet software, which means it is touching the internet-connected device. This is the correct approach for migration (the key was already on that device conceptually), but importing a key from cold storage to a hot wallet means that key is now in a hot wallet context and should be treated accordingly.

 

What Happens When You Lose Your Private Key

Losing a private key (or a seed phrase, which generates private keys) means permanent loss of access to all funds associated with those keys. There is no password reset, no account recovery, no customer service escalation. The cryptography has no backdoor and no master key held by any company. The funds remain on the blockchain forever, associated with an address that can receive but never spend.

This is the most significant cause of permanent loss in crypto. Common ways keys are lost include losing the seed phrase, destroying it in a fire or flood, and forgetting the password to an encrypted backup, while theft through scams is covered by advice on attempts to recover stolen crypto. Analytics firms estimate that a significant share of all bitcoin ever mined is already permanently inaccessible because of lost keys.

The solution is good backup practice: a verified seed phrase stored on durable physical media in more than one location, combined with a hardware wallet that keeps the keys off your everyday devices.

 

Putting Key Knowledge Into Practice

Understanding keys makes everyday security decisions clearer. BIP39 seed phrases and the process to import a wallet from a seed phrase show how one backup restores many keys, and knowing how wallet addresses work helps you verify addresses before sending. Because signing is what moves funds, learn how token approvals and wallet drainers work, and how to spot a phishing website that asks you to sign.

For storage, a proper cold storage setup, an air-gapped wallet or a multisig vault each change where keys live and who must approve a transaction. Old paper wallets often hold a single raw private key, so sweep them into a modern wallet rather than importing them, and keep a crypto inheritance plan so your keys are not lost with you. Advances in quantum computing are a long-term reason why address habits and protocol upgrades matter.

Keys also sit behind the everyday tools you use. MetaMask and hot wallets keep encrypted keys on your device, a Ledger or Coldcard keeps them in a dedicated chip, and a Safe multisig spreads control across several keys. Explorers such as Etherscan show every signed transaction publicly, which is why protecting the signing key, rather than hiding the address, is what keeps funds safe.

Key Takeaways

Private keys are randomly generated 256-bit numbers that prove ownership and authorise transactions. Public keys are derived from them using one-way elliptic curve maths, and addresses are derived from public keys. Seed phrases encode a master seed that generates every private key in a wallet, and digital signatures prove you authorised a transaction without revealing the key.

Losing a private key or seed phrase means permanent loss. Hardware wallets keep keys in a secure chip so signing never exposes them to internet-connected computers, while software wallets keep keys on more exposed devices. The value of self-custody comes from holding and securing your own keys, and all transactions remain subject to Australian crypto tax rules.

Frequently Asked Questions

What is a private key in cryptocurrency?

A private key is a unique cryptographic string that proves ownership of a crypto wallet and authorises outgoing transactions. It functions like a password, but unlike a password it cannot be changed or reset. Anyone who possesses your private key has full control over your funds, so it must be kept completely secret.

What is a public key in cryptocurrency?

A public key is derived from your private key through a one-way mathematical function. It is used to generate your wallet address, which you share with others to receive funds. Knowing someone's public key does not give you access to their wallet, which is what makes the system secure.

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

A wallet address is derived from your public key, usually by hashing and encoding it into a shorter, more readable form with error checking. Some newer address types, such as Bitcoin Taproot, contain a modified public key directly. Either way, the address is what you share to receive funds, and neither it nor the public key lets anyone spend.

Can someone hack my wallet if they have my public key?

No. The public key is designed to be shared publicly. The cryptographic relationship between public and private keys is one-way, meaning it is computationally infeasible to reverse-engineer a private key from a public key using current technology. Your funds are safe as long as your private key remains secret.

How is a private key different from a seed phrase?

A seed phrase (also called a recovery phrase) is a human-readable backup that generates your private keys. One seed phrase can produce many private keys, one for each address in your wallet. The seed phrase is what you write down to back up your wallet, while private keys are the underlying cryptographic data derived from it.

What happens if I lose my private key?

If you lose your private key and have no seed phrase backup, you permanently lose access to any funds held in that wallet address. There is no recovery mechanism on a decentralised blockchain. This is why backing up your seed phrase securely is one of the most important steps when setting up any crypto wallet.

How are private and public keys used in a crypto transaction?

When you send crypto, your wallet uses your private key to create a digital signature that authorises the transaction. The network verifies this signature using your public key to confirm you are the legitimate owner without ever exposing your private key. This process is called asymmetric cryptography.

Should I ever share my private key?

Never. There is no legitimate reason for any exchange, wallet provider, support team, or individual to ask for your private key. Sharing it gives that person complete control over your funds. Treat your private key with the same secrecy as a PIN for a bank account that holds everything you own.

WRITTEN & REVIEWED BY Chris Shepley

UPDATED: JULY 2026

Choose your next topic from our Cryptopedia​

Footer | Shepley Capital

Grow your crypto portfolio with the latest insights, straight to your inbox!

Join 10,150+ CEOs, Business Owners, Parents, Students, & more receiving actionable crypto insights to grow their portfolios.