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
- func AggregateSignatures(sigs []iface.Signature) iface.Signature
- func NewAggregateSignature() iface.Signature
- func RandKey() iface.SecretKey
- func VerifyCompressed(signature, pub, msg []byte) bool
- func VerifyMultipleSignatures(sigs [][]byte, msgs [][32]byte, pubKeys []iface.PublicKey) (bool, error)
- type PublicKey
- type SecretKey
- type Signature
- type SignatureSet
Constants ¶
const CurveOrder = "52435875175126190479447740508185965837690552500527637822603658699938581184513"
CurveOrder for the BLS12-381 curve.
const DomainByteLength = 4
DomainByteLength length of domain byte array.
Variables ¶
This section is empty.
Functions ¶
func AggregateSignatures ¶
AggregateSignatures converts a list of signatures into a single, aggregated sig.
func NewAggregateSignature ¶
NewAggregateSignature creates a blank aggregate signature.
func VerifyCompressed ¶ added in v1.0.0
VerifyCompressed signature.
Types ¶
type PublicKey ¶
PublicKey represents a BLS public key.
func AggregatePublicKeys ¶ added in v1.0.0
AggregatePublicKeys aggregates the provided raw public keys into a single key.
func PublicKeyFromBytes ¶
PublicKeyFromBytes creates a BLS public key from a BigEndian byte slice.
type SecretKey ¶
SecretKey represents a BLS secret or private key.
func SecretKeyFromBytes ¶
SecretKeyFromBytes creates a BLS private key from a BigEndian byte slice.
type Signature ¶
Signature represents a BLS signature.
func SignatureFromBytes ¶
SignatureFromBytes creates a BLS signature from a LittleEndian byte slice.
type SignatureSet ¶ added in v1.0.0
SignatureSet refers to the defined set of signatures and its respective public keys and messages required to verify it.
func NewSet ¶ added in v1.0.0
func NewSet() *SignatureSet
NewSet constructs an empty signature set object.
func (*SignatureSet) Join ¶ added in v1.0.0
func (s *SignatureSet) Join(set *SignatureSet) *SignatureSet
Join merges the provided signature set to out current one.
func (*SignatureSet) Verify ¶ added in v1.0.0
func (s *SignatureSet) Verify() (bool, error)
Verify the current signature set using the batch verify algorithm.
Directories ¶
Path | Synopsis |
---|---|
Package blst implements a go-wrapper around a library implementing the the BLS12-381 curve and signature scheme.
|
Package blst 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.
|
Package herumi implements a go-wrapper around a library implementing the the BLS12-381 curve and signature scheme. |
Package iface provides the BLS interfaces that are implemented by the various BLS wrappers.
|
Package iface provides the BLS interfaces that are implemented by the various BLS wrappers. |