iden3 / go-circom-prover-verifier

Go implementation of the Groth16 zkSNARK Prover and Verifier compatible with Circom
GNU General Public License v3.0
38 stars 13 forks source link

Speed on 32 bit arch #23

Open ed255 opened 4 years ago

ed255 commented 4 years ago

Note: This is an informative issue.

The proving function of zkSNARK is a heavy operation, where most of the time is spend doing curve arithmetic (of G1 and G2). This implementation uses the cloudflare bn256 library for curve arithmetic, which is implemented using 64bit arithmetic underneath. Probably because of this, curve operations are extremely slow in 32 bit architectures. Here are the times to run the tests in my machine in 64 bit mode and in 32 bit mode:

Summary of 32 bits tests:

This means that for now 32 bit architectures will get a very degraded performance.