Documentation
¶
Overview ¶
Package bls provides threshold BLS signature functionality using proper Shamir secret sharing and Lagrange interpolation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AggregateSignatures ¶
func AggregateSignatures(shares []*SignatureShare, threshold int) (*bls.Signature, error)
AggregateSignatures combines threshold signature shares using Lagrange interpolation. This produces a valid signature that verifies against the group public key.
Types ¶
type Config ¶
type Config struct {
// ID is this party's identifier
ID party.ID
// Threshold is the minimum number of parties needed to sign (t in t-of-n)
Threshold int
// TotalParties is the total number of parties
TotalParties int
// PublicKey is the aggregate public key
PublicKey *bls.PublicKey
SecretShare *bls.SecretKey
// VerificationKeys are the public keys for each party's share
VerificationKeys map[party.ID]*bls.PublicKey
}
Config holds BLS threshold signing configuration
func NewConfig ¶ added in v1.1.1
func NewConfig(id party.ID, threshold, totalParties int, secretShare *bls.SecretKey, groupPK *bls.PublicKey, verificationKeys map[party.ID]*bls.PublicKey) *Config
NewConfig creates a Config from generated shares.
func (*Config) Sign ¶
func (c *Config) Sign(message []byte) (*SignatureShare, error)
Sign creates a partial BLS signature with this party's share
func (*Config) VerifyAggregateSignature ¶
VerifyAggregateSignature verifies the final aggregated signature
func (*Config) VerifyPartialSignature ¶
func (c *Config) VerifyPartialSignature(share *SignatureShare, message []byte) bool
VerifyPartialSignature verifies a signature share from a specific party
type SignatureShare ¶ added in v1.1.1
type SignatureShare struct {
}
SignatureShare represents a party's contribution to a threshold signature
type TrustedDealer ¶ added in v1.1.1
TrustedDealer generates key shares using a trusted dealer. This uses Shamir's secret sharing to distribute the master key.