func polyEval(polynomial common.PrimaryPolynomial, x int) *big.Int {  
	xi := big.NewInt(int64(x))
	sum := new(big.Int)
	sum.Add(sum, &polynomial.Coeff[0])
	for i := 1; i < polynomial.Threshold; i++ {
		tmp := new(big.Int).Mul(xi, &polynomial.Coeff[i])
		sum.Add(sum, tmp)
		sum.Mod(sum, secp256k1.GeneratorOrder)
		xi.Mul(xi, big.NewInt(int64(x)))
		xi.Mod(xi, secp256k1.GeneratorOrder)
	}
	return sum
}
Eval computes the private share v = p(i).
package pvss
import (
	"crypto/rand"
	"errors"
	"fmt"
	"math/big"
	"github.com/torusresearch/pvss/common"
	"github.com/torusresearch/pvss/secp256k1"
)
func RandomBigInt() *big.Int {
	randomInt, _ := rand.Int(rand.Reader, secp256k1.GeneratorOrder)
	return randomInt
}