bip32.org format not used for seed

ie put the bip39 seed directly into bip32 without hashing it first like
bip32.org does with passphrases.
This commit is contained in:
Ian Coleman
2014-09-26 20:05:11 +10:00
parent d4779799ca
commit bade150497
2 changed files with 2 additions and 4 deletions

View File

@@ -22865,8 +22865,7 @@ WORDLISTS = {
function calcBip32Seed(phrase, passphrase, path) {
var seed = mnemonic.toSeed(phrase, passphrase);
var seedHash = Bitcoin.crypto.sha256(seed).toString("hex");
bip32RootKey = Bitcoin.HDNode.fromSeedHex(seedHash, network);
bip32RootKey = Bitcoin.HDNode.fromSeedHex(seed, network);
bip32ExtendedKey = bip32RootKey;
// Derive the key from the path
var pathBits = path.split("/");

View File

@@ -164,8 +164,7 @@
function calcBip32Seed(phrase, passphrase, path) {
var seed = mnemonic.toSeed(phrase, passphrase);
var seedHash = Bitcoin.crypto.sha256(seed).toString("hex");
bip32RootKey = Bitcoin.HDNode.fromSeedHex(seedHash, network);
bip32RootKey = Bitcoin.HDNode.fromSeedHex(seed, network);
bip32ExtendedKey = bip32RootKey;
// Derive the key from the path
var pathBits = path.split("/");