gurnec / btcrecover

An open source Bitcoin wallet password and seed recovery tool designed for the case where you already know most of your password/seed, but need assistance in trying different possible combinations.
GNU General Public License v2.0
1.23k stars 657 forks source link

WARNING: Derivaton path: 4 does not match the xpub you have provided #446

Open AntonioRossi opened 2 years ago

AntonioRossi commented 2 years ago

Trying to recover a passphrase entered in ledger for configuring an additional account.

I run the following command:

python3 btcrecover.py --bip39 --tokenlist tlist.txt --mpk ’mpk’ --mnemonic ‘the ‘mnemonic here’ --enable-opencl

the tlist.txt file is as follows:

#--autosave ../../stecca/tlist.sav --pause --max-tokens 1 --typos-replace %P --typos-insert %P --typos-case --typos-repeat --typos-swap --typos-repeat --typos-delete --typos 2

passwd1
passwd2
passwd3
passwd4

When executing I get the following warning:

xpub depth:       3
xpub parent fingerprint: b'3364B270'
xpub child #:     0'
WARNING: Derivaton path: 4 does not match the xpub you have provided.

Undel ledger live insideEdit Account -> Advanced` I get this info for the account:

{
  "xpub": “mpk”,
  "index": 0,
  "freshAddressPath": "84'/0'/0'/0/1",
  "id": "libcore:1:bitcoin:’mpk’:native_segwit",
  "blockHeight": 659595
}

Questions

  1. The xpub depth value of 3 sounds strange to me, shouldn't it be 0?
  2. Why I receive the warning message?
  3. If I run with these settings do I could find the passphrase anyway?
  4. I also have a receiving address for which a transaction was made, should I use that instead of the mpk?
AntonioRossi commented 2 years ago

I added the option --bip32-path "84'/0'/0'/0/1" to the command and the warning disappeared.

The new complete command is as follows: python3 btcrecover.py --bip39 --tokenlist tlist.txt --bip32-path "84'/0'/0'/0/1" --mpk ’mpk’ --mnemonic ‘the ‘mnemonic here’ --enable-opencl

Does this fix the issue when using a Ledger?