Awalnya saya melihat thread
Risk of holding bitcoin forever, @OP disana mengatakan kalau orang yang dahulu punya
BTC akan kehilangan
BTC mereka jika mereka melupakan kata sandi mereka. Saya langsung berasumsi bahwa ini pasti bukan model wallet jaman sekarang, karena di wallet jaman sekarang jenis backup dilakukan menggunakan seed phrase. Hasil pencarian saya menuju ke file wallet.dat, langsung ke pertanyaannya saja, apakah wallet.dat yang dienkripsi tidak bisa diakses jika pemiliknya melupakan kata sandi?
Sudah dijawab agan @MAAManda. Berikut ini saya hanya menambahkan sedikit informasi saja;
Pertama, cari tahu dulu file 'wallet.dat' itu merupakan file wallet yang dihasilkan dari wallet apa.
Kedua, setelah diketahui walletnya apa, kemudian dilihat untuk membuat wallet baru disana yang digunakan seed phrase atau lainnya.
Ketiga, model backup/recovery yang digunakan wallet tersebut apa saja.
- wallet.dat itu adalah file wallet yang dihasilkan oleh Bitcoin Core.
- Bitcoin core menggunakan private key dan tidak menggunakan seed phrase.
Untuk tipe lawas (legacy), private key masih bisa di export/import secara langsung;
9. Private Key-snip-Contoh:
dumpprivkey bc1qdcqp5adk976p5xm0mfzux0uap6ema3lrh7ere0
Maka akan ditampilkan Private key dari address tersebut

Private key yang ditandai tersebut saya sensor.
Untuk tipe terbaru (Descriptor), sudah tidak bisa lagi menggunakan dumpprivkey seperti quote diatas, melainkan dengan cara berikut:
Agan bisa mendapatkan Private Key dari descriptor wallet, namun untuk step-stepnya agak rumit (ane sendiri pernah mempraktekkannya) ;D
- Pertama-tama bukan console di Bitcoin core, dan gunakan perintah
walletpassphrase "password-agan" 600 jika wallet agan memiliki enkripsi passphrase
- Selanjutnya gunakan
getaddressinfo "address_yang_dimaksud"- Catat jenis script address pada bagian parent descriptor ("parent_desc") berjenis apa : pkh, wpkh, sh atau tr
- Catat hdkeypath-nya
- Selanjutnya gunakan argumen
listdescriptors true- Dari hasilnya cari descriptor ("desc") yang memiliki jenis script address (pkh, wpkh, sh atau tr) sama dengan "parent_desc" yang sebelumnya agan catat
- Dan pastikan memiliki hdkeypath yang sama pula
- Catat extended private key (xprv key) yang dimaksud
- Download BIP39 Tool (Mnemonic Code Converter)
https://github.com/iancoleman/bip39/releases dan jalankan secara offline (matikan jaringan internet)
- Masukan xprv key pada kolom BIP32 Root Key di BIP39 Tool
- Done, agan akan menemukan private key dari address di descriptor wallet tersebut
Unfortunately,
dumprivkey or
dumpwallet commands aren't supported by descriptor wallets.
Your option is to export the parent descriptor of that address and then use a tool that can derive the private key of that address from its master private key.
Here's the procedure (
requires https://github.com/iancoleman/bip39):
- Start Bitcoin Core, preferably on an offline machine and enter the command getaddressinfo "bc1address" and take note of the address' "parent_desc" and "ischange" values.
- Next, enter the command listdescriptors true and find the (private) descriptor with the matching script type
of your address' parent descriptor. (your address' should be "wpkh")
But there'll be at least two desc with that script type, so based from your address' "ischange" value of 'true' or 'false', pick the descriptor with "internal" of the same value. - From the correct descriptor, copy it's master private key which is the long "xprv" key. Do not include the script type and '(' before and '/' after it.
- Now open your iancoleman's BIP39 tool in an offline machine and paste your xprv key in "BIP32 Root Key".
- Scroll down a bit and select the correct script type: BIP44 for legacy, BIP49 for Nested-SegWit and BIP84 for Native Segwit.
- The default should be already correct for receiving addresses (internal: false), else, change the internal/external path from '0' to '1'.
- Scroll-down to the derived addresses and it should be there along with its private key.
- If your address' "address_index" is more than 20, you should derive more addresses in BIP39 tool by using the button: "Show ___ more rows" below the address list for it to show.
- Model backup wallet di Bitcoin Core adalah dengan menyimpan file wallet.dat itu sendiri ataupun dengan menyimpan private key (untuk Legacy Wallet).
Nah, file wallet.dat bisa dienkripsi bisa juga tidak, yakni dengan menambahkan passphrase.
Contoh:
Encrypt Wallet-snip-

Perhatikan warning yang tertera pada screenshot kedua pada quote diatas. Itulah jawaban dari pertanyaan @Rashlyowl (OP).