Logo

    Optimization of proving a [non-zk]SNARK (Groth16)

    Creator
    Created
    Mar 7, 2022 5:43 PM
    Stage
    Graduated from Notebook

    Authors: @Deleted User @

    In Groth16 system

    image

    BBB is evaluated twice, once within G1G_1G1​ and once within G2G_2G2​ due to BBB being used both for [C]1[C]_1[C]1​ and [B]2[B]_2[B]2​. Evaluation of BBB is a significantly expensive multiexp operation.

    If rrr is picked to be to zero by the prover (a completely valid value for rrr), as well as s, then evaluation of BBB within G1G_1G1​ can be omitted as latter it would be multiplied by zero.

    Removal of the BBB computation within G1G_1G1​ results in 10% proving performance improvement (ProveCommit2, ReplicaUpdate, WindowPoSt).

    This removes the protection of the prover against curious verifier (the proof cannot be called zero-knowledge anymore), as rrr and sss are used to randomize the proof.

    If rrr is set to zero, we might as well set sss to zero as well, which doesn’t result in as big of benefit (AAA is computed in G1G_1G1​ as is CCC).

    The verification routine is unchanged, the soundness of the system is unaffected.

    This was previously discovered by Ariel Gabizon and Keyvan Kambakhsh but latter forgotten.

    Remove Zero-Knowledge partRemove Zero-Knowledge part

    CryptoNet is a Protocol Labs initiative.