blst

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AggregatePublicKeys

func AggregatePublicKeys(pks []types.PublicKey) (types.PublicKey, error)

AggregatePublicKeys assumes that given public keys has passed the KeyValidate() check i.e. they are not infinite and are on the right subgroup.

PublicKey objects are expected to be returned by SecretKey.PublicKey(), PublicKeyFromBytes() and AggregatePublicKeysFromBytes(), and they all should be valid. Therefore AggregatePublicKeys skips the validatity check.

func AggregatePublicKeysFromBytes

func AggregatePublicKeysFromBytes(bs [][]byte) (types.PublicKey, error)

func AggregateSignatures

func AggregateSignatures(sigs []types.Signature) (types.Signature, error)

AggregateSignatures assumes that given signatures has passed the SigValidate() check i.e. they are on the right subgroup.

Signature objects are expected to be returned by Sign(), SignatureFromBytes() and AggregateSignaturesFromBytes(), and they all should be valid. Therefore AggregateSignatures skips the validatity check.

func AggregateSignaturesFromBytes

func AggregateSignaturesFromBytes(bs [][]byte) (types.Signature, error)

func FastAggregateVerify

func FastAggregateVerify(sig types.Signature, msg []byte, pks []types.PublicKey) bool

func GenerateKey added in v1.12.0

func GenerateKey(ikm []byte) (types.SecretKey, error)

func MultiplePublicKeysFromBytes

func MultiplePublicKeysFromBytes(bs [][]byte) ([]types.PublicKey, error)

func MultipleSignaturesFromBytes

func MultipleSignaturesFromBytes(bs [][]byte) ([]types.Signature, error)

func PopProve added in v1.12.0

func PopProve(sk types.SecretKey) types.Signature

draft-irtf-cfrg-bls-signature-05 section 3.3.2. PopProve

func PopVerify added in v1.12.0

func PopVerify(pk types.PublicKey, sig types.Signature) bool

draft-irtf-cfrg-bls-signature-05 section 3.3.3. PopVerify

func PublicKeyFromBytes

func PublicKeyFromBytes(b []byte) (types.PublicKey, error)

func RandKey

func RandKey() (types.SecretKey, error)

func SecretKeyFromBytes

func SecretKeyFromBytes(b []byte) (types.SecretKey, error)

func Sign

func Sign(sk types.SecretKey, msg []byte) types.Signature

func SignatureFromBytes

func SignatureFromBytes(b []byte) (types.Signature, error)

func Verify

func Verify(sig types.Signature, msg []byte, pk types.PublicKey) bool

func VerifySignature

func VerifySignature(sigb []byte, msg [32]byte, pk types.PublicKey) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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