Fast, small, and secure Shamir's Secret Sharing in Rust
Go to file
Aitor Ruano 5344dda94b
changed arithmetic to GF256, unlimited secret length, updated docs (#1)
2020-01-21 10:09:20 +01:00
.github/workflows Add continuous integration 2020-01-13 12:01:10 +01:00
benches changed arithmetic to GF256, unlimited secret length, updated docs (#1) 2020-01-21 10:09:20 +01:00
src changed arithmetic to GF256, unlimited secret length, updated docs (#1) 2020-01-21 10:09:20 +01:00
.gitignore initial commit 2020-01-10 17:08:30 +01:00
CHANGELOG.md changed arithmetic to GF256, unlimited secret length, updated docs (#1) 2020-01-21 10:09:20 +01:00
COPYRIGHT Written readme, improved documentation, added changelog and copyright 2020-01-13 11:42:59 +01:00
Cargo.toml changed arithmetic to GF256, unlimited secret length, updated docs (#1) 2020-01-21 10:09:20 +01:00
LICENSE-APACHE initial commit 2020-01-10 17:08:30 +01:00
LICENSE-MIT initial commit 2020-01-10 17:08:30 +01:00
README.md changed arithmetic to GF256, unlimited secret length, updated docs (#1) 2020-01-21 10:09:20 +01:00

README.md

Sharks

CI Crate Docs

Fast, small and secure Shamir's Secret Sharing library crate

Documentation:

Usage

Add this to your Cargo.toml:

[dependencies]
sharks = "0.2"

To get started using Sharks, see the Rust docs

Features

Developer friendly

The API is simple and to the point, with minimal configuration.

Fast and small

The code is as idiomatic and clean as possible, with minimum external dependencies.

Secure by design

The implementation forbids the user to choose parameters that would result in an insecure application, like generating more shares than what's allowed by the finite field length.

Limitations

Because the Galois finite field it uses is GF256, only up to 255 shares can be generated for a given secret. A larger number would be insecure as shares would start duplicating. Nevertheless, the secret can be arbitrarily long as computations are performed on single byte chunks.

Testing

This crate contains both unit and benchmark tests (as well as the examples included in the docs). You can run them with cargo test and cargo bench.

Benchmark results [min mean max]

CPU obtain_shares_dealer step_shares_dealer recover_secret
Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz [1.4321 us 1.4339 us 1.4357 us] [1.3385 ns 1.3456 ns 1.3552 ns] [228.77 us 232.17 us 236.23 us]

Contributing

If you find a vulnerability, bug or would like a new feature, open a new issue.

To introduce your changes into the codebase, submit a Pull Request.

Many thanks!

License

Sharks is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT, and COPYRIGHT for details.