zk with programmability
zk with programmability
There are limitations for the Schnoor protocol based on discre log problem, a common seen zk example. It can only support a specific computation, \(x = log_g(y)\), lacking of programmability.
For general arithmetic computation, Groth 16, PLONK is popular.
Groth 16:
- Support arbitrary arithmetic computation with good programmability
- Fast prover time
- Millisecond level verifying time
- Constant proof size even if the arithemtic computation is complex
WASM Deployment
Previous Approach:
- Compile ZKP code into binary and distribute the binary to users Drawback:
- Users prefer to not download a binary
- Complexity in supporting many backends (e.g., Windows, MAС, Ubuntu, etc)
Recent Trend:
- Compile ZKP code to web assembly (WASM) backend
- Distribute as a browser extension
Benefits:
- Users do not need to download a binary
- Directly support diverse backend
WASM Deployment: Performance Bottleneck
- Slow down compared to native CPU execution
- For proving ZKP circuit at Manta Network
- 2~3 seconds latency on native CPU
- v.s. 20~30 seconds latency on WASM
- Bottleneck: MSM(Multi scalar multiplication computation) Computation
- ZPrize: Optimize MSM computation on WASM
- Better algorithm to reduce #finite field computations
- Better exploitation of WASM backend properties E.g., hand-written assembly code