collectivebeacon

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: Apache-2.0, BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrDistributedPubKeyMismatch is returned if the distributed public key does not match.
	ErrDistributedPubKeyMismatch = errors.New("Distributed Public Key does not match")
	// ErrInvalidRound is returned if the round is invalid.
	ErrInvalidRound = errors.New("Invalid Round")
	// ErrInstanceIDMismatch is returned if the instanceID does not match.
	ErrInstanceIDMismatch = errors.New("InstanceID does not match")
	// ErrInvalidIssuer is returned if the issuer is invalid.
	ErrInvalidIssuer = errors.New("Invalid Issuer")
	// ErrNilState is returned on nil state.
	ErrNilState = errors.New("Nil state")
	// ErrNilData is returned on nil data.
	ErrNilData = errors.New("Nil data")
)

Functions

func ExtractRandomness

func ExtractRandomness(signature []byte) ([]byte, error)

ExtractRandomness returns the randomness from a given signature.

func ProcessBeacon

func ProcessBeacon(drng *state.State, cb *events.CollectiveBeaconEvent) error

ProcessBeacon performs the following tasks: - verify that we have a valid random - update drng state

func VerifyCollectiveBeacon

func VerifyCollectiveBeacon(state *state.State, data *events.CollectiveBeaconEvent) error

VerifyCollectiveBeacon verifies against a given state that the given CollectiveBeaconEvent contains a valid beacon.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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