Pages:
Author

Topic: How can I change my private key for my BTC? (Read 285 times)

HCP
legendary
Activity: 2086
Merit: 4361
December 16, 2017, 11:12:09 PM
#21
Yes, that new address has a new private key... however, if you have an HD wallet (does it have the HD symbol in the bottom right corner or is it crossed out?) there is a chance that having one compromised private key could compromise your entire wallet (as all the private keys are "related" in a very complicated mathematical way)

If it is non-HD wallet (HD symbol crossed out) all the private keys are randomly generated and not related. The only "risk" comes from accidentally using that compromised privkey/address again in the future.

In my opinion, the safer option is to move to a new wallet... but moving all the coins to a new private key/address is definitely better than doing nothing.

Also, can I name the wallet.dat file anything I want or does it always have to have the .dat extension to work?  
I believe that Bitcoin Core allows you to specify the wallet file at runtime using the -wallet option, so theoretically you can name it whatever you want... wallet.dat is just what it defaults to if no wallet file is specified.

You might want to be careful renaming it... I've seen posts by several users on here that have previously done this and then been unable to remember/locate the file at a later date Tongue


Also can you please help me understand how to do a rescan of the blockchain within Bitcoin Core client?
to do a rescan... simply start it using:

Code:
path\to\Bitcoin\installdir\bitcoin-qt.exe -rescan

On windows... likely to be something like: C:\Program Files\Bitcoin\bitcoin-qt.exe -rescan

or add rescan=1 to the bitcoin.conf file in your Bitcoin data directory (where your wallet.dat is)... if you don't have a bitcoin.conf, just make one using a text editor. Just remember that once you have done the rescan, you should remove rescan option from your bitcoin.conf or it will do it EVERY time you start the program! Tongue
newbie
Activity: 11
Merit: 0
December 16, 2017, 04:24:10 PM
#20
You can't create a new private key without creating a new address.

They are linked and can't be separated.

