acceleration-program icon indicating copy to clipboard operation
acceleration-program copied to clipboard

Proposal: Replicate circom-MP-SPDZ to support MOTION

Open frodoresearch opened this issue 1 year ago • 2 comments
trafficstars

Project Overview :page_facing_up:

Overview

Replicating circom-MP-SPDZ to support MOTION.

This proposal is in response to issue https://github.com/privacy-scaling-explorations/acceleration-program/issues/56

Project Details

This project will allow people to write Circom code and run MPC with the MOTION framework, enabling more options for benchmarks and different use cases.

I'll reuse the code in the circom-MP-SPDZ repo and adapt the functions to generate circuits and inputs for MOTION, allowing parties to easily run the MOTION framework with the generated files.

Team :busts_in_silhouette:

Team members

Team's experience

I have good experience in research and development. I've done computer architecture based research, full-stack web3 engineering, as well as zk circuit engineering, and I'm looking forward to learning more with this project.

Development Roadmap :nut_and_bolt:

Overview

  • Total Estimated Duration: 6.5 weeks
  • Total Estimated Working Hours: 150 hours
  • Full-time equivalent (FTE): 0.50
  • Expected Start Date: Aug 20th 2024
  • Expected End Date: Oct. 5th 2024

Milestone 1: Understanding MOTION and Documentation

  • Estimated Duration: 2.5 weeks
  • Estimated Working Hours: 45 hours
  • FTE: 0.45
  • Estimated delivery date: Sept. 7th 2024

Deliverables and Specifications

1a. Documentation
  • A comprehensive tutorial explaining MOTION'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𝑘), 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 MOTION.

Milestone 2: Adaptation of circom-MP-SPDZ to circom-MOTION

  • Estimated Duration: 4 weeks
  • Estimated Working Hours: 105 hours
  • FTE: 0.65625
  • Estimated delivery date: Oct. 5th 2024

Deliverables and Specifications

2a. Functionality: Generate Circuits for MOTION from Bristol Circuit

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

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

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

2c. Functionality: Run the Generated MOTION Circuits and Inputs

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

Application

Component 2c runs MOTION with the circuits generated by component 2a with the inputs generated from component 2b.

2d. Testing Guide
  • Proper unit test coverage (e.g., 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 (noted that this will be tricky issues here due to incompatibility between circom front end and MOTION backend, and also some configurations are needed, I'll be sure to check 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.

Expected Outcome

A library for people to run MPC with MOTION, supporting the same functionality as circom-MP-SPDZ.

frodoresearch avatar Aug 15 '24 16:08 frodoresearch

@frodoresearch

Could you please adjust the current milestones by changing the Estimated Duration to include both weeks and working hours? The updated overview and milestones would look like this:

Overview:

  • Total Estimated Duration: 6.5 weeks
  • Total Estimated Working Hours: 150 hours
  • Full-time equivalent (FTE): 0.75
  • Expected Start Date: Aug 20th, 2024
  • Expected End Date: Oct 5th, 2024

Milestone 1:

  • Estimated Duration: 2.5 weeks
  • Estimated Working Hours: 45 hours
  • FTE: 0.75
  • Estimated Delivery Date: Sept 7th, 2024

Milestone 2:

  • Estimated Duration: 4 weeks
  • Estimated Working Hours: 105 hours
  • FTE: 0.75
  • Estimated Delivery Date: Oct 5th, 2024

Thank you!

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 avatar Aug 21 '24 08:08 mhchia

Looks good to us! cc @NOOMA-42

mhchia avatar Aug 23 '24 06:08 mhchia