Crates.io | rusty_secrets |
lib.rs | rusty_secrets |
version | 0.2.2 |
source | src |
created_at | 2016-04-06 23:03:12.672205 |
updated_at | 2018-05-17 08:52:47.44726 |
description | Implementation of threshold Shamir's secret sharing in the Rust programming language. |
homepage | https://github.com/freedomofpress/RustySecrets |
repository | |
max_upload_size | |
id | 4690 |
size | 1,370,370 |
Rusty Secrets is an implementation of a threshold Shamir's secret sharing scheme.
Documentation (latest)
Documentation (master)
The main use for this library is to split a secret of an arbitrary length in n different shares and k-out-of-n shares are required to recover it. The dealer is assumed to be honest (and competent). We further assume that our adversary will only be able to compromise at most k-1 shares. Shares are kept offline.
A typical use case for this library would be splitting an encryption key to a TrueCrypt-like volume.
2-1-LiTyeXwEP71IUA
^ ^ ^^^^^^^^^^^^^^
K N D
A share is built out of three parts separated with a dash: K-N-D.
ShareData
protobuf containing information about the share, and if signed, the signature.There are a few issues with regular Shamir's secret sharing that we wanted to address:
All of these issues would result in a corrupted secret being outputted and the program, that wouldn't even know that the secret got corrupted, wouldn't be able to give any actionable information.
We addressed this by signing the shares by the dealer and encoding the public key into each share. After the generation of the shares, the dealer erases both the secret and the private signing key used to sign the shares. When recovering the secret, the program verifies that public keys and if some shares do not have the same public key, or a valid signature of that public key, signals the issue to the user with a helpful message.
Signing shares is optional and the usefulness of signing the shares depends on the use case. Since we're using hash-based signatures (using SHA-512 Merkle signing), there is a large overhead from using signatures.
Please report bugs either as pull requests or as issues in the issue tracker. RustySecrets has a full disclosure vulnerability policy. Please do NOT attempt to report any security vulnerability in this code privately to anybody.
See LICENSE.
Rusty Secrets was forked off sellibitze's secretshare.