Documentation ¶
Index ¶
- Constants
- func EvaluatePoly(f Polynomial, x *big.Int, degree int) big.Int
- func Lagrange(f []big.Int, x []big.Int, degree int) big.Int
- func LagrangeECC(sig []ecdsa.PublicKey, x []big.Int, degree int) *ecdsa.PublicKey
- func PkToAddress(PkBytes []byte) (common.Address, error)
- func PkToHexString(pk *ecdsa.PublicKey) string
- func SchnorrSign(psk big.Int, r big.Int, m big.Int) big.Int
- func StringtoPk(str string) (*ecdsa.PublicKey, error)
- func UintRand(MaxValue uint64) (uint64, error)
- func ValidatePublicKey(k *ecdsa.PublicKey) bool
- type Polynomial
Constants ¶
View Source
const PkLength = 65
Variables ¶
This section is empty.
Functions ¶
func EvaluatePoly ¶
Calculate polynomial's evaluation at some point
func LagrangeECC ¶
Lagrange's polynomial interpolation algorithm: working in ECC points
func PkToHexString ¶
func ValidatePublicKey ¶
Types ¶
type Polynomial ¶
Structure definition for polynomial
Click to show internal directories.
Click to hide internal directories.