Author

Topic: Importing Vs Sweeping Private Keys; What you need to know. (Read 1137 times)

newbie
Activity: 11
Merit: 4
@logfiles,
"
 • If you ever have even any single feeling that your Private keys could have leaked or someone could be having a copy of them. The best thing to do is to sweep your wallet.
 • You can also sweep your private keys if you want to take all your coins to a new address and destroy the paper wallet.
"
What is the difference between sweeping a wallet vs. sweeping private keys?
I checked my Electrum wallet, I only see an option to Sweep private keys.
legendary
Activity: 2296
Merit: 1014
Great effort mate... This is good and informative
Yeah good job overall but... im considering myself with more knowledge about bitcoin than average person (i could always be wrong), but reading this guide made me concentrate on it really hard. I mean its similiar option sweep/import but in reality with all this details and technical knowledge behind it, makes whole subject quite complicated when it maybe don't need to be? TBD Smiley
staff
Activity: 3500
Merit: 6152
Here are some other wallets that support sweeping: Hodl wallet, BRD, Edge app.

Also, If I'm not mistaken, it's not possible to sweep/import private keys for Trezor directly through its web interface, you have to use Electrum (or Exodus) for that purpose. So it might be a good idea to add that info.
copper member
Activity: 2114
Merit: 1794
Top Crypto Casino
UPDATE:

Indonesian Translation by ryzaadit[EDUKASI] Importing Private Key vs Sweeping Private Key | Mana yang lebih baik? has been added to the OP (Thanks for that effort ryzaadit)

I would like to encourage members of the different local sub forums to translate the topic if they wish to. Just let me know so that i can include the link of the translation to the OP.

Let's spread the knowledge to members who hang out in the local boards too  Wink
newbie
Activity: 4
Merit: 2
logfiles, " In case user want to keep old wallet then importing PK in new wallet is good option, but realistically increases the risk because PK are then in two wallets.

Much better option is sweeping, when you send coins to new wallet/address, old wallet remains empty and thus the risk decreases. Private keys are most important thing, it is something that which really allows us to control coins on blockchain. Often people think that they keep coins in wallets, but we actually own private keys. "



I just want say a million thanks for those 5 lines. I have been scouring the net for that answer and finally understand why I can see my balance in the old wallet. I should have swept my keys instead of importing as I wanted to move to Elecrum and leave Exodus.

My question is this...if I now sweep my PK's after already exporting them, will it cause any issues in Electrum?

Thanks again!


copper member
Activity: 2114
Merit: 1794
Top Crypto Casino
As to the privacy, that is a wrong statement widely spread over Internet and  repeated by you.  It derived from  following  statement: when someone has sent change to  the sending address (SA)  then it  proves that SA belongs to him, but  how can it be otherwise. Strange logic as for me.
Of Course one transaction may not be conclusive but look at it this way.
You make a transaction with me and after that, i watch your sending address and find out that you have change of 45 BTC... as a person of malicious intent, i start keeping tabs on you.

You continue making few couples of transactions from/to the same address, I would definitely know it's your address... what is so hard with that?  Grin
I start stalking you through the different medium we could have previously used for communication until I get to know who you are and possibly devise tricks to get either into your computer or get closer to you as a person

Probably you haven't seen this first hand and so you think it's impossible, as for me who saw it happen to my colleague... He attracted robbers because they knew how much he was holding. On top of crypto exchange trading, he had even done a dozen of over the counter trades, so, someone definitely kept tabs on him.

I think real problem here is not that someone knows your coin address, without information who is the owner of that address an ordinary person can not do nothing bad to sender. The situation is changing when you buy something online and pay with crypto, such data may come into the wrong hands and thus connect the owner coin address with his address of residence.
Agreed Lucius, not forgetting the Government. Most Countries haven't legalized cryptos yet so one could land into trouble if a crypto address with enormous transactions is linked to him/her
One can even end up in jail for claims tax evasion or money laundering
legendary
Activity: 3234
Merit: 5637
Blackjack.fun-Free Raffle-Join&Win $50🎲

Remember, when you make a transaction say an online purchase, your address gets exposed to the person on the other side and you don't know what kind of person is on the other side. It could be someone with malicious intent.



(1) In 2017, when bitcoin price was at around 17K, a friend of mine was robbed off 5 BTC at gun point. Do you know what caused the robbery?
Lack of privacy about his transactions and how much he held.

He would keep sharing information about how much profit he had made in one of our traders' telegram group and one day someone just tricked him that he wanted to meet him up and learn a few tips on how to trade.

I think real problem here is not that someone knows your coin address, without information who is the owner of that address an ordinary person can not do nothing bad to sender. The situation is changing when you buy something online and pay with crypto, such data may come into the wrong hands and thus connect the owner coin address with his address of residence.

