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 ¶
- func ByzantineThreshold(n int) int
- func OneThreshold(n int) int
- type Threshold
- func (c *Threshold) GetPublicKeyFactory() crypto.PublicKeyFactory
- func (c *Threshold) GetSignatureFactory() crypto.SignatureFactory
- func (c *Threshold) GetSigner() crypto.Signer
- func (c *Threshold) GetVerifierFactory() crypto.VerifierFactory
- func (c *Threshold) Listen(r cosi.Reactor) (cosi.Actor, error)
- func (c *Threshold) SetThreshold(fn cosi.Threshold)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByzantineThreshold ¶
ByzantineThreshold returns the minimum number of honest nodes required given `n` total nodes in a Byzantine Fault Tolerant system.
func OneThreshold ¶
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 ¶
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 ¶
Listen implements cosi.CollectiveSigning. It creates the rpc endpoint and returns the actor that can trigger a collective signature.
func (*Threshold) SetThreshold ¶
SetThreshold implements cosi.CollectiveSigning. It sets a new threshold function.