BLS Threshold Crypto
Installation
# Add to Cargo.toml
[dependencies]
blsttc = "8.0.2"# Install using uv (recommended)
curl -LsSf <https://astral.sh/uv/install.sh> | sh
uv pip install blsttc
# Or using pip
pip install blsttcBasic Usage
use blsttc::{SecretKey, PublicKey, Signature};
// Generate a secret key
let secret_key = SecretKey::random();
// Get the corresponding public key
let public_key = secret_key.public_key();
// Sign a message
let message = b"Hello, World!";
let signature = secret_key.sign(message);
// Verify the signature
assert!(public_key.verify(&signature, message));from blsttc import SecretKey, PublicKey, Signature
# Generate a secret key
secret_key = SecretKey.random()
# Get the corresponding public key
public_key = secret_key.public_key()
# Sign a message
message = b"Hello, World!"
signature = secret_key.sign(message)
# Verify the signature
assert public_key.verify(signature, message)Threshold Signatures
Advanced Features
Key Generation
Serialization
Error Handling
Best Practices
Common Use Cases
Last updated