remove unnecessary bignum conversion
This commit is contained in:
parent
6a4387e768
commit
86bb67b76d
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue