bls_tss

package module
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

README

BLS TSS

Run the demo:

make run-all

Documentation

Index

Constants

View Source
const BufferSize = 2048

Variables

This section is empty.

Functions

This section is empty.

Types

type Keygen

type Keygen struct {
	// contains filtered or unexported fields
}

func NewKeygen

func NewKeygen(i int, t int, n int, incoming <-chan string, outgoing chan<- string) *Keygen

func (*Keygen) Free

func (k *Keygen) Free()

func (*Keygen) Initialize

func (k *Keygen) Initialize()

func (*Keygen) Output

func (k *Keygen) Output() *string

func (*Keygen) ProcessLoop

func (k *Keygen) ProcessLoop()

type KeygenRound1 added in v0.1.4

type KeygenRound1 struct {
	Com []int `json:"com"`
}

type KeygenRound2 added in v0.1.4

type KeygenRound2 struct {
	BlindFactor []int `json:"blind_factor"`
	YI          struct {
		Curve string `json:"curve"`
		Point []int  `json:"point"`
	} `json:"y_i"`
}

type KeygenRound3 added in v0.1.4

type KeygenRound3 struct {
	I           int `json:"i"`
	T           int `json:"t"`
	N           int `json:"n"`
	J           int `json:"j"`
	Commitments []struct {
		Curve string `json:"curve"`
		Point []int  `json:"point"`
	} `json:"commitments"`
	Share struct {
		Curve  string `json:"curve"`
		Scalar []int  `json:"scalar"`
	} `json:"share"`
}

type KeygenRound4 added in v0.1.4

type KeygenRound4 struct {
	Pk struct {
		Curve string `json:"curve"`
		Point []int  `json:"point"`
	} `json:"pk"`
	PkTRandCommitment struct {
		Curve string `json:"curve"`
		Point []int  `json:"point"`
	} `json:"pk_t_rand_commitment"`
	ChallengeResponse struct {
		Curve  string `json:"curve"`
		Scalar []int  `json:"scalar"`
	} `json:"challenge_response"`
}

type KeygenRoundMsg added in v0.1.4

type KeygenRoundMsg struct {
	Sender   int         `json:"sender"`
	Receiver interface{} `json:"receiver"`
	Body     struct {
		Round1 *KeygenRound1 `json:"Round1,omitempty"`
		Round2 *KeygenRound2 `json:"Round2,omitempty"`
		Round3 *KeygenRound3 `json:"Round3,omitempty"`
		Round4 *KeygenRound4 `json:"Round4,omitempty"`
	} `json:"body"`
}

type KeygenSimple added in v0.1.3

type KeygenSimple struct {
	// contains filtered or unexported fields
}

func NewKeygenSimple added in v0.1.3

func NewKeygenSimple(i int, t int, n int) *KeygenSimple

func NewKeygenSimpleFromRound added in v0.1.5

func NewKeygenSimpleFromRound(i, t, n int, round string) *KeygenSimple

func (*KeygenSimple) Free added in v0.1.3

func (k *KeygenSimple) Free()

func (*KeygenSimple) GetState added in v0.1.5

func (k *KeygenSimple) GetState() (*KeygenState, error)

func (*KeygenSimple) Handle added in v0.1.3

func (k *KeygenSimple) Handle(msg string) (bool, []string, error)

func (*KeygenSimple) Init added in v0.1.3

func (k *KeygenSimple) Init() []string

func (*KeygenSimple) Output added in v0.1.3

func (k *KeygenSimple) Output() *string

type KeygenState added in v0.1.5

type KeygenState struct {
	Round0 *Round0State `json:"Round0,omitempty"`
	Round1 *Round1State `json:"Round1,omitempty"`
	Round2 *Round2State `json:"Round2,omitempty"`
	Round3 *Round3State `json:"Round3,omitempty"`
	Round4 *Round4State `json:"Round4,omitempty"`
}

type LocalKey added in v0.1.4

type LocalKey struct {
	SharedKey struct {
		I  int `json:"i"`
		T  int `json:"t"`
		N  int `json:"n"`
		Vk struct {
			Curve string `json:"curve"`
			Point []int  `json:"point"`
		} `json:"vk"`
		SkI struct {
			Curve  string `json:"curve"`
			Scalar []int  `json:"scalar"`
		} `json:"sk_i"`
	} `json:"shared_key"`
	VkVec []struct {
		Curve string `json:"curve"`
		Point []int  `json:"point"`
	} `json:"vk_vec"`
}

type PartialSignature added in v0.1.4

type PartialSignature struct {
	I      int `json:"i"`
	SigmaI struct {
		Curve string `json:"curve"`
		Point []int  `json:"point"`
	} `json:"sigma_i"`
	DdhProof struct {
		A1 struct {
			Curve string `json:"curve"`
			Point []int  `json:"point"`
		} `json:"a1"`
		A2 struct {
			Curve string `json:"curve"`
			Point []int  `json:"point"`
		} `json:"a2"`
		Z []int `json:"z"`
	} `json:"ddh_proof"`
}

type ProtocolMessage

type ProtocolMessage struct {
	Sender   int                    `json:"sender"`
	Receiver int                    `json:"receiver"`
	Ignored  map[string]interface{} `json:"-"` // Rest of the fields should go here.
}

type Round0State added in v0.1.5

