simple-js-ecdsa
Advanced tools
Comparing version 1.3.1 to 1.4.0
{ | ||
"name": "simple-js-ecdsa", | ||
"version": "1.3.1", | ||
"version": "1.4.0", | ||
"description": "easy and light weight ecdsa implementation", | ||
@@ -29,4 +29,4 @@ "main": "./src/index.js", | ||
"bs58": "^4.0.1", | ||
"simple-js-ec-math": "^1.0.3" | ||
"simple-js-ec-math": "^1.2.0" | ||
} | ||
} |
@@ -45,3 +45,2 @@ const bigInt = require('big-integer') | ||
sign(message, k = this.curve.modSet.random()) { | ||
k = bigInt(k, 16) | ||
const e = bigInt(sha256(message), 16) | ||
@@ -92,3 +91,3 @@ | ||
const p = this.curve.add(this.curve.multiply(this.curve.g, u1), this.curve.multiply(this.publicPoint, u2)) | ||
return p.x == r | ||
return p.x.toString(16) == r.toString(16) | ||
} | ||
@@ -95,0 +94,0 @@ |
@@ -68,3 +68,3 @@ try { | ||
const identity = Identity.fromKey('82ef796afbce6e67bcb6bc44d922e5d2e664ebe118c0ed5b6ce3b481a638ec90') | ||
const signature = identity.sign('test', '2900c9abe4a9d00b2a4aa6663d8f4989c8cac35f4fe9b2c5b66e07a3903e1c3') | ||
const signature = identity.sign('test', bigInt('2900c9abe4a9d00b2a4aa6663d8f4989c8cac35f4fe9b2c5b66e07a3903e1c3', 16)) | ||
const bip66Sig = identity.bip66Sign('test') | ||
@@ -71,0 +71,0 @@ if (signature.r.toString(16) !== '85a44b824bda975b15ac77a3256c5d6f21c19b0412eb19333844fc2dbd25dbba') { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39479
880
Updatedsimple-js-ec-math@^1.2.0