Documentation ¶
Overview ¶
Package sharing is an implementation of shamir secret sharing and implements the following papers.
- https://dl.acm.org/doi/pdf/10.1145/359168.359176 - https://www.cs.umd.edu/~gasarch/TOPICS/secretsharing/feldmanVSS.pdf - https://link.springer.com/content/pdf/10.1007%2F3-540-46766-1_9.pdf
Index ¶
- type Feldman
- 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
- type Pedersen
- 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
- type PedersenVerifier
- type Polynomial
- type Shamir
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Feldman ¶
func (Feldman) CombinePoints ¶
func (f Feldman) CombinePoints(shares ...*ShamirShare) (curves.Point, error)
func (Feldman) LagrangeCoeffs ¶
func (Feldman) Split ¶
func (f Feldman) Split(secret curves.Scalar, reader io.Reader) (*FeldmanVerifier, []*ShamirShare, error)
type FeldmanVerifier ¶
func (FeldmanVerifier) Verify ¶
func (v FeldmanVerifier) Verify(share *ShamirShare) error
type Pedersen ¶
type Pedersen struct {
// contains filtered or unexported fields
}
Pedersen Verifiable Secret Sharing Scheme
func NewPedersen ¶
NewPedersen creates a new pedersen VSS
func (Pedersen) CombinePoints ¶
func (pd Pedersen) CombinePoints(shares ...*ShamirShare) (curves.Point, error)
func (Pedersen) LagrangeCoeffs ¶
type PedersenResult ¶
PedersenResult contains all the data from calling Split
type PedersenVerifier ¶
func (PedersenVerifier) Verify ¶
func (pv PedersenVerifier) Verify(share, blindShare *ShamirShare) error
type Polynomial ¶
func (*Polynomial) Init ¶
func (p *Polynomial) Init(intercept curves.Scalar, degree uint32, reader io.Reader) *Polynomial
type Shamir ¶
type Shamir struct {
// contains filtered or unexported fields
}
func (Shamir) CombinePoints ¶
func (s Shamir) CombinePoints(shares ...*ShamirShare) (curves.Point, error)
func (Shamir) LagrangeCoeffs ¶
type ShamirShare ¶
type ShamirShare struct {}
func (ShamirShare) Bytes ¶
func (ss ShamirShare) Bytes() []byte
Click to show internal directories.
Click to hide internal directories.