Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Reynaldo on April 07, 2015, 11:44:56 PM



Title: Password protection - How does it work?
Post by: Reynaldo on April 07, 2015, 11:44:56 PM
Scenario:

I generate 1 address that relies upon one privatekey
I add a password with bitcoin-qt

The password is 2000 characters long

I give out the privatekey.

How does this password protects the bitcoin, I imagine that something needs to be saved somewhere? Enlight me pls.
If someone can find a post that talks about this let me know, I did a search and didnt found anything.


Title: Re: Password protection - How does it work?
Post by: EcuaMobi on April 08, 2015, 12:01:02 AM
Scenario:

I generate 1 address that relies upon one privatekey
I add a password with bitcoin-qt

The password is 2000 characters long

I give out the privatekey.

How does this password protects the bitcoin, I imagine that something needs to be saved somewhere? Enlight me pls.
If someone can find a post that talks about this let me know, I did a search and didnt found anything.

If you give the private key then there's no way to prevent anyone to spend from that address.
The password of a bitcoin-qt wallet is used to encrypt the keys in the wallet.dat file. So if someone gets a copy of your ecrypted wallet they won't be able to spend from it if your password is secure enough. However if you export the un-encrypted private key and send it to someone then that's it, encrypting your wallet won't help.
Similarly if you have an un-encrypted backup of your wallet and someone gets it, then he can spend from it. If you encrypt the wallet afterwards it has no effect on the already liked file. The only way to protect the coins would be to create a new wallet, encrypt it and send all the coins from the previous wallet to the new one.