Commit creates a public commitment polynomial for the given base point b or the standard base if b == nil.
(b kyber.Point)
| 133 | // Commit creates a public commitment polynomial for the given base point b or |
| 134 | // the standard base if b == nil. |
| 135 | func (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 |