Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Replicating circom-MP-SPDZ to support tfhe-rs #67

Open
Vishalkulkarni45 opened this issue Aug 15, 2024 · 2 comments
Open

Proposal: Replicating circom-MP-SPDZ to support tfhe-rs #67

Vishalkulkarni45 opened this issue Aug 15, 2024 · 2 comments
Assignees
Labels
Application Proposal Proposal submitted by applicants Grant Work in Progress Passed review and work in progress

Comments

@Vishalkulkarni45
Copy link

Vishalkulkarni45 commented Aug 15, 2024

General Grant Proposal

Project Overview 📄

Overview

replicate circom-MP-SPDZ to support tfhe-rs

Project Details

Team members

Team members

Team's experience

  • Worked on the grant to support tfhe for the greco
  • 2nd place on Ethcon Korea 2023: torch2circom, Built upon keras2circom and circomlib. Implemented some mathematical libraries about matrix operations.
  • Finished 2023 ZK Summer Contribution Program
  • The team has developed a practical product called ZK-Snap, an innovative private voting protocol tailored for decentralized communities and organizations, constructed using the halo2-axiom framework.
  • Participated in Zk-Block1 of the yAcademy, where audited codebase built using circom.
  • Constructed a rlwe pk-enc circuit for Greco .
  • The team is skilled in constructing circuits using halo2-axiom, halo2-scroll, plonky2, and cirom.

Development Roadmap 🔩

Overview

  • Total Estimated Duration: 8 weeks
  • Total Estimated Working Hours: 150 hr
  • Full-time** equivalent (FTE): 0.5
  • Expected Start Date: Aug 20th 2024
  • Expected End Date: Oct 15th 2024

Milestone 1 : Understanding tfhe-rs and Documentation

  • Total Estimated Duration: 3 weeks
  • FTE: 0.375
  • Estimated delivery date: Sep 10 th 2024

Deliverables and Specifications

1a. Documentation
  • A comprehensive tutorial explaining tfhe-rs's domains, supported operations and data types (and how they are compatible with circom's operations, paying special attention to binary, arithmetic in prime field and ring $2^k$), security parameters, and number of parties supported.
  • Best practices and caveats.
  • Step-by-step guide on executing example scenarios (covering as much of the discovered knowledge above as
    possible for demonstration purposes) with tfhe-rs.
  • Understand circom-MP-SPDZ

Milestone 2 : Adaptation of circom-MP-SPDZ to circom-tfhe-rs

  • Total Estimated Duration: 5 weeks
  • FTE: 0.525
  • Estimated delivery date: Oct 15th 2024

Deliverables and Specifications

2a. Functionality: Generate Circuits for tfhe-rs from Bristol Circuit

Modify circom-MP-SPDZ code to generate tfhe-rs circuit output from circom-2-arithc.

2b. Functionality: Generate Inputs for tfhe-rs from circom-MP-SPDZ Inputs

Modify circom-MP-SPDZ code to generate inputs for tfhe-rs from the inputs defined in circom-MP-SPDZ.

2c. Functionality: Run the Generated tfhe-rs Circuits and Inputs

Modify circom-MP-SPDZ code to run tfhe-rs and get parsed outputs.

Application

Component 2c runs tfhe-rs with the circuits generated by component 2a with the inputs generated from component 2b.

2d. Testing Guide
  • Proper unit test coverage (above 90%) for circuit generation, input generation, and circuit execution.
  • Integration tests for example circuits like op_tests, naive_search, two_outputs, and nn_circuit_small ( expected some tricky issues here due to incompatibility between circom front end and tfhe-rs backend, and also some configurations are needed, look into the original circom-MP-SPDZ for reference).
2e. Documentation
  • Inline documentation of the code.
  • Comprehensive documentation covering the entire workflow, from code modification to testing and execution.
@NOOMA-42 NOOMA-42 added the Application Proposal Proposal submitted by applicants label Aug 15, 2024
@mhchia
Copy link

mhchia commented Aug 21, 2024

@Vishalkulkarni45

Can you make a few adjustments to the milestones?

  1. The Total Estimated Duration is currently 7 weeks (7*40*0.5=140 hours), which is slightly shorter than the 150 hours required. Would you consider extending the duration to 8 weeks or more? This would provide a buffer. The working hours would remain the same, but the due date would be adjusted accordingly. Of course, you can still finish earlier as long as the milestone is completed.

  2. Milestone duration adjustments:

    • Milestone 1 should be 45 hours.
    • Milestone 2 should be 105 hours.
  3. For both milestones, please ensure "Total Estimated Duration" reflects the number of weeks and add a "Total Estimated Working Hours" section for the exact hours.

    • Example for Milestone 1:
      • Total Estimated Duration: 6.5 weeks
      • Total Estimated Working Hours: 45 hours

NOTE: The "Expected Start Date" and "Expected End Date" might be subject to changes since they could be finalized after the grant is confirmed.

@mhchia
Copy link

mhchia commented Aug 23, 2024

Looks good to us! cc @NOOMA-42

@NOOMA-42 NOOMA-42 added the Grant Work in Progress Passed review and work in progress label Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Application Proposal Proposal submitted by applicants Grant Work in Progress Passed review and work in progress
Projects
None yet
Development

No branches or pull requests

3 participants