{"id":21328985,"url":"https://github.com/dsprenkels/sss-rs","last_synced_at":"2025-07-12T08:32:16.061Z","repository":{"id":53520369,"uuid":"96851808","full_name":"dsprenkels/sss-rs","owner":"dsprenkels","description":"Rust bindings for my Shamir secret sharing library","archived":false,"fork":false,"pushed_at":"2023-09-11T09:19:24.000Z","size":47,"stargazers_count":43,"open_issues_count":0,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-04T14:40:21.010Z","etag":null,"topics":["cryptography","shamir-secret-sharing"],"latest_commit_sha":null,"homepage":null,"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/dsprenkels.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}},"created_at":"2017-07-11T04:49:04.000Z","updated_at":"2025-06-19T12:24:10.000Z","dependencies_parsed_at":"2022-09-08T05:22:02.788Z","dependency_job_id":null,"html_url":"https://github.com/dsprenkels/sss-rs","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/dsprenkels/sss-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsprenkels%2Fsss-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsprenkels%2Fsss-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsprenkels%2Fsss-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsprenkels%2Fsss-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dsprenkels","download_url":"https://codeload.github.com/dsprenkels/sss-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsprenkels%2Fsss-rs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264962408,"owners_count":23689809,"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","shamir-secret-sharing"],"created_at":"2024-11-21T21:46:52.871Z","updated_at":"2025-07-12T08:32:15.806Z","avatar_url":"https://github.com/dsprenkels.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shamir secret sharing in Rust\n\n[![Build Status](https://travis-ci.org/dsprenkels/sss-rs.svg?branch=master)](https://travis-ci.org/dsprenkels/sss-rs)\n[![Coverage Status](https://coveralls.io/repos/github/dsprenkels/sss-rs/badge.svg?branch=master)](https://coveralls.io/github/dsprenkels/sss-rs?branch=master)\n[![Docs](https://docs.rs/shamirsecretsharing/badge.svg)](https://docs.rs/shamirsecretsharing)\n\n`sss-rs` contains Rust bindings for my [Shamir secret sharing library][sss].\nThis library allows users to split secret data into a number of different\nshares. With the possession of some or all of these shares, the original secret\ncan be restored. ([Looking for the command line interface?][cli])\n\nAn example use case is a beer brewery which has a vault which contains their\nprecious super secret recipe. The 5 board members of this brewery do not trust\nall the others well enough that they won't secretly break into the vault and\nsell the recipe to a competitor. So they split the code into 5 shares, and\nallow 4 shares to restore the original code. Now they are sure that the\nmajority of the staff will know when the vault is opened, but they can still\nopen the vault when one of the staff members is abroad or sick at home.\n\n## Installation\n\n```toml\n[dependencies]\nshamirsecretsharing = \"0.1\"\n```\n\n## Usage\n\nSecrets are always supplied as `\u0026[u8]` slices with a length of 64 items. Shares\nare generated from a piece of secret data using the `create_shares` function and\nshares can be afterwards be combined using `combine_shares`.\n\nShares are always 113 bytes long. Both `create_shares` and `combine_shares`\nreturn a `Result\u003c_, SSSError\u003e` type. Errors will _only_ happen when invalid\nparameters are supplied. When given valid parameters, these function will always\nreturn `Ok(_)`. In the case of invalid parameters the error will be able to tell\nyou what went wrong.\n\n```rust\nuse shamirsecretsharing::*;\n\n// Create a some shares over the secret data `[42, 42, 42, ...]`\nlet data = vec![42; DATA_SIZE];\nlet count = 5;\nlet treshold = 4;\nlet mut shares = create_shares(\u0026data, count, treshold).unwrap();\n\n// Lose a share (for demonstrational purposes)\nshares.remove(3);\n\n// We still have 4 shares, so we should still be able to restore the secret\nlet restored = combine_shares(\u0026shares).unwrap();\nassert_eq!(restored, Some(data));\n\n// If we lose another share the secret is lost\nshares.remove(0);\nlet restored2 = combine_shares(\u0026shares).unwrap();\nassert_eq!(restored2, None);\n```\n\n## Changelog\n\n### Version 0.1.1\n\n- Remove an unintended side channel which allows a participating attacker with\n  access to a accurate timing channel to iteratively guess shares during the\n  execution of `combine_shares`.\n\n### Version 0.1.5\n\n- This library used to link to my `sss` library that was written in C.  From\n  this version, the complete library is written only in Rust.\n- The `have_libsodium` feature flag is deprecated.\n- The minimum required rustc version is now 1.44.0.\n\n## Questions\n\nFeel free to [open an issue](https://github.com/dsprenkels/sss-rs/issues/new)\nor send me an email on my Github associated e-mail address.\n\n\n[sss]: https://github.com/dsprenkels/sss\n[cli]: https://github.com/dsprenkels/sss-cli\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsprenkels%2Fsss-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsprenkels%2Fsss-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsprenkels%2Fsss-rs/lists"}