# secret-share

A pure-Rust implementation of secret sharing schemes with no external dependencies.

## Features

- **Shamir's Secret Sharing** — (t,n) threshold scheme using polynomial interpolation over a finite field
- **Additive Secret Sharing** — Simple additive sharing with n-of-n reconstruction
- **Polynomial Operations** — Lagrange interpolation, polynomial evaluation
- **Share Reconstruction** — Recover secrets from qualified subsets
- **Share Verification** — Feldman-style verifiable secret sharing basics

## Usage

```rust
use secret_share::shamir::ShamirSecretSharing;

let sss = ShamirSecretSharing::new(3, 5); // 3-of-5 threshold
let secret = 42u64;
let shares = sss.split(secret);
let reconstructed = sss.reconstruct(&shares[..3]);
assert_eq!(reconstructed, secret);
```

## Test Coverage

18+ tests covering Lagrange interpolation, threshold properties, share corruption detection, and perfect secrecy.

## License

MIT OR Apache-2.0