Your friend make a mistake by sharing such information in public, and with very thoughtless move to meet a total stranger in person. It would be much smarter that he share some of trading tips via Telegram secret chat or something like that.

You can never be too careful when it comes to cryptocurrency, to be your own bank and to secure that bank is not easy task. Knowledge is power, ignorance is the greatest enemy for crypto owners.
copper member
Activity: 2114
Merit: 1794
Top Crypto Casino
Thank you logfiles for a detailed explanation of importing and sweeping. Also, thank LoyceV for very important information that will help not to lose money to newcomers!
Added this information to Russian locale - Begginers.

Thanks too, for the effort in spreading out the word.

Almost all clients(including bitcoin-qt)/on-line services   have the option to choose address for change. So another  solution would be to send the change to the same sending address of the  paper wallet.

Sending to the same address is okay but there is one problem, your privacy can easily be compromised.
You will be making it so easy for your transactions and spending habits to be tracked and probably get the attention of hackers or even robbers(1)
Remember, when you make a transaction say an online purchase, your address gets exposed to the person on the other side and you don't know what kind of person is on the other side. It could be someone with malicious intent.



(1) In 2017, when bitcoin price was at around 17K, a friend of mine was robbed off 5 BTC at gun point. Do you know what caused the robbery?
Lack of privacy about his transactions and how much he held.

He would keep sharing information about how much profit he had made in one of our traders' telegram group and one day someone just tricked him that he wanted to meet him up and learn a few tips on how to trade. He agreed to meet the stranger and before he realized it he was surrounded by gun wielding thugs who then told him if he loved his life, he had to send all the BTC to the address they provided him... Heck they knew how much he had  Grin
They left him after one transaction confirmation.
legendary
Activity: 2310
Merit: 2073
Thank you logfiles for a detailed explanation of importing and sweeping. Also, thank LoyceV for very important information that will help not to lose money to newcomers!
Added this information to Russian locale - Begginers.
copper member
Activity: 2114
Merit: 1794
Top Crypto Casino
I think you got it right Smiley One solution would be to send the change to a new paper wallet.
Thank you, OP has been updated. I had actually under looked that issue but when I did some further reading, I realized how grave the consequences could be when one makes a transaction from the new wallet.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
I think you got it right Smiley One solution would be to send the change to a new paper wallet.
copper member
Activity: 2114
Merit: 1794
Top Crypto Casino
Can you add a warning to the sweep-part: always sweep the entire balance when you sweep a private key (for instance from a paper wallet), otherwise you risk losing your funds.
Example where it fails: Alice has 10 bitcoin on a paper wallet, and wants to send 2 Bitcoin to Bob. Alice installs a temporary wallet, imports the private key, sends 2 bitcoin to Bob, and deletes the temporary wallet again.
However, Alice didn't realize the 8 bitcoin change was send to a new address in the temporary wallet, and the paper wallet is now empty!

This is an extract from Private Keys: Import vs. Sweep
Quote
Import
Another important thing to keep in mind is that if any of the private key’s bitcoins are spent using the software wallet (i.e. making an online purchase), then the private key will be completely depleted of its bitcoins. Even if only a portion of its bitcoins are spent. This is because Bitcoin transactions spend the entire balance of a private key, and send any leftover change to a newly generated private key in the software wallet.

If am not wrong, i think this should be a warning under the importing Part:
from what i understand, when you import a private key that has some bitcoins say 10 BTC to a new software wallet. You decide to do online shopping and spend 2 BTC. However during the process the entire amount of 10 BTC which is in that private key is usually spent during the bitoin transaction and the change left(in this case 8 BTC) is sent back to a new address which has a different PK but in the wallet.

This will make the original PK( Paper wallet) empty.. so if you delete the software wallet (hot wallet) without backing it up. It means you lose all your BTC that was sent to the new address.
caution could be
- back up the new wallet
- resend the change back to paper wallet address (privacy compromised)

Maybe adding warning on sweeping part should be to make sure that the new wallet is backed up as the paper wallet will be zero balance

@loyceV am waiting for your feedback so that i can try and update the OP... am little confused, maybe i misinterpreted the whole thing  Wink
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
Warning: user Velkro, posting above me, is a SCAMMER! Check his very red trust ratings. He loves posting about private keys on boards that don't show his trust to trick clueless Newbies into using his scam site.



