New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jwcrypto

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jwcrypto - npm Package Compare versions

Comparing version 0.0.3 to 0.1.0

libs/bigint-patch.js

21

algs/ds.js

@@ -39,2 +39,3 @@ /* ***** BEGIN LICENSE BLOCK *****

//var BigInteger = libs.BigInteger;
var BigInteger = libs.BigInteger;

@@ -55,3 +56,3 @@

// we don't actually need to do modulus here, because of the previous assumption
return new libs.BigInteger(raw_hash, "16");
return new BigInteger(raw_hash, "16");
}

@@ -127,3 +128,3 @@

// result = (c mod (q-1)) + 1
return new libs.BigInteger(q.bitLength() + 64, rng).mod(q.subtract(BigInteger.ONE)).add(BigInteger.ONE);
return new BigInteger(q.bitLength() + 64, rng).mod(q.subtract(BigInteger.ONE)).add(BigInteger.ONE);
}

@@ -142,5 +143,5 @@

function keysizeFromObject(obj) {
var p = new libs.BigInteger(obj.p, 16);
var q = new libs.BigInteger(obj.q, 16);
var g = new libs.BigInteger(obj.g, 16);
var p = new BigInteger(obj.p, 16);
var q = new BigInteger(obj.q, 16);
var g = new BigInteger(obj.g, 16);

@@ -221,7 +222,7 @@ var keysize = _getKeySizeFromYBitlength(p.bitLength());

// check rangeconstraints
if ((r.compareTo(libs.BigInteger.ZERO) < 0) || (r.compareTo(params.q) > 0)) {
if ((r.compareTo(BigInteger.ZERO) < 0) || (r.compareTo(params.q) > 0)) {
console.log("problem with r: " + r.toString(16));
return false;
}
if ((s.compareTo(libs.BigInteger.ZERO) < 0) || (s.compareTo(params.q) > 0)) {
if ((s.compareTo(BigInteger.ZERO) < 0) || (s.compareTo(params.q) > 0)) {
console.log("problem with s");

@@ -256,3 +257,3 @@ return false;

PublicKey.prototype.deserializeFromObject = function(obj) {
this.y = new libs.BigInteger(obj.y, 16);
this.y = new BigInteger(obj.y, 16);

@@ -293,3 +294,3 @@ //this.keysize = _getKeySizeFromYBitlength(this.y.bitLength());

if (r.equals(libs.BigInteger.ZERO)) {
if (r.equals(BigInteger.ZERO)) {
console.log("oops r is zero");

@@ -308,3 +309,3 @@ continue;

if (s.equals(libs.BigInteger.ZERO)) {
if (s.equals(BigInteger.ZERO)) {
console.log("oops s is zero");

@@ -311,0 +312,0 @@ continue;

@@ -18,2 +18,3 @@ preliminaries.js

external/rng.js
bigint-patch.js
exports.js
{
"name": "jwcrypto"
, "version": "0.0.3"
, "version": "0.1.0"
, "dependencies": {
"browserify": "1.5.0",
"vows": "0.5.13",
"optimist": "0.2.6"
"optimist": "0.2.6",
"bigint": "https://github.com/benadida/node-bigint/tarball/2ac68"
}

@@ -9,0 +10,0 @@ , "scripts": {

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