<p>This happens because of the double encryption. The wallet backup had spending pin and password, So I had to restore it using Android App then export another backup which decrypts fine.</p>
<p>This seem to happen on the backups of 2014 up to 2015, So It might be because of Bitcoin Android App version.</p>
<p>Hope this helps someone.</p>

CC BY-SA 4.0
2023-05-18T02:36:55.390Z
2023-05-18T02:36:55.390Z
terry franklin
<p>I have a wallet backup that's encrypted and I have the password, but when I run this:</p>
<pre><code>openssl enc -d -aes-256-cbc -md md5 -a -in bm2 &gt; bitcoin-wallet-decrypted
</code></pre>
<p>and enter my password, I get this:</p>
<pre><code>*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.
bad decrypt
140513103832384:error:0606506D:digital envelope routines:EVP_DecryptFinal_ex:wrong final block length:../crypto/evp/evp_enc.c:599:
</code></pre>
<p>I do not know why.
So I ran this:</p>
<pre><code>cat bitcoin-wallet-decrypted | tr -cd &quot;[:print:]&quot; | awk '{print $1}'
</code></pre>
<p>then the output is</p>
<pre><code>org.bitcoin.production
</code></pre>
<p>I haven't been able to figure out what I am doing wrong, please any help will be greatly appreciated.</p>

<bitcoin-wallet-app><android><openssl>
How to properly decrypt Android Bitcoin wallet backup from 2014?
terry franklin
# How to properly decrypt Android Bitcoin wallet backup from 2014?

(Asked by: username_0 on 2023-05-16)

I have a wallet backup that's encrypted and I have the password, but when I run this:
openssl enc -d -aes-256-cbc -md md5 -a -in bm2 > bitcoin-wallet-decrypted

and enter my password, I get this:
*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.
bad decrypt
140513103832384:error:0606506D:digital envelope routines:EVP_DecryptFinal_ex:wrong final block length:../crypto/evp/evp_enc.c:599:

I do not know why.
So I ran this:
cat bitcoin-wallet-decrypted | tr -cd "[:print:]" | awk '{print $1}'

then the output is
org.bitcoin.production

I haven't been able to figure out what I am doing wrong, please any help will be greatly appreciated.

**Tags:** bitcoin-wallet-app, android, openssl


---

## 1 answers

### Answer by username_0 on 2023-05-18. Score: 1 | Accepted answer

This happens because of the double encryption. The wallet backup had spending pin and password, So I had to restore it using Android App then export another backup which decrypts fine.

This seem to happen on the backups of 2014 up to 2015, So It might be because of Bitcoin Android App version.

Hope this helps someone.


---

