Skip to content
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

Marlin SSP Added #13

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open

Marlin SSP Added #13

wants to merge 26 commits into from

Conversation

sanket1729
Copy link
Contributor

Completed Marlin end of end implementation for Square Span program.

There is an end to end test case which

  1. One-Time Setup: Creates a One-time universal setup required for Marlin
  2. Offline Phase: Indexes the circuit using the indexer module.
  3. Online Phase: Using the one-time setup and indexed offline outputs, creates a marlin proof which is successfully verified.

Remaining Things to do:(Will make another PR to do address these, but noting here for records)
None of these are hard to do but might require some additional reading.

  • The Verifier complexity is still O(n) + |x|, to make it O(log(n)), we need some method to support sparse polynomial representation. I can do this ad-hoc, but I think it's best added as a separate library.

  • The proved is still O(n^2) instead of O(nlogn) because we need a method to support division of polynomials in O(nlogn), note that coset-fft only works when the first polynomial is divisible by the second one. We can still have a O(nlogn) implementation which outputs both quotient and remainder in the special case when the second polynomial is a vanishing poly.

  • Use Fiat Shamir instead of sharing random numbers

@sanket1729
Copy link
Contributor Author

If we can look into this PR first, then I create another PR for divmod and sparse poly. Ideally don't want too much changes in this big PR

@sanket1729
Copy link
Contributor Author

sanket1729 commented Mar 15, 2020

This new additions addresses all the changes so that Verifier is asymptotically O(|x| + log(n)) and prover is O(n*log(n)) and also makes it non-interactive via Fiat Shamir
In particular, it adds
a) divmod for PolyRep in n logn
b) sparse poly representation for supporting faster evaluation
c) Fiat Shamir
d) Some optimizations to compute Lagrange polynomials all at in call to make if O(n) instead of the currently implemented O(n^2).

I think all the asymptotics now match the claim in the marlin paper.

@@ -32,6 +35,10 @@ def __add__(self, other):
assert type(other) is SS_BLS12_381
return SS_BLS12_381(add(self.m1, other.m1), add(self.m2, other.m2))

def __sub__(self, other):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the maths behind the pairing curves. Intuitively, this felt correct.

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