GPUSnarks is an open-source project trying to put the expensive parts of ZK-Proofs (mainly the FFT) to GPUs. My idea is to integrate GPUSnarks into bellman and libsnarks so it can easily be used by ZCash.

The repository can be found at

I already implemented the FFT on 32 bit values. However the FFTs in ZK-Snarks need 256 bit primes at least. With this grant I want to extend my implementation to 256 bit primes to accelerate real Snarks and bring value to Zcash.

The implementation is written in CUDA, so it is currently only available for Nvidia GPUs.

Milestones The project has three major milestones:

  1. Finishing up the math library Currently there is no ready-to-use and efficient library for finite field arithmetic on GPUs. I already started implementing it, but a lot more work, especially in testing still remains here. This library can even be used to accelerate other cryptographic operations on GPUs.

  2. Integration in Libsnark & runtime improvements The interface of GPUSnarks matches the interface provided by libff (the library used in libsnark). However there has to be some conversion implemented to make it available for everyone. Additionally I need to extend the build scripts of both Libsnark and GPUSnarks. I will also improve the CUDA code with ptxas-assembler to speed up the computation.

  3. Integration into Bellman & Multi-GPU support The interface of GPUSnarks is similar to the interface used in the bellman library. However Rust does not provide the necessary CUDA headers to easily extend bellman. Additionally I am going to implement support for bigger circuits (circuit size is currently limited by RAM size of the GPU to 2^27 (8GB)) and for multiple GPUs to parallelize the work


8 months ago
0 / 200 ZEC
Proposal didn’t get funded
Finish the 256bit Math library
Integration into Libsnark
Integration into Bellman

Finish the 256bit Math library

Estimate: August 2019
Reward: 40 ZEC
There is currently no math library for finite field math on GPUs. In this Milestone, I will finish the library for calculation with arbitrary sized integers.