MCPcopy Create free account
hub / github.com/DOSNetwork/core / Commit

Method Commit

share/poly.go:135–141  ·  view source on GitHub ↗

Commit creates a public commitment polynomial for the given base point b or the standard base if b == nil.

(b kyber.Point)

Source from the content-addressed store, hash-verified

133// Commit creates a public commitment polynomial for the given base point b or
134// the standard base if b == nil.
135func (p *PriPoly) Commit(b kyber.Point) *PubPoly {
136 commits := make([]kyber.Point, p.Threshold())
137 for i := range commits {
138 commits[i] = p.g.Point().Mul(p.coeffs[i], b)
139 }
140 return &PubPoly{p.g, b, commits}
141}
142
143// Mul multiples p and q together. The result is a polynomial of the sum of
144// the two degrees of p and q. NOTE: it does not check for null coefficients

Callers 8

TestPublicCheckFunction · 0.95
TestPublicRecoveryFunction · 0.95
TestPublicRecoveryDeleteFunction · 0.95
TestPublicAddFunction · 0.95
TestPublicPolyEqualFunction · 0.95
NewDealerFunction · 0.95
TestTBLSFunction · 0.95

Calls 3

ThresholdMethod · 0.95
MulMethod · 0.45
PointMethod · 0.45

Tested by 7

TestPublicCheckFunction · 0.76
TestPublicRecoveryFunction · 0.76
TestPublicRecoveryDeleteFunction · 0.76
TestPublicAddFunction · 0.76
TestPublicPolyEqualFunction · 0.76
TestTBLSFunction · 0.76