Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

simple-js-ecdsa

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-js-ecdsa - npm Package Compare versions

Comparing version 1.3.1 to 1.4.0

4

package.json
{
"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') {

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