Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: wyager on July 13, 2012, 03:34:39 AM



Title: How do I decrypt the Blockchain.info email backup wallet?
Post by: wyager on July 13, 2012, 03:34:39 AM
Blockchain.info regularly sends me an encrypted backup of the wallet I have stored with them. According to the email, I can either use their online services or "standard Unix tools" to decrypt this backup. Now, I assume they mean using the openssl command line tool or something, but I am having trouble figuring it out. I have tried the following:

Code:
openssl enc -d -in /Users/User/Downloads/wallet.aes.json -out /tmp/wallet -aes-256-cbc 

and since it looks like it might be base64 encoded, I also tried

Code:
openssl enc -d -in /Users/User/Downloads/wallet.aes.json -out /tmp/wallet -aes-256-cbc -base64

However, the first one gives a "Bad magic number" error and the second one gives an "error reading from file" (so I was probably wrong about base64). I also tried both of these with aes-256-ebc.


Title: Re: How do I decrypt the Blockchain.info email backup wallet?
Post by: unclemantis on July 13, 2012, 05:40:17 PM
Blockchain.info regularly sends me an encrypted backup of the wallet I have stored with them. According to the email, I can either use their online services or "standard Unix tools" to decrypt this backup. Now, I assume they mean using the openssl command line tool or something, but I am having trouble figuring it out. I have tried the following:

Code:
openssl enc -d -in /Users/User/Downloads/wallet.aes.json -out /tmp/wallet -aes-256-cbc 

and since it looks like it might be base64 encoded, I also tried

Code:
openssl enc -d -in /Users/User/Downloads/wallet.aes.json -out /tmp/wallet -aes-256-cbc -base64

However, the first one gives a "Bad magic number" error and the second one gives an "error reading from file" (so I was probably wrong about base64). I also tried both of these with aes-256-ebc.

I maybe be having the same issue. Decrypting is not working for me at all. Also their API is not decrypting their wallet right.


Title: Re: How do I decrypt the Blockchain.info email backup wallet?
Post by: gbl08ma on July 13, 2012, 09:07:10 PM
Even though retrieving the address for my wallet worked fine through the Blockchain API (unlike what happened to unclemantis, on his other thread), I can't seem to be able to decrypt a backup of the same wallet on my computer with openssl either. I have double-encryption enabled, may that be the problem?


Title: Re: How do I decrypt the Blockchain.info email backup wallet?
Post by: unclemantis on July 13, 2012, 09:56:20 PM
Double encryption might be the issue but i can't say for sure.

So..... care to tell me how you got the api working! :-D


Title: Re: How do I decrypt the Blockchain.info email backup wallet?
Post by: wyager on July 13, 2012, 11:01:29 PM
Even if their API works, I am more concerned with the possibility that they somehow go out of business. I would like to have a surefire way to recover my backup, if needed.


Title: Re: How do I decrypt the Blockchain.info email backup wallet?
Post by: unclemantis on July 13, 2012, 11:14:09 PM
Even if their API works, I am more concerned with the possibility that they somehow go out of business. I would like to have a surefire way to recover my backup, if needed.

I hear ya! maybe the password is screwing it up? Do you have funny characters or something? That was my issue with the API. I needed to url encode my password


Title: Re: How do I decrypt the Blockchain.info email backup wallet?
Post by: jim618 on July 15, 2012, 08:32:23 PM
You can import the blockchain.info encrypted backups into MultiBit (including the double encrypted ones).

Piuk wrote an importer routine and it is part if the 'Tools | Import Private Keys' functionality.

There is a how to here:
http://multibit.org/help_importingPrivateKeys.html (http://multibit.org/help_importingPrivateKeys.html)



Title: Re: How do I decrypt the Blockchain.info email backup wallet?
Post by: wyager on July 16, 2012, 03:24:17 AM
Any idea which part of the multibit source handles this? I am having trouble finding it.


Title: Re: How do I decrypt the Blockchain.info email backup wallet?
Post by: dooglus on July 16, 2012, 07:28:57 AM
See http://bitcoin.stackexchange.com/a/3037/659 (expand all the comments) and in particular https://gist.github.com/2757171 for the newest version of the Python code to decrypt the wallet.


Title: Re: How do I decrypt the Blockchain.info email backup wallet?
Post by: jim618 on July 16, 2012, 08:00:57 AM
Any idea which part of the multibit source handles this? I am having trouble finding it.

It is in here:
https://github.com/jim618/multibit/blob/v0.4/src/main/java/com/piuk/blockchain/MyWallet.java (https://github.com/jim618/multibit/blob/v0.4/src/main/java/com/piuk/blockchain/MyWallet.java)


Title: Re: How do I decrypt the Blockchain.info email backup wallet?
Post by: wyager on July 16, 2012, 12:50:17 PM
See http://bitcoin.stackexchange.com/a/3037/659 (expand all the comments) and in particular https://gist.github.com/2757171 for the newest version of the Python code to decrypt the wallet.


Why the heck wasn't plain old AES good enough? And while you could technically do that with "standard UNIX tools", it's a heck of a task.

Thanks for the info, though, this should let me figure it out.

Edit:
Got an email from the blockchain.info tech support guy, he confirmed that the wallets can no longer be decrypted easily with "standard" tools.


Title: Re: How do I decrypt the Blockchain.info email backup wallet?
Post by: unclemantis on July 21, 2012, 10:36:51 PM
See http://bitcoin.stackexchange.com/a/3037/659 (expand all the comments) and in particular https://gist.github.com/2757171 for the newest version of the Python code to decrypt the wallet.


Why the heck wasn't plain old AES good enough? And while you could technically do that with "standard UNIX tools", it's a heck of a task.

Thanks for the info, though, this should let me figure it out.

Edit:
Got an email from the blockchain.info tech support guy, he confirmed that the wallets can no longer be decrypted easily with "standard" tools.

That's bullshit. So much for his paper wallet cold storage solution.


Title: Re: How do I decrypt the Blockchain.info email backup wallet?
Post by: wyager on July 22, 2012, 06:42:13 PM
See http://bitcoin.stackexchange.com/a/3037/659 (expand all the comments) and in particular https://gist.github.com/2757171 for the newest version of the Python code to decrypt the wallet.


Why the heck wasn't plain old AES good enough? And while you could technically do that with "standard UNIX tools", it's a heck of a task.

Thanks for the info, though, this should let me figure it out.

Edit:
Got an email from the blockchain.info tech support guy, he confirmed that the wallets can no longer be decrypted easily with "standard" tools.

That's bullshit. So much for his paper wallet cold storage solution.

Yeah, I agree. I mean, there are security considerations, but I'm sure one could base them off of some easily repeatable task instead of a complex-as-shit byte swapping and hashing algorithm.


Title: Re: How do I decrypt the Blockchain.info email backup wallet?
Post by: Galahad on August 18, 2013, 04:58:39 PM
Does this apply to paper wallets as well as encrypted digital backups of them? So that if blockchain disappeared getting Bitcoins back would be tough.


Title: Re: How do I decrypt the Blockchain.info email backup wallet?
Post by: jim618 on August 18, 2013, 08:45:21 PM
You can import your encrypted blockchain.info wallet backups into MultiBit.
There is a detailed how to here:

https://multibit.org/en/help/v0.5/help_movingAWallet.html (https://multibit.org/en/help/v0.5/help_movingAWallet.html)