threshold-pairing
A pairing-based threshold cryptosystem for collaborative decryption and signatures.
This is a fork from threshold_crypto which updates the dependencies and improves cryptographic standards compliance. Note: This fork is not backwards compatible with the original threshold_crypto due to changes in the hash-to-curve implementation.
The threshold-pairing crate provides cryptographic keys with methods for signing and encrypting messages, as well as key sets for threshold signatures and threshold encryption.
The threshold signature scheme is described in Threshold Signatures, Multisignatures and Blind Signatures Based on the Gap-Diffie-Hellman-Group Signature Scheme by Alexandra Boldyreva. This paper extends Boneh-Lynn-Shacham signatures to the threshold setting. Message encryption uses the scheme by Baek and Zhang.
Our implementation is based on the bls12_381 elliptic curve library.
Key Features
- Threshold Signatures: Any
t + 1participants can collaborate to sign a message - Threshold Encryption: Encrypted messages require
t + 1participants to decrypt - Unique Signatures: Signatures are deterministic and independent of the signing set
- Distributed Key Generation: Tools for trustless key generation
- RFC 9380 Compliance: Standard hash-to-curve implementation (BLS signatures)
threshold-crypto
The original code is based on threshold_crypto but we bumped all dependencies to the latest possible version. We also improved the API by hardening it and removing a few foot guns. The two libraries are not fully compatible because we switched the hash-to-curve implementation to the RFC9380 standard.
Security Audit
An official security audit has been completed on the original threshold_crypto by Jean-Philippe Aumasson. No exploitable security issues were found.
Usage
Add to your Cargo.toml:
[]
= "0.1"
Feature Flags
serde(enabled by default): AddsSerializeandDeserializeimpls for all public typesbincode: Enables bincode serialization support (requiresserde)serialization: Convenience feature that enables bothserdeandbincodeexpose-secret: Enablesreveal()methods on secret types for debugging (dev/debug only, never use in production)
To use without serde:
[]
= { = "0.1", = false }
To enable all serialization features:
[]
= { = "0.1", = ["serialization"] }
Basic Example
use SecretKey;
For detailed API documentation, examples, and guides, see the full documentation on docs.rs.
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.