This commit is contained in:
Fedor Indutny
2015-10-28 18:13:45 -04:00
parent 676db36e64
commit 0280049ec3
2 changed files with 7 additions and 7 deletions
+6 -6
View File
@@ -151,11 +151,11 @@ ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {
}
// Normalize signs
if (a1.sign) {
if (a1.negative) {
a1 = a1.neg();
b1 = b1.neg();
}
if (a2.sign) {
if (a2.negative) {
a2 = a2.neg();
b2 = b2.neg();
}
@@ -223,12 +223,12 @@ ShortCurve.prototype._endoWnafMulAdd =
var p = points[i];
var beta = p._getBeta();
if (split.k1.sign) {
split.k1.sign = !split.k1.sign;
if (split.k1.negative) {
split.k1.ineg();
p = p.neg(true);
}
if (split.k2.sign) {
split.k2.sign = !split.k2.sign;
if (split.k2.negative) {
split.k2.ineg();
beta = beta.neg(true);
}
+1 -1
View File
@@ -33,7 +33,7 @@
"uglify-js": "^2.4.13"
},
"dependencies": {
"bn.js": "^3.1.1",
"bn.js": "^4.0.0",
"brorand": "^1.0.1",
"hash.js": "^1.0.0",
"inherits": "^2.0.1"