threshold

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: BSD-3-Clause Imports: 12 Imported by: 5

Documentation

Overview

Package threshold is a stream-based implementation of a collective signing so that the orchestrator contacts only a subset of the participants. The collective signature allows a given threshold to be valid, which means that not all the participants need to return their signature for the protocol to end.

Documentation Last Review: 05.10.2020

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByzantineThreshold

func ByzantineThreshold(n int) int

ByzantineThreshold returns the minimum number of honest nodes required given `n` total nodes in a Byzantine Fault Tolerant system.

func OneThreshold

func OneThreshold(n int) int

OneThreshold is a threshold function to allow one failure.

Types

type Threshold

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

Threshold is an implementation of the cosi.CollectiveSigning interface that is using streams to parallelize the work.

func NewThreshold

func NewThreshold(m mino.Mino, signer crypto.AggregateSigner) *Threshold

NewThreshold returns a new instance of a threshold collective signature.

func (*Threshold) GetPublicKeyFactory

func (c *Threshold) GetPublicKeyFactory() crypto.PublicKeyFactory

GetPublicKeyFactory implements cosi.CollectiveSigning. It returns the public key factory.

func (*Threshold) GetSignatureFactory

func (c *Threshold) GetSignatureFactory() crypto.SignatureFactory

GetSignatureFactory implements cosi.CollectiveSigning. It returns the signature factory.

func (*Threshold) GetSigner

func (c *Threshold) GetSigner() crypto.Signer

GetSigner implements cosi.CollectiveSigning. It returns the signer of the instance.

func (*Threshold) GetVerifierFactory

func (c *Threshold) GetVerifierFactory() crypto.VerifierFactory

GetVerifierFactory implements cosi.CollectiveSigning. It returns the verifier factory.

func (*Threshold) Listen

func (c *Threshold) Listen(r cosi.Reactor) (cosi.Actor, error)

Listen implements cosi.CollectiveSigning. It creates the rpc endpoint and returns the actor that can trigger a collective signature.

func (*Threshold) SetThreshold

func (c *Threshold) SetThreshold(fn cosi.Threshold)

SetThreshold implements cosi.CollectiveSigning. It sets a new threshold function.

Directories

Path Synopsis
Package types implements the threshold collective signature and its verifier.
Package types implements the threshold collective signature and its verifier.

Jump to

Keyboard shortcuts

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