signer

package
v1.12.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: BSD-3-Clause Imports: 5 Imported by: 37

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidProofOfPossession = errors.New("invalid proof of possession")
)

Functions

This section is empty.

Types

type Empty

type Empty struct{}

func (*Empty) Key

func (*Empty) Key() *bls.PublicKey

func (*Empty) Verify

func (*Empty) Verify() error

type ProofOfPossession

type ProofOfPossession struct {
	PublicKey [bls.PublicKeyLen]byte `serialize:"true" json:"publicKey"`
	// BLS signature proving ownership of [PublicKey]. The signed message is the
	// [PublicKey].
	ProofOfPossession [bls.SignatureLen]byte `serialize:"true" json:"proofOfPossession"`
	// contains filtered or unexported fields
}

func NewProofOfPossession

func NewProofOfPossession(sk *bls.SecretKey) *ProofOfPossession

func (*ProofOfPossession) Key

func (p *ProofOfPossession) Key() *bls.PublicKey

func (*ProofOfPossession) MarshalJSON

func (p *ProofOfPossession) MarshalJSON() ([]byte, error)

func (*ProofOfPossession) UnmarshalJSON

func (p *ProofOfPossession) UnmarshalJSON(b []byte) error

func (*ProofOfPossession) Verify

func (p *ProofOfPossession) Verify() error

type Signer

type Signer interface {
	verify.Verifiable

	// Key returns the public BLS key if it exists.
	// Note: [nil] will be returned if the key does not exist.
	// Invariant: Only called after [Verify] returns [nil].
	Key() *bls.PublicKey
}

Directories

Path Synopsis
Package signermock is a generated GoMock package.
Package signermock is a generated GoMock package.

Jump to

Keyboard shortcuts

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