Documentation ¶
Overview ¶
Wraps dkg/genarro and specializes it for the 2-party case. Simpler API, no distinction between broadcast and peer messages, and only counterparty messages are used as round inputs since self-inputs are always ignored.
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, counterPartyId uint32, blind *curves.EcPoint, scalar curves.EcScalar, curve elliptic.Curve) (*Participant, error)
NewParticipant creates a participant ready to perform a DKG blind must be a generator and must be synchronized between counterparties. The first participant can set it to `nil` and a secure blinding factor will be generated.
func (*Participant) Finalize ¶
func (p *Participant) Finalize(msg *Round2Message) (*DkgResult, error)
Completes the DKG using the counterparty's output from round 2.
func (*Participant) Round1 ¶
func (p *Participant) Round1(secret []byte) (*Round1Message, error)
Runs DKG round 1. If `secret` is nil, shares of a new, random signing key are generated. Otherwise, the existing secret shares will be refreshed but the privkey and pubkey will remain unchanged.
func (*Participant) Round2 ¶
func (p *Participant) Round2(msg *Round1Message) (*Round2Message, error)
Runs DKG round 2 using the counterparty's output from round 1.
type Round1Message ¶
type Round1Message struct { Verifiers []*v1.ShareVerifier Blind *curves.EcPoint }
type Round2Message ¶
type Round2Message struct {
Verifiers []*v1.ShareVerifier
}