Is it possible to recover the last few lost digits (10) of my Litecoin wallet private key? Are there any recovery tools available? Or will I have to try and roll my own? Crucially, what crypto function will I be working against?

I understand that a upper/lower alphanumeric 10char keyspace is effectively uncrackable, but this key was in wallet import format, which I understand incorporates some redundancy/error detection à la MOD10 credit card number verification. I'm wondering if 10 characters of lost private key is therefore recoverable in a reasonable time frame.

Back story: When I hurriedly 'saved' my liteaddress.org keypair as a PDF using Chrome, 10 chars of the private key were clipped. It actually appeared to be 15 or so missing characters that were clipped, but a PDF recovery tool revealed some of the hidden characters. I did not notice this at the time, and paid into the wallet.

My lost wallet contains the proceeds of most of my mining to date. It's not a huge amount of money, but it would be a shame to waste it.

I'm aware that this all sounds extremely dodgy. As a testament to the fact I am seeking to recover my own key and not someone else's, I am happy to use my real name / main Stack Exchange profile to ask this question.


First off: I don't know of any recovery tools (but didn't google for them either). What I'll explain is the difficulty to guess the correct address.

The wallet import format has 4 byte of checksum data. That's 8 characters. So losing the last 4 byte or part of them only loses / diminishes your ability to check for typing errors in the important part of the wallet import format instance.

8 characters in base58 (which is what the wallet import format uses) is log_2(58^8) bit = 46.86 bit. Subtract the 4 byte of redundant data from this and you know that you have to guess 14.86 bit (idealized (won't work out)). So after 2^14.86 = 29'738 guesses you have it for sure and stochastically the expectation is 14'869 guesses. That's entirely feasible (even non-idealized).

Everything you have after guessing is the so-called extended key. That's enough to derive your private key (which is what you need to send money) from it (just drop the first byte).

If you need it in wallet import format, after your guess you have to hash the extended key using sha256, take the first 4 byte (8 characters in hexadecimal notation, again), and add them to the extended key.

But there are classes which give you the public key if you enter the private key. And you almost got it. You probably also got the corresponding public key. So you need the write a script which tries all the possible private keys, calculates the public keys for them, and checks them against the public key you feed into the script. That's probably way faster than figuring out if there are funds in the wallet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.