big_polynomial

package
v0.0.0-...-ea90456 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// A big prime which is used for Galois Field computing
	PrimeStr = "24815323469403931728221172233738523533528335161133543380459461440894543366372904768334987263999999999999999999663"
)

Variables

This section is empty.

Functions

func Add

func Add(a []*big.Int, b []*big.Int) []*big.Int

对2个多项式进行加法操作

func Evaluate

func Evaluate(polynomialCoefficients []*big.Int, specifiedValue *big.Int) *big.Int

Given the specified value, get the compution result of the polynomial 给出指定x值,计算出指定多项式f(x)的值

func GetPolynomialByPoints

func GetPolynomialByPoints(points map[int]*big.Int) []*big.Int

利用Lagrange Polynomial Interpolation Formula,通过给定坐标点集合来计算多项式 func GetPolynomialByPoints(points map[int]int) []float64 {

func Multiply

func Multiply(a []*big.Int, b []*big.Int) []*big.Int

对2个多项式进行乘法操作

func RandomGenerate

func RandomGenerate(degree int, secret []byte) ([]*big.Int, error)

make a random polynomials F(x) of Degree [degree], and the const(X-Intercept) is [intercept] 给定最高次方和x截距,生成一个系数随机的多项式

func Scale

func Scale(a []*big.Int, k *big.Int) []*big.Int

将1个多项式与指定系数k进行乘法操作

Types

This section is empty.

Jump to

Keyboard shortcuts

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