debug

package
v0.0.0-...-f349239 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package debug provides tools for key generation and verification for debugging purposes. They might be helpful for setups and investigations, but are not recommended to be used with production data (e.g. centralized key generation or recovery reveals the group's secret key in one spot, which goes against the principle in a decentralized setup).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecoverGroupSecret

func RecoverGroupSecret(c frost.Ciphersuite, keyShares []*keys.KeyShare) (*ecc.Scalar, error)

RecoverGroupSecret returns the groups secret from at least t-among-n (t = threshold) participant key shares. This is not recommended, as combining all distributed secret shares can put the group secret at risk.

func RecoverPublicKeys

func RecoverPublicKeys(
	c frost.Ciphersuite,
	maxSigners uint16,
	commitment []*ecc.Element,
) (*ecc.Element, []*ecc.Element, error)

RecoverPublicKeys returns the group public key as well those from all participants, if the identifiers are 1, 2, ..., maxSigners, given the VSS commitment vector.

func Sign

func Sign(c frost.Ciphersuite, msg []byte, key *ecc.Scalar, random ...*ecc.Scalar) (*frost.Signature, error)

Sign returns a Schnorr signature over the message msg with the full secret signing key (as opposed to a key share). The optional random argument is the random k in Schnorr signatures. Setting it allows for reproducible signatures.

func TrustedDealerKeygen

func TrustedDealerKeygen(
	c frost.Ciphersuite,
	secret *ecc.Scalar,
	threshold, maxSigners uint16,
	coeffs ...*ecc.Scalar,
) ([]*keys.KeyShare, *ecc.Element, []*ecc.Element)

TrustedDealerKeygen uses Shamir and Verifiable Secret Sharing to create secret shares of an input group secret. If secret is not set, a new random secret will be generated. These shares should be distributed securely to relevant participants. Note that this is centralized and combines the shared secret at some point. To use a decentralized dealer-less key generation, use the github.com/bytemare/dkg package.

func VerifyVSS

func VerifyVSS(g ecc.Group, share *keys.KeyShare, commitment []*ecc.Element) bool

VerifyVSS allows verification of a participant's secret share given a VSS commitment to the secret polynomial.

Types

This section is empty.

Jump to

Keyboard shortcuts

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