3

Bitcoin Wallet for Android allows you to back up your wallet. It asks for a password when doing so.

After much faffing, I finally managed to.. dum, dum, dum! .. copy the file to the SD card, and then I removed the SD card and mounted on a Linux system.

According to this question, the way to decrypt it is

$ openssl enc -d -aes-256-cbc -a -in bitcoin-wallet-backup-2016-09-30

but I get:

enter aes-256-cbc decryption password:
error reading input file

when doing so. This is an extremely poor error message from openssl. I have confirmed that the file is readable using other utilities.

  • That certainly is a poor error message from openssl. One way to find out what is really going on is to use strace. Try strace openssl <args> and look for a line that starts open("bitcoin-wallet-backup-...", ...). You might see the OS error code at the end of the line. – Nate Eldredge Oct 16 '16 at 23:18
  • open("s/bitcoin-wallet-backup-2016-09-30", O_RDONLY) = 3. I believe 3 is the fd. Then it reads it a few times, fine read(3, "\0\0\0\0\0\ [...] = 4096 etc. This is not an IO problem at this level with the input file. – projix Oct 18 '16 at 11:27
  • Huh. So it may be down to reading and/or single-stepping the openssl source. One question though, the answer you cited is several years old. Have you checked the Bitcoin Wallet documentation to see if this is still the way the backups are encrypted? – Nate Eldredge Oct 18 '16 at 12:08
  • Backup encryption did not change. The underlying cleartext format however did, from base58-encoded private keys (text-based) to a protobuf wallet file (binary). – Andreas Schildbach Jan 3 '17 at 20:52
1

The best way to restore a backup file is always to use the same app used for creating the backup. In other words, install the app again, then use Options > Safety > Restore wallet.

  • Thanks for the specific tip in the second sentence. The first sentence: lectury drivel. – projix Jan 5 '17 at 10:44

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.