bls

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AggregateSignatures

func AggregateSignatures(tss TSS, partialSigs []*bls_sig.PartialSignature, msg []byte) (*bls_sig.Signature, []byte, error)

AggregateSignatures aggregates partial signatures over the given message. Returns aggregated signatures and slice of signers identifiers that had valid partial signatures.

func PartialSign

func PartialSign(sks *bls_sig.SecretKeyShare, msg []byte) (*bls_sig.PartialSignature, error)

PartialSign signs given message(msg) using given Secret Key Share(sks) and returns a Partial Signature.

func Verify

func Verify(pk *bls_sig.PublicKey, msg []byte, sig *bls_sig.Signature) (bool, error)

Verify verifies the given signature(sig) on message(msg) with given public key (pk).

Types

type PubShare

type PubShare struct {
	Value *bls_sig.PublicKey
	// contains filtered or unexported fields
}

PubShare is a public share corresponding to a secret share.

type TSS

type TSS struct {
	PubKey *bls_sig.PublicKey

	NumShares int
	// contains filtered or unexported fields
}

TSS (threshold signing scheme) wraps PubKey (PublicKey), verifiers (the public shares corresponding to each secret share) and threshold (number of shares).

func GenerateTSS

func GenerateTSS(t, n int) (TSS, []*bls_sig.SecretKeyShare, error)

GenerateTSS returns a new random instance of threshold signing scheme and associated SecretKeyShares. It generates n number of secret key shares where t of them can be combined to sign a message.

func (TSS) Threshold

func (t TSS) Threshold() int

Threshold returns the secret sharing threshold.

Jump to

Keyboard shortcuts

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