Can I create a new address within the same bitcoin core wallet? If I go to file, receiving address and select new, it provides me a new public key (and If i'm correct, also generates a new private key). Could I then move the BTC in my wallet to this new public address and then have it in a private key?

Also can you please help me understand how to do a rescan of the blockchain within Bitcoin Core client?
newbie
Activity: 11
Merit: 0
December 16, 2017, 04:02:01 PM
#19
I might have a year ago, but nothing ever happened and I dont know for sure.

So let me get this straight. Backup my current wallet.dat (1) with my BTC there. Remove it from the AppData folder, let Bitcoin Core generate a new wallet.dat (2). Get the public address generated with this new wallet.dat (2), back up it up and close bitcoin core. Put wallet.dat (1) with my BTC back into the AppData folder, completely sync the blockchain, send the BTC to the new public address that was created and associated with wallet.dat (2). Now put wallet.dat (2) into the AppData folder, and the coin should appear under this new address? Would I have to redownload the blockchain for it to show up? Also, how long would it take to confirm and how much would the fee be?

If I somehow messed this up, but I had the original wallet.dat (1), I could undo this?

Seems about right...
Now, to answer your questions:
You'd need to rescan the complete blockchain, but not redownload it. Rescanning can take a couple of hours, but everything depends on your cpu, memory and IO speed of your disk.
The best fee depends on the number of unspent outputs that are managed by your wallet (1). I wrote a tool long ago to help you with this task: https://www.mocacinno.com/page/feeestimate
If you have the number of inputs/outputs OR a list of funded addresses managed by your wallet, this tool will help you estimate a reasonable fee. However, if you keep your wallet open for a couple of hours before creating a tx, bitcoin core should have a reasonable fee estimation automatically.

As for your last question: there are ways to mess this up in a way you cannot fix it by having access to wallet.dat (1). However, as long as you keep 2 secure backups of both wallet.dat's, and you double check the deposit address generated by wallet.dat (2), i don't see a way to really mess things up.

Hey another quick question. Could I move my BTC to a new address (and get a new private key) within the same Bitcoin Core wallet? If I go to file, receiving address and select new, it provides me a new public key (and If i'm correct, also generates a new private key). Could I then move the BTC in my wallet to this new public address and then have it in a private key? Am I missing something here or is the only way to do it with the previously discussed way of generating a new wallet.dat file?

Also, can I name the wallet.dat file anything I want or does it always have to have the .dat extension to work? 
hero member
Activity: 714
Merit: 500
December 14, 2017, 03:51:25 AM
#18
You can't create a new private key without creating a new address.

They are linked and can't be separated.
HCP
legendary
Activity: 2086
Merit: 4361
December 14, 2017, 02:31:16 AM
#17
I believe it is 6?
Shouldn't be tooooo bad then... your transaction size will end up being something like 900-1000 bytes.... at around 400 sats/byte "recommended" fees... you're looking at fees of around 0.0035 to 0.004 BTC.

You can probably do it for less using a transaction accelerator Wink
newbie
Activity: 11
Merit: 0
December 14, 2017, 02:30:33 AM
#16
--snip, quote was getting to big--

I believe it is 6?

In that case, at this time, i'd recommand a fee of ~0.003, in this case you'll have a very reasonable chance of getting your transaction confirmed within 2-3 hours.
If ~0.003 is to much (personally, i think it's a lot of money), you can always try a little lower fee, however you'll have to expect to wait a longer time.

So that's roughly $50 USD to move 1BTC. I guess it's not terrible, but I supposed it's better than losing everything.
legendary
Activity: 3584
Merit: 5243
https://merel.mobi => buy facemasks with BTC/LTC
December 14, 2017, 02:29:02 AM
#15
--snip, quote was getting to big--

I believe it is 6?

In that case, at this time, i'd recommand a fee of ~0.003, with this fee you'll have a very reasonable chance of getting your transaction confirmed within 2-3 hours.
If ~0.003 is to much (personally, i think it's a lot of money), you can always try a little lower fee, however you'll have to expect to wait a longer time.
A second option is to wait a couple of days and keep monitoring https://bitcoinfees.earn.com/ for a recommanded fee drop... There's a reasonable chance the recommanded fee might drop for shorter or longer periods over the next couple of weeks (not a guarantee tough).
newbie
Activity: 11
Merit: 0
December 14, 2017, 02:23:05 AM
#14
How long would it take for roughly 1BTC to transfer over to the new address? Also, i'm not sure what "unspent inputs that are managed by your wallet" means? In terms of $$, how much would moving 1BTC cost?

I was still editing my previous post (re-editing posts is something i like to do when i don't like my initial answer), i think your question has been answered by my edit.
In short: you'll be creating a transaction with x inputs and 1 output... To find the number of inputs, open your wallet ,go to help => debug window => console and type "listunspent" (without quotes offcourse). Now you can count the number of unspent outputs.
If you don't like the fee estimation bitcoin core is giving you, you can put the number of inputs you found by using the command "listunspent" and 1 output in my wizard: https://www.mocacinno.com/page/feeestimate (option 2)

So it could cost me a thousand dollars to move 1 BTC?

Theoretically, yes... If you were collecting 1000's of dust inputs, the fee can be really high when talking in fiat terms... However, if this is the case, let me know and i'll give you some tips on how to pay a smaller fee.

Is there anyway I can see the inputs without the client? I don't have access to it right this second (not at home ATM), but I am genuinely curious. I think I've had like 6 total transactions ever with this one address, does that make a difference?  

no, it doesn't make a difference... An unspent output is an unspent output, disregarding which address it's funding.
As for your other question: if you have an idear which addresses are managed by your wallet, you can look those addresses up on a block explorer, even if you don't have physical access to your wallet.

For example: if you look up your address on blockchain.info, you should see a link called "Unspent Outputs". If you click it, you can count the number of unspent outputs funding this one address. If you do this for most (or all) of the funded addresses of your wallet, you know the number of unspent outputs (approximately... It's allways possible you're forgetting some addresses... And it's possible your wallet generated change addresses you don't know about to)

I believe it is 6?
legendary
Activity: 3584
Merit: 5243
https://merel.mobi => buy facemasks with BTC/LTC
December 14, 2017, 02:18:01 AM
#13
How long would it take for roughly 1BTC to transfer over to the new address? Also, i'm not sure what "unspent inputs that are managed by your wallet" means? In terms of $$, how much would moving 1BTC cost?

I was still editing my previous post (re-editing posts is something i like to do when i don't like my initial answer), i think your question has been answered by my edit.
In short: you'll be creating a transaction with x inputs and 1 output... To find the number of inputs, open your wallet ,go to help => debug window => console and type "listunspent" (without quotes offcourse). Now you can count the number of unspent outputs.
If you don't like the fee estimation bitcoin core is giving you, you can put the number of inputs you found by using the command "listunspent" and 1 output in my wizard: https://www.mocacinno.com/page/feeestimate (option 2)

So it could cost me a thousand dollars to move 1 BTC?

Theoretically, yes... If you were collecting 1000's of dust inputs, the fee can be really high when talking in fiat terms... However, if this is the case, let me know and i'll give you some tips on how to pay a smaller fee.

Is there anyway I can see the inputs without the client? I don't have access to it right this second (not at home ATM), but I am genuinely curious. I think I've had like 6 total transactions ever with this one address, does that make a difference?  

no, it doesn't make a difference... An unspent output is an unspent output, disregarding which address it's funding.
As for your other question: if you have an idear which addresses are managed by your wallet, you can look those addresses up on a block explorer, even if you don't have physical access to your wallet.

For example: if you look up your address on blockchain.info, you should see a link called "Unspent Outputs". If you click it, you can count the number of unspent outputs funding this one address. If you do this for most (or all) of the funded addresses of your wallet, you know the number of unspent outputs (approximately... It's allways possible you're forgetting some addresses... And it's possible your wallet generated change addresses you don't know about to)
newbie
Activity: 11
Merit: 0
December 14, 2017, 02:13:38 AM
#12
How long would it take for roughly 1BTC to transfer over to the new address? Also, i'm not sure what "unspent inputs that are managed by your wallet" means? In terms of $$, how much would moving 1BTC cost?

I was still editing my previous post (re-editing posts is something i like to do when i don't like my initial answer), i think your question has been answered by my edit.
In short: you'll be creating a transaction with x inputs and 1 output... To find the number of inputs, open your wallet ,go to help => debug window => console and type "listunspent" (without quotes offcourse). Now you can count the number of unspent outputs.
If you don't like the fee estimation bitcoin core is giving you, you can put the number of inputs you found by using the command "listunspent" and 1 output in my wizard: https://www.mocacinno.com/page/feeestimate (option 2)

So it could cost me a thousand dollars to move 1 BTC?

Theoretically, yes... If you were collecting 1000's of dust inputs, the fee can be really high when talking in fiat terms... However, if this is the case, let me know and i'll give you some tips on how to pay a smaller fee.

Is there anyway I can see the inputs without the client? I don't have access to it right this second (not at home ATM), but I am genuinely curious. I think I've had like 6 total transactions ever with this one address, does that make a difference? 
legendary
Activity: 3584
Merit: 5243
https://merel.mobi => buy facemasks with BTC/LTC
December 14, 2017, 02:07:44 AM
#11
How long would it take for roughly 1BTC to transfer over to the new address? Also, i'm not sure what "unspent inputs that are managed by your wallet" means? In terms of $$, how much would moving 1BTC cost?

I was still editing my previous post (re-editing posts is something i like to do when i don't like my initial answer), i think your question has been answered by my edit.
In short: you'll be creating a transaction with x inputs and 1 output... To find the number of inputs, open your wallet ,go to help => debug window => console and type "listunspent" (without quotes offcourse). Now you can count the number of unspent outputs.
If you don't like the fee estimation bitcoin core is giving you, you can put the number of inputs you found by using the command "listunspent" and 1 output in my wizard: https://www.mocacinno.com/page/feeestimate (option 2)

So it could cost me a thousand dollars to move 1 BTC?

Theoretically, yes... If you were collecting 1000's of dust inputs, the fee can be really high when talking in fiat terms... However, if this is the case, let me know and i'll give you some tips on how to pay a smaller fee.
newbie
Activity: 11
Merit: 0
December 14, 2017, 02:05:59 AM
#10
How long would it take for roughly 1BTC to transfer over to the new address? Also, i'm not sure what "unspent inputs that are managed by your wallet" means? In terms of $$, how much would moving 1BTC cost?

I was still editing my previous post (re-editing posts is something i like to do when i don't like my initial answer), i think your question has been answered by my edit.
In short: you'll be creating a transaction with x inputs and 1 output... To find the number of inputs, open your wallet ,go to help => debug window => console and type "listunspent" (without quotes offcourse). Now you can count the number of unspent outputs.
If you don't like the fee estimation bitcoin core is giving you, you can put the number of inputs you found by using the command "listunspent" and 1 output in my wizard: https://www.mocacinno.com/page/feeestimate (option 2)

So it could cost me a thousand dollars to move 1 BTC?
sr. member
Activity: 501
Merit: 252
December 14, 2017, 02:04:07 AM
#9
Is there anyway I can mess this up and end up losing my coin over paranoia? Is this noob proof lol? I'm sorry I'm just so stressed out over all this bitcoin. I don't have that much, but losing money over stupidity is just really, really awful lol.

I don't know how much reliable is Blockchain.info for you. But I did that with it.

After November 30 when BCC , BTG all came into existence. There was all coin in my paperwallet which was old since February 2017. So first i take of my BTC through privatekey and send them to another wallet. Later i use secretkey on blockchain and got my BCC there.

At the time of inserting secretkey in Blockchain , that address become Imported Address for it. I developed new secretkey for same Address from there.

Check this image u can understand what to do.



Later u can import that address in you other wallet and generate another privatekey.
legendary
Activity: 3584
Merit: 5243
https://merel.mobi => buy facemasks with BTC/LTC
December 14, 2017, 01:59:49 AM
#8
How long would it take for roughly 1BTC to transfer over to the new address? Also, i'm not sure what "unspent inputs that are managed by your wallet" means? In terms of $$, how much would moving 1BTC cost?

I was still editing my previous post (re-editing posts is something i like to do when i don't like my initial answer), i think your question has been answered by my edit.
In short: you'll be creating a transaction with x inputs and 1 output... To find the number of inputs, open your wallet ,go to help => debug window => console and type "listunspent" (without quotes offcourse). Now you can count the number of unspent outputs.
If you don't like the fee estimation bitcoin core is giving you, you can put the number of inputs you found by using the command "listunspent" and 1 output in my wizard: https://www.mocacinno.com/page/feeestimate (option 2)
newbie
Activity: 11
Merit: 0
December 14, 2017, 01:58:20 AM
#7
I might have a year ago, but nothing ever happened and I dont know for sure.

So let me get this straight. Backup my current wallet.dat (1) with my BTC there. Remove it from the AppData folder, let Bitcoin Core generate a new wallet.dat (2). Get the public address generated with this new wallet.dat (2), back up it up and close bitcoin core. Put wallet.dat (1) with my BTC back into the AppData folder, completely sync the blockchain, send the BTC to the new public address that was created and associated with wallet.dat (2). Now put wallet.dat (2) into the AppData folder, and the coin should appear under this new address? Would I have to redownload the blockchain for it to show up? Also, how long would it take to confirm and how much would the fee be?

If I somehow messed this up, but I had the original wallet.dat (1), I could undo this?

Seems about right...
Now, to answer your questions:
You'd need to rescan the complete blockchain, but not redownload it. Rescanning can take a couple of hours, but everything depends on your cpu, memory and IO speed of your disk.
The best fee depends on the number of unspent inputs that are managed by your wallet (1).

As for your last question: there are ways to mess this up in a way you cannot fix it by having access to wallet.dat (1). However, as long as you keep 2 secure backups of both wallet.dat's, and you double check the deposit address generated by wallet.dat (2), i don't see a way to really mess things up.


How long would it take for roughly 1BTC to transfer over to the new address? Also, i'm not sure what "unspent inputs that are managed by your wallet" means? In terms of $$, how much would moving 1BTC cost?
legendary
Activity: 3584
Merit: 5243
https://merel.mobi => buy facemasks with BTC/LTC
December 14, 2017, 01:54:45 AM
#6
I might have a year ago, but nothing ever happened and I dont know for sure.

So let me get this straight. Backup my current wallet.dat (1) with my BTC there. Remove it from the AppData folder, let Bitcoin Core generate a new wallet.dat (2). Get the public address generated with this new wallet.dat (2), back up it up and close bitcoin core. Put wallet.dat (1) with my BTC back into the AppData folder, completely sync the blockchain, send the BTC to the new public address that was created and associated with wallet.dat (2). Now put wallet.dat (2) into the AppData folder, and the coin should appear under this new address? Would I have to redownload the blockchain for it to show up? Also, how long would it take to confirm and how much would the fee be?

If I somehow messed this up, but I had the original wallet.dat (1), I could undo this?

Seems about right...
Now, to answer your questions:
You'd need to rescan the complete blockchain, but not redownload it. Rescanning can take a couple of hours, but everything depends on your cpu, memory and IO speed of your disk.
The best fee depends on the number of unspent outputs that are managed by your wallet (1). I wrote a tool long ago to help you with this task: https://www.mocacinno.com/page/feeestimate
If you have the number of inputs/outputs OR a list of funded addresses managed by your wallet, this tool will help you estimate a reasonable fee. However, if you keep your wallet open for a couple of hours before creating a tx, bitcoin core should have a reasonable fee estimation automatically.

As for your last question: there are ways to mess this up in a way you cannot fix it by having access to wallet.dat (1). However, as long as you keep 2 secure backups of both wallet.dat's, and you double check the deposit address generated by wallet.dat (2), i don't see a way to really mess things up.
newbie
Activity: 11
Merit: 0
December 14, 2017, 01:52:10 AM
#5
I might have a year ago, but nothing ever happened and I dont know for sure.

So let me get this straight. Backup my current wallet.dat (1) with my BTC there. Remove it from the AppData folder, let Bitcoin Core generate a new wallet.dat (2). Get the public address generated with this new wallet.dat (2), back up it up and close bitcoin core. Put wallet.dat (1) with my BTC back into the AppData folder, completely sync the blockchain, send the BTC to the new public address that was created and associated with wallet.dat (2). Now put wallet.dat (2) into the AppData folder, and the coin should appear under this new address? Would I have to redownload the blockchain for it to show up? Also, how long would it take to confirm and how much would the fee be?

If I somehow messed this up, but I had the original wallet.dat (1), I could undo this?
HCP
legendary
Activity: 2086
Merit: 4361
December 14, 2017, 01:45:18 AM
#4
As long as you take backups of the wallet.dat's (put them on external storage like USB drives for extra safety)... you should be able to recover from any "mistakes".

What makes you think that someone else has your private key anyway? Huh Did you type it into a website or something?
newbie
Activity: 11
Merit: 0
December 14, 2017, 01:41:37 AM
#3
Is there anyway I can mess this up and end up losing my coin over paranoia? Is this noob proof lol? I'm sorry I'm just so stressed out over all this bitcoin. I don't have that much, but losing money over stupidity is just really, really awful lol.
HCP
legendary
Activity: 2086
Merit: 4361
December 14, 2017, 01:37:24 AM
#2
A slightly complicated way to go about this, but should guarantee no-one has your private keys (unless your entire computer is compromised)

- Shutdown Bitcoin Core
- Backup your wallet.dat... rename it wallet.old
- Restart Bitcoin Core to create a "new" wallet.dat with new addresses/private keys
- Generate a receive address
- Shutdown Bitcoin Core
- Swap the wallets again (wallet.dat -> wallet.new, wallet.old -> wallet.dat)
- Restart Bitcoin Core
- Send your BTC to new address
- Shutdown Bitcoin Core
- Swap wallets one last time (wallet.dat -> wallet.old, wallet.new -> wallet.dat)
- Continue using Bitcoin Core with your new wallet

This way, you're guaranteed not to accidentally use your OLD key again (but you have access should you ever need it)... and no-one should have access to your new keys.
Pages:
Jump to: