Bitcoin Forum
May 08, 2024, 02:05:20 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: wallet.dat encrypt by multiple users question  (Read 427 times)
wsxdrfv (OP)
Jr. Member
*
Offline Offline

Activity: 405
Merit: 5


View Profile WWW
April 06, 2018, 10:53:58 PM
 #1

If I give over my wallet.dat file to another guy.

Then he and me can use from same wallet. First users can use balance at that usage time, right?

Then what happen if one user encrypt it?

Other user can't use? First person who do encryption wins? Because he only know password?
1715177120
Hero Member
*
Offline Offline

Posts: 1715177120

View Profile Personal Message (Offline)

Ignore
1715177120
Reply with quote  #2

1715177120
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Seetheummerallyeah
Member
**
Offline Offline

Activity: 280
Merit: 41


View Profile
April 06, 2018, 10:56:07 PM
Merited by suchmoon (1), ABCbits (1)
 #2

If I give over my wallet.dat file to another guy.

Never give your wallet.dat file to anyone unless you want your coins stolen. I can't think of a single situation where you would HAVE to give your wallet.dat to another user. If you want to let him spend money on your wallet, simply send it to him.
wsxdrfv (OP)
Jr. Member
*
Offline Offline

Activity: 405
Merit: 5


View Profile WWW
April 06, 2018, 10:58:04 PM
 #3

If I give over my wallet.dat file to another guy.

Never give your wallet.dat file to anyone unless you want your coins stolen. I can't think of a single situation where you would HAVE to give your wallet.dat to another user. If you want to let him spend money on your wallet, simply send it to him.
There can be situation like sell all wallet.dat to anothers.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
April 07, 2018, 01:42:02 AM
Merited by achow101 (3), ABCbits (2), mocacinno (1)
 #4

If I give over my wallet.dat file to another guy.

Then he and me can use from same wallet. First users can use balance at that usage time, right?

Then what happen if one user encrypt it?

Other user can't use? First person who do encryption wins? Because he only know password?
The two copies of the wallet file will operate independently... Any balance in the wallet will be spendable by either party.

There is no guarantee that the first to send a transaction will "win". It is possible the other person could send with a larger fee (while the first transaction is still unconfirmed) and be confirmed first, rendering the first (unconfirmed) transaction invalid.

Even if one person encrypts the wallet... The other copy of the file will remain unencrypted and usable without a password.

The only issue will be that if either user changes the password (or encrypts the wallet) then their copy of the wallet will generate a new seed and start generating different addresses from the other wallet.

So, if they create a new "receive" address or they create a new transaction that generates "change"... The address will only exist in their wallet. The other wallet will not have access to this address.

This is why users must create a new backup after they have enabled encryption and every time they change their password.


There can be situation like sell all wallet.dat to anothers.
Anyone who "buys" a wallet.dat from someone expecting to have exclusive access to the wallet is an idiot. Roll Eyes

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
wsxdrfv (OP)
Jr. Member
*
Offline Offline

Activity: 405
Merit: 5


View Profile WWW
April 07, 2018, 02:17:03 AM
 #5

The two copies of the wallet file will operate independently... Any balance in the wallet will be spendable by either party.
There is no guarantee that the first to send a transaction will "win". It is possible the other person could send with a larger fee (while the first transaction is still unconfirmed) and be confirmed first, rendering the first (unconfirmed) transaction invalid.
Even if one person encrypts the wallet... The other copy of the file will remain unencrypted and usable without a password.
The only issue will be that if either user changes the password (or encrypts the wallet) then their copy of the wallet will generate a new seed and start generating different addresses from the other wallet.
So, if they create a new "receive" address or they create a new transaction that generates "change"... The address will only exist in their wallet. The other wallet will not have access to this address.
Anyone who "buys" a wallet.dat from someone expecting to have exclusive access to the wallet is an idiot. Roll Eyes
Thanks.
So then it will be like this?

                            A user             B  user  (both have same wallet.dat)

Balance                   1000               1000
A user spent 200       800                800

B user encrypt
and spent 300           500                500

A user spent 100        400               400

B user receive 500     400                900

A user receive 600     1000              1500

and then if A user encrypt with other password?
ranochigo
Legendary
*
Offline Offline

Activity: 2968
Merit: 4168



View Profile
April 07, 2018, 03:11:06 AM
Merited by HCP (2)
 #6

