Note (September 2026): An earlier version of this article implied that the private key is transmitted to other people and tied key cryptography to mining. A private key should never be shared (only a bitcoin address is), and key generation has nothing to do with mining.
A Bitcoin private key is a secret 256-bit number, usually written as 64 hexadecimal characters, that lets its holder sign transactions and spend the bitcoin held at the matching addresses. The public key is derived from it with elliptic curve math on the secp256k1 curve, and addresses come from the public key. Whoever controls the private key controls the coins.
Key Takeaways
- A Bitcoin private key is a random 256-bit number; in raw form it is 64 hexadecimal characters, and in Wallet Import Format it is 51 or 52 characters.
- The public key is calculated from the private key on the secp256k1 elliptic curve; reversing that calculation is computationally infeasible.
- A bitcoin address (starting with 1, 3, bc1q or bc1p) is what you share to get paid. The private key and seed phrase are never shared.
- A BIP 39 seed phrase of 12 to 24 words can regenerate every key in a modern wallet, so it needs the same protection as the keys.
- Losing the private key and its backup means losing the bitcoin. Bitcoin’s protocol accepts no other proof of ownership.
The public and private keys are the essential elements of bitcoin transactions. Consider the public key to be a bank account number and the private key to be a secret PIN or check signature that gives you authority over the account. Users of bitcoin gain exposure to these cryptographic keys.
The bitcoin wallet software is vital because it maintains the cryptographic keys and their security. Owners will use virtual keys, bitcoin addresses, and digital signatures to establish ownership of bitcoin. The digital keys are produced and held by the user’s files or wallet rather than the network.

