All Projects → jwerle → shamirs-secret-sharing

jwerle / shamirs-secret-sharing

Licence: MIT license
A simple implementation of Shamir's Secret Sharing configured to use a finite field in GF(2^8) with 128 bit padding

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to shamirs-secret-sharing

tss-rb
A Ruby implementation of Threshold Secret Sharing (Shamir) as defined in IETF Internet-Draft draft-mcgrew-tss-03.txt
Stars: ✭ 22 (-62.71%)
Mutual labels:  secret, sharing, shamir
secrets
Simple Secret Sharing Service for social and decentralised management of passwords
Stars: ✭ 30 (-49.15%)
Mutual labels:  secret, shamir
sss-node
node.js bindings for the sss secret sharing library
Stars: ✭ 30 (-49.15%)
Mutual labels:  shamir-secret-sharing
PyPPSPP
Python implementation of Peer-to-Peer Streaming Peer Protocol (PPSPP) [RFC7574]
Stars: ✭ 18 (-69.49%)
Mutual labels:  sharing
SecMML
SecMML: Secure MPC(multi-party computation) Machine Learning Framework
Stars: ✭ 91 (+54.24%)
Mutual labels:  shamir-secret-sharing
shared-react-components-example
An example of a mono-repository of shared React components libraries!
Stars: ✭ 85 (+44.07%)
Mutual labels:  sharing
capacitor-filesharer
Capacitor plugin to download and share files for the Web, Android and iOS! Stop the war in Ukraine!
Stars: ✭ 55 (-6.78%)
Mutual labels:  sharing
2read
Convert article in current tab to readable form and upload it to P2P network - IPFS
Stars: ✭ 130 (+120.34%)
Mutual labels:  sharing
Meteor-Files-Demo
Demo application for ostrio:files package
Stars: ✭ 16 (-72.88%)
Mutual labels:  sharing
ghost
A simple, server/less, single-api, multi-backend, ghostly secret-store/key-store for your passwords, ssh-keys and cloud credentials. Ghost isn't real, it's just in your head.
Stars: ✭ 36 (-38.98%)
Mutual labels:  secret
synator
Synator Kubernetes Secret and ConfigMap synchronizer
Stars: ✭ 108 (+83.05%)
Mutual labels:  secret
lockup
Lockup Gem
Stars: ✭ 111 (+88.14%)
Mutual labels:  secret
limus
🎨 Make your screenshot/image more professional by rotating, adding shadow and more.
Stars: ✭ 101 (+71.19%)
Mutual labels:  sharing
joatu-v2
The JoatU application, version 2. Written in Ruby on Rails.
Stars: ✭ 27 (-54.24%)
Mutual labels:  sharing
Hemmelig.app
Keep your sensitive information out of chat logs, emails, and more with encrypted secrets.
Stars: ✭ 183 (+210.17%)
Mutual labels:  secret
QR-secret-sharing
🔒 Create QR codes to secret-share a message. Ideal for cryptocurrency wallet recovery keys and passwords.
Stars: ✭ 94 (+59.32%)
Mutual labels:  shamir-secret-sharing
sss-cli
Command line program for secret-sharing strings
Stars: ✭ 52 (-11.86%)
Mutual labels:  shamir-secret-sharing
Communicado
A simpler way to share on iOS.
Stars: ✭ 26 (-55.93%)
Mutual labels:  sharing
gnirts
Obfuscate string literals in JavaScript code.
Stars: ✭ 65 (+10.17%)
Mutual labels:  secret
littlebox
Android app for simple seamless sharing of your files within Intranet/LAN
Stars: ✭ 12 (-79.66%)
Mutual labels:  sharing

shamirs-secret-sharing

A simple implementation of Shamir's Secret Sharing configured to use a finite field in GF(2^8) with 128 bit padding.

Preface

Much of what you see in this module has been ported from or directly influenced by secrets.js, c-sss, and libgfshare

Installation

$ npm install shamirs-secret-sharing

Example Usage

const sss = require('shamirs-secret-sharing')
const secret = Buffer.from('secret key')
const shares = sss.split(secret, { shares: 10, threshold: 4 })
const recovered = sss.combine(shares.slice(3, 7))
console.log(recovered.toString()) // 'secret key'

API

shares = sss.split(secret, opts)

Generate a set of unique and distinct shares for a secret with a configured threshold.

  • secret (required) - A Buffer instance or string that represents a secret for which shares are created for
  • opts (required) - An object of options for configuring how shares are created for a secret
    • opts.shares (required) - The number of n shares that should be created for this secret
    • opts.threshold (required) - The number of t of n distinct share that are required to reconstruct this secret
    • opts.random (optional) - An optional Pseudorandom number generator (PRNG) function that should generate a random value buffer based on some input. e.g opts.random = (size) => randomBytes(size)

secret = sss.combine(shares)

Reconstruct a secret from a distinct set of shares. This function will not throw an error for incorrect shares or if p(0) is not the correct secret for the given shares.

  • shares (required) - An array of shares, that is an array of equally sized and distinct Buffer instances, or strings

See Also

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].