Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandFieldElement ¶
func RandFieldElement() (*ristretto255.Scalar, error)
RandFieldElement generates a uniformly random element in `Z_q`
Types ¶
type Polynomial ¶
type Polynomial []*ristretto255.Scalar
Polynomial is a set of `(t - 1)` coefficients over `Z_q`
func (Polynomial) Commit ¶
func (p Polynomial) Commit() []*ristretto255.Element
Commit computes public commitments to the coefficients of `p`
func (Polynomial) Eval ¶
func (p Polynomial) Eval(x *ristretto255.Scalar) *ristretto255.Scalar
Eval uses Horner's method to evaluate the linearized polynomial
`P(x) = a_0 + x (a_1 + x (a_2 + x (... + x (a_{t-2)+ x a_{t - 1}) ... )`
func (Polynomial) Rand ¶
func (p Polynomial) Rand() (err error)
Rand generates a random polynomial of degree `(t - 1)` over `Z_q`
func (Polynomial) Zero ¶
func (p Polynomial) Zero()
Zero the coefficients of the polynomial after use
Click to show internal directories.
Click to hide internal directories.