Problems decrypting my bitcoin-wallet on android

3

So I dropped my phone in the toilet... Of course I immediately turned it off and went with the rice technique. I realized later that I had coins on my phone on the bitcoin-wallet on android . Luckily, i was able to turn the phone back on after a day and the first thing I attempted on doing was backup my wallet. I used the back up function and was prompted to enter a password to encrypt with. I did. Then I wanted to decrypt the password (to prove in case of emergency that I could).

openssl enc -d -aes-256-cbc -a -in <filename>

When trying this I'm asked for the password, which I give. Then I'm given a bunch of garbage. I have found that I'm using version 3.53 . Thanks in advance for the help.

user3795309

Posted 2014-07-16T20:11:35.607

Reputation: 31

Answers

3

If you didn't see the error message bad decrypt, and if the garbage you saw had the string org.bitcoin.production, then the decryption worked. In recent versions of Bitcoin Wallet, as explained in the README, the wallet backup is no longer encrypted plain text but a custom protobuf format.

You can write the decrypted wallet to a file using the -out option to openssl, which is probably more useful than dumping it on the screen. However, if you want to read it or extract the keys manually, you'll probably need special tools, which I am not sure if anyone has written. See also Is there a known way to export my wallet private key from the "Bitcoin Android" app (com.bitcoinandroid)?, though it may or may not be current.

If you did see the message bad decrypt then you got the password wrong. Try other variants.

The intended way to use the encrypted backup file is simply to copy it back onto your phone and restore it into the Bitcoin Wallet app with the "Safety:Restore Wallet" option. You don't need to manually decrypt it with openssl unless you are trying to do something fancy.

Nate Eldredge

Posted 2014-07-16T20:11:35.607

Reputation: 22 182

It appears the new android app doesn't support SSL decryption as answered above/below – Wizard Of Ozzie – 2014-08-02T10:58:21.533

@Aussie: As in my first paragraph, the decryption itself works fine. It's just that the wallet file format is not plain text and is harder to deal with. – Nate Eldredge – 2014-08-02T13:57:16.923

Yeah, I've not been able to decrypt either. Format has changed. I'll look into it – Wizard Of Ozzie – 2014-08-14T11:07:51.367

Here's a tool that dumps the protobuf format: https://github.com/lloeki/bitcoinj-wallet-dump

– Lloeki – 2016-04-05T14:42:39.227