cmp

package
v0.6.0-alpha-20...-5109cf1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Keygen

func Keygen(group curve.Curve, selfID party.ID, participants []party.ID, threshold int, pl *pool.Pool) protocol.StartFunc

Keygen generates a new shared ECDSA key over the curve defined by `group`. After a successful execution, all participants posses a unique share of this key, as well as auxiliary parameters required during signing.

For better performance, a `pool.Pool` can be provided in order to parallelize certain steps of the protocol. Returns *cmp.Config if successful.

func Presign

func Presign(config *Config, signers []party.ID, pl *pool.Pool) protocol.StartFunc

Presign generates a preprocessed signature that does not depend on the message being signed. When the message becomes available, the same participants can efficiently combine their shares to produce a full signature with the PresignOnline protocol. Note: the PreSignatures should be treated as secret key material. Returns *ecdsa.PreSignature if successful.

func PresignOnline

func PresignOnline(config *Config, preSignature *ecdsa.PreSignature, messageHash []byte, pl *pool.Pool) protocol.StartFunc

PresignOnline efficiently generates an ECDSA signature for `messageHash` given a preprocessed `PreSignature`. Returns *ecdsa.Signature if successful.

func Refresh

func Refresh(config *Config, pl *pool.Pool) protocol.StartFunc

Refresh allows the parties to refresh all existing cryptographic keys from a previously generated Config. The group's ECDSA public key remains the same, but any previous shares are rendered useless. Returns *cmp.Config if successful.

func Sign

func Sign(config *Config, signers []party.ID, messageHash []byte, pl *pool.Pool) protocol.StartFunc

Sign generates an ECDSA signature for `messageHash` among the given `signers`. Returns *ecdsa.Signature if successful.

Types

type Config

type Config = config.Config

Config represents the stored state of a party who participated in a successful `Keygen` protocol. It contains secret key material and should be safely stored.

func EmptyConfig

func EmptyConfig(group curve.Curve) *Config

EmptyConfig creates an empty Config with a fixed group, ready for unmarshalling.

This needs to be used for unmarshalling, otherwise the points on the curve can't be decoded.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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