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

@spliterati/shamir

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spliterati/shamir - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

dist/shamir.test.d.ts

2

dist/shamir.d.ts

@@ -1,2 +0,2 @@

import { uint8 } from '@spliterati/uint8';
import type { uint8 } from '@spliterati/uint8';
export declare module GF2p8 {

@@ -3,0 +3,0 @@ const FIELD: number;

@@ -9,2 +9,3 @@ "use strict";

const utils_1 = __importDefault(require("@spliterati/utils"));
const constant_time_js_1 = require("constant-time-js");
var GF2p8;

@@ -83,12 +84,9 @@ (function (GF2p8) {

const mul = (a, b) => {
if (a === 0 || b === 0) {
return 0;
}
const sum = (logTable[a] + logTable[b]) % (GF2p8.FIELD - 1);
return expTable[sum];
let ret = expTable[sum];
ret = constant_time_js_1.select_ints(constant_time_js_1.compare_ints(0, a), ret, 0);
ret = constant_time_js_1.select_ints(constant_time_js_1.compare_ints(0, b), ret, 0);
return ret;
};
const div = (a, b) => {
if (a === 0) {
return 0;
}
if (b === 0) {

@@ -99,3 +97,5 @@ throw new RangeError('div zero');

const diff = ((logTable[a] - logTable[b]) + fm1) % fm1;
return expTable[diff];
let ret = expTable[diff];
ret = constant_time_js_1.select_ints(constant_time_js_1.compare_ints(a, 0), ret, 0);
return ret;
};

@@ -102,0 +102,0 @@ class Polynomial {

{
"name": "@spliterati/shamir",
"version": "0.4.0",
"version": "0.5.0",
"description": "Arbitrary-length shamir implementation",

@@ -33,5 +33,6 @@ "private": false,

"dependencies": {
"@spliterati/uint8": "^1.0.4",
"@spliterati/utils": "^0.3.0",
"@types/node": "^14.14.20"
"@spliterati/uint8": "^1.0.5",
"@spliterati/utils": "^0.3.1",
"@types/node": "^14.14.20",
"constant-time-js": "https://github.com/soatok/constant-time-js.git#8e056b2"
},

@@ -54,3 +55,3 @@ "devDependencies": {

},
"gitHead": "69755a969f98668751e3d2e1b33362f9f24839e0"
"gitHead": "cbd41342e23c810e9bc6645859ab005106612495"
}

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