/ShardShare

ShardShare is a consensus-based credential sharing application based on Shamir's Secret Sharing Scheme built using the MERN stack

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0


ShardShare
ShardShare

A consensus-based credential sharing application based on Shamir's Secret Sharing Scheme

Try the project live here

What Is ShardShare?How It WorksInstallationDemoFinal ReportCreditsDevelopersLicense

About

ShardShare is an application that uses Shamir's Secret Sharing Scheme to split a secret credential (i.e. a password, a textual secret, etc) into n parts such that atleast k parts are needed to recover the secret. Each of these n parts do not make sense on their own and are "information-theoretically secure" - which means that knowing less than the requisite number of shares is the same as knowing none of the shares. This makes this technique incredibly powerful in the safeguarding of secrets. This is typically useful for sharing keys like cryptocurrency wallet passwords where a "reset password" feature isn't available. In recent times, many people have been locked out of their fortune due to losing passwords of such wallets. For situations like these, using something like Shamir's secret sharing is the best bet to keep the secret recoverable by decentralising it by sharing it with a number of people. It is also secure since no person who has a part of the secret actually knows the entire secret.

Architecture

Architecture

Installation

To clone and run this application, you'll need Git and Node.js (which comes with npm) installed on your computer. From your command line:

# Clone this repository
$ git clone https://github.com/hrishikeshathalye/ShardShare

# Go into the repository
$ cd ShardShare

# Install frontend dependencies
$ cd frontend && npm install

# Install backend dependencies
$ cd backend && npm install

# Create a .env file
$ cd into backend and create a .env file containing the following fields:

  PORT=5000
  REFRESH_TOKEN=<Refresh Token for Google OAuth>
  REDIRECT_URL=<Redirect URL for Google OAuth>
  CLIENT_ID=<Client Id for Google OAuth>
  CLIENT_SECRET=<Client Secret for Google OAuth>
  EMAIL=<Gmail email address to be used to send emails from>
  MONGO_URL=<MongoDB Atlas connection string>

# Run the backend
$ cd backend && npm start

# Run the frontend
$ cd frontend && npm start

Once the installation is done the app will be accessible on localhost:PORT. The app is PWA-compatible (tested using Google Lighthouse) and if hosted, it can very easily be accessed from a phone and be installed as a PWA.

Note: If you're using Linux Bash for Windows, see this guide or use node from the command prompt.

Demo

ShardShare Demo

Report

Final Report

Credits

This software uses the following open source packages:

Developers

License

GNU GPLv3