remove unnecessary bignum conversion

This commit is contained in:
Ryan X. Charles 2014-04-22 17:45:08 -03:00
parent 6a4387e768
commit 86bb67b76d
1 changed files with 2 additions and 2 deletions

View File

@ -281,12 +281,12 @@ BIP32.prototype.deriveChild = function(i) {
} else {
var data = Buffer.concat([this.eckey.public, ib]);
var hash = coinUtil.sha512hmac(data, this.chainCode);
var il = bignum.fromBuffer(hash.slice(0, 32), {size: 32});
var il = hash.slice(0, 32);
var ir = hash.slice(32, 64);
// Ki = (IL + kpar)*G = IL*G + Kpar
var ilGkey = new Key();
ilGkey.private = il.toBuffer({size: 32});
ilGkey.private = il;
ilGkey.regenerateSync();
var ilG = Point.fromKey(ilGkey);
var oldkey = new Key();