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.

2

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.

  • It appears the new android app doesn't support SSL decryption as answered above/below – Wizard Of Ozzie Aug 2 '14 at 10:58
  • @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 Aug 2 '14 at 13:57
  • Yeah, I've not been able to decrypt either. Format has changed. I'll look into it – Wizard Of Ozzie Aug 14 '14 at 11:07
  • Here's a tool that dumps the protobuf format: github.com/lloeki/bitcoinj-wallet-dump – Lloeki Apr 5 '16 at 14:42

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.