Socket
Socket
Sign inDemoInstall

bitcore-lib-cash

Package Overview
Dependencies
20
Maintainers
3
Versions
100
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 8.25.8 to 8.25.9

7

lib/crypto/signature.js

@@ -217,9 +217,8 @@ 'use strict';

if(signingMethod === "schnorr") {
return Buffer.concat([this.r.toBuffer({size: 32}), this.s.toBuffer({size: 32})]);
}
var rnbuf = this.r.toBuffer();
var snbuf = this.s.toBuffer();
if(signingMethod === "schnorr") {
return Buffer.concat([rnbuf, snbuf]);
}

@@ -226,0 +225,0 @@ var rneg = rnbuf[0] & 0x80 ? true : false;

{
"name": "bitcore-lib-cash",
"version": "8.25.8",
"version": "8.25.9",
"description": "A pure and powerful JavaScript Bitcoin Cash library.",

@@ -38,3 +38,3 @@ "author": "BitPay <dev@bitpay.com>",

"dependencies": {
"bitcore-lib": "^8.25.8",
"bitcore-lib": "^8.25.9",
"bn.js": "=4.11.8",

@@ -49,3 +49,3 @@ "bs58": "^4.0.1",

"base-x": "=3.0.4",
"bitcore-build": "^8.25.8",
"bitcore-build": "^8.25.9",
"brfs": "^2.0.1",

@@ -52,0 +52,0 @@ "chai": "^4.2.0",

@@ -36,2 +36,16 @@ 'use strict';

it("Sign Schnorr padding", function() {
schnorr.hashbuf = Hash.sha256((Buffer.from('Very deterministic messageg6', 'utf-8')));
schnorr.endianess = 'big';
schnorr.privkey = new Privkey(BN.fromBuffer('12b004fff7f4b69ef8650e767f18f11ede158148b425660723b9f9a66e61f747','hex'), 'livenet');
schnorr.privkey2pubkey();
schnorr.sign();
schnorr.verify().verified.should.equal(true);
let x = new Signature();
x.isSchnorr = true;
x.set(schnorr.sig);
let str = x.toBuffer("schnorr").toString('hex');
str.should.equal("005e7ab0906a0164306975916350214a69fb80210cf7e37533f197c3d18b23d1b794262dc663d9e99605784b14ee1ecfca27b602e88dbc87af85f9907c214ea3");
});
// Following Test Vectors used from

@@ -38,0 +52,0 @@ // https://github.com/sipa/bips/blob/bip-schnorr/bip-schnorr/test-vectors.csv

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc