June 20, 2022 — Zero Knowledge Proof (ZKP) allows someone who has information to prove that they have that information but without revealing anything else. It is an emerging technology with many applications in several application areas, in blockchain, finance, online voting, authentication, etc. The ZKP succinct is considered by many people, like Vitalik Buterin, to be the most powerful technology of the last decade. It’s going to enable the next generation of secure, private authentication, and everything around it – from true Ethereum scalability (zk-rollups) to a ZK authentication chip in your smartphone.
The proof part of ZKP is quite complex and requires huge processing power. The most computationally intensive operations of the associated SNARK and STARK protocols are number-theoretic transformation (NTT) and multi-scalar multiplications (MSM). NTT is a specialized form of discrete Fourier transform (DFT) in an integer finite field.
FFTs are the bread and butter of FPGAs. FPGAs are ideal for integer arithmetic operations and bit-level data processing like those required by ZKP and have been used for many years to speed up FFTs in communication systems. And for a long time, FPGA vendors have been looking for the next flagship application that would justify deploying large-scale FPGAs in the cloud.
FPGAs provide enormous processing power, usually in a much more power-efficient way than GPUs, especially when it comes to integer arithmetic. FPGAs also offer greater flexibility than ASICs, which is currently needed to support different ZKP implementations (variety of elliptic curves, proof schemes) and adapt to new protocols.
However, the main challenge with FPGAs is the ease of large-scale deployment and integration with high-level languages and frameworks. An effective accelerator for NTT and MSM operations is not enough. An essential part is the abstraction layer that will allow ZKP accelerators to be integrated with the emerging framework ecosystem of networks such as Polygon, Starkware, Aleo and other leading ZK companies. The abstraction layer that will allow seamless integration of ZKP accelerators with libraries, such as libsnark, rapidsnark, bellman or winterfell, is extremely important for the efficient use of every FPGA system. In addition, the integration of ZKP frameworks with FPGAs should enable large-scale deployment.
InAccel has a long history of effectively deploying large-scale FPGAs. Therefore, when we first encountered ZKP, we managed to integrate open source FPGA accelerators with widely used ZK libraries extremely quickly. In just a few weeks, we have achieved e2e integrations of FPGAs with frameworks such as Polygon Hermez, Nightfall and Miden. Using the InAccel (resource management and accelerator orchestration) software stack, we enabled fast and efficient integration of FPGA provers with two state-of-the-art ZK circuit compilers, namely Circom and ZoKrates.
Today, InAccel launches the first end-to-end FPGA integration with several state-of-the-art ZK frameworks. ZK Playground (https://play.zkaccel.io) is an interactive web-based development environment that allows anyone to test zkSNARK circuits on FPGAs, using the libraries of their choice: Circom, gnark or ZoKrates. Developers, whether expert or novice, can now quickly and effortlessly experiment with creative new ZK systems, from the comfort of their browser. The playground currently uses open source FPGA accelerator designs, with limited performance, but will soon be powered by the new InAccel FPGA accelerators.
The InAccel orchestration layer also allowed us to provide easy deployment at scale and on demand. This essentially means that InAccel FPGA clusters can provide the elasticity required to efficiently handle an enormous amount of proof generation tasks, even when the demand for proof changes over time. The integrated solution can be deployed either on internal FPGA clusters or on cloud FPGA clusters.
ZKP is considered by many to be one of the most notable innovations of the last fifty years of computing. Zero Knowledge Proofs (ZKPs) offer unique properties that make them essential components of various blockchain scaling and privacy solutions, including ZK rollups. FPGAs, when effectively combined with the right abstraction, for seamless integration and scaling, could be the ideal computing platform for this emerging market that will affect many fields in the near future.