Socket
Socket
Sign inDemoInstall

secp256k1

Package Overview
Dependencies
Maintainers
4
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

secp256k1 - npm Package Compare versions

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 @@

7

lib/js/index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc