tsig

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package tsig defines common types for threshold signature schemes.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidArgument is returned when a function receives an invalid argument.
	ErrInvalidArgument = errs.New("invalid argument")
)

Functions

This section is empty.

Types

type BasePublicMaterial

type BasePublicMaterial[E algebra.PrimeGroupElement[E, S], S algebra.PrimeFieldElement[S]] struct {
	// contains filtered or unexported fields
}

BasePublicMaterial contains the public information for threshold signature verification, including the access structure, verification vector, and partial public keys for each party.

func (*BasePublicMaterial[E, S]) AccessStructure

func (spm *BasePublicMaterial[E, S]) AccessStructure() *sharing.ThresholdAccessStructure

AccessStructure returns the threshold access structure defining authorized quorums.

func (*BasePublicMaterial[E, S]) Equal

func (spm *BasePublicMaterial[E, S]) Equal(other *BasePublicMaterial[E, S]) bool

Equal returns true if this public material equals another.

func (*BasePublicMaterial[E, S]) HashCode

func (spm *BasePublicMaterial[E, S]) HashCode() base.HashCode

HashCode returns a hash code for this public material.

func (*BasePublicMaterial[E, S]) MarshalCBOR

func (spm *BasePublicMaterial[E, S]) MarshalCBOR() ([]byte, error)

MarshalCBOR serialises the public material to CBOR format.

func (*BasePublicMaterial[E, S]) PartialPublicKeys

func (spm *BasePublicMaterial[E, S]) PartialPublicKeys() ds.Map[sharing.ID, *schnorrlike.PublicKey[E, S]]

PartialPublicKeys returns the map of party IDs to their partial public keys.

func (*BasePublicMaterial[E, S]) PublicKey

func (spm *BasePublicMaterial[E, S]) PublicKey() E

PublicKey returns the threshold public key (first coefficient of the verification vector).

func (*BasePublicMaterial[E, S]) UnmarshalCBOR

func (spm *BasePublicMaterial[E, S]) UnmarshalCBOR(data []byte) error

UnmarshalCBOR deserializes the public material from CBOR format.

func (*BasePublicMaterial[E, S]) VerificationVector

func (spm *BasePublicMaterial[E, S]) VerificationVector() feldman.VerificationVector[E, S]

VerificationVector returns the Feldman verification vector for the shared secret.

type BaseShard

type BaseShard[
	E algebra.PrimeGroupElement[E, S],
	S algebra.PrimeFieldElement[S],
] struct {
	BasePublicMaterial[E, S]
	// contains filtered or unexported fields
}

BaseShard contains a party's secret share and the associated public material for threshold signing.

func NewBaseShard

func NewBaseShard[E algebra.PrimeGroupElement[E, S], S algebra.PrimeFieldElement[S]](
	share *feldman.Share[S],
	fv feldman.VerificationVector[E, S],
	accessStructure *sharing.ThresholdAccessStructure,
) (*BaseShard[E, S], error)

NewBaseShard creates a new base shard from a Feldman share, verification vector, and access structure. It computes the partial public keys for all parties in the access structure.

func (*BaseShard[E, S]) Equal

func (sh *BaseShard[E, S]) Equal(other *BaseShard[E, S]) bool

Equal returns true if this shard equals another.

func (*BaseShard[E, S]) HashCode

func (sh *BaseShard[E, S]) HashCode() base.HashCode

HashCode returns a hash code for this shard.

func (*BaseShard[E, S]) MarshalCBOR

func (sh *BaseShard[E, S]) MarshalCBOR() ([]byte, error)

MarshalCBOR serialises the shard to CBOR format.

func (*BaseShard[E, S]) Share

func (sh *BaseShard[E, S]) Share() *feldman.Share[S]

Share returns the party's Feldman secret share.

func (*BaseShard[E, S]) UnmarshalCBOR

func (sh *BaseShard[E, S]) UnmarshalCBOR(data []byte) error

UnmarshalCBOR deserializes the shard from CBOR format.

type PublicMaterial

