signer

package
v1.9.4-rc.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: BSD-3-Clause Imports: 5 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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
}

Jump to

Keyboard shortcuts

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