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

Method Shares

share/poly.go:89–95  ·  view source on GitHub ↗

Shares creates a list of n private shares p(1),...,p(n).

(n int)

Source from the content-addressed store, hash-verified

87
88// Shares creates a list of n private shares p(1),...,p(n).
89func (p *PriPoly) Shares(n int) []*PriShare {
90 shares := make([]*PriShare, n)
91 for i := range shares {
92 shares[i] = p.Eval(i)
93 }
94 return shares
95}
96
97// Add computes the component-wise sum of the polynomials p and q and returns it
98// as a new polynomial.

Callers 10

TestSecretRecoveryFunction · 0.95
TestSecretRecoveryDeleteFunction · 0.95
TestPublicCheckFunction · 0.95
TestRecoverPriPolyFunction · 0.95
TestTBLSFunction · 0.95
TestPublicRecoveryFunction · 0.45
TestPublicRecoveryDeleteFunction · 0.45
TestPublicAddFunction · 0.45

Calls 1

EvalMethod · 0.95

Tested by 10

TestSecretRecoveryFunction · 0.76
TestSecretRecoveryDeleteFunction · 0.76
TestPublicCheckFunction · 0.76
TestRecoverPriPolyFunction · 0.76
TestTBLSFunction · 0.76
TestPublicRecoveryFunction · 0.36
TestPublicRecoveryDeleteFunction · 0.36
TestPublicAddFunction · 0.36