bls

package
v0.0.0-...-f069fcf Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const BlsEth crypto.KeyType = 9

Variables

View Source
var HashAndMapToSignature = bls.HashAndMapToSignature

Functions

func GenerateKeyPair

func GenerateKeyPair(opt crypto.KeyType) (crypto.PrivateKey, error)

func IsSign

func IsSign(aggSign *bls.Sign, aggDataSign *bls.Sign, selfKey *bls.PublicKey) bool

func UnmarshalPrivateKey

func UnmarshalPrivateKey(data []byte, opt crypto.KeyType) (crypto.PrivateKey, error)

func Verify

func Verify(opt crypto.KeyType, sig, digest []byte, from types.Address) (bool, error)

Verify TODO fix bug

Types

type PrivateKey

type PrivateKey struct {
	*bls.SecretKey
	// contains filtered or unexported fields
}

func (*PrivateKey) Bytes

func (p *PrivateKey) Bytes() ([]byte, error)

func (*PrivateKey) PublicKey

func (p *PrivateKey) PublicKey() crypto.PublicKey

func (*PrivateKey) Sign

func (p *PrivateKey) Sign(digest []byte) ([]byte, error)

func (*PrivateKey) Type

func (p *PrivateKey) Type() crypto.KeyType

type PublicKey

type PublicKey struct {
	*bls.PublicKey
	// contains filtered or unexported fields
}

func (*PublicKey) Address

func (p *PublicKey) Address() (*types.Address, error)

func (*PublicKey) Bytes

func (p *PublicKey) Bytes() ([]byte, error)

func (*PublicKey) Type

func (p *PublicKey) Type() crypto.KeyType

func (*PublicKey) Verify

func (p *PublicKey) Verify(digest []byte, sig []byte) (bool, error)

type Sign

type Sign = bls.Sign

Jump to

Keyboard shortcuts

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