Documentation ¶
Index ¶
- type Participant
- func (dp *Participant) Round1(secret []byte) (Round1Bcast, Round1P2PSend, error)
- func (dp *Participant) Round2(bcast map[uint32]Round1Bcast, p2p map[uint32]*Round1P2PSendPacket) (Round2Bcast, error)
- func (dp *Participant) Round3(bcast map[uint32]Round2Bcast) (*Round3Bcast, *v1.ShamirShare, error)
- func (dp *Participant) Round4() (map[uint32]*curves.EcPoint, error)
- type Round1Bcast
- type Round1P2PSend
- type Round1P2PSendPacket
- type Round2Bcast
- type Round3Bcast
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.
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 {}
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.