ecdsatss

package
v2.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Safe big len using random for ssid
	SafeBitLen = 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	LocalPreParams
	LocalSecrets

	Ks                []*big.Int // original indexes (ki in signing preparation phase)
	NTildej, H1j, H2j []*big.Int // // n-tilde, h1, h2 for range proofs
	// public keys (Xj = uj*G for each Pj)
	BigXj       []*crypto.ECPoint     // Xj
	PaillierPKs []*paillier.PublicKey // pkj
	// used for test assertions (may be discarded)
	ECDSAPub *crypto.ECPoint // y
}

Key represents the data for a local share of key

type Keygen

type Keygen struct {
	KGCs []cmts.HashCommitment

	Receiver tss.MessageReceiver
	// contains filtered or unexported fields
}

Keygen is an object used to track a key currently being generated

func NewKeygen

func NewKeygen(params *tss.Parameters) (*Keygen, error)

type LocalPreGenerator

type LocalPreGenerator struct {
	context.Context           // Context used to stop generation if needed
	Rand            io.Reader // reader used for random, defaults to rand.Reader if nil
	Concurrency     int       // concurrency, defaults to runtime.NumCPU() if nil
}

func (*LocalPreGenerator) Generate

func (g *LocalPreGenerator) Generate() (*LocalPreParams, error)

type LocalPreParams

type LocalPreParams struct {
	PaillierSK                           *paillier.PrivateKey // ski
	NTildei, H1i, H2i, Alpha, Beta, P, Q *big.Int
}

func GeneratePreParams

func GeneratePreParams(timeout time.Duration, optionalConcurrency ...int) (*LocalPreParams, error)

GeneratePreParams finds two safe primes and computes the Paillier secret required for the protocol. This can be a time consuming process so it is recommended to do it out-of-band. If not specified, a concurrency value equal to the number of available CPU cores will be used. If pre-parameters could not be generated before the timeout, an error is returned.

func (LocalPreParams) Validate

func (preParams LocalPreParams) Validate() bool

func (LocalPreParams) ValidateWithProof

func (preParams LocalPreParams) ValidateWithProof() bool

type LocalSecrets

type LocalSecrets struct {
	// secret fields (not shared, but stored locally)
	Xi, ShareID *big.Int // xi, kj
}

Jump to

Keyboard shortcuts

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