All Projects → NovaCrypto → BIP39

NovaCrypto / BIP39

Licence: GPL-3.0 License
Java Microlibrary implementation of BIP0039

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to BIP39

iota-mnemonic
Generate, restore IOTA seed from Bitcoin BIP39 mnemonic
Stars: ✭ 16 (-81.82%)
Mutual labels:  mnemonic, bip39
mnemonic-sdk
Mnemonic bip39 bip32 bip44 生成助记词 私钥
Stars: ✭ 25 (-71.59%)
Mutual labels:  mnemonic, bip39
ethereum-hdwallet
CLI and Node.js library for Ethereum HD Wallet derivations from mnemonic
Stars: ✭ 44 (-50%)
Mutual labels:  mnemonic, bip39
Seedshift
Plausibly deniable steganographic encryption of BIP-39 mnemonic seed words with a date shift cipher
Stars: ✭ 21 (-76.14%)
Mutual labels:  mnemonic, bip39
ChainWallet
一个以研究技术为目地的基础项目,也只有最基本 Bitcoin、Ethereum 、EOS 相关的加密算法。
Stars: ✭ 26 (-70.45%)
Mutual labels:  mnemonic, bip39
bitcoin-kit-android
Comprehensive Bitcoin development library for iOS, implemented on Swift. SPV wallet implementation for Bitcoin, Bitcoin Cash, Litecoin and Dash blockchains. Fully compliant with existing standards and BIPs.
Stars: ✭ 102 (+15.91%)
Mutual labels:  litecoin
altcoin-bitcoin-explorer
PHP Altcoin/Bitcoin Data Explorer
Stars: ✭ 19 (-78.41%)
Mutual labels:  litecoin
Essentia-iOS
All in One Blockchain solution
Stars: ✭ 50 (-43.18%)
Mutual labels:  litecoin
wallet-address-validator
Useful library for validation of Bitcoin, Litecoin, Ethereum and other cryptocoin addresses
Stars: ✭ 240 (+172.73%)
Mutual labels:  litecoin
bitopro-api-ruby
API Wrapper gem for the Bitopro(幣託) crypto currency exchange written in Ruby.
Stars: ✭ 15 (-82.95%)
Mutual labels:  litecoin
miningcore
Miningcore is a high-performance Mining Pool Software for Linux and Windows.
Stars: ✭ 554 (+529.55%)
Mutual labels:  litecoin
gdax bot
gdax_bot - Micro dollar cost averaging for crypto
Stars: ✭ 57 (-35.23%)
Mutual labels:  litecoin
Bitcoin-Payment-Gateway-ASP.NET
Bitcoin Payment Gateway API on ASP.NET. Accept Bitcoin, Litecoin, Dogecoin, Dash, Speedcoin, Reddcoin, Potcoin, Feathercoin, BTC, Vertcoin, Vericoin, Peercoin, Paycoin, MonetaryUnit, Swiscoin Payments Online on your ASP.NET C# website
Stars: ✭ 56 (-36.36%)
Mutual labels:  litecoin
marscoin
Marscoin source tree
Stars: ✭ 37 (-57.95%)
Mutual labels:  litecoin
desktop
CoinApp is a simple to use minimal Cryptocurrency Wallet for Ethereum, ERC20 Tokens, Bitcoin and Litecoin built for Windows, Mac and Linux.
Stars: ✭ 60 (-31.82%)
Mutual labels:  litecoin
Bitcoin-wallet-cracker
Automated Bitcoin wallet generator that with mnemonic and passphrases bruteforces wallet addresses
Stars: ✭ 140 (+59.09%)
Mutual labels:  mnemonic
crypto-price-widget
Easily track the price of your favorite crypto in an attractive desktop widget
Stars: ✭ 72 (-18.18%)
Mutual labels:  litecoin
lara-block-io
A Laravel Package/Facade for the Block.io API
Stars: ✭ 22 (-75%)
Mutual labels:  litecoin
bitcoin-cryptocurrency-tutorial
PHP & Cryptocurrencies Collections. Powered By https://btcschools.net
Stars: ✭ 142 (+61.36%)
Mutual labels:  litecoin
rn-bitcoinjs-lib
A React Native compatible implementation of bitcoinjs-lib
Stars: ✭ 28 (-68.18%)
Mutual labels:  litecoin

Download Build Status codecov

Read all about how I wrote this and understanding BIP39 here.

Apart from generating a seed, only English, French, Spanish and Japanese currently packaged, but as WordList is an interface and you can provide your own.

Install

Use either of these repositories:

repositories {
    jcenter()
}

Or:

repositories {
    maven {
        url 'https://dl.bintray.com/novacrypto/BIP/'
    }
}

Add dependency:

dependencies {
    compile 'io.github.novacrypto:BIP39:2019.01.27'
}

Usage

Generate a mnemonic

Using a StringBuilder:

StringBuilder sb = new StringBuilder();
byte[] entropy = new byte[Words.TWELVE.byteLength()];
new SecureRandom().nextBytes(entropy);
new MnemonicGenerator(English.INSTANCE)
    .createMnemonic(entropy, sb::append);
System.out.println(sb.toString());

If you're paranoid and/or need higher than normal memory security, consider using a SecureCharBuffer:

try (SecureCharBuffer secure = new SecureCharBuffer()) {
    byte[] entropy = new byte[Words.TWELVE.byteLength()];
    new SecureRandom().nextBytes(entropy);
    new MnemonicGenerator(English.INSTANCE)
        .createMnemonic(entropy, secure::append);
    Arrays.fill(entropy, (byte) 0); //empty entropy
    //do something with your secure mnemonic
}

Validate a mnemonic

try {
    MnemonicValidator
        .ofWordList(English.INSTANCE)
        .validate(mnemonic);
} catch (UnexpectedWhiteSpaceException e) {
   ...
} catch (InvalidWordCountException e) {
    ...
} catch (InvalidChecksumException e) {
     ...
} catch (WordNotFoundException e) {
    ...
    //e.getSuggestion1()
    //e.getSuggestion2()
}

Or if you have a list of words from a word list:

MnemonicValidator
        .ofWordList(English.INSTANCE)
        .validate(mnemonicWordsInAList);

Generate a seed

As does not use a word list, can be used now for any language.

byte[] seed = new SeedCalculator().calculateSeed(mnemonic, passphrase);

Or if you have a list of words from a word list:

byte[] seed = new SeedCalculator()
                     .withWordsFromWordList(English.INSTANCE)
                     .calculateSeed(mnemonicWordsInAList, passphrase);

Note: it will work for words off of the word list, but it allows use of secure CharSequences if they match the wordlist, normalized or not (as they are never toStringed)

Those examples both use SpongyCastle, if you don't need or want that dependency, you can use javax.crypto like so:

byte[] seed = new SeedCalculator(JavaxPBKDF2WithHmacSHA512.INSTANCE).calculateSeed(mnemonic, passphrase);

That will not work on Android API < 26 https://developer.android.com/reference/javax/crypto/SecretKeyFactory.html and see Issue #17.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].