Java implementation of the BIP 39 specification.
Create a new mnemonic (a seed phrase)
Dictionary dictionary = EnglishDictionary.instance();
Bip39 bip39 = new Bip39(dictionary);
byte[] entropy = bip39.generateEntropy(EntropyDesc.ENT_128);
String mnemonic = bip39.createMnemonic(entropy);
Convert a mnemonic to a seed
String mnemonic = "legal winner thank year wave sausage worth useful legal winner thank yellow";
String passphrase = "TREZOR";
byte[] seed = bip39.createSeed(mnemonic, passphrase);
Download the latest jar via Maven:
<dependency>
<groupId>org.nightcode</groupId>
<artifactId>jbip39</artifactId>
<version>0.1.1</version>
</dependency>
Wordlists are from the BIP 0039.
Feedback is welcome. Please don't hesitate to open up a new github issue or simply drop me a line at dmitry@nightcode.org.