Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: rterwedo on December 20, 2017, 10:53:04 AM



Title: Number of dynamic SHA rounds on core wallet encryption - specs
Post by: rterwedo on December 20, 2017, 10:53:04 AM
Hi - long story short, been going over the original spec for wallet encryption, and the dynamic number of SHA rounds used in a wallet for core ~.4.

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

Lines 77-79

Is this meant to be taken literally, in that given a wallet encrypted on machine 1, with a dynamic number of rounds X, if that wallet is moved over to a new machine and subsequently opened/decrypted - would X stay the same or take on the specs of machine 2?  (It appears it would only change if pwd is changed)

We are working on a recovery for an owner with multiple wallets.  Our process has been to go after the one with the least amount of SHA iterations (obviously bc its faster) even tho that is the one without the coins in it, under the assumption the pwd is the same or similar to the wallets with higher SHA rounds and at the worst will provide confirmation of pwd formatting possibly used in the harder wallets.

I am just trying to account for any reasons the wallets rounds may be different.

1) Pwd changed on a new faster machine
2) Brand new wallet on new machine (also possible bc the addresses are different, although it could make sense he used a similar format for new wallet)
3) ***Wallet opened on new faster machine but pwd is not changed

#3 is what I am asking about.

Thanks!


Title: Re: Number of dynamic SHA rounds on core wallet encryption - specs
Post by: achow101 on December 20, 2017, 03:59:57 PM
The number of iterations is only changed when the encryption is changed, i.e. a new password is set. The number of iterations will not change on any unlock of the wallet.


Title: Re: Number of dynamic SHA rounds on core wallet encryption - specs
Post by: rterwedo on December 22, 2017, 09:43:15 AM
The number of iterations is only changed when the encryption is changed, i.e. a new password is set. The number of iterations will not change on any unlock of the wallet.

Thank you for the confirmation!