Pages:
Author

Topic: wallet.dat encrypt by multiple users question - page 2. (Read 448 times)

legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
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.
jr. member
Activity: 413
Merit: 5
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?
legendary
Activity: 1624
Merit: 2481
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
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
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.
jr. member
Activity: 413
Merit: 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?
HCP
legendary
Activity: 2086
Merit: 4361
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
jr. member
Activity: 413
Merit: 5
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.
member
Activity: 280
Merit: 41
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.
jr. member
Activity: 413
Merit: 5
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?
Pages:
Jump to: