Documentation ¶
Overview ¶
Package dkg provides methods for distributed key generation.
Index ¶
- func GenerateNode(curve kyber.Group, g2 kyber.Point, zkParam kyber.Scalar, timeout time.Duration, ...) (*node, error)
- func LagrangeInterpolateZero(points []struct{ ... }, group kyber.Group) (kyber.Scalar, error)
- func NewNode(curve kyber.Group, g2 kyber.Point, zkParam kyber.Scalar, timeout time.Duration, ...) (*node, error)
- type InvalidCurvePointError
- type InvalidCurveScalarError
- type InvalidCurveScalarPolynomialError
- type InvalidPointValueError
- type InvalidPointsLengthError
- type InvalidScalarPolynomialLengthError
- type Message
- type MessageType
- type Participant
- type ParticipantNotFoundError
- type PointTuple
- type ScalarPolynomial
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateNode ¶
func GenerateNode( curve kyber.Group, g2 kyber.Point, zkParam kyber.Scalar, timeout time.Duration, id kyber.Scalar, rand cipher.Stream, threshold int, ) (*node, error)
GenerateNode generates a new DKG node randomly.
func LagrangeInterpolateZero ¶
func LagrangeInterpolateZero(points []struct{ x, fX kyber.Scalar }, group kyber.Group) (kyber.Scalar, error)
LagrangeInterpolateZero - find a constant in a source polynomial S=f(0) using Lagrange polynomials using computationally efficient approach https://en.wikipedia.org/wiki/Shamir%27s_Secret_Sharing#Computationally_Efficient_Approach
Types ¶
type InvalidCurvePointError ¶
type InvalidCurvePointError struct {
// contains filtered or unexported fields
}
InvalidCurvePointError indicates that a given vector does not belong to a vector space
func (InvalidCurvePointError) Error ¶
func (e InvalidCurvePointError) Error() string
type InvalidCurveScalarError ¶
type InvalidCurveScalarError struct {
// contains filtered or unexported fields
}
InvalidCurveScalarError indicates a scalar is not a normalized field element for a given vector space
func (InvalidCurveScalarError) Error ¶
func (e InvalidCurveScalarError) Error() string
type InvalidCurveScalarPolynomialError ¶
type InvalidCurveScalarPolynomialError struct {
// contains filtered or unexported fields
}
InvalidCurveScalarPolynomialError indicates that a ScalarPolynomial is not constructed properly
func (InvalidCurveScalarPolynomialError) Error ¶
func (e InvalidCurveScalarPolynomialError) Error() string
type InvalidPointValueError ¶
type InvalidPointValueError struct {
// contains filtered or unexported fields
}
InvalidPointValueError scalar point value should not be nil
func (InvalidPointValueError) Error ¶
func (e InvalidPointValueError) Error() string
type InvalidPointsLengthError ¶
type InvalidPointsLengthError struct {
// contains filtered or unexported fields
}
InvalidPointsLengthError indicates that the number of points given was below the required amount
func (InvalidPointsLengthError) Error ¶
func (e InvalidPointsLengthError) Error() string
type InvalidScalarPolynomialLengthError ¶
type InvalidScalarPolynomialLengthError struct {
// contains filtered or unexported fields
}
InvalidScalarPolynomialLengthError indicates that ScalarPolynomials which should have a matching degree don't
func (InvalidScalarPolynomialLengthError) Error ¶
func (e InvalidScalarPolynomialLengthError) Error() string
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
Message struct for dkg message (will likely change)
type MessageType ¶
type MessageType int
MessageType enum for dkg message (will likely change)
const (
A MessageType = iota
)
MessageType iota for dkg message (will likely change)
type Participant ¶
type Participant struct {
// contains filtered or unexported fields
}
Participant represent a view of other nodes for a node
type ParticipantNotFoundError ¶
type ParticipantNotFoundError struct {
// contains filtered or unexported fields
}
ParticipantNotFoundError indicates a node with a particular ID could not be found in a node's participant list
func (ParticipantNotFoundError) Error ¶
func (e ParticipantNotFoundError) Error() string
type ScalarPolynomial ¶
ScalarPolynomial represents polynomials of scalars. It contains coefficients from the finite field under the vector space. Coefficient zero represents the constant term, coefficient one the linear term's coefficient, two the quadratic, etc.