type PublicMaterial[
	PK signatures.PublicKey[PK],
	AC sharing.AccessStructure,
] interface {
	PublicKey() PK
	AccessStructure() AC
}

PublicMaterial represents the public material shared among participants.

type Shard

type Shard[
	PK signatures.PublicKey[PK],
	S sharing.Share[S],
	AC sharing.AccessStructure,
] interface {
	Share() S
	PublicMaterial[PK, AC]
	base.Hashable[Shard[PK, S, AC]]
}

Shard represents a threshold signature shard held by a participant.

Directories

Path Synopsis
Package tbls provides threshold BLS signature scheme implementation for pairing-friendly curves.
Package tbls provides threshold BLS signature scheme implementation for pairing-friendly curves.
boldyreva02
Package boldyreva02 provides implementation of the Boldyreva threshold BLS signature scheme.
Package boldyreva02 provides implementation of the Boldyreva threshold BLS signature scheme.
boldyreva02/keygen
Package keygen provides shard creation for Boldyreva threshold BLS signatures.
Package keygen provides shard creation for Boldyreva threshold BLS signatures.
boldyreva02/signing
Package signing provides threshold BLS signing protocol for Boldyreva scheme.
Package signing provides threshold BLS signing protocol for Boldyreva scheme.
Package tecdsa defines shared types and helpers for threshold ECDSA schemes.
Package tecdsa defines shared types and helpers for threshold ECDSA schemes.
dkls23
Package dkls23 implements DKLs23 threshold ECDSA signing protocol.
Package dkls23 implements DKLs23 threshold ECDSA signing protocol.
dkls23/keygen/dkg
Package dkg implements the DKLS23 distributed key generation protocol.
Package dkg implements the DKLS23 distributed key generation protocol.
dkls23/keygen/trusted_dealer
Package trusted_dealer implements DKLS23 key generation with a trusted dealer.
Package trusted_dealer implements DKLS23 key generation with a trusted dealer.
dkls23/signing/interactive/sign
Package sign implements interactive DKLS23 signing.
Package sign implements interactive DKLS23 signing.
dkls23/signing/interactive/sign_bbot
Package sign_bbot implements interactive DKLS23 signing using BBOT multiplication.
Package sign_bbot implements interactive DKLS23 signing using BBOT multiplication.
dkls23/signing/interactive/sign_softspoken
Package sign_softspoken implements interactive DKLS23 signing using SoftSpoken multiplication.
Package sign_softspoken implements interactive DKLS23 signing using SoftSpoken multiplication.
lindell17
Package lindell17 implements the Lindell 2017 threshold ECDSA protocol.
Package lindell17 implements the Lindell 2017 threshold ECDSA protocol.
lindell17/keygen/dkg
Package dkg implements Lindell17 distributed key generation.
Package dkg implements Lindell17 distributed key generation.
lindell17/keygen/trusted_dealer
Package trusted_dealer implements Lindell17 key generation with a trusted dealer.
Package trusted_dealer implements Lindell17 key generation with a trusted dealer.
lindell17/signing
Package signing implements Lindell17 threshold ECDSA signing rounds.
Package signing implements Lindell17 threshold ECDSA signing rounds.
Package tschnorr provides threshold Schnorr signature implementation supporting multiple MPC-friendly Schnorr variants.
Package tschnorr provides threshold Schnorr signature implementation supporting multiple MPC-friendly Schnorr variants.
lindell22
Package lindell22 provides implementation of the Lindell 2022 threshold Schnorr signing protocol.
Package lindell22 provides implementation of the Lindell 2022 threshold Schnorr signing protocol.
lindell22/keygen
Package keygen provides key generation for Lindell22 threshold Schnorr signing.
Package keygen provides key generation for Lindell22 threshold Schnorr signing.
lindell22/signing
Package signing provides interactive signing protocol for Lindell22 threshold Schnorr.
Package signing provides interactive signing protocol for Lindell22 threshold Schnorr.

Jump to

Keyboard shortcuts

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