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

Method Check

share/poly.go:386–390  ·  view source on GitHub ↗

Check a private share against a public commitment polynomial.

(s *PriShare)

Source from the content-addressed store, hash-verified

384
385// Check a private share against a public commitment polynomial.
386func (p *PubPoly) Check(s *PriShare) bool {
387 pv := p.Eval(s.I)
388 ps := p.g.Point().Mul(s.V, p.b)
389 return pv.V.Equal(ps)
390}
391
392// RecoverCommit reconstructs the secret commitment p(0) from a list of public
393// shares using Lagrange interpolation.

Callers 1

TestPublicCheckFunction · 0.80

Calls 4

EvalMethod · 0.95
MulMethod · 0.45
PointMethod · 0.45
EqualMethod · 0.45

Tested by 1

TestPublicCheckFunction · 0.64