Code Monkey home page Code Monkey logo

sss's Introduction

Shamir's secret sharing.

1. Installation.

Used modules:

  • argparse
  • difflib
  • random
  • functools

2. Run the code.

One can find some help for the main programs by running:

  • python src/make_shares.py -h or python src/make_shares.py --help
  • python src/open_vault.py -h or python src/open_vault.py --help

Example. Suppose Alice, Bob and Charlie want to share 987654321, by requiring at least 2 keys and with following priorities:

  • Alice has priority 3.
  • Bob has priority 1.
  • Charlie has priority 1.

Note: if dave has priority n, dave will receive n distinct keys.

To simulate such a scenario:

  • run python src/make_shares.py --holders alice=3 bob=1 charlie=1 -s 987654321 -m 2

Then, if any combination of the above members is here, run python src/open_vault.py --present member1 member2

For example python src/open_vault.py -p alice or python src/open_vault.py -p alice charlie will unlock the secret.
But, python src/open_vault.py -p bob charlie won't.

sss's People

Contributors

amtoine avatar

Watchers

 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.