signer

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: BSD-3-Clause Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package signer provides the Signer interface for BLS signatures.

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.Signer) (*ProofOfPossession, error)

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
}

Signer is the interface for a BLS signer.

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