Skip to main content

Module kzg

Module kzg 

Source
Expand description

KZG polynomial commitment scheme (KZG10).

This module implements the KZG protocol described in the paper Constant-Size Commitments to Polynomials and Their Applications by Kate, Zaverucha and Goldberg, often referred to as the KZG10 paper.

The protocol requires a structured reference string (SRS) that contains powers of a generator of a group, and a pairing friendly curve.

The pairing friendly curve requirement is hidden in the Pairing trait parameter.

Structsยง

KZGProof
PairingSRS
Define a structured reference string for the KZG protocol.

Functionsยง

combine_evaluations
Combine the (chunked) evaluations of multiple polynomials.
divisor_polynomial ๐Ÿ”’
The polynomial that evaluates to 0 at the evaluation points.
eval_polynomial ๐Ÿ”’
The polynomial that evaluates to each of evals for the respective elms. For now, only works for 2 evaluations points. elm is the vector of evaluation points and evals is the vector of evaluations at those points.