Documentation ¶
Overview ¶
Package bls implements a go-wrapper around a library implementing the the BLS12-381 curve and signature scheme. This package exposes a public API for verifying and aggregating BLS signatures used by Ethereum 2.0.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Domain ¶
Domain returns the bls domain given by the domain type and the operation 4 byte fork version.
Spec pseudocode definition:
def get_domain(state: MasternodeState, domain_type: DomainType, message_epoch: Epoch=None) -> Domain: """ Return the signature domain (fork version concatenated with domain type) of a message. """ epoch = get_current_epoch(state) if message_epoch is None else message_epoch fork_version = state.fork.previous_version if epoch < state.fork.epoch else state.fork.current_version return compute_domain(domain_type, fork_version)
Types ¶
type PublicKey ¶
type PublicKey struct {
// contains filtered or unexported fields
}
PublicKey used in the BLS signature scheme.
func PublicKeyFromBytes ¶
PublicKeyFromBytes creates a BLS public key from a byte slice.
type SecretKey ¶
type SecretKey struct {
// contains filtered or unexported fields
}
SecretKey used in the BLS signature scheme.
func SecretKeyFromBytes ¶
SecretKeyFromBytes creates a BLS private key from a byte slice.
type Signature ¶
type Signature struct {
// contains filtered or unexported fields
}
Signature used in the BLS signature scheme.
func AggregateSignatures ¶
AggregateSignatures converts a list of signatures into a single, aggregated sig.
func SignatureFromBytes ¶
SignatureFromBytes creates a BLS signature from a byte slice.