rustysecrets-cli is a command-line wrapper around RustySecrets, a Rust implementation of threshold Shamir's secret sharing.
$ cargo install rustysecrets-cli
```bash $ mkdir shares $ cat > secret.txt These programs were never about terrorism: they’re about economic spying, social control, and diplomatic manipulation. They’re about power. ^D
$ rustysecrets split secret.txt -o shares -k 7 -n 10 -m text/plain $ ls shares/ share0 share1 share2 share3 share4 share5 share6 share7 share8 share9
$ rustysecrets recover shares/share{0-6} info: Version: INITIALRELEASE info: MIME-Type: text/plain These programs were never about terrorism: they’re about economic spying, social control, and diplomatic manipulation. They’re about power.
$ rustysecrets recover shares/share_{0-2} error: Could not recover secret caused by: Not enough shares provided! ```
rustysecrets
```
USAGE:
rustysecrets
OPTIONS: -h, --help Prints help information -V, --version Prints version information
SUBCOMMANDS: help Prints this message or the help of the given subcommand(s) recover Recover the secret from the shares [aliases: r] split Split a secret into shares [aliases: s] ```
rustysecrets split
Split a secret into shares
``` USAGE: rustysecrets split [OPTIONS] --output
OPTIONS: -o, --output
ARGS: Path to the file containing the secret to split, or - to read from stdin ```
rustysecrets recover
Recover the secret from the shares
```
USAGE:
rustysecrets recover [OPTIONS]
OPTIONS:
-o, --output
ARGS:
Please report bugs either as pull requests or as issues in the issue tracker. rustysecrets-cli has a full disclosure vulnerability policy. Please do NOT attempt to report any security vulnerability in this code privately to anybody.
RustySecrets CLI is released under the BSD3 license. See LICENSE for more informations.