Bitcoin Forum

Economy => Web Wallets => Topic started by: operator55 on November 23, 2019, 06:46:00 AM



Title: Recovering 33 character private key from legacy blockchain.info wallet
Post by: operator55 on November 23, 2019, 06:46:00 AM
Hi guys

I'm totally stuck trying to recover very old wallet from blockchain.info (likely V1). I've searched entire web using keywords coming from json file but no luck.
Perhaps some expert developer who is aware of security algos can advise me on this case.

- I got password to the wallet but no email access, therefore this file is all what i have.
- If "priv" field is encoded, i can try to decode it with the password - but i need to be aware of tech specification for this "priv" field.
- Wallet is from 2013.
- My note on the backup says "wallet for bitcoin-qt client", not sure if this is true. It doesnt look fit for bitcoin-qt at all.

Problem is that i cannot restore or extract the private key from this file.. it's very weird, i heard it's base58 + some custom implementation.
This is the wallet file and i have no total clue how to decode this. The private key is very weird, it's just 33 characters. Is it even valid?
The "addr" points to correct BTC address, therefore is fully valid.


Code:
{
"guid" : "020XXXX-XXX-8fXX-bc6c-XXXXX17XX",
"sharedKey" : "XXXXXX-69XX2-157f-XXX4-XXXXXX083",
"options" :
{
"pbkdf2_iterations":10,
"fee_policy":0,
"html5_notifications":false,
"logout_time":600000,
"tx_display":0,
"always_keep_local_backup":false,
"transactions_per_page":30,
"additional_seeds":[]
},
"keys" :
[
{"addr":"1MHJxxxxxxxxxxxxxxYMwR","priv":"uNKxxxxxxxxxxxxxxxxxxxxxxxxxxxBfM"} (33 characters private key)

]
}

{"addr":"1MHJxxxxxxxxxxxxxxYMwR", (34 characters valid address) "priv":"uNKxxxxxxxxxxxxxxxxxxxxxxxxxxxBfM"} (33 characters private key)

Is anyone aware what is "priv" key format for this wallet?


Title: Re: Recovering 33 character private key from legacy blockchain.info wallet
Post by: nc50lc on November 23, 2019, 07:46:54 AM
- My note on the backup says "wallet for bitcoin-qt client", not sure if this is true. It doesnt look fit for bitcoin-qt at all.
Yes, that looks like a wallet.aes.json file from blockchain.info.

This thread have the info of old and new private key types: [overview] Recover Bitcoin from any old storage format] (https://bitcointalk.org/index.php?topic=4959742.0)
But there's nothing about a 33-character prv key.

Have you tried to drag-n-drop it to their import wallet page (https://login.blockchain.com/wallet/import-wallet (https://login.blockchain.com/wallet/import-wallet))?
Said, it supports blockchain.info wallet files.


Title: Re: Recovering 33 character private key from legacy blockchain.info wallet
Post by: DannyHamilton on November 24, 2019, 02:48:39 AM
It's been a long time since I've looked at a wallet.aes.json file, but 33 characters doesn't seem long enough to me.  Hopefully, I'm wrong.  Have you tried this yet?

https://github.com/blockchain/my-wallet-backup-decryption-tool


Title: Re: Recovering 33 character private key from legacy blockchain.info wallet
Post by: keychainX on November 28, 2019, 04:40:31 PM
Yes, i have tried doing using blockchain import tool.

Doesn't recognise the file.

Although the last transaction i remember on the wallet is from 2013, it could have been created even earlier. (2011-2013)

What file name did you use when dropping the file? I know blockchain can behave weird if you dont name the textfile exactly wallet.aes.json

/KX


Title: Re: Recovering 33 character private key from legacy blockchain.info wallet
Post by: pooya87 on February 12, 2020, 06:00:04 AM
When interacting with BC.info user interface - the key shows up in "Imported Addresses" and while clicking on "Show private key" on blockchain.info it displays "Unsupported Private Key".
The 33 character private key from 2013 backup is the same as from 2020 backup.

it may not even be a private key. just because the JSON file says "priv" in front of it doesn't make it so.
since it seems like this address is an imported one maybe you imported a bitcoin address and that key (uNKxxxxxxxxxxxxxxxxxxxxxxxxxxxBfM) is some data that corresponds with the address like its 20 byte hash160.

try decoding it with base58check (base-58 encoding with a checksum) and see if it is a valid encoding and what the result is.
don not post the result anywhere just tell us the length of the byte result, the first byte and the last.
if it is indeed a valid base-58 string with 4 byte checksum and gave you 21 bytes after decoding (1 byte may be the type) then you just have a hash not a private key. and you should be able to see the same 20 bytes if you perform the same decoding on your address (1MHJxxxxxxxxxxxxxxYMwR)


Title: Re: Recovering 33 character private key from legacy blockchain.info wallet
Post by: travelvc on November 10, 2020, 05:25:31 AM
Hey @operator55

I wrote some standalone code that can convert the old blockchain.info wallet (priv:) key base58 format, in to WIF.

You'll need Python 3. Here's the link to the Gist.

https://gist.github.com/Jun-Wang-2018/3105e29e0d61ecf88530c092199371a7#gistcomment-3522248

Hope you find it helpful.


Title: Re: Recovering 33 character private key from legacy blockchain.info wallet
Post by: ymgve2 on November 22, 2020, 03:51:18 AM
I made a script that will dump your blockchain.info wallet data:

https://gist.github.com/ymgve/f66fb29f32380f79e68bbed997bac60f

I wonder if the "priv" key this script shows matches the one in your backup, or if it's longer.