Documentation
¶
Overview ¶
Package blst implements a go-wrapper around a library implementing the BLS12-381 curve and signature scheme. This package exposes a public API for verifying and aggregating BLS signatures used by Ethereum.
This implementation uses the library written by Supranational, blst.
Index ¶
- func IsZero(sKey []byte) bool
- func PublicKeyFromBytes(pubKey []byte) (bls.PubKey, error)
- func RandKey() (bls.SecretKey, error)
- func SecretKeyFromBytes(privKey []byte) (bls.SecretKey, error)
- func SignatureFromBytes(sig []byte) (bls.Signature, error)
- func SignatureFromBytesNoValidation(sig []byte) (bls.Signature, error)
- func VerifySignature(sig []byte, msg [32]byte, pubKey bls.PubKey) (bool, error)
- func VerifySignaturePubkeyBytes(pubKey []byte, msg []byte, signature []byte) bool
- type PublicKey
- type Signature
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PublicKeyFromBytes ¶
PublicKeyFromBytes creates a BLS public key from a BigEndian byte slice.
func SecretKeyFromBytes ¶
SecretKeyFromBytes creates a BLS private key from a BigEndian byte slice.
func SignatureFromBytes ¶
SignatureFromBytes creates a BLS signature from a LittleEndian byte slice.
func SignatureFromBytesNoValidation ¶
SignatureFromBytesNoValidation creates a BLS signature from a LittleEndian byte slice. It does not validate that the signature is in the BLS group
func VerifySignature ¶
VerifySignature verifies a single signature using public key and message.
func VerifySignaturePubkeyBytes ¶
VerifySignaturePubkeyBytes checks if a given signature is valid for a message and public key. It returns true if the signature is valid, otherwise it panics if an error occurs during the verification process.
Types ¶
type PublicKey ¶
type PublicKey struct {
// contains filtered or unexported fields
}
PublicKey used in the BLS signature scheme.