jvss

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commitment

type Commitment struct {
	Points []curve.Point // Coefficient commitments
}

Commitment represents a polynomial commitment.

type JVSS

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

JVSS implements Joint Verifiable Secret Sharing. This is used to generate the auxiliary secrets w and q in the re-sharing protocol

func NewJVSS

func NewJVSS(group curve.Curve, threshold int, parties []party.ID, selfID party.ID) *JVSS

NewJVSS creates a new JVSS instance.

func StartJVSS

func StartJVSS(group curve.Curve, selfID party.ID, parties []party.ID, threshold int, _ *pool.Pool) (*JVSS, map[party.ID]*Share, error)

StartJVSS starts a JVSS protocol round

func (*JVSS) CombineShares

func (j *JVSS) CombineShares(shares map[party.ID]*Share) (curve.Scalar, error)

CombineShares combines shares to reconstruct the secret

func (*JVSS) GenerateShares

func (j *JVSS) GenerateShares() (map[party.ID]*Share, *Commitment, curve.Scalar, error)

GenerateShares generates shares for a new random secret.

func (*JVSS) VerifyAndCombine

func (j *JVSS) VerifyAndCombine(allShares map[party.ID]map[party.ID]*Share, commitments map[party.ID]*Commitment) (curve.Scalar, error)

VerifyAndCombine verifies all shares and combines them to get the final secret

func (*JVSS) VerifyShare

func (j *JVSS) VerifyShare(share *Share, commitment *Commitment, partyID party.ID) bool

VerifyShare verifies a share received from another party.

type Share

type Share struct {
	Value curve.Scalar
	Proof *ShareProof
}

Share represents a party's share of a secret.

type ShareProof

type ShareProof struct {
	Commitment curve.Point
	Challenge  curve.Scalar
	Response   curve.Scalar
}

ShareProof provides zero-knowledge proof of share validity.

Jump to

Keyboard shortcuts

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