Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: casinotester0001 on September 22, 2022, 09:46:21 AM



Title: 'rounds' or 'iterations' of wallet.dat
Post by: casinotester0001 on September 22, 2022, 09:46:21 AM
I checked wallet.dat files' hashes and some have the same 'rounds' or 'iteration':

How will the number of rounds (iteration) for the wallet.dat hash be generated?

I am asking, because lots of different wallet.dat hashes have the same rounds (iteration):

$bitcoin$64$9de529051d808b5d34c679c43020a233e6b5161de2e85070127009d61e4c24c8$16$09792b4786f368cb$49019$2$00$2$00


EDIT: I found this:
.. a dynamic number of rounds determined by the speed of the machine which does the initial encryption (and is updated based on the speed of a computer which does a subsequent passphrase change)

source: https://github.com/bitcoin/bitcoin/blob/6b8a5ab622e5c9386c872036646bf94da983b190/doc/README (https://github.com/bitcoin/bitcoin/blob/6b8a5ab622e5c9386c872036646bf94da983b190/doc/README)

Still not knowing why so much wallet.dat files that are being sold have the same 'rounds'.


Does someone know, if all numbers (example: 10000, 10001, 10002, ..) can become 'rounds' or is there an algo in the core file that allows only certain numbers? exampe: 10000, 10100,  10200, ..


Title: Re: 'rounds' or 'iterations' of wallet.dat
Post by: NotATether on September 22, 2022, 01:29:06 PM
EDIT: I found this:
.. a dynamic number of rounds determined by the speed of the machine which does the initial encryption (and is updated based on the speed of a computer which does a subsequent passphrase change)

source: https://github.com/bitcoin/bitcoin/blob/6b8a5ab622e5c9386c872036646bf94da983b190/doc/README (https://github.com/bitcoin/bitcoin/blob/6b8a5ab622e5c9386c872036646bf94da983b190/doc/README)

Still not knowing why so much wallet.dat files that are being sold have the same 'rounds'.

Does someone know, if all numbers (example: 10000, 10001, 10002, ..) can become 'rounds' or is there an algo in the core file that allows only certain numbers? exampe: 10000, 10100,  10200, ..

I'm pretty sure that there's a timer in the software that increments rounds until one second has passed, so the number is probably arbtrary. That being said, a bunch of wallet.dat files having a particular amount of rounds means they were either forged or all generated on the same machine, so you can only correlate wallet.dat rounds from different sellers to determine whether they are all fake, or not all of them.


Title: Re: 'rounds' or 'iterations' of wallet.dat
Post by: nc50lc on September 23, 2022, 04:24:15 AM
Does someone know, if all numbers (example: 10000, 10001, 10002, ..) can become 'rounds' or is there an algo in the core file that allows only certain numbers? exampe: 10000, 10100,  10200, ..
It can't be a number lower than 25,000, but it can be any higher depending on the machine that encrypted the wallet or updated the passphrase.
Reference: github.com/bitcoin/bitcoin/blob/100949af0e2551f22c02a73355f2c64710b68ef1/src/wallet/wallet.cpp#L710-L720 (https://github.com/bitcoin/bitcoin/blob/100949af0e2551f22c02a73355f2c64710b68ef1/src/wallet/wallet.cpp#L710-L720)

But since you might be talking about old (for sale/leaked) wallet.dat files, here's from the old version:
Old version (2013): github.com/bitcoin/bitcoin/blob/16b3ff66e0137b68de0d08ad88ce9798bce2d68d/src/wallet.cpp#L258-L268 (https://github.com/bitcoin/bitcoin/blob/16b3ff66e0137b68de0d08ad88ce9798bce2d68d/src/wallet.cpp#L258-L268)


Title: Re: 'rounds' or 'iterations' of wallet.dat
Post by: casinotester0001 on September 23, 2022, 06:17:02 PM
~

Thanks.

I'm pretty sure that there's a timer in the software that increments rounds until one second has passed, ..

Yes, there is. Now, maybe someone can say if all numbers >25000 (25001, 25002, ..) are possible or not  :)


