How can a Prover convince a Verifier that he can accurately compute the sum of the evaluation of a function over all possible inputs ?
Let's say the Prover has a function that takes several binary variables, , where each variable can only be either or . The goal is for the Prover to convince the Verifier that he can compute the sum of the function evaluated on all possible combinations of these binary inputs correctly without any malicious intent.
This sum would be:
simplified to :
However, instead of the Verifier recomputing everything to check if the Prover’s claim is correct (which could take too long if there are many variables), they use the sumcheck protocol.
For instance suppose we define the function :
As you can see below, this function has a different evaluation for all possible combination of 0 and 1 for the variables of to .

If the Prover has calculated the sum of all evaluations and combined them together by taking the result of at every possible combination (32 combinations because ) and adding them up, it will amount to 44.
Quick demonstration:
If we replace with , we will get 0.
How can the Prover convince the verifier that the calculated value 44 is correct and has not been tampered with?
The naive solution is that the verifier could calculate the sum himself but this is time consuming, so we need a more efficient algorithm. The sum-check protocol provides a solution for this problem.
This is just a general overview, don’t worry if you don’t understand it. We’ll explain everything later so you skip it if you want.
Start : Prover sends claimed answer which in our previous example was 44. The protocol must check that :
Round 1 : Prover sends univariate polynomial claimed to equal :
what the prover actually sends and is what the prover would send if the prover is honest. Note that the degree of and is at most the degree of the multivariate in its first variable meaning that if has a low degree in each variable (for example : 2 or 3) then even though there are terms in this sum, will simply be a degree 2 or 3 univariate polynomial. Hence, specifying can be done by just sending three or 4 coefficients.
Verifier checks that . If this check passes, it is safe for the Verifier to assume that is the correct answer, so long as the Verifier believes that . How do we check that ? We just check that and agree at a random point .
Round (Final Round): The Prover sends univariate polynomials claimed to be equal :
$
Verifier checks that .
Verifier picks at random, and needs to check that .
No need for more rounds, the verifier can perform this check with one oracle query. So after rounds of interaction, the prover can convince the verifier.
In this example we will be sticking to our original function :Prover knows the function and he wants to compute :
In the first step, the Verifier shares the function with the Prover and ask him what the summation of all evaluations which is .

In the first round, the Prover calculates the required summation which is . This means that the Prover needs to open the summation over all the variables of to for the values and . For better comprehension, we can write the above image/function like this :After the Prover has calculated the sum of all evaluations and combined them together, he will get the value 44 which is the required summation .
Then the prover will have to share this value with the verifier. However only providing the value isn’t enough to satisfy the Verifier because she doesn’t know if the Prover has really done the work, has really calculated this summation properly. Thus some extra calculations need to be done and shared to satisfy the Verifier. We can’t upset the Verifier. The Prover might also need to buy her some flowers while he’s at it.

For the extra calculations, the Prover needs to define . This step is repetitive in different in every single interaction. So in each round the Prover has to form a function . In the first round, the Prover forms the function by only swapping the first variable of function , by . This means that the Prover needs to hold this fixed variable and then calculate the summation based on the remaining variables to . So each variable in the function g except can be either or .
This computation leads a polynomial :
By assuming that the Prover is malicious and might not have shared the accurate function , we will need to use a different notation as .
what the prover actually sends and is what the prover would send if the prover is honest.
We expect that should be equal to . The Prover later sends as the summation of the evaluation, the polynomial and the coefficient of the polynomial which are .

On the verification side, the Verifier forms using the received coefficients and then calculates which is 4.
So the Verifier replaces with 0 in the polynomial which results to and she did the same thing with =
We can see the equation is correct because meaning the first check is approved.
This is not enough to satisfy the Verifier so we need to perform a second round. I guess the Prover should have also bought her some chocolate. Let’s keep going and see what’s his second move.
The prover takes the previous function and changes to and to
Then he proceeds to calculate the sum of all evaluations of function over all possible values that consists of and for only and add them up to form a polynomial. This means that the Prover should not change and which are the first two variables to or .
In the end, we will have a the equation :My guy has no rizz so she decided to give him a hint by sending him a random value equal to 93. He takes the random value and puts it in the equation above.The Prover was able to calculate which is and similarly to the previous round the Prover should send the coefficient of the polynomial which is to the Verifier (Bold move by the Prover).

On the verification side, the Verifier will calculate by changing to which gives us and changing to which gives us .In addition from the previous rounds, the Verifier knows the function so then the verifier could calculate the value of by changing with .So the sum of should be equal to . The second test passed.
The verifier is convinced that the Prover did everything right till now.
Bro is winning but she’s playing hard to get.
Bro needs to be persistent and patient.
Let’s see his next move!!
Like last time, the Verifier chooses another random value and sends it to the Prover (What a lucky guy). The Prover generates an updated version of our original function by replacing and with and .He then proceeds to compute the function by calculating the summation for the variables and which are the only two remaining values that should be replaced by and .
By replacing the values and , the Prover will get :
Then the Prover will share the coefficients of the polynomial with the Verifier so she can calculate .
Since she knows the coefficients of , she can calculate and get the same value as .
You may be asking how can she calculate with only the coefficients ?
The Verifier receives the coefficients in this format :For more clarity, you can imagine the function like thisSo from the coefficients, the Verifier can construct :and then replace with 35 :This can be done by replacing with . So we just replace with 93 and with 35 :If the two sides of the equation is correct then the next round passes.
Round 4 is similar to round 2 and 3.

I’d like to mention that we have 5 rounds of interaction between Prover and Verifier because we have 5 variables in the function → .
5 Rounds of Interactions: (1,2), (3,4), (5,6), (7,8), (9,10).
So for the final round, the Verifier chooses a random value . On the other side the Prover calculates the function g by replacing to by is similar to because there’s no remaining variables to be replaced by and to calculate any summation.

The Prover will replace the variables to in to get :and share the coefficients of the polynomial to the Verifier one last time .
The Verifier will calculate and check if its equal to based on the coefficient received from the previous round and then the verifier.

This can be done by replacing with .So is equal to . The test passes!!
The only thing left is to check if the final round passes. The verifier picks a random value and then she will need to calculate .
Since the verifier knows the function , she can replace the variables to by to and calculate :We then check :Thus :$
This means that the verifier is convinced that the first received value of which is 44 is the correct summation. Finally the Prover and Verifier are dating!!!!!

We can conclude that SumCheck Protocol needs -rounds of interactions between Prover and Verifier to convince the Verifier that the summation was correctly computed. We can use Fiat-Shamir to make the SumCheck protocol non interactive.
Hope this was helpful and you finally understood the SumCheck Protocol. If you’re wondering there isn’t a season 2 for it so at least it was a happy ending.
Stay tuned for more !!

