signing

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0, MIT Imports: 12 Imported by: 3

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(ctx context.Context, 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 (s *FakeBackend) Aggregate(keys []gpbft.PubKey) (gpbft.Aggregate, error)

func (*FakeBackend) Allow

func (s *FakeBackend) Allow(i int) gpbft.PubKey

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(_ context.Context, signer gpbft.PubKey, msg []byte) ([]byte, error)

func (*FakeBackend) Verify

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

Jump to

Keyboard shortcuts

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