dkg

package
v1.0.1-rc.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

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>.

Copyright 2020 IOTA Stiftung SPDX-License-Identifier: Apache-2.0

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 *cryptolib.KeyPair,
	netProvider peering.NetworkProvider,
	dkShareRegistryProvider 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) Close

func (n *Node) Close()

func (*Node) GenerateDistributedKey

func (n *Node) GenerateDistributedKey(
	peerPubs []*cryptolib.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

type Suite

type Suite interface {
	kyber.Group
	kyber.HashFactory
	kyber.XOFFactory
	kyber.Random
	pairing.Suite
}

Suite is a collection of kyber interfaces used by the DKG package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL