bls

package
v0.0.0-...-e56efb7 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package common provides the BLS interfaces that are implemented by the various BLS wrappers.

This package should not be used by downstream consumers. These interfaces are re-exporter by github.com/prysmaticlabs/prysm/shared/bls. This package exists to prevent an import circular dependency.

Index

Constants

This section is empty.

Variables

View Source
var ErrInfinitePubKey = errors.New("received an infinite public key")

ErrInfinitePubKey describes an error due to an infinite public key.

View Source
var ErrSecretUnmarshal = errors.New("could not unmarshal bytes into secret key")

ErrSecretUnmarshal describes an error which happens during unmarshalling a secret key.

View Source
var ErrZeroKey = errors.New("received secret key is zero")

ErrZeroKey describes an error due to a zero secret key.

Functions

This section is empty.

Types

type PublicKey

type PublicKey interface {
	Marshal() []byte
	Copy() PublicKey
	Aggregate(p2 PublicKey) PublicKey
	IsInfinite() bool
}

PublicKey represents a BLS public key.

type SecretKey

type SecretKey interface {
	PublicKey() PublicKey
	Sign(msg []byte) Signature
	Marshal() []byte
	IsZero() bool
}

SecretKey represents a BLS secret or private key.

type Signature

type Signature interface {
	Verify(pubKey PublicKey, msg []byte) bool
	AggregateVerify(pubKeys []PublicKey, msgs [][32]byte) bool
	FastAggregateVerify(pubKeys []PublicKey, msg [32]byte) bool
	Marshal() []byte
	Copy() Signature
	HexString() string
}

Signature represents a BLS signature.

type SignatureSet

type SignatureSet struct {
	Signatures [][]byte
	PublicKeys []PublicKey
	Messages   [][32]byte
}

SignatureSet refers to the defined set of signatures and its respective public keys and messages required to verify it.

func NewSet

func NewSet() *SignatureSet

NewSet constructs an empty signature set object.

func (*SignatureSet) Join

func (s *SignatureSet) Join(set *SignatureSet) *SignatureSet

Join merges the provided signature set to out current one.

Directories

Path Synopsis
Package herumi implements a go-wrapper around a library implementing the the BLS12-381 curve and signature scheme.
Package herumi implements a go-wrapper around a library implementing the the BLS12-381 curve and signature scheme.

Jump to

Keyboard shortcuts

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