Skip to content
forked from Nebulosus/shamir

Pure Rust implementation of Shamir's secret sharing

License

Notifications You must be signed in to change notification settings

karpfediem/shamir

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shamir

Coverage Status

Build Status

Shamir is a pure Rust implementation of Shamir's secret sharing.

Install

To install shamir into your application, you need to add it to your cargo.toml:

[dependencies]
shamir = "~1.0"

and you need to include it at the top of oyur main.rs:

extern crate shamir;

use shamir::SecretData;

Usage

extern crate shamir;

use shamir::SecretData;

fn main() {
    let secret_data = SecretData::with_secret("Hello World!", 3);

    let share1 = secret_data.get_share(1);
    let share2 = secret_data.get_share(2);
    let share3 = secret_data.get_share(3);

    let recovered = SecretData::recover_secret(3, vec![share1, share2, share3]).unwrap();

    println!("Recovered {}", recovered);
}

About

Pure Rust implementation of Shamir's secret sharing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%