<p><a href="http://bitcoinj.github.io/" rel="nofollow">BitcoinJ</a> is the Java open source library used by many popular wallets, including <a href="https://play.google.com/store/apps/details?id=de.schildbach.wallet" rel="nofollow">Bitcoin Wallet for Android</a>, <a href="https://multibit.org/" rel="nofollow">MultiBit</a>, <a href="http://blog.greenaddress.it/2015/02/05/greenbits-the-all-new-snappy-android-bitcoin-wallet-with-multisig-and-hardware-wallets-support/" rel="nofollow">GreenAddress GreenBits</a>, and lots more.</p>

<p>It supports some sort of encryption of private keys, although it may not be AES-256-CBC (but it probably is).</p>

<h2>HD Wallets</h2>

<p>It's worth noting that BitcoinJ was recently upgraded to support creating and using <a href="https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki" rel="nofollow">BIP32</a> <a href="https://bitcoin.org/en/developer-guide#hierarchical-deterministic-key-creation" rel="nofollow">hierarchical deterministic (HD) wallets</a>.  This is an option, and the old method of generating separate random keys is still available.</p>

<p>When used in HD mode, as the wallets listed above do[1], it won't store the private keys directly, but will simply generate them on demand from the HD root seed, so it's only the HD root seed that needs to kept encrypted.  Also users are strongly encouraged to keep a paper backup of the root seed, meaning that digital backups of the encrypted key are usually not needed.</p>

<p>[1] MultiBit currently doesn't do it, but the in-beta-test MultiBit HD does.</p>

<h2>Bitcoin Core Wallet</h2>

<p>In addition, Bitcoin Core developer <a href="https://github.com/jonasschnelli" rel="nofollow">Jonas Schnelli</a> is working on <a href="https://github.com/bitcoin/bitcoin/issues/5761" rel="nofollow">splitting off and replacing</a> Bitcoin Core's backend wallet code, so you may not want to start on any major projects without coordinating with him.</p>

<p>One of the proposed objectives for his project---although I haven't heard his take on this---is adding HD support to the wallet code.  (In any case, HD support will likely be added as an option; at least one core dev <a href="http://bitcoinstats.com/irc/bitcoin-dev/logs/2015/02/27#l1425042961" rel="nofollow">would like to keep random-derived private keys</a> for some applications because they've been much better studied than HD derivation.)</p>

CC BY-SA 3.0
2015-03-03T11:20:27.713Z
2015-03-03T11:20:27.713Z
David A. Harding
<p>I intend to establish an efficient and secure scheme for protection of wallets. For this , I need source code that implements wallet ecryption as mentioned in <a href="https://en.bitcoin.it/wiki/Wallet_encryption" rel="nofollow">https://en.bitcoin.it/wiki/Wallet_encryption</a></p>

<wallet><encryption><e-wallet><wallet-security>
Is there any open source implementation of Bitcoin wallet encryption in Java?
Sadia Khalil
# Is there any open source implementation of Bitcoin wallet encryption in Java?

(Asked by: username_0 on 2015-03-03)

I intend to establish an efficient and secure scheme for protection of wallets. For this , I need source code that implements wallet ecryption as mentioned in <https://en.bitcoin.it/wiki/Wallet_encryption>

**Tags:** wallet, encryption, e-wallet, wallet-security


---

## 1 answers

### Answer by username_1 on 2015-03-03. Score: 2

[BitcoinJ](http://bitcoinj.github.io/) is the Java open source library used by many popular wallets, including [Bitcoin Wallet for Android](https://play.google.com/store/apps/details?id=de.schildbach.wallet), [MultiBit](https://multibit.org/), [GreenAddress GreenBits](http://blog.greenaddress.it/2015/02/05/greenbits-the-all-new-snappy-android-bitcoin-wallet-with-multisig-and-hardware-wallets-support/), and lots more.

It supports some sort of encryption of private keys, although it may not be AES-256-CBC (but it probably is).

## HD Wallets

It's worth noting that BitcoinJ was recently upgraded to support creating and using [BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) [hierarchical deterministic (HD) wallets](https://bitcoin.org/en/developer-guide#hierarchical-deterministic-key-creation). This is an option, and the old method of generating separate random keys is still available.

When used in HD mode, as the wallets listed above do[1], it won't store the private keys directly, but will simply generate them on demand from the HD root seed, so it's only the HD root seed that needs to kept encrypted. Also users are strongly encouraged to keep a paper backup of the root seed, meaning that digital backups of the encrypted key are usually not needed.

[1] MultiBit currently doesn't do it, but the in-beta-test MultiBit HD does.

## Bitcoin Core Wallet

In addition, Bitcoin Core developer [Jonas Schnelli](https://github.com/jonasschnelli) is working on [splitting off and replacing](https://github.com/bitcoin/bitcoin/issues/5761) Bitcoin Core's backend wallet code, so you may not want to start on any major projects without coordinating with him.

One of the proposed objectives for his project---although I haven't heard his take on this---is adding HD support to the wallet code. (In any case, HD support will likely be added as an option; at least one core dev [would like to keep random-derived private keys](http://bitcoinstats.com/irc/bitcoin-dev/logs/2015/02/27#l1425042961) for some applications because they've been much better studied than HD derivation.)


---

