Versions in this module Expand all Collapse all v1 v1.11.0 Oct 31, 2023 Changes in this version + type Feldman struct + Curve *curves.Curve + Limit uint32 + Threshold uint32 + func NewFeldman(threshold, limit uint32, curve *curves.Curve) (*Feldman, error) + func (f Feldman) Combine(shares ...*ShamirShare) (curves.Scalar, error) + func (f Feldman) CombinePoints(shares ...*ShamirShare) (curves.Point, error) + func (f Feldman) LagrangeCoeffs(shares map[uint32]*ShamirShare) (map[uint32]curves.Scalar, error) + func (f Feldman) Split(secret curves.Scalar, reader io.Reader) (*FeldmanVerifier, []*ShamirShare, error) + type FeldmanVerifier struct + Commitments []curves.Point + func (v FeldmanVerifier) Verify(share *ShamirShare) error + type Pedersen struct + func NewPedersen(threshold, limit uint32, generator curves.Point) (*Pedersen, error) + func (pd Pedersen) Combine(shares ...*ShamirShare) (curves.Scalar, error) + func (pd Pedersen) CombinePoints(shares ...*ShamirShare) (curves.Point, error) + func (pd Pedersen) LagrangeCoeffs(shares map[uint32]*ShamirShare) (map[uint32]curves.Scalar, error) + func (pd Pedersen) Split(secret curves.Scalar, reader io.Reader) (*PedersenResult, error) + type PedersenResult struct + Blinding curves.Scalar + BlindingShares []*ShamirShare + FeldmanVerifier *FeldmanVerifier + PedersenVerifier *PedersenVerifier + SecretShares []*ShamirShare + type PedersenVerifier struct + Commitments []curves.Point + Generator curves.Point + func (pv PedersenVerifier) Verify(share, blindShare *ShamirShare) error + type Polynomial struct + Coefficients []curves.Scalar + func (p *Polynomial) Init(intercept curves.Scalar, degree uint32, reader io.Reader) *Polynomial + func (p Polynomial) Evaluate(x curves.Scalar) curves.Scalar + type Shamir struct + func NewShamir(threshold, limit uint32, curve *curves.Curve) (*Shamir, error) + func (s Shamir) Combine(shares ...*ShamirShare) (curves.Scalar, error) + func (s Shamir) CombinePoints(shares ...*ShamirShare) (curves.Point, error) + func (s Shamir) LagrangeCoeffs(identities []uint32) (map[uint32]curves.Scalar, error) + func (s Shamir) Split(secret curves.Scalar, reader io.Reader) ([]*ShamirShare, error) + type ShamirShare struct + Id uint32 + Value []byte + func (ss ShamirShare) Bytes() []byte + func (ss ShamirShare) Validate(curve *curves.Curve) error