mirror of
https://github.com/hanzoai/elliptic.git
synced 2026-09-23 23:51:03 +00:00
lib: adapt to [email protected]
This commit is contained in:
@@ -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
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user