Can you add a warning to the sweep-part: always sweep the entire balance when you sweep a private key (for instance from a paper wallet), otherwise you risk losing your funds.
Example where it fails: Alice has 10 bitcoin on a paper wallet, and wants to send 2 Bitcoin to Bob. Alice installs a temporary wallet, imports the private key, sends 2 bitcoin to Bob, and deletes the temporary wallet again.
However, Alice didn't realize the 8 bitcoin change was send to a new address in the temporary wallet, and the paper wallet is now empty!
legendary
Activity: 2296
Merit: 1014
Great guide, merit flies to you. People need to understand basic  technical stuff about managing their private key. Its safest thing to do, because if you know this, your bitcoins are safer.
Keep it up, really informative and well formatted.
copper member
Activity: 2114
Merit: 1794
Top Crypto Casino
Great effort mate... This is good and informative, I have learnt a couple of things I didn't know about. I wish we could have more of such post than posts where people are fighting for forum power all in the name DT.

Thanks for appreciating, am truly flattered.

OP you did justice to this issue thanks for that. I notice you listed Electrum twice in wallet that supports sweeping and importing any reason for that or it's just a mistake?
My bad... It's a mistake. Guess sleep was taking a toll on me.
Thanks, corrected.

<...>
Thank you, Lucius, for pointing out the hard fork issue out. It should never be taken lightly. Though this particular incident was not a direct Private Key Phishing attack, We particularly saw a scenario where one member lost over $1M in crypto assets because of trying to claim for Bitcoin Diamond because he downloaded a malware into his computer.
legendary
Activity: 3234
Merit: 5637
Blackjack.fun-Free Raffle-Join&Win $50🎲
logfiles, very good and useful instruction and explanation about importing private keys and sweeping option. As you write in your post there is pros and cons for both option, so before user performed such task it should be sure what he really wants. In case user want to keep old wallet then importing PK in new wallet is good option, but realistically increases the risk because PK are then in two wallets.

Much better option is sweeping, when you send coins to new wallet/address, old wallet remains empty and thus the risk decreases. Private keys are most important thing, it is something that which really allows us to control coins on blockchain. Often people think that they keep coins in wallets, but we actually own private keys.

Therefore, I suggest the maximum caution when exporting/importing private keys, particularly when it comes to claim of hard-forked coins. In such case always use sweep option first and then you can play with empty keys.
hero member
Activity: 1806
Merit: 672
I wish we could have more of such post than posts where people are fighting for forum power all in the name DT.
Really depends on where you hang out the most, if you are always searching and reading threads under the meta, scam accusation, and reputation boards you will most likely see topics surrounding the forum only. But if you hang out on other sections such as the beginners & help section, press, development & technical discussion, and Bitcoin technical support you will see topics mostly related to Bitcoin itself and if you want to stay away from the politics inside the forum you must know where to look for threads to read in the forum.
legendary
Activity: 2408
Merit: 4282
eXch.cx - Automatic crypto Swap Exchange.
I wish we could have more of such post than posts where people are fighting for forum power all in the name DT.

It's called politics beside their fight adds more fun to the forum. To view more of this type of posts you need to visit the right boards. Meta and reputation isn't the right board to learn more about Bitcoin and other blockchain related stuff. Spend more time in Technically discussions board and other boards that can be used for learning like Alternative/Bitcoin discussion, B&H etc.



WALLETS THAT SUPPORT IMPORTING AND SWEEPING
    • Electrum *
    • Electrum **

OP you did justice to this issue thanks for that. I notice you listed Electrum twice in wallet that supports sweeping and importing any reason for that or it's just a mistake?
jr. member
Activity: 34
Merit: 18
Great effort mate... This is good and informative, I have learnt a couple of things I didn't know about. I wish we could have more of such post than posts where people are fighting for forum power all in the name DT.
copper member
Activity: 2114
Merit: 1794
Top Crypto Casino
Some people don't know much about sweeping and importing and when to either import or export their private keys. So I just decided to make a topic with a simple explanation of what these two procedures are and under what circumstances one could attempt to do one over the other.



IMPORTING A PRIVATE KEY

Importing a private key from an already existing Online or software or paper wallet to another software wallet such as Electrum, Armory, Mycelium or Coinomi implies that you are moving that private key into the new wallet's existing collection of keys.
In this case, If any coins were in the address before you imported its private keys, they will be visible and accessible from both the old wallet from which the keys were exported from and the new wallet to which the keys have been imported.
After importing, the new software wallet will be like a replica or copy of your original wallet.

PROS
    • It's quick, the whole process of exporting and importing the wallet can be done in a very short time if one knows what they are doing.
    • No fees needed at all as it does not involve any form of transaction.

CONS
    • If the original paper wallets private keys get compromised or if someone else ever has a copy of the paper wallet's Private keys, It means s/he can still be able to spend your coins even after importing them to a new wallet.
    • It distorts your new wallet backup especially with Deterministic wallets (wallets where seed phrases are used for restoring the addresses in them such as electrum). This means after every private key import you make, you will need to redo a backup procedure.

