shcnorrmpc

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: GPL-3.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const PkLength = 65

Variables

This section is empty.

Functions

func EvaluatePoly

func EvaluatePoly(f Polynomial, x *big.Int, degree int) big.Int

Calculate polynomial's evaluation at some point

func Lagrange

func Lagrange(f []big.Int, x []big.Int, degree int) big.Int

Lagrange's polynomial interpolation algorithm

func LagrangeECC

func LagrangeECC(sig []ecdsa.PublicKey, x []big.Int, degree int) *ecdsa.PublicKey

Lagrange's polynomial interpolation algorithm: working in ECC points

func PkToAddress

func PkToAddress(PkBytes []byte) (common.Address, error)

func PkToHexString

func PkToHexString(pk *ecdsa.PublicKey) string

func SchnorrSign

func SchnorrSign(psk big.Int, r big.Int, m big.Int) big.Int

func StringtoPk

func StringtoPk(str string) (*ecdsa.PublicKey, error)

func UintRand

func UintRand(MaxValue uint64) (uint64, error)

func ValidatePublicKey

func ValidatePublicKey(k *ecdsa.PublicKey) bool

Types

type Polynomial

type Polynomial []big.Int

Structure definition for polynomial

func RandPoly

func RandPoly(degree int, constant big.Int) Polynomial

Generate a random polynomial, its constant item is nominated

Jump to

Keyboard shortcuts

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