Commit Graph

26 Commits

Author SHA1 Message Date
William Seo
94b65fdd91 Cleaned up directory, changed test names 2022-04-27 06:29:08 +00:00
William Seo
afd8bf200f Added support for addition, multiplication, and simple vectorized operations 2022-04-26 00:22:34 +00:00
William Seo
cb53d1a7e6 Deleted extraneous content. Fixed a bug 2022-03-31 06:05:34 +00:00
William Seo
2159c20ff3 Added building/testing for FHE backend 2022-03-31 05:13:24 +00:00
William Seo
248d746ca6 Updated backend to support SEAL interpreter 2022-03-25 00:59:56 +00:00
Edward Chen
8fed29bd32 ABY VM and Interpreter (#47)
Updated ABY testing framework with an ABY bytecode and interpreter
2022-02-28 19:47:50 -05:00
William Seo
1cb736f6df Merged with main 2022-02-21 20:26:28 +00:00
William Seo
ea4b7ed5f2 Added Map operation to IR 2022-02-16 20:13:26 +00:00
Edward Chen
76539bf05d Function and Import support for C Frontend (#45)
Co-authored-by: Alex Ozdemir <aozdemir@hmc.edu>
Co-authored-by: Ubuntu <ubuntu@neptune2.maas>
2022-02-16 12:15:51 -05:00
William Seo
cfc2235d66 fhe and, or, xor test cases 2022-02-03 20:47:42 +00:00
William Seo
f644be097d Implemented the generation of the code for initializing SEAL parameters, encryption, making the server function call, decryption. 2022-01-27 22:46:30 +00:00
Edward Chen
75572c6a2c C Frontend (#22) 2022-01-20 10:16:27 -08:00
Alex Ozdemir
f2744e0c06 IR-based Zokrates front-end (#33)
The ZoKrates front-end now represents ZoK arrays as IR arrays, and ZoK structures as (type-tagged) IR tuples.

During this change, I discovered that IR support for eliminating tuples and arrays was not complete.

Thus the change list is:

    The ZoK front-end uses IR arrays and tuples
    Improve IR passes for array and tuple elimination
    Enforce cargo fmt in CI
    Bugfix: handle ZoK accessors in L-values in the correct order
    Bugfix: add array evaluation to the IR

This PR does not:

    implement an array flattening pass
    implement permutation-based memory-checking

Benefits:

    The ZoK->R1CS compiler is now ~5.88x faster (as defined by the time it takes to run the tests in master's scripts/zokrates_test.zsh script: this goes from 8.59s to 1.46s)
        For benchmarks with multi-dimensional arrays, the ZoK->R1CS compiler can now compile them with reasonable speed. Before it it would time out on even tiny examples.
    The ZoK->R1CS compiler will be able to benefit from future memory-checking improvements
    IR support for arrays and tuples is complete now, making those parts of the IR more accessible to future front-ends.

alex-ozdemir added 21 commits 11 days ago
2022-01-01 11:44:56 -08:00
Alex Ozdemir
8914c007cd Public inputs for proofs. (#27) 2021-12-10 13:09:05 -08:00
Alex Ozdemir
8a05a107ed Deterministic compilation & better CLI (#25)
This PR makes compilation deterministic (by switching to fxhash) and improves the CLI.

Technically, the std-based hash tables cannot be guaranteed to have the deterministic iteration order that we need, regardless of what hash you use, so I've added some micro-tests for the property that we need. I'm not optimistic about getting better guarantees from std, but I'll try.

The CLI has also changed.
2021-11-29 15:17:32 -08:00
Edward Chen
991c710cea Support lowering loops to ABY (#19)
* loops for ABY!
2021-09-03 11:24:53 -04:00
Edward Chen
92cff0a119 Integrated EZPC helper file (#18)
* Added EZPC helper file, updated output, added shift tests
2021-09-02 18:08:08 -04:00
Edward Chen
d9d66896b3 Added support for multiple outputs in test cases (#17) 2021-08-31 19:24:14 -07:00
Edward Chen
fd2a7e4bf2 Added Conversion Gates & Integrated with OPA SharingMap (#16)
* OPA-by-ILP benchmark example

* Reverted unverified push to master branch

* Added conversion gates and integrated ABY lowering with SharingMap

Co-authored-by: Alex Ozdemir <aozdemir@hmc.edu>
2021-08-25 22:38:50 -07:00
Edward Chen
5579b99888 Revert "Added conversion gates and integrated SharingMap"
This reverts commit bd022fad38.
2021-08-25 16:48:07 -04:00
Edward Chen
bd022fad38 Added conversion gates and integrated SharingMap 2021-08-25 16:45:24 -04:00
Edward Chen
0528353296 Tested ite (#13) 2021-08-19 09:35:38 -07:00
Edward Chen
3b0bbc9fff added const value translation for ABY (#11) 2021-08-16 22:54:41 -07:00
Alex Ozdemir
fa711e6900 ZoKrates->ILP toolchain and tests (#10) 2021-08-07 00:08:46 -07:00
Edward Chen
68da42993c Zok to ABY pipeline (#4)
Lowering layer from CirC IR to ABY 
- Lowers IR to ABY C++ 
- Writes translated code into ABY submodule and update CMake files
- tests using Python to run ABY executables

Co-authored-by: Alex Ozdemir <aozdemir@hmc.edu>
2021-07-28 21:33:21 -07:00
Alex Ozdemir
1247e2cf6f ZoKrates MPC party numbers
Adds:
* Parsing party numbers from private annotations (e.g. private<1>, private<2>, ...)
* A "mode" flag to the ZoKrates generator which is either Proof or Mpc(party_count)
* Appropriate generation
* Modifications to the circ driver
* two tests
2021-06-26 00:40:13 -07:00