Skip to content

Step 4: zeta challenge and proof assembly ​

Now we generate the ΞΆ challenge to open a,b,c (blinded) and quotient_poly,z_poly at ΞΆ. This will later allow the verifier to independently recompute the constraint polynomials. We also need an opening of z_poly at ΞΆβ‹…Ο‰.

Exercise 22 ​

Compute ΞΆ from the transcript and push it. Then compute the evaluations of the blinded a,b,c, as well as the quotient polynomial and z. Compute the proofs for each of these evaluations.

python
zeta =
a_zeta = ;    b_zeta = ;    c_zeta = 
z_zeta = ;     t_zeta = 
z_zeta_omega = 

# individual KZG proofs
proof_a       = 
proof_b       = 
proof_c       = 
proof_z       = 
proof_t       = 
proof_z_omega =

Finally we collect all proof artifacts we need to share with the verifier so that they can independently reconstruct the transcript and check the expected values and commitment proofs on their side.

python
# 6. Collect everything to send to the verifier
proof_dictionary = {
    'commitments': {
        'c_a': c_a,
        'c_b': c_b,
        'c_c': c_c,
        'c_z': c_z,
        'c_t': c_t
    },
    'challenges': {
        'beta': beta,
        'gamma': gamma,
        'alpha': alpha,
        'zeta': zeta
    },
    'evaluations': {
        'value_a': value_a,
        'value_b': value_b,
        'output': output,
        'a_zeta': a_zeta,
        'b_zeta': b_zeta,
        'c_zeta': c_zeta,
        'z_zeta': z_zeta,
        't_zeta': t_zeta,
        'z_zeta_omega': z_zeta_omega
    },
    'proofs': {
        'proof_value_a':proof_value_a,
        'proof_value_b':proof_value_b,
        'proof_output': proof_output,
        'proof_a': proof_a,
        'proof_b': proof_b,
        'proof_c': proof_c,
        'proof_z': proof_z,
        'proof_t': proof_t,
        'proof_z_omega': proof_z_omega
    }
}

# proof_dictionary is now ready for the verifier.

𝒫𝔩𝔬𝔫𝒦 Tutorial by zkSecurity