Title: Re: 'rounds' or 'iterations' of wallet.dat
Post by: casinotester0001 on September 29, 2022, 06:26:56 PM
Does someone know, if all numbers (example: 10000, 10001, 10002, ..) can become 'rounds' or is there an algo in the core file that allows only certain numbers? exampe: 10000, 10100,  10200, ..
It can't be a number lower than 25,000, but it can be any higher depending on the machine that encrypted the wallet or updated the passphrase.
Reference: github.com/bitcoin/bitcoin/blob/100949af0e2551f22c02a73355f2c64710b68ef1/src/wallet/wallet.cpp#L710-L720 (https://github.com/bitcoin/bitcoin/blob/100949af0e2551f22c02a73355f2c64710b68ef1/src/wallet/wallet.cpp#L710-L720)

But since you might be talking about old (for sale/leaked) wallet.dat files, here's from the old version:
Old version (2013): github.com/bitcoin/bitcoin/blob/16b3ff66e0137b68de0d08ad88ce9798bce2d68d/src/wallet.cpp#L258-L268 (https://github.com/bitcoin/bitcoin/blob/16b3ff66e0137b68de0d08ad88ce9798bce2d68d/src/wallet.cpp#L258-L268)

Do you know the lowest number for rounds(iteration) for the earliest Bitcoin Core versions? Or someone else?


Title: Re: 'rounds' or 'iterations' of wallet.dat
Post by: nc50lc on September 30, 2022, 03:38:05 AM
But since you might be talking about old (for sale/leaked) wallet.dat files, here's from the old version:
Old version (2013): github.com/bitcoin/bitcoin/blob/16b3ff66e0137b68de0d08ad88ce9798bce2d68d/src/wallet.cpp#L258-L268 (https://github.com/bitcoin/bitcoin/blob/16b3ff66e0137b68de0d08ad88ce9798bce2d68d/src/wallet.cpp#L258-L268)
Do you know the lowest number for rounds(iteration) for the earliest Bitcoin Core versions? Or someone else?
Earlier than 2013?
The earliest possible date is Sep 2011 since wallet encryption was introduced in v0.4.0 which was released on that date.
Here's the code: github.com/bitcoin/bitcoin/blob/b7bcaf940d27fa8cfe89422943fbeaab7a350930/src/wallet.cpp#L155-L158 (https://github.com/bitcoin/bitcoin/blob/b7bcaf940d27fa8cfe89422943fbeaab7a350930/src/wallet.cpp#L155-L158) (wallet encryption pt2)

TL;DR: It's the same.


Title: Re: 'rounds' or 'iterations' of wallet.dat
Post by: casinotester0001 on September 30, 2022, 08:31:03 AM
But since you might be talking about old (for sale/leaked) wallet.dat files, here's from the old version:
Old version (2013): github.com/bitcoin/bitcoin/blob/16b3ff66e0137b68de0d08ad88ce9798bce2d68d/src/wallet.cpp#L258-L268 (https://github.com/bitcoin/bitcoin/blob/16b3ff66e0137b68de0d08ad88ce9798bce2d68d/src/wallet.cpp#L258-L268)
Do you know the lowest number for rounds(iteration) for the earliest Bitcoin Core versions? Or someone else?
Earlier than 2013?
The earliest possible date is Sep 2011 since wallet encryption was introduced in v0.4.0 which was released on that date.
Here's the code: github.com/bitcoin/bitcoin/blob/b7bcaf940d27fa8cfe89422943fbeaab7a350930/src/wallet.cpp#L155-L158 (https://github.com/bitcoin/bitcoin/blob/b7bcaf940d27fa8cfe89422943fbeaab7a350930/src/wallet.cpp#L155-L158) (wallet encryption pt2)

TL;DR: It's the same.

Thanks.

We are discussing 'wallet.dat files for sale' in other groups (telegram) and want to find fake wallets. I had the idea to check the rounds (iteration) of these wallets as I saw some with values < 25000 and now we can say that these wallets are fake. The producers of such wallets didn't know that wallets with iteration < 25000 can't be generated with Bitcoin Core :)