| Crates.io | sharing |
| lib.rs | sharing |
| version | 0.1.2 |
| created_at | 2019-08-28 14:11:27.484809+00 |
| updated_at | 2019-09-06 13:41:59.934305+00 |
| description | Sharing |
| homepage | |
| repository | https://github.com/lperlaki/sharing-rs |
| max_upload_size | |
| id | 160411 |
| size | 15,325 |
Secret Sharing and Inforamtion Disporsal Sharing
Use for example the Shamir implementation
use sharing::{ShamirSecretSharing, Sharing};
let data = [1, 2, 3, 4, 5].to_vec();
let sharer = ShamirSecretSharing::new(5, 3, rand::thread_rng());
let shares = sharer.share(data.clone()).unwrap();
// You only need 3 out of the 5 shares to reconstruct
let rec = sharer.recontruct(shares[1..=3].to_vec()).unwrap();
assert_eq!(data, rec);