Documentation ¶
Overview ¶
Package share implements Shamir secret sharing and polynomial commitments. Shamir's scheme allows you to split a secret value into multiple parts, so called shares, by evaluating a secret sharing polynomial at certain indices. The shared secret can only be reconstructed (via Lagrange interpolation) if a threshold of the participants provide their shares. A polynomial commitment scheme allows a committer to commit to a secret sharing polynomial so that a verifier can check the claimed evaluations of the committed polynomial. Both schemes of this package are core building blocks for more advanced secret sharing techniques.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PriPoly ¶
type PriPoly struct {
// contains filtered or unexported fields
}
PriPoly represents a secret sharing polynomial.
func NewPriPoly ¶
NewPriPoly creates a new secret sharing polynomial using the provided cryptographic group, the secret sharing threshold t, and the secret to be shared s. If s is nil, a new s is chosen using the provided randomness stream rand.
func (*PriPoly) Secret ¶
Secret returns the shared secret p(0), i.e., the constant term of the polynomial.