PySyft icon indicating copy to clipboard operation
PySyft copied to clipboard

Implement ZKP From Scratch in PyTorch

Open Jasopaum opened this issue 6 years ago • 9 comments

Zero-knowledge proofs have an important role to play in the future of verified machine learning prediction. However, no deep learning framework has the ability to perform verified computation of neural networks using ZKPs. Furthermore, algorithms which are natively implemented in PySyft can be automatically run across Python, GPUs, Javascript, Android (Kotlin), and iOS (Swift). Thus, it is very advantageous for us to re-implement ZKP encryption from scratch using PyTorch tensor operations. In this project, you will implement from scratch or port an existing ZKP library into PyTorch operations. This will allow us to generate, evaluate, and verify ZKP graphs across all platforms supported by PySyft.

We will be using the following resources:

  • https://eprint.iacr.org/2013/279
  • https://eprint.iacr.org/2017/013
  • https://github.com/Charterhouse/pysnark (reference implementation) This is not totally blocked, we can discuss about other protocols if you think they could be suitable but do read these ones before anything else.

Required Skills:

  • Knowledge of PyTorch and Deep Learning
  • Familiarity (or willingness to become familiar) with PySyft
  • Ability to understand the mathematics of ZKPs and/or current libraries implementing them

Difficulty: Advanced While the API shouldn’t be complex, ZKP algorithms are challenging to understand and implement. There are, however, many great implementations to use as references.

Jasopaum avatar Feb 25 '20 22:02 Jasopaum

I'd like to contribute to this

Kritikalcoder avatar Feb 26 '20 17:02 Kritikalcoder

Note: I added a few resources in the issue

Jasopaum avatar Feb 26 '20 22:02 Jasopaum

I also would like to work on this project.

pierrepocreau avatar Feb 27 '20 08:02 pierrepocreau

Hi @Jasopaum , I would like to work on this issue. I have made a merged PR at https://github.com/OpenMined/PySyft/pull/3092 and also filled up the application form. I would like to know how could I go further on this issue. Thank you!

jimboH avatar Feb 28 '20 09:02 jimboH

Could you guys (and also others that could be interested) contact me on Slack (Jason Paumier) so that we can talk about this?

Jasopaum avatar Feb 28 '20 23:02 Jasopaum

Hi @Jasopaum I am Vineet Jain, a final year undergraduate student at IIT Kharagpur. I had experience in DL, TensorFlow, PyTorch, and PySyft. I had done my past summer internship in Federated Learning Project(where I had implemented FL on Raspberry pi's (as clients' server) using PySyft ) where I had used PySyft, Tensorflow federated learning, and Tensorflow Federated Core. I am interested in PySyft projects. I am looking forward to contributing!

vineetjai avatar Mar 05 '20 17:03 vineetjai

Hi, what is the movement like on this issue? Could there be an elaboration on the potential use-cases? For instance, is ZK to be used wrt to MPC protocols? Is one to use interactive challenges or SNARKs? Or is this meant to be a standalone system for delegated computing? What are the design goals? For instance, ZK could introduce about ~1000x computational overhead, although for good schemes, communication and verification could be cheap.

I am not convinced this could gel well with GPU computations, since one requires to store and encode all the intermediate values of a computation, unless the entire ZKP encoding and proving was performed simultaneously on GPU.

jon-chuang avatar Mar 17 '20 20:03 jon-chuang

This issue has been marked stale because it has been open 30 days with no activity. Leave a comment or remove the stale label to unmark it. Otherwise, this will be closed in 7 days.

github-actions[bot] avatar May 22 '20 00:05 github-actions[bot]

Hey! I would love to work on this issue!

karynaur avatar Nov 18 '21 13:11 karynaur