Code Monkey home page Code Monkey logo

fhe_computation_proof's Introduction

Proof of Computation with Real Numbers

Currently has two parts:

1. A jupyter notebook that sets up polynomials from a computation (Clean_proof.ipynb)

This bit has comments and describes the construction of a "quadratic arithmetic program" for computing the standard deviation of a set of three values. The resulting polynomials are then stored in csv files. The polynomials are related as follows:

$p(x) = l(x)*r(x) - o(x)$

$h(x) = \frac{p(x)}{t(x)}$

2. A rust code that does a prover/verifier interaction for these polynomials (fhe_rs)

To run this just go into the directory and do cargo run. This has a few pieces:

a. main.rs runs the verifier-prover interaction to check the relationship $p(s) = t(s)*h(s)$ for two secret polynomials $p(x), h(x)$ and a shared polynomial $t(x)$ at some point $x=s$. The interesting bit here is that all coefficients are real numbers not integers or field elements.

b. polynomials.rs has a generic polynomial evaluation function and an fhe version of the same.

c. utils.rs has utitilies to read in coefficients from csv files and to generate powers of a given number.

d. roles.rs has structures for the prover and verifier with functions to generating and executing queries.

All code borrows heavily from examples in the sunscreen documentation.

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.