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 ¶
- func RecoverGroupSecret(c frost.Ciphersuite, keyShares []*keys.KeyShare) (*ecc.Scalar, error)
- func RecoverPublicKeys(c frost.Ciphersuite, maxSigners uint16, commitment []*ecc.Element) (*ecc.Element, []*ecc.Element, error)
- func Sign(c frost.Ciphersuite, msg []byte, key *ecc.Scalar, random ...*ecc.Scalar) (*frost.Signature, error)
- func TrustedDealerKeygen(c frost.Ciphersuite, secret *ecc.Scalar, threshold, maxSigners uint16, ...) ([]*keys.KeyShare, *ecc.Element, []*ecc.Element)
- func VerifyVSS(g ecc.Group, share *keys.KeyShare, commitment []*ecc.Element) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RecoverGroupSecret ¶
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.
Types ¶
This section is empty.