Thanks.
So then it will be like this?
No. Assuming that the addresses all have one UTXO only, this would be the scenario:
Quote
                           A user             B  user  (both have same wallet.dat)

Balance                   1000               1000
A user spent 200       800                800

B user encrypt
and spent 300           0                500

B user receive 500     0                1000

and then if A user encrypt with other password?
Bitcoin Core doesn't reuse addresses. If user A encrypts the wallet, any future addresses will be different. If User A spends the sole input for the address, the change will be spent to a new address that User B will not control.  Since the addresses generated by User A will be different, User B will not be able to spend anymore Bitcoins.

If you have multiple UTXO in a single address, Bitcoin Core will automatically choose inputs that is suitable for the transaction and in some cases, not all of the UTXO will be spent. Hence, the other user will be able to use the remaining UTXO that is not used in the transaction.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
April 07, 2018, 07:06:25 AM
Last edit: April 10, 2018, 09:12:17 AM by bob123
 #7

How much will be accessable from the other copy of the wallet.dat depends on how much UTXO's are available.
After one user encrypts the wallet (new seed / addreses being generated afterwards), the next transaction from this user will have
an output (change address) which the other user doesn't have control of.

If there is only one UTXO, the figure will be like shown by ranochigo.

Depending on how much UTXO's are used in the transaction, the amount of 'remaining btcs' for the first user to spend is varying.



For more information about the change: https://en.bitcoin.it/wiki/Change

wsxdrfv (OP)
Jr. Member
*
Offline Offline

Activity: 405
Merit: 5


View Profile WWW
April 07, 2018, 11:08:50 AM
 #8

Thanks.
So then it will be like this?
No. Assuming that the addresses all have one UTXO only, this would be the scenario:
Quote
                           A user             B  user  (both have same wallet.dat)

Balance                   1000               1000
A user spent 200       800                800

B user encrypt
and spent 300           0                500

B user receive 500     0                1000

and then if A user encrypt with other password?
Bitcoin Core doesn't reuse addresses. If user A encrypts the wallet, any future addresses will be different. If User A spends the sole input for the address, the change will be spent to a new address that User B will not control.  Since the addresses generated by User A will be different, User B will not be able to spend anymore Bitcoins.

If you have multiple UTXO in a single address, Bitcoin Core will automatically choose inputs that is suitable for the transaction and in some cases, not all of the UTXO will be spent. Hence, the other user will be able to use the remaining UTXO that is not used in the transaction.
So then, first user who do encrypt wins?

Then, how about give out wallet that already encrypted?

First user who change password wins?
ranochigo
Legendary
*
Offline Offline

Activity: 2968
Merit: 4168



View Profile
April 07, 2018, 11:13:12 AM
 #9

So then, first user who do encrypt wins?
If the first user spends everything in the wallet file.
Then, how about give out wallet that already encrypted?

First user who change password wins?
No. If the first user doesn't spend the coins, the coins are still in the addresses that is also in the same file that others can hold. The user needs to spend the coins, even to his own address in the wallet with new password.

Logically speaking, no one would ever successfully crack the wallet file and not spend the coins to an address they control exclusively immediately. As said, I'm not sure why you're asking this but don't ever buy an encrypted wallet file from anyone.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
wsxdrfv (OP)
Jr. Member
*
Offline Offline

Activity: 405
Merit: 5


View Profile WWW
April 07, 2018, 01:01:37 PM
 #10

So then, first user who do encrypt wins?
If the first user spends everything in the wallet file.
Then, how about give out wallet that already encrypted?

First user who change password wins?
No. If the first user doesn't spend the coins, the coins are still in the addresses that is also in the same file that others can hold. The user needs to spend the coins, even to his own address in the wallet with new password.

Logically speaking, no one would ever successfully crack the wallet file and not spend the coins to an address they control exclusively immediately. As said, I'm not sure why you're asking this but don't ever buy an encrypted wallet file from anyone.
Just curious about how wallet and addresses works behind the scene. So I think I know briefly, but still there is something I don't know.
Very complicated about whole.
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
April 07, 2018, 01:27:29 PM
 #11

Just curious about how wallet and addresses works behind the scene. So I think I know briefly, but still there is something I don't know.
Very complicated about whole.

A wallet is basically a piece of software which manages your private-/public keypairs.
Most wallets are Hierarchical Deterministic wallets. Those derive a new private key from a so called master private key (MKP).

