func VerifyPedersonCommitment(share pcmn.PrimaryShare, sharePrime pcmn.PrimaryShare, ci []common.Point, index big.Int) bool {
	gSik := common.BigIntToPoint(secp256k1.Curve.ScalarBaseMult(share.Value.Bytes()))
	hSikPrime := common.BigIntToPoint(secp256k1.Curve.ScalarMult(&secp256k1.H.X, &secp256k1.H.Y, sharePrime.Value.Bytes()))
	lhs := common.BigIntToPoint(secp256k1.Curve.Add(&gSik.X, &gSik.Y, &hSikPrime.X, &hSikPrime.Y))
	rhs := common.Point{X: *new(big.Int).SetInt64(0), Y: *new(big.Int).SetInt64(0)}
	for i := range ci {
		jt := new(big.Int).Set(&index)
		jt.Exp(jt, new(big.Int).SetInt64(int64(i)), secp256k1.GeneratorOrder)
		polyValue := common.BigIntToPoint(secp256k1.Curve.ScalarMult(&ci[i].X, &ci[i].Y, jt.Bytes()))
		rhs = common.BigIntToPoint(secp256k1.Curve.Add(&rhs.X, &rhs.Y, &polyValue.X, &polyValue.Y))
	}
	return lhs.X.Cmp(&rhs.X) == 0
}
Verify Pederson commitment, Equation (4) in Gennaro 2006
package pvss
import (
	"math/big"
	"github.com/torusresearch/torus-common/common"
	"github.com/torusresearch/torus-common/secp256k1"
	pcmn "github.com/torusresearch/torus-node/common"
)
func GetCommitH(polynomial pcmn.PrimaryPolynomial) []common.Point {
	commits := make([]common.Point, polynomial.Threshold)
	for i := range commits {
		commits[i] = common.BigIntToPoint(secp256k1.Curve.ScalarMult(&secp256k1.H.X, &secp256k1.H.Y, polynomial.Coeff[i].Bytes()))
	}
	return commits
}
func CreateSharesGen(nodes []pcmn.Node, secret big.Int, threshold int) (*[]pcmn.PrimaryShare, *[]pcmn.PrimaryShare, *[]common.Point, *[]common.Point, error) {
	polynomial := *generateRandomZeroPolynomial(secret, threshold)
	polynomialPrime := *generateRandomZeroPolynomial(*RandomBigInt(), threshold)
	shares := getShares(polynomial, nodes)
	sharesPrime := getShares(polynomialPrime, nodes)
	pubPoly := GetCommit(polynomial)
	pubPolyPrime := GetCommitH(polynomialPrime)
	Ci := make([]common.Point, threshold)
	for i := range pubPoly {
		Ci[i] = common.BigIntToPoint(secp256k1.Curve.Add(&pubPoly[i].X, &pubPoly[i].Y, &pubPolyPrime[i].X, &pubPolyPrime[i].Y))
	}
	return &shares, &sharesPrime, &pubPoly, &Ci, nil
}