Shares creates a list of n private shares p(1),...,p(n).
(n int)
| 87 | |
| 88 | // Shares creates a list of n private shares p(1),...,p(n). |
| 89 | func (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. |