CAUTION⚠️
Once you have imported a private key of your paper wallet to the new software wallet, It's very important you make an immediate backup even if you don't plan to use the new software wallet/hot wallet for a long time.

This is because if you make a bitcoin transaction, even for a small amount, the whole bitcoin amount will be spent and the change will be sent back to your wallet but to one of the new addresses in it and not your original paper wallet address that you imported.
i.e. You have imported a private key of your paper wallet that has some bitcoins say 10 BTC to a new software wallet. Afterwards you then do online shopping and decide to spend 2 BTC. What you have to note is that even if you want to spend only 2 BTC, the entire amount of 10 BTC in your address will be spent during the bitcoin transaction and the change (in this case 8 BTC) will be sent back to a new address which has a different PK but in the same wallet.

This will make the original address(Paper wallet) empty. Therefore, if you delete the software wallet (hot wallet) without backing it up. It means you lose all your BTC that was sent to the new address as you will have no other way of recovering the wallet.

SOLUTION TO AVOID LOSING COINS
- Back up the new wallet as soon as you are done importing.
- Resend the change back to paper wallet address before deleting the software wallet (but in this case your privacy will be compromised). Sending it to a new paper wallet address is very advisable.

Note: This caution should be taken into very serious consideration if you are going to make transactions from your new software wallet and plan to use the paper wallet storage method afterwards or you risk losing your bitcoins.

SWEEPING PRIVATE KEYS

When sweeping a paper wallet or private keys to a software wallet, you are essentially creating a new transaction to a new public address which empties your original wallet i.e. paper wallet.
This means after the sweeping process, your coins will be sent to a new public address of your software wallet which will now have a new private key that is stored in an encrypted form on your device.

As it is like making a transaction on the blockchain to a new address, a relevant transaction fee will be deducted from your whole balance and rest of the amount sent to your new wallet.
Also, unlike in the case of importing, after a sweep, your coins will be accessible and visible only from the new software wallet to which you have swept your private keys

PROS
    • Your new wallet's Recovery seeds won’t be broken due to the sweeping procedure meaning you can easily recover your wallet using the seed phrases you used for creating it without any issues.
    • It’s safer in case your original paper wallet gets compromised. New wallet address after sweeping means at that time you will be the only one who knows your private keys.

CONS
    • You will need to cover a transaction fee in order to carry out the procedure.
    • You have to wait for the transactions to get confirmed in order to have the whole process completed… Could be slow according to network congestion and fees.
      
WHEN TO SWEEP OR IMPORT PRIVATE KEYS

    • It’s very important you import your private keys ONLY when nobody else knows them apart from you.
    • If you ever have even any single feeling that your Private keys could have leaked or someone could be having a copy of them. The best thing to do is to sweep your wallet.
    • You can also sweep your private keys if you want to take all your coins to a new address and destroy the paper wallet.
    • Also, it’s important to note that if you used to receive periodic payments on your old paper wallet before you did the sweeping, payments will still continue going into the old address and not the new wallet address. This means you will either have to manually keep re-sending the coins to the new wallet or simply change the periodic payment details to your new wallet's public address. In-case your private key has never been compromised. Importing your wallet is the most reasonable thing to do here.

SWEEPING? WHY NOT JUST SEND MY COINS TO A NEW ADDRESS I OWN?

Sweeping and sending are actually the same thing, The only small difference is that with sweeping, you are looking at making a transaction which may sometimes involve lots of small inputs.
This is because certain wallets generate so many addresses for security and privacy purposes so that your transactions and expenditure cannot be easily tracked. So in this case, as time goes on your different address could have different small unspent coins(balances). Sending them to your new wallet address could prove challenging and even impossible but with sweeping, you could easily send all your small unspent coins to a new address with less hustle.

WALLETS THAT SUPPORT IMPORTING AND SWEEPING

    • Ledger Nano S
    • Trezor
    • Exodus
    • Bitcoin Core
    • Electrum
    • Jaxx’s Chrome Extension
    • Mycelium
    • Coinomi
    • MyEtherWallet
    • MetaMask
    • Coinomi
    • Mycelium
    • Armory



UPDATE
* Caution section added thanks to LoyceV
* Russian Translation by madnessteatИмпopт или cвипинг пpивaтныx ключeй
* Indonesian Translation by ryzaadit[EDUKASI] Importing Private Key vs Sweeping Private Key | Mana yang lebih baik?
* Nigerian (Naija) Translation by ChilwellImporting Vs Sweeping Private Keys; Wetin you need to know.


Any other possible additions and suggestions are welcome,
Thank you.
Sources and Reference:
- Private Keys: Import vs. Sweep
- Highlighting The Difference Between Sweeping & Importing Private Keys
- Sweep VS Send?
- Bitcoin Wiki
Jump to: