June 20, 2022 -- Zero Knowledge Proof (ZKP) allows somebody who possesses some information to prove that they possess this information but without revealing anything else whatsoever. It’s an emerging technology with many applications in several application domains, in blockchain, finance, online voting, authentication, etc. Succinct ZKP is considered by many people, like Vitalik Buterin, the most powerful technology of the last decade. It is going to enable the next generation of secure and private authentication, and everything around it – from true Ethereum scalability (ZK-rollups) all the way to a ZK authentication chip in your smartphone.
The proving part of ZKP is quite complex and requires a huge amount of processing power. The most computational intensive operations, of the related SNARK and STARK protocols, are Number Theoretic Transform (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 as the ones required by ZKP and have based used for many years to accelerate FFTs in communication systems. And for a long time, FPGA vendors were looking for the next killer application that would justify the FPGA deployment at scale in the cloud.
FPGAs provide huge amount of processing power, usually in much more energy efficient way than GPUs, especially when it has to do with integer arithmetic. FPGAs also offer higher flexibility than ASICs, that is required currently to support the different ZKP implementations (variety of elliptic curves, proving schemes), and adapt to new protocols.
However, the main challenge of FPGAs is the ease of deployment at scale and integration with high level languages and frameworks. An efficient accelerator for NTT and MSM operations is not just enough. A critical part is the abstraction layer that will allow the ZKP accelerators to be integrated with the emerging framework ecosystem from networks like Polygon, Starkware, Aleo and other leading companies in the ZK domain. The abstraction layer that will allow seamless integration of the ZKP accelerators with libraries, like libsnark, rapidsnark , bellman or winterfell, is extremely important for the efficient utilization of every FPGA system. Also the integration of ZKP frameworks with FPGAs must allow deployment at scale.
InAccel has a long experience on the efficient deployment of FPGAs at scale. Therefore, when we first came across ZKP we managed to integrate open-source FPGA accelerators with widely used ZK libraries extremely fast. In just a couple of weeks we did e2e integrations of FPGAs with frameworks like Polygon Hermez, Nightfall and Miden. Using the InAccel software stack (resource management and accelerator orchestration) we enabled the fast and efficient integration of FPGA provers with two state-of-the-art ZK circuit compilers, namely Circom and ZoKrates.
Today InAccel releases the first end-to-end integration of FPGAs with multiple, 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 top of FPGAs, using the libraries of their choice: Circom, gnark or ZoKrates. Developers, both experts and beginners, can now fast and effortlessly experiment on new creative ZK systems, from the comfort of their browser. The playground currently uses open-source FPGA accelerator designs, with limited performance, but it will be soon powered by the new InAccel FPGA accelerators.
The InAccel orchestration layer also allowed us to provide easy deployment at scale and on demand. This basically means that InAccel FPGA clusters can provide the elasticity that is required to efficient process a huge amount of proof generation tasks even when the demand for proofs changes over time. The integrated solution can be deployed either on in-house FPGA clusters or at cloud FPGA clusters.
ZKP is considered by many one of the most notable innovations in the last fifty years of computer science. Zero Knowledge Proofs (ZKPs) offer unique properties that make them essential components of various blockchain scaling and privacy solutions, including ZK rollups. FPGAs when combined efficiently with the right abstraction, for transparent integration and scaling, could be just the right computing platform for this emerging market that will affect many areas in the near future.