create-ecdh
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -56,5 +56,3 @@ var elliptic = require('elliptic'); | ||
} | ||
other = new BN(other); | ||
other = other.toString(16); | ||
var otherPub = this.curve.keyPair(other, 'hex').getPublic(); | ||
var otherPub = this.curve.keyFromPublic(other).getPublic(); | ||
var out = otherPub.mul(this.keys.getPrivate()).getX(); | ||
@@ -85,5 +83,3 @@ return formatReturnValue(out, enc, this.curveType.byteLength); | ||
} | ||
var pkey = new BN(pub); | ||
pkey = pkey.toArray(); | ||
this.keys._importPublicHex(pkey); | ||
this.keys._importPublic(pub); | ||
return this; | ||
@@ -118,2 +114,2 @@ }; | ||
} | ||
} | ||
} |
{ | ||
"name": "create-ecdh", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "createECDH but browserifiable", | ||
@@ -26,4 +26,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"bn.js": "^1.0.0", | ||
"elliptic": "^1.0.0" | ||
"bn.js": "^2.0.0", | ||
"elliptic": "^3.0.0" | ||
}, | ||
@@ -30,0 +30,0 @@ "devDependencies": { |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
3901
102
+ Addedbn.js@2.2.0(transitive)
+ Addedelliptic@3.1.0(transitive)
- Removedbn.js@1.3.0(transitive)
- Removedelliptic@1.0.1(transitive)
Updatedbn.js@^2.0.0
Updatedelliptic@^3.0.0