Skip to content

Add KZH-k multilinear polynomial commitments - #171

Open
h-hafezi wants to merge 1 commit into
arkworks-rs:masterfrom
h-hafezi:feature/kzh-pcs
Open

Add KZH-k multilinear polynomial commitments#171
h-hafezi wants to merge 1 commit into
arkworks-rs:masterfrom
h-hafezi:feature/kzh-pcs

Conversation

@h-hafezi

Copy link
Copy Markdown

Description

This PR adds KZH-k, a non-hiding pairing-based multilinear polynomial
commitment family parameterized by the const generic K.

The implementation follows KZH-Fold and uses the generic-opening auxiliary
commitments described by IronDict. It uses arkworks' native little-endian MLE
layout throughout and calls MultilinearExtension::fix_variables for partial
evaluation.

Highlights

  • Implements the native PolynomialCommitment interface for dense and sparse
    arkworks multilinear extensions.
  • Supports balanced rectangular tensor decompositions when the number of
    variables is not divisible by K.
  • Stores only auxiliary commitment tables that are beneficial to the generic
    opening algorithm.
  • Supports same-point batching, the framework's default multi-point and
    linear-combination APIs, and prepared verifier keys.
  • Validates family markers, tensor dimensions, keys, commitments, states,
    proofs, labels, and point dimensions at operation boundaries.
  • Includes canonical serialization tests, independent tensor-order oracles,
    malformed-input tests, cost-bound tests, and a KZH benchmark covering
    K = 2, 3, 4, 6 and 12, 16, and 20 variables.

For N = 2^n evaluations, the balanced construction has:

  • at most O(K * N) commitment preprocessing work;
  • O(N^(ceil(K / 2) / K)) online group work plus O(N) field work for a
    generic opening, giving O(sqrt(N)) group work for even K;
  • O(K * N^(1/K)) proof size and verifier work.

This PR intentionally does not add hiding commitments, strict degree bounds,
a Boolean-specialized opening API, or an R1CS verification gadget.

The most important files to review are:

  • poly-commit/src/kzh/mod.rs
  • poly-commit/src/kzh/data_structures.rs
  • poly-commit/src/kzh/utils.rs
  • poly-commit/src/kzh/tests.rs

No existing GitHub issue currently tracks this addition; the construction,
scope, costs, setup assumptions, and compatibility choices are described here
and in the module documentation.

Validation

  • cargo test -p ark-poly-commit kzh::tests:: (31 passed)
  • cargo test -p ark-poly-commit kzh::tests:: --no-default-features --features std (30 passed)
  • cargo test --workspace --all-features (145 passed)
  • cargo check --workspace --all-targets --all-features
  • cargo check -p ark-poly-commit --no-default-features
  • cargo fmt --all -- --check
  • cargo doc -p ark-poly-commit --no-deps --all-features

  • Targeted PR against correct branch (master)
  • Linked to Github issue with discussion and accepted design OR have an explanation in the PR that describes this work. (Design and scope are explained above.)
  • Wrote unit tests
  • Updated relevant documentation in the code
  • Added a relevant changelog entry to the Pending section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

@h-hafezi
h-hafezi requested a review from a team as a code owner August 26, 2026 01:16
@h-hafezi
h-hafezi requested review from WizardOfMenlo, mmagician and weikengchen and removed request for a team August 26, 2026 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant