BLS Signature Scheme
The blissful crate provides a production ready BLS signature implementation. That being said please note
- This implementation has not been reviewed or audited yet. Use at your own risk
- All operations are constant time unless explicity noted.
Documentation
BLS signatures offer the smallest known signature size as well as other benefits like one round threshold signing and signature aggregation.
BLS signatures rely on pairing-friendly curves which have two fields for points. This library provides keys and signatures for both fields.
For example, most signatures occur in the G1 group requiring public keys in G2 so these are simply named Signature and PublicKey.
The variant type swaps the fields and thus is name SignatureVt and PublicKeyVt. Signature proofs of knowledge are supported using
the proof_of_knowledge method on Signatures which allow a signature holder to prove knowledge of a signature without revealing it.
The signed message is still disclosed. Given this is useful mainly for Signatures, it is not provided directly for multi-signatures or
aggregated signatures.
This library supports threshold signatures in the form of PartialSignature generated from SecretKeyShare instead of a SecretKey.
PartialSignatures can be combined to make a full Signature assuming there are sufficient above the threshold. SecretKeyShares can
be generated using shamir secret sharing from crates like vsss-rs or using distributed key generation methods like
gennaro-dkg.
Multi-signatures are signatures that have been aggregated that were signed over the same message. This allowed for signature compression and very fast verification assuming rogue key attacks have been taken into account using Proofs of Possession. For now this library only provides the proof of possession scheme as this is the most widely used.
Aggregated signatures are signatures that have been aggregated that were signed over different messages. While verification isn't much faster for this, it's still allows for signature compression.
Examples
Key operations
From random entropy source
let sk = random;
let pk = from;
let pop = new.expect;
assert_eq!;
From seed
let sk = hash;
let pk = from;
Split a key into key shares
let shares = sk.;
Restore a key from shares
let sk = ;
Signature operations
Create a signature
let sig = new.expect;
Verify a signature
assert_eq!;
Create a proof of knowledge
use crateField;
let x = craterandom;
let spok = sig.proof_of_knowledge_with_timestamp.expect;
// Send msg and spok to verifier
assert_eq!;
// or do the three step process
let commitment = sig.proof_of_knowledge_commitment.expect;
// send commitment to the verifier and receive a challenge
let spok = commitment.complete.expect;
// Send msg and spok to verifier
assert_eq!;