Documentation ¶
Overview ¶
Package dkg is responsible for performing a distributed key generation procedure. The client-side part is implemented as an initiator, and the nodes sharing a generated secret are implemented as Node.
Implementation is based on <https://github.com/dedis/kyber/blob/master/share/dkg/rabin/dkg.go> which is based on <https://link.springer.com/article/10.1007/s00145-006-0347-3>.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InvalidParamsError ¶
type InvalidParamsError struct {
// contains filtered or unexported fields
}
InvalidParamsError is used to distinguish user errors from the execution errors.
func (InvalidParamsError) Error ¶
func (e InvalidParamsError) Error() string
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node represents a node, that can participate in a DKG procedure. It receives commands from the initiator as a dkg.NodeProvider, and communicates with other DKG nodes via the peering network.
func NewNode ¶
func NewNode( identity *ed25519.KeyPair, netProvider peering.NetworkProvider, reg registry.DKShareRegistryProvider, log *logger.Logger, ) (*Node, error)
Init creates new node, that can participate in the DKG procedure. The node then can run several DKG procedures.
func (*Node) GenerateDistributedKey ¶
func (n *Node) GenerateDistributedKey( peerNetIDs []string, peerPubs []ed25519.PublicKey, threshold uint16, roundRetry time.Duration, stepRetry time.Duration, timeout time.Duration, ) (*tcrypto.DKShare, error)
GenerateDistributedKey takes all the required parameters from the node and initiated the DKG procedure. This function is executed on the DKG initiator node (a chosen leader for this DKG instance).
type NodeProvider ¶ added in v0.2.0
type NodeProvider func() *Node