Comparing version 3.2.0 to 3.2.2
14
API.md
@@ -120,2 +120,9 @@ # API Reference (v3.x) | ||
Inputs: 32-byte message m, 32-byte scalar key d, 32-byte scalar nonce k. | ||
* Compute point R = k * G. Reject nonce if R's x coordinate is zero. | ||
* Compute 32-byte scalar r, the serialization of R's x coordinate. | ||
* Compose 32-byte scalar s = k^-1 \* (r \* d + m). Reject nonce if s is zero. | ||
* The signature is (r, s). | ||
######Option: `Function noncefn` | ||
@@ -139,2 +146,9 @@ | ||
Inputs: 32-byte message m, public key point Q, signature: (32-byte r, scalar s). | ||
* Signature is invalid if r is zero. | ||
* Signature is invalid if s is zero. | ||
* Compute point R = (s^-1 \* m \* G + s^-1 \* r \* Q). Reject if R is infinity. | ||
* Signature is valid if R's x coordinate equals to r. | ||
<hr> | ||
@@ -141,0 +155,0 @@ |
@@ -201,6 +201,7 @@ 'use strict' | ||
var eNeg = BN.n.sub(BN.fromBuffer(message)) | ||
var rInv = sigr.uinvm() | ||
var point = ECPoint.fromECJPoint(g.mulAdd(eNeg, kp, sigs)) | ||
return point.mul(rInv).toPublicKey(compressed) | ||
var s1 = BN.n.sub(BN.fromBuffer(message)).umul(rInv).ureduce() | ||
var s2 = sigs.umul(rInv).ureduce() | ||
var point = ECPoint.fromECJPoint(g.mulAdd(s1, kp, s2)) | ||
return point.toPublicKey(compressed) | ||
} while (false) | ||
@@ -207,0 +208,0 @@ |
{ | ||
"name": "secp256k1", | ||
"version": "3.2.0", | ||
"version": "3.2.2", | ||
"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
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
924994
2261