Crate snarkvm_polycommit[][src]

A crate for polynomial commitment schemes.

Re-exports

pub use data_structures::*;
pub use error::*;

Modules

data_structures

Data structures used by a polynomial commitment scheme.

error

Errors pertaining to query sets.

kzg10

The core [KZG10] construction.

marlin_pc

Polynomial commitment scheme from [KZG10] that enforces strict degree bounds and (optionally) enables hiding commitments by following the approach outlined in [CHMMVW20, "Marlin"].

optional_rng

A random number generator that bypasses some limitations of the Rust borrow checker.

sonic_pc

Polynomial commitment scheme based on the construction in [KZG10], modified to obtain batching and to enforce strict degree bounds by following the approach outlined in [MBKM19, “Sonic”] (more precisely, via the variant in [Gabizon19, “AuroraLight”] that avoids negative G1 powers).

Macros

impl_bytes

Helper macro to forward all derived implementations to the ToBytes and FromBytes traits

Structs

BatchLCProof

A proof of satisfaction of linear combinations.

Polynomial

Stores a polynomial in coefficient form.

Traits

PolynomialCommitment

Describes the interface for a polynomial commitment scheme that allows a sender to commit to multiple polynomials and later provide a succinct proof of evaluation for the corresponding commitments at a query set Q, while enforcing per-polynomial degree bounds.

Functions

evaluate_query_set

Evaluate the given polynomials at query_set.

Type Definitions

Evaluations

Evaluations is the result of querying a set of labeled polynomials or equations p at a QuerySet Q. It maps each element of Q to the resulting evaluation. That is, if (label, query) is an element of Q, then evaluation.get((label, query)) should equal p[label].evaluate(query).

QuerySet

QuerySet is the set of queries that are to be made to a set of labeled polynomials/equations p that have previously been committed to. Each element of a QuerySet is a (label, query) pair, where label is the label of a polynomial in p, and query is the field element that p[label] is to be queried at.