Code Monkey home page Code Monkey logo

simple-flpcp's Introduction

Simple fully linear PCP simulator

This is the python implementation of simple fully linear PCP simulator using gmpy2.

Run

This project is implemented on Pipenv environment. You should refer to Pipfile for information on the necessary python package. If pipenv is installed on your system, you can run this program through the following commands on this project path.

pipenv install
pipenv shell
python3 TestComplexCircuit.py

or

pipenv install
pipenv shell
python3 TestInnerProductCircuit.py

If you would like to run recursive linear IOP for parallel-sum circuit, run following command.

python3 TestInnerProductParallelCircuit.py

Then, you can compare recursive linear IOP for parallel-sum circuit with short proofs for parallel-sum circuit whose result can obtained through running following command.

python3 TestInnerProductParallelCircuitWithoutIOP.py

Result

In a graph in which the x-axis is vector dimension, the number of circuits is fixed at 16.

  • Comparison between FLPCP and FLIOP

fig_time_comparison.png fig_time_comparison.png fig_complexity_comparison.png fig_time_comparison_by_dim.png fig_complexity_comparison.png fig_complexity_comparison_by_dim.png

See Experiments.py for code used to conduct experiments and draw graphs!

Project Structure

├── Base                         // Containing abstract class
│   ├── Circuit.py               // Abstract circuit class. All custom circuit class should inherit from this class
│   ├── Gate.py                  // Abstract gate class, add gate class, constant multiplication gate class, and multiplication gate class
│   ├── ParallelSum.py           // Parallel sum circuit class. It is used for recursive linear IOP.
│   ├── ParallelSumRootM.py      // Parallel sum circuit class. It is used for short proofs for parallel circuit.
│   └── GGate.py                 // Abstract G-gate class. All custom G-gate class should inherit from this class
├── Custom                       // Containing User custom circuit
│   ├── InnerProductGGate.py     // Custom G-gate to perform inner product
│   ├── InnerProductCircuit.py   // Custom circuit containing only one inner product G-gate
│   └── ComplexCircuit.py        // Custom circuit containing many add gate, cmul gate, and inner product G-gate
├── Unit                         // Calculation unit
│   ├── Operand.py               // Abstract class of all operand class of circuit and G-gate
│   ├── Integer.py               // Modular Integer
│   ├── Proof.py                 // Proof vector
│   ├── Query.py                 // Query vector
│   └── Polynomial.py            // Containing polynomial coefficient vector
├── Pipfile
├── Pipfile.lock
├── TestComplexCircuit.py                     // Run this .py file to test FLPCP for complex circuit
├── TestInnerProductParallelSum.py            // Run this .py file to test recursive linear IOP for parallel-sum inner product circuit
├── TestInnerProductParallelSumWithoutIOP.py  // Run this .py file to test short proofs FLPCP for parallel-sum inner product circuit
└── TestInnerProductCircuit.py                // Run this .py file to test FLPCP for simple inner product circuit

Reference

simple-flpcp's People

Contributors

dohunkim1215 avatar

Watchers

 avatar

Forkers

circleolami

simple-flpcp's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.