All Projects → mlouielu → iota-mnemonic

mlouielu / iota-mnemonic

Licence: MIT license
Generate, restore IOTA seed from Bitcoin BIP39 mnemonic

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to iota-mnemonic

ethereum-hdwallet
CLI and Node.js library for Ethereum HD Wallet derivations from mnemonic
Stars: ✭ 44 (+175%)
Mutual labels:  mnemonic, bip39
ChainWallet
一个以研究技术为目地的基础项目,也只有最基本 Bitcoin、Ethereum 、EOS 相关的加密算法。
Stars: ✭ 26 (+62.5%)
Mutual labels:  mnemonic, bip39
Seedshift
Plausibly deniable steganographic encryption of BIP-39 mnemonic seed words with a date shift cipher
Stars: ✭ 21 (+31.25%)
Mutual labels:  mnemonic, bip39
BIP39
Java Microlibrary implementation of BIP0039
Stars: ✭ 88 (+450%)
Mutual labels:  mnemonic, bip39
mnemonic-sdk
Mnemonic bip39 bip32 bip44 生成助记词 私钥
Stars: ✭ 25 (+56.25%)
Mutual labels:  mnemonic, bip39
iota.lib.rb
Ruby Library for IOTA with core and wrapper api implementation.
Stars: ✭ 17 (+6.25%)
Mutual labels:  iota, iota-library
Tangleid
Secure self-sovereign identity built on IOTA/Tangle
Stars: ✭ 141 (+781.25%)
Mutual labels:  iota
Multy-Core
Cross-platform mobile-first library for HD wallets and creating raw transactions of Bitcoin and Ethereum.
Stars: ✭ 23 (+43.75%)
Mutual labels:  bip39
Iota Java
IOTA Java API Library. Find documentation on
Stars: ✭ 137 (+756.25%)
Mutual labels:  iota
Entangled
enTangle'd is an amalgamation of all things Tangle
Stars: ✭ 107 (+568.75%)
Mutual labels:  iota
iota.php
Interact with IOTA through PHP
Stars: ✭ 45 (+181.25%)
Mutual labels:  iota
meta-iota
OpenEmbedded layer for the IOTA Distributed Ledger
Stars: ✭ 41 (+156.25%)
Mutual labels:  iota
Goshimmer
GoShimmer implementation of Coordicide
Stars: ✭ 244 (+1425%)
Mutual labels:  iota
Hornet
HORNET is a powerful IOTA fullnode software
Stars: ✭ 168 (+950%)
Mutual labels:  iota
iota esp32 wallet
IOTA Wallet application on ESP32
Stars: ✭ 34 (+112.5%)
Mutual labels:  iota
Nelson.cli
WE HAVE MOVED TO A NEW REPOSITORY
Stars: ✭ 139 (+768.75%)
Mutual labels:  iota
hd-address
An extensible HD Wallet Address management utility
Stars: ✭ 22 (+37.5%)
Mutual labels:  mnemonic
Awesome Iota
A community driven list of useful IOTA blogs, articles, videos and tools.
Stars: ✭ 109 (+581.25%)
Mutual labels:  iota
Dweb.page
Your Gateway to the Distributed Web
Stars: ✭ 239 (+1393.75%)
Mutual labels:  iota
iota-python
A Pure-Python implementation of IOTA node
Stars: ✭ 30 (+87.5%)
Mutual labels:  iota

IOTA Mnemonic

This is a command line tool to help user generate IOTA seed from Bitcoin BIP39 mnenomics

Install

$ pipenv install iota_mnemonic

To install IOTA mnemonic, simply run this simple command in your terminal of choice:

$ pipenv install iota_mnemonic

Get the source code

You can clone the source code from repository:

$ git clone https://github.com/mlouielu/iota-mnemonic

How to use

# Generate 24 words mnemonic and IOTA seed
$ python -m iota_mnemonic
Mnemonic: come grocery cube calm void liberty increase pigeon captain appear employ among 
float fancy cargo faith seek buzz argue lift agent split bachelor judge
IOTA Seed: RTWTRPAEGJQFRWAYTIJTKWZKLN9K9VRUETFSIPUAUCLKPNNSNWAKTOXBWSCPQVNNWDLTEIPMILIOVPGIX

# Generate mnemonic with passphrase
$ python -m iota_mnemonic -p TREZOR
Mnemonic: limit about defy sail base useless soul album aim border celery false asset average 
romance attract lonely track hope sun afford creek dignity couple
IOTA Seed: LIPSSXDAJQRLBPTTBQTPTYBMUSTJPXWGYBKLSSBDVKPVEAXDGPZXOWPMEGRNSHTJXIUVCXYFTOXMZKIMY

# Generate 12 words mnemonic with passphrase
$ python -m iota_mnemonic -s 128 -p TREZOR
Mnemonic: broccoli merry lucky milk lizard cannon area utility jelly click bag clever
IOTA Seed: YNONELPCFBKQDDQMIBBBGJDZODCKXEBIJIMXRUGBA9AOPJEQ9SYYLGID9IXHILWVVDJ9ZEGQHCGIHQ9TB

# Genreate mnemonic with japanese
$ python -m iota_mnemonic -l japanese
Mnemonic: こいぬ ようちえん むせん いんさつ しなもの ふのう かわく ひかり はいけん 
そんしつ たたかう ちいさい そうめん つうわ にんげん とおす さみだれ かまぼこ 
らくだ さずかる ふとる とんかつ きびしい ひつぜん
IOTA Seed: ISBAFGB9LBGOQYGKKMMNK9APICZCGWIJHCMLOLPAQITGSSIGBJJOYQZJJ9NNGYIJLFB9ORMJGCWFFFYQZ

# Output the mnemonic to file
$ python -m iota_mnemonic -p TREZOR -o mnemonic

# Recover seed from mnemonic
$ python -m iota_menmonic -p TREZOR -f mnemonic
Mnemonic: often various act decide tongue sausage summer wall priority knock finish until 
taxi robot panic toward giraffe acid avocado anchor travel kiwi actress cream
IOTA Seed: CRGFVETUFKUQYTPTEH9TP9BDKBVZLG9UZJDZBDMMFSSCUPIATPEZMKBLKXOEKCRDFHHFNCCBF9SKHNYIA

How it works?

To create IOTA seed from the mnemonic, we use IOTA Kerl function with a mnemonic sentence (in UTF-8 NFKD) used as the password and the string "mnemonic" + passphrase (again in UTF-8 NFKD) used as the salt.

To get a valid tryte hash, we concat salt and mnemonic sentence, and load into iota.Hash by from_string function. from_string will encode UTF-8 NFKD into bytes, then convert bytes into IOTA hash.

Using each hash, we then use hash trits and Kerl to absorb and squeeze:

trits = []
sponge = iota.crypto.kerl.Kerl()

for word in mnemonic:
    hash = iota.Hash.from_string(f'mnemonic{passphrase}{word}')
    hash_trits = hash.as_trits()
    k = iota.crypto.kerl.Kerl()
    k.absorb(hash_trits)
    k.squeeze(hash_trits)
    sponge.absorb(hash_trits)
sponge.squeeze(trits)
return iota.Hash.from_trits(trits)
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].