From bbdb37e71387883b013755cea9e83b928f47f10e Mon Sep 17 00:00:00 2001 From: Sergey Kaunov Date: Fri, 25 Oct 2024 03:26:16 +0300 Subject: [PATCH] Resolve #152 (#153) * Resolve #152 (Plus minor docs formatting.) * add the changelog entry * fixing unrelated lint --------- Co-authored-by: Pratyush Mishra --- CHANGELOG.md | 1 + poly-commit/src/kzg10/mod.rs | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a7ac4d5..deb849ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - [\#82](https://github.com/arkworks-rs/poly-commit/pull/82) Add multivariate opening challenge strategy. Integrate with sponge API. ### Improvements +- [\#152](https://github.com/arkworks-rs/poly-commit/issues/152) Expose `kzg10::open_with_witness_polynomial` and `open` downstream. ### Bug fixes diff --git a/poly-commit/src/kzg10/mod.rs b/poly-commit/src/kzg10/mod.rs index 48861963..81a7b59f 100644 --- a/poly-commit/src/kzg10/mod.rs +++ b/poly-commit/src/kzg10/mod.rs @@ -211,9 +211,9 @@ where /// Compute witness polynomial. /// - /// The witness polynomial w(x) the quotient of the division (p(x) - p(z)) / (x - z) - /// Observe that this quotient does not change with z because - /// p(z) is the remainder term. We can therefore omit p(z) when computing the quotient. + /// The witness polynomial $w(x)$ the quotient of the division (p(x) - p(z)) / (x - z) + /// Observe that this quotient does not change with $z$ because + /// $p(z)$ is the remainder term. We can therefore omit $p(z)$ when computing the quotient. pub fn compute_witness_polynomial( p: &P, point: P::Point, @@ -239,7 +239,8 @@ where Ok((witness_polynomial, random_witness_polynomial)) } - pub(crate) fn open_with_witness_polynomial<'a>( + /// Yields a [`Proof`] with a witness polynomial. + pub fn open_with_witness_polynomial<'a>( powers: &Powers, point: P::Point, randomness: &Randomness, @@ -282,8 +283,8 @@ where }) } - /// On input a polynomial `p` and a point `point`, outputs a proof for the same. - pub(crate) fn open<'a>( + /// On input a polynomial `p` and a `point`, outputs a [`Proof`] for the same. + pub fn open<'a>( powers: &Powers, p: &P, point: P::Point,