type Round0State struct {
	PartyI int `json:"party_i"`
	T      int `json:"t"`
	N      int `json:"n"`
}

type Round1State added in v0.1.5

type Round1State struct {
	Keys struct {
		UI struct {
			Curve  string `json:"curve"`
			Scalar []int  `json:"scalar"`
		} `json:"u_i"`
		YI struct {
			Curve string `json:"curve"`
			Point []int  `json:"point"`
		} `json:"y_i"`
		I int `json:"i"`
	} `json:"keys"`
	Comm struct {
		Com []int `json:"com"`
	} `json:"comm"`
	Decom struct {
		BlindFactor []int `json:"blind_factor"`
		YI          struct {
			Curve string `json:"curve"`
			Point []int  `json:"point"`
		} `json:"y_i"`
	} `json:"decom"`
	PartyI int `json:"party_i"`
	T      int `json:"t"`
	N      int `json:"n"`
}

type Round2State added in v0.1.5

type Round2State struct {
	Keys struct {
		UI struct {
			Curve  string `json:"curve"`
			Scalar []int  `json:"scalar"`
		} `json:"u_i"`
		YI struct {
			Curve string `json:"curve"`
			Point []int  `json:"point"`
		} `json:"y_i"`
		I int `json:"i"`
	} `json:"keys"`
	ReceivedComm []struct {
		Com []int `json:"com"`
	} `json:"received_comm"`
	Decom struct {
		BlindFactor []int `json:"blind_factor"`
		YI          struct {
			Curve string `json:"curve"`
			Point []int  `json:"point"`
		} `json:"y_i"`
	} `json:"decom"`
	PartyI int `json:"party_i"`
	T      int `json:"t"`
	N      int `json:"n"`
}

type Round3State added in v0.1.5

type Round3State struct {
	Keys struct {
		UI struct {
			Curve  string `json:"curve"`
			Scalar []int  `json:"scalar"`
		} `json:"u_i"`
		YI struct {
			Curve string `json:"curve"`
			Point []int  `json:"point"`
		} `json:"y_i"`
		I int `json:"i"`
	} `json:"keys"`
	YVec []struct {
		Curve string `json:"curve"`
		Point []int  `json:"point"`
	} `json:"y_vec"`
	OwnShare struct {
		I           int `json:"i"`
		T           int `json:"t"`
		N           int `json:"n"`
		J           int `json:"j"`
		Commitments []struct {
			Curve string `json:"curve"`
			Point []int  `json:"point"`
		} `json:"commitments"`
		Share struct {
			Curve  string `json:"curve"`
			Scalar []int  `json:"scalar"`
		} `json:"share"`
	} `json:"own_share"`
	PartyI int `json:"party_i"`
	T      int `json:"t"`
	N      int `json:"n"`
}

type Round4State added in v0.1.5

type Round4State struct {
	SharedKeys struct {
		I  int `json:"i"`
		T  int `json:"t"`
		N  int `json:"n"`
		Vk struct {
			Curve string `json:"curve"`
			Point []int  `json:"point"`
		} `json:"vk"`
		SkI struct {
			Curve  string `json:"curve"`
			Scalar []int  `json:"scalar"`
		} `json:"sk_i"`
	} `json:"shared_keys"`
	OwnDlogProof struct {
		Pk struct {
			Curve string `json:"curve"`
			Point []int  `json:"point"`
		} `json:"pk"`
		PkTRandCommitment struct {
			Curve string `json:"curve"`
			Point []int  `json:"point"`
		} `json:"pk_t_rand_commitment"`
		ChallengeResponse struct {
			Curve  string `json:"curve"`
			Scalar []int  `json:"scalar"`
		} `json:"challenge_response"`
	} `json:"own_dlog_proof"`
	PartyI int `json:"party_i"`
	T      int `json:"t"`
	N      int `json:"n"`
}

type Sign

type Sign struct {
	// contains filtered or unexported fields
}

func NewSign

func NewSign(msgHash string, i int, n int, localKey string, incoming <-chan string, outgoing chan<- string) *Sign

func (*Sign) Free

func (k *Sign) Free()

func (*Sign) Initialize

func (k *Sign) Initialize()

func (*Sign) Output

func (k *Sign) Output() *string

func (*Sign) ProcessLoop

func (k *Sign) ProcessLoop()

type SignRound1 added in v0.1.4

type SignRound1 = PartialSignature

type SignRoundMsg added in v0.1.4

type SignRoundMsg struct {
	Sender   int         `json:"sender"`
	Receiver interface{} `json:"receiver"`
	Body     struct {
		Round1 *SignRound1 `json:"Round1,omitempty"`
	} `json:"body"`
}

type SignSimple added in v0.1.3

type SignSimple struct {
	// contains filtered or unexported fields
}

func NewSignSimple added in v0.1.3

func NewSignSimple(msgHash string, i int, n int, localKey string) *SignSimple

func (*SignSimple) Free added in v0.1.3

func (k *SignSimple) Free()

func (*SignSimple) Handle added in v0.1.3

func (k *SignSimple) Handle(msg string) (bool, []string, error)

func (*SignSimple) Init added in v0.1.3

func (k *SignSimple) Init() []string

func (*SignSimple) Output added in v0.1.3

func (k *SignSimple) Output() *string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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