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

Proposal: Replicating circom-MP-SPDZ to support Lattigo

Open tmors opened this issue 6 months ago • 3 comments

General Grant Proposal

Replicating circom-MP-SPDZ to support Lattigo https://github.com/privacy-scaling-explorations/acceleration-program/issues/54

Project Overview :page_facing_up:

Overview

  1. write documentation for lattigo
  2. replicate circom-MP-SPDZ to support lattigo

Project Details

Team :busts_in_silhouette:

Team members

Team's experience

We have rich experience in cryptographic component development, including OT, PSI, GC, Beaver Triples, etc., and are familiar with golang and MP-SPDZ.

Development Roadmap :nut_and_bolt:

Overview

  • Total Estimated Duration: 10 weeks
  • Total Estimated Working Hours: 150 hr
  • Full-time equivalent (FTE): 0.4
  • Expected Start Date: Aug 16th 2024
  • Expected End Date: Oct 30th 2024

Milestone 1: Understanding Lattigo and Documentation

  • Estimated Duration: 3 weeks
  • FTE: 0.4
  • Estimated delivery date: Sep 8th, 2024
  • Total Estimated Working Hours: 45

Deliverables and Specifications

1a. Documentation
  • A comprehensive tutorial explaining Lattigo'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 the discovered knowledge above as possible for demonstration purpose) with Lattigo.

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

  • Estimated Duration: 7 weeks
  • FTE: 0.4
  • Estimated delivery date: Oct 30th 2024
  • Total Estimated Working Hours: 105

Deliverables and Specifications

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

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

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

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

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

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

Application

Component 2c runs Lattigo 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 (notice that you should expect some tricky issues here due to incompatibility between circom front end and Lattigo backend, and also some configurations are needed, see 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.

tmors avatar Aug 12 '24 09:08 tmors