Creating keys does not require the Bitcoin network: a private key is simply a random number, so wallet software can generate one without contacting the blockchain. The user’s wallet software can produce and store keys without using the blockchain or an Internet connection. This is how offline (cold) wallets work, although broadcasting a signed transaction still needs a connection to the network.
What is a private key?
- The private key is the foundation of the user’s ownership over all monies connected with the matching bitcoin address. The private key gets used to produce signatures that prove ownership of funds utilized in a transaction, which is necessary to spend bitcoins.
- The private key needs to be kept hidden at all times because exposing it can lead to hacking and scamming. The private key must also be backed up and safeguarded from loss since if it is lost, it cannot be retrieved, and the cash it secures is likewise gone forever.
So, can two identical private keys exist in bitcoin?
Saving and transferring bitcoins takes more security awareness than a typical email or Facebook user. Two-factor authentication (2FA) is essential for exchange and online wallet accounts, but it does not protect a private key itself: anyone who obtains the private key or the seed phrase can move the funds without a second factor.
The wallet must store the private key, which in raw form is 64 hexadecimal characters. The private key itself is never sent to anyone. To receive bitcoin, a user shares a bitcoin address derived from the public key, copies and pastes it exactly, and checks the first and last characters before payment so the money reaches the right wallet. The site originally cited here, bitcoin-x.net did not load when this article was updated in September 2026. The Bitcoin wiki and the Bitcoin Improvement Proposals (BIPs) remain the standard references on keys and addresses.
A private key is a randomly chosen number, and its 64 hexadecimal characters use only 0-9 and A-F. According to the Bitcoin wiki, any 256-bit number from 1 up to just below the secp256k1 curve order is valid, which gives roughly 1.158 × 10⁷⁷ possible keys. With a sound random number generator, the chance that two wallets produce the same key is negligible; real-world losses come from weak randomness, theft and lost backups.
State the differences between the two keys
- The public key is calculated from the private key by elliptic curve multiplication on the secp256k1 curve. This has nothing to do with mining, which is a separate process. This function is practically one-way: easy to compute from the private key to the public key, but computationally infeasible to reverse, so publishing a public key does not reveal the private key. Cryptography makes it easy to produce digital secrets and signatures. Bitcoin’s public-key cryptography gets driven by elliptic curve multiplication.
- The mathematical equation allows the private key to produce signatures on messages. Without exposing the secret key, the public key may validate this signature.
- Public keys and digital signatures are different from private keys. They are used whenever bitcoins are spent, not only when trading. Everyone in the bitcoin network may verify and approve the transaction as legitimate by presenting the public key and signature, proving that the person sending the bitcoins held them at the transfer time.
Bitcoin addresses explained in brief
The bitcoin address gets used as the “recipient” of funds in a transaction. The bitcoin address is the beneficiary to which the payment happens. Loosely, it plays the role of the payee line on a check, which reads “ Pay to the order.”
Unlike a check, a bitcoin address carries no name. It can belong to an individual, an exchange or any other institution, and the network does not verify who controls it. Losing a private key with no backup locks the funds permanently, while exposing it lets a thief spend them. Either way, the owner can lose everything held at the matching addresses. Stolen bitcoins are very hard to get back because, as the US Federal Trade Commission notes, cryptocurrency payments typically are not reversible.
Conclusion
Private keys are, therefore, the essential part of owning bitcoin: whoever controls the key controls the coins. Keep them private, backed up and preferably offline. Bitcoin’s price is volatile and its rules differ by country, so research the risks and your local regulations before buying any. This article explains how keys work and is not investment advice.
How Do Private Keys, Public Keys and Addresses Fit Together?
A Bitcoin wallet builds everything from one secret number. Each step can be computed forward, but none can be reversed in practice.
- Private key: the wallet picks a random 256-bit number. The Bitcoin wiki notes that 256 bits equal 32 bytes, or 64 characters in the range 0-9 and A-F. (The hex to decimal converter shows how such hexadecimal digits map to ordinary numbers.)
- Public key: the private key is multiplied by the base point of the secp256k1 curve. A compressed public key is 33 bytes.
- Address: for a classic address, the public key is hashed with SHA-256 and then RIPEMD-160, and the result is encoded in Base58Check, which includes a checksum that catches typing errors.
- Signature: to spend, the wallet signs the transaction with the private key, and every node checks the signature against the public key without ever seeing the private key.
Bitcoin originally used only the ECDSA signature algorithm on secp256k1. The Taproot soft fork, which activated at block 709,632 in November 2021, added Schnorr signatures (BIP 340) on the same curve.
| Item | What it is | Typical format | Safe to share? |
|---|---|---|---|
| Private key | Secret 256-bit number that authorizes spending | 64 hex characters; WIF: 51 characters starting with 5 (uncompressed) or 52 starting with K or L (compressed) | Never |
| Seed phrase | BIP 39 backup that regenerates a wallet’s keys | 12, 15, 18, 21 or 24 words from a 2,048-word list | Never |
| Public key | Derived from the private key on secp256k1 | 33 bytes (compressed) | Revealed on-chain when coins are spent |
| Address | Payment destination derived from a public key or script | 26-35 characters for addresses starting with 1 or 3; longer bc1 addresses | Yes |
What Are the Bitcoin Address Types?
Bitcoin addresses come in several formats, and the first characters tell them apart.
| Starts with | Type | Notes |
|---|---|---|
| 1 | P2PKH (legacy) | Base58Check, case-sensitive |
| 3 | P2SH (script hash) | Base58Check, case-sensitive |
| bc1q | SegWit version 0 | Bech32 (BIP 173), case-insensitive |
| bc1p | Taproot (SegWit version 1) | Bech32m (BIP 350) |
The Bitcoin wiki recommends a new address for each payment. Reusing one address makes it easier for others to link your transactions together.
What Is a Seed Phrase and How Does It Relate to Private Keys?
A seed phrase is a human-readable backup from which a wallet recreates its private keys. Under the BIP 39 standard, 128 to 256 bits of randomness become 12 to 24 words from a fixed list of 2,048 words. The words, plus an optional passphrase, are run through PBKDF2 with HMAC-SHA512 and 2,048 iterations to produce a 512-bit seed.
Hierarchical deterministic (HD) wallets, described in BIP 32, then derive many key pairs from that single seed. This is why a modern wallet asks you to back up one phrase rather than each key, and why the phrase is as sensitive as every key it produces. The guide on how to secure a Bitcoin seed phrase covers storage options in detail.
How to Keep a Bitcoin Private Key Safe
- Use established wallet software or a hardware wallet. Hardware wallets keep private keys and sign transactions inside the device, so the keys are not exposed even if the connected computer has malware.
- Prefer cold storage for larger amounts. Cold storage means generating or storing keys on a device that is never connected to the internet. A crypto vault adds further controls on top of this idea.
- Back up the seed phrase offline. Write it down and keep it somewhere safe from fire, water and other people. Do not photograph it or store it in email or cloud notes.
- Never type the seed phrase or private key into a website or send it to anyone. Any person who has it can take the funds.
- Check addresses before sending. Confirm the first and last characters of a pasted address, because a wrong address cannot be corrected once the payment is sent.
- Protect exchange accounts separately. Coins left on an exchange are held under the provider’s keys, so use a strong unique password and 2FA there.
Custodial vs Self-Custody Wallets
With a custodial (online) wallet, the provider holds the keys and the user must trust that provider completely. With a self-custody wallet, the user holds the keys and carries full responsibility for backups.
| Question | Custodial wallet | Self-custody wallet |
|---|---|---|
| Who holds the private key? | The provider | The user |
| Who restores access? | The provider, through its own account recovery | Only the user, from the seed phrase |
| Main risk | Provider failure, hack or account freeze | Lost backup, theft of the seed phrase, user error |
Common Private Key Scams and Mistakes
Because a seed phrase can restore a wallet and all of its keys, anyone who talks an owner into revealing it can empty the wallet. Fake support agents, “wallet validation” sites and giveaway messages all aim at that same secret.
- According to the US Federal Trade Commission, only scammers demand payment in cryptocurrency, and no legitimate business will demand crypto in advance.
- The FTC also warns that scammers impersonate well-known companies, government agencies and law enforcement.
- Crypto payments typically are not reversible, and if a wallet is compromised, the FTC says no one can step in to recover the funds.
- In the US, scams can be reported to the FTC at ReportFraud.ftc.gov, as well as to the CFTC, the SEC and the FBI’s Internet Crime Complaint Center (IC3).
For the risks that arise when moving coins back to a bank account, see how to avoid scams when withdrawing crypto.
What Happens If You Lose a Bitcoin Private Key?
Losing a private key means losing access to the bitcoin it controls, and the protocol accepts no other proof of ownership. Wikipedia’s Bitcoin article cites a 2013 case in which a user lost 7,500 bitcoin by discarding a hard drive that held the private key, and it notes an estimate that around 20% of all bitcoins are lost.
Mining cannot recover lost keys either. Spending requires a valid signature from the private key, and no miner can produce one without it (see this beginner’s guide to Bitcoin mining for what miners actually do).
Looking further ahead, elliptic curve cryptography could be broken by Shor’s algorithm running on a sufficiently large fault-tolerant quantum computer. Estimates cited on Wikipedia put the requirement for a 256-bit curve at about 2,330 logical qubits, which is why quantum resistance is discussed as a long-term issue for Bitcoin.
Frequently Asked Questions
How long is a Bitcoin private key?
A Bitcoin private key is 256 bits, which is 32 bytes or 64 hexadecimal characters. In Wallet Import Format it is 51 characters starting with 5 (uncompressed) or 52 characters starting with K or L (compressed).
Can someone guess my Bitcoin private key?
No, not if it was generated with a sound random number generator. There are roughly 1.158 × 10⁷⁷ valid keys, so guessing a specific one is not practical. Keys made with weak randomness or chosen by a person are much easier to attack.
Is a private key the same as a seed phrase?
No. A private key controls the funds at its matching addresses, while a BIP 39 seed phrase of 12 to 24 words regenerates all the keys in an HD wallet. Both must stay secret.
Is it safe to share my Bitcoin address or public key?
Yes. A bitcoin address is designed to be shared to receive payments, and a public key cannot practically be reversed into its private key. Using a new address for each payment gives better privacy.
Can a lost Bitcoin private key be recovered?
Only from a backup such as the seed phrase. Without one, no company, miner or network can restore the key, and the bitcoin stays unspendable.