Commit Graph

19 Commits

Author SHA1 Message Date
Sam Tay
badb8f9c8f ZKP tweaks (#279)
* Export type alias for bulletproof backend fields

Also, keep bulletproof stuff namespaced to a `bulletproofs` module.

* Change sudoku to use pub over const

* Docs updates

* Rename / clean up sudoku

* Export `Proof` type

Basically required for being able to deserialize a proof

* Add zkp/serde workspace example

* Drive by cleaning

* Exports necessary for gadget impls

* Rename compute_inputs to compute_hidden_inputs

* Add prove/verify builders

* Export the builder types

This isnt strictly necessary but it would be weird for these to not show up in the cargo docs

* Clippy fix

* Add helper .compile() & .runtime() methods to fhe prog fns

I do wonder if these should be defined in a separate trait, just so that they don't live next to the more internal functions in documentation.

* Use new swag to simplify the front-facing api docs example

* Add some whitespace

* Switch to an extension trait

* Add an extension to ZkpProgramFn

* Take an owned ZkpBackend, rather than reference

Its typical to have the caller handle cloning, rather than taking a reference, requiring Clone impl, and forcing clone. Plus, as of now the only backend is a zero size null struct, so nothing to be gained by using a reference. It also just looks weird to always pass `&BulletproofsBackend::new()`

* Update sudoku to use new swag

* Target second attribute in multi attribute error

* Enforce ordering zkp inputs: constants,public,private

Honestly this feels a little unnatural to me. Might want to reverse: private, public, constant and then change all the prove/verify methods to that ordering

* Build whitelist example in CI

* Reorder constant->public->private to private->public->constant

* Fix trailing ws

* Fix example

* Make .runtime() more consistent with .compile()

* Get rid of some boilerplate impls

* Add custom zkp type example

* Move example run checks into example tests

Should speed up CI a bit

* Change whitelist -> allowlist
2023-07-18 15:15:51 -04:00
Sam Tay
aadde9d162 Offer a simpler API for runtime creation (#246)
* Offer a simpler API for runtime creation

* Update docs and examples to use `FheRuntime::new`
2023-06-06 18:56:46 -07:00
rickwebiii
ee830d6d70 Rweber/zkp (#215)
Bring logproofs into monorepo
2023-02-17 14:44:03 -08:00
rickwebiii
3543b88387 Rweber/zkp (#187)
Refactor APIs to support ZKPs
2022-11-22 15:44:00 -08:00
Sam Tay
4b53103953 Auto fix clippy warnings 2022-10-31 15:30:34 -07:00
rickwebiii
121e7be325 Rweber/multiprogram (#130)
Allow compiling multiple FHE programs to use the same parameters.
2022-07-06 17:04:43 -07:00
Rick Weber
ad930251dc Add array support 2022-04-12 11:09:59 -07:00
Rick Weber
d7c579e561 Remove unwrap 2022-04-01 15:14:44 -07:00
Rick Weber
5639f3c16b Rename sunscreen_compiler to sunscreen 2022-03-22 14:29:35 -07:00
Rick Weber
fc63ba110b Rename noise_margin 2022-02-01 17:22:03 -08:00
Rick Weber
03b120e824 Rename Secret/Public to PrivateKey/PublicKey 2022-02-01 17:14:25 -08:00
Rick Weber
a08eb1f5a6 Rename SIMD to Batched 2022-02-01 16:45:34 -08:00
Rick Weber
b92ac2d442 cargo fmt 2022-02-01 16:36:03 -08:00
Rick Weber
37f9167f04 Rename circuit WIP 2022-02-01 16:20:06 -08:00
Rick Weber
483ee9e296 circuit rename WIP 2022-02-01 15:59:05 -08:00
Rick Weber
4554dc2c05 Rename circuit WIP 2022-02-01 15:50:27 -08:00
Rick Weber
7313179d5e Document dot prod 2022-01-28 13:30:00 -08:00
Rick Weber
b7ab182039 dot product example 2022-01-28 12:33:41 -08:00
Rick Weber
70fcb61c2a Insert relinearizations after multiply_plaintex 2022-01-28 10:10:20 -08:00