Upon encrypting (or changing password of) your wallet.dat, core generates a new MPK.
Any generated address after this will onle be cointained in this version of your wallet.dat + futures backups, not in older ones.

Therefore if you (or the second person who has a copy of yor wallet file) spend(s) a part of the coins, the change of the transaction goes to a change address which has only been generated by the wallet the transaction came from.
The actual amount of coins not being 'available anymore' in the older version depends on the UTXO's which have been included into the transaction.

LoyceV
Legendary
*
Offline Offline

Activity: 3304
Merit: 16620


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
April 07, 2018, 07:51:31 PM
 #12

Just curious about how wallet and addresses works behind the scene. So I think I know briefly, but still there is something I don't know.
Very complicated about whole.
When you share your wallet.dat with someone, it's basically the same as giving him your IRL wallet. He can do anything he wants with it, and there's nothing you can do to stop him.

If you're curious about how wallets work, this isn't going to get you there. You may be interested in a multisig solution so that you and the other person both have to sign to complete a transaction.

HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
April 07, 2018, 09:09:13 PM
 #13

Just curious about how wallet and addresses works behind the scene. So I think I know briefly, but still there is something I don't know.
Very complicated about whole.
What exactly are you wanting to know? The use case you are describing is not a "normal" scenario for how Bitcoin Core was designed to be used.

In fact, it is pretty much the complete opposite of normal usage. That is to say, typically you should NEVER share the wallet.dat with anyone... Even trying to use the same wallet.dat on multiple computers is a bad idea.

Also, know that the advice here is specific to Bitcoin Core and the way it works. Other wallet software, like Electrum, may not necessarily exhibit the same behaviour. For instance, Electrum does not generate a new seed if you encrypt the file or change the password.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
April 08, 2018, 05:05:58 AM
 #14

Just curious about how wallet and addresses works behind the scene.

Then you need to start all over.

Your understanding is VERY flawed.

"Behind the scene" there is no address.  Address is for humans.  There is no address in transactions.  There is no address in blockchain.

"Behind the scene" there is no balances.  Balances are for humans.  Wallets use transaction outputs.  Transaction outputs are either unspent (UTXO), or spent.  There is no partial spending of UTXO.

So then, first user who do encrypt wins?

No.  First to get confirmed transaction assigning bitcoin value to UTXO that is under the control of a private key that the other user does not have "wins", but ONLY wins the bitcoin value that are assigned to that  UTXO.  Any bitcoins that are still under the control of a private key that exists in both wallets are still under both control.  Any bitcoins that are assigned to UTXO that is under the control of a private key that the other user does not have in UNCONFIRMED transaction are still under both control.
wsxdrfv (OP)
Jr. Member
*
Offline Offline

Activity: 405
Merit: 5


View Profile WWW
April 10, 2018, 01:32:43 AM
 #15

Just curious about how wallet and addresses works behind the scene.

Then you need to start all over.

Your understanding is VERY flawed.

"Behind the scene" there is no address.  Address is for humans.  There is no address in transactions.  There is no address in blockchain.

"Behind the scene" there is no balances.  Balances are for humans.  Wallets use transaction outputs.  Transaction outputs are either unspent (UTXO), or spent.  There is no partial spending of UTXO.

So then, first user who do encrypt wins?

No.  First to get confirmed transaction assigning bitcoin value to UTXO that is under the control of a private key that the other user does not have "wins", but ONLY wins the bitcoin value that are assigned to that  UTXO.  Any bitcoins that are still under the control of a private key that exists in both wallets are still under both control.  Any bitcoins that are assigned to UTXO that is under the control of a private key that the other user does not have in UNCONFIRMED transaction are still under both control.

What is UTXO?

and if A user have 1000 balance in his wallet, then give wallet.dat file  to B, then A changed his wallet password, B also changed password to some other, then what happen? Who can access and spend existing 1000 balance?
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
April 10, 2018, 02:53:35 AM
 #16

What is UTXO?
UTXO = "Unspent Transaction Output"

Which is exactly what it's name suggests... it is an output from a Bitcoin transaction that has not been "spent" (ie. used).

