What if you lost all of your bitcoins tomorrow? What would you do?
Let me stress this point:
“If you don’t own your private key, you don’t own your bitcoins.”
Yes, you read that right.
Even the most knowledgeable man on Bitcoin says:
“The private key must remain secret at all times because revealing it to third parties is equivalent to giving them control over the bitcoins secured by that key. The private key must also be backed up and protected from accidental loss, because if it’s lost it cannot be recovered and the funds secured by it are forever lost, too.”
― Andreas M. Antonopoulos, Mastering Bitcoin: Unlocking Digital Cryptocurrencies
In my earlier guide on Bitcoin wallets, I extensively used two terms: Private Address (or key) and Public Address (or key). These keys are what make Bitcoin the safest and most widely used cryptocurrency.
Let us look at an example to understand private and public keys.
Consider a mailbox where you receive your physical mail.
It has a unique and specific number (an address). If someone has to deliver you a letter, he/she must know your house/flat number to deliver it.
And as the receiver, you have a private address (or key) to unlock the mailbox and collect your belongings.
In real life, do you give your keys to someone unknown?
- No. Of course not.
You always keep track of your key and don’t jeopardize the contents inside of your mailbox.
Similarly, like your house/flat number, anyone in the Bitcoin world can know your public address (Bitcoin address) to send you bitcoins. And to unlock (spend/send) those bitcoins, you would require your private address (or key), for which you need to take full responsibility, just like the keys of the mailbox.
I feel that understanding the underlying technical aspect of keys is important so that you remain better informed and educated enough to take care of them.
In the next section, I will tell some basic technical aspects of these keys.
Page Contents
What is Bitcoin Private Key?
A private key is a secret, alphanumeric password/number used to spend/send your bitcoins to another Bitcoin address. It is a 256-bit long number that is picked randomly as soon as you make a wallet.
The degree of randomness and uniqueness is well defined by cryptographic functions for security purposes.
This is how the Bitcoin private key looks:
5Kb8kLf9zgWQnogidDA76MzPL6TsZZY36hWXMssSzNydYXYB9KF
What is a Public Address (or key)?
This is another alphanumeric address/number which is derived from private keys only by using cryptographic math functions.
It is impossible to reverse engineer and reach the private key from which it was generated.
This is the address used to receive bitcoins publicly.
This how the Bitcoin public address looks like:
1EHNa6Q4Jz2uvNExL497mE43ikXhwF6kZm
35RLr51qNvwcr65kma7ucXj8evKHT3SWvP
This address is always seen and broadcasted for receiving bitcoins. Users can make as many public addresses as they want to receive bitcoins.
What are Bitcoin private keys used for?
Private keys are used for making irreversible transactions. Yes, irreversible!
They are the key to spending and sending your bitcoins to anyone and anywhere. This irreversibility is guaranteed by mathematical signatures linked to each transaction whenever we use the private keys to send bitcoins.
And for each transaction, these signatures are unique, even though they are generated from the same private keys. This feature makes them impossible to copy. The user can confidently use the same private key again and again.
Moreover, the signatures are mathematically related to Bitcoin addresses. This math relation helps in confirming that the signatures are only of that particular account holder who wants to transfer bitcoins.
How do we keep private keys safe?
It is OK if you don’t understand the above technical stuff.
You can still use Bitcoin as long as you keep your private keys safe.
These digital keys are crucial in the ownership of bitcoins. These keys are not stored on the Bitcoin network but are created and stored by the file/software (a.k.a. wallet).
A wallet stores these keys. There are many types of wallets out there, and some allow private keys to be stored and guarded by the user.
Some keep the key safe on behalf of the user.
I have explored each type of safety measure for you so that you can choose the most effective wallet according to your needs.
Web and Mobile Wallets
Most of the web and mobile wallet software services in the Bitcoin market store your private key on your behalf on their servers.
They get stored in an encrypted form which only you can decrypt.
iOS Wallets:
Desktop Wallets
Desktop wallets are relatively safe. In such wallets, once you install them on your desktop, you will get your Bitcoin address and private key in a downloadable and importable file.
These importable keys can be made password protected and stored on a memory stick or hard drive.
But once you lose the private key file, you will lose the bitcoins.
I will discuss each of these in detail in upcoming articles.
- Exodus
- Electrum
Here are a few desktop Bitcoin wallets:
Hardware Wallets
Hardware wallets are an electronic invention made to store your private keys offline, away from the vulnerable online environment, so they can’t be hacked.
Some hardware wallets come with security grid cards similar to some debit cards to verify the transaction. Some even have a little digital screen to verify your transactions.
They are tamper-proof and come with a limited user interface. If your device is destroyed, you can retrieve your keys and bitcoins as long as you have a backup code.
Some of the popular hardware wallets are:
Trezor was the first hardware wallet to be launched since the invention of Bitcoin. It is a small device that can be connected via a USB cable to your personal computer. Its fundamental purpose is to store the private keys offline and sign transactions.
Trezor Model T, the latest and most convenient product by the Trezor team, costs about 189 euros. You can order it today on their official website.
Ledger Nano S can be used even on a computer infected with malware. It has two buttons which are needed to be pressed together to sign and confirm a transaction, making it impossible for a hacker to use.
Ledger Nano S also requires the user to create a PIN code on setup. The PIN code helps prevent the loss of bitcoins in case your Nano S gets lost.
It supports Bitcoin, Ethereum, and other popular altcoins and connects with other software wallets like MyCelium. Here is a video to learn more about Ledger Nano S:
Paper Wallets (Cold Storage)
Paper wallets are simply Bitcoin private keys printed on a piece of paper. It can also have the Bitcoin public address printed on it, but not necessarily. Paper wallets are an effective way of storing Bitcoin private keys offline.
They protect the user against potential theft or mishap with the desktop or mobile devices.
These kinds of wallets are also called “cold storage” because the keys are generated offline and never stored online or on a computer.
You can make your paper wallet from bitaddress.org, which is an HTML page specifically for this purpose only.
You can save the HTML page offline and remain disconnected from the internet to generate the keys. They can be printed on paper or stored as a soft copy on a USB or hard drive. Read my previous guide on how to make a Bitcoin paper wallet.
Conclusion
The most important thing in a Bitcoin wallet is your private key, which will prove that the bitcoins you claim are actually yours.
How are you keeping your private keys safe? Let us know what you do in the comments below!! Have a question about Bitcoin Private keys? Feel free to ask in the comment section below.
Here are a few more Bitcoin wallet-related guides that you must read next:
- Highlighting The Difference Between Sweeping & Importing Private Keys
- Why Should You Order 2 Or More Hardware Wallets At The Same Time?
- Security Risks of Mobile, Web & Desktop Bitcoin Wallets [Must Know]
- Best Bitcoin Wallet
- How to get a Bitcoin address?
Help us improve. Was this helpful
About Harsh Agrawal :
An award-winning blogger with a track record of 15+ years. He has a background in both finance and technology and holds bachelors degree in Information technology and engineering.
An international speaker and author who believes in the future of blockchain and the applications of the crypto world.
Join us via email and social channels to get the latest updates straight to your inbox.
Expertise:
Harsh has 15+ years of experience in Fintech and 7+ years in Blockchain and Bitcoin. He has also moderated the panel of Blockchain experts and attended international blockchain events like BTCMiami, Mainnet Messari, and Token2049.
I’m still missing how the security of Trezor is any different than Coinbase.
With Coinbase, you have no idea what your private keys even are.t. And with Trezor you essentially store your private keys in this offline storage device. I get all that.
But on both Coinbase and Trezor there is some record of your private keys. Trezor has to store your private keys somewhere to enable you to restore it if lost, right? So how are they really different from a security point of view? If you someone breaks into Trezor someone can still steal all the private keys sitting on everyone’s physical offline device, no?
When I use the private key from my paper wallet, to do a cryptocurrency transaction, will a hacker be able to capture my private key during the initiation or authorising or signing with my private key in the process of the transaction ?
No, they won’t be unless you show them the private keys in any form.
If I buy a Nano S and then create a few wallets with it ( Nano S ) and then keep the 24 word passphrase, can I in future recover all my cryptocyrrencies I have in those wallets with other hardware cold storage ( non Ledgers product or Nano S ). I ask is because there is no 100% guarantee that a company will never fail and if Ledger is no more around and no more Nano S or any Nano S compatible hardware storage can be found, then I need to be sure that all my cryptocurrencies stored on the blockchain must be able to be recovered.
I’m new to all of this and just signed up to Coinbase. Can I extract my personal key from their exchange onto an offline wallet?
No Coinbase doesn’t allow you to do that!
I thought that be the case after searching myself – thank you kindly for such a speedy reply 🙂
Hi compliment for the explanation…. but I would like to ask about my trezor wallet a week ago I sent some amount from my bitcoin wallet to bitcoin cash adress that I both own but becouse I can’t send directly from bitcoin to bitcoin cash adress the amount it’s unspent into one of my bitcoin adress into blockchain so so I founded a way to spend them or send them back to my wallet but the blockchain wallet ask the Qr code for move the amount but at moment I only know the my 24 seeds worlds trezor so how can i get the Qr code private key or find a different alternative to mive the transaction into blockchain with my 24 seeds worlds please help me
Restore you Trezor wallet in Exodus first using 24 words seed key.
Then follow these steps as per your problem of Bitcoin sent to Bitcoin cash wallet.
Hi Sudhir, can you please help me???
I have a real problem going on; when my internet came back on I no longer had my Bitpay Wallet. So I followed what their support said and downloaded again and did the steps to import wallet with my wallet recovery phrase and it came up Wallet already in Bitpay and there is no money there, it’s like just a brand new wallet!
Tried it about 100 times already today!
Their support didn’t help me at all.
Please, what must I do?
Thank you!
Vicki
You probably noted down your recovery phrase wrong in the first place or entered it wrong in the second place.
Always after initial set-up of any wallet, try to restore it and check everything is fine before storing funds on it. I can’t help in that regard even if I want.
Thanks for the tutorial. Perhaps you could help me with some still basic questions:
1) Is a private key associated with the wallet, or with the bitcoins stored in the wallet?
2) What if I buy bitcoins at different times using the same wallet – do these latest bitcoins have a new private key, or do they still use the original one?
3) If I forgot my private key, then I cannot access my bitcoins, but nobody else can either, right?
4) If I find someone’s private key, how would I go about exploiting that – for example, in my wallets (coinbase, blockchain.info, Jaxxi, TenX) I see no function to allow me to import a private key, or to create a transaction using an external private key? So how would I go about using someone else’s private key (purely theoretically, of course)?
Thanks for your comments.
Hi,
I have bought different altcoins at Binance. Do they have their own wallet system? Do I need to procure a hardware wallet before I buy more coins? Am I safe for now, and can purchase more today 1/22/18,
Binance doesn’t have their wallet system in which you can control your keys. So better get a hardware wallet like Ledger Nano S.
What is the safest way to receive bitcoins from one individual selling? Is there any measures with need to take or vet during this peer2peer buy sell transaction that ensures once we purchase and receive the coins they can’t digitally take them or steal
them back?
Wait for official 6 or more confirmations on the Bitcoin blockchain as a precaution before handing over the Cash if you are dealing with the cash.
someone send me btc on my blockchain wallet, but i cant withdraw it, it says that i need to put the private keys? how can i acquire such? the person asked me to pay the irs for me to have that private key for US would not allow the transaction thus i need to pay the tax.. is that really true? do i really need to pay such tax in IRS?
Hello SUDHIR,
I am new to crypto. I have bought all my Bitcoin, Ethereum, and Litecoin from Coinbase and Gdax. Currently I have all the above coins on my Ledger Nano S wallet. I do not have secret keys for any of them, nor do I have secret keys for Crypto I bought on other exchanges like Bittrex or Binance… I heard if you don’t have the secret keys you don’t own your coins. Is there a way to get my secret keys for coins I’ve purchased?
Thank you for your help!
DownToTheKeys
As you said in your comment that you have all these coins on Ledger Nano S then you must have got your 24 words long seed key while setting your Ledger for the first time. This seed is your secret key or private key in a way. keep that safe and you will be good to go.
Hi Sudhir,
Yes, I have the 24 word long seed key. That is great news. I have the big 3 coins Btc, Eth and Ltc in the ledger but there is no app for my alt coins on the ledger so I did not try to put them in the ledger thinking I could loose them. I have them on the exchange. Are you aware of a way to put newer alt coins in the ledger or a recommend way to store my alt coins?
Also, is there something I should be doing when purchasing Crypto to insure I receive the secret key initially? I have been buying my bitcoin from Coinbase or gdax. As I understand it they do not offer secret keys? Is there another way to purchase bitcoin where you get a secret key?
I appreciate your time and help!
Thank you
DownToTheKeys
Help is needed I lost the pro at key to my Blockchain wallet And. Don’t have the qr code anymore how can I receiver It
I need answers asap
Can’t understand a thing. Do you mean you lost your private keys or seed?
Sorry for any confusion. To clarify I never received any private key’s.
However I have been able to move my BTC, ETH, and LTC on to my Ledger Nano S which you helpfully pointed out gave me the seed key which I have.
My question is, is it possible to store alt coins like xlm, ada, xmr, xvg… on the Ledger Nano S? As the Ledger manager does not offer an app for the smaller coins.
If I can not put them on the Ledger Nano S what is the safest way to store them given I don’t have any secret keys? They are currently on the exchange and I don’t know how to get my secret keys.
The only time I was offered a secret key was buying coins directly from website of the coin.
Thanks again for your help.
Unfortunately, many coins don’t have proper wallets and cannot be stored on Ledger. Ledger Supports 20 coins but in future, it may support more.
You can save the rest coins in their official desktop wallets which they usually provide on their main website.
Good day sir. my name is Luke.
i made a transfer of 200$ worth of btc from my bitconnect wallet to a coin exchange bch wallet, and noticed the funds didnt hit the receiver’ address. i checked the transaction on blockchain and i saw it had just 1 confirmation . please sir! how do i recover my funds back? thanks
Once it has gone to blockchain and you have received 1 conf then you should wait for 6 conf.
hello I have a simple question
I have a wallet with Xapo, its online and absolutely safe and good to use
I have private account and institutional account
people tell me to be careful, but I find xapo to be really good
whats your comment on that issues about safety etc..
It is a hot wallet but how much it is safe? Well, it is safe as other hot wallets.
Consider reading this for your enlightenment-https://coinsutra.com/security-risks-bitcoin-wallets/
If you have huge amounts that you can’t afford to lose, better move to Ledger Nano S.
How can can I recover my private key or to cancel it
Pls I need help
No way of recovery. You should have safe back-ups. Can you elaborate?
Hello.
My system just fell and hard drive is in shock mode, my desktop wallet (Bitcoin Core) is not accessible any longer but I have full control of my watch only address.
Please is there a way to recover my btc from my main wallet address?
any private keys or recovery phrase you have?
my name is Richard and my question is , i open a wallet in blockchain of which i did not get a private key…..but they are asking me of private key when i want to spend my bitcoin….any help?
Must you have got the seed keys or words right?
I use a a ledger nano S, and i want to submit a private key of a litecoin to Litecoincore wallet ( for the fork in this case ) and i empty all the litcoins from that private key.
1)Can they with that private key get those litcoins back
2)access any other currency that was under the wallet (like bitcoin ) ? as the private key is under seed so im just wondering ?
Hello sir. i just want to know how to get private keys ? i have an access to my wallet it is blockchain but i cant send it to other address. How is this happen. pls help me to recover it.
Thank you
I’m trying to understand who owns a bitcoin’s private key when the bitcoin is owned by multiple “investors.” Like if I buy a tenth of a coin, do I get the private key? If not, what good is it? If so, what’s stopping me from spending the whole coin?
You can buy Bitcoins in fractions up to 8 decimal places and you own keys of whatever you buy, you are not at the risk of other fractions…it is not a whole number key or key of traditional look you are assuming to be.
where would I then find this key?
In the wallet, while you set it up for the first time.
hello Sudhir, thank you for your valuable articles. today I am looking for a trusted btc miner to recoup some coins that i sent from my trezor wallet to a bch address (also generated from my trezor wallet). I am a total newbie and a bit confused. i can see the transaction on the blockchain when I enter the private address, but I do not know how to get the btc back into my trezor wallet. the coins have not been spent yet. i am willing to pay for the services of someone who can help me get the coins back. the amount is not a lot but for me it is critical.
Thank you.
birchtrees
You have sent BTC to BCH address is this the issue? Not quite able to understand your situation.
I’ve read there’s theoretically no limit to how small a bitcoin can be divided. But, okay, suppose I buy a hundred/billionth of a bitcoin (smallest current unit), and you own the rest of it. Are you saying I get my own private part of a public/private ECDH key pair that is different from yours? I’m still confused.
It will be different keys for everyone hold different parts/fractions of BTC.
And it not divisible to any limit, smallest unit is Satoshi- Pls read this- https://coinsutra.com/what-is-satoshi-btc-usd-converters/
Thank you, Sudhir. So even just to buy 1/100,000,000th of a bitcoin you get your own set of ECDH keys. Must be a nightmare for the network. Is this where “dust” (denial of service) attacks originate? If I buy 1,000,000 Satoshi all from different sellers, do I then need to keep track of a million keys, or can I combine them into 1/100th of a bitcoin under a single key pair?
hello brother its really nice to meet you
i wander if mayby its possible i ask you help for you make a video on how to recover my BTC from bitcoin QT wallet bicouse i only have my passphrase and my bitcoin address and i really dont see any video available anywere 🙁
can you please help me out brother ? i dont mind to pay you if i manage to recover my BTC
if you can make a video on youtube please send me the link on my email and also send your BTC address bicouse i really want to pay you for your services
thanks brother take care
Only passphrase will not work, do you have the 12 0r 24 word recovery phrase?
i have a address. how can i found the private key of that address ?
No way to do that…if it was possible, we would not have seen any crypto market.
Actually, it is possible. Like all asymmetric encryption, the ECDH problem can be solved. Given current hardware, it’s still hard. But there are weaker curves. And there are mathematical approaches. One could also get (very) lucky. Also, quantum computing is expected to render elliptic curve encryption obsolete. I also wonder how long until the big bitcoin miners switch from trying to solve the double SHA256 hash to attacking known public keys.
Yeah, I know that but so far not, so enjoy and live the day.
Why don’t people make multiple backups of their wallet.dat file?
They might be scared of getting hacked or losing their file
Not if they do what I do. I have removed the file from my computer and have numerous copies on SD cards and burnt to DVD’s. About 10 copies in total.
If I were to ever “invest” in bitcoin, I’d encrypt my wallet.dat file (probably under rijndael) and store it in multiple locations, including a public cloud like gmail’s.
You can encrypt in the wallet and a public store can be hacked.
No way to decrypt an encrypted wallet.dat file. Not with the strength of modern symmetric methods: e.g. blowfish, rijndael, serpent, etc. Unless you know the key. Look at the lockee virus. I’d probably put all my wallets in one big encrypted file/archive. It’d be perfectly safe in anyone’s hands. You could store it anywhere.
If i buy bitcoin on Coinbase or Zebpay, do I not have a private key until i transfer it to my hardware wallet. In other words i bought and set up a Nano S, did the Nano create my private key for me and before that I did not have one? Or does the Nano just protecy my private key. How was I able to send BTC before setting up my nano?
Coinbase & Zebpay means you don’t have your keys simple.
And when you use Ledger nano s like wallets you will get 12-24 word seed words/keys that are actually your private keys and you need to keep them secure, Ledger doesn’t hold your keys. Also watch these video tutorials-
thanks this is a very good article, can i request coinbase to share my private key?
They don’t share private keys.
Hello Harsh, thx for the article. Under the heading “Desktop Wallets” what do you mean when you say: “But once you lose the file of the private key, you will lose the bitcoins.”? I mean how is it possible to lose a file? Thx Roger
Sometimes such files contain your private keys in raw form and if you tamper with them or if somehow you don’t have the back-up of the file and it gets deleted in such case you are risking your holdings which can be lost
Hi Sudhir, i just had a question. So if im using a hardware wallet like neon for example to store neo. and i lose my laptop. but the software is password protected etc. Or i spill water and ruin my hardrive. How do i have access to my crypto commodities again? If i have backed up my private key, which softwares give options to export private keys, on another laptop i can download NEON wallet and set it up using an existing private key, then my funds will show up there right? so a wallet is just a place to enter your pvt key and see your funds. your real source of funds is still your private key right? Please just clear this confusion
Yes, private keys are the only thing that matters.
Sometimes you also get seed words or keys that are also used to generate private keys only.
As, long as you have the keys, no matter what happens to your device, you can always recover your cryptos via a compatible software by re-installing everything.
if i have the private key but forget the corresponding public key , i can just regenerate the public key and access to the coin right?
Yes, you can do that.
Hello Sir,
Hope your doing well.
My question is, if we import the private keys can i then transfer that particular bitcoin’s to other person or sell it.
2. The bitcoins which i transferred to Bittrex or Poloniex can i get/extract the private keys of that too.
i see that in the above you mentioned : The user can confidently use the same private key again and again.
i thought every private key has exactly one corresponding public key, and every public key has one address. How can you use that again and again?
say if i bought btc in coinbase and i transfer the bitcoin into another wallet ( 1 transaction), in this transaction
( from coinbase to my wallet), there will be a pair of public and private key generated , i will get the private key form the wallet to unlock the bitcoin?
say after that i plan to transfer another quantity of bitcoin to another user, i know the user’s public address (key) , with the public key i generate another private key for the another user to unlock the bitcoin?
Question !:
i thought every private key has exactly one corresponding public key, and every public key has one address. How can you use that again and again?
your Public Key is your address of your Wallet… wether it’s on coinbase or a wallet on your PC or Smartphone.
So, your Public Key is your Address. you send and recieve crypto on the same public facing key/address… public key is your address…
Question 2.
if i bought btc in coinbase and i transfer the bitcoin into another wallet ( 1 transaction), in this transaction( from coinbase to my wallet), there will be a pair of public and private key generated , i will get the private key form the wallet to unlock the bitcoin?
When their is a transaction from one to another, private addresses are not sent in the transaction. the private and public keys were allready in place in their respective wallets… i.e. coinbase wallet and the other wallet… so your private key is not relavent, since their is no additional keys made… ever…. only the public key is what the sender needs…
Question 3.
after that i plan to transfer another quantity of bitcoin to another user, i know the user’s public address (key) , with the public key i generate another private key for the another user to unlock the bitcoin?
Answer is No… when you send bitcoin to another user, all you use is their public key and the amount. their is no private key generated in the transaction…
remember… a Private key is a one time creation for the generation of the Public Key… and then, that private Key is for the owner of the wallet ONLY.
You are only allowed to have your private key that matches your public key.
you just cannot look at your Private key, unless you have a Paper wallet
Electronic Wallets will not allow you to see it, but its there… otherwise you will not be able to transact
i also see that you use public address and public key interchangeably, however they are different as a bitcoin wallet address is a hashed version of your public key, is it correct?
thanks for the great articles – i have 4 questions, hope you can answer me
1) only the receiver of btc creates public address, then it will generate a pair of keys ( public and private ) , the sender of btc will use the private key to access the btc given in previous transaction and send to the address of the receivers , is it correct?
2) if i buy bitcoin in piece in multiple times ( for example each time i buy 0.2 btc for 5 times, i end up having 1 bitcoin), do i have 5 private keys? if i were to send out 1 bitcoin to another address , do i have to send 5 times?
3) if a donation account ( a static account) has only one public address asking for multiple senders to send to that address, and people donate to that, the person can access all the BTC sent to that static public address with one private keys?
Hello Sandeep
1) Not able to understand what you are asking? BTC address can be generated by receiver and sender both. And they hold their respective keys related to their addresses. BTC just moves from one public address to another.
2) If you send 0.2 again and again to the same address then you have one single key and if you send it to 5 different address you will have multiple keys.
3) Yes, you are right.