arkworks-rs / poly-commit

A Rust library for polynomial commitments
Apache License 2.0
326 stars 128 forks source link

Add Hyrax multilinear PCS #130

Open Antonio95 opened 11 months ago

Antonio95 commented 11 months ago

Description

This PR implements the Hyrax polynomial commitment scheme: a multilinear PCS based on the hardness of the discrete logarithm problem introduced as part of the Hyrax zkSNARK in this 2017 article.

The PCS described therein is interactive. When implementing the Fiat-Shamir transform, this paper was consulted.

Modification note

In the PCS contained in the cited article, the verifier never learns the actual evaluation of the polynomial at the requested point, but is instead convinced that a previously received Pedersen commitment is indeed a commitment to said evaluation - this is what the SNARK proposed therein necessitates. However, the Arkworks framework requies the verifier to actually learn that value, which is why we have added the opening of the commitment at the end of the protocol. This likely does not result in an optimal non-hiding PCS, but we feel it is the most faithful adaptation of the original PCS that can be implemented with the current restrictions.

Future optimisations

Some natural optimisations to the scheme which are not part of the current PR, but would make sensible follow-up work, are the following:


Before we can merge this PR, please make sure that all the following items have been checked off. If any of the checklist items are not applicable, please leave them but write a little note why.

mmagician commented 11 months ago

This PR relies on https://github.com/arkworks-rs/algebra/pull/691, so we temporarily expect CI to fail until that's merged.

Pratyush commented 8 months ago

Sorry for the late update on this, but happy to merge this as-is, once it's updated wrt master.

autquis commented 8 months ago

It is ready for review and to be merged. @Pratyush If you are merging these three PRs, please do this PR first. Then, I will resolve the conflicts of the other two and let you know when they are ready.

autquis commented 8 months ago

Ping to all :) I would be happy to resolve any remaining issues.

Antonio95 commented 8 months ago

I am happy with the current state of things! Let us see if @Pratyush would like any further tweaks regarding the open threads of this discussion.

autquis commented 8 months ago

A gentle reminder @Pratyush :)

autquis commented 6 months ago

Gentle reminder @Pratyush. (It would be much simpler if we go ahead and merge, and then, we can always improve the code.)