algorithm

package
v0.6.28-beta.9 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CmpKeygen

func CmpKeygen(id party.ID, ids party.IDSlice, n crypto.Network, threshold int, wg *sync.WaitGroup, pl *pool.Pool) (*cmp.Config, error)

It creates a new handler for the keygen protocol, runs the handler loop, and returns the result

func CmpRefresh

func CmpRefresh(c *cmp.Config, n crypto.Network, wg *sync.WaitGroup, pl *pool.Pool) (*cmp.Config, error)

It creates a new handler for the refresh protocol, runs the handler loop, and returns the result

func CmpSign

func CmpSign(c *cmp.Config, m []byte, signers party.IDSlice, n crypto.Network, wg *sync.WaitGroup, pl *pool.Pool) (*crypto.MPCECDSASignature, error)

It creates a new `protocol.MultiHandler` for the `cmp.Sign` protocol, and then runs the handler loop

func CmpVerify

func CmpVerify(c *cmp.Config, m []byte, sig *crypto.MPCECDSASignature) bool

CmpVerify verifies a signature using the public key of the signer

func EnsureSelfIDInGroup

func EnsureSelfIDInGroup(selfID party.ID, group []party.ID) []party.ID

EnsureSelfIDInGroup ensures that the given self ID is in the given group.

func HandleNetworkProtocol

func HandleNetworkProtocol(id party.ID, h protocol.Handler, network crypto.Network)

HandleNetworkProtocol is a helper function that loops over all the parties and calls the given handler.

func PartyIdListToPeerIdList

func PartyIdListToPeerIdList(ids []crypto.PartyID) []crypto.PeerID

It converts a list of party IDs to a list of peer IDs

func PartyIdToPeerId

func PartyIdToPeerId(id crypto.PartyID) crypto.PeerID

It converts a party ID to a peer ID

func PeerIdListToPartyIdList

func PeerIdListToPartyIdList(ids []crypto.PeerID) []crypto.PartyID

It converts a list of peer IDs to a list of party IDs

func PeerIdToPartyId

func PeerIdToPartyId(id crypto.PeerID) crypto.PartyID

It converts a peer.ID to a party.ID

Types

This section is empty.

Jump to

Keyboard shortcuts

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