Quote
and if A user have 1000 balance in his wallet, then give wallet.dat file  to B, then A changed his wallet password, B also changed password to some other, then what happen? Who can access and spend existing 1000 balance?
Assuming that neither A nor B have spent any of the funds in the wallet... then both A *or* B could attempt to send a transaction using the 1000 balance in the wallet, as there has been no change to which private keys control which UTXOs... Both A wallet and B wallet still have the private keys that will enable them to spend the coins in the wallet.

All that has happened is that the password has changed, so each wallet.dat file will now have a different seed and will generate different addresses from THIS POINT. It does not affect UTXOs that are already in the wallet.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
April 10, 2018, 02:28:34 PM
Merited by ABCbits (3)
 #17

- snip -
"Behind the scene" there is no balances.  Balances are for humans.  Wallets use transaction outputs.
- snip -
and if A user have 1000 balance in his wallet, then give wallet.dat file  to B, then A changed his wallet password, B also changed password to some other, then what happen? Who can access and spend existing 1000 balance?

No.

Not "balance".  Transaction outputs.  Wallets track each output separately.  A wallet is NOT an "account".  It is software that manages individual outputs and private keys for you.

Wallets use transaction outputs.  Transaction outputs are either unspent (UTXO), or spent.
What is UTXO?

UTXO is unspent transaction output.


and if A user have 1000 balance in his wallet, then give wallet.dat file  to B, then A changed his wallet password, B also changed password to some other, then what happen? Who can access and spend existing 1000 balance?

BOTH

They BOTH still have the private keys for all the UTXO, so they BOTH can still spend the bitcoins.

Wallet does not have "balance", so when you change the password, you do NOT protect the balance.  Wallet has private keys.  Password is used to encrypt the private keys.  Here is an analogy...

I have a file.  I put a secret in the file.  I give you a copy of the file. I encrypt my file with a password, and you encrypt your copy of the file with your password.  Who can access my secret?

I can access my secret in my file with my password.  You can access my secret in your file with your password.  WE CAN BOTH STILL ACCESS MY SECRET.

Here is another analogy...

I have a file.  I put a secret (secret_A) in the file.  I give you a copy of the file.  I add a new secret (secret_B) to my copy of the file. I encrypt my file with my password.  You add a new secret (secret_C) to your file. You encrypt your file with your password.  Who can access the secrets?

We can BOTH access secret_A, but ONLY I can access secret_B and ONLY YOU can access secret_C.

Wallet is the same.  Wallet is a file.  Wallet has secret keys (private keys).  If I give you a copy of the file, then you can access all the private keys.  If I add password to MY file, you can still access all the keys.  If I add NEW KEYS to MY FILE AFTER I give you a copy, then you can STILL access the OLD keys, but you can NOT access the NEW keys.

Every payment that you receive with the wallet is separate UTXO.  Wallet does NOT combine UTXO into "balance".  It keeps track of each UTXO separately.  If UTXO is received associated with private key that we BOTH have, then we BOTH can spend that UTXO (whichever gets confirmed first wins).  If UTXO is received associated with private key that ONLY ONE of us has, then ONLY that ONE person can spend that UTXO.
wsxdrfv (OP)
Jr. Member
*
Offline Offline

Activity: 405
Merit: 5


View Profile WWW
April 16, 2018, 02:14:56 AM
 #18

I have a file.  I put a secret (secret_A) in the file.  I give you a copy of the file.  I add a new secret (secret_B) to my copy of the file. I encrypt my file with my password.  You add a new secret (secret_C) to your file. You encrypt your file with your password.  Who can access the secrets?
Thanks for detailed description!

Some question rises inside of me,

How to add new secret key(private key) to that wallet.dat file?
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
April 16, 2018, 04:21:10 AM
 #19

How to add new secret key(private key) to that wallet.dat file?

Use wallet software.

Wallet software generates the private key and stores it in the wallet file for you.

Some of the wallet software also allows import of private keys that were generated in other wallets.  In that case, you need to learn how to use the import functionality of the wallet software that you choose.
wsxdrfv (OP)
Jr. Member
*
Offline Offline

Activity: 405
Merit: 5


View Profile WWW
April 16, 2018, 05:07:10 AM
 #20

How to add new secret key(private key) to that wallet.dat file?

Use wallet software.

Wallet software generates the private key and stores it in the wallet file for you.

Some of the wallet software also allows import of private keys that were generated in other wallets.  In that case, you need to learn how to use the import functionality of the wallet software that you choose.
I always use default official window wallet qt program.
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!