Post
Topic
Board Development & Technical Discussion
Re: I have address and BIP32 root key, How to brute force to find derived pathway?
by
AlphaNode
on 23/12/2024, 11:59:06 UTC
If you have your BIP32 Root Key you can import it in Bitcoin Core for instance with importdescriptors command:

importdescriptors '[
    {
      "desc": "pkh(your BIP32 Root Key/44h/0h/0h/0/*)#xxxxxxxx",
      "timestamp": "now",
      "active": true,
      "internal": false,
      "range": [
        0,
        999
      ],
      "next": 0,
      "next_index": 0
    },
    {
      "desc": "pkh(your BIP32 Root Key/44h/0h/0h/1/*)#xxxxxxxx",
      "timestamp": "now",
      "active": true,
      "internal": true,
      "range": [
        0,
        999
      ],
      "next": 0,
      "next_index": 0
    },
    {
      "desc": "sh(wpkh(your BIP32 Root Key/49h/0h/0h/0/*))#xxxxxxxx",
      "timestamp": "now",
      "active": true,
      "internal": false,
      "range": [
        0,
        999
      ],
      "next": 0,
      "next_index": 0
    },
    {
      "desc": "sh(wpkh(your BIP32 Root Key/49h/0h/0h/1/*))#xxxxxxxx",
      "timestamp": "now",
      "active": true,
      "internal": true,
      "range": [
        0,
        999
      ],
      "next": 0,
      "next_index": 0
    },
    {
      "desc": "tr(your BIP32 Root Key/86h/0h/0h/0/*)#xxxxxxxx",
      "timestamp": "now",
      "active": true,
      "internal": false,
      "range": [
        0,
        999
      ],
      "next": 0,
      "next_index": 0
    },
    {
      "desc": "tr(your BIP32 Root Key/86h/0h/0h/1/*)#xxxxxxxx",
      "timestamp": "now",
      "active": true,
      "internal": true,
      "range": [
        0,
        999
      ],
      "next": 0,
      "next_index": 0
    },
    {
      "desc": "wpkh(your BIP32 Root Key/84h/0h/0h/0/*)#xxxxxxxx",
      "timestamp": "now",
      "active": true,
      "internal": false,
      "range": [
        0,
        999
      ],
      "next": 0,
      "next_index": 0
    },
    {
      "desc": "wpkh(your BIP32 Root Key/84h/0h/0h/1/*)#xxxxxxxx",
      "timestamp": "now",
      "active": true,
      "internal": true,
      "range": [
        0,
        999
      ],
      "next": 0,
      "next_index": 0
    }
  ]'

First, you'll get an error because of the chain #xxxxxxxx, just replace xxxxxxxx for the given chain on each case and launch de command again. You'll get a wallet with receiving and changing addresses for the following:

Base58 (Legacy)
Base58 (P2SH-SegWit)
Bech32 (Segwit)
Bech32m (Taproot)