keygen

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	G = curves.ScalarToPoint(curve, big.NewInt(1))
)

Functions

func P1

func P1(share1 *big.Int, paiPriKey *paillier.PrivateKey, from, to int, preParams *PreParams) (*tss.Message, error)

P1 after dkg, prepare for 2-party signature, P1 send encrypt x1 to P2 paillier key pair generation is time-consuming, generated in advance, encrypted storage?

Types

type P1Data

type P1Data struct {
	E_x1      *big.Int // paillier encrypt x1
	Proof     *schnorr.Proof
	PaiPubKey *paillier.PublicKey // paillier public key
	X1        *curves.ECPoint

	NIZKProof       []string
	DlnProof1       *zkp.DlnProof
	DlnProof2       *zkp.DlnProof
	PDLwSlackProof  *zkp.PDLwSlackProof
	StatementParams *zkp.StatementParams
}

type P2SaveData

type P2SaveData struct {
	From      int
	To        int
	E_x1      *big.Int
	PaiPubKey *paillier.PublicKey
	X2        *big.Int
}

func P2

func P2(share2 *big.Int, publicKey *curves.ECPoint, msg *tss.Message, from, to int) (*P2SaveData, error)

P2 after dkg, prepare for 2-party signature, P2 receives encrypt x1 and paillier public key from P1

type PreParams

type PreParams struct {
	NTildei     *big.Int
	H1i, H2i    *big.Int
	Alpha, Beta *big.Int
	P, Q        *big.Int
}

func GeneratePreParams

func GeneratePreParams() *PreParams

GeneratePreParams recommend to pre-generate locally

Jump to

Keyboard shortcuts

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