-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
It'd be quite nice to have FheBool available in the VM to write circuits. As we're using FHEW, all binary operations are far faster than multiplies and there's a few queries I want to write that are mostly boolean operations. I was able to make it work by making certain functions public for a hiring query I've been working on: https://github.com/RiverRuby/phantom-zone/blob/e56ab8ad6b9f2a45d5cd645b2a50b41ba651bec9/examples/non_interactive_hiring.rs
I can make a PR with this fork once I clean up some code, but I'm not sure if I'm breaking other abstractions. There's also a few quirks that I'd like to bring up:
- Need to specify the
NonInteractiveBatchedFheBools<_>type for boolean encryptions, don't need to do this for u8 encryptions - Need to make a reference everytime you do an operation with FheBools, leading to kind of confusing code like
&(&(&a.queryable & &b.queryable) & &(&a.position ^ &b.position)) & &((&a.salary.gt(&b.salary)) ^ &b.position) - Need to specify
FheBoolby puttingVec<u64>of encryption intodatafield which isn't necessary forFheUint8 FheBoolhas aextractfunction, whereasFheUint8hasextract_at, should likely be the same
Metadata
Metadata
Assignees
Labels
No labels