Metadata-Version: 2.4
Name: pyquorum
Version: 0.2.1
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Security :: Cryptography
License-File: LICENSE
Summary: Cryptographic library for secret sharing and key management, powered by Rust
Author-email: svvqt <kon.vitkovskii@gmail.com>
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Repository, https://github.com/svvqt/pyquorum

# PyQuorum

Cryptographic library for secret sharing and key management, powered by Rust

## Installation
```bash
pip install pyquorum
```

## Quick Start
```python
from pyquorum import ShamirScheme, BlakleyScheme, generate_key

k=3 # threshold for combine
n=4 # number of total shares
key = generate_key()
Scheme = ShamirScheme(k, n) # BlakleyScheme(k, n)
shares = Scheme.split(key)
combine = Scheme.combine(shares)
```

## Security
This library does:
- generate key
- split secret
- combine secret

What it doesn't:
- replace encryption packages like cryptography, pyserpent and etc

> **WARNING** - This library is in active development (0.x.x). 
> It has not undergone a professional security audit and contains 
> known vulnerabilities. **Do not use in production.**

You can review known vulnerabilities in [SECURITY_ISSUES_TRACKER.md](SECURITY_ISSUES_TRACKER.md)

If you found a security issue, please refer to [SECURITY.md](SECURITY.md)

## Roadmap to v1.0.0
- [x] - Shamir Scheme
- [x] - Blakley Scheme
- [ ] - Additive Scheme
- [ ] - HKDF Key Derivation
- [ ] - Threshold ECDSA

## Support
If you find this package usefull, you can star repo on github

## Theory

### Shamir Scheme Share

How to split a secret key

![Shamir split diagram](docs/shares/shamir_examples/shamir1.png)

How to combine a secret key

![Shamir combine diagram](docs/shares/shamir_examples/shamir2.png)

### Example

![Source secret key](docs/shares/shamir_examples/shamir_example1.png)

![Spliting secret key to 5 shares](docs/shares/shamir_examples/shamir_example2.png)

![Combining 3 shares to secret key](docs/shares/shamir_examples/shamir_example3.png)

![Result](docs/shares/shamir_examples/shamir_example4.png)

### Blakley Scheme Share

How to split a secret key

![Blakley split](docs/shares/blakley_examples/blakley_split.png)

How to combine a secret key

![Blakley combine](docs/shares/blakley_examples/blakley_combine.png)

### Example

![Spliting secret key to 4 shares](docs/shares/blakley_examples/blakley_example1.png)

![Combining 3 shares to secret key](docs/shares/blakley_examples/blakley_example2.png)
