common

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BigIntToECDSAPrivateKey

func BigIntToECDSAPrivateKey(x big.Int) *ecdsa.PrivateKey

func HexToBigInt

func HexToBigInt(s string) *big.Int

func IntChanWriteTimeout

func IntChanWriteTimeout(channel chan<- int, msg int, timeout time.Duration) error

func PointToECDSAPublicKey

func PointToECDSAPublicKey(point Point) *ecdsa.PublicKey

func PointToEthAddress

func PointToEthAddress(point Point) *common.Address

converts common point to ETH address format borrowint ethcrypto functions

func StringChanWriteTimeout

func StringChanWriteTimeout(channel chan<- string, msg string, timeout time.Duration) error

func TimeTrack

func TimeTrack(start time.Time, name string)

Types

type Hash

type Hash struct {
	cmn.HexBytes
}

type Node

type Node struct {
	Index  int
	PubKey Point
}

type Point

type Point struct {
	X big.Int
	Y big.Int
}

func BigIntToPoint

func BigIntToPoint(x, y *big.Int) Point

func GetColumnPoint

func GetColumnPoint(matrix [][]Point, index int) (res []Point)

type PrimaryPolynomial

type PrimaryPolynomial struct {
	Coeff     []big.Int
	Threshold int
}

type PrimaryShare

type PrimaryShare struct {
	Index int
	Value big.Int
}

func GetColumnPrimaryShare

func GetColumnPrimaryShare(matrix [][]PrimaryShare, index int) (res []PrimaryShare)

type SigncryptedOutput

type SigncryptedOutput struct {
	NodePubKey       Point
	NodeIndex        int
	SigncryptedShare Signcryption
}

type Signcryption

type Signcryption struct {
	Ciphertext []byte
	R          Point
	Signature  big.Int
}

Jump to

Keyboard shortcuts

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