Notes on (Super)spartan
I think that the superspartan paper doesn't lack maths, but a bit of motivation and intuition. Hence, I will sometimes handwave the maths in the benefit of prose. Note that superspartan is a generalization of spartan. The intuition that we lay out also works for spartan.
Superspartan is a polynomial IOP for CCS, described in the same paper. Let's quickly review here the notational definition from the CCS paper, for reading practicality.
A CCS structure consists of:
- Size bounds where
- A sequence of matrices
- A sequence of multisets [] where an element in each multiset is from the domain and the cardinality of each multiset is at most
- A sequence of constants [], where each constant is from .
Superspartan leverages the sumcheck protocol. Sumcheck is an interactive protocol between a prover and a verifier . uses sumcheck to convince that a claimed sum is equal to the summation of a polynomial over an hypercube of size . That is, wants to convince that for a given multivariate polynomial :
where is the hypercube of size . Sumcheck requires communication rounds and a final oracle query of to evaluate at a random point .
An intuitive explanation for superspartan
Turning the CCS into MLEs
Let , where is a purported satisfying witness for a CCS structure-instance tuple . In the context of superspartan, a prover wants to convince a verifier that a vector is a satisfying assignment to a CCS structure .
In the preprocessing phase, turn CCS matrices into a set of multilinear extensions (MLEs) in variables: . Do the same for the vector, to obtain , an MLE in variables.
Using the definition of an MLE, observe that for, say , turning it into an MLE means that we will get . MLEs re-interpret matrices as functions in variables. Similarly, for the vector , . This is (roughly) the preprocessing step for superspartan: MLEs are used to turn the original CCS into a set of low-degree polynomials.
Next, using those low-degree polynomials, will use the sumcheck protocol to convince that the CCS instance-structure tuple is satisfied by .
Prove the knowledge of a satisfying assignment, with sumcheck
Once the MLE pre-processing is done, the idea is to prove that satisfies with sumcheck. To do this, and will perform two invocations of the sumcheck protocol. The first invocation consists into showing that when turned into an MLE, say where , the CCS is satisfied by .
However, will need to evaluate at a random point to conclude this first sumcheck invocation (the final oracle query mentioned above). Hence, the second sumcheck invocation will consists into convincing that the evaluation of at the first sumcheck invocation's random point is correct.
Superspartan, commented
I'm commenting here the pseudocode laid out in figure 2 (p.15). I'm not a fiat-shamir expert, so I omitted what should be hashed to obtain random challenges.
- sends the MLE of , noted
- sends a random challenge to . uses fiat shamir to obtain non-interactively
- Apply the sum check protocol over the CCS-turned-MLE polynomial. Observe that the sum in equation is basically the sum used for checking that a CCS is satisfied by a witness , in equation . Hence, this first sum check is used to prove that the sum of , done over the hypercube of size , is 0. Observe that enforces this sum to be done a specific row of the CCS; i.e. a row "selected" by the verifier using a random challenge. At the end of this first sumcheck, still has to ensure that the final evaluation is correct, for .
- sends a random challenge to . Using fiat-shamir, obtains it non-interactively
- sends claimed sums over the hypercube of size for . To check those claimed sum, and run the sum check protocol to compute the sum over the hypercube of size of a random linear combination of . The random linear combination is useful to avoid running as many sumcheck invocations as they are matrices and instead run a single one
When all of the above is done, performs the three following checks:
- The claimed sums for are correct. Simply take their random linear combination and compare the result to the second sumcheck proof.
- The final evaluation is correct. has access to those MLEs as oracles, the check is straightforward.
- Using the above sums for , compute the evaluation and assert that it is equal to the claimed evaluation in the first sumcheck invocation.