-
Notifications
You must be signed in to change notification settings - Fork 220
Adding zero-knowledge #293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
|
The handling of the PRNG for zk has been improved and hence I believe that the PR is in a good enough shape for an initial review. |
|
What is the status of this PR? Is zero-knowledge implemented? To run an example from the examples folder in zk mode,i added a seed and switched the zk boolean to true, however that just broke the transition degree acutal==expected evaluation. If I switch back the expected degree computation to the old version, The trace length in /air/src/air/mod.rs is half the size of the trance length in /prover/src/domain.rs, if nothing is modified. |
|
@AVecsi , the core non-optimized functionality is implemented though the UX is not the best to be honest. |
|
@Al-Kindi-0 Thanks for the example. I tested the zk implementation a bit and it mostly worked fine. However, I noticed one case where the behavior of the library differs from the non-zk version. Currently, the implementation simply oversizes everything, including the periodic values, which are zeroed out on the oversized part so that constraint evaluation does not fail with randomized trace witnesses. This works fine when only a single periodic value is used in a constraint. However, if two periodic values (or more) are multiplied during evaluation, the actual constraint evaluation degree becomes lower than expected (for example, reduced by the degree of the divisor when two periodic values are multiplied). As a result, the proof cannot be verified correctly. |
|
Also, I am not sure why the change in the function called In some cases the new implementation caused errors for me as the output set the ce_blowup_factor incorrectly. Reverting back to the original implementation fixed this issue. |
Addresses #9 .
Based on the recent work. The most noticeable features are:
This is ready for full review but I am putting in draft mode as the current solution for generating randomness for zero-knowledge is not clean. More specifically:
There are also some unnecessary allocations but I can remove those once we agree on the general structure.