gennaro

package
v0.0.3-gama Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

README

gennaro

import "github.com/coinbase/kryptology/pkg/dkg/gennaro"

Index

type Participant

Participant is a DKG player that contains information needed to perform DKG rounds and yield a secret key share and public key when finished

type Participant struct {
    // contains filtered or unexported fields
}
func NewParticipant
func NewParticipant(id, threshold uint32, generator *curves.EcPoint, scalar curves.EcScalar, otherParticipants ...uint32) (*Participant, error)

NewParticipant creates a participant ready to perform a DKG `id` is the integer value identifier for this participant `threshold` is the minimum bound for the secret sharing scheme `generator` is the blinding factor generator used by pedersen's verifiable secret sharing `otherParticipants` is the integer value identifiers for the other participants `id` and `otherParticipants` must be the set of integers 1,2,....,n

func (*Participant) Round1
func (dp *Participant) Round1(secret []byte) (Round1Bcast, Round1P2PSend, error)

Round1 computes the first round for the DKG `secret` can be nil NOTE: if `secret` is nil, a new secret is generated which creates a new key if `secret` is set, then this performs key resharing aka proactive secret sharing update

func (*Participant) Round2
func (dp *Participant) Round2(bcast map[uint32]Round1Bcast, p2p map[uint32]*Round1P2PSendPacket) (Round2Bcast, error)

Round2 computes the second round for Gennaro DKG Algorithm 3 - Gennaro DKG Round 2 bcast contains all Round1 broadcast from other participants to this participant p2p contains all Round1 P2P send message from other participants to this participant

func (*Participant) Round3
func (dp *Participant) Round3(bcast map[uint32]Round2Bcast) (*Round3Bcast, *v1.ShamirShare, error)

Round3 computes the third round for Gennaro DKG Algorithm 4 - Gennaro DKG Round 3 bcast contains all Round2 broadcast from other participants to this participant.

func (*Participant) Round4
func (dp *Participant) Round4() (map[uint32]*curves.EcPoint, error)

Round4 computes the public shares used by tECDSA during signing that are converted to additive shares once the signing participants are known. This function is idempotent

type Round1Bcast

Round1Bcast are the values that are broadcast to all other participants after round1 completes

type Round1Bcast = []*v1.ShareVerifier

type Round1P2PSend

Round1P2PSend are the values that are sent to individual participants based on the id

type Round1P2PSend = map[uint32]*Round1P2PSendPacket

type Round1P2PSendPacket

Round1P2PSendPacket are the shares generated from the secret for a specific participant

type Round1P2PSendPacket struct {
    SecretShare   *v1.ShamirShare
    BlindingShare *v1.ShamirShare
}

type Round2Bcast

type Round2Bcast = []*v1.ShareVerifier

type Round3Bcast

Round3Bcast contains values that will be broadcast to other participants.

type Round3Bcast = v1.ShareVerifier

Generated by gomarkdoc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Participant

type Participant struct {
	// contains filtered or unexported fields
}

Participant is a DKG player that contains information needed to perform DKG rounds and yield a secret key share and public key when finished

func NewParticipant

func NewParticipant(id, threshold uint32, generator *curves.EcPoint, scalar curves.EcScalar, otherParticipants ...uint32) (*Participant, error)

NewParticipant creates a participant ready to perform a DKG `id` is the integer value identifier for this participant `threshold` is the minimum bound for the secret sharing scheme `generator` is the blinding factor generator used by pedersen's verifiable secret sharing `otherParticipants` is the integer value identifiers for the other participants `id` and `otherParticipants` must be the set of integers 1,2,....,n

func (*Participant) Round1

func (dp *Participant) Round1(secret []byte) (Round1Bcast, Round1P2PSend, error)

Round1 computes the first round for the DKG `secret` can be nil NOTE: if `secret` is nil, a new secret is generated which creates a new key if `secret` is set, then this performs key resharing aka proactive secret sharing update

func (*Participant) Round2

func (dp *Participant) Round2(bcast map[uint32]Round1Bcast, p2p map[uint32]*Round1P2PSendPacket) (Round2Bcast, error)

Round2 computes the second round for Gennaro DKG Algorithm 3 - Gennaro DKG Round 2 bcast contains all Round1 broadcast from other participants to this participant p2p contains all Round1 P2P send message from other participants to this participant

func (*Participant) Round3

func (dp *Participant) Round3(bcast map[uint32]Round2Bcast) (*Round3Bcast, *v1.ShamirShare, error)

Round3 computes the third round for Gennaro DKG Algorithm 4 - Gennaro DKG Round 3 bcast contains all Round2 broadcast from other participants to this participant.

func (*Participant) Round4

func (dp *Participant) Round4() (map[uint32]*curves.EcPoint, error)

Round4 computes the public shares used by tECDSA during signing that are converted to additive shares once the signing participants are known. This function is idempotent

type Round1Bcast

type Round1Bcast = []*v1.ShareVerifier

Round1Bcast are the values that are broadcast to all other participants after round1 completes

type Round1P2PSend

type Round1P2PSend = map[uint32]*Round1P2PSendPacket

Round1P2PSend are the values that are sent to individual participants based on the id

type Round1P2PSendPacket

type Round1P2PSendPacket struct {
	SecretShare   *v1.ShamirShare
	BlindingShare *v1.ShamirShare
}

Round1P2PSendPacket are the shares generated from the secret for a specific participant

type Round2Bcast

type Round2Bcast = []*v1.ShareVerifier

type Round3Bcast

type Round3Bcast = v1.ShareVerifier

Round3Bcast contains values that will be broadcast to other participants.

Jump to

Keyboard shortcuts

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