signing

package
v0.0.0-...-add8260 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BLSBackend

type BLSBackend struct {
	gpbft.Verifier
	// contains filtered or unexported fields
}

func NewBLSBackend

func NewBLSBackend() *BLSBackend

func (*BLSBackend) GenerateKey

func (b *BLSBackend) GenerateKey() (gpbft.PubKey, any)

func (*BLSBackend) MarshalPayloadForSigning

func (b *BLSBackend) MarshalPayloadForSigning(nn gpbft.NetworkName, p *gpbft.Payload) []byte

func (*BLSBackend) Sign

func (b *BLSBackend) Sign(sender gpbft.PubKey, msg []byte) ([]byte, error)

type Backend

type Backend interface {
	gpbft.Signer
	gpbft.Verifier
	GenerateKey() (gpbft.PubKey, any)
	MarshalPayloadForSigning(nn gpbft.NetworkName, p *gpbft.Payload) []byte
}

type FakeBackend

type FakeBackend struct {
	// contains filtered or unexported fields
}

func NewFakeBackend

func NewFakeBackend() *FakeBackend

func (*FakeBackend) Aggregate

func (_ *FakeBackend) Aggregate(signers []gpbft.PubKey, sigs [][]byte) ([]byte, error)

func (*FakeBackend) GenerateKey

func (s *FakeBackend) GenerateKey() (gpbft.PubKey, any)

func (*FakeBackend) MarshalPayloadForSigning

func (v *FakeBackend) MarshalPayloadForSigning(nn gpbft.NetworkName, p *gpbft.Payload) []byte

func (*FakeBackend) Sign

func (s *FakeBackend) Sign(signer gpbft.PubKey, msg []byte) ([]byte, error)

func (*FakeBackend) Verify

func (s *FakeBackend) Verify(signer gpbft.PubKey, msg, sig []byte) error

func (*FakeBackend) VerifyAggregate

func (s *FakeBackend) VerifyAggregate(payload, aggSig []byte, signers []gpbft.PubKey) error

Jump to

Keyboard shortcuts

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