Git Product home page Git Product logo

sss-crypto's Introduction

Shamir's secret sharing crypto

badge

About

This is a helper utility to generate a private key split in n shares that can be later reassembled via k of them to decrypt a document. Is uses an implementation of Shamir's threshold secret sharing scheme in JavaScript (with the help of secrets.js library).

Workflow

The general use case looks like this:

  1. Alice generates a public / private key pair with a private key splitted in n shares and public key saved non-securely (e.g. yarn start generate-shares -k 3 -n 5)
  2. Alice sends n shares to Bobs to let them decrypt her message later.
  3. Alice encrypts data with an encryption tool and public key saved in share generation step (e.g. yarn start encrypt -i data-to-encrypt.txt) and send encrypted data to Bobs.
  4. Bobs collect at least k shares to decrypt the data (e.g. yarn start decrypt -i encrypted-data.txt, follow instructions in CLI).

Security concerns

The only piece of data considered vulnerable in the flow is the generated private key. It is held in the memory only while in the generating shares process and can be retrieved given k out of n shares are known. Generally, stdio is considered a secure location, but you should clear the terminal as long as shares are being sent to shareholders.

sss-crypto's People

Contributors

luixo avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.