skhakimov / secret-sharing Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
This is an implementation of Shamir Secret Sharing Scheme. Only standard python libraries are being used. No need to install additional modules. Demo available for Graphical User Interface (GUI): http://youtu.be/FajKgzJ0KiE Command Line Interface (CLI): http://youtu.be/zR7GKyLYBYM The program consists of following files: interpolate.py: file that contains the interpolate class secret.py: file that contains the class to generate a secret threshold_scheme.py: contains functions to recover and generate secrets. GUI.py: User Interface for the program ********************************************************** To run, go to the code directory and type into command line: python GUI.py 1) To generate shares, input: Number of total shares Number of required shares Secret string consisting of ASCII characters. 2) To recover secret: provide shares that are enough to recover the secret. ********************************************************** Optionally, the program can be run from the command line. 1) To generate shares, use: python theshold_scheme.py generate <filename> -o <output> <filename> must be a text file with: 1st line = required number of shares 2nd line = total number of shares 3rd line = secret passphrase <output> is a name of a file where shares will be written to. 2) To recover shares, use: python theshold_scheme.py recover <filename> -o <output> <filename> must be a text file with separate share on each line. <output> is a name of a file where secret will be written to. Author: Samir Khakimov
Needs some changes to get working with Python >3.6.x
The GUI needs more work between Python 2.x and Python 3.x like:
try:
from Tkinter import *
except ImportError:
from tkinter import *
when i'm executung through CLI it is generating only one share in the output file..
the below is the error code while executing through CLI..
the GUI part works very well.. thanks
root@kali:~/Downloads/secret-sharing-master# python threshold_scheme.py generate input -o output
Traceback (most recent call last):
File "threshold_scheme.py", line 134, in
main()
File "threshold_scheme.py", line 121, in main
output.write("%d-%s" % (share,shares[share])+'\n')
ValueError: I/O operation on closed file
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.