Comparing version 2.0.8 to 2.0.9
@@ -0,1 +1,3 @@ | ||
var BN = require('bn.js') | ||
var asserts = require('../asserts') | ||
@@ -30,2 +32,6 @@ var messages = require('../messages') | ||
var sigObj = {r: signature.slice(0, 32), s: signature.slice(32, 64)} | ||
if (new BN(sigObj.r).isZero() || new BN(sigObj.s).isZero()) { | ||
throw new Error() | ||
} | ||
var pubKey = ec.recoverPubKey(msg, sigObj, recovery) | ||
@@ -32,0 +38,0 @@ return new Buffer(pubKey.encodeCompressed()) |
@@ -0,1 +1,3 @@ | ||
var BN = require('bn.js') | ||
var asserts = require('../asserts') | ||
@@ -33,3 +35,7 @@ var messages = require('../messages') | ||
var sigObj = {r: signature.slice(0, 32), s: signature.slice(32, 64)} | ||
if (new BN(sigObj.s).cmp(ec.nh) === 1) { | ||
return false | ||
} | ||
return ec.verify(msg, sigObj, publicKey) | ||
} |
{ | ||
"name": "secp256k1", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"description": "This module provides native bindings to ecdsa secp256k1 functions", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
931
741567
119