Post
Topic
Board Development & Technical Discussion
Merits 2 from 1 user
BIP 32 - Find xprv from seed and passphrase (bitcore-mnemonic)
by
redPanda
on 11/04/2016, 19:19:05 UTC
⭐ Merited by ABCbits (2)
from BIP 47:  https://github.com/trezor/python-mnemonic/blob/master/vectors.json
Code:
passphrase = "TREZOR";
entropy = "00000000000000000000000000000000";
code    = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about";
seed    = "c55257c360c07c72029aebc1b53c05ed0362ada38ead3e3e9efa3708e53495531f09a6987599d18264c1e1c92f2cf141630c7a3c4ab7c81b2f001698e7463b04";
xprv    = "xprv9s21ZrQH143K3h3fDYiay8mocZ3afhfULfb5GX8kCBdno77K4HiA15Tg23wpbeF1pLfs1c5SPmYHrEpTuuRhxMwvKDwqdKiGJS9XFKzUsAF";
from entropy and passphrase, I can find code, seed and xprv with bitcore-mnemonic (node.js):
Code:
var Mnemonic = require('bitcore-mnemonic');
mnemonic   = Mnemonic._entropy2mnemonic(new Buffer(entropy, 'hex'), Mnemonic.Words.ENGLISH);
customCode = new Mnemonic(mnemonic);
theSeed    = customCode.toSeed(passphrase);
xprv       = customCode.toHDPrivateKey(passphrase);

Now I would like to use "seed" in BIP 32 with passphrase and find xprv (and mnemonic?) with bitcore-mnemonic.
Is there a way to do that ?