Logo
    ๐Ÿ”–

    Rosario - Nicolas

    03/03/2022:

    BLS12-377 / BW6 <- Justin talks about Zexe , 2chain of curve

    E1(Fq)E_1(F_q)E1โ€‹(Fqโ€‹) of order rrr E2(Ft)E_2(F_t)E2โ€‹(Ftโ€‹) of order qqq <-- circuits in FqF_qFqโ€‹, means I can express group operations efficiently, E1(Fq)+E1(Fq)E_1(F_q) + E_1(F_q)E1โ€‹(Fqโ€‹)+E1โ€‹(Fqโ€‹)

    GtG_tGtโ€‹ is in Fq12F_q^{12}Fq12โ€‹

    Benchmark

    2 Circuits for https://github.com/nikkolasg/grothan/blob/main/src/lib.rs

    • Multiplication of two GT elements
      • 66 constraints
    • Scalar multiplication of one scalar and GT elements
      • 39409 constraints
    • Enforcing equality:
      • 12 constraints

    IPP verifcation

    • Ti=Tlxโˆ—Tโˆ—Trxโˆ’1T_i = T_l^x * T * T_r^{x^{-1}}Tiโ€‹=Tlxโ€‹โˆ—Tโˆ—Trxโˆ’1โ€‹
    • U
    • Z

    Per iteration of the loop

    • 2 GT multiplication * 3 โ‡’ 6 Gt MUL
    • 6 Scalr mul

    In total:

    6 * log(n) * GT_MUL + 6 * log(n) * Scalar_mul

    for n = 2**30

    math.log2(n) * (6gtmul + 6scmul) 7031880.0 constraints

    Sumcheck verification

    Justin says 1000 for FrF_rFrโ€‹ non native arithmetic multiplication

    3 Fr multiplication per round of sumcheck

    P(x1,x2,x3) = x1x2 + x2x3 + x1x3

    P(x,r2,r3) โ†’ P(0,r2,r3) + P(1,r2,r3) โ†’ 2Fr + 2Fr + 1 ?? โ†’

    Prover sends (r2 + r3)x1 + r2r3, already in affine form so 2 Fr operation per evaluation

    in total 2 * 2 + 1 = 5 Fr operation per โ€œroundโ€ + hash(3 elements) โ† 1000 constraints using Poseidon

    Using non native field arithmetic, supposing 1000 constraints for Fr operations, itโ€™s (1000*5+3000)*log(n) = 240000 constraints for n=2**30

    Using sub Groth16 proof:

    • Need to do scalar multiplication on ALL the public inputs โ†’ log(n) elements in FrF_rFrโ€‹
      • 500*log(n) constraints for doing aiGa_iGaiโ€‹G
    • Need to do 3 pairings โ†’ 150 000 constraints

    Concrete scheme / curves

    Spartan:

    • Operations FrF_rFrโ€‹ for GKR/Sumcheck
    • Operations over FqF_qFqโ€‹ this is for polymnomial commitment

    2 choices of โ€œcurvesโ€:

    • Either we use a 2chain :
      • BLS12-377/BW6 โ†’
        • BW6: One curve where circuit native in FqF_qFqโ€‹ โ†’ native operations for Gt, โ€œNon Native Arithmeticโ€ for FrF_rFrโ€‹
        • BLS12-377: ANother curve where circuit is native in FrF_rFrโ€‹
      • Do a Groth16 proof for sumcheck, over FrF_rFrโ€‹
      • Do a Groth16 proof for polynomial commitment + verification of first proof over FqF_qFqโ€‹
    • OR we use a regular โ€œpairing curveโ€, like BLS12-381:
      • We do NNA operations for FqF_qFqโ€‹
        • F_r operatiopn can do natively
        • Problematic because 1-2 order of magnitude
        • Potential tricks: r<<qr << qr<<q, that means we can embed one element FrF_rFrโ€‹ directly in one FqF_qFqโ€‹ , could potentialy write many operations, like add/mul and only doing the modulo at the end

    CryptoNet is a Protocol Labs initiative.