GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - bartick/shamir-secret-sharing: A simple Shamir secret sharing algorithm implementation with foreign function interface.

BranchesTags
Open more actions menu

Latest commit

 

History

24 Commits
24 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
.gitignore
.gitignore
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

Shamir Secret Sharing

Version License

Shamir Secret Sharing is a cryptographic algorithm that allows you to split a secret into multiple parts and distribute them among a group of people. The secret can only be reconstructed when a minimum number of parts are combined together.

📝 Table of Contents

  • About
  • How it works
  • Usage
  • Contributing
  • License

🧐 About

Shamir Secret Sharing is a cryptographic algorithm that allows you to split a secret into multiple parts and distribute them among a group of people. The secret can only be reconstructed when a minimum number of parts are combined together.

🚀 How it works

The algorithm works by generating a polynomial of degree k-1 where k is the minimum number of parts required to reconstruct the secret. The polynomial is generated in such a way that the constant term is the secret itself. The polynomial is then evaluated at n different points to generate n parts. The secret can only be reconstructed when k parts are combined together.

📦 Usage

use shamir::{split, combine};

fn main() {
    // Define the secret to be split.
    let secret = "Hello, World!";

    // Split the secret into 5 shares with a threshold of 3.
    let shares = split(secret, 5, 3).unwrap();

    // Display the shares.
    for (idx, share) in shares.iter().enumerate() {
        println!("Share {}: {:?}", idx + 1, share);
    }

    // Combine the shares to reconstruct the secret.
    let reconstructed = combine(&shares[0..3]).unwrap();
    println!("Reconstructed: {}", String::from_utf8(reconstructed).unwrap());
}

🤝 Contributing

Contributions, issues and feature requests are welcome. After cloning & setting up project locally, you can just submit a PR to this repo and it will be deployed once it's accepted.

📝 License

This project is licensed under the MIT License. See the LICENSE file for details.


# Clone this repository
$ git clone

# Go into the repository
$ cd shamir-secret-sharing

# Build the project
$ cargo build

About

A simple Shamir secret sharing algorithm implementation with foreign function interface.

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.