Documentation
¶
Overview ¶
Package secretsharing provides Shamir Secret Sharing operations.
Index ¶
- func Combine(g group.Group, shares []*KeyShare) (*group.Scalar, error)
- func PolynomialInterpolateConstant(g group.Group, shares []*KeyShare) (*group.Scalar, error)
- func ShardReturnPolynomial(g group.Group, secret *group.Scalar, threshold, total uint, ...) ([]*KeyShare, Polynomial, error)
- func Verify(g group.Group, id uint64, pk *group.Element, coms Commitment) bool
- type Commitment
- type KeyShare
- type Polynomial
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PolynomialInterpolateConstant ¶
PolynomialInterpolateConstant recovers the constant term of the interpolating polynomial defined by the set of key shares.
func ShardReturnPolynomial ¶ added in v0.1.1
func ShardReturnPolynomial( g group.Group, secret *group.Scalar, threshold, total uint, polynomial ...*group.Scalar, ) ([]*KeyShare, Polynomial, error)
ShardReturnPolynomial splits the secret into total shares, recoverable by a subset of threshold shares, and returns the constructed polynomial. Unless you know what you are doing, you probably want to use Shard() instead.
Types ¶
type Commitment ¶
Commitment is the tuple defining a Verifiable Secret Sharing Commitment.
func Commit ¶
func Commit(g group.Group, polynomial Polynomial) Commitment
Commit builds a VSS vector commitment to each of the coefficients (of threshold length which uniquely determines the polynomial).
type Polynomial ¶
Polynomial over scalars, represented as a list of t+1 coefficients, where t is the threshold. The constant term is in the first position and the highest degree coefficient is in the last position.
func NewPolynomial ¶
func NewPolynomial(coefficients uint) Polynomial
NewPolynomial returns a slice of Scalars with the capacity to hold the desired coefficients.
func (Polynomial) DeriveInterpolatingValue ¶
func (p Polynomial) DeriveInterpolatingValue(g group.Group, id *group.Scalar) (*group.Scalar, error)
DeriveInterpolatingValue derives a value used for polynomial interpolation. id and all the coefficients must be non-zero scalars.