Bitcoin Core · wallet.dat
Recovering a wallet.dat password
These are the oldest cases that arrive, and sometimes the most rewarding: passwords from 2011 to 2014, set when none of this was worth anything, with weaker derivation parameters than today’s and owners who still remember their habits from back then.
What is inside the file
A wallet.dat is not entirely encrypted: what is encrypted is the master key, and with it the private keys. The rest — addresses, labels, metadata — can usually be read without the password. That has a useful consequence: you can check which wallet the file belongs to, and how much it holds, before attempting anything.
Where it is
- Windows
%APPDATA%\Bitcoin\wallet.dat, or%APPDATA%\Bitcoin\wallets\<name>\wallet.daton modern versions- macOS
~/Library/Application Support/Bitcoin/- Linux
~/.bitcoin/- Where else to look
- Old backups: external drives, Time Machine images,
backup.dat, CDs and DVDs burned at the time, email accounts where you sent it to yourself.
What protects the password
Bitcoin Core derives the key with iterated SHA-512, and the count is not fixed: when encrypting the wallet, the program calibrates the iterations so that derivation takes about a tenth of a second on the machine where it happened. A 2012 laptop left a considerably lower iteration count than a current machine, and that number travels inside the file.
In practice, the order of magnitude on ordinary hardware is between ten and a hundred guesses per second. It is not fast, but it is not scrypt either: with a search space properly narrowed by what you remember, millions of candidates fit in a few days.
When there is a way out
- You remember the password in pieces, or you remember which passwords you used back then. This is the most common situation with old wallets: people reused.
- You set it more than ten years ago, when people’s passwords were shorter and more human.
- You have the original file or a complete copy. With the file, the balance can be confirmed before deciding whether it is worth it.
- You remember the language and keyboard you typed on back then, and whether you used accents.
When there is not
- You do not have the file. There is no shortcut here: a
wallet.datis nowhere on the network, it is your file, and if it does not exist there is no case. - The file is truncated or corrupt and does not hold the complete master key. This can be checked before anything is signed.
- The password was long and random, and you do not even remember its length.
- What you have is a formatted disk or a laptop thrown away years ago: that is data recovery, not password recovery, and it is a different trade.
wallet.dat with a modern Bitcoin Core can migrate the file format, and a half-finished migration on the only copy you have left is the silliest way to lose a wallet that did have a way out.What I need for the study
- The file size, whether it is the original or a copy, and where it came from.
- Which Bitcoin Core version created it and when, even roughly.
- Which machine you encrypted it on, if you remember: it affects the iteration count.
- Everything you remember about the password, described in words.
- An address from that wallet, if you have one: it serves as proof of ownership and to confirm the balance.