thresholdcrypto

package
v0.0.0-...-9dd4217 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Curve

type Curve int
const (
	G1 Curve = iota
	G2
)

type TBLSInst

type TBLSInst struct {
	// contains filtered or unexported fields
}

TBLSInst an instance of a BLS-based (t, len(members))-threshold signature scheme It is capable of creating signature shares with its (single) private key share, and validating/recovering signatures involving all group members.

func TBLS12381Keygen

func TBLS12381Keygen(T int, members []int, randSource cipher.Stream, curve Curve) []*TBLSInst

TBLS12381Keygen constructs a set TBLSInst for a given set of member nodes and threshold T with nByz byzantine nodes, using the BLS12-381 pairing, with signatures being points on curve G1, and keys points on curve G2.

func (*TBLSInst) Recover

func (inst *TBLSInst) Recover(_ [][]byte, sigShares [][]byte) ([]byte, error)

Recover recovers a full signature from a set of (previously validated) shares, that are known to be from distinct nodes.

func (*TBLSInst) SignShare

func (inst *TBLSInst) SignShare(msg [][]byte) ([]byte, error)

SignShare constructs a signature share for the message.

func (*TBLSInst) VerifyFull

func (inst *TBLSInst) VerifyFull(msg [][]byte, sigFull []byte) error

VerifyFull verifies that a (full) signature is valid for a given message.

func (*TBLSInst) VerifyShare

func (inst *TBLSInst) VerifyShare(msg [][]byte, sigShare []byte, nodeID int) error

VerifyShare verifies that a signature share is for a given message from a given node.

Jump to

Keyboard shortcuts

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