Shares creates a list of n public commitment shares p(1),...,p(n).
(n int)
| 335 | |
| 336 | // Shares creates a list of n public commitment shares p(1),...,p(n). |
| 337 | func (p *PubPoly) Shares(n int) []*PubShare { |
| 338 | shares := make([]*PubShare, n) |
| 339 | for i := range shares { |
| 340 | shares[i] = p.Eval(i) |
| 341 | } |
| 342 | return shares |
| 343 | } |
| 344 | |
| 345 | // Add computes the component-wise sum of the polynomials p and q and returns it |
| 346 | // as a new polynomial. NOTE: If the base points p.b and q.b are different then the |