A project that utilizes Shamir's Secret Sharing algorithm to manage sensitive data. This Rust-based command-line tool allows for the secure division of a secret into multiple shares, as well as the recombination of those shares to retrieve the original secret.
This tool is a small personal project and has not undergone any formal security audit. It is likely vulnerable to certain types of attacks, such as timing attacks, and therefore should not be used for critical security applications. It serves as a conceptual demonstration and a starting point for those interested in secret-sharing schemes.
Follow these instructions to get the project up and running on your local machine for development and testing purposes.
- Cargo (Rust's package manager)
Clone the repository and build the project:
git clone https://github.com/Cleopha/shamir-encryption-cli.git
cd shamir-secret-sharing
cargo install --path .
shamir-encryption 0.1.0
Rust-based command-line application that implements Shamir's Secret Sharing algorithm
USAGE:
shamir-encryption <SUBCOMMAND>
OPTIONS:
-h, --help Print help information
-V, --version Print version information
SUBCOMMANDS:
combine Combine shards into a secret
help Print this message or the help of the given subcommand(s)
shard Shard a secret into shards
To split a secret into multiple shares:
shamir-encryption shard --secret-path <path-to-secret> --shards-path <output-directory> --parts <number-of-shares> --threshold <shares-needed-to-recover>
To recover the original secret:
shamir-encryption combine --shards-dir <shards-directory> --recovered-secret-path <recovery-path>
Test the functionality with:
cargo test