1024 Commits

Author SHA1 Message Date
Matthew Liu
f3df943daa fixed errors due to conditional compilation with debugger feature in fhe_program_tests 2023-07-17 01:04:37 -07:00
Matthew Liu
5f66f73602 fixed compilation errors based on conditional dependencies when debugger not enabled 2023-07-17 00:46:05 -07:00
Matthew Liu
0f87062b0d modified debug_fhe_program to not return anything 2023-07-17 00:35:19 -07:00
Matthew Liu
145295584b format 2023-07-16 23:06:17 -07:00
Matthew Liu
e492a2e450 modified visibility of sealsecretkey in privatekey struct to be public 2023-07-16 15:58:14 -07:00
Matthew Liu
cb46c4b85b fixed more compilation errors and enabled debugger feature in sunscreen_backend. next step: figure out secret vs privatekey and change debug_fhe_program accordingly 2023-07-16 02:05:27 -07:00
Matthew Liu
cc90bf3548 compilation errors in graph construction test, enabled debugger feature in sunscreen_fhe_program 2023-07-14 17:57:45 -07:00
Matthew Liu
21683f2e23 enabled debugger in zkp backend 2023-07-14 16:33:46 -07:00
Matthew Liu
644d044522 fixed some depenendcy issues to enable debugger feature across workspace, now going to fix compilation results/add support with debugger feature 2023-07-14 16:26:02 -07:00
Matthew Liu
75d59ce14d created start web server function 2023-07-14 15:21:35 -07:00
Matthew Liu
61333183e7 removed nodes file from debugger 2023-07-14 14:21:48 -07:00
Matthew Liu
2eba60472a fxied remaining compilation issues in run 2023-07-14 14:10:36 -07:00
Matthew Liu
bf41566474 added fhe-debugger files as modules 2023-07-14 13:34:24 -07:00
Matthew Liu
7e0cdc212d more compilation error fixes + moved fhe-debugger into debugger module 2023-07-14 13:33:17 -07:00
Matthew Liu
a0d6e9bce3 fixed compilation rrors in tests for run.rs 2023-07-14 11:26:42 -07:00
Matthew Liu
c153222731 implemented set_data, also added calls to set_data in run unchecked 2023-07-14 00:42:02 -07:00
Matthew Liu
0cb4a82498 rick's coimments/changes 2023-07-14 00:06:40 -07:00
Matthew Liu
9f1f6b0a08 moved sessions to runtime 2023-07-13 13:29:00 -07:00
Matthew Liu
4f3e9f435d format and clippy fix 2023-07-13 12:11:41 -07:00
Matthew Liu
8ff5b0e012 documentation, removed some unused dependencies 2023-07-13 12:07:47 -07:00
Matthew Liu
8e984794e6 documentation for sessions 2023-07-13 11:47:01 -07:00
Matthew Liu
de3338da8f sessions file + data structure: 2023-07-13 11:36:17 -07:00
Matthew Liu
95f734ac8b modified tests in validation.rs 2023-07-12 16:45:16 -07:00
Matthew Liu
930db4b619 format fixes 2023-07-12 15:07:33 -07:00
Matthew Liu
b9bd9cc0fe fixed some fhe program tests based on changes to compilationresult data structure 2023-07-12 15:06:21 -07:00
Matthew Liu
e4d22361a4 doc fixes 2023-07-12 14:19:23 -07:00
Matthew Liu
5b16f91057 clippy and format fixes 2023-07-12 14:15:15 -07:00
Matthew Liu
cc0e11a1ba updated measuredmodel call to run_program_unchecked with a secret key 2023-07-12 14:11:20 -07:00
Matthew Liu
0f3c55fc93 fixed compilation errors for tests in run file, now does tests with secret key 2023-07-12 14:04:41 -07:00
Matthew Liu
22c163afef added run_impl and debug_fhe_program, also added debuginfo struct and added parameter for secret key in run unchecked 2023-07-12 13:57:05 -07:00
Matthew Liu
7a6a774582 displays serialized graph strings 2023-07-12 12:33:15 -07:00
Matthew Liu
722bfbddce can display graph for given rational operations 2023-07-11 14:16:01 -07:00
rickwebiii
f05ce704b1 transparent-ciphertexts feature (#280) 2023-07-11 12:16:42 -07:00
Matthew Liu
059e4d93aa remains to figure out how to display graphs with rationals 2023-07-10 17:51:47 -07:00
Matthew Liu
83d6156621 format fixes 2023-07-10 17:35:02 -07:00
Matthew Liu
78f84fa1cf fixed dependency issues and can now return graph information of basic fhe program 2023-07-10 17:26:01 -07:00
Matthew Liu
e4c5921b48 fixed context compilation errors 2023-07-10 14:09:43 -07:00
Sam Tay
363734ff38 Properly factor inserting literal plaintexts (#278)
Throughout the const arthimetic operations. Not sure why I didnt do this in the initial PR
2023-07-10 13:39:14 -05:00
Matthew Liu
8f6a1d7b98 cleaned up some conditional compilation logic in context, also formatting fixes 2023-07-10 11:28:56 -07:00
Matthew Liu
243d748cdf fixed references of .0 into .graph and enabled conditional compilation of debugging structs, but this broke fhe_program proc macro 2023-07-10 11:03:09 -07:00
Ryan Orendorff
8dfaf33452 Switch SEAL submodule to sunscreen org (#277) 2023-07-10 10:57:56 -06:00
Matthew Liu
40adf1d93f infrastructure for groups 2023-07-09 21:32:32 -07:00
Matthew Liu
ee1ff44646 added a get for stackframelookup, added clone to programgroup 2023-07-09 20:05:58 -07:00
Ryan Orendorff
95721487a8 Mixed bounds in logproof (#276)
This enables some small performance increase for smaller proofs (up to approximately 75%). Additionally this enables the prover and verifier to agree on which components may or may not be interesting by specifying a
bounds of zero.
2023-07-07 12:37:12 -06:00
Ryan Orendorff
300c5eb019 Fix assert_poly_expansion for k > 1 (#275)
* Fix assert_poly_expansion for k > 1

The polynomial expansion was using a flattened tensor product when a normal kronecker product should have been used. This fixes that error.

As a consequence, it is now also possible to create a matrix from a
vector of vectors. This was implemented to make it easier to create the test cases for k > 1.
2023-07-07 11:52:32 -06:00
Ryan Orendorff
a91c7291fb Add CSV stdout for logproof bench (#274) 2023-07-06 10:36:27 -06:00
Matthew Liu
8d5e488e9c more programgroup 2023-07-06 00:47:02 -07:00
Matthew Liu
b8c6c77a08 programcontext/programgroup structs defined 2023-07-05 22:21:15 -07:00
Sam Tay
5faf981178 Hackathon; or, various compiler improvements (#272)
* Misc doc fixes

* Fix sunscreen zkp exports

* Fix broken api doc reference

* Add starter zkp example

* Use ZkpRuntime::new in sudoku example

* Use ? over unwrap in zkp examples

* Refactor pattern matching

No functionality changes

* Disallow `mut` args in fhe/zkp programs

* Play around with allowing cipher|plain values

* Allow user-declared plain|cipher values

NOTE: Not fully implemented. Will not work on Rational types until we
factor out literal->plaintext into a proper trait.

This allows, e.g.

```rust
fn simple_sum(a: Cipher<Signed>, b: Cipher<Signed>) -> Cipher<Signed> {
    let mut sum = fhe_var(0);
    sum = sum + a;
    sum = sum + b;
    fhe_out(sum)
}
````

* Refactor array::output()

* More targeted compiler error messages on invalid return values

* Add option for var.into() rather than fhe_out(var)

* Fix incorrect macro invocation

* Add trait for inserting const as plaintext

* Impl all arithmetic operations for indeterminate nodes

* Offer an `fhe_var!` macro

* Offer a zkp_var! macro

* Offer a (safe) debug impl for zkp program nodes

* Fix tests

* Add test for fhe_var!

* Simplify tf out of sudoku

* Simplify fhe input() codegen

* Marginally better compiler error messages on invalid fhe program arg types

* Fix error for fhe program argument attributes

* Throw appropriate compiler error on generics

* Silence clippy warnings in generated code

These I think are typically ignored by default when consuming proc macros but might as well be explicit

* Fixup quote_spanned invocations

Unsure how important this is, but see here: https://docs.rs/quote/latest/quote/macro.quote_spanned.html#syntax

* Automatically call `.into()` on fhe prog return values

* Factor fhe_program_impl

* Further factor fhe_program_impl

So that token generation happens in helper methods, and the ultimate output() func is readable

* Fix doctests

* Fix clippy warnings

* Remove TODOs

* Add missing example runs to CI

* Oops: fix 232 > 64

* Allow arbitrary expressions in fhe_var!

* Use custom "into" to support impls on []

* Support explicit #[private] params

* Remove `backend = "bulletproofs"` attribute

* Address PR reveiw
2023-07-05 17:07:21 -05:00
Matthew Liu
fd9458a84b some more tests 2023-07-05 12:05:47 -07:00