{"id":22084100,"url":"https://github.com/waddaboo/rust-vss","last_synced_at":"2025-03-23T21:27:44.846Z","repository":{"id":220485076,"uuid":"750331651","full_name":"waddaboo/rust-vss","owner":"waddaboo","description":"A secure and versatile Verifiable Secret Sharing (VSS) library for Rust","archived":false,"fork":false,"pushed_at":"2024-02-02T09:22:40.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T04:47:03.774Z","etag":null,"topics":["cryptography","rust","verifiable-secret-sharing","zero-knowledge-proofs"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/waddaboo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-30T12:51:16.000Z","updated_at":"2024-02-29T10:20:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"3e72758b-3790-4747-9213-a8b0dae4661a","html_url":"https://github.com/waddaboo/rust-vss","commit_stats":null,"previous_names":["waddaboo/rust-vss"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waddaboo%2Frust-vss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waddaboo%2Frust-vss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waddaboo%2Frust-vss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waddaboo%2Frust-vss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waddaboo","download_url":"https://codeload.github.com/waddaboo/rust-vss/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245171471,"owners_count":20572241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptography","rust","verifiable-secret-sharing","zero-knowledge-proofs"],"created_at":"2024-12-01T00:19:59.060Z","updated_at":"2025-03-23T21:27:44.839Z","avatar_url":"https://github.com/waddaboo.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rust-vss\n\nRust-vss is a secure and versatile Verifiable Secret Sharing (VSS) Library for Rust.\n\n## Overview\n\n- Securely split secrets into shares for distribution among multipler parties.\n- Verify shares without reconstructing the secret, protecting against compromised parties.\n- Flexibility to tailor security parameters such as share count and threshold to your needs.\n- Leverage Shamir's Secret Sharing and Chaum-Pedersen Protocol for security and flexibility.\n\n## Key Features\n\n- Threshold based secret sharing: Divide secrets into shares, requiring a minimum number of shares to reconstruct.\n- Verifiable shares: Ensure shares are valid and belong to the chosen set, preventing forgery.\n- Simplicity: Clear and intuitive functions for splitting, verifying, and combining shares.\n\n## Getting Started\n\nYou will need to have Rust and Cargo installed.\n\n```bash\n# Build the project\n$ cargo build --release\n\n# Run all tests\n$ cargo test\n\n# Run examples\n$ cargo run --example vss_all_participants\n$ cargo run --example vss_missing_participant\n```\n\n## Usage\n\n```Rust\nuse rust_vss::{string_from_secret, string_to_secret, Participant};\n\nfn main() {\n  let secret_message = String::from(\"This is a secret!\");\n\n  // Initialize the dealer\n  let mut dealer = Participant::new();\n  dealer.initialize();\n\n  // Initialize the participants\n  let mut participant1 = Participant::new();\n  let mut participant2 = Participant::new();\n  let mut participant3 = Participant::new();\n  participant1.initialize();\n  participant2.initialize();\n  participant3.initialize();\n\n  // Distribute the secret to participants\n  let threshold = 3;\n  let distribute_shares_box = dealer.distribute_secret(\n    \u0026string_to_secret(\u0026secret_message),\n    \u0026vec![\n      participant1.publickey.clone(),\n      participant2.publickey.clone(),\n      participant3.publickey.clone(),\n    ],\n    threshold,\n  );\n\n  // Verify the validity of distributed shares\n  assert_eq!(participant1.verify_distribution_shares(\u0026distribute_share_boxes), true);\n  assert_eq!(participant2.verify_distribution_shares(\u0026distribute_share_boxes), true);\n  assert_eq!(participant3.verify_distribution_shares(\u0026distribute_share_boxes), true);\n\n  // Share extraction\n  let sharebox1 = participant1\n    .extract_secret_share(\u0026distribute_share_boxes, \u0026participant1.privatekey)\n    .unwrap();\n  let sharebox2 = participant2\n    .extract_secret_share(\u0026distribute_share_boxes, \u0026participant2.privatekey)\n    .unwrap();\n  let sharebox3 = participant3\n    .extract_secret_share(\u0026distribute_share_boxes, \u0026participant3.privatekey)\n    .unwrap();\n\n  // Share verification\n  assert_eq!(\n    participant1.verify_share(\u0026sharebox2, \u0026distribute_share_boxes, \u0026participant2.publickey),\n    true\n  );\n  assert_eq!(\n    participant2.verify_share(\u0026sharebox3, \u0026distribute_share_boxes, \u0026participant3.publickey),\n    true\n  );\n  assert_eq!(\n    participant3.verify_share(\u0026sharebox1, \u0026distribute_share_boxes, \u0026participant1.publickey),\n    true\n  );\n\n  // Secret reconstruction\n  let share_boxes = [sharebox1, sharebox2, sharebox3];\n  let reconstruct1 = participant1\n    .reconstruct(\u0026share_boxes, \u0026distribute_share_boxes)\n    .unwrap();\n  let reconstruct2 = participant2\n    .reconstruct(\u0026share_boxes, \u0026distribute_share_boxes)\n    .unwrap();\n  let reconstruct3 = participant3\n    .reconstruct(\u0026share_boxes, \u0026distribute_share_boxes)\n    .unwrap();\n\n  let reconstruct1_str = string_from_secret(\u0026reconstruct1);\n  assert_eq!(reconstruct1_str, secret_message.clone());\n\n  let reconstruct2_str = string_from_secret(\u0026reconstruct2);\n  assert_eq!(reconstruct2_str, secret_message.clone());\n\n  let reconstruct3_str = string_from_secret(\u0026reconstruct3);\n  assert_eq!(reconstruct3_str, secret_message.clone());\n}\n```\n\nKindly refer to the `examples` directory for more usage examples.\n\n## Disclaimer\n\nThis library is still under development and may not be suitable for production use. Please use it with caution and at your own risk.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaddaboo%2Frust-vss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaddaboo%2Frust-vss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaddaboo%2Frust-vss/lists"}