@spliterati-sdamashek/shamir

0.2.1 • Public • Published

shamir

This library is a port of the arbitrary-length per-byte shamir secret sharing implementation from Hashicorp's Vault product.

I have removed the constant runtime functionality from the galois field arithmetic, as it doesn't really add much to the security of this system.

Usage

import {Shamir} from '@spliterati/shamir';

const secret : Uint8Array = ...;
// ... 
const shares = Shamir.split(secret, 5, 3);

const reassembled = Shamir.combine([shares[0], shares[3], shares[1]]);
// arbitrary indices

expect(secret).toEqual(reassembled);

Package Sidebar

Install

npm i @spliterati-sdamashek/shamir

Weekly Downloads

1

Version

0.2.1

License

MPL-2.0

Unpacked Size

15.2 kB

Total Files

7

Last publish

Collaborators

  • sdamashek