bls

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package bls provides threshold BLS signature functionality by bridging the crypto/bls implementation with the threshold protocol framework.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AggregateSignatures

func AggregateSignatures(signatures []*bls.Signature, threshold int) (*bls.Signature, error)

AggregateSignatures combines threshold signatures into a single signature

func Keygen

func Keygen(selfID party.ID, participants []party.ID, threshold int, pl *pool.Pool) protocol.StartFunc

Keygen creates a new BLS threshold key generation protocol

func SignProtocol

func SignProtocol(config *Config, signers []party.ID, message []byte, pl *pool.Pool) protocol.StartFunc

SignProtocol creates a threshold BLS signing protocol

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
	Threshold int

	// PublicKey is the aggregate public key
	PublicKey *bls.PublicKey

	// SecretShare is this party's secret key share
	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 (*Config) Sign

func (c *Config) Sign(message []byte) (*bls.Signature, error)

Sign creates a partial BLS signature with this party's share

func (*Config) VerifyAggregateSignature

func (c *Config) VerifyAggregateSignature(message []byte, sig *bls.Signature) bool

VerifyAggregateSignature verifies the final aggregated signature

func (*Config) VerifyPartialSignature

func (c *Config) VerifyPartialSignature(from party.ID, message []byte, sig *bls.Signature) bool

VerifyPartialSignature verifies a signature share from a specific party

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL