mpc

package
v0.3.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: GPL-3.0 Imports: 12 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) ([]byte, 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 []byte) (bool, error)

func DeserializeSignature

func DeserializeSignature(sigStr []byte) (*ecdsa.Signature, error)

- The R and S values must be in the valid range for secp256k1 scalars:

  • Negative values are rejected
  • Zero is rejected
  • Values greater than or equal to the secp256k1 group order are rejected

func Keygen

func Keygen(accName string, current party.ID, threshold int, net crypto.Network, coinType common.CoinType) (*v1.AccountConfig, *cmp.Config, error)

Keygen Generates a new ECDSA private key shared among all the given participants.

func SerializeSignature

func SerializeSignature(sig *ecdsa.Signature) ([]byte, error)

SerializeSignature marshals an ECDSA signature to DER format for use with the CMP protocol

Types

This section is empty.

Jump to

Keyboard shortcuts

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