senderauth

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: AGPL-3.0, AGPL-3.0 Imports: 4 Imported by: 1 module, 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 senderauth defines the sender-signature acceptance policy shared by native and browser receivers, independently of their cryptographic backends.

Index

Constants

This section is empty.

Variables

View Source
var ErrPublicKey = errors.New("senderauth: public key must be canonical, nonzero and prime-order")

Functions

func Verify

func Verify(publicKey ed25519.PublicKey, message, signature []byte) bool

Verify is for standalone proofs with no retained sender identity. Receivers must retain a Verifier across objects and messages instead.

Types

type Verifier

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

Verifier owns a checked key snapshot and is safe for concurrent verification.

func NewVerifier

func NewVerifier(publicKey ed25519.PublicKey) (*Verifier, error)

NewVerifier rejects the exceptional key encodings on which Ed25519 backends disagree. Prime-order identities also make the portable cofactored equation equivalent to the native equation when the signature point is prime-order.

func (*Verifier) PublicKey

func (v *Verifier) PublicKey() ed25519.PublicKey

PublicKey returns a copy so identity binding cannot mutate shared verification state.

func (*Verifier) Valid

func (v *Verifier) Valid() bool

Valid distinguishes a checked sender key from nil or zero-value verifiers.

func (*Verifier) Verify

func (v *Verifier) Verify(message, signature []byte) bool

Jump to

Keyboard shortcuts

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