util

package
v0.0.0-...-64543fc Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func AppendByt

func AppendByt(byts ...[]byte) []byte

func CombineXY

func CombineXY(shares [][]*big.Int) (*big.Int, error)

func EvaluatePolynomial

func EvaluatePolynomial(polynomial []*big.Int, value *big.Int) *big.Int

*

  • Evauluates a polynomial with coefficients specified in reverse order:
  • evaluatePolynomial([a, b, c, d], x):
  • returns a + bx + cx^2 + dx^3

*

func Hash_class

func Hash_class(data []byte) ([]byte, error)

func HexToBytes

func HexToBytes(s string) ([]byte, error)

func Kdf

func Kdf(secret []byte) (key []byte, err error)

func LambdaS

func LambdaS(i int, shares []*big.Int) (*big.Int, *big.Int, error)

func ZeroPad

func ZeroPad(b []byte, leigth int) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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