Sitemap
Matter Labs

Scaling #Ethereum’s values and security with zkEVM

World’s first practical hardware for zero-knowledge proofs acceleration

3 min readJul 31, 2020

--

Today Matter Labs is releasing no fewer than THREE progress reports. We start with our first empirical test results for the FPGA implementation of multiexponentiation operation on the BLS12–381 curve are in! New to multiexponentiation, but feeling brave? Read on!

Press enter or click to view image in full size

For newcomers, multiexponentiation is the most time consuming operation used in modern proof systems based on pairing friendly elliptic curves: it takes around 70% of prover time [1] in proof systems like Groth16 or PLONK. Numbers vary on different elliptic curves, proof systems and circuit sizes, but you get the idea.

Our first version achieved a speed of 2.8 million point/scalar pairs per second on a single FPGA board. As a comparison, an 8 physical core CPU can chunk through around 440 thousand point/scalar pairs per second. We emphasize physical cores because cloud providers also count virtual cpus; virtual cpus effectively double the number of physical cores for IO bound computations, but only physical cores matter for intensive arithmetic computations. Researchers at Matter Labs see further optimization opportunities with the potential to scale point/scalar pairs per second a further 2–2.5x. Unfortunately, the BLS12–381 curve is not yet available on Ethereum, but is scheduled for the August 2020 Berlin fork.

Get Alex Gluchowski’s stories in your inbox

Join Medium for free to get updates from this writer.

Our implementation targets Amazon F1 cloud FPGA servers, as we’re trying to minimize the necessary complexity to contribute. We want to make it possible for anyone to rent a cloud server and spin right up. This has placed some limits on performance: F1 instances have frequency and resource limitations. By targeting the F1 instance, our implementation will be cross-compatible with the majority of Xilinx FPGAs on the market today. Physical FPGAs owners should expect essentially free performance boost for their boards.

These multiexponentiation performance gains enable several new applications. For example, by accelerating multiexponentiation, it is now possible to implement “PLONK without FFTs,” proposed by Justin Drake [1]. Eliminating FFTs from the proof system workflow eliminates a requirement for elliptic curve main subgroup order `r` for simple radix-2 FFT: that `r-1` has a large divisor form of `2^k`.

Without such requirement one could, for instance, instantiate efficient constructions of timelock puzzles based on the Sloth++ construction by D. Boneh et at. [2], where validity of the delay function evaluation is proved using a zkSNARK (Sloth++ construction requires `r = 3 mod 4`). Timelock puzzles require that output of a delay function is unique. Timelock puzzles prevent one from obtaining a valid decryption key sooner than 1 minute after publication of some data. VDFs permit potentially multiple outputs, that nevertheless can not be computed faster than some bound.

We plan to extend our solution to support wider set of elliptic curves such as BN254 (available for zkSNARKs in Ethereum at the moment) and BLS12–377 (used in Zexe construction [3], a close cousin of BLS12–381). As usual, we will publish our work as open source and release an integration to our proof generation libraries.

1] J. Drake, “PLONK without FFTs”, https://www.youtube.com/watch?v=ffXgxvlCBvo

2] D. Boneh et at., “Verifiable Delay Functions”, https://eprint.iacr.org/2018/601.pdf

3] S. Bowe et al., “Zexe: Enabling Decentralized Private Computation”, https://eprint.iacr.org/2018